From: "Tan, Jianfeng" <jianfeng.tan@intel.com>
To: Olivier Matz <olivier.matz@6wind.com>,
"dev@dpdk.org" <dev@dpdk.org>,
"Xie, Huawei" <huawei.xie@intel.com>,
"yuanhan.liu@linux.intel.com" <yuanhan.liu@linux.intel.com>
Subject: Re: [dpdk-dev] [PATCH] virtio: fix packet corruption
Date: Tue, 19 Jul 2016 13:03:02 +0000 [thread overview]
Message-ID: <ED26CBA2FAD1BF48A8719AEF02201E361062162F@SHSMSX103.ccr.corp.intel.com> (raw)
In-Reply-To: <1468931519-7381-1-git-send-email-olivier.matz@6wind.com>
Hi Oliver,
> -----Original Message-----
> From: Olivier Matz [mailto:olivier.matz@6wind.com]
> Sent: Tuesday, July 19, 2016 8:32 PM
> To: dev@dpdk.org; Tan, Jianfeng; Xie, Huawei; yuanhan.liu@linux.intel.com
> Subject: [PATCH] virtio: fix packet corruption
>
> The support of virtio-user changed the way the mbuf dma address is
> retrieved, using a physical address in case of virtio-pci and a virtual
> address in case of virtio-user.
>
> This change introduced some possible memory corruption in packets,
> replacing:
> m->buf_physaddr + RTE_PKTMBUF_HEADROOM
> by:
> m->buf_physaddr + m->data_off (through a macro)
>
> This patch fixes this issue, restoring the original behavior.
Could you be more specific on why we cannot use m->data_off here?
Thanks,
Jianfeng
>
> By the way, it also rework the macros, adding a "VIRTIO_" prefix and
> API comments.
>
> Fixes: f24f8f9fee8a ("net/virtio: allow virtual address to fill vring descriptors")
>
> Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
> ---
> drivers/net/virtio/virtio_ethdev.c | 2 +-
> drivers/net/virtio/virtio_rxtx.c | 5 +++--
> drivers/net/virtio/virtio_rxtx_simple.c | 13 +++++++------
> drivers/net/virtio/virtqueue.h | 25 +++++++++++++++++--------
> 4 files changed, 28 insertions(+), 17 deletions(-)
>
next prev parent reply other threads:[~2016-07-19 13:03 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-19 12:31 Olivier Matz
2016-07-19 13:03 ` Tan, Jianfeng [this message]
2016-07-19 13:11 ` Olivier Matz
2016-07-19 13:57 ` Tan, Jianfeng
2016-07-19 13:59 ` Olivier Matz
2016-07-19 14:23 ` Tan, Jianfeng
2016-07-21 8:28 ` Yuanhan Liu
2016-07-21 22:28 ` Thomas Monjalon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ED26CBA2FAD1BF48A8719AEF02201E361062162F@SHSMSX103.ccr.corp.intel.com \
--to=jianfeng.tan@intel.com \
--cc=dev@dpdk.org \
--cc=huawei.xie@intel.com \
--cc=olivier.matz@6wind.com \
--cc=yuanhan.liu@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).