Commit Graph

4 Commits

Author SHA1 Message Date
Rahul Lakkireddy
a12f14bc38 net/cxgbe: use C11-style compiler builtins for atomics
Replace rte_atomic ops with C11 atomics.

Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
2021-07-02 19:03:03 +02:00
Rahul Lakkireddy
7fe1d0b459 net/cxgbe: fix SMT leak in filter error and free path
Free up Source MAC Table (SMT) entry properly during filter create
failure and filter delete.

Fixes: 993541b2fa ("net/cxgbe: support flow API for source MAC rewrite")
Cc: stable@dpdk.org

Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
2020-06-17 15:31:32 +02:00
Karra Satwik
993541b2fa net/cxgbe: support flow API for source MAC rewrite
Add support to rewrite Source MAC addresses. The new Source
MAC address is written into a free entry in the SMT table
and the corresponding SMT index is used by hardware to
rewrite the Source MAC address of the packets hitting the
flow.

Signed-off-by: Karra Satwik <kaara.satwik@chelsio.com>
Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
2020-03-18 15:29:39 +01:00
Karra Satwik
a99564c680 net/cxgbe: support Source MAC Table
Source MAC Table (SMT) is used for storing Source MAC
addresses to be written in packets transmitted on the
wire. Hence, the SMT table can be used for overwriting
Source MAC addresses in packets, hitting corresponding
filter rules inserted by the rte_flow API.

Query firmware for SMT start and size information available
to the underlying PF. Allocate and maintain the corresponding
driver's copy of the hardware SMT table, with appropriate
refcount mechanism. If SMT information is not available, then
use the entire hardware SMT table.

Signed-off-by: Karra Satwik <kaara.satwik@chelsio.com>
Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
2020-03-18 15:29:39 +01:00