From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id E9299A04C3 for ; Fri, 22 Nov 2019 15:41:58 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id E1F4923D; Fri, 22 Nov 2019 15:41:58 +0100 (CET) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) by dpdk.org (Postfix) with ESMTP id 07C6591 for ; Fri, 22 Nov 2019 15:41:56 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1574433716; 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=4eva02K/BzMYvsnHNYNz27Yr3Q9QmtSsXkZt/TXkKcs=; b=CvXAw8FO1gp6cvwajkccsJNjT/EPRKpRWnaqj6H+Bl8xEE2JFpnUMBzGEouaFmaRMo0ABI M5AWbi9O/T0LoNSKbFui8jwONfr9kmT9yUUqcgtBd3O6mUiEcPrZQKsF3XGlBvdsvTyBQX MlrTnkzYVd5wm/H53fPGAl0Noukj7yQ= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-191-dKZD0mATNfi8yqVz2sRq6w-1; Fri, 22 Nov 2019 09:41:53 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id DED80107ACC7; Fri, 22 Nov 2019 14:41:51 +0000 (UTC) Received: from rh.redhat.com (unknown [10.36.118.60]) by smtp.corp.redhat.com (Postfix) with ESMTP id BFBEC6E713; Fri, 22 Nov 2019 14:41:50 +0000 (UTC) From: Kevin Traynor To: Xiao Zhang Cc: Beilei Xing , dpdk stable Date: Fri, 22 Nov 2019 14:40:50 +0000 Message-Id: <20191122144131.21231-4-ktraynor@redhat.com> In-Reply-To: <20191122144131.21231-1-ktraynor@redhat.com> References: <20191122144131.21231-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-MC-Unique: dKZD0mATNfi8yqVz2sRq6w-1 X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Subject: [dpdk-stable] patch 'net/i40e: fix VF runtime queues RSS config' has been queued to LTS release 18.11.6 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 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 Sender: "stable" Hi, FYI, your patch has been queued to LTS release 18.11.6 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/29/19. 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 rebasi= ng (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-queue This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable-queue/commit/87a7d973dc3bab38be= 39a6abd0c611ff549594b0 Thanks. Kevin. --- >From 87a7d973dc3bab38be39a6abd0c611ff549594b0 Mon Sep 17 00:00:00 2001 From: Xiao Zhang Date: Wed, 14 Aug 2019 06:17:45 +0800 Subject: [PATCH] net/i40e: fix VF runtime queues RSS config [ upstream commit 2da3ba7467955bce812f5f2c79c6c57859689bb6 ] I40evf queue can not work properly with kernel pf driver for X722 vf. Eg. when configure 8 queues pair, only 4 queues can receive packets, and half packets will be lost if using 2 queues pair. This issue is caused by misconfiguration of look up table, the original code of LUT configuration did not work for X722 vf, use aq command to setup the LUT to make it work properly. Fixes: cea7a51c1750 ("i40evf: support RSS") Acked-by: Beilei Xing Signed-off-by: Xiao Zhang --- drivers/net/i40e/i40e_ethdev_vf.c | 32 +++++++++++++++++++++++++------ 1 file changed, 26 insertions(+), 6 deletions(-) diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethd= ev_vf.c index 49bdeb329..0f7aa5a72 100644 --- a/drivers/net/i40e/i40e_ethdev_vf.c +++ b/drivers/net/i40e/i40e_ethdev_vf.c @@ -2527,5 +2527,8 @@ i40evf_config_rss(struct i40e_vf *vf) =09struct rte_eth_rss_conf rss_conf; =09uint32_t i, j, lut =3D 0, nb_q =3D (I40E_VFQF_HLUT_MAX_INDEX + 1) * 4; +=09uint32_t rss_lut_size =3D (I40E_VFQF_HLUT1_MAX_INDEX + 1) * 4; =09uint16_t num; +=09uint8_t *lut_info; +=09int ret; =20 =09if (vf->dev_data->dev_conf.rxmode.mq_mode !=3D ETH_MQ_RX_RSS) { @@ -2537,10 +2540,27 @@ i40evf_config_rss(struct i40e_vf *vf) =09num =3D RTE_MIN(vf->dev_data->nb_rx_queues, I40E_MAX_QP_NUM_PER_VF); =09/* Fill out the look up table */ -=09for (i =3D 0, j =3D 0; i < nb_q; i++, j++) { -=09=09if (j >=3D num) -=09=09=09j =3D 0; -=09=09lut =3D (lut << 8) | j; -=09=09if ((i & 3) =3D=3D 3) -=09=09=09I40E_WRITE_REG(hw, I40E_VFQF_HLUT(i >> 2), lut); +=09if (!(vf->flags & I40E_FLAG_RSS_AQ_CAPABLE)) { +=09=09for (i =3D 0, j =3D 0; i < nb_q; i++, j++) { +=09=09=09if (j >=3D num) +=09=09=09=09j =3D 0; +=09=09=09lut =3D (lut << 8) | j; +=09=09=09if ((i & 3) =3D=3D 3) +=09=09=09=09I40E_WRITE_REG(hw, I40E_VFQF_HLUT(i >> 2), lut); +=09=09} +=09} else { +=09=09lut_info =3D rte_zmalloc("i40e_rss_lut", rss_lut_size, 0); +=09=09if (!lut_info) { +=09=09=09PMD_DRV_LOG(ERR, "No memory can be allocated"); +=09=09=09return -ENOMEM; +=09=09} + +=09=09for (i =3D 0; i < rss_lut_size; i++) +=09=09=09lut_info[i] =3D i % vf->num_queue_pairs; + +=09=09ret =3D i40evf_set_rss_lut(&vf->vsi, lut_info, +=09=09=09=09=09 rss_lut_size); +=09=09rte_free(lut_info); +=09=09if (ret) +=09=09=09return ret; =09} =20 --=20 2.21.0 --- Diff of the applied patch vs upstream commit (please double-check if non-= empty: --- --- -=092019-11-22 14:36:55.434465970 +0000 +++ 0004-net-i40e-fix-VF-runtime-queues-RSS-config.patch=092019-11-22 14:36= :55.116151017 +0000 @@ -1 +1 @@ -From 2da3ba7467955bce812f5f2c79c6c57859689bb6 Mon Sep 17 00:00:00 2001 +From 87a7d973dc3bab38be39a6abd0c611ff549594b0 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 2da3ba7467955bce812f5f2c79c6c57859689bb6 ] + @@ -15 +16,0 @@ -Cc: stable@dpdk.org @@ -24 +25 @@ -index 308fb9835..c77b30c54 100644 +index 49bdeb329..0f7aa5a72 100644 @@ -27 +28 @@ -@@ -2599,5 +2599,8 @@ i40evf_config_rss(struct i40e_vf *vf) +@@ -2527,5 +2527,8 @@ i40evf_config_rss(struct i40e_vf *vf) @@ -36 +37 @@ -@@ -2609,10 +2612,27 @@ i40evf_config_rss(struct i40e_vf *vf) +@@ -2537,10 +2540,27 @@ i40evf_config_rss(struct i40e_vf *vf)