Re: [ovs-discuss] OVN: MAC_Binding entries not getting updated leads to unreachable destinations

2018-11-23 Thread Daniel Alvarez Sanchez
On Wed, Nov 21, 2018 at 9:04 PM Han Zhou  wrote:
>
>
>
> On Tue, Nov 20, 2018 at 5:21 AM Mark Michelson  wrote:
> >
> > Hi Daniel,
> >
> > I agree with Numan that this seems like a good approach to take.
> >
> > On 11/16/2018 12:41 PM, Daniel Alvarez Sanchez wrote:
> > >
> > > On Sat, Nov 10, 2018 at 12:21 AM Ben Pfaff  > > > wrote:
> > >  >
> > >  > On Mon, Oct 29, 2018 at 05:21:13PM +0530, Numan Siddique wrote:
> > >  > > On Mon, Oct 29, 2018 at 5:00 PM Daniel Alvarez Sanchez
> > > mailto:dalva...@redhat.com>>
> > >  > > wrote:
> > >  > >
> > >  > > > Hi,
> > >  > > >
> > >  > > > After digging further. The problem seems to be reduced to reusing 
> > > an
> > >  > > > old gateway IP address for a dnat_and_snat entry.
> > >  > > > When a gateway port is bound to a chassis, its entry will show up 
> > > in
> > >  > > > the MAC_Binding table (at least when that Logical Switch is 
> > > connected
> > >  > > > to more than one Logical Router). After deleting the Logical Router
> > >  > > > and all its ports, this entry will remain there. If a new Logical
> > >  > > > Router is created and a Floating IP (dnat_and_snat) is assigned to 
> > > a
> > >  > > > VM with the old gw IP address, it will become unreachable.
> > >  > > >
> > >  > > > A workaround now from networking-ovn (OpenStack integration) is to
> > >  > > > delete MAC_Binding entries for that IP address upon a FIP 
> > > creation. I
> > >  > > > think that this however should be done from OVN, what do you folks
> > >  > > > think?
> > >  > > >
> > >  > > >
> > >  > > Agree. Since the MAC_Binding table row is created by ovn-controller, 
> > > it
> > >  > > should
> > >  > > be handled properly within OVN.
> > >  >
> > >  > I see that this has been sitting here for a while.  The solution seems
> > >  > reasonable to me.  Are either of you working on it?
> > >
> > > I started working on it. I came up with a solution (see patch below)
> > > which works but I wanted to give you a bit more of context and get your
> > > feedback:
> > >
> > >
> > > ^ localnet
> > > |
> > > +---+---+
> > > |   |
> > >  +--+  pub  +--+
> > >  |  |   |  |
> > >  |  +---+  |
> > >  | 172.24.4.0/24 |
> > >  | |
> > > 172.24.4.220 | | 172.24.4.221
> > >  +---+---+ +---+---+
> > >  |   | |   |
> > >  |  LR0  | |  LR1  |
> > >  |   | |   |
> > >  +---+---+ +---+---+
> > >   10.0.0.254 | | 20.0.0.254
> > >  | |
> > >  +---+---+ +---+---+
> > >  |   | |   |
> > > 10.0.0.0/24  |  SW0  | |  SW1  |
> > > 20.0.0.0/24 
> > >  |   | |   |
> > >  +---+---+ +---+---+
> > >  | |
> > >  | |
> > >  +---+---+ +---+---+
> > >  |   | |   |
> > >  |  VM0  | |  VM1  |
> > >  |   | |   |
> > >  +---+ +---+
> > >  10.0.0.10 20.0.0.10
> > >172.24.4.100   172.24.4.200
> > >
> > >
> > > When I ping VM1 floating IP from the external network, a new entry for
> > > 172.24.4.221 in the LR0 datapath appears in the MAC_Binding table:
> > >
> > > _uuid   : 85e30e87-3c59-423e-8681-ec4cfd9205f9
> > > datapath: ac5984b9-0fea-485f-84d4-031bdeced29b
> > > ip  : "172.24.4.221"
> > > logical_port: "lrp02"
> > > mac : "00:00:02:01:02:04"
> > >
> > >
> > > Now, if LR1 gets removed and the old gateway IP (172.24.4.221) is reused
> > > for VM2 FIP with different MAC and new gateway IP is created (for
> > > example 172.24.4.222 00:00:02:01:02:99),  VM2 FIP becomes unreachable
> > > from VM1 until the old MAC_Binding entry gets deleted as pinging
> > > 172.24.4.221 will use the wrong address ("00:00:02:01:02:04").
> > >
> > > With the patch below, removing LR1 results in deleting all MAC_Binding
> > > entries for every datapath where '172.24.4.221' appears in the 'ip'
> > > column so the problem goes away.
> > >
> > > Another solution would be implementing some kind of 'aging' for
> > > MAC_Binding entries but perhaps it's more complex.
> > > Looking forward for your comments :)
> > >
> > >
> > > diff --git a/ovn/northd/ovn-northd.c b/ovn/northd/ovn-northd.c
> > > index 58bef7d..a86733e 100644
> > > --- a/ovn/northd/ovn-northd.c
> > > +++ 

