net/cxgbe: fix double MPS alloc by flow validate and create
authorRahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Fri, 12 Jun 2020 22:07:25 +0000 (03:37 +0530)
committerFerruh Yigit <ferruh.yigit@intel.com>
Wed, 17 Jun 2020 13:31:32 +0000 (15:31 +0200)
commitbe5f4d5ced10f9d7edc8ba4b3f1d98b9d476d367
tree59f215adbab91f0d8c90fecf4e61c117eba0c6e1
parente0e1496be5fcabd31807ef9981c421963a9f8578
net/cxgbe: fix double MPS alloc by flow validate and create

The Multi Port Switch (MPS) entry is allocated twice when both
flow validate and create are invoked, but only freed once during
flow destroy. Avoid double alloc by moving MPS entry allocation
closer to when the filter create request is sent to hardware and
will be ignored for filter validate request.

Fixes: fefee7a619a4 ("net/cxgbe: add flow ops to match based on dest MAC")
Cc: stable@dpdk.org
Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
drivers/net/cxgbe/cxgbe_filter.c
drivers/net/cxgbe/cxgbe_filter.h
drivers/net/cxgbe/cxgbe_flow.c