diff options
author | Shahjada Abul Husain <shahjada@chelsio.com> | 2019-12-10 16:25:33 +0530 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-12-10 17:52:41 -0800 |
commit | c21939998802b48e7afd0c0568193f6e4e4954f8 (patch) | |
tree | 8a74d43b5dc11a19081d2cf7ae5a03f85f159615 /drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.c | |
parent | 6525b5ef65fdaf8a782449fb5d585195b573c2c1 (diff) |
cxgb4: add support for high priority filters
T6 has a separate region known as high priority filter region
that allows classifying packets going through ULD path. So,
query firmware for HPFILTER resources and enable the high
priority offload filter support when it is available.
Signed-off-by: Shahjada Abul Husain <shahjada@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.c')
-rw-r--r-- | drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.c b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.c index 0fa80bef575d..706b71e1b6c1 100644 --- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.c +++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.c @@ -672,10 +672,13 @@ int cxgb4_tc_flower_replace(struct net_device *dev, * 0 to driver. However, the hardware TCAM index * starts from 0. Hence, the -1 here. */ - if (cls->common.prio <= adap->tids.nftids) + if (cls->common.prio <= adap->tids.nftids) { fidx = cls->common.prio - 1; - else + if (fidx < adap->tids.nhpftids) + fs->prio = 1; + } else { fidx = cxgb4_get_free_ftid(dev, inet_family); + } /* Only insert FLOWER rule if its priority doesn't * conflict with existing rules in the LETCAM. |