Re: [PATCH] erspan/erspan6: fix JSON output

2021-04-12 Thread William Tu
span version II support") > Cc: u9012...@gmail.com > Cc: Stephen Hemminger > Reported-by: Christian Poessinger > Signed-off-by: Christian Poessinger > --- LGTM, thanks Acked-by: William Tu

Re: [PATCH iproute2] erspan: fix JSON output

2021-04-06 Thread William Tu
com > Reported-by: Christian Pössinger > Signed-off-by: Stephen Hemminger > --- LGTM, Thanks. Acked-by: William Tu

Re: [PATCH net] selftests/bpf: set gopt opt_class to 0 if get tunnel opt failed

2021-03-09 Thread William Tu
.") > Signed-off-by: Hangbin Liu > --- LGTM, thanks. Acked-by: William Tu

Re: [PATCH net] selftest/bpf: no need to drop the packet when there is no geneve opt

2021-02-24 Thread William Tu
nel option, there is no need to drop the packet and > break all geneve rx traffic. Just set opt_class to 0 in this test and > keep returning TC_ACT_OK. > > Signed-off-by: Hangbin Liu > --- LGTM. Acked-by: William Tu

Re: [PATCH bpf] selftests/bpf: use bash instead of sh in test_xdp_redirect.sh

2021-02-05 Thread William Tu
e bash instead. > > Also remove the 'set -e' since the script actually relies on that the > return value can be used to determine pass/fail of the test. > > Fixes: 996139e801fd ("selftests: bpf: add a test for XDP redirect") > Signed-off-by: Björn Töpel > --- LGTM, thanks. Acked-by: William Tu

Re: [PATCH net] selftests/bpf: add xdpdrv mode for test_xdp_redirect

2020-07-29 Thread William Tu
./test_xdp_redirect.sh > > selftests: test_xdp_redirect xdpgeneric [PASS] > > selftests: test_xdp_redirect xdpdrv [PASS] > > > > Signed-off-by: Hangbin Liu > > Acked-by: Song Liu LGTM. Acked-by: William Tu

[PATCH net-next] erspan: Check IFLA_GRE_ERSPAN_VER is set.

2020-05-12 Thread William Tu
Add a check to make sure the IFLA_GRE_ERSPAN_VER is provided by users. Fixes: f989d546a2d5 ("erspan: Add type I version 0 support.") Cc: Eric Dumazet Signed-off-by: William Tu --- net/ipv4/ip_gre.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/net/ipv4/ip_g

Re: [PATCHv2] erspan: Add type I version 0 support.

2020-05-07 Thread William Tu
On Wed, May 6, 2020 at 7:42 PM Eric Dumazet wrote: > > > > On 5/5/20 9:05 AM, William Tu wrote: > > The Type I ERSPAN frame format is based on the barebones > > IP + GRE(4-byte) encapsulation on top of the raw mirrored frame. > > Both type I and II use 0x88BE as

[PATCHv2] erspan: Add type I version 0 support.

2020-05-05 Thread William Tu
erspan11 type erspan \ local 172.16.1.100 remote 172.16.1.200 \ erspan_ver 0 Signed-off-by: William Tu --- v2: remove the inline keyword, let compiler decide. v1: I didn't notice there is Type I when I did first erspan implementation because it is not in the ietf dra

Re: [PATCH iproute2-next] erspan: Add type I version 0 support.

2020-04-29 Thread William Tu
On Wed, Apr 29, 2020 at 2:52 PM David Ahern wrote: > > On 4/26/20 9:04 AM, William Tu wrote: > > The Type I ERSPAN frame format is based on the barebones > > IP + GRE(4-byte) encapsulation on top of the raw mirrored frame. > > Both type I and II use 0x88BE as protocol type

[PATCH net-next] xsk: Enable AF_XDP by default.

2019-10-22 Thread William Tu
The patch enables XDP_SOCKETS and XDP_SOCKETS_DIAG used by AF_XDP, and its dependency on BPF_SYSCALL. Signed-off-by: William Tu --- init/Kconfig| 2 +- net/xdp/Kconfig | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/init/Kconfig b/init/Kconfig index b4daad2bac23

Re: [ovs-dev] [PATCH net-next v4 00/10] optimize openvswitch flow looking up

2019-10-22 Thread William Tu
On Mon, Oct 21, 2019 at 6:16 PM Tonghao Zhang wrote: > > On Tue, Oct 22, 2019 at 1:14 AM William Tu wrote: > > > > On Wed, Oct 16, 2019 at 5:50 AM wrote: > > > > > > From: Tonghao Zhang > > > > > > This series patch optimi

Re: [ovs-dev] [PATCH net-next v4 05/10] net: openvswitch: optimize flow-mask looking up

2019-10-21 Thread William Tu
> > Hi Tonghao, > > > > Does this improve performance? After all, the original code simply > > check whether the mask is NULL, then goto next mask. > I tested the performance, but I disable the mask cache, and use the > dpdk-pktgen to generate packets: > The test ovs flow: > ovs-dpctl add-dp system

Re: [ovs-dev] [PATCH net-next v4 00/10] optimize openvswitch flow looking up

2019-10-21 Thread William Tu
On Wed, Oct 16, 2019 at 5:50 AM wrote: > > From: Tonghao Zhang > > This series patch optimize openvswitch for performance or simplify > codes. > > Patch 1, 2, 4: Port Pravin B Shelar patches to > linux upstream with little changes. btw, should we keep Pravin as the author of the above three patc

