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 5122BA0613 for ; Tue, 24 Sep 2019 06:53:28 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 70119397D; Tue, 24 Sep 2019 06:53:26 +0200 (CEST) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id 038492C23; Tue, 24 Sep 2019 06:53:23 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 23 Sep 2019 21:53:22 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,542,1559545200"; d="scan'208";a="193322706" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by orsmga006.jf.intel.com with ESMTP; 23 Sep 2019 21:53:22 -0700 Received: from fmsmsx116.amr.corp.intel.com (10.18.116.20) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 23 Sep 2019 21:53:22 -0700 Received: from shsmsx152.ccr.corp.intel.com (10.239.6.52) by fmsmsx116.amr.corp.intel.com (10.18.116.20) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 23 Sep 2019 21:53:22 -0700 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.140]) by SHSMSX152.ccr.corp.intel.com ([169.254.6.132]) with mapi id 14.03.0439.000; Tue, 24 Sep 2019 12:53:20 +0800 From: "Liu, Yong" To: Stephen Hemminger CC: "maxime.coquelin@redhat.com" , "Bie, Tiwei" , "Wang, Zhihong" , "dev@dpdk.org" , "stable@dpdk.org" Thread-Topic: [PATCH] net/virtio: fix mbuf data and pkt length mismatch Thread-Index: AQHVcdd8hd51IW1QbUeHhgpYlG5yzac4234AgAFoaZA= Date: Tue, 24 Sep 2019 04:53:19 +0000 Message-ID: <86228AFD5BCD8E4EBFD2B90117B5E81E633AA39A@SHSMSX103.ccr.corp.intel.com> References: <20190923140511.107939-1-yong.liu@intel.com> <20190923082200.463f8d9b@hermes.lan> In-Reply-To: <20190923082200.463f8d9b@hermes.lan> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiY2NlYTc5OGItYzQ0Ni00MjA0LTg1MzMtZDcyYjNkYWU1MWM2IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiSXJaQW5TcXp6OTlPb0htZlBPOWk5M0kwVlMwOW5GWjhxNGp6ZFZtUTdwbE56N2poWUQzK3ptVjM1R2QxMjdFdSJ9 x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.2.0.6 dlp-reaction: no-action x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 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" > -----Original Message----- > From: Stephen Hemminger [mailto:stephen@networkplumber.org] > Sent: Monday, September 23, 2019 11:22 PM > To: Liu, Yong > Cc: maxime.coquelin@redhat.com; Bie, Tiwei ; Wang, > Zhihong ; dev@dpdk.org; stable@dpdk.org > Subject: Re: [PATCH] net/virtio: fix mbuf data and pkt length mismatch >=20 > On Mon, 23 Sep 2019 22:05:11 +0800 > Marvin Liu wrote: >=20 > > 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 >=20 > Looks good, for current code. > Won't apply cleanly to 18.11. Could you send a version for that as well? Thanks for reviewing, version for 18.11 has sent to stable mailing list. Regards, Marvin