[ovs-discuss] OVS - how to use geneve with variable length options ?

Jesse Gross jesse at kernel.org
Wed Aug 31 16:55:39 UTC 2016


On Wed, Aug 31, 2016 at 12:13 AM, Manish Chopra
<manish.chopra at qlogic.com> wrote:
>> -----Original Message-----
>> From: Jesse Gross [mailto:jesse at kernel.org]
>> Sent: Wednesday, August 31, 2016 12:55 AM
>> To: Manish Chopra <manish.chopra at qlogic.com>
>> Cc: pshelar at nicira.com; bugs at 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.chopra at 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>"



More information about the discuss mailing list