search for: tun_can_build_skb

Displaying 18 results from an estimated 18 matches for "tun_can_build_skb".

2018 Jul 02
2
[PATCH vhost] vhost_net: Fix too many vring kick on busypoll
...t;> For some reason zerocopy was not applied for most packets, so in most >> cases driver XDP was used. I was going to dig into it but not yet. > > Right, just to confirm this. This is expected. > > In tuntap, we do native XDP only for small and non zerocopy packets. See > tun_can_build_skb(). The reason is XDP may adjust packet header which is > not supported by zercopy. We can only use XDP generic for zerocopy in > this case. I think I understand when driver XDP can be used. What I'm not sure and was going to narrow down is why zerocopy is mostly not applied. -- Toshiak...
2018 Jul 02
2
[PATCH vhost] vhost_net: Fix too many vring kick on busypoll
...t;> For some reason zerocopy was not applied for most packets, so in most >> cases driver XDP was used. I was going to dig into it but not yet. > > Right, just to confirm this. This is expected. > > In tuntap, we do native XDP only for small and non zerocopy packets. See > tun_can_build_skb(). The reason is XDP may adjust packet header which is > not supported by zercopy. We can only use XDP generic for zerocopy in > this case. I think I understand when driver XDP can be used. What I'm not sure and was going to narrow down is why zerocopy is mostly not applied. -- Toshiak...
2018 Jul 02
2
[PATCH vhost] vhost_net: Fix too many vring kick on busypoll
...as not applied for most packets, so in most >>>> cases driver XDP was used. I was going to dig into it but not yet. >>> Right, just to confirm this. This is expected. >>> >>> In tuntap, we do native XDP only for small and non zerocopy packets. See >>> tun_can_build_skb(). The reason is XDP may adjust packet header which is >>> not supported by zercopy. We can only use XDP generic for zerocopy in >>> this case. >> I think I understand when driver XDP can be used. What I'm not sure and >> was going to narrow down is why zerocopy is...
2018 Jul 02
2
[PATCH vhost] vhost_net: Fix too many vring kick on busypoll
...as not applied for most packets, so in most >>>> cases driver XDP was used. I was going to dig into it but not yet. >>> Right, just to confirm this. This is expected. >>> >>> In tuntap, we do native XDP only for small and non zerocopy packets. See >>> tun_can_build_skb(). The reason is XDP may adjust packet header which is >>> not supported by zercopy. We can only use XDP generic for zerocopy in >>> this case. >> I think I understand when driver XDP can be used. What I'm not sure and >> was going to narrow down is why zerocopy is...
2018 Jul 02
1
[PATCH vhost] vhost_net: Fix too many vring kick on busypoll
...gt;> cases driver XDP was used. I was going to dig into it but not yet. >>>>> Right, just to confirm this. This is expected. >>>>> >>>>> In tuntap, we do native XDP only for small and non zerocopy >>>>> packets. See >>>>> tun_can_build_skb(). The reason is XDP may adjust packet header >>>>> which is >>>>> not supported by zercopy. We can only use XDP generic for zerocopy in >>>>> this case. >>>> I think I understand when driver XDP can be used. What I'm not sure and >&gt...
2018 Sep 06
2
[PATCH net-next 06/11] tuntap: split out XDP logic
...+++++++++++++++++++------------------- > 1 file changed, 51 insertions(+), 33 deletions(-) > > diff --git a/drivers/net/tun.c b/drivers/net/tun.c > index 389aa0727cc6..21b125020b3b 100644 > --- a/drivers/net/tun.c > +++ b/drivers/net/tun.c > @@ -1635,6 +1635,44 @@ static bool tun_can_build_skb(struct tun_struct *tun, struct tun_file *tfile, > return true; > } > > +static u32 tun_do_xdp(struct tun_struct *tun, > + struct tun_file *tfile, > + struct bpf_prog *xdp_prog, > + struct xdp_buff *xdp, > + int *err) > +{ > + u32 act =...
2018 Sep 06
2
[PATCH net-next 06/11] tuntap: split out XDP logic
...+++++++++++++++++++------------------- > 1 file changed, 51 insertions(+), 33 deletions(-) > > diff --git a/drivers/net/tun.c b/drivers/net/tun.c > index 389aa0727cc6..21b125020b3b 100644 > --- a/drivers/net/tun.c > +++ b/drivers/net/tun.c > @@ -1635,6 +1635,44 @@ static bool tun_can_build_skb(struct tun_struct *tun, struct tun_file *tfile, > return true; > } > > +static u32 tun_do_xdp(struct tun_struct *tun, > + struct tun_file *tfile, > + struct bpf_prog *xdp_prog, > + struct xdp_buff *xdp, > + int *err) > +{ > + u32 act =...
2018 Jul 02
0
[PATCH vhost] vhost_net: Fix too many vring kick on busypoll
...me reason zerocopy was not applied for most packets, so in most >>> cases driver XDP was used. I was going to dig into it but not yet. >> Right, just to confirm this. This is expected. >> >> In tuntap, we do native XDP only for small and non zerocopy packets. See >> tun_can_build_skb(). The reason is XDP may adjust packet header which is >> not supported by zercopy. We can only use XDP generic for zerocopy in >> this case. > I think I understand when driver XDP can be used. What I'm not sure and > was going to narrow down is why zerocopy is mostly not appl...
2018 Sep 06
0
[PATCH net-next 06/11] tuntap: split out XDP logic
...- drivers/net/tun.c | 84 ++++++++++++++++++++++++++++------------------- 1 file changed, 51 insertions(+), 33 deletions(-) diff --git a/drivers/net/tun.c b/drivers/net/tun.c index 389aa0727cc6..21b125020b3b 100644 --- a/drivers/net/tun.c +++ b/drivers/net/tun.c @@ -1635,6 +1635,44 @@ static bool tun_can_build_skb(struct tun_struct *tun, struct tun_file *tfile, return true; } +static u32 tun_do_xdp(struct tun_struct *tun, + struct tun_file *tfile, + struct bpf_prog *xdp_prog, + struct xdp_buff *xdp, + int *err) +{ + u32 act = bpf_prog_run_xdp(xdp_prog, xdp); + + switch (act)...
2018 Jul 02
0
[PATCH vhost] vhost_net: Fix too many vring kick on busypoll
...ost packets, so in most >>>>> cases driver XDP was used. I was going to dig into it but not yet. >>>> Right, just to confirm this. This is expected. >>>> >>>> In tuntap, we do native XDP only for small and non zerocopy packets. See >>>> tun_can_build_skb(). The reason is XDP may adjust packet header which is >>>> not supported by zercopy. We can only use XDP generic for zerocopy in >>>> this case. >>> I think I understand when driver XDP can be used. What I'm not sure and >>> was going to narrow down is...
2018 Sep 07
0
[PATCH net-next 06/11] tuntap: split out XDP logic
...---------- >> 1 file changed, 51 insertions(+), 33 deletions(-) >> >> diff --git a/drivers/net/tun.c b/drivers/net/tun.c >> index 389aa0727cc6..21b125020b3b 100644 >> --- a/drivers/net/tun.c >> +++ b/drivers/net/tun.c >> @@ -1635,6 +1635,44 @@ static bool tun_can_build_skb(struct tun_struct *tun, struct tun_file *tfile, >> return true; >> } >> >> +static u32 tun_do_xdp(struct tun_struct *tun, >> + struct tun_file *tfile, >> + struct bpf_prog *xdp_prog, >> + struct xdp_buff *xdp, >> +...
2018 Jul 02
2
[PATCH vhost] vhost_net: Fix too many vring kick on busypoll
Hi Jason, On 2018/06/29 18:30, Jason Wang wrote: > On 2018?06?29? 16:09, Toshiaki Makita wrote: ... >> To fix this, poll the work instead of enabling notification when >> busypoll is interrupted by something. IMHO signal_pending() and >> vhost_has_work() are kind of interruptions rather than signals to >> completely cancel the busypoll, so let's run busypoll after
2018 Jul 02
2
[PATCH vhost] vhost_net: Fix too many vring kick on busypoll
Hi Jason, On 2018/06/29 18:30, Jason Wang wrote: > On 2018?06?29? 16:09, Toshiaki Makita wrote: ... >> To fix this, poll the work instead of enabling notification when >> busypoll is interrupted by something. IMHO signal_pending() and >> vhost_has_work() are kind of interruptions rather than signals to >> completely cancel the busypoll, so let's run busypoll after
2018 Jul 02
0
[PATCH vhost] vhost_net: Fix too many vring kick on busypoll
...use the generic XDP datapath? > For some reason zerocopy was not applied for most packets, so in most > cases driver XDP was used. I was going to dig into it but not yet. Right, just to confirm this. This is expected. In tuntap, we do native XDP only for small and non zerocopy packets. See tun_can_build_skb(). The reason is XDP may adjust packet header which is not supported by zercopy. We can only use XDP generic for zerocopy in this case. > >>> - Set 10us busypoll. >>> - Guest disables checksum and TSO because of host XDP. >>> - Measured single flow Mbps by netperf,...
2018 Sep 12
14
[PATCH net-next V2 00/11] vhost_net TX batching
Hi all: This series tries to batch submitting packets to underlayer socket through msg_control during sendmsg(). This is done by: 1) Doing userspace copy inside vhost_net 2) Build XDP buff 3) Batch at most 64 (VHOST_NET_BATCH) XDP buffs and submit them once through msg_control during sendmsg(). 4) Underlayer sockets can use XDP buffs directly when XDP is enalbed, or build skb based on XDP
2018 Sep 12
14
[PATCH net-next V2 00/11] vhost_net TX batching
Hi all: This series tries to batch submitting packets to underlayer socket through msg_control during sendmsg(). This is done by: 1) Doing userspace copy inside vhost_net 2) Build XDP buff 3) Batch at most 64 (VHOST_NET_BATCH) XDP buffs and submit them once through msg_control during sendmsg(). 4) Underlayer sockets can use XDP buffs directly when XDP is enalbed, or build skb based on XDP
2018 Sep 06
22
[PATCH net-next 00/11] Vhost_net TX batching
Hi all: This series tries to batch submitting packets to underlayer socket through msg_control during sendmsg(). This is done by: 1) Doing userspace copy inside vhost_net 2) Build XDP buff 3) Batch at most 64 (VHOST_NET_BATCH) XDP buffs and submit them once through msg_control during sendmsg(). 4) Underlayer sockets can use XDP buffs directly when XDP is enalbed, or build skb based on XDP
2018 May 21
20
[RFC PATCH net-next 00/12] XDP batching for TUN/vhost_net
Hi all: We do not support XDP batching for TUN since it can only receive one packet a time from vhost_net. This series tries to remove this limitation by: - introduce a TUN specific msg_control that can hold a pointer to an array of XDP buffs - try copy and build XDP buff in vhost_net - store XDP buffs in an array and submit them once for every N packets from vhost_net - since TUN can only