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 83B74A034F for ; Wed, 10 Nov 2021 07:52:49 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7D6E040142; Wed, 10 Nov 2021 07:52:49 +0100 (CET) Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2041.outbound.protection.outlook.com [40.107.237.41]) by mails.dpdk.org (Postfix) with ESMTP id 58C0740142 for ; Wed, 10 Nov 2021 07:52:48 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=aSj6ToXVFGI/yfjOl7GijPdJbWtMi61jTiee5HT4EuV1+4Rt3AotdarXgyuZc6PC92A/p6J+eQOctEtfzm0CyrYZcuJVKQM7BHIbLz9UwJ3drpsWC3E+vfiSJ3BECEWjhYxLHWkrWsixwHsVUDVfnh5NinhVP64ji58p3/ZqZJ49QcicGbT6EMLmNQAoCxuWXdyOe/D2aht8T4S+pi4zX86UnGKhjPNIqD/929cr0he+1GZ3feYe8Nv6NfdpYMeRxCs9sGs+c27QqNQk0iJZAz95Uw+vMl5Wa+YuN4F0IDpkGyI8Zrq6/OQm1fJJydb51f1B+kPKAh7Z2DD4yezBeQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=OhmucJMOVAejbZdVleNqGAFzlEQaI28+Z9jutMR+AwM=; b=D70XcmIArPsN8/cFeHbcG5CgoPFwjS9+m8uvyqDd+QzrAhd/oKIIrWFLjeSdmhbMsyF2IXZX2zrltKekZ7HaXJVonzgRrlrsa6oONHoRSTDWoGmXEzBaIb0Oy1kiMR80FQpDNuDMuMUdnB4zkDHpttUpqPshT9Le5Us10Dq9Af72oPKmj63EPgluTKp2fvi+k2u1SGvTcbNbpM7Zjh0jQkKFh7dcCfEE70dLH1SwRu82W72UfRV6C+h0bkLTjWdBwSyqNSEflIGUCnR+sLikw1DV0NTT8pWLFjSn2J9e3LSKiGSbeDryEmobJ9PhKyQ8br8uWkgiBcGQx6cpeUKn2g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.112.34) smtp.rcpttodomain=redhat.com smtp.mailfrom=nvidia.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=OhmucJMOVAejbZdVleNqGAFzlEQaI28+Z9jutMR+AwM=; b=JKGvUqINGIyJEjHZrWR12V3VsAUMl2r5ARIM3SpjDEc3ihs9DLHzi687hGESvgDhIPxyW4DQcGJAGcB0lXDSbz5VbKBFrdvSE7lLiBEVqSDkoZLE+rP3jaINNYelRzn4OMk/ME5ccJv7astdLVns6RPf90LRzfrK1PMfhveMMDg1pS39gvxJRTw0Wm8+3lRzVbGp1QakoS17r23eO+z7jLfkx2EtjzZrMmBTW1Vt+NG0afCQUxVli7tWnoFtH//K3OuRQ0+XZeWRWkOuS/57hkYGAanjsD8JwJfS6QFnR6MPGs6JWBlbKHQx3DCiR3SGUowqlFDeMwzaoMU3oFv04A== Received: from BN9PR03CA0810.namprd03.prod.outlook.com (2603:10b6:408:13f::35) by CH0PR12MB5059.namprd12.prod.outlook.com (2603:10b6:610:e2::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4690.16; Wed, 10 Nov 2021 06:52:47 +0000 Received: from BN8NAM11FT016.eop-nam11.prod.protection.outlook.com (2603:10b6:408:13f:cafe::e8) by BN9PR03CA0810.outlook.office365.com (2603:10b6:408:13f::35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4669.11 via Frontend Transport; Wed, 10 Nov 2021 06:52:46 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.112.34) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.112.34 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.112.34; helo=mail.nvidia.com; Received: from mail.nvidia.com (216.228.112.34) by BN8NAM11FT016.mail.protection.outlook.com (10.13.176.97) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4690.15 via Frontend Transport; Wed, 10 Nov 2021 06:52:46 +0000 Received: from nvidia.com (172.20.187.6) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Wed, 10 Nov 2021 06:52:42 +0000 From: Xueming Li To: Xuan Ding CC: Luca Boccassi , Yinan Wang , Maxime Coquelin , dpdk stable Date: Wed, 10 Nov 2021 14:31:05 +0800 Message-ID: <20211110063216.2744012-182-xuemingl@nvidia.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211110063216.2744012-1-xuemingl@nvidia.com> References: <20211110063216.2744012-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [172.20.187.6] X-ClientProxiedBy: HQMAIL101.nvidia.com (172.20.187.10) To HQMAIL107.nvidia.com (172.20.187.13) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: df5f88a5-cb21-4856-15cb-08d9a416b401 X-MS-TrafficTypeDiagnostic: CH0PR12MB5059: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:10000; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: JYFLwJLCv4vxls+oVr4yfCKKhwKuhEzSNIt7kx0bnKSpDn+vToXhKmMvccjXgHIacB93RjUUvfHbRg/Qx1dnu98TYe4X3xn/QtM2usGxw13I+q94Q4JrlGpNCSp4PtzTW63wRCKqcRlt58paVQDbvm8+chfqzoy3dOYDjI3QU9vl3lw3JSCyBbhaDYRhQ1xXeBG6FwSX1ODrBCkntDgRqxuXbqycUpC/DawvIw51LJUw0d0XjxgFGruOACetXaETXKdluugMWM7FC4iqqlLauflfAFOiHPqQN3ME0+VAwRnnlFhzmEiKvFdryZWmTbQCHXZt7CjICdu2LgHYN5Rk2MgSo8qhG2tnMw3sPJb//gEhC9/N1h0rCCf3nBDb7niFgUGJrRsf0shhL+7ekF7hEzALGERYXklcoDZ6AxvA0PBRNfZUomrFKjJo0s1DJ148khlx3SauCW5Sc9nTaY33Hvh0yR93iaQNLKKuwEE4Tvw1Xd/XroF/RPA2ASXsqxnHqjWEay2iz8Txjkwi3dJbJVFR7qGAupimxAksZroMx2OqoOJLRSPNlkk4l1qaPQELy6mvKzgGkglIlZEr8WkIRjxDI5ts3dUmxcDerPTGpuy1V49DIOIqq62Rv0DX6kJtgUm0uBP/u3/pSoJ/V1ExpBRzAjD6e3m9UzWWLDW5q/thyghn1Z2edEiliNys9V1mfKj61oMSa0BVpMSeA38gC3kGXqlZUx63FGc5MiffC7X3vqs1zR7alP+WRMet/3b6nP82fNS6VmPGYIbYS8e8JFDyfA4FeaeWmoHiQ6vy1ecIzqrIoO891oXYM0d8Tw2vucFPd+Of4p3URP8hnlApLQ== X-Forefront-Antispam-Report: CIP:216.228.112.34; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:schybrid03.nvidia.com; CAT:NONE; SFS:(4636009)(46966006)(36840700001)(6666004)(186003)(8676002)(7696005)(4326008)(6286002)(70586007)(26005)(2906002)(16526019)(336012)(8936002)(426003)(508600001)(356005)(2616005)(1076003)(70206006)(966005)(53546011)(55016002)(47076005)(86362001)(7636003)(5660300002)(4001150100001)(6916009)(316002)(82310400003)(36756003)(54906003)(36860700001)(36906005); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Nov 2021 06:52:46.1973 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: df5f88a5-cb21-4856-15cb-08d9a416b401 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.112.34]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BN8NAM11FT016.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH0PR12MB5059 Subject: [dpdk-stable] patch 'net/virtio: fix indirect descriptor reconnection' has been queued to stable release 20.11.4 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 Sender: "stable" Hi, FYI, your patch has been queued to stable release 20.11.4 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/12/21. 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/steevenlee/dpdk This queued commit can be viewed at: https://github.com/steevenlee/dpdk/commit/d74c2896ad6d7fea73e3251bbabccd47c941ff42 Thanks. Xueming Li --- >From d74c2896ad6d7fea73e3251bbabccd47c941ff42 Mon Sep 17 00:00:00 2001 From: Xuan Ding Date: Wed, 13 Oct 2021 01:36:40 +0000 Subject: [PATCH] net/virtio: fix indirect descriptor reconnection Cc: Xueming Li [ upstream commit 04bcc80204db16ca77d1dd11a6ea1773214cc755 ] Add initialization for packed ring indirect descriptors in reconnection path. Fixes: 381f39ebb78a ("net/virtio: fix packed ring indirect descricptors setup") Signed-off-by: Xuan Ding Tested-by: Yinan Wang Reviewed-by: Maxime Coquelin --- drivers/net/virtio/virtqueue.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/drivers/net/virtio/virtqueue.c b/drivers/net/virtio/virtqueue.c index 2702e120ee..67eeb3701d 100644 --- a/drivers/net/virtio/virtqueue.c +++ b/drivers/net/virtio/virtqueue.c @@ -186,6 +186,8 @@ virtqueue_txvq_reset_packed(struct virtqueue *vq) struct vq_desc_extra *dxp; struct virtnet_tx *txvq; uint16_t desc_idx; + struct virtio_tx_region *txr; + struct vring_packed_desc *start_dp; vq->vq_used_cons_idx = 0; vq->vq_desc_head_idx = 0; @@ -198,6 +200,7 @@ virtqueue_txvq_reset_packed(struct virtqueue *vq) vq->vq_packed.event_flags_shadow = 0; txvq = &vq->txq; + txr = txvq->virtio_net_hdr_mz->addr; memset(txvq->mz->addr, 0, txvq->mz->len); memset(txvq->virtio_net_hdr_mz->addr, 0, txvq->virtio_net_hdr_mz->len); @@ -208,6 +211,17 @@ virtqueue_txvq_reset_packed(struct virtqueue *vq) rte_pktmbuf_free(dxp->cookie); dxp->cookie = NULL; } + + if (vtpci_with_feature(vq->hw, VIRTIO_RING_F_INDIRECT_DESC)) { + /* first indirect descriptor is always the tx header */ + start_dp = txr[desc_idx].tx_packed_indir; + vring_desc_init_indirect_packed(start_dp, + RTE_DIM(txr[desc_idx].tx_packed_indir)); + start_dp->addr = txvq->virtio_net_hdr_mem + + desc_idx * sizeof(*txr) + + offsetof(struct virtio_tx_region, tx_hdr); + start_dp->len = vq->hw->vtnet_hdr_size; + } } vring_desc_init_packed(vq, size); -- 2.33.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-11-10 14:17:09.965434773 +0800 +++ 0181-net-virtio-fix-indirect-descriptor-reconnection.patch 2021-11-10 14:17:01.990745109 +0800 @@ -1 +1 @@ -From 04bcc80204db16ca77d1dd11a6ea1773214cc755 Mon Sep 17 00:00:00 2001 +From d74c2896ad6d7fea73e3251bbabccd47c941ff42 Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit 04bcc80204db16ca77d1dd11a6ea1773214cc755 ] @@ -9,2 +12,2 @@ -Fixes: 381f39ebb78a ("net/virtio: fix packed ring indirect descricptors setup") -Cc: stable@dpdk.org +Fixes: 381f39ebb78a ("net/virtio: fix packed ring indirect descricptors +setup") @@ -20 +23 @@ -index 1f9af3c31b..65bf792eb0 100644 +index 2702e120ee..67eeb3701d 100644 @@ -45 +48 @@ -+ if (virtio_with_feature(vq->hw, VIRTIO_RING_F_INDIRECT_DESC)) { ++ if (vtpci_with_feature(vq->hw, VIRTIO_RING_F_INDIRECT_DESC)) {