netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jason Wang <jasowang@redhat.com>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next] tuntap: XDP_TX can use native XDP
Date: Fri, 16 Mar 2018 14:46:22 +0800	[thread overview]
Message-ID: <9b895dba-71bf-8053-610b-83ecb6d36879@redhat.com> (raw)
In-Reply-To: <20180315153150-mutt-send-email-mst@kernel.org>



On 2018年03月15日 21:32, Michael S. Tsirkin wrote:
> On Thu, Mar 15, 2018 at 04:39:25PM +0800, Jason Wang wrote:
>>
>> On 2018年03月14日 11:37, Michael S. Tsirkin wrote:
>>>>    			return NULL;
>>>>    		case XDP_TX:
>>>> -			xdp_xmit = true;
>>>> -			/* fall through */
>>>> +			get_page(alloc_frag->page);
>>>> +			alloc_frag->offset += buflen;
>>>> +			if (tun_xdp_xmit(tun->dev, &xdp))
>>>> +				goto err_redirect;
>>>> +			tun_xdp_flush(tun->dev);
>>> Why do we have to flush here though?
>>> It might be a good idea to document the reason in a code comment.
>>>
>> ndo_xdp_xmit() does not touch doorbell, so we need a ndo_xdp_flush() here.
>> It's the assumption of XDP API I think, so not sure it's worth to mention it
>> here.
>>
>> Thanks
> Can't one flush we called after multiple xmit calls?

We can and could be another patch on top. But I want to unify it with 
the batching of XDP_REDIRECT by e.g let vhost submit more than one 
packets through msg.control in sendmsg().

Thanks

  reply	other threads:[~2018-03-16  6:46 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-14  3:23 [PATCH net-next] tuntap: XDP_TX can use native XDP Jason Wang
2018-03-14  3:37 ` Michael S. Tsirkin
2018-03-15  8:39   ` Jason Wang
2018-03-15 13:32     ` Michael S. Tsirkin
2018-03-16  6:46       ` Jason Wang [this message]
2018-03-14 17:21 ` David Miller

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=9b895dba-71bf-8053-610b-83ecb6d36879@redhat.com \
    --to=jasowang@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mst@redhat.com \
    --cc=netdev@vger.kernel.org \
    /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).