From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 7E6E7A034C for ; Mon, 14 Mar 2022 10:39:11 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 724FB41147; Mon, 14 Mar 2022 10:39:11 +0100 (CET) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by mails.dpdk.org (Postfix) with ESMTP id 8BAA840DDD; Mon, 14 Mar 2022 10:39:08 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1647250749; x=1678786749; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=zALnOu8KCMR6CtNck2IbHWpqH6GUqbKXzy9stYmFAHk=; b=CvL5IGKFzEKFBMft5tGEq11mdwcr23pohA4cPdUTX8amKXVG+ZPXUlLE m2XO42c6uC16s3fOR1Pdc6F8xxALUMqnvDLlAhh+Di70IsoibJavpj2P7 l3rTIG8st4RzhixTl7iMBzf6hHZCrj2mQgbN25mDoNL0W7mR/yEYkbiFv TmqB3bohCszKa/GmiIlUZWMfY7AeIvq82+Bx/cfXL8k9GIh7dyUoPn5x+ J0tDk3onKITfG3flkAQ9JMMg/2BLx/Au20uJMof4WsQSzROVfmc2PE8my JTHLl8IeHXp/cFBNrNHaixyuMUGAw4myzYoud7cUQM53KEjGszVmWkYri w==; X-IronPort-AV: E=McAfee;i="6200,9189,10285"; a="236584091" X-IronPort-AV: E=Sophos;i="5.90,180,1643702400"; d="scan'208";a="236584091" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Mar 2022 02:39:07 -0700 X-IronPort-AV: E=Sophos;i="5.90,180,1643702400"; d="scan'208";a="556333272" Received: from intel-cd-odc-steve.cd.intel.com ([10.240.178.134]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Mar 2022 02:39:05 -0700 From: Steve Yang To: dev@dpdk.org Cc: jingjing.wu@intel.com, beilei.xing@intel.com, qi.z.zhang@intel.com, Steve Yang , stable@dpdk.org Subject: [PATCH v1] net/iavf: fix select wrong scan hw ring by rxdid Date: Mon, 14 Mar 2022 09:31:46 +0000 Message-Id: <20220314093146.697256-1-stevex.yang@intel.com> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org When setup RX queue, the rxdid would be changed if it's "IAVF_RXDID_LEGACY_0/1", that caused the scan hw ring used the wrong function 'iavf_rx_scan_hw_ring_flex_rxd()'. Ignore the rxdid changed when equals "IAVF_RXDID_LEGACY_0/1". Fixes: 0ed16e01313e ("net/iavf: fix function pointer in multi-process") Cc: stable@dpdk.org Signed-off-by: Steve Yang --- drivers/net/iavf/iavf_rxtx.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/net/iavf/iavf_rxtx.c b/drivers/net/iavf/iavf_rxtx.c index 16e8d021f9..3b16609f7d 100644 --- a/drivers/net/iavf/iavf_rxtx.c +++ b/drivers/net/iavf/iavf_rxtx.c @@ -477,6 +477,8 @@ iavf_rxd_to_pkt_fields_by_comms_aux_v2(struct iavf_rx_queue *rxq, static const iavf_rxd_to_pkt_fields_t rxd_to_pkt_fields_ops[IAVF_RXDID_LAST + 1] = { + [IAVF_RXDID_LEGACY_0] = iavf_rxd_to_pkt_fields_by_comms_ovs, + [IAVF_RXDID_LEGACY_1] = iavf_rxd_to_pkt_fields_by_comms_ovs, [IAVF_RXDID_COMMS_AUX_VLAN] = iavf_rxd_to_pkt_fields_by_comms_aux_v1, [IAVF_RXDID_COMMS_AUX_IPV4] = iavf_rxd_to_pkt_fields_by_comms_aux_v1, [IAVF_RXDID_COMMS_AUX_IPV6] = iavf_rxd_to_pkt_fields_by_comms_aux_v1, @@ -521,6 +523,8 @@ iavf_select_rxd_to_pkt_fields_handler(struct iavf_rx_queue *rxq, uint32_t rxdid) rte_pmd_ifd_dynflag_proto_xtr_ipsec_crypto_said_mask; break; case IAVF_RXDID_COMMS_OVS_1: + case IAVF_RXDID_LEGACY_0: + case IAVF_RXDID_LEGACY_1: break; default: /* update this according to the RXDID for FLEX_DESC_NONE */ -- 2.27.0