* [dpdk-dev] [PATCH v1 2/2] net/pfe: fix misuse of if_index
@ 2020-09-11 9:39 Sachin Saxena (OSS)
2020-09-11 13:03 ` Ferruh Yigit
2020-09-14 14:22 ` [dpdk-dev] [PATCH v2] " Sachin Saxena (OSS)
0 siblings, 2 replies; 4+ messages in thread
From: Sachin Saxena (OSS) @ 2020-09-11 9:39 UTC (permalink / raw)
To: dev, ferruh.yigit; +Cc: g.singh, stephen
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 | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/net/pfe/pfe_ethdev.c b/drivers/net/pfe/pfe_ethdev.c
index 368acfa55..8cbd51abb 100644
--- a/drivers/net/pfe/pfe_ethdev.c
+++ b/drivers/net/pfe/pfe_ethdev.c
@@ -427,9 +427,7 @@ 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->if_index = 0;
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;
--
2.28.0
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dpdk-dev] [PATCH v1 2/2] net/pfe: fix misuse of if_index
2020-09-11 9:39 [dpdk-dev] [PATCH v1 2/2] net/pfe: fix misuse of if_index Sachin Saxena (OSS)
@ 2020-09-11 13:03 ` Ferruh Yigit
2020-09-14 14:22 ` [dpdk-dev] [PATCH v2] " Sachin Saxena (OSS)
1 sibling, 0 replies; 4+ messages in thread
From: Ferruh Yigit @ 2020-09-11 13:03 UTC (permalink / raw)
To: Sachin Saxena (OSS), dev; +Cc: g.singh, stephen
On 9/11/2020 10:39 AM, 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>
> ---
> drivers/net/pfe/pfe_ethdev.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/net/pfe/pfe_ethdev.c b/drivers/net/pfe/pfe_ethdev.c
> index 368acfa55..8cbd51abb 100644
> --- a/drivers/net/pfe/pfe_ethdev.c
> +++ b/drivers/net/pfe/pfe_ethdev.c
> @@ -427,9 +427,7 @@ 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->if_index = 0;
No need to set 'if_index' to anything, assignment can be removed completely.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [dpdk-dev] [PATCH v2] net/pfe: fix misuse of if_index
2020-09-11 9:39 [dpdk-dev] [PATCH v1 2/2] net/pfe: fix misuse of if_index Sachin Saxena (OSS)
2020-09-11 13:03 ` Ferruh Yigit
@ 2020-09-14 14:22 ` Sachin Saxena (OSS)
2020-09-14 17:10 ` Ferruh Yigit
1 sibling, 1 reply; 4+ messages in thread
From: Sachin Saxena (OSS) @ 2020-09-14 14:22 UTC (permalink / raw)
To: dev, ferruh.yigit
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(-)
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;
--
2.28.0
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dpdk-dev] [PATCH v2] net/pfe: fix misuse of if_index
2020-09-14 14:22 ` [dpdk-dev] [PATCH v2] " Sachin Saxena (OSS)
@ 2020-09-14 17:10 ` Ferruh Yigit
0 siblings, 0 replies; 4+ messages in thread
From: Ferruh Yigit @ 2020-09-14 17:10 UTC (permalink / raw)
To: Sachin Saxena (OSS), dev
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.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-09-14 17:11 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-11 9:39 [dpdk-dev] [PATCH v1 2/2] net/pfe: fix misuse of if_index Sachin Saxena (OSS)
2020-09-11 13:03 ` Ferruh Yigit
2020-09-14 14:22 ` [dpdk-dev] [PATCH v2] " Sachin Saxena (OSS)
2020-09-14 17:10 ` Ferruh Yigit
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).