Re: [ovs-dev] [PATCH net-next v4 03/10] net: openvswitch: shrink the mask array if necessary

2019-10-18 Thread William Tu
> Tested-by: Greg Rose > --- LGTM Acked-by: William Tu On the other hand, maybe we should have an upper limit on the mask cash size? Regards, William` > net/openvswitch/flow_table.c | 33 +++-- > 1 file changed, 23 insertions(+), 10 deletions(-) > > d

Re: [ovs-dev] [PATCH net-next v4 02/10] net: openvswitch: convert mask list in mask array

2019-10-18 Thread William Tu
g > Tested-by: Greg Rose > --- LGTM Acked-by: William Tu

Re: [ovs-dev] [PATCH net-next v4 01/10] net: openvswitch: add flow-mask cache for performance

2019-10-18 Thread William Tu
masks can > | affect packet processing performance. > > Link: > https://github.com/openvswitch/ovs/commit/5604935e4e1cbc16611d2d97f50b717aa31e8ec5 > Signed-off-by: Tonghao Zhang > Tested-by: Greg Rose > --- LGTM Acked-by: William Tu

Re: [ovs-dev] [PATCH net-next v4 10/10] net: openvswitch: simplify the ovs_dp_cmd_new

2019-10-18 Thread William Tu
On Wed, Oct 16, 2019 at 5:56 AM wrote: > > From: Tonghao Zhang > > use the specified functions to init resource. > > Signed-off-by: Tonghao Zhang > Tested-by: Greg Rose > --- Looks like this is simply moving code around. I don't have any opinion. > net/openvswitch/datapath.c | 60 >

Re: [ovs-dev] [PATCH net-next v4 09/10] net: openvswitch: don't unlock mutex when changing the user_features fails

2019-10-18 Thread William Tu
t OvS recirc_id from tc chain index") > Cc: Paul Blakey > Signed-off-by: Tonghao Zhang > Tested-by: Greg Rose > --- LGTM Acked-by: William Tu > net/openvswitch/datapath.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/net/openvswit

Re: [ovs-dev] [PATCH net-next v4 07/10] net: openvswitch: add likely in flow_lookup

2019-10-18 Thread William Tu
On Wed, Oct 16, 2019 at 5:55 AM wrote: > > From: Tonghao Zhang > > The most case *index < ma->max, and flow-mask is not NULL. > We add un/likely for performance. > > Signed-off-by: Tonghao Zhang > Tested-by: Greg Rose > --- LGTM Acked-by: William Tu &g

Re: [ovs-dev] [PATCH net-next v4 05/10] net: openvswitch: optimize flow-mask looking up

2019-10-18 Thread William Tu
On Wed, Oct 16, 2019 at 5:54 AM wrote: > > From: Tonghao Zhang > > The full looking up on flow table traverses all mask array. > If mask-array is too large, the number of invalid flow-mask > increase, performance will be drop. > > One bad case, for example: M means flow-mask is valid and NULL > o

Re: [ovs-dev] [PATCH net-next v4 06/10] net: openvswitch: simplify the flow_hash

2019-10-18 Thread William Tu
On Wed, Oct 16, 2019 at 5:54 AM wrote: > > From: Tonghao Zhang > > Simplify the code and remove the unnecessary BUILD_BUG_ON. > > Signed-off-by: Tonghao Zhang > Tested-by: Greg Rose > --- LGTM Acked-by: William Tu > net/openvswitch/flow_table.c | 8 ++-- >

Re: [ovs-dev] [PATCH net-next 0/9] optimize openvswitch flow looking up

2019-10-03 Thread William Tu
Hi Tonghao, Thanks for the patch. > On 29 Sep 2019, at 19:09, xiangxia.m@gmail.com wrote: > > > From: Tonghao Zhang > > > > This series patch optimize openvswitch. > > > > Patch 1, 2, 4: Port Pravin B Shelar patches to > > linux upstream with little changes. > > I thought the idea of adding

Re: [PATCH net] ip6_gre: fix a dst leak in ip6erspan_tunnel_xmit

2019-09-14 Thread William Tu
lo to become free. Usage count = 1 > > Fixes: ef7baf5e083c ("ip6_gre: add ip6 erspan collect_md mode") > Signed-off-by: Xin Long > --- LGTM, thanks for the fix! Acked-by: William Tu > net/ipv6/ip6_gre.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-)

Re: [PATCH net v3] ixgbe: fix double clean of tx descriptors with xdp

2019-08-23 Thread William Tu
On Thu, Aug 22, 2019 at 11:10 PM Björn Töpel wrote: > > On 2019-08-22 19:32, William Tu wrote: > > On Thu, Aug 22, 2019 at 10:21 AM Alexander Duyck > > wrote: > >> > >> On Thu, Aug 22, 2019 at 10:12 AM Ilya Maximets > >> wrote: > >>>

Re: [RFC PATCH bpf-next 00/14] xdp_flow: Flow offload to XDP

2019-08-15 Thread William Tu
On Tue, Aug 13, 2019 at 5:07 AM Toshiaki Makita wrote: > > This is a rough PoC for an idea to offload TC flower to XDP. > > > * Motivation > > The purpose is to speed up software TC flower by using XDP. > > I chose TC flower because my current interest is in OVS. OVS uses TC to > offload flow tabl

Re: [PATCH bpf v2] xdp: fix race on generic receive path

2019-07-03 Thread William Tu
; broader perspective and find the most low hanging fruit. > > Thanks Ilya for this fix. > > Acked-by: Magnus Karlsson > > > Fixes: c497176cb2e4 ("xsk: add Rx receive functions and poll support") > > Signed-off-by: Ilya Maximets > > --- Tested on my machine and works ok. Tested-by: William Tu

Re: [PATCHv2 net] net: ip6_gre: access skb data after skb_cow_head()

2019-05-30 Thread William Tu
Please ignore this patch and allow me to investigate more. On Thu, May 30, 2019 at 10:23 AM Gregory Rose wrote: > > > On 5/30/2019 9:59 AM, William Tu wrote: > > When increases the headroom, skb's data pointer might get re-allocated. > > As a result, the skb->data be

[PATCHv2 net] net: ip6_gre: access skb data after skb_cow_head()

2019-05-30 Thread William Tu
w_head before accessing the skb->data pointer. Fixes: 01b8d064d58b4 ("net: ip6_gre: Request headroom in __gre6_xmit()") Reported-by: Haichao Ma Signed-off-by: William Tu --- v1-v2: add more details in commit message. --- net/ipv6/ip6_gre.c | 6 +++--- 1 file changed, 3 insertions(+), 3 d

Re: [PATCH v4.14.x] net: erspan: fix use-after-free

2019-05-29 Thread William Tu
; RAX: ffda RBX: 0004 RCX: 20011000 > > > > RDX: RSI: RDI: 20008000 > > > > RBP: 001c R08: R09: > > > > R10: R11: 0

[PATCH net] net: ip6_gre: access skb data after skb_cow_head()

2019-05-16 Thread William Tu
When increases the headroom, skb's pointer might get re-allocated. Fix it by moving skb_cow_head before accessing the skb->data pointer. Fixes: 01b8d064d58b4 ("net: ip6_gre: Request headroom in __gre6_xmit()") Reported-by: Haichao Ma Signed-off-by: William Tu --- net/

Re: [PATCH bpf] libbpf: add libbpf_util.h to header install.

2019-05-03 Thread William Tu
On Thu, May 2, 2019 at 1:18 PM Y Song wrote: > > On Thu, May 2, 2019 at 11:34 AM William Tu wrote: > > > > The libbpf_util.h is used by xsk.h, so add it to > > the install headers. > > Can we try to change code a little bit to avoid exposing libbpf_util.h?

[PATCH bpf] libbpf: add libbpf_util.h to header install.

2019-05-02 Thread William Tu
The libbpf_util.h is used by xsk.h, so add it to the install headers. Reported-by: Ben Pfaff Signed-off-by: William Tu --- tools/lib/bpf/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/lib/bpf/Makefile b/tools/lib/bpf/Makefile index c6c06bc6683c..f91639bf5650 100644 --- a

Re: [PATCH bpf 1/2] libbpf: fix invalid munmap call

2019-04-30 Thread William Tu
passed > to munmap. > > When the userspace application tried to tear down an AF_XDP socket, > the operation failed and the application would still have a reference > to socket it wished to get rid of. > > Reported-by: William Tu > Fixes: 1cad07884239 ("libbpf: add sup

Re: [PATCH bpf 2/2] libbpf: proper XSKMAP cleanup

2019-04-30 Thread William Tu
KMAP. Instead, the > bpf_map_delete_elem() function should be used for that. > > This patch also simplifies the code by breaking up > xsk_update_bpf_maps() into three smaller functions. > > Reported-by: William Tu > Fixes: 1cad07884239 ("libbpf: add support for using AF_XDP sockets"

[PATCH bpf 2/2] ixgbe: fix AF_XDP tx packet count.

2019-04-03 Thread William Tu
The total_packets count at ixgbe_clean_xdp_tx_irq is always zero when testing with xdpsock -t -N. Set the gso_segs to 1 to make the tx packet count correct. Signed-off-by: William Tu --- drivers/net/ethernet/intel/ixgbe/ixgbe_xsk.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net

[PATCH bpf 1/2] ixgbe: fix AF_XDP tx byte count

2019-04-03 Thread William Tu
The tx bytecount is done twice. When running './xdpsock -t -N -i eth3' and 'ip -s link show dev eth3' The avg packet size is 120 instead of 60. So remove the extra one. Signed-off-by: William Tu --- drivers/net/ethernet/intel/ixgbe/ixgbe_xsk.c | 1 - 1 file changed, 1 delet

Re: [RFC] xdp, multiple rss objects

2019-03-30 Thread William Tu
Hi Jonathan, Sorry I don't have good suggestions but I have a couple of questions. On Fri, Mar 29, 2019 at 9:17 AM Jonathan Lemon wrote: > > Background: > > With AF_XDP, packets are placed on queues which are serviced directly from > an application running in user space, which promises greatly i

Re: New xdpsock sample

2019-03-30 Thread William Tu
On Fri, Mar 29, 2019 at 1:16 AM Maxim Mikityanskiy wrote: > > > -Original Message- > > From: Björn Töpel > > Sent: 28 March, 2019 14:35 > > To: Maxim Mikityanskiy > > Cc: Magnus Karlsson ; Magnus Karlsson > > ; Björn Töpel ; Jonathan > > Lemon ; netdev@vger.kernel.org; Daniel Borkmann >

Re: [PATCH bpf-next RFCv3 2/6] veth: support AF_XDP TX copy-mode.

2019-01-05 Thread William Tu
Hi Toshiaki, Thanks a lot for the feedback. On Tue, Jan 1, 2019 at 5:44 AM Toshiaki Makita wrote: > > Hi, William. Nice work. > I have some feedback and questions. > > > + while (peer_rq->xsk_umem && budget--) { > > + unsigned int inner_xdp_xmit = 0; > > + unsigned in

[PATCH bpf-next RFCv3 4/6] veth: add zero-copy AF_XDP TX support.

2018-12-26 Thread William Tu
ckets. The performance increases from 1.1Mpps to 1.4Mpps, when running zero copy xdpsock as sender and XDP_DROP at the receiver side. Signed-off-by: William Tu --- drivers/net/veth.c | 41 ++--- 1 file changed, 18 insertions(+), 23 deletions(-) diff --git a/dr

[PATCH bpf-next RFCv3 3/6] xsk: add new MEM type for virtual device.

2018-12-26 Thread William Tu
Add MEM_TYPE_ZERO_COPY_VDEV for supporting the veth AF_XDP. For zero-copy veth, the memory comes from userspace and does not need to be freed at kernel. Thus, when xdp returns the frame, detecting this type and doing nothing. Signed-off-by: William Tu --- include/net/xdp.h | 1 + net/core

[PATCH bpf-next RFCv3 6/6] samples: bpf: add veth AF_XDP example.

2018-12-26 Thread William Tu
Add example use cases for AF_XDP socket on two namespaces. The script runs sender at the root namespace, and receiver at the at_ns0 namespace with different XDP actions. Signed-off-by: William Tu --- samples/bpf/test_veth_afxdp.sh | 82 ++ 1 file changed

[PATCH bpf-next RFCv3 5/6] veth: add AF_XDP RX support.

2018-12-26 Thread William Tu
psock -i p1 -t -N -z The performance increases from 1.4Mpps to 2.3Mpps. Signed-off-by: William Tu --- drivers/net/veth.c | 17 + 1 file changed, 17 insertions(+) diff --git a/drivers/net/veth.c b/drivers/net/veth.c index 551444195398..8aac67554880 100644 --- a/drivers/net/veth.c

[PATCH bpf-next RFCv3 2/6] veth: support AF_XDP TX copy-mode.

2018-12-26 Thread William Tu
link set dev p1 up ip netns exec at_ns0 ip link set dev p0 up # receiver ip netns exec at_ns0 xdp_rxq_info --dev p0 --action XDP_DROP # sender xdpsock -i p1 -t -N -z or xdpsock -i p1 -t -S Signed-off-by: William Tu --- drivers/net/veth.c | 200

[PATCH bpf-next RFCv3 1/6] xsk: add xsk_umem_consume_tx_virtual.

2018-12-26 Thread William Tu
Currently the xsk_umem_consume_tx expects only the physical NICs so the api returns a dma address. This patch introduce the new function to return the virtual address, when XSK is used by a virtual device. Signed-off-by: William Tu --- include/net/xdp_sock.h | 7 +++ net/xdp/xdp_umem.c

[PATCH bpf-next RFCv3 0/6] AF_XDP support for veth.

2018-12-26 Thread William Tu
and its peer's rx napi, suggested by Björn Töpel - add AF_XDP zero copy TX - add AF_XDP RX v1->v2: - refactor the xsk_umem_consume_tx_virtual - use the umems provided by netdev - fix bug from locating peer side rq with qid William Tu (6): xsk: add xsk_umem_consume_tx_virtual. veth: s

Re: [bpf-next RFCv2 2/3] veth: support AF_XDP.

2018-12-21 Thread William Tu
On Fri, Dec 21, 2018 at 12:38 AM Björn Töpel wrote: > > Den ons 19 dec. 2018 kl 01:55 skrev William Tu : > > > > The patch adds support for AF_XDP async xmit. Users can use > > AF_XDP on both side of the veth and get better performance, with > > the cost of

Re: [bpf-next RFCv2 1/3] xsk: add xsk_umem_consume_tx_virtual.

2018-12-21 Thread William Tu
On Thu, Dec 20, 2018 at 11:48 AM Björn Töpel wrote: > > Den ons 19 dec. 2018 kl 01:55 skrev William Tu : > > > > Currently the xsk_umem_consume_tx expects only the physical NICs so > > the api returns a dma address. This patch introduce the new function > > to re

[bpf-next RFCv2 2/3] veth: support AF_XDP.

2018-12-18 Thread William Tu
exec at_ns0 ip link set dev p0 up # receiver ip netns exec at_ns0 xdp_rxq_info --dev p0 --action XDP_DROP # sender xdpsock -i p1 -t -N -z or xdpsock -i p1 -t -S Signed-off-by: William Tu --- drivers/net/veth.c | 199 - 1 file

[bpf-next RFCv2 3/3] samples: bpf: add veth AF_XDP example.

2018-12-18 Thread William Tu
Add example use cases for AF_XDP socket on two namespaces. The script runs sender at the root namespace, and receiver at the at_ns0 namespace with different XDP actions. Signed-off-by: William Tu --- samples/bpf/test_veth_afxdp.sh | 67 ++ 1 file changed

[bpf-next RFCv2 1/3] xsk: add xsk_umem_consume_tx_virtual.

2018-12-18 Thread William Tu
Currently the xsk_umem_consume_tx expects only the physical NICs so the api returns a dma address. This patch introduce the new function to return the virtual address, when XSK is used by a virtual device. Signed-off-by: William Tu --- include/net/xdp_sock.h | 7 +++ net/xdp/xdp_umem.c

[bpf-next RFCv2 0/3] AF_XDP support for veth.

2018-12-18 Thread William Tu
(with ksoftirqd 100% cpu) RXQ stats RXQ:CPU pps issue-pps rx_queue_index0:3 1188181 0 rx_queue_index0:sum 1188181 v1->v2: - refactor the xsk_umem_consume_tx_virtual - use the umems provided by netdev - fix bug from locating peer side rq with qid Willi

Re: [bpf-next RFC 2/3] veth: support AF_XDP.

2018-12-18 Thread William Tu
On Tue, Dec 18, 2018 at 6:45 AM Björn Töpel wrote: > > Den mån 17 dec. 2018 kl 20:40 skrev William Tu : > > > > The patch adds support for AF_XDP async xmit. Users can use > > AF_XDP on both side of the veth and get better performance, with > > the cost of

Re: [bpf-next RFC 1/3] xsk: add xsk_umem_consume_tx_virtual.

2018-12-18 Thread William Tu
On Tue, Dec 18, 2018 at 6:34 AM Björn Töpel wrote: > > Den mån 17 dec. 2018 kl 20:40 skrev William Tu : > > > > Currently the xsk_umem_consume_tx expects only the physical NICs so > > the api returns a dma address. This patch introduce the new function > > to return

Re: [bpf-next RFC 0/3] AF_XDP support for veth.

2018-12-18 Thread William Tu
Thanks for the feedback. On Tue, Dec 18, 2018 at 6:14 AM Björn Töpel wrote: > > Den mån 17 dec. 2018 kl 20:40 skrev William Tu : > > > > The patch series adds AF_XDP async xmit support for veth device. > > First patch add a new API for supporting non-physical NIC de

[bpf-next RFC 1/3] xsk: add xsk_umem_consume_tx_virtual.

2018-12-17 Thread William Tu
Currently the xsk_umem_consume_tx expects only the physical NICs so the api returns a dma address. This patch introduce the new function to return the virtual address, when XSK is used by a virtual device. Signed-off-by: William Tu --- include/net/xdp_sock.h | 7 +++ net/xdp/xsk.c

[bpf-next RFC 2/3] veth: support AF_XDP.

2018-12-17 Thread William Tu
exec at_ns0 ip link set dev p0 up # receiver ip netns exec at_ns0 xdp_rxq_info --dev p0 --action XDP_DROP # sender xdpsock -i p1 -t -N -z or xdpsock -i p1 -t -S Signed-off-by: William Tu --- drivers/net/veth.c | 247 - 1 file

[bpf-next RFC 0/3] AF_XDP support for veth.

2018-12-17 Thread William Tu
(with ksoftirqd 100% cpu) RXQ stats RXQ:CPU pps issue-pps rx_queue_index0:3 1188181 0 rx_queue_index0:sum 1188181 William Tu (3): xsk: add xsk_umem_consume_tx_virtual. veth: support AF_XDP. samples: bpf: add veth AF_XDP example. drivers/net/v

[bpf-next RFC 3/3] samples: bpf: add veth AF_XDP example.

2018-12-17 Thread William Tu
Add example use cases for AF_XDP socket on two namespaces. The script runs sender at the root namespace, and receiver at the at_ns0 namespace with different XDP actions. Signed-off-by: William Tu --- samples/bpf/test_veth_afxdp.sh | 67 ++ 1 file changed

Re: [PATCH v2 0/5] Introducing ixgbe AF_XDP ZC support

2018-10-02 Thread William Tu
On Tue, Oct 2, 2018 at 11:39 AM Björn Töpel wrote: > > On 2018-10-02 20:23, William Tu wrote: > > On Tue, Oct 2, 2018 at 1:01 AM Björn Töpel wrote: > >> > >> From: Björn Töpel > >> > >> Jeff: Please remove the v1 patches from your dev-queue! >

Re: [PATCH v2 4/5] ixgbe: move common Tx functions to ixgbe_txrx_common.h

2018-10-02 Thread William Tu
On Tue, Oct 2, 2018 at 1:01 AM Björn Töpel wrote: > > From: Björn Töpel > > This patch prepares for the upcoming zero-copy Tx functionality by > moving common functions used both by the regular path and zero-copy > path. > > Signed-off-by: Björn Töpel > --- Thanks! Tested-by: William Tu

Re: [PATCH v2 2/5] ixgbe: move common Rx functions to ixgbe_txrx_common.h

2018-10-02 Thread William Tu
l > --- Thanks! Tested-by: William Tu

Re: [PATCH v2 5/5] ixgbe: add AF_XDP zero-copy Tx support

2018-10-02 Thread William Tu
API context and using > the same ring, it will also be protected from XDP_REDIRECT actions > with the exact same mechanism. > > As with AF_XDP Rx, all AF_XDP Tx specific functions are added to > ixgbe_xsk.c. > > Signed-off-by: Björn Töpel > --- Thanks! Tested-by: William Tu

Re: [PATCH v2 3/5] ixgbe: add AF_XDP zero-copy Rx support

2018-10-02 Thread William Tu
off-by: Björn Töpel > --- Thanks! Tested-by: William Tu > drivers/net/ethernet/intel/ixgbe/Makefile | 3 +- > drivers/net/ethernet/intel/ixgbe/ixgbe.h | 27 +- > drivers/net/ethernet/intel/ixgbe/ixgbe_lib.c | 17 +- > drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 7

Re: [PATCH v2 1/5] ixgbe: added Rx/Tx ring disable/enable functions

2018-10-02 Thread William Tu
y AF_XDP support > is introduced. > > Signed-off-by: Björn Töpel Thanks! Tested-by: William Tu

Re: [PATCH v2 0/5] Introducing ixgbe AF_XDP ZC support

2018-10-02 Thread William Tu
On Tue, Oct 2, 2018 at 1:01 AM Björn Töpel wrote: > > From: Björn Töpel > > Jeff: Please remove the v1 patches from your dev-queue! > > This patch set introduces zero-copy AF_XDP support for Intel's ixgbe > driver. > > The ixgbe zero-copy code is located in its own file ixgbe_xsk.[ch], > analogou

Re: [PATCH bpf-next 00/11] AF_XDP zero-copy support for i40e

2018-08-29 Thread William Tu
> Thanks for working on this, LGTM! Are you also planning to get ixgbe > out after that? > I currently don't have i40e nic to test, so I'm also looking forward to the ixgbe patch! Thank you William

Re: [PATCH net-next] openvswitch: Derive IP protocol number for IPv6 later frags

2018-08-13 Thread William Tu
On Sun, Aug 12, 2018 at 6:09 PM Pravin Shelar wrote: > > On Fri, Aug 10, 2018 at 10:19 AM, Yi-Hung Wei wrote: > > Currently, OVS only parses the IP protocol number for the first > > IPv6 fragment, but sets the IP protocol number for the later fragments > > to be NEXTHDF_FRAGMENT. This patch trie

Re: [PATCH net-next] net: ip6_gre: get ipv6hdr after skb_cow_head()

2018-07-13 Thread William Tu
port") > Signed-off-by: Prashant Bhole > --- Thanks for the fix. Acked-by: William Tu

Re: [PATCH bpf-net] selftests/bpf: delete xfrm tunnel when test exits.

2018-06-15 Thread William Tu
On Thu, Jun 14, 2018 at 10:24 PM, Eyal Birger wrote: > > >> On 14 Jun 2018, at 15:01, William Tu wrote: >> >> Make the printting of bpf xfrm tunnel better and >> cleanup xfrm state and policy when xfrm test finishes. > > Yeah the ‘tee’ was useful when deve

[PATCH bpf-net] selftests/bpf: delete xfrm tunnel when test exits.

2018-06-14 Thread William Tu
Make the printting of bpf xfrm tunnel better and cleanup xfrm state and policy when xfrm test finishes. Signed-off-by: William Tu --- tools/testing/selftests/bpf/test_tunnel.sh | 24 +--- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/tools/testing/selftests

Re: [PATCH net-next] selftests: net: Test headroom handling of ip6_gre devices

2018-05-24 Thread William Tu
Hi Petr, I tried to test this patch on latest net-next but encounter a couple issues. On Wed, May 23, 2018 at 9:41 AM, Petr Machata wrote: > Commit 5691484df961 ("net: ip6_gre: Fix headroom request in > ip6erspan_tunnel_xmit()") and commit 01b8d064d58b ("net: ip6_gre: > Request headroom in __gre

[PATCHv2 net-next] erspan: set bso bit based on mirrored packet's len

2018-05-18 Thread William Tu
Frame Based the short/oversized definitions in RFC1757, the patch sets the bso bit based on the mirrored packet's size. Reported-by: Xiaoyan Jin Signed-off-by: William Tu --- v1->v2 Improve code comments, make enum erspan_bso clearer --- include/net/erspan.h | 28

[PATCH net] net: ip6_gre: fix tunnel metadata device sharing.

2018-05-18 Thread William Tu
t;ip6_gre: add ip6 erspan collect_md mode") Signed-off-by: William Tu --- net/ipv6/ip6_gre.c | 101 + 1 file changed, 79 insertions(+), 22 deletions(-) diff --git a/net/ipv6/ip6_gre.c b/net/ipv6/ip6_gre.c index 5162ecc45c20..458de353f5d9 1

Re: [PATCH net 7/7] net: ip6_gre: Fix ip6erspan hlen calculation

2018-05-17 Thread William Tu
extra 8 bytes are thus available. However correct it is not. > > So replace the newlink and changelink callbacks with an ERSPAN-specific > ones, reusing the newly-introduced _common() functions. > > Signed-off-by: Petr Machata > --- Acked-by: William Tu Thanks, using ERSPAN-spec

Re: [PATCH net 5/7] net: ip6_gre: Split up ip6gre_newlink()

2018-05-17 Thread William Tu
extract the whole tail to the > caller, ip6gre_newlink(). Thus enable an ERSPAN-specific _newlink() > function without a lot of duplicity. > > Signed-off-by: Petr Machata > --- LGTM. Acked-by: William Tu > net/ipv6/ip6_gre.c | 24 ++-- > 1 file chang

Re: [PATCH net 6/7] net: ip6_gre: Split up ip6gre_changelink()

2018-05-17 Thread William Tu
chata > --- LGTM. Acked-by: William Tu > net/ipv6/ip6_gre.c | 33 - > 1 file changed, 24 insertions(+), 9 deletions(-) > > diff --git a/net/ipv6/ip6_gre.c b/net/ipv6/ip6_gre.c > index 4dfa21d..c17e38b 100644 > --- a/net/ipv6/ip6_gre.c > +++ b

Re: [PATCH net 3/7] net: ip6_gre: Split up ip6gre_tnl_link_config()

2018-05-17 Thread William Tu
er length as an argument. This split will allow > the patches down the line to sneak in a custom header length computation > for the ERSPAN tunnel. > > Signed-off-by: Petr Machata > --- LGTM. Acked-by: William Tu > net/ipv6/ip6_gre.c | 38 ++

Re: [PATCH net 4/7] net: ip6_gre: Split up ip6gre_tnl_change()

2018-05-17 Thread William Tu
; --- LGTM. Acked-by: William Tu > net/ipv6/ip6_gre.c | 10 -- > 1 file changed, 8 insertions(+), 2 deletions(-) > > diff --git a/net/ipv6/ip6_gre.c b/net/ipv6/ip6_gre.c > index 78ba6b9..307ac6d 100644 > --- a/net/ipv6/ip6_gre.c > +++ b/net/ipv6/ip6_gr

Re: [PATCH net 2/7] net: ip6_gre: Fix headroom request in ip6erspan_tunnel_xmit()

2018-05-17 Thread William Tu
28 dev h1 > > ip link add dev vh3 type vrf table 20 > ip link set dev h3 master vh3 > ip link set dev vh3 up > ip link set dev h3 up > > ip link set dev swp3 up > ip address add dev swp3 2001:db8:2::1/64 > > i

Re: [PATCH net 1/7] net: ip6_gre: Request headroom in __gre6_xmit()

2018-05-17 Thread William Tu
:db8:2::1/64 > > ip link set dev swp1 up > tc qdisc add dev swp1 clsact > > ip link add name gt6 type ip6gretap \ > local 2001:db8:2::1 remote 2001:db8:2::2 > ip link set dev gt6 up > > sleep 1 > > tc filte

Re: [PATCH net-next] erspan: set bso bit based on mirrored packet's len

2018-05-17 Thread William Tu
On Wed, May 16, 2018 at 3:24 PM, Tobin C. Harding wrote: > On Wed, May 16, 2018 at 07:05:34AM -0700, William Tu wrote: >> On Mon, May 14, 2018 at 10:33 PM, Tobin C. Harding >> wrote: >> > On Mon, May 14, 2018 at 04:54:36PM -0700, William Tu wrote: >> >> Befor

[PATCH net] erspan: fix invalid erspan version.

2018-05-16 Thread William Tu
Signed-off-by: William Tu --- net/ipv4/ip_gre.c | 4 +++- net/ipv6/ip6_gre.c | 5 - 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/net/ipv4/ip_gre.c b/net/ipv4/ip_gre.c index 2409e648454d..2d8efeecf619 100644 --- a/net/ipv4/ip_gre.c +++ b/net/ipv4/ip_gre.c @@ -734,10 +734,12

Re: [PATCH net-next] erspan: set bso bit based on mirrored packet's len

2018-05-16 Thread William Tu
On Mon, May 14, 2018 at 10:33 PM, Tobin C. Harding wrote: > On Mon, May 14, 2018 at 04:54:36PM -0700, William Tu wrote: >> Before the patch, the erspan BSO bit (Bad/Short/Oversized) is not >> handled. BSO has 4 possible values: >> 00 --> Good frame with no error, or u

[PATCH net-next] erspan: set bso bit based on mirrored packet's len

2018-05-14 Thread William Tu
Frame Based the short/oversized definitions in RFC1757, the patch sets the bso bit based on the mirrored packet's size. Reported-by: Xiaoyan Jin Signed-off-by: William Tu --- include/net/erspan.h | 25 + 1 file changed, 25 insertions(+) diff --git a/include/net/e

[PATCH net-next] erspan: auto detect truncated ipv6 packets.

2018-05-11 Thread William Tu
gt;len. Reported-by: Xiaoyan Jin Signed-off-by: William Tu --- net/ipv4/ip_gre.c | 6 ++ net/ipv6/ip6_gre.c | 6 ++ 2 files changed, 12 insertions(+) diff --git a/net/ipv4/ip_gre.c b/net/ipv4/ip_gre.c index dfe5b22f6ed4..2409e648454d 100644 --- a/net/ipv4/ip_gre.c +++ b/net/ipv4/ip

Re: [PATCH bpf-next] bpf/verifier: enable ctx + const + 0.

2018-05-02 Thread William Tu
On Wed, May 2, 2018 at 1:29 AM, Daniel Borkmann wrote: > On 05/02/2018 06:52 AM, Alexei Starovoitov wrote: >> On Tue, May 01, 2018 at 09:35:29PM -0700, William Tu wrote: >>> >>>> How did you test this patch? >>>> >>> Without the patch, the tes

Re: [PATCH bpf-next] bpf/verifier: enable ctx + const + 0.

2018-05-01 Thread William Tu
On Tue, May 1, 2018 at 4:16 PM, Alexei Starovoitov wrote: > On Mon, Apr 30, 2018 at 10:15:05AM -0700, William Tu wrote: >> Existing verifier does not allow 'ctx + const + const'. However, due to >> compiler optimization, there is a case where BPF compilerit generates

[PATCH bpf-next] bpf/verifier: enable ctx + const + 0.

2018-04-30 Thread William Tu
Yonghong Song Signed-off-by: Yifeng Sun Signed-off-by: William Tu --- kernel/bpf/verifier.c | 2 +- tools/testing/selftests/bpf/test_verifier.c | 13 + 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c index

Re: [PATCH bpf-next] selftests/bpf: bpf tunnel test.

2018-04-30 Thread William Tu
On Mon, Apr 30, 2018 at 2:05 AM, Daniel Borkmann wrote: > On 04/30/2018 09:02 AM, Y Song wrote: >> Hi, William, >> >> When compiled the selftests/bpf in my centos 7 based system, I have >> the following failures, >> >> clang -I. -I./include/uapi -I../../../include/uapi >> -Wno-compare-distinct-poi

[PATCH bpf-next] tools include uapi: Grab a copy of linux/erspan.h

2018-04-30 Thread William Tu
Bring the erspan uapi header file so BPF tunnel helpers can use it. Fixes: 933a741e3b82 ("selftests/bpf: bpf tunnel test.") Reported-by: Yonghong Song Signed-off-by: William Tu --- tools/include/uapi/linux/erspan.h | 52 +++ 1 file changed, 52

[PATCH net-next] erspan: auto detect truncated packets.

2018-04-27 Thread William Tu
If true, this indicated that the mirrored packet is truncated and set the erspan truncate bit. I tested the patch using bpf_skb_change_tail helper function to shrink the packet size and send to erspan tunnel. Reported-by: Xiaoyan Jin Signed-off-by: William Tu --- net/ipv4/ip_gre.c | 6 ++

[PATCHv2 bpf-next 0/2] BPF tunnel testsuite

2018-04-26 Thread William Tu
t_tunnel, ipip_get_tunnel IP6IP:ipip6_set_tunnel, ipip6_get_tunnel, ip6ip6_set_tunnel, ip6ip6_get_tunnel XFRM: xfrm_get_state William Tu (2): selftests/bpf: bpf tunnel test. samples/bpf: remove the bpf tunnel testsuite. samples/bpf/Makefile

[PATCHv2 bpf-next 2/2] samples/bpf: remove the bpf tunnel testsuite.

2018-04-26 Thread William Tu
Move the testsuite to selftests/bpf/{test_tunnel_kern.c, test_tunnel.sh} Signed-off-by: William Tu --- samples/bpf/Makefile | 1 - samples/bpf/tcbpf2_kern.c | 612 - samples/bpf/test_tunnel_bpf.sh | 390 -- 3 files

[PATCHv2 bpf-next 1/2] selftests/bpf: bpf tunnel test.

2018-04-26 Thread William Tu
get_tunnel, ip6ip6_set_tunnel, ip6ip6_get_tunnel XFRM: xfrm_get_state Signed-off-by: William Tu --- tools/testing/selftests/bpf/Makefile | 5 +- tools/testing/selftests/bpf/test_tunnel.sh | 729 + tools/testing/selftests/bpf/test_tunnel_ke

Re: [PATCH bpf-next] selftests/bpf: bpf tunnel test.

2018-04-26 Thread William Tu
On Wed, Apr 25, 2018 at 8:01 AM, William Tu wrote: > The patch migrates the original tests at samples/bpf/tcbpf2_kern.c > and samples/bpf/test_tunnel_bpf.sh to selftests. There are a couple > changes from the original: > 1) add ipv6 vxlan, ipv6 geneve, ipv6 ipip tests >

Re: [PATCH bpf-next] bpf: clear the ip_tunnel_info.

2018-04-25 Thread William Tu
On Wed, Apr 25, 2018 at 12:54 AM, Daniel Borkmann wrote: > On 04/25/2018 08:46 AM, William Tu wrote: >> The percpu metadata_dst might carry the stale ip_tunnel_info >> and cause incorrect behavior. When mixing tests using ipv4/ipv6 >> bpf vxlan and geneve tunnel, the ipv6 tu

[PATCH bpf-next] selftests/bpf: bpf tunnel test.

2018-04-25 Thread William Tu
get_tunnel, ip6ip6_set_tunnel, ip6ip6_get_tunnel Signed-off-by: William Tu --- samples/bpf/Makefile | 1 - samples/bpf/tcbpf2_kern.c | 612 -- samples/bpf/test_tunnel_bpf.sh | 390 -- too

[PATCH bpf-next] bpf: clear the ip_tunnel_info.

2018-04-24 Thread William Tu
The patch zeros the fields in ip_tunnel_info. Signed-off-by: William Tu Reported-by: Yifeng Sun --- net/core/filter.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/core/filter.c b/net/core/filter.c index 8e45c6c7ab08..d3781daa26ab 100644 --- a/net/core/filter.c +++ b/net/core/fil

  1   2   3   4   >