[ovs-git] [openvswitch/ovs] 569c3d: odp-util: Fix NSH mask parsing.

Ilya Maximets noreply at github.com
Wed Jul 17 08:05:44 UTC 2019


  Branch: refs/heads/master
  Home:   https://github.com/openvswitch/ovs
  Commit: 569c3df26715faf5165d492f8c873e2f719d5626
      https://github.com/openvswitch/ovs/commit/569c3df26715faf5165d492f8c873e2f719d5626
  Author: Ilya Maximets <i.maximets at samsung.com>
  Date:   2019-07-17 (Wed, 17 Jul 2019)

  Changed paths:
    M lib/odp-util.c

  Log Message:
  -----------
  odp-util: Fix NSH mask parsing.

'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>
Acked-by: William Tu <u9012063 at gmail.com>




More information about the git mailing list