[v2] net/pfe: fix misuse of if_index

Message ID 20200914142217.31836-1-sachin.saxena@oss.nxp.com (mailing list archive)
State Accepted, archived
Delegated to: Ferruh Yigit
Headers
Series [v2] net/pfe: fix misuse of if_index |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/iol-testing success Testing PASS
ci/iol-broadcom-Functional success Functional Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS
ci/travis-robot success Travis build: passed
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/Intel-compilation success Compilation OK

Commit Message

Sachin Saxena (OSS) Sept. 14, 2020, 2:22 p.m. UTC
From: Sachin Saxena <sachin.saxena@oss.nxp.com>

Pfe pmd has no need to bound host interface
for which we require if_index field.
Setting it to 0 as unused.

Signed-off-by: Sachin Saxena <sachin.saxena@oss.nxp.com>
---
 drivers/net/pfe/pfe_ethdev.c | 3 ---
 1 file changed, 3 deletions(-)
  

Comments

Ferruh Yigit Sept. 14, 2020, 5:10 p.m. UTC | #1
On 9/14/2020 3:22 PM, Sachin Saxena (OSS) wrote:
> From: Sachin Saxena <sachin.saxena@oss.nxp.com>
> 
> Pfe pmd has no need to bound host interface
> for which we require if_index field.
> Setting it to 0 as unused.
> 
> Signed-off-by: Sachin Saxena <sachin.saxena@oss.nxp.com>

Fixes: fe38ad9ba73e ("net/pfe: add device start/stop")
Cc: stable@dpdk.org

Reported-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>

Applied to dpdk-next-net/main, thanks.
  

Patch

diff --git a/drivers/net/pfe/pfe_ethdev.c b/drivers/net/pfe/pfe_ethdev.c
index 368acfa55..97356d2b0 100644
--- a/drivers/net/pfe/pfe_ethdev.c
+++ b/drivers/net/pfe/pfe_ethdev.c
@@ -427,9 +427,6 @@  static int
 pfe_eth_info(struct rte_eth_dev *dev,
 		struct rte_eth_dev_info *dev_info)
 {
-	struct pfe_eth_priv_s *internals = dev->data->dev_private;
-
-	dev_info->if_index = internals->id;
 	dev_info->max_mac_addrs = PFE_MAX_MACS;
 	dev_info->max_rx_queues = dev->data->nb_rx_queues;
 	dev_info->max_tx_queues = dev->data->nb_tx_queues;