OSDN Git Service

sfc: support TC decap rules matching on enc_src_port
authorEdward Cree <ecree.xilinx@gmail.com>
Thu, 11 May 2023 19:47:31 +0000 (20:47 +0100)
committerDavid S. Miller <davem@davemloft.net>
Fri, 12 May 2023 09:37:02 +0000 (10:37 +0100)
commitb6583d5e9e94adce1be61ec59fef4e129f0bc68a
tree3490f6caebba6034332044df084c38ce3c132ea1
parent3c9561c0a5b988be3dfd24ea1de2301b95efc640
sfc: support TC decap rules matching on enc_src_port

Allow efx_tc_encap_match entries to include a udp_sport and a
 udp_sport_mask.  As with enc_ip_tos, use pseudos to enforce that all
 encap matches within a given <src_ip,dst_ip,udp_dport> tuple have
 the same udp_sport_mask.
Note that since we use a single layer of pseudos for both fields, two
 matches that differ in (say) udp_sport value aren't permitted to have
 different ip_tos_mask, even though this would technically be safe.
Current userland TC does not support setting enc_src_port; this patch
 was tested with an iproute2 patched to support it.

Signed-off-by: Edward Cree <ecree.xilinx@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/sfc/mae.c
drivers/net/ethernet/sfc/mae.h
drivers/net/ethernet/sfc/tc.c
drivers/net/ethernet/sfc/tc.h