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 238B6A0613 for ; Mon, 23 Sep 2019 17:22:09 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 06A561BEFD; Mon, 23 Sep 2019 17:22:08 +0200 (CEST) Received: from mail-pg1-f196.google.com (mail-pg1-f196.google.com [209.85.215.196]) by dpdk.org (Postfix) with ESMTP id EDDB51BEFD for ; Mon, 23 Sep 2019 17:22:06 +0200 (CEST) Received: by mail-pg1-f196.google.com with SMTP id i30so2452694pgl.0 for ; Mon, 23 Sep 2019 08:22:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=I/i7LhpoSCfLiVUn5C1uJnmAaGkQ0JgckYszz3ooKRw=; b=UqQTlshRONnZm0oIvc4i5yusG25UTNZesGr1D2YY6nEQFabs3LpS//goLyj9vn6wNS wSkckqffAyDnVnCuYO6iHP/q8yOd+6cTXFV8GPIH0omhWuD8pd8nc3uuwNaOa3KKZRVG ihtgTVa6e8vmWJWzaW3VzF0BCgUJ+X0kkr3NFElv6VsoLCd24skcIKlI5G0010FH9ryT FojGVQxZgTznntf9h9rsZrhGFELc0itA3Zro0bQihiEYpE3wAB7SDzbQd4CH4w3QQ2kW C4DcHyAWzSjItAkUxMKbpIjFdex9mtO7HUFPITT8qrTfqL0IJGCuUQXT05OY/8MShjJT 3hrw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=I/i7LhpoSCfLiVUn5C1uJnmAaGkQ0JgckYszz3ooKRw=; b=D6EVC0gUQ8GDZRbuHHvEqMntCR60nC9QNDT4SEsySONzUSVc5x2FevnWdTaZYRYyLY FiGpC46bW0SiBBFRZgjcd1oJrbjv/mhvq+IRlsJqC4myxZfvks0Cqzopgc0WfrMixobH Bc/Vg0d9Zk5l4xfTudAXfe6nDXcgz1uCjWjjseAgl1kVVoDsVthmWjBPOaPIFLlpVlT9 +kj15mC8h2Wfw97NBx5IGfRWZLr0nnIb4C20wLoL0DLmJPDl+I87q/X14w7lstai8g/R 6dZxqJjVfWlFHwEYQHeKM667oHW2qDs1YDTMMX9DlnVR84N/O2KGR1WSO45/4t9B3dKX fuDA== X-Gm-Message-State: APjAAAXhU4n+l4dioe4Nr2K8ClS+iwIZAJ6+EvVmPdoHJIe7iXhvafg7 UQnrO701XYWT2f4Hj8vg93AfUQ== X-Google-Smtp-Source: APXvYqywIaj+3eSDRv+KCVx/kKHgRAfgMlgv4HfTFuygx4eDjGiXGcssEOsNF9VKF5slhumYOJreSw== X-Received: by 2002:a63:4b5e:: with SMTP id k30mr487570pgl.408.1569252125955; Mon, 23 Sep 2019 08:22:05 -0700 (PDT) Received: from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id r2sm14430779pfq.60.2019.09.23.08.22.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Sep 2019 08:22:05 -0700 (PDT) Date: Mon, 23 Sep 2019 08:22:00 -0700 From: Stephen Hemminger To: Marvin Liu Cc: maxime.coquelin@redhat.com, tiwei.bie@intel.com, zhihong.wang@intel.com, dev@dpdk.org, stable@dpdk.org Message-ID: <20190923082200.463f8d9b@hermes.lan> In-Reply-To: <20190923140511.107939-1-yong.liu@intel.com> References: <20190923140511.107939-1-yong.liu@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH] net/virtio: fix mbuf data and pkt length mismatch X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Mon, 23 Sep 2019 22:05:11 +0800 Marvin Liu wrote: > If reserve virtio header room by function rte_pktmbuf_prepend, both > segment data length and packet length of mbuf will be increased. > Data length will be equal to descriptor length, while packet length > should be decreased as virtio-net header won't be taken into packet. > Thus will cause mismatch in mbuf structure. Fix this issue by access > mbuf data directly and increase descriptor length if it is needed. > > Fixes: 58169a9c8153 ("net/virtio: support Tx checksum offload") > Fixes: 892dc798fa9c ("net/virtio: implement Tx path for packed queues") > Fixes: 4905ed3a523f ("net/virtio: optimize Tx enqueue for packed ring") > Fixes: e5f456a98d3c ("net/virtio: support in-order Rx and Tx") > Cc: stable@dpdk.org > > Reported-by: Stephen Hemminger > Signed-off-by: Marvin Liu Looks good, for current code. Won't apply cleanly to 18.11. Could you send a version for that as well?