From patchwork Wed Aug 23 01:33:33 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Harton X-Patchwork-Id: 27732 X-Patchwork-Delegate: ferruh.yigit@amd.com Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [IPv6:::1]) by dpdk.org (Postfix) with ESMTP id 31E627D05; Wed, 23 Aug 2017 03:33:38 +0200 (CEST) Received: from rcdn-iport-8.cisco.com (rcdn-iport-8.cisco.com [173.37.86.79]) by dpdk.org (Postfix) with ESMTP id 8DA527D01 for ; Wed, 23 Aug 2017 03:33:36 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=1585; q=dns/txt; s=iport; t=1503452016; x=1504661616; h=from:to:cc:subject:date:message-id; bh=RABZMFcyKQO0nt3/IERAl1Nv/BYgKDD+myBWD82GSo4=; b=jR6YkZ58UB1uCmTOLcTGS/845NT/xqge3gQohFZMwK/w+UK0DbEXT+5z dyDx/rJlm79gL0+M06YtUQh9/yFS5cyRBYWGJ5JzgmGPbTvhzHdgocBi/ BEeAWPoJfvKsqWZjWhTvg1/4gEDosZqoot5SpcWvNLtHHHTZGbopZuvET o=; X-IronPort-AV: E=Sophos;i="5.41,415,1498521600"; d="scan'208";a="284302541" Received: from alln-core-3.cisco.com ([173.36.13.136]) by rcdn-iport-8.cisco.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 23 Aug 2017 01:33:35 +0000 Received: from cpp-rtpbld-31.cisco.com (cpp-rtpbld-31.cisco.com [172.18.5.114]) by alln-core-3.cisco.com (8.14.5/8.14.5) with ESMTP id v7N1XZ7h012626; Wed, 23 Aug 2017 01:33:35 GMT Received: by cpp-rtpbld-31.cisco.com (Postfix, from userid 140087) id 074015AB; Tue, 22 Aug 2017 21:33:34 -0400 (EDT) From: David Harton To: wenzhuo.lu@intel.co, konstantin.ananyev@intel.com Cc: dev@dpdk.org, David Harton Date: Tue, 22 Aug 2017 21:33:33 -0400 Message-Id: <20170823013333.40576-1-dharton@cisco.com> X-Mailer: git-send-email 2.10.3.dirty Subject: [dpdk-dev] [PATCH] ixgbe: initialize scattered_rx during dev_configure X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 --- 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. */