diff options
author | Kumar Sanghvi <kumaras@chelsio.com> | 2017-11-01 08:53:01 +0530 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-11-01 22:06:03 +0900 |
commit | 12b276fbf6e092adca08a8125afcc4e7f530a0b6 (patch) | |
tree | d777b460f8214831a565378dd97166b1ee59717d /drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.h | |
parent | cxgb4: initialize hash-filter configuration (diff) | |
download | wireguard-linux-12b276fbf6e092adca08a8125afcc4e7f530a0b6.tar.xz wireguard-linux-12b276fbf6e092adca08a8125afcc4e7f530a0b6.zip |
cxgb4: add support to create hash filters
Add support to create hash (exact-match) filters based on the value
of 'hash' field in ch_filter_specification.
Allocate SMT/L2T entries if DMAC-rewrite/SMAC-rewrite is requested.
Allocate CLIP entry in case of IPv6 filter.
Use cpl_act_open_req[6] to send hash filter create request to hw.
Also, the filter tuple is calculated as part of sending this request.
Hash-filter reply is processed on getting cpl_act_open_rpl.
In case of success, various bits/fields in filter-tcb are set per
filter requirement, such as enabling filter hitcnts, and/or various
header rewrite operations, such as VLAN-rewrite, NAT or
(L3/L4)-rewrite, and SMAC/DMAC-rewrite. In case of failure, clear the
filter entry and release any hw resources occupied by it.
The patch also moves the functions set_tcb_field, set_tcb_tflag and
configure_filter_smac towards beginning of file.
Signed-off-by: Kumar Sanghvi <kumaras@chelsio.com>
Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Signed-off-by: Ganesh Goudar <ganeshgr@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.h')
-rw-r--r-- | drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.h b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.h index d3c1a8fafd32..7480d65550a8 100644 --- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.h +++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.h @@ -37,7 +37,10 @@ #include "t4_msg.h" +#define WORD_MASK 0xffffffff + void filter_rpl(struct adapter *adap, const struct cpl_set_tcb_rpl *rpl); +void hash_filter_rpl(struct adapter *adap, const struct cpl_act_open_rpl *rpl); void clear_filter(struct adapter *adap, struct filter_entry *f); int set_filter_wr(struct adapter *adapter, int fidx); |