[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <BN3PR0701MB1412C429E0CECC64429CF39289840@BN3PR0701MB1412.namprd07.prod.outlook.com>
Date: Tue, 22 Aug 2017 20:47:38 +0000
From: "Chopra, Manish" <Manish.Chopra@...ium.com>
To: Chris Mi <chrism@...lanox.com>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>
CC: "davem@...emloft.net" <davem@...emloft.net>,
"jiri@...nulli.us" <jiri@...nulli.us>
Subject: RE: [patch net-next] net/sched: Fix the logic error to decide the
ingress qdisc
-----Original Message-----
From: netdev-owner@...r.kernel.org [mailto:netdev-owner@...r.kernel.org] On Behalf Of Chris Mi
Sent: Friday, August 18, 2017 4:54 PM
To: netdev@...r.kernel.org
Cc: davem@...emloft.net; jiri@...nulli.us
Subject: [patch net-next] net/sched: Fix the logic error to decide the ingress qdisc
The offending commit used a newly added helper function.
But the logic is wrong. Without this fix, the affected NICs can't do HW offload. Error -EOPNOTSUPP will be returned directly.
Fixes: a2e8da9378cc ("net/sched: use newly added classid identity helpers")
Signed-off-by: Chris Mi <chrism@...lanox.com>
Acked-by: Jiri Pirko <jiri@...lanox.com>
---
drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 2 +-
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 2 +-
drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 2 +-
drivers/net/ethernet/mellanox/mlx5/core/en_rep.c | 2 +-
drivers/net/ethernet/netronome/nfp/bpf/main.c | 2 +-
drivers/net/ethernet/netronome/nfp/flower/offload.c | 2 +-
6 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
index 77538cd..e55a929 100644
--- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
+++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
@@ -2892,7 +2892,7 @@ static int cxgb_set_tx_maxrate(struct net_device *dev, int index, u32 rate) static int cxgb_setup_tc_cls_u32(struct net_device *dev,
struct tc_cls_u32_offload *cls_u32) {
- if (is_classid_clsact_ingress(cls_u32->common.classid) ||
+ if (!is_classid_clsact_ingress(cls_u32->common.classid) ||
cls_u32->common.chain_index)
return -EOPNOTSUPP;
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
index f9fd8d8..56d7ef0 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
@@ -9230,7 +9230,7 @@ static int ixgbe_setup_tc_cls_u32(struct net_device *dev, {
struct ixgbe_adapter *adapter = netdev_priv(dev);
- if (is_classid_clsact_ingress(cls_u32->common.classid) ||
+ if (!is_classid_clsact_ingress(cls_u32->common.classid) ||
cls_u32->common.chain_index)
return -EOPNOTSUPP;
Hi Jiri/Chris,
I was looking at ixgbe and observed that it uses "is_tcf_mirred_egress_redirect()" API which works for below filter command -
# add u32 filter with action to redirect to macvlan netdev
tc filter add dev p4p1 parent ffff: protocol ip prio 99 \
handle 800:0:2 u32 ht 800: \
match ip src 192.168.2.3/32 \
action mirred egress redirect dev mvlan_1
Assuming that hardware actually redirect the packets to "ingress" direction of mac vlan interface [that is it delivers the packet to the driver in receive flow]
Isn't the use of above API incorrect or misleading ? shouldn't it be something like "is_tcf_mirred_ingress_redirect()" and part of the command should be replaced with below ?
action mirrred ingress redirect mvlan_1
Thanks,
Manish
Powered by blists - more mailing lists