[dpdk-dev] [PATCH] ixgbe: initialize scattered_rx during dev_configure

David Harton dharton at cisco.com
Wed Aug 23 03:33:33 CEST 2017


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 at 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



More information about the dev mailing list