From patchwork Mon Oct 9 13:06:09 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fengjiang Liu X-Patchwork-Id: 132424 X-Patchwork-Delegate: maxime.coquelin@redhat.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 F24224233C; Mon, 9 Oct 2023 15:06:37 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8E17940282; Mon, 9 Oct 2023 15:06:37 +0200 (CEST) Received: from mail-pf1-f169.google.com (mail-pf1-f169.google.com [209.85.210.169]) by mails.dpdk.org (Postfix) with ESMTP id 7B5F14026B for ; Mon, 9 Oct 2023 15:06:35 +0200 (CEST) Received: by mail-pf1-f169.google.com with SMTP id d2e1a72fcca58-6969b391791so2962368b3a.3 for ; Mon, 09 Oct 2023 06:06:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance.com; s=google; t=1696856794; x=1697461594; darn=dpdk.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=OEmx4uFPZTxFErxkCaXiLM01LIiqzOtdK1PyjkFPKpU=; b=fh5YQt3qZ6fDwu0NEaKKW82GJur8QNazKLUCB3+0onXFeiKAozvsO4NBujIrPdUalU d9cR4oOwWBofKpH8QP4YT7KM6Tsmfwt5M1wroP7OUxuKXLqdytHAs3eKA9Vqk9iQZs3/ gZSChmgm+xT8A8jOpyRIY/RkrUqGV+n+8ZW1haD9eFti9+YPZylA6rOA+UokkCWAiHHy 8fQiZ72mLL4KiZPpIUNdZGvd1MbIwqDiYUhnqroADsz21HYFzpi0R+Zf2F+csEWqlZCo hK/b1MXdSTQEvx1Zor3cSo6yDsnr51ACvMBEETVQ+vxrwsoGwqPUUkkWEeV3OdVx3hk9 5Pig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696856794; x=1697461594; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=OEmx4uFPZTxFErxkCaXiLM01LIiqzOtdK1PyjkFPKpU=; b=MKbuxPzAuoijspoNRg9SGwTxgFQ3Czwl88rXUHQoV8trLusfA+GadwpmisGl13Lu/n v4OQs6Rq67p1KmBCgfHTPCldiaQqenIbxOxG3U/nnfeUnq0p5xSivxgdUw680hmpDXzy l93PG/SsscLJ/eZiR6RcnXRm+qquxlMyETcn1IcR+PTjXLcMSkDTEXenufO+HaiOHPk4 bXmDr/qUcVGgeDQjYuAUvcq56/C0MIwvcVDRqZ7SgqkgE4xJp7NFH7uKxhKHtTqtnSSR s+ckvGuirB/k2GSc6BzHl/29K4nWTJPOgeD/I1x0sBEvV4ZQd7yYpfUAy+1UXLBQX67f 7Skg== X-Gm-Message-State: AOJu0Yxbk9+QV/vCWcPlRhKLSue6AJHcE/J3bQPuYvW2RcQ8dcmVRrtx 028EELj4vR/RNYs34kkzZACRCMDzZiM4vFzn1txQftGy6Vo= X-Google-Smtp-Source: AGHT+IEVFf090XwrHqfTI93CORJswIyT52QDViJD5TfaoA0REUPMzZbGGQtoK/tKmO/ycxoMF/L1ug== X-Received: by 2002:a05:6a00:2293:b0:690:449f:5e96 with SMTP id f19-20020a056a00229300b00690449f5e96mr16185494pfe.33.1696856794372; Mon, 09 Oct 2023 06:06:34 -0700 (PDT) Received: from PF1D8Q29-ENF.inc.bytedance.com ([203.208.167.147]) by smtp.gmail.com with ESMTPSA id l3-20020a62be03000000b00688c733fe92sm6242815pff.215.2023.10.09.06.06.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Oct 2023 06:06:34 -0700 (PDT) From: "liufengjiang.0426" To: dev@dpdk.org Cc: maxime.coquelin@redhat.com, chenbo.xia@intel.com, zhangziqian.1@bytedance.com Subject: [PATCH] net/virtio: fixed missing next flag when sending packets in packed mode Date: Mon, 9 Oct 2023 21:06:09 +0800 Message-Id: <20231009130609.2987-1-liufengjiang.0426@bytedance.com> X-Mailer: git-send-email 2.37.0.windows.1 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 When the packets is sent in packed mode, and the packets data and virtio-header are divided into two desc, set the next flag of virtio-header desc Bugzilla ID: 1295 Fixes: 892dc798fa9c ("net/virtio: implement Tx path for packed queues") Signed-off-by: liufengjiang.0426 --- drivers/net/virtio/virtqueue.h | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/virtio/virtqueue.h b/drivers/net/virtio/virtqueue.h index 9d4aba11a3..4e9f2d0358 100644 --- a/drivers/net/virtio/virtqueue.h +++ b/drivers/net/virtio/virtqueue.h @@ -672,6 +672,7 @@ virtqueue_enqueue_xmit_packed(struct virtnet_tx *txvq, struct rte_mbuf *cookie, */ start_dp[idx].addr = txvq->hdr_mem + RTE_PTR_DIFF(&txr[idx].tx_hdr, txr); start_dp[idx].len = vq->hw->vtnet_hdr_size; + head_flags |= VRING_DESC_F_NEXT; hdr = (struct virtio_net_hdr *)&txr[idx].tx_hdr; idx++; if (idx >= vq->vq_nentries) {