Re: [ovs-discuss] OVN: MAC_Binding entries not getting updated leads to unreachable destinations

2018-11-23 Thread Daniel Alvarez Sanchez
Hi Han,

Yes, I agree that the patch is not enough. I'll take a look at the
GARP thing because it's either not implemented or not working. Here's
a reproducer while I jump back into it.

When you ping 172.24.4.200 from the namespace 1 the first time, a
MAC_Binding entry gets created:

# ovn-sbctl list mac_binding | grep 200 -C2
_uuid   : 07967416-c89c-4233-8cc2-4dc929720838
datapath: 918a9363-fa6e-4086-98ee-8d073b924d29
ip  : "172.24.4.200"
logical_port: "lr0-public"
mac : "00:00:20:20:12:15"


After recreating lr1 and sw1 using a different MAC address,
172.24.4.200 becomes unreachable from sw0 as the MAC_Binding entry
never gets updated.


reproducer.sh

#!/bin/bash
for i in $(ovn-sbctl list mac_binding | grep uuid  | awk '{print
$3}'); do ovn-sbctl destroy mac_binding $i; done

ip net del ns1
ip net del ns2
ovs-vsctl del-port ns1
ovs-vsctl del-port ns2
ovn-nbctl lr-del lr0
ovn-nbctl lr-del lr1
ovn-nbctl ls-del sw0
ovn-nbctl ls-del sw1
ovn-nbctl ls-del public

chassis_name=`ovn-sbctl find chassis | grep ^name | awk '{print $3}'`
ovn-nbctl ls-add sw0
ovn-nbctl lsp-add sw0 sw0-port1
ovn-nbctl lsp-set-addresses sw0-port1 "50:54:00:00:00:01 10.0.0.10"


ovn-nbctl lr-add lr0
# Connect sw0 to lr0
ovn-nbctl lrp-add lr0 lr0-sw0 00:00:00:00:ff:01 10.0.0.254/24
ovn-nbctl lsp-add sw0 sw0-lr0
ovn-nbctl lsp-set-type sw0-lr0 router
ovn-nbctl lsp-set-addresses sw0-lr0 router
ovn-nbctl lsp-set-options sw0-lr0 router-port=lr0-sw0


ovn-nbctl ls-add public
ovn-nbctl lrp-add lr0  lr0-public 00:00:20:20:12:13 172.24.4.220/24
ovn-nbctl lsp-add public public-lr0
ovn-nbctl lsp-set-type public-lr0 router
ovn-nbctl lsp-set-addresses public-lr0 router
ovn-nbctl lsp-set-options public-lr0 router-port=lr0-public

# localnet port
ovn-nbctl lsp-add public ln-public
ovn-nbctl lsp-set-type ln-public localnet
ovn-nbctl lsp-set-addresses ln-public unknown
ovn-nbctl lsp-set-options ln-public network_name=public

