[ovs-dev] [PATCH 1/2] datapath: fix key size computation in key_attr_size()

Jesse Gross jesse at nicira.com
Fri Jun 13 04:23:01 UTC 2014


Yes, that's what I meant.

On Thu, Jun 12, 2014 at 9:17 PM, Andy Zhou <azhou at nicira.com> wrote:
> Are you talking about ODPUTIL_FLOW_KEY_BYTES?  Luckily, we pad it to
> 256 bytes, so only the comment
> above it needs updating.  I will send out a patch.
>
> On Thu, Jun 12, 2014 at 5:28 PM, Jesse Gross <jesse at nicira.com> wrote:
>> I think we also have a similar problem in lib/odp-util.h.
>>
>> On Thu, Jun 12, 2014 at 5:15 PM, Andy Zhou <azhou at nicira.com> wrote:
>>> Thanks for the view. Pushed to master and branch 2.3 with the vmware
>>> bug ID added to the commit message.
>>>
>>> On Thu, Jun 12, 2014 at 4:38 PM, Pravin Shelar <pshelar at nicira.com> wrote:
>>>> On Thu, Jun 12, 2014 at 1:42 PM, Andy Zhou <azhou at nicira.com> wrote:
>>>>> The key_attr_size() was not updated when RECIRC_ID and DP_HASH
>>>>> key fields are added to support recircualtion. This patch fixes it.
>>>>>
>>>>> Reported-by: Ben Pfaff <blp at nicira.com>
>>>>> Signed-off-by: Andy Zhou <azhou at nicira.com>
>>>> Looks good.
>>>>
>>>> Acked-by: Pravin B Shelar <pshelar at nicira.com>
>>>>
>>>>> ---
>>>>>  datapath/datapath.c | 6 ++++++
>>>>>  1 file changed, 6 insertions(+)
>>>>>
>>>>> diff --git a/datapath/datapath.c b/datapath/datapath.c
>>>>> index 81ecc0f..1d2f414 100644
>>>>> --- a/datapath/datapath.c
>>>>> +++ b/datapath/datapath.c
>>>>> @@ -380,6 +380,10 @@ static int queue_gso_packets(struct datapath *dp, struct sk_buff *skb,
>>>>>
>>>>>  static size_t key_attr_size(void)
>>>>>  {
>>>>> +       /* Whenever adding new OVS_KEY_ FIELDS, we should consider
>>>>> +        * updating this function.  */
>>>>> +       BUILD_BUG_ON(OVS_KEY_ATTR_IPV4_TUNNEL != 21);
>>>>> +
>>>>>         return    nla_total_size(4)   /* OVS_KEY_ATTR_PRIORITY */
>>>>>                 + nla_total_size(0)   /* OVS_KEY_ATTR_TUNNEL */
>>>>>                   + nla_total_size(8)   /* OVS_TUNNEL_KEY_ATTR_ID */
>>>>> @@ -391,6 +395,8 @@ static size_t key_attr_size(void)
>>>>>                   + nla_total_size(0)   /* OVS_TUNNEL_KEY_ATTR_CSUM */
>>>>>                 + nla_total_size(4)   /* OVS_KEY_ATTR_IN_PORT */
>>>>>                 + nla_total_size(4)   /* OVS_KEY_ATTR_SKB_MARK */
>>>>> +               + nla_total_size(4)   /* OVS_KEY_ATTR_DP_HASH */
>>>>> +               + nla_total_size(4)   /* OVS_KEY_ATTR_RECIRC_ID */
>>>>>                 + nla_total_size(12)  /* OVS_KEY_ATTR_ETHERNET */
>>>>>                 + nla_total_size(2)   /* OVS_KEY_ATTR_ETHERTYPE */
>>>>>                 + nla_total_size(4)   /* OVS_KEY_ATTR_8021Q */
>>>>> --
>>>>> 1.9.1
>>>>>
>>>>> _______________________________________________
>>>>> dev mailing list
>>>>> dev at openvswitch.org
>>>>> http://openvswitch.org/mailman/listinfo/dev
>>> _______________________________________________
>>> dev mailing list
>>> dev at openvswitch.org
>>> http://openvswitch.org/mailman/listinfo/dev



More information about the dev mailing list