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 7339CA0555 for ; Thu, 9 Jun 2022 13:38:31 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6C2F94281A; Thu, 9 Jun 2022 13:38:31 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id 0E7DA40220 for ; Thu, 9 Jun 2022 13:38:29 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1654774709; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=zCOhlXKUuVsnGcoJExW40TtoYbL0Xl19FVEc27RKR40=; b=FUCVN7vgAnW9YM+aGFkR89JM3xfAfju9RvSRtMe5T8jpPQq2weEQSwLXNdrzZFkJUcQZu8 uggkuNcbda7tj5e2BvpikXTfsFOokZq7b1lnIhK5z1Xy20sWv9plF2jCaT7+s/wk3ijuWL a2r6+f99EVnCndNRnz9QjHCTk8RpR0A= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-483-FPSWMj0WOGqfsoKyTebHeg-1; Thu, 09 Jun 2022 07:38:26 -0400 X-MC-Unique: FPSWMj0WOGqfsoKyTebHeg-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 57C933C025B1; Thu, 9 Jun 2022 11:38:26 +0000 (UTC) Received: from rh.redhat.com (unknown [10.39.195.82]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7B3F318EAB; Thu, 9 Jun 2022 11:38:25 +0000 (UTC) From: Kevin Traynor To: Yiding Zhou Cc: Qi Zhang , dpdk stable Subject: patch 'net/iavf: fix data path selection' has been queued to stable release 21.11.2 Date: Thu, 9 Jun 2022 12:36:42 +0100 Message-Id: <20220609113701.386938-55-ktraynor@redhat.com> In-Reply-To: <20220609113701.386938-1-ktraynor@redhat.com> References: <20220609113701.386938-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=ktraynor@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true 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 Hi, FYI, your patch has been queued to stable release 21.11.2 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 06/13/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/83d787cc30f2114c8a8686f7fbe7b31d6bfbfb89 Thanks. Kevin --- >From 83d787cc30f2114c8a8686f7fbe7b31d6bfbfb89 Mon Sep 17 00:00:00 2001 From: Yiding Zhou Date: Sun, 8 May 2022 03:52:39 +0800 Subject: [PATCH] net/iavf: fix data path selection [ upstream commit 865df516f931827580f00e65f246f49838c722bb ] If PF driver don't support a flex Rx descriptor that required by VF, legacy descriptor format will be negotiated to configure the hardware queue. The patch fixes the issue that an Rx data path that handle flexible descriptor (e.g.: iavf_recv_scattered_pkts_vec_avx512_flex_rxd) is selected while the actual hardware queues are configured as legacy due to above scenario, which will cause following coredump. Fixes: 12b435bf8f2f ("net/iavf: support flex desc metadata extraction") Signed-off-by: Yiding Zhou Acked-by: Qi Zhang --- drivers/net/iavf/iavf_rxtx.c | 29 +++++++++++++++++++---------- 1 file changed, 19 insertions(+), 10 deletions(-) diff --git a/drivers/net/iavf/iavf_rxtx.c b/drivers/net/iavf/iavf_rxtx.c index ede6c21668..4c8007043a 100644 --- a/drivers/net/iavf/iavf_rxtx.c +++ b/drivers/net/iavf/iavf_rxtx.c @@ -2797,12 +2797,25 @@ iavf_set_rx_function(struct rte_eth_dev *dev) IAVF_DEV_PRIVATE_TO_ADAPTER(dev->data->dev_private); struct iavf_info *vf = IAVF_DEV_PRIVATE_TO_VF(dev->data->dev_private); - -#ifdef RTE_ARCH_X86 - struct iavf_rx_queue *rxq; int i; + struct iavf_rx_queue *rxq; + bool use_flex = true; + + for (i = 0; i < dev->data->nb_rx_queues; i++) { + rxq = dev->data->rx_queues[i]; + if (rxq->rxdid <= IAVF_RXDID_LEGACY_1) { + PMD_DRV_LOG(NOTICE, "request RXDID[%d] in Queue[%d] is legacy, " + "set rx_pkt_burst as legacy for all queues", rxq->rxdid, i); + use_flex = false; + } else if (!(vf->supported_rxdid & BIT(rxq->rxdid))) { + PMD_DRV_LOG(NOTICE, "request RXDID[%d] in Queue[%d] is not supported, " + "set rx_pkt_burst as legacy for all queues", rxq->rxdid, i); + use_flex = false; + } + } + +#ifdef RTE_ARCH_X86 int check_ret; bool use_avx2 = false; bool use_avx512 = false; - bool use_flex = false; check_ret = iavf_rx_vec_dev_check(dev); @@ -2821,8 +2834,4 @@ iavf_set_rx_function(struct rte_eth_dev *dev) #endif - if (vf->vf_res->vf_cap_flags & - VIRTCHNL_VF_OFFLOAD_RX_FLEX_DESC) - use_flex = true; - for (i = 0; i < dev->data->nb_rx_queues; i++) { rxq = dev->data->rx_queues[i]; @@ -2928,5 +2937,5 @@ iavf_set_rx_function(struct rte_eth_dev *dev) PMD_DRV_LOG(DEBUG, "Using a Scattered Rx callback (port=%d).", dev->data->port_id); - if (vf->vf_res->vf_cap_flags & VIRTCHNL_VF_OFFLOAD_RX_FLEX_DESC) + if (use_flex) dev->rx_pkt_burst = iavf_recv_scattered_pkts_flex_rxd; else @@ -2939,5 +2948,5 @@ iavf_set_rx_function(struct rte_eth_dev *dev) PMD_DRV_LOG(DEBUG, "Using Basic Rx callback (port=%d).", dev->data->port_id); - if (vf->vf_res->vf_cap_flags & VIRTCHNL_VF_OFFLOAD_RX_FLEX_DESC) + if (use_flex) dev->rx_pkt_burst = iavf_recv_pkts_flex_rxd; else -- 2.34.3 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-06-09 12:34:31.025932177 +0100 +++ 0055-net-iavf-fix-data-path-selection.patch 2022-06-09 12:34:29.772980687 +0100 @@ -1 +1 @@ -From 865df516f931827580f00e65f246f49838c722bb Mon Sep 17 00:00:00 2001 +From 83d787cc30f2114c8a8686f7fbe7b31d6bfbfb89 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 865df516f931827580f00e65f246f49838c722bb ] + @@ -17 +18,0 @@ -Cc: stable@dpdk.org @@ -26 +27 @@ -index 345f6aeebc..d3b1a58b27 100644 +index ede6c21668..4c8007043a 100644 @@ -29 +30 @@ -@@ -2900,12 +2900,25 @@ iavf_set_rx_function(struct rte_eth_dev *dev) +@@ -2797,12 +2797,25 @@ iavf_set_rx_function(struct rte_eth_dev *dev) @@ -59 +60 @@ -@@ -2924,8 +2937,4 @@ iavf_set_rx_function(struct rte_eth_dev *dev) +@@ -2821,8 +2834,4 @@ iavf_set_rx_function(struct rte_eth_dev *dev) @@ -68 +69 @@ -@@ -3031,5 +3040,5 @@ iavf_set_rx_function(struct rte_eth_dev *dev) +@@ -2928,5 +2937,5 @@ iavf_set_rx_function(struct rte_eth_dev *dev) @@ -75 +76 @@ -@@ -3042,5 +3051,5 @@ iavf_set_rx_function(struct rte_eth_dev *dev) +@@ -2939,5 +2948,5 @@ iavf_set_rx_function(struct rte_eth_dev *dev)