[dpdk-dev] [PATCH] net/virtio: fix mbuf data and pkt length mismatch

Liu, Yong yong.liu at intel.com
Tue Sep 24 06:53:19 CEST 2019


> -----Original Message-----
> From: Stephen Hemminger [mailto:stephen at networkplumber.org]
> Sent: Monday, September 23, 2019 11:22 PM
> To: Liu, Yong <yong.liu at intel.com>
> Cc: maxime.coquelin at redhat.com; Bie, Tiwei <tiwei.bie at intel.com>; Wang,
> Zhihong <zhihong.wang at intel.com>; dev at dpdk.org; stable at dpdk.org
> Subject: Re: [PATCH] net/virtio: fix mbuf data and pkt length mismatch
> 
> On Mon, 23 Sep 2019 22:05:11 +0800
> Marvin Liu <yong.liu at intel.com> 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 at dpdk.org
> >
> > Reported-by: Stephen Hemminger <stephen at networkplumber.org>
> > Signed-off-by: Marvin Liu <yong.liu at intel.com>
> 
> 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


More information about the dev mailing list