>> vxlan.c:118: if (vxh->vx_flags != htonl(VXLAN_FLAGS) || (vxh->vx_vni & 
>> htonl(0xff))) {
>> 
>> or if (unlikely(nsh->b.svc_path & htonl(NSH_M_NSI))) { // NSH_M_NSI ==> 
>> 0x000000ff which is same as 0xff above?
>> am i missing something here?
>> 
> 
> I did not check if the NSH spec tells to reject packets with reserved bits 
> set, but if it did, that would not be too forward compatible. I'm not stating 
> anything about vxlan here.

ah ok, got it, sorry i think i misunderstood something earlier, yep true, the 
specs doesn't say anything
about reject packets with reserved bits set, but then i don't know of any other 
way of detecting a valid
nsh packet, so not sure what alternatives would be here.

> 
>>> 
>>>> +            pr_warn("invalid NSH service path=%#x\n",
>>>> +                    ntohl(nsh->b.svc_path));
>>>> +            goto drop;
>>>> +        }
>>>> +
>>>> +        nsp = nsh->b.svc_path | htonl(nsh->b.svc_idx);
>>>> +    }
>>>> +
>>> ...
>>>> 
>>>> --- a/include/linux/openvswitch.h
>>>> +++ b/include/linux/openvswitch.h
>>>> @@ -304,6 +304,7 @@ enum ovs_tunnel_key_attr {
>>>>   OVS_TUNNEL_KEY_ATTR_TTL,        /* u8 Tunnel IP TTL. */
>>>>   OVS_TUNNEL_KEY_ATTR_DONT_FRAGMENT,    /* No argument, set DF. */
>>>>   OVS_TUNNEL_KEY_ATTR_CSUM,        /* No argument. CSUM packet. */
>>>> +    OVS_TUNNEL_KEY_ATTR_NSP,        /* be32 NSH service path */
>>> 
>>> Should state here that only lowest 24 bits are used.
>> 
>> yep will mention it, its actually upper 24 bits.
>> 
> 
> Check once more, as it seems to me that the value from the attr is shifted 
> left, so it is the lowest 24 bits of the attr that are used…

ah, got confused between the real big endian value and ones stored here, yep 
they are 24 lower bits, will try to document where
and in which i use them.

btw thanks again.

Regards,
Pritesh

> 
> 
>  Jarno
> 

_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to