ovn-nbctl ls-add sw1
ovn-nbctl lsp-add sw1 sw1-port1
ovn-nbctl lsp-set-addresses sw1-port1 "50:57:00:00:00:02 20.0.0.10"

ovn-nbctl lr-add lr1
# Connect sw1 to lr1
ovn-nbctl lrp-add lr1 lr1-sw1 00:00:00:00:ff:02 20.0.0.254/24
ovn-nbctl lsp-add sw1 sw1-lr1
ovn-nbctl lsp-set-type sw1-lr1 router
ovn-nbctl lsp-set-addresses sw1-lr1 router
ovn-nbctl lsp-set-options sw1-lr1 router-port=lr1-sw1

ovn-nbctl lrp-add lr1  lr1-public 00:00:20:20:12:15 172.24.4.221/24
ovn-nbctl lsp-add public public-lr1
ovn-nbctl lsp-set-type public-lr1 router
ovn-nbctl lsp-set-addresses public-lr1 router
ovn-nbctl lsp-set-options public-lr1 router-port=lr1-public


ovn-nbctl lr-nat-add lr0 snat 172.24.4.220 10.0.0.0/24
ovn-nbctl lr-nat-add lr1 snat 172.24.4.221  20.0.0.0/24

# Create the FIPs
ovn-nbctl lr-nat-add lr0 dnat_and_snat 172.24.4.100 10.0.0.10
ovn-nbctl lr-nat-add lr1 dnat_and_snat 172.24.4.200 20.0.0.10

# Schedule the gateways
ovn-nbctl lrp-set-gateway-chassis lr0-public $chassis_name 20
ovn-nbctl lrp-set-gateway-chassis lr1-public $chassis_name  20


add_phys_port() {
name=$1
mac=$2
ip=$3
mask=$4
gw=$5
iface_id=$6
ip netns add $name
ovs-vsctl add-port br-int $name -- set interface $name type=internal
ip link set $name netns $name
ip netns exec $name ip link set $name address $mac
ip netns exec $name ip addr add $ip/$mask dev $name
ip netns exec $name ip link set $name up
ip netns exec $name ip route add default via $gw
ovs-vsctl set Interface $name external_ids:iface-id=$iface_id
}


add_phys_port ns1 50:54:00:00:00:01 10.0.0.10  24 10.0.0.254 sw0-port1
add_phys_port ns2 50:57:00:00:00:02 20.0.0.10  24 20.0.0.254 sw1-port1

# Pinging from sw0
ip net e ns1 ping -c 4 172.24.4.200

ovn-nbctl lr-del lr1
ovn-nbctl ls-del sw1

ovn-nbctl ls-add sw1
ovn-nbctl lsp-add sw1 sw1-port1
ovn-nbctl lsp-set-addresses sw1-port1 "50:57:00:00:00:02 20.0.0.10"

ovn-nbctl lr-add lr1
# Connect sw1 to lr1
ovn-nbctl lrp-add lr1 lr1-sw1 00:00:00:00:ff:02 20.0.0.254/24
ovn-nbctl lsp-add sw1 sw1-lr1
ovn-nbctl lsp-set-type sw1-lr1 router
ovn-nbctl lsp-set-addresses sw1-lr1 router
ovn-nbctl lsp-set-options sw1-lr1 router-port=lr1-sw1


# Change the MAC address of the LRP
ovn-nbctl lrp-add lr1  lr1-public 00:00:20:20:12:95 172.24.4.221/24

ovn-nbctl lr-nat-add lr1 snat 172.24.4.221  20.0.0.0/24
ovn-nbctl lr-nat-add lr1 dnat_and_snat 172.24.4.200 20.0.0.10

ovn-nbctl lrp-set-gateway-chassis lr1-public centosl-rdocloud 20

