iavf: enable tc filter configuration only if hw-tc-offload is on
Subsystems (2)
PATCH 1/1 iavf: enable tc filter configuration only if hw-tc-offload is on
From: Sudheer Mogilappagari <[email protected]>
Allow configuration of tc filter only if NETIF_F_HW_TC is set for the device.
Fixes 0075fa0fadd0 ("i40evf: Add support to apply cloud filters")
Signed-off-by Sudheer Mogilappagari <[email protected]>
Signed-off-by Jun Zhang <[email protected]>
--- drivers/net/ethernet/intel/iavf/iavf_main.c | 6 ++++++ 1 file changed, 6 insertions(+)
drivers/net/ethernet/intel/iavf/iavf_main.c +6 -0
@@ -3847,6 +3847,12 @@ static int iavf_configure_clsflower(struct iavf_adapter *adapter,return -EINVAL ; } +if (!(adapter->netdev->features &NETIF_F_HW_TC )) { +dev_err (&adapter->pdev->dev, +"Can't apply TC flower filters, turn ON hw-tc-offload and try again" ); +return -EOPNOTSUPP ; + } + filter =kzalloc (sizeof (*filter),GFP_KERNEL );if (!filter)return -ENOMEM ;
Signature · 6 lines
2.35.3 _______________________________________________ Intel-wired-lan mailing list [email protected] https://lists.osuosl.org/mailman/listinfo/intel-wired-lan
Quoted 12 lines
-----Original Message-----
From: Intel-wired-lan <[email protected]> On Behalf Of Jun Zhang
Sent: Wednesday, June 22, 2022 12:09 AM
To: [email protected]
Subject: [Intel-wired-lan] [PATCH net v1] iavf: enable tc filter configuration only if hw-tc-offload is onFrom: Sudheer Mogilappagari <[email protected]>
Quoted 9 lines
Allow configuration of tc filter only if
NETIF_F_HW_TCis set for the device.Fixes 0075fa0fadd0 ("i40evf: Add support to apply cloud filters")Signed-off-by Sudheer Mogilappagari <[email protected]>Signed-off-by Jun Zhang <[email protected]>--- drivers/net/ethernet/intel/iavf/iavf_main.c | 6 ++++++ 1 file changed, 6 insertions(+)
Tested-by Bharathi Sreenivas <[email protected]>
_______________________________________________
Intel-wired-lan mailing list
[email protected]
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan