summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/chelsio/cxgb4/t4_msg.h
diff options
context:
space:
mode:
authorVipul Pandya2012-12-10 10:30:52 +0100
committerRoland Dreier2012-12-19 18:28:19 +0100
commitf2b7e78dbc79e09fc1164b226adc03ed91a326cb (patch)
treef1ec25c2d5e09e89d6ef46e1e55676654cbfe357 /drivers/net/ethernet/chelsio/cxgb4/t4_msg.h
parentMerge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/... (diff)
downloadkernel-qcow2-linux-f2b7e78dbc79e09fc1164b226adc03ed91a326cb.tar.gz
kernel-qcow2-linux-f2b7e78dbc79e09fc1164b226adc03ed91a326cb.tar.xz
kernel-qcow2-linux-f2b7e78dbc79e09fc1164b226adc03ed91a326cb.zip
cxgb4: Add T4 filter support
The T4 architecture is capable of filtering ingress packets at line rate using the rule in TCAM. If packet hits a rule in the TCAM then it can be either dropped or passed to the receive queues based on a rule settings. This patch adds framework for managing filters and to use T4's filter capabilities. It constructs a Firmware Filter Work Request which writes the filter at a specified index to get the work done. It hosts shadow copy of ingress filter entry to check field size limitations and save memory in the case where the filter table is large. Signed-off-by: Vipul Pandya <vipul@chelsio.com> Signed-off-by: Roland Dreier <roland@purestorage.com>
Diffstat (limited to 'drivers/net/ethernet/chelsio/cxgb4/t4_msg.h')
-rw-r--r--drivers/net/ethernet/chelsio/cxgb4/t4_msg.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/chelsio/cxgb4/t4_msg.h b/drivers/net/ethernet/chelsio/cxgb4/t4_msg.h
index b760808fd6d9..99ff71764499 100644
--- a/drivers/net/ethernet/chelsio/cxgb4/t4_msg.h
+++ b/drivers/net/ethernet/chelsio/cxgb4/t4_msg.h
@@ -332,6 +332,7 @@ struct cpl_set_tcb_field {
__be16 word_cookie;
#define TCB_WORD(x) ((x) << 0)
#define TCB_COOKIE(x) ((x) << 5)
+#define GET_TCB_COOKIE(x) (((x) >> 5) & 7)
__be64 mask;
__be64 val;
};