[ovs-dev] [#8024v2 2/5] Don't overload IP TOS with the frag matching bits.

Justin Pettit jpettit at nicira.com
Wed Nov 9 19:27:50 UTC 2011


On Nov 9, 2011, at 7:29 AM, Ben Pfaff wrote:

> On Tue, Nov 08, 2011 at 11:06:21PM -0800, Justin Pettit wrote:
>> On Nov 8, 2011, at 4:24 PM, Ben Pfaff wrote:
>> 
>>> I think that these |=s can become =s:
>>> 
>>>> -			key->ip.tos_frag |= OVS_FRAG_TYPE_LATER;
>>>> +			key->ip.frag |= OVS_FRAG_TYPE_LATER;
>>>> 
>>>> -			key->ip.tos_frag |= OVS_FRAG_TYPE_FIRST;
>>>> +			key->ip.frag |= OVS_FRAG_TYPE_FIRST;
>>>> 
>>>> @@ -764,10 +762,10 @@ int flow_extract(struct sk_buff *skb, u16 in_port, struct sw_flow_key *key,
>>>> 
>>>> -			key->ip.tos_frag |= OVS_FRAG_TYPE_FIRST;
>>>> +			key->ip.frag |= OVS_FRAG_TYPE_FIRST;
>> 
>> Since they're flags, I was planning to leave them as "or"s, but I see
>> I didn't do it consistently, so I've switched them to straight
>> assignment.
> 
> They aren't flags.  You can only have one of OVS_FRAG_TYPE_NONE,
> OVS_FRAG_TYPE_FIRST, or OVS_FRAG_TYPE_LATER.  Combinations don't make
> sense.

Whoops.  I was thinking about the related ones in userspace, which are flags.  I've corrected the comment in datapath/flow.h.

--Justin





More information about the dev mailing list