numam-dpdk/drivers
Hyong Youb Kim 4182ee7f02 net/enic: fix flow director SCTP matching
The firmware filter API does not have flags indicating "match SCTP
packet". Instead, the driver needs to explicitly add an IP match and
set the protocol number (132 for SCTP) in the IP header.

The existing code (copy_fltr_v2) has two bugs.

1. It sets the protocol number (132) in the match value, but not the
mask. The mask remains 0, so the match becomes a wildcard match. The
NIC ends up matching all protocol numbers (i.e. thinks non-SCTP
packets are SCTP).

2. It modifies the input argument (rte_eth_fdir_input). The driver
tracks filters using rte_hash_{add,del}_key(input). So, addding
(RTE_ETH_FILTER_ADD) and deleting (RTE_ETH_FILTER_DELETE) must use the
same input argument for the same filter. But, overwriting the protocol
number while adding the filter breaks this assumption, and causes
delete operation to fail.

So, set the mask as well as protocol value. Do not modify the input
argument, and use const in function signatures to make the intention
clear. Also move a couple function declarations to enic_clsf.c from
enic.h as they are strictly local.

Fixes: dfbd6a9cb5 ("net/enic: extend flow director support for 1300 series")
Cc: stable@dpdk.org

Signed-off-by: Hyong Youb Kim <hyonkim@cisco.com>
Reviewed-by: John Daley <johndale@cisco.com>
2019-03-08 17:52:22 +01:00
..
baseband bb/turbo_sw: update for FlexRAN 18.09 2018-12-19 11:19:10 +01:00
bus bus/vdev: fix hotplug twice 2019-03-05 12:32:31 +00:00
common compress/qat: fix dequeue error counter 2018-12-19 11:19:10 +01:00
compress build: improve dependency handling 2019-02-27 12:13:54 +01:00
crypto crypto/virtio: use local log type 2019-03-01 18:17:36 +01:00
event fix global variable issues 2018-10-29 02:34:27 +01:00
mempool mempool/dpaa2: fix continuous print on empty pool 2019-03-01 18:17:35 +01:00
net net/enic: fix flow director SCTP matching 2019-03-08 17:52:22 +01:00
raw raw/ifpga: fix memory leak 2019-01-19 00:07:52 +01:00
Makefile drivers: add common as dependency for bus 2018-10-16 14:54:25 +02:00
meson.build build: improve dependency handling 2019-02-27 12:13:54 +01:00