# Pinging from sw0 won't work now. For the outside it will.
ip net e ns1 ping -c 4 172.24.4.200
On Wed, Nov 21, 2018 at 9:04 PM Han Zhou  wrote:
>
>
>
> On Tue, Nov 20, 2018 at 5:21 AM Mark Michelson  wrote:
> >
> > Hi Daniel,
> >
> > I agree with Numan that this seems like a good approach to take.
> >
> > On 11/16/2018 12:41 PM, Daniel Alvarez Sanchez wrote:
> > >
> > > On Sat, Nov 10, 2018 at 12:21 AM Ben Pfaff  > > > wrote:
> > >  >
> > >  > On Mon, Oct 29, 2018 at 05:21:13PM +0530, Numan Siddique wrote:
> > >  > > On 

Re: [ovs-discuss] Why PCP value is fixed to zero(0), how we can modify and generate different pcp valued packets

2018-11-23 Thread Ben Pfaff
On Fri, Nov 23, 2018 at 10:43:30AM +0530, Vikas Kumar wrote:
> i had a doubt, why ovs has fixed the pcp value to zero(0), how i can modify
> the pcp value?
> actually i wanted to generate packets based on different pcp values.
> 
> it will be a great help if anyone suggest me any idea,how to modify the pcp
> value of 802.1q header structure.

Use the mod_vlan_pcp action.
___
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss


[ovs-discuss] Metering Feature of OVS not Working as Expected

2018-11-23 Thread Ramzah Rehman
Hi!

I have 2 virtual machines on VMware.  VM one has ovs 2.9.4 installed with
DPDK version 17.11.4. VM one has open vSwitch br0. br0 has IP:10.0.0.5 and
eth0 of VM two has IP: 10.0.0.14  I have following entries installed on
switch br0:

ovs-ofctl -O OpenFlow15 add-meter br0 meter=1,kbps,band=type=drop,rate=500

ovs-ofctl -O OpenFlow15 add-flow br0 arp,in_port=1,actions=output:LOCAL
ovs-ofctl -O OpenFlow15 add-flow br0 arp,in_port=LOCAL,actions=output:1
ovs-ofctl -O OpenFlow15 add-flow br0 ip,ip_dst=
10.0.0.5/255.255.255.255,actions=output:LOCAL
ovs-ofctl -O OpenFlow15 add-flow br0 ip,ip_dst=
10.0.0.14/255.255.255.255,actions=meter=1,output:1

Now I was experimenting with rate-limiting (metering) feature in OVS. When
I give rate of 500 I get bandwidth of 600Mbps for TCP traffic from VM one
to VM two (done vie iperf). For rate 5000 I get 4.92Mbps. Both of these are
fine. When I change rate to 5 I get bandwidth of 30Mbps, whereas
expected bandwidth is around 48-49Mbps. Please let me know what is going
wrong here.

One more question. I just need to use metering feature of ovs. Do I need to
add interfaces to VIFO for that? I am asking this because adding interfaces
to VIFO gave errors.
___
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss


Re: [ovs-discuss] Cannot Install Open vSwitch with DKDP

2018-11-23 Thread Ramzah Rehman
One more question. I need to use metering feature of ovs. Do I need to add
interfaces to VIFO for that? I am asking this because adding interfaces to
VIFO gave errors.

Best Regards,
Ramzah Rehman


On Fri, Nov 23, 2018 at 5:08 PM Ramzah Rehman 
wrote:

