net/ixgbe: fix error of drop queue index

Message ID 20221107084840.89186-1-kaiwenx.deng@intel.com (mailing list archive)
State Superseded, archived
Delegated to: Qi Zhang
Headers
Series net/ixgbe: fix error of drop queue index |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK
ci/iol-aarch64-unit-testing success Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/github-robot: build success github build: passed
ci/intel-Testing success Testing PASS
ci/iol-x86_64-unit-testing success Testing PASS
ci/iol-x86_64-compile-testing success Testing PASS
ci/iol-aarch64-compile-testing success Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-intel-Performance success Performance Testing PASS

Commit Message

Kaiwen Deng Nov. 7, 2022, 8:48 a.m. UTC
  The drop queue index was not set when adding internal Flow
Director Configuration copy in ixgbe device private data.
Therefore dropped packets would be received by queue 0
which is set to drop queue.

This commit sets drop queue index as IXGBE_FDIR_DROP_QUEUE
to fix this issue.

Fixes: 5007ac13189d ("ethdev: remove deprecated Flow Director configuration")

Signed-off-by: kevin-intel <kaiwenx.deng@intel.com>
---
 drivers/net/ixgbe/ixgbe_flow.c | 1 +
 1 file changed, 1 insertion(+)
  

Comments

Qi Zhang Nov. 8, 2022, 1:07 a.m. UTC | #1
> -----Original Message-----
> From: kevin-intel <kaiwenx.deng@intel.com>
> Sent: Monday, November 7, 2022 4:49 PM
> To: dev@dpdk.org
> Cc: Zhou, YidingX <yidingx.zhou@intel.com>; Deng, KaiwenX
> <kaiwenx.deng@intel.com>; Yang, Qiming <qiming.yang@intel.com>; Wu,
> Wenjun1 <wenjun1.wu@intel.com>; Andrew Rybchenko
> <andrew.rybchenko@oktetlabs.ru>; Dongdong Liu
> <liudongdong3@huawei.com>
> Subject: [PATCH] net/ixgbe: fix error of drop queue index
> 
> The drop queue index was not set when adding internal Flow Director
> Configuration copy in ixgbe device private data.
> Therefore dropped packets would be received by queue 0 which is set to
> drop queue.
> 
> This commit sets drop queue index as IXGBE_FDIR_DROP_QUEUE to fix this
> issue.
> 
> Fixes: 5007ac13189d ("ethdev: remove deprecated Flow Director
> configuration")
> 
> Signed-off-by: kevin-intel <kaiwenx.deng@intel.com>

No need to add company name in your signed-off name.
I assume it should be 
Kaiwen Deng <kaiwenx.deng@intel.com>

> ---
>  drivers/net/ixgbe/ixgbe_flow.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/net/ixgbe/ixgbe_flow.c b/drivers/net/ixgbe/ixgbe_flow.c
> index 1250c2dc12..110ff34fcc 100644
> --- a/drivers/net/ixgbe/ixgbe_flow.c
> +++ b/drivers/net/ixgbe/ixgbe_flow.c
> @@ -2759,6 +2759,7 @@ ixgbe_parse_fdir_filter(struct rte_eth_dev *dev,
>  	int ret;
>  	struct ixgbe_hw *hw = IXGBE_DEV_PRIVATE_TO_HW(dev->data-
> >dev_private);
>  	struct rte_eth_fdir_conf *fdir_conf = IXGBE_DEV_FDIR_CONF(dev);
> +	fdir_conf->drop_queue = IXGBE_FDIR_DROP_QUEUE;

The expected drop action is to drop packet, there is NO "drop queue" in the generic flow APIs
if you want to steer packet to queue 0, just use rte_flow_action_queue with queue 0
What's the gap?

> 
>  	if (hw->mac.type != ixgbe_mac_82599EB &&
>  		hw->mac.type != ixgbe_mac_X540 &&
> --
> 2.34.1
  

Patch

diff --git a/drivers/net/ixgbe/ixgbe_flow.c b/drivers/net/ixgbe/ixgbe_flow.c
index 1250c2dc12..110ff34fcc 100644
--- a/drivers/net/ixgbe/ixgbe_flow.c
+++ b/drivers/net/ixgbe/ixgbe_flow.c
@@ -2759,6 +2759,7 @@  ixgbe_parse_fdir_filter(struct rte_eth_dev *dev,
 	int ret;
 	struct ixgbe_hw *hw = IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private);
 	struct rte_eth_fdir_conf *fdir_conf = IXGBE_DEV_FDIR_CONF(dev);
+	fdir_conf->drop_queue = IXGBE_FDIR_DROP_QUEUE;
 
 	if (hw->mac.type != ixgbe_mac_82599EB &&
 		hw->mac.type != ixgbe_mac_X540 &&