ixgbe: initialize scattered_rx during dev_configure
PATCH 1/1 ixgbe: initialize scattered_rx during dev_configure
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.
--- drivers/net/ixgbe/ixgbe_ethdev.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+)
drivers/net/ixgbe/ixgbe_ethdev.c +14 -0
@@ -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. */
Signature · 1 line
1.8.3.1
Hi David,
Quoted 6 lines
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_rxvalue duringdev_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
Quoted 40 lines
Signed-off-by David Harton <[email protected]>--- drivers/net/ixgbe/ixgbe_ethdev.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+)drivers/net/ixgbe/ixgbe_ethdev.c +14
-1@@ -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
Quoted 17 lines
-----Original Message-----
From: Ananyev, Konstantin [mailto:[email protected]]
Sent: Wednesday, August 23, 2017 6:32 AM
To: David Harton (dharton) <[email protected]>; [email protected]
Cc: [email protected]
Subject: RE: [PATCH] ixgbe: initializescattered_rxduringdev_configureHi David,
Quoted 6 lines
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 thescattered_rxvalue duringdev_configure.
Quoted 3 lines
Not sure how that would help?
As I can seeixgbe_dev_mtu_set()usesrx_conf->enable_scatterto 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
Quoted 45 lines
Konstantin
drivers/net/ixgbe/ixgbe_ethdev.c static int eth_ixgbevf_pci_remove(struct
Quoted 12 lines
Signed-off-by David Harton <[email protected]>--- drivers/net/ixgbe/ixgbe_ethdev.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+)drivers/net/ixgbe/ixgbe_ethdev.c +0
-0@@ -2372,6 +2372,13 @@ static int eth_ixgbevf_pci_remove(struct
rte_pci_device*pci_dev)Quoted 30 lines
drivers/net/ixgbe/ixgbe_ethdev.c +14
-0intr->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