From patchwork Thu Aug 31 12:33:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruce Richardson X-Patchwork-Id: 130987 X-Patchwork-Delegate: qi.z.zhang@intel.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 311E241FDD; Thu, 31 Aug 2023 14:34:09 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C171B402A4; Thu, 31 Aug 2023 14:34:01 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.31]) by mails.dpdk.org (Postfix) with ESMTP id 00764402AF; Thu, 31 Aug 2023 14:33:59 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1693485240; x=1725021240; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=0ykNZp4Xvc4xhwK9ov4yoAGLKIKa0hcM5rLgSXACtq4=; b=N01XwsltVw5OgzfKK7vbW+zzXABgWi2v1n9ak6NMYSSes+Ngu7f/NZYF u9lGqsYZk3Bptia8sxX3lYdcQ4HohuqigwswWNSnfNUvNaSFFYVgdq9Ei UnyfPQaz6ShNVwYxwJq/gYlNC9cIsoLRpXMqjb6OuYwNu/T2hEhTU8IU3 PV6zWWR+WwsyRl1lPUHkhwLaaTG5WWk+VcKw/kTUdvH0QpWvssHf4TRC0 WWTllk6b53lF4NVrV2AbqgPS70FlFP9pXaLkjBc5jYVQ6d6cVGN60vPSn j8LGQfKp4lwnDrr5sBhrZ/yHmgC//jma+l/El5l74v8ZFqSNBi+xpfdyE A==; X-IronPort-AV: E=McAfee;i="6600,9927,10818"; a="439874007" X-IronPort-AV: E=Sophos;i="6.02,216,1688454000"; d="scan'208";a="439874007" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 Aug 2023 05:33:59 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10818"; a="913230956" X-IronPort-AV: E=Sophos;i="6.02,216,1688454000"; d="scan'208";a="913230956" Received: from silpixa00401385.ir.intel.com ([10.237.214.14]) by orsmga005.jf.intel.com with ESMTP; 31 Aug 2023 05:33:58 -0700 From: Bruce Richardson To: dev@dpdk.org Cc: Bruce Richardson , jingjing.wu@intel.com, stable@dpdk.org Subject: [PATCH v2 3/4] net/iavf: fix restart of Rx queue on reconfigure Date: Thu, 31 Aug 2023 13:33:36 +0100 Message-Id: <20230831123337.871496-4-bruce.richardson@intel.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230831123337.871496-1-bruce.richardson@intel.com> References: <20230830155919.592390-1-bruce.richardson@intel.com> <20230831123337.871496-1-bruce.richardson@intel.com> MIME-Version: 1.0 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org After reconfiguring an RX queue the mbuf_initializer value was not being correctly set. Fix this by calling the appropriate function if vector processing is enabled. This mirrors the behaviour by the i40e driver. Fixes: 319c421f3890 ("net/avf: enable SSE Rx Tx") Cc: jingjing.wu@intel.com Cc: stable@dpdk.org Signed-off-by: Bruce Richardson --- drivers/net/iavf/iavf_rxtx.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/net/iavf/iavf_rxtx.c b/drivers/net/iavf/iavf_rxtx.c index f7df4665d1..797cdda4b2 100644 --- a/drivers/net/iavf/iavf_rxtx.c +++ b/drivers/net/iavf/iavf_rxtx.c @@ -755,6 +755,13 @@ iavf_dev_rx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx, if (check_rx_vec_allow(rxq) == false) ad->rx_vec_allowed = false; +#if defined RTE_ARCH_X86 || defined RTE_ARCH_ARM + /* check vector conflict */ + if (ad->rx_vec_allowed && iavf_rxq_vec_setup(rxq)) { + PMD_DRV_LOG(ERR, "Failed vector rx setup."); + return -EINVAL; + } +#endif return 0; }