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

William Tu u9012063 at gmail.com
Mon Jul 15 17:41:03 UTC 2019


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>

>  lib/odp-util.c | 33 ++++++++++++++++++++++++---------
>  1 file changed, 24 insertions(+), 9 deletions(-)
>


More information about the dev mailing list