* [dpdk-dev] [PATCH 0/2] fix the wrong address of device data pointer
@ 2016-03-24 6:37 Wenzhuo Lu
2016-03-24 6:37 ` [dpdk-dev] [PATCH 1/2] ixgbe: " Wenzhuo Lu
` (2 more replies)
0 siblings, 3 replies; 11+ messages in thread
From: Wenzhuo Lu @ 2016-03-24 6:37 UTC (permalink / raw)
To: dev
In the function set_rx_mode, the pointer of device data points
to the wrong address.
Wenzhuo Lu (2):
ixgbe: fix the wrong address of device data pointer
igb: fix the wrong address of device data pointer
drivers/net/e1000/igb_pf.c | 2 +-
drivers/net/ixgbe/ixgbe_pf.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
--
1.9.3
^ permalink raw reply [flat|nested] 11+ messages in thread
* [dpdk-dev] [PATCH 1/2] ixgbe: fix the wrong address of device data pointer
2016-03-24 6:37 [dpdk-dev] [PATCH 0/2] fix the wrong address of device data pointer Wenzhuo Lu
@ 2016-03-24 6:37 ` Wenzhuo Lu
2016-03-24 6:48 ` Wu, Jingjing
2016-03-24 6:37 ` [dpdk-dev] [PATCH 2/2] igb: " Wenzhuo Lu
2016-03-24 7:07 ` [dpdk-dev] [PATCH v2 0/2] " Wenzhuo Lu
2 siblings, 1 reply; 11+ messages in thread
From: Wenzhuo Lu @ 2016-03-24 6:37 UTC (permalink / raw)
To: dev; +Cc: Wenzhuo Lu
There's an issue reported. In the scenario DPDK PF + DPDK VF,
if the VF port is closed, PF port cannot receive packets.
I found at that time the promicuous mode is disabled on the PF
port. But it should be enabled.
When VF port is closed, it will send a message to its PF port to
reset it. During this, PF port will also reset its own
promicuous mode. Which promiscuous mode should be set depends on
the parameter stored in the device data. In the function
set_rx_mode, the pointer of device data points to the wrong
address. So, the promiscuous mode is wrong.
Fixes: 00e30184daa0("ixgbe: add PF support")
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Reported-by: Bernard Iremonger <bernard.iremonger@intel.com>
---
drivers/net/ixgbe/ixgbe_pf.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ixgbe/ixgbe_pf.c b/drivers/net/ixgbe/ixgbe_pf.c
index b854c72..0f8ad55 100644
--- a/drivers/net/ixgbe/ixgbe_pf.c
+++ b/drivers/net/ixgbe/ixgbe_pf.c
@@ -313,7 +313,7 @@ static void
set_rx_mode(struct rte_eth_dev *dev)
{
struct rte_eth_dev_data *dev_data =
- (struct rte_eth_dev_data*)dev->data->dev_private;
+ (struct rte_eth_dev_data *)dev->data;
struct ixgbe_hw *hw = IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private);
u32 fctrl, vmolr = IXGBE_VMOLR_BAM | IXGBE_VMOLR_AUPE;
uint16_t vfn = dev_num_vf(dev);
--
1.9.3
^ permalink raw reply [flat|nested] 11+ messages in thread
* [dpdk-dev] [PATCH 2/2] igb: fix the wrong address of device data pointer
2016-03-24 6:37 [dpdk-dev] [PATCH 0/2] fix the wrong address of device data pointer Wenzhuo Lu
2016-03-24 6:37 ` [dpdk-dev] [PATCH 1/2] ixgbe: " Wenzhuo Lu
@ 2016-03-24 6:37 ` Wenzhuo Lu
2016-03-24 7:07 ` [dpdk-dev] [PATCH v2 0/2] " Wenzhuo Lu
2 siblings, 0 replies; 11+ messages in thread
From: Wenzhuo Lu @ 2016-03-24 6:37 UTC (permalink / raw)
To: dev; +Cc: Wenzhuo Lu
In the function set_rx_mode, the pointer of device data points
to the wrong address as found in ixgbe code.
Fixes: be2d648a2dd3("igb: add PF support")
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
---
drivers/net/e1000/igb_pf.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/e1000/igb_pf.c b/drivers/net/e1000/igb_pf.c
index 95204e9..9dafbc4 100644
--- a/drivers/net/e1000/igb_pf.c
+++ b/drivers/net/e1000/igb_pf.c
@@ -219,7 +219,7 @@ static void
set_rx_mode(struct rte_eth_dev *dev)
{
struct rte_eth_dev_data *dev_data =
- (struct rte_eth_dev_data*)dev->data->dev_private;
+ (struct rte_eth_dev_data *)dev->data;
struct e1000_hw *hw = E1000_DEV_PRIVATE_TO_HW(dev->data->dev_private);
uint32_t fctrl, vmolr = E1000_VMOLR_BAM | E1000_VMOLR_AUPE;
uint16_t vfn = dev_num_vf(dev);
--
1.9.3
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [dpdk-dev] [PATCH 1/2] ixgbe: fix the wrong address of device data pointer
2016-03-24 6:37 ` [dpdk-dev] [PATCH 1/2] ixgbe: " Wenzhuo Lu
@ 2016-03-24 6:48 ` Wu, Jingjing
2016-03-24 6:53 ` Lu, Wenzhuo
0 siblings, 1 reply; 11+ messages in thread
From: Wu, Jingjing @ 2016-03-24 6:48 UTC (permalink / raw)
To: Lu, Wenzhuo, dev; +Cc: Lu, Wenzhuo
> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Wenzhuo Lu
> Sent: Thursday, March 24, 2016 2:37 PM
> To: dev@dpdk.org
> Cc: Lu, Wenzhuo
> Subject: [dpdk-dev] [PATCH 1/2] ixgbe: fix the wrong address of device data
> pointer
>
> There's an issue reported. In the scenario DPDK PF + DPDK VF, if the VF port
> is closed, PF port cannot receive packets.
> I found at that time the promicuous mode is disabled on the PF port. But it
> should be enabled.
> When VF port is closed, it will send a message to its PF port to reset it. During
> this, PF port will also reset its own promicuous mode. Which promiscuous
> mode should be set depends on the parameter stored in the device data. In
> the function set_rx_mode, the pointer of device data points to the wrong
> address. So, the promiscuous mode is wrong.
>
> Fixes: 00e30184daa0("ixgbe: add PF support")
> Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
> Reported-by: Bernard Iremonger <bernard.iremonger@intel.com>
> ---
> drivers/net/ixgbe/ixgbe_pf.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/ixgbe/ixgbe_pf.c b/drivers/net/ixgbe/ixgbe_pf.c
> index b854c72..0f8ad55 100644
> --- a/drivers/net/ixgbe/ixgbe_pf.c
> +++ b/drivers/net/ixgbe/ixgbe_pf.c
> @@ -313,7 +313,7 @@ static void
> set_rx_mode(struct rte_eth_dev *dev)
> {
> struct rte_eth_dev_data *dev_data =
> - (struct rte_eth_dev_data*)dev->data->dev_private;
> + (struct rte_eth_dev_data *)dev->data;
Cast is unnecessary here.
/Jingjing
> struct ixgbe_hw *hw = IXGBE_DEV_PRIVATE_TO_HW(dev->data-
> >dev_private);
> u32 fctrl, vmolr = IXGBE_VMOLR_BAM | IXGBE_VMOLR_AUPE;
> uint16_t vfn = dev_num_vf(dev);
> --
> 1.9.3
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [dpdk-dev] [PATCH 1/2] ixgbe: fix the wrong address of device data pointer
2016-03-24 6:48 ` Wu, Jingjing
@ 2016-03-24 6:53 ` Lu, Wenzhuo
0 siblings, 0 replies; 11+ messages in thread
From: Lu, Wenzhuo @ 2016-03-24 6:53 UTC (permalink / raw)
To: Wu, Jingjing, dev
Hi Jingjing,
> > set_rx_mode(struct rte_eth_dev *dev)
> > {
> > struct rte_eth_dev_data *dev_data =
> > - (struct rte_eth_dev_data*)dev->data->dev_private;
> > + (struct rte_eth_dev_data *)dev->data;
> Cast is unnecessary here.
O, didn't notice that. Will send a V2. Thanks.
>
> /Jingjing
^ permalink raw reply [flat|nested] 11+ messages in thread
* [dpdk-dev] [PATCH v2 0/2] fix the wrong address of device data pointer
2016-03-24 6:37 [dpdk-dev] [PATCH 0/2] fix the wrong address of device data pointer Wenzhuo Lu
2016-03-24 6:37 ` [dpdk-dev] [PATCH 1/2] ixgbe: " Wenzhuo Lu
2016-03-24 6:37 ` [dpdk-dev] [PATCH 2/2] igb: " Wenzhuo Lu
@ 2016-03-24 7:07 ` Wenzhuo Lu
2016-03-24 7:07 ` [dpdk-dev] [PATCH v2 1/2] ixgbe: " Wenzhuo Lu
` (2 more replies)
2 siblings, 3 replies; 11+ messages in thread
From: Wenzhuo Lu @ 2016-03-24 7:07 UTC (permalink / raw)
To: dev
In the function set_rx_mode, the pointer of device data points
to the wrong address.
v2:
- Remove the unnecessary cast.
Wenzhuo Lu (2):
ixgbe: fix the wrong address of device data pointer
igb: fix the wrong address of device data pointer
drivers/net/e1000/igb_pf.c | 3 +--
drivers/net/ixgbe/ixgbe_pf.c | 3 +--
2 files changed, 2 insertions(+), 4 deletions(-)
--
1.9.3
^ permalink raw reply [flat|nested] 11+ messages in thread
* [dpdk-dev] [PATCH v2 1/2] ixgbe: fix the wrong address of device data pointer
2016-03-24 7:07 ` [dpdk-dev] [PATCH v2 0/2] " Wenzhuo Lu
@ 2016-03-24 7:07 ` Wenzhuo Lu
2016-03-24 7:14 ` Wu, Jingjing
2016-03-24 7:07 ` [dpdk-dev] [PATCH v2 2/2] igb: " Wenzhuo Lu
2016-03-24 12:34 ` [dpdk-dev] [PATCH v2 0/2] " Bruce Richardson
2 siblings, 1 reply; 11+ messages in thread
From: Wenzhuo Lu @ 2016-03-24 7:07 UTC (permalink / raw)
To: dev; +Cc: Wenzhuo Lu
There's an issue reported. In the scenario DPDK PF + DPDK VF,
if the VF port is closed, PF port cannot receive packets.
I found at that time the promicuous mode is disabled on the PF
port. But it should be enabled.
When VF port is closed, it will send a message to its PF port to
reset it. During this, PF port will also reset its own
promicuous mode. Which promiscuous mode should be set depends on
the parameter stored in the device data. In the function
set_rx_mode, the pointer of device data points to the wrong
address. So, the promiscuous mode is wrong.
Fixes: 00e30184daa0("ixgbe: add PF support")
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Reported-by: Bernard Iremonger <bernard.iremonger@intel.com>
---
drivers/net/ixgbe/ixgbe_pf.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/net/ixgbe/ixgbe_pf.c b/drivers/net/ixgbe/ixgbe_pf.c
index b854c72..a540343 100644
--- a/drivers/net/ixgbe/ixgbe_pf.c
+++ b/drivers/net/ixgbe/ixgbe_pf.c
@@ -312,8 +312,7 @@ int ixgbe_pf_host_configure(struct rte_eth_dev *eth_dev)
static void
set_rx_mode(struct rte_eth_dev *dev)
{
- struct rte_eth_dev_data *dev_data =
- (struct rte_eth_dev_data*)dev->data->dev_private;
+ struct rte_eth_dev_data *dev_data = dev->data;
struct ixgbe_hw *hw = IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private);
u32 fctrl, vmolr = IXGBE_VMOLR_BAM | IXGBE_VMOLR_AUPE;
uint16_t vfn = dev_num_vf(dev);
--
1.9.3
^ permalink raw reply [flat|nested] 11+ messages in thread
* [dpdk-dev] [PATCH v2 2/2] igb: fix the wrong address of device data pointer
2016-03-24 7:07 ` [dpdk-dev] [PATCH v2 0/2] " Wenzhuo Lu
2016-03-24 7:07 ` [dpdk-dev] [PATCH v2 1/2] ixgbe: " Wenzhuo Lu
@ 2016-03-24 7:07 ` Wenzhuo Lu
2016-03-24 7:14 ` Wu, Jingjing
2016-03-24 12:34 ` [dpdk-dev] [PATCH v2 0/2] " Bruce Richardson
2 siblings, 1 reply; 11+ messages in thread
From: Wenzhuo Lu @ 2016-03-24 7:07 UTC (permalink / raw)
To: dev; +Cc: Wenzhuo Lu
In the function set_rx_mode, the pointer of device data points
to the wrong address as found in ixgbe code.
Fixes: be2d648a2dd3("igb: add PF support")
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
---
drivers/net/e1000/igb_pf.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/net/e1000/igb_pf.c b/drivers/net/e1000/igb_pf.c
index 95204e9..7f45a44 100644
--- a/drivers/net/e1000/igb_pf.c
+++ b/drivers/net/e1000/igb_pf.c
@@ -218,8 +218,7 @@ int igb_pf_host_configure(struct rte_eth_dev *eth_dev)
static void
set_rx_mode(struct rte_eth_dev *dev)
{
- struct rte_eth_dev_data *dev_data =
- (struct rte_eth_dev_data*)dev->data->dev_private;
+ struct rte_eth_dev_data *dev_data = dev->data;
struct e1000_hw *hw = E1000_DEV_PRIVATE_TO_HW(dev->data->dev_private);
uint32_t fctrl, vmolr = E1000_VMOLR_BAM | E1000_VMOLR_AUPE;
uint16_t vfn = dev_num_vf(dev);
--
1.9.3
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [dpdk-dev] [PATCH v2 1/2] ixgbe: fix the wrong address of device data pointer
2016-03-24 7:07 ` [dpdk-dev] [PATCH v2 1/2] ixgbe: " Wenzhuo Lu
@ 2016-03-24 7:14 ` Wu, Jingjing
0 siblings, 0 replies; 11+ messages in thread
From: Wu, Jingjing @ 2016-03-24 7:14 UTC (permalink / raw)
To: Lu, Wenzhuo, dev; +Cc: Lu, Wenzhuo
> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Wenzhuo Lu
> Sent: Thursday, March 24, 2016 3:08 PM
> To: dev@dpdk.org
> Cc: Lu, Wenzhuo
> Subject: [dpdk-dev] [PATCH v2 1/2] ixgbe: fix the wrong address of device
> data pointer
>
> There's an issue reported. In the scenario DPDK PF + DPDK VF, if the VF port
> is closed, PF port cannot receive packets.
> I found at that time the promicuous mode is disabled on the PF port. But it
> should be enabled.
> When VF port is closed, it will send a message to its PF port to reset it. During
> this, PF port will also reset its own promicuous mode. Which promiscuous
> mode should be set depends on the parameter stored in the device data. In
> the function set_rx_mode, the pointer of device data points to the wrong
> address. So, the promiscuous mode is wrong.
>
> Fixes: 00e30184daa0("ixgbe: add PF support")
> Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
> Reported-by: Bernard Iremonger <bernard.iremonger@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [dpdk-dev] [PATCH v2 2/2] igb: fix the wrong address of device data pointer
2016-03-24 7:07 ` [dpdk-dev] [PATCH v2 2/2] igb: " Wenzhuo Lu
@ 2016-03-24 7:14 ` Wu, Jingjing
0 siblings, 0 replies; 11+ messages in thread
From: Wu, Jingjing @ 2016-03-24 7:14 UTC (permalink / raw)
To: Lu, Wenzhuo, dev; +Cc: Lu, Wenzhuo
> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Wenzhuo Lu
> Sent: Thursday, March 24, 2016 3:08 PM
> To: dev@dpdk.org
> Cc: Lu, Wenzhuo
> Subject: [dpdk-dev] [PATCH v2 2/2] igb: fix the wrong address of device data
> pointer
>
> In the function set_rx_mode, the pointer of device data points to the wrong
> address as found in ixgbe code.
>
> Fixes: be2d648a2dd3("igb: add PF support")
> Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [dpdk-dev] [PATCH v2 0/2] fix the wrong address of device data pointer
2016-03-24 7:07 ` [dpdk-dev] [PATCH v2 0/2] " Wenzhuo Lu
2016-03-24 7:07 ` [dpdk-dev] [PATCH v2 1/2] ixgbe: " Wenzhuo Lu
2016-03-24 7:07 ` [dpdk-dev] [PATCH v2 2/2] igb: " Wenzhuo Lu
@ 2016-03-24 12:34 ` Bruce Richardson
2 siblings, 0 replies; 11+ messages in thread
From: Bruce Richardson @ 2016-03-24 12:34 UTC (permalink / raw)
To: Wenzhuo Lu; +Cc: dev
On Thu, Mar 24, 2016 at 03:07:44PM +0800, Wenzhuo Lu wrote:
> In the function set_rx_mode, the pointer of device data points
> to the wrong address.
>
> v2:
> - Remove the unnecessary cast.
>
> Wenzhuo Lu (2):
> ixgbe: fix the wrong address of device data pointer
> igb: fix the wrong address of device data pointer
>
Applied to dpdk-next-net/rel_16_04
/Bruce
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2016-03-24 12:34 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-24 6:37 [dpdk-dev] [PATCH 0/2] fix the wrong address of device data pointer Wenzhuo Lu
2016-03-24 6:37 ` [dpdk-dev] [PATCH 1/2] ixgbe: " Wenzhuo Lu
2016-03-24 6:48 ` Wu, Jingjing
2016-03-24 6:53 ` Lu, Wenzhuo
2016-03-24 6:37 ` [dpdk-dev] [PATCH 2/2] igb: " Wenzhuo Lu
2016-03-24 7:07 ` [dpdk-dev] [PATCH v2 0/2] " Wenzhuo Lu
2016-03-24 7:07 ` [dpdk-dev] [PATCH v2 1/2] ixgbe: " Wenzhuo Lu
2016-03-24 7:14 ` Wu, Jingjing
2016-03-24 7:07 ` [dpdk-dev] [PATCH v2 2/2] igb: " Wenzhuo Lu
2016-03-24 7:14 ` Wu, Jingjing
2016-03-24 12:34 ` [dpdk-dev] [PATCH v2 0/2] " Bruce Richardson
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).