> Thanks a lot.
>
> Best Regards,
> Ramzah Rehman
>
>
> On Fri, Nov 23, 2018 at 4:50 PM Timothy Redaelli 
> wrote:
>
>> On Fri, 23 Nov 2018 16:02:30 +0500
>> Ramzah Rehman  wrote:
>>
>> > Hi. I Have installed Open vSwitch 2.9.4 with DPDK 17.11.4 on Ubuntu
>> 14.04.5
>> > LTD and kernel version 4.4.0-31-generic following these two links:
>> > http://docs.openvswitch.org/en/latest/intro/install/dpdk/
>> >
>> http://docs.openvswitch.org/en/latest/intro/install/general/#general-bootstrapping
>> [...]
>> > Even though I followed all steps, ovs-vsctl get Open_vSwitch .
>> > dpdk_initialized gives  ovs-vsctl: Open_vSwitch does not contain a
>> column
>> > whose name matches "dpdk_initialized"  error. Please help.
>>
>> Hi,
>> this is a normal behavior on OVS 2.9.x since "dpdk_initialized" support
>> was added in 2.10 (https://github.com/openvswitch/ovs/commit/3e52fa5).
>>
>> So you can update to OVS 2.10(.1) or you can look for dpdk entries on
>> ovs-vswitchd.log
>>
>
___
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss


Re: [ovs-discuss] Cannot Install Open vSwitch with DKDP

2018-11-23 Thread Ramzah Rehman
Thanks a lot.

Best Regards,
Ramzah Rehman


On Fri, Nov 23, 2018 at 4:50 PM Timothy Redaelli 
wrote:

> On Fri, 23 Nov 2018 16:02:30 +0500
> Ramzah Rehman  wrote:
>
> > Hi. I Have installed Open vSwitch 2.9.4 with DPDK 17.11.4 on Ubuntu
> 14.04.5
> > LTD and kernel version 4.4.0-31-generic following these two links:
> > http://docs.openvswitch.org/en/latest/intro/install/dpdk/
> >
> http://docs.openvswitch.org/en/latest/intro/install/general/#general-bootstrapping
> [...]
> > Even though I followed all steps, ovs-vsctl get Open_vSwitch .
> > dpdk_initialized gives  ovs-vsctl: Open_vSwitch does not contain a column
> > whose name matches "dpdk_initialized"  error. Please help.
>
> Hi,
> this is a normal behavior on OVS 2.9.x since "dpdk_initialized" support
> was added in 2.10 (https://github.com/openvswitch/ovs/commit/3e52fa5).
>
> So you can update to OVS 2.10(.1) or you can look for dpdk entries on
> ovs-vswitchd.log
>
___
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss


[ovs-discuss] (no subject)

2018-11-23 Thread Ramzah Rehman
Hi!

I have 2 virtual machines on VMware.  VM one has ovs 2.9.4 installed with
DPDK version 17.11.4. VM one has open vSwitch br0. br0 has IP:10.0.0.5 and
eth0 of VM two has IP: 10.0.0.14  I have following entries installed on
switch br0:

ovs-ofctl -O OpenFlow15 add-meter br0 meter=1,kbps,band=type=drop,rate=500

ovs-ofctl -O OpenFlow15 add-flow br0 arp,in_port=1,actions=output:LOCAL
ovs-ofctl -O OpenFlow15 add-flow br0 arp,in_port=LOCAL,actions=output:1
ovs-ofctl -O OpenFlow15 add-flow br0 ip,ip_dst=
10.0.0.5/255.255.255.255,actions=output:LOCAL
ovs-ofctl -O OpenFlow15 add-flow br0 ip,ip_dst=
10.0.0.14/255.255.255.255,actions=meter=1,output:1

Now I was experimenting with rate-limiting (metering) feature in OVS. When
I give rate of 500 I get bandwidth of 600Mbps for TCP traffic from VM one
to VM two (done vie iperf). For rate 5000 I get 4.92Mbps. Both of these are
fine. When I change rate to 5 I get bandwidth of 30Mbps, whereas
expected bandwidth is around 48-49Mbps. Please let me know what is going
wrong here.

One more question. I just need to use metering feature of ovs. Do I need to
add interfaces to VIFO for that? I am asking this because adding interfaces
to VIFO gave errors.
___
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss


Re: [ovs-discuss] Cannot Install Open vSwitch with DKDP

2018-11-23 Thread Timothy Redaelli
On Fri, 23 Nov 2018 16:02:30 +0500
Ramzah Rehman  wrote:

> Hi. I Have installed Open vSwitch 2.9.4 with DPDK 17.11.4 on Ubuntu 14.04.5
> LTD and kernel version 4.4.0-31-generic following these two links:
> http://docs.openvswitch.org/en/latest/intro/install/dpdk/
> http://docs.openvswitch.org/en/latest/intro/install/general/#general-bootstrapping
[...]
> Even though I followed all steps, ovs-vsctl get Open_vSwitch .
> dpdk_initialized gives  ovs-vsctl: Open_vSwitch does not contain a column
> whose name matches "dpdk_initialized"  error. Please help.

Hi,
this is a normal behavior on OVS 2.9.x since "dpdk_initialized" support
was added in 2.10 (https://github.com/openvswitch/ovs/commit/3e52fa5).

So you can update to OVS 2.10(.1) or you can look for dpdk entries on
ovs-vswitchd.log 
___
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss


Re: [ovs-discuss] Cannot Install Open vSwitch with DKDP

2018-11-23 Thread Andrzej Ostruszka
On 11/23/18 12:02 PM, Ramzah Rehman wrote:
[...]
> #validating
> 
> ovs-vsctl get Open_vSwitch . dpdk_initialized
> # got message "ovs-vsctl: Open_vSwitch does not contain a column whose
> name matches "dpdk_initialized""
> ovs-vswitchd --version
> # got message "ovs-vswitchd (Open vSwitch) 2.9.4 DPDK 17.11.4"
> ovs-vsctl get Open_vSwitch . dpdk_version
> # got message "ovs-vsctl: Open_vSwitch does not contain a column whose
> name matches "dpdk_version""
> 
> Even though I followed all steps, ovs-vsctl get Open_vSwitch .
> dpdk_initialized gives  ovs-vsctl: Open_vSwitch does not contain a
> column whose name matches "dpdk_initialized"  error. Please help. 

I believe the docs are not up to date.  I was struggling with this too
so I would like to suggest you to:
- turn the DEBUG on for dpdk related parts of OvS:
  ovs-appctl vlog/list <- to get the names of modules
  ovs-appctl vlog/set ...:dbg <- to set debug (e.g. dpdk:file:dbg and
netdef_dpdk:file:dbg)

I usually turn on file:dbg on all dpdk related modules (that you get
from the list) and 'tail -f' ovs-vswitchd.log to see what is going on.

You should see something like:
2018-11-23T11:18:02.186Z|00019|dpdk|INFO|DPDK Enabled - initialized

when DPDK gets initialized (this is INFO level so you don't have to
switch to debug - but I suggest it anyway when you are starting with DPDK).

Regards
Andrzej
___
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss


[ovs-discuss] Cannot Install Open vSwitch with DKDP

2018-11-23 Thread Ramzah Rehman
Hi. I Have installed Open vSwitch 2.9.4 with DPDK 17.11.4 on Ubuntu 14.04.5
LTD and kernel version 4.4.0-31-generic following these two links:
http://docs.openvswitch.org/en/latest/intro/install/dpdk/
http://docs.openvswitch.org/en/latest/intro/install/general/#general-bootstrapping

These are the steps I performed in detail:

sudo -i
apt-get install git
git clone https://github.com/openvswitch/ovs.git
cd ovs
git checkout remotes/origin/branch-2.9
apt install build-essential libssl1.0.0 libcap-ng-utils
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt-get update
sudo apt-get install python2.7 libnuma-dev libtool autoconf automake wget
python-six libvirt-bin
#Edited the file /etc/default/grub and add intel_iommu=on to the existing
GRUB_CMDLINE_LINUX line. (enables VT_D in the BIOS)
sudo grub-mkconfig -o /boot/grub/grub.cfg
sudo reboot
#to check if IOMMU is enabled in BIOS
dmesg | grep -e DMAR -e IOMMU
#to check if IOMMU is enabled in kernel
cat /proc/cmdline | grep intel_iommu=on
sudo apt-get install mokutil
mokutil --sb-state # got not supported message
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install g++-4.9 gcc-multilib
cd /usr/src/
wget http://fast.dpdk.org/rel/dpdk-17.11.4.tar.xz
tar xf dpdk-17.11.4.tar.xz
export DPDK_DIR=/usr/src/dpdk-stable-17.11.4
cd $DPDK_DIR
export DPDK_TARGET=x86_64-native-linuxapp-gcc
export DPDK_BUILD=$DPDK_DIR/$DPDK_TARGET
make install T=$DPDK_TARGET DESTDIR=install
cd ~/ovs
./boot.sh
./configure --with-dpdk=$DPDK_BUILD
make
make install
config_file="/etc/depmod.d/openvswitch.conf"
for module in datapath/linux/*.ko; do
  modname="$(basename ${module})"
  echo "override ${modname%.ko} * extra" >> "$config_file"
  echo "override ${modname%.ko} * weak-updates" >> "$config_file"
  done
depmod -a
/sbin/modprobe openvswitch
/sbin/lsmod | grep openvswitch
#to make huge page persistent but didn't work
echo 'vm.nr_hugepages=2048' > /etc/sysctl.d/hugepages.conf
#Run-time allocation of huge pages
sysctl -w vm.nr_hugepages=2048
#verify
grep HugePages_ /proc/meminfo
mkdir /dev/hugepages
#mount huge pages
mount -t hugetlbfs none /dev/hugepages``


modprobe vfio-pci
chmod a+x /dev/vfio
chmod 0666 /dev/vfio/*
$DPDK_DIR/usertools/dpdk-devbind.py --bind=vfio-pci eth0 #did not work
$DPDK_DIR/usertools/dpdk-devbind.py --status

#Starting OVS vSwitch and dbserver

export PATH=$PATH:/usr/local/share/openvswitch/scripts
mkdir -p /usr/local/etc/openvswitch
ovsdb-tool create /usr/local/etc/openvswitch/conf.db
vswitchd/vswitch.ovsschema

mkdir -p /usr/local/var/run/openvswitch

mkdir -p /usr/local/var/log/openvswitch

#created file /usr/local/var/log/openvswitch/ovsdb-server.log

ovsdb-server --remote=punix:/usr/local/var/run/openvswitch/db.sock
--remote=db:Open_vSwitch,Open_vSwitch,manager_options
--private-key=db:Open_vSwitch,SSL,private_key
--certificate=db:Open_vSwitch,SSL,certificate
--bootstrap-ca-cert=db:Open_vSwitch,SSL,ca_cert --pidfile --detach
--log-file

ovs-vsctl --no-wait init
ovs-ctl --no-ovs-vswitchd start

export DB_SOCK=/usr/local/var/run/openvswitch/db.sock
ovs-vsctl --no-wait set Open_vSwitch . other_config:dpdk-init=true
ovs-ctl --no-ovsdb-server --db-sock="$DB_SOCK" start

#both oovs-vswitchd and ovsdb-server started correctly

#validating

ovs-vsctl get Open_vSwitch . dpdk_initialized
# got message "ovs-vsctl: Open_vSwitch does not contain a column whose name
matches "dpdk_initialized""
ovs-vswitchd --version
# got message "ovs-vswitchd (Open vSwitch) 2.9.4 DPDK 17.11.4"
ovs-vsctl get Open_vSwitch . dpdk_version
# got message "ovs-vsctl: Open_vSwitch does not contain a column whose name
matches "dpdk_version""

Even though I followed all steps, ovs-vsctl get Open_vSwitch .
dpdk_initialized gives  ovs-vsctl: Open_vSwitch does not contain a column
whose name matches "dpdk_initialized"  error. Please help.

Best Regards,
Ramzah Rehman
___
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss


[ovs-discuss] Why PCP value is fixed to zero(0), how we can modify and generate different pcp valued packets

2018-11-23 Thread Vikas Kumar
hello everyone,
i had a doubt, why ovs has fixed the pcp value to zero(0), how i can modify
the pcp value?
actually i wanted to generate packets based on different pcp values.

it will be a great help if anyone suggest me any idea,how to modify the pcp
value of 802.1q header structure.

Thanks
vikash
___
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss