[ovs-dev] [PATCH] odp-util: Fix NSH mask parsing.

Ilya Maximets i.maximets at samsung.com
Wed Jul 17 08:09:36 UTC 2019


On 15.07.2019 20:41, William Tu wrote:
> On Mon, Jul 15, 2019 at 6:58 AM Ilya Maximets <i.maximets at samsung.com> wrote:
>>
>> 'odp_flow_key_to_flow__' is used to parse both keys and masks.
>> However, 'odp_nsh_key_from_attr' expects only 'key' as an argument
>> and fails to parse masks with ODP_FIT_ERROR which causes userspace
>> system tests failures:
>>
>>  # make check-system-userspace TESTSUITEFLAGS='-k nsh'
>>
>>  |odp_util(revalidator)|WARN|
>>  OVS_NSH_KEY_ATTR_MD1 present but declared mdtype 0 is not 1 (NSH_M_TYPE1)
>>
>>  |odp_util(revalidator)|WARN|
>>  the flow mask in error is:
>>      <...> nsh(flags=0ttl=0,mdtype=0,np=255,spi=0x0,si=0),
>>  for the following flow key:
>>      <...> nsh_ttl=8,nsh_mdtype=1,nsh_np=3,nsh_spi=0x64,nsh_si=3,
>>      nsh_c1=0x1020304,nsh_c2=0x5060708,nsh_c3=0x90a0b0c,nsh_c4=0xd0e0f10
>>      <...>
>>
>> Fix that by passing the additional argument 'is_mask' to make it be
>> like all other parsing functions.
>>
>> Additionally fixed missing comma in the 'format_nsh_key'.
>>
>> CC: Yi Yang <yi.y.yang at intel.com>
>> Fixes: f59cb331c481 ("nsh: rework NSH netlink keys and actions")
>> Signed-off-by: Ilya Maximets <i.maximets at samsung.com>
>> ---
> 
> LGTM, thanks for the fix.
> Acked-by: William Tu <u9012063 at gmail.com>

Thanks! Applied to master.

Best regards, Ilya Maximets.


More information about the dev mailing list