DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] ixgbe: initialize scattered_rx during dev_configure
@ 2017-08-23  1:33 David Harton
  2017-08-23 10:31 ` Ananyev, Konstantin
  0 siblings, 1 reply; 3+ messages in thread
From: David Harton @ 2017-08-23  1:33 UTC (permalink / raw)
  To: wenzhuo.lu, konstantin.ananyev; +Cc: dev, David Harton

An application may want to manipulate the MTU settings of
a device without having to start the device first.
In order to remove the need to start the device the
ixgbe/ixgbevf drivers need to initialize the scattered_rx
value during dev_configure.

Signed-off-by: David Harton <dharton@cisco.com>
---
 drivers/net/ixgbe/ixgbe_ethdev.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index 22171d8..e85bdb4 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -2372,6 +2372,13 @@ static int eth_ixgbevf_pci_remove(struct rte_pci_device *pci_dev)
 	intr->flags |= IXGBE_FLAG_NEED_LINK_UPDATE;
 
 	/*
+	 * Update scattered_rx so we can update MTU immediately
+	 * following configure without having to start the device
+	 */
+	if (dev->data->dev_conf.rxmode.enable_scatter)
+		dev->data->scattered_rx = 1;
+
+	/*
 	 * Initialize to TRUE. If any of Rx queues doesn't meet the bulk
 	 * allocation or vector Rx preconditions we will reset it.
 	 */
@@ -4949,6 +4956,13 @@ static int ixgbevf_dev_xstats_get_names(__rte_unused struct rte_eth_dev *dev,
 #endif
 
 	/*
+	 * Update scattered_rx so we can update MTU immediately
+	 * following configure without having to start the device
+	 */
+	if (dev->data->dev_conf.rxmode.enable_scatter)
+		dev->data->scattered_rx = 1;
+
+	/*
 	 * Initialize to TRUE. If any of Rx queues doesn't meet the bulk
 	 * allocation or vector Rx preconditions we will reset it.
 	 */
-- 
1.8.3.1

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

* Re: [dpdk-dev] [PATCH] ixgbe: initialize scattered_rx during dev_configure
  2017-08-23  1:33 [dpdk-dev] [PATCH] ixgbe: initialize scattered_rx during dev_configure David Harton
@ 2017-08-23 10:31 ` Ananyev, Konstantin
  2017-08-23 12:56   ` David Harton (dharton)
  0 siblings, 1 reply; 3+ messages in thread
From: Ananyev, Konstantin @ 2017-08-23 10:31 UTC (permalink / raw)
  To: David Harton, wenzhuo.lu; +Cc: dev

Hi David,

> 
> An application may want to manipulate the MTU settings of
> a device without having to start the device first.
> In order to remove the need to start the device the
> ixgbe/ixgbevf drivers need to initialize the scattered_rx
> value during dev_configure.

Not sure how that would help?
As I can see ixgbe_dev_mtu_set() uses rx_conf->enable_scatter 
to check is multiseg RX allowed or not.
Konstantin

> 
> Signed-off-by: David Harton <dharton@cisco.com>
> ---
>  drivers/net/ixgbe/ixgbe_ethdev.c | 14 ++++++++++++++
>  1 file changed, 14 insertions(+)
> 
> diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
> index 22171d8..e85bdb4 100644
> --- a/drivers/net/ixgbe/ixgbe_ethdev.c
> +++ b/drivers/net/ixgbe/ixgbe_ethdev.c
> @@ -2372,6 +2372,13 @@ static int eth_ixgbevf_pci_remove(struct rte_pci_device *pci_dev)
>  	intr->flags |= IXGBE_FLAG_NEED_LINK_UPDATE;
> 
>  	/*
> +	 * Update scattered_rx so we can update MTU immediately
> +	 * following configure without having to start the device
> +	 */
> +	if (dev->data->dev_conf.rxmode.enable_scatter)
> +		dev->data->scattered_rx = 1;
> +
> +	/*
>  	 * Initialize to TRUE. If any of Rx queues doesn't meet the bulk
>  	 * allocation or vector Rx preconditions we will reset it.
>  	 */
> @@ -4949,6 +4956,13 @@ static int ixgbevf_dev_xstats_get_names(__rte_unused struct rte_eth_dev *dev,
>  #endif
> 
>  	/*
> +	 * Update scattered_rx so we can update MTU immediately
> +	 * following configure without having to start the device
> +	 */
> +	if (dev->data->dev_conf.rxmode.enable_scatter)
> +		dev->data->scattered_rx = 1;
> +
> +	/*
>  	 * Initialize to TRUE. If any of Rx queues doesn't meet the bulk
>  	 * allocation or vector Rx preconditions we will reset it.
>  	 */
> --
> 1.8.3.1

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

* Re: [dpdk-dev] [PATCH] ixgbe: initialize scattered_rx during dev_configure
  2017-08-23 10:31 ` Ananyev, Konstantin
@ 2017-08-23 12:56   ` David Harton (dharton)
  0 siblings, 0 replies; 3+ messages in thread
From: David Harton (dharton) @ 2017-08-23 12:56 UTC (permalink / raw)
  To: Ananyev, Konstantin, wenzhuo.lu; +Cc: dev


> -----Original Message-----
> From: Ananyev, Konstantin [mailto:konstantin.ananyev@intel.com]
> Sent: Wednesday, August 23, 2017 6:32 AM
> To: David Harton (dharton) <dharton@cisco.com>; wenzhuo.lu@intel.co
> Cc: dev@dpdk.org
> Subject: RE: [PATCH] ixgbe: initialize scattered_rx during dev_configure
> 
> Hi David,
> 
> >
> > An application may want to manipulate the MTU settings of a device
> > without having to start the device first.
> > In order to remove the need to start the device the ixgbe/ixgbevf
> > drivers need to initialize the scattered_rx value during
> > dev_configure.
> 
> Not sure how that would help?
> As I can see ixgbe_dev_mtu_set() uses rx_conf->enable_scatter to check is
> multiseg RX allowed or not.

Hi Konstantin,

I see.  The problem has been fixed already.  Originally (v2.2), the check in ixgbe_dev_mtu_set() was made against dev->data->scattered_rx but it has been changed.

Sorry, I'll rescind the request.

Thanks!
Dave


> Konstantin
> 
> >
> > Signed-off-by: David Harton <dharton@cisco.com>
> > ---
> >  drivers/net/ixgbe/ixgbe_ethdev.c | 14 ++++++++++++++
> >  1 file changed, 14 insertions(+)
> >
> > diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c
> > b/drivers/net/ixgbe/ixgbe_ethdev.c
> > index 22171d8..e85bdb4 100644
> > --- a/drivers/net/ixgbe/ixgbe_ethdev.c
> > +++ b/drivers/net/ixgbe/ixgbe_ethdev.c
> > @@ -2372,6 +2372,13 @@ static int eth_ixgbevf_pci_remove(struct
> rte_pci_device *pci_dev)
> >  	intr->flags |= IXGBE_FLAG_NEED_LINK_UPDATE;
> >
> >  	/*
> > +	 * Update scattered_rx so we can update MTU immediately
> > +	 * following configure without having to start the device
> > +	 */
> > +	if (dev->data->dev_conf.rxmode.enable_scatter)
> > +		dev->data->scattered_rx = 1;
> > +
> > +	/*
> >  	 * Initialize to TRUE. If any of Rx queues doesn't meet the bulk
> >  	 * allocation or vector Rx preconditions we will reset it.
> >  	 */
> > @@ -4949,6 +4956,13 @@ static int
> > ixgbevf_dev_xstats_get_names(__rte_unused struct rte_eth_dev *dev,
> > #endif
> >
> >  	/*
> > +	 * Update scattered_rx so we can update MTU immediately
> > +	 * following configure without having to start the device
> > +	 */
> > +	if (dev->data->dev_conf.rxmode.enable_scatter)
> > +		dev->data->scattered_rx = 1;
> > +
> > +	/*
> >  	 * Initialize to TRUE. If any of Rx queues doesn't meet the bulk
> >  	 * allocation or vector Rx preconditions we will reset it.
> >  	 */
> > --
> > 1.8.3.1

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

end of thread, other threads:[~2017-08-23 12:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-23  1:33 [dpdk-dev] [PATCH] ixgbe: initialize scattered_rx during dev_configure David Harton
2017-08-23 10:31 ` Ananyev, Konstantin
2017-08-23 12:56   ` David Harton (dharton)

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