On Thu, Sep 1, 2016 at 11:40 AM, Manish Chopra <manish.cho...@qlogic.com> wrote: >> -----Original Message----- >> From: Jesse Gross [mailto:je...@kernel.org] >> Sent: Wednesday, August 31, 2016 10:26 PM >> To: Manish Chopra <manish.cho...@qlogic.com> >> Cc: pshe...@nicira.com; b...@openvswitch.org >> Subject: Re: OVS - how to use geneve with variable length options ? >> >> On Wed, Aug 31, 2016 at 12:13 AM, Manish Chopra >> <manish.cho...@qlogic.com> wrote: >> >> -----Original Message----- >> >> From: Jesse Gross [mailto:je...@kernel.org] >> >> Sent: Wednesday, August 31, 2016 12:55 AM >> >> To: Manish Chopra <manish.cho...@qlogic.com> >> >> Cc: pshe...@nicira.com; b...@openvswitch.org >> >> Subject: Re: OVS - how to use geneve with variable length options ? >> >> On Tue, Aug 30, 2016 at 11:24 AM, Manish Chopra >> >> <manish.cho...@qlogic.com> wrote: >> >> > When I run traffic between both OVS bridge – I see that it uses geneve >> >> > header of size 8 bytes. >> >> > >> >> > I was wondering if I could use GENEVE with options using OVS ? which >> would >> >> > have geneve header size more than 8 bytes ? >> >> > >> >> > >> >> > >> >> > I couldn’t find anything about what arguments I should be using with >> >> > ovs-vsctl on both setups to use GENEVE with options ? >> >> > >> >> > Could you please supply necessary configuration/commands which I can try >> to >> >> > use GENEVE with options while running traffic ?? >> >> >> >> In order to use options with Geneve tunnels, you'll need to map TLVs >> >> onto a set of tun_metadataXXX fields, which can then be used with any >> >> OVS flow mechanism, such as matches and actions. There is some >> >> information on how to do this in the ovs-ofctl man page: >> >> https://github.com/openvswitch/ovs/blob/v2.5.0/utilities/ovs- >> ofctl.8.in#L427 >> >> >> >> You'll need to be using OVS 2.5 or newer to do this. >> >> >> > Hi Jesse, I have tried below configuration using ovs-ofctl on top of >> > earlier >> configuration using ovs-vsctl on both setups >> > , as referenced in man page. >> > >> > ovs-ofctl add-tlv-map br2 "{class=0xffff,type=0x80,len=4}->tun_metadata0" >> > ovs-ofctl add-flow br2 tun_metadata0=1234,actions=controller >> > >> > But I still see geneve header is used of size 8 Bytes when I run TCP stream >> between OVS bridges. >> > Not sure if I am missing something in the configuration using ovs-ofctl ? >> >> The flow that you have above will match incoming packets with that >> particular option, rather than generate it. In this case, any incoming >> packet with class 0xffff, type 0x80, and value 1234 will be sent to >> the controller. >> >> To generate packets with options, you need an action such as >> set_field. For example: >> ovs-ofctl add-flow br2 >> "in_port=LOCAL,actions=set_field:1234->tun_metadata0,<TUNNEL PORT>" > > Hi Jesse, > I am not much familiar with OVS flow mechanism and these commands. > I just want to try GENEVE tunnel traffic with OVS which could use variable > size geneve header in the packet to > test if our NIC offloads works fine with variable length geneve header or not. > > Below is my setup configuration - two physical hosts which are connected > back to back using NIC port [eth1 and eth2] > Below are IP addresses of OVS bridges and NIC interfaces. > > eth1- 192.168.44.44 > eth2- 192.168.44.45 > br2 [Setup 1] – 192.168.55.44 > br2 [Setup 2] - 192.168.55.45 > > > Setup 1 > Setup 2 > > ########################## > ######################### > OVS br2 -------------- eth1 - ### --------------------------------------- > ### - eth2 ---------------OVS br2 > ########################## > ######################### > > Setup 1 - > ovs-vsctl add-br br2 > ovs-vsctl add-port br2 gnv0 -- set interface gnv0 type=geneve > options:remote_ip=192.168.44.45 > > Setup 2 - > ovs-vsctl add-br br2 > ovs-vsctl add-port br2 gnv0 -- set interface gnv0 type=geneve > options:remote_ip=192.168.44.44 > > After adding geneve port on both setups - I can ping and run TCP traffic > between these bridge [which used geneve header of 8 bytes] > > ping 192.168.55.45 > PING 192.168.55.45 (192.168.55.45) 56(84) bytes of data. > 64 bytes from 192.168.55.45: icmp_seq=1 ttl=64 time=2.46 ms > 64 bytes from 192.168.55.45: icmp_seq=2 ttl=64 time=0.257 ms > ^C > --- 192.168.55.45 ping statistics --- > 2 packets transmitted, 2 received, 0% packet loss, time 1001ms > > After that as you suggested - I tried adding flow using below command to run > geneve with options. > > ovs-ofctl add-flow br2 > "in_port=LOCAL,actions=set_field:1234->tun_metadata0,6081"
The port number at the end of the command is not the UDP port number but the switch port number of the Geneve port. This is dynamically assigned so you'll need to fetch it yourself on each system (though in all likelihood it is 1 if there are no other ports on the system. You can retrieve it with: ovs-vsctl get interface gnv0 ofport Otherwise, I believe that the steps you used previously (including setting up the TLV map on both machines) should work and generate options. _______________________________________________ discuss mailing list discuss@openvswitch.org http://openvswitch.org/mailman/listinfo/discuss