• Open vSwitch 2.9.2 创建 RPM 安装包


    1.安装依赖环境

    yum install gcc make python-devel openssl-devel graphviz autoconf automake rpm-build redhat-rpm-config libtool 

    2.下载 kernel 源码:

    yum install "kernel-devel-uname-r == $(uname -r)"

    3.创建rpmbuild目录结构

    mkdir rpmbuild/{BUILD,SOURCES,SPECS,RPMS,BUILDROOT} -pv

    4.下载源码,解压,编译

    cp openvswitch-2.9.2.tar.gz rpmbuild/SOURCES/

    tar -xvf openvswitch-2.9.2.tar.gz

    cp openvswitch-2.9.2/rhel/openvswitch.spec rpmbuild/SPECS/

    cp openvswitch-2.9.2/rhel/openvswitch-kmod-rhel6.spec rpmbuild/SPECS/

    5.编译Open vSwitch 2.9.2 用户态模块

    rpmbuild -bb rpmbuild/SPECS/openvswitch.spec --nocheck

    6.编译Open vSwitch 2.9.2 内核态模块

    rpmbuild -bb rpmbuild/SPECS/openvswitch-kmod-rhel6.spec

    DPDK编译:

    cd dpdk-18.02 && make install T=x86_64-native-linuxapp-gcc DESTDIR=.

    openvswitch.spec 配置更改:
    # 增加dpdk的选项

    %build
    ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=%{_localstatedir}
    --libdir=%{_libdir} --enable-ssl --with-dpdk=/root/dpdk-18.02

    # 修改libdir文件安装


    %{_libdir}/lib*.so.*

    %{_libdir}/lib*.so


    这两行改成:

    %{_libdir}/*

    # ovs 初始化
    ovs-vsctl --no-wait init
    ovs-vsctl --no-wait set Open_vSwitch . other_config:dpdk-init=true
    ovs-vsctl --no-wait set Open_vSwitch . other_config:dpdk-socket-mem="1024,0"
    ovs-vsctl --no-wait set Open_vSwitch . other_config:pmd-cpu-mask=0xf

    ovs-vsctl add-br br-int -- set bridge br-int datapath_type=netdev
    ovs-vsctl add-port br-int vhostuser0 -- set Interface vhostuser0 type=dpdkvhostuserclient options:vhost-server-path="/var/run/openvswitch/vhostuser0"
    ovs-vsctl add-port br-int vhostuser1 -- set Interface vhostuser1 type=dpdkvhostuserclient options:vhost-server-path="/var/run/openvswitch/vhostuser1"

  • 相关阅读:
    netstat命令的使用详情
    ps -ef | grep使用详解
    java反射
    Java中的类和类加载机制
    SpringMVC自定义视图 Excel视图和PDF视图(excel部分自己看过,pdf没接触过 )
    JS中!!的作用
    JSONObject没有fromObject方法及其依赖引入
    hdu 3507 Print Article(斜率优化)
    hrbust 2373 小C的问题
    poj 2104 K-th Number(可持久化线段树)/hdu 2665
  • 原文地址:https://www.cnblogs.com/wangjq19920210/p/10509511.html
Copyright © 2020-2023  润新知