DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] i40e: correct the private data size for i40e vf driver
@ 2015-07-28  1:13 Jingjing Wu
  2015-07-28  1:27 ` Liu, Yong
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Jingjing Wu @ 2015-07-28  1:13 UTC (permalink / raw)
  To: dev

The patch fixes the i40e VF crash issue. The issue's root cause is that
the dev_private_size in i40e virtual function driver struct
rte_i40evf_pmd was set incorrectly.

Signed-off-by: jingjing.wu <jingjing.wu@intel.com>
---
 drivers/net/i40e/i40e_ethdev_vf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c
index f3470e6..b694400 100644
--- a/drivers/net/i40e/i40e_ethdev_vf.c
+++ b/drivers/net/i40e/i40e_ethdev_vf.c
@@ -1248,7 +1248,7 @@ static struct eth_driver rte_i40evf_pmd = {
 	},
 	.eth_dev_init = i40evf_dev_init,
 	.eth_dev_uninit = i40evf_dev_uninit,
-	.dev_private_size = sizeof(struct i40e_vf),
+	.dev_private_size = sizeof(struct i40e_adapter),
 };
 
 /*
-- 
2.4.0

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [dpdk-dev] [PATCH] i40e: correct the private data size for i40e vf driver
  2015-07-28  1:13 [dpdk-dev] [PATCH] i40e: correct the private data size for i40e vf driver Jingjing Wu
@ 2015-07-28  1:27 ` Liu, Yong
  2015-07-28  8:11 ` Thomas Monjalon
  2015-07-28  9:01 ` [dpdk-dev] [PATCH V2] i40evf: fix crash when setup tx queues on vf port Jingjing Wu
  2 siblings, 0 replies; 7+ messages in thread
From: Liu, Yong @ 2015-07-28  1:27 UTC (permalink / raw)
  To: dev, Wu, Jingjing

Tested-by: Marvin Liu <yong.liu@intel.com>

> -----Original Message-----
> From: Wu, Jingjing
> Sent: Tuesday, July 28, 2015 9:14 AM
> To: dev@dpdk.org
> Cc: Wu, Jingjing; Zhang, Helin; Chen, Jing D; Liu, Yong
> Subject: [PATCH] i40e: correct the private data size for i40e vf driver
> 
> The patch fixes the i40e VF crash issue. The issue's root cause is that
> the dev_private_size in i40e virtual function driver struct
> rte_i40evf_pmd was set incorrectly.
> 
> Signed-off-by: jingjing.wu <jingjing.wu@intel.com>
> ---
>  drivers/net/i40e/i40e_ethdev_vf.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/i40e/i40e_ethdev_vf.c
> b/drivers/net/i40e/i40e_ethdev_vf.c
> index f3470e6..b694400 100644
> --- a/drivers/net/i40e/i40e_ethdev_vf.c
> +++ b/drivers/net/i40e/i40e_ethdev_vf.c
> @@ -1248,7 +1248,7 @@ static struct eth_driver rte_i40evf_pmd = {
>  	},
>  	.eth_dev_init = i40evf_dev_init,
>  	.eth_dev_uninit = i40evf_dev_uninit,
> -	.dev_private_size = sizeof(struct i40e_vf),
> +	.dev_private_size = sizeof(struct i40e_adapter),
>  };
> 
>  /*
> --
> 2.4.0

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [dpdk-dev] [PATCH] i40e: correct the private data size for i40e vf driver
  2015-07-28  1:13 [dpdk-dev] [PATCH] i40e: correct the private data size for i40e vf driver Jingjing Wu
  2015-07-28  1:27 ` Liu, Yong
@ 2015-07-28  8:11 ` Thomas Monjalon
  2015-07-28  9:01 ` [dpdk-dev] [PATCH V2] i40evf: fix crash when setup tx queues on vf port Jingjing Wu
  2 siblings, 0 replies; 7+ messages in thread
From: Thomas Monjalon @ 2015-07-28  8:11 UTC (permalink / raw)
  To: Jingjing Wu; +Cc: dev

Hi Jingjing,

Few comments about the patch message.
The title must tell what issue is fixed, e.g. "fix crash when...".
the end "for i40e vf driver" is useless if it starts with "i40evf:".

2015-07-28 09:13, Jingjing Wu:
> The patch fixes the i40e VF crash issue. The issue's root cause is that
> the dev_private_size in i40e virtual function driver struct
> rte_i40evf_pmd was set incorrectly.

Please explain what are the conditions of the crash
and give a reference to the commit introducing the error with "Fixes: ...".

> Signed-off-by: jingjing.wu <jingjing.wu@intel.com>

Thanks

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [dpdk-dev] [PATCH V2] i40evf: fix crash when setup tx queues on vf port
  2015-07-28  1:13 [dpdk-dev] [PATCH] i40e: correct the private data size for i40e vf driver Jingjing Wu
  2015-07-28  1:27 ` Liu, Yong
  2015-07-28  8:11 ` Thomas Monjalon
@ 2015-07-28  9:01 ` Jingjing Wu
  2015-07-29  0:54   ` [dpdk-dev] [PATCH v3] " Jingjing Wu
  2 siblings, 1 reply; 7+ messages in thread
From: Jingjing Wu @ 2015-07-28  9:01 UTC (permalink / raw)
  To: dev

From: "jingjing.wu" <jingjing.wu@intel.com>

This patch fixes the issue:
Testpmd crashed with Segmentation fault when setup tx queues on vf
Steps for reproduce:
  - create one vf device from i40e driver
  - bind vf device to igb_uio and start testpmd

With debugging tools, we saw the struct i40e_vf is cleared after
memcpy(&dev->data->dev_conf, dev_conf, sizeof(dev->data->dev_conf)) in
rte_eth_dev_configure, which should not happen, and the pointer to
i40e_vf isn't in the range of i40e_adapter.

The root cause is the dev_private_size in i40e virtual function driver struct
rte_i40evf_pmd was set incorrectly.

Signed-off-by: jingjing.wu <jingjing.wu@intel.com>
---
v2 changes:
 rework the patch's title and commit log.

 drivers/net/i40e/i40e_ethdev_vf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c
index f3470e6..b694400 100644
--- a/drivers/net/i40e/i40e_ethdev_vf.c
+++ b/drivers/net/i40e/i40e_ethdev_vf.c
@@ -1248,7 +1248,7 @@ static struct eth_driver rte_i40evf_pmd = {
 	},
 	.eth_dev_init = i40evf_dev_init,
 	.eth_dev_uninit = i40evf_dev_uninit,
-	.dev_private_size = sizeof(struct i40e_vf),
+	.dev_private_size = sizeof(struct i40e_adapter),
 };
 
 /*
-- 
2.4.0

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [dpdk-dev] [PATCH v3] i40evf: fix crash when setup tx queues on vf port
  2015-07-28  9:01 ` [dpdk-dev] [PATCH V2] i40evf: fix crash when setup tx queues on vf port Jingjing Wu
@ 2015-07-29  0:54   ` Jingjing Wu
  2015-07-29 22:33     ` Thomas Monjalon
  0 siblings, 1 reply; 7+ messages in thread
From: Jingjing Wu @ 2015-07-29  0:54 UTC (permalink / raw)
  To: dev

This patch fixes the issue:
Testpmd crashed with Segmentation fault when setup tx queues on vf
Steps for reproduce:
  - create one vf device from i40e driver
  - bind vf device to igb_uio and start testpmd

With debugging tools, we saw the struct i40e_vf is cleared after
memcpy(&dev->data->dev_conf, dev_conf, sizeof(dev->data->dev_conf)) in
rte_eth_dev_configure, which should not happen, and the pointer to
i40e_vf isn't in the range of i40e_adapter.

The root cause is the dev_private_size in i40e virtual function driver struct
rte_i40evf_pmd was set incorrectly.

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
---
v2 changes:
  rework the patch's title and commit log.
V3 changes:
  fix name in Signed-off-by.

 drivers/net/i40e/i40e_ethdev_vf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c
index f3470e6..b694400 100644
--- a/drivers/net/i40e/i40e_ethdev_vf.c
+++ b/drivers/net/i40e/i40e_ethdev_vf.c
@@ -1248,7 +1248,7 @@ static struct eth_driver rte_i40evf_pmd = {
 	},
 	.eth_dev_init = i40evf_dev_init,
 	.eth_dev_uninit = i40evf_dev_uninit,
-	.dev_private_size = sizeof(struct i40e_vf),
+	.dev_private_size = sizeof(struct i40e_adapter),
 };
 
 /*
-- 
2.4.0

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [dpdk-dev] [PATCH v3] i40evf: fix crash when setup tx queues on vf port
  2015-07-29  0:54   ` [dpdk-dev] [PATCH v3] " Jingjing Wu
@ 2015-07-29 22:33     ` Thomas Monjalon
  2015-07-30  0:41       ` Wu, Jingjing
  0 siblings, 1 reply; 7+ messages in thread
From: Thomas Monjalon @ 2015-07-29 22:33 UTC (permalink / raw)
  To: Jingjing Wu; +Cc: dev

> This patch fixes the issue:
> Testpmd crashed with Segmentation fault when setup tx queues on vf
> Steps for reproduce:
>   - create one vf device from i40e driver
>   - bind vf device to igb_uio and start testpmd
> 
> With debugging tools, we saw the struct i40e_vf is cleared after
> memcpy(&dev->data->dev_conf, dev_conf, sizeof(dev->data->dev_conf)) in
> rte_eth_dev_configure, which should not happen, and the pointer to
> i40e_vf isn't in the range of i40e_adapter.
> 
> The root cause is the dev_private_size in i40e virtual function driver struct
> rte_i40evf_pmd was set incorrectly.
> 
> Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>

Applied, thanks

Does it mean that Tx with i40evf never worked before?

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [dpdk-dev] [PATCH v3] i40evf: fix crash when setup tx queues on vf port
  2015-07-29 22:33     ` Thomas Monjalon
@ 2015-07-30  0:41       ` Wu, Jingjing
  0 siblings, 0 replies; 7+ messages in thread
From: Wu, Jingjing @ 2015-07-30  0:41 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: dev



> -----Original Message-----
> From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com]
> Sent: Thursday, July 30, 2015 6:33 AM
> To: Wu, Jingjing
> Cc: dev@dpdk.org
> Subject: Re: [dpdk-dev] [PATCH v3] i40evf: fix crash when setup tx queues
> on vf port
> 
> > This patch fixes the issue:
> > Testpmd crashed with Segmentation fault when setup tx queues on vf
> > Steps for reproduce:
> >   - create one vf device from i40e driver
> >   - bind vf device to igb_uio and start testpmd
> >
> > With debugging tools, we saw the struct i40e_vf is cleared after
> > memcpy(&dev->data->dev_conf, dev_conf, sizeof(dev->data->dev_conf))
> in
> > rte_eth_dev_configure, which should not happen, and the pointer to
> > i40e_vf isn't in the range of i40e_adapter.
> >
> > The root cause is the dev_private_size in i40e virtual function driver
> > struct rte_i40evf_pmd was set incorrectly.
> >
> > Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
> 
> Applied, thanks
> 
> Does it mean that Tx with i40evf never worked before?

Actually we didn't face crash with previous version, i40vf tx works before, what makes me surprised. Maybe just lucky. 

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2015-07-30  0:42 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-28  1:13 [dpdk-dev] [PATCH] i40e: correct the private data size for i40e vf driver Jingjing Wu
2015-07-28  1:27 ` Liu, Yong
2015-07-28  8:11 ` Thomas Monjalon
2015-07-28  9:01 ` [dpdk-dev] [PATCH V2] i40evf: fix crash when setup tx queues on vf port Jingjing Wu
2015-07-29  0:54   ` [dpdk-dev] [PATCH v3] " Jingjing Wu
2015-07-29 22:33     ` Thomas Monjalon
2015-07-30  0:41       ` Wu, Jingjing

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).