lkml.org 
[lkml]   [2018]   [Mar]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH net-next] tuntap: XDP_TX can use native XDP
From
Date


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

\
 
 \ /
  Last update: 2018-03-15 09:40    [W:0.063 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site