netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jason Wang <jasowang@redhat.com>
To: Mat Martineau <mathew.j.martineau@linux.intel.com>,
	Xuan Zhuo <xuanzhuo@linux.alibaba.com>
Cc: netdev@vger.kernel.org,
	virtualization@lists.linux-foundation.org,
	"David S. Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>,
	"Michael S. Tsirkin" <mst@redhat.com>
Subject: Re: [PATCH net-next v3] virtio-net: page_to_skb() use build_skb when there's sufficient tailroom
Date: Tue, 20 Apr 2021 10:41:03 +0800	[thread overview]
Message-ID: <87e01595-de5f-bf52-5769-1d05a455b62b@redhat.com> (raw)
In-Reply-To: <aa55b487-44bb-1596-d310-9b74b9ba47fe@redhat.com>


在 2021/4/20 上午10:38, Jason Wang 写道:
>>> :
>>> +    /* hdr_valid means no XDP, so we can copy the vnet header */
>>> +    if (hdr_valid) {
>>> +        hdr = skb_vnet_hdr(skb);
>>> +        memcpy(hdr, hdr_p, hdr_len);
>>
>> and hdr_p is dereferenced here.
>
>
> Right, I tend to recover the way to copy hdr and set meta just after 
> alloc/build_skb().
>
> Thanks 


Btw, since the patch modifies a critical path of virtio-net I suggest to 
test the following cases:

1) netperf TCP stream
2) netperf UDP with packet size from 64 to PAGE_SIZE
3) XDP_PASS with 1)
4) XDP_PASS with 2)
5) XDP metadata with 1)
6) XDP metadata with 2)

Thanks


  reply	other threads:[~2021-04-20  2:41 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-16  9:16 [PATCH net-next v3] virtio-net: page_to_skb() use build_skb when there's sufficient tailroom Xuan Zhuo
2021-04-19  3:10 ` Jason Wang
2021-04-19 16:48 ` David Ahern
2021-04-20  2:49   ` Jason Wang
2021-04-19 23:29 ` Mat Martineau
2021-04-20  2:38   ` Jason Wang
2021-04-20  2:41     ` Jason Wang [this message]
2021-04-20  9:28 ` Eric Dumazet
2021-04-22 11:13 ` Ido Schimmel
     [not found]   ` <1619093551.9680612-1-xuanzhuo@linux.alibaba.com>
2021-04-22 12:55     ` Ido Schimmel
     [not found] <1618922142.0493622-1-xuanzhuo@linux.alibaba.com>
2021-04-21  3:26 ` Jason Wang
     [not found] <1619491565.7682261-1-xuanzhuo@linux.alibaba.com>
2021-04-28  1:21 ` Jason Wang

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=87e01595-de5f-bf52-5769-1d05a455b62b@redhat.com \
    --to=jasowang@redhat.com \
    --cc=davem@davemloft.net \
    --cc=kuba@kernel.org \
    --cc=mathew.j.martineau@linux.intel.com \
    --cc=mst@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=virtualization@lists.linux-foundation.org \
    --cc=xuanzhuo@linux.alibaba.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).