Re: [PATCH 0/3]: net: dsa: mt7530: support MT7530 in the MT7621 SoC

2018-12-03 Thread John Crispin
mt7621 only has 1 IRQ for ethernet part. correct there is only 1 single IRQ on mt7621     John Greats, René [1] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/drivers/net/ethernet/mediatek/mtk_eth_soc.c#n1739 [2] https://www.ubnt.com/download/edgemax/edgerouter-x

Re: [PATCH net-next,v4 00/12] add flow_rule infrastructure

2018-11-29 Thread John Fastabend
point so maybe that is the motivation that makes it more clear why flower API today is insufficient. Mostly curious at this point I see Jiri and Florian both reviewed it already. Thanks, John

[PATCH bpf-next v2 2/3] bpf: add msg_pop_data helper to tools

2018-11-26 Thread John Fastabend
Add the necessary header definitions to tools for new msg_pop_data_helper. Signed-off-by: John Fastabend --- tools/include/uapi/linux/bpf.h| 16 +++- tools/testing/selftests/bpf/bpf_helpers.h | 2 ++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/tools

[PATCH bpf-next v2 3/3] bpf: test_sockmap, add options for msg_pop_data() helper

2018-11-26 Thread John Fastabend
Similar to msg_pull_data and msg_push_data add a set of options to have msg_pop_data() exercised. Signed-off-by: John Fastabend --- tools/testing/selftests/bpf/test_sockmap.c | 127 +++- tools/testing/selftests/bpf/test_sockmap_kern.h | 70 ++--- 2 files

[PATCH bpf-next v2 1/3] bpf: helper to pop data from messages

2018-11-26 Thread John Fastabend
This adds a BPF SK_MSG program helper so that we can pop data from a msg. We use this to pop metadata from a previous push data call. Signed-off-by: John Fastabend --- include/uapi/linux/bpf.h | 16 - net/core/filter.c| 171 +++ net/ipv4

[PATCH bpf-next v2 0/3] bpf: add sk_msg helper sk_msg_pop_data

2018-11-26 Thread John Fastabend
delta calculations for DROP with pop'd data (albeit a strange set of operations for a program to be doing) had potential to be incorrect possibly confusing user space applications, so fix it. John Fastabend (3): bpf: helper to pop data from messages bpf: add msg_pop_data helper to t

Re: [PATCH bpf-next 1/3] bpf: helper to pop data from messages

2018-11-26 Thread John Fastabend
On 11/25/18 5:05 PM, Daniel Borkmann wrote: > On 11/23/2018 02:38 AM, John Fastabend wrote: >> This adds a BPF SK_MSG program helper so that we can pop data from a >> msg. We use this to pop metadata from a previous push data call. >> >> Signed-off-by: John Fastabend &g

Re: [PATCH bpf-next 1/3] bpf: helper to pop data from messages

2018-11-26 Thread John Fastabend
On 11/26/18 3:16 AM, Quentin Monnet wrote: > 2018-11-26 02:05 UTC+0100 ~ Daniel Borkmann >> On 11/23/2018 02:38 AM, John Fastabend wrote: >>> This adds a BPF SK_MSG program helper so that we can pop data from a >>> msg. We use this to pop metadata from a previous pus

[PATCH bpf-next 0/3] bpf: add sk_msg helper sk_msg_pop_data

2018-11-22 Thread John Fastabend
ib support. Thanks! John Fastabend (3): bpf: helper to pop data from messages bpf: add msg_pop_data helper to tools bpf: test_sockmap, add options for msg_pop_data() helper usage include/uapi/linux/bpf.h| 13 +- net/core/filter.c

[PATCH bpf-next 2/3] bpf: add msg_pop_data helper to tools

2018-11-22 Thread John Fastabend
Add the necessary header definitions to tools for new msg_pop_data_helper. Signed-off-by: John Fastabend --- tools/include/uapi/linux/bpf.h| 13 - tools/testing/selftests/bpf/bpf_helpers.h | 2 ++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/tools

[PATCH bpf-next 1/3] bpf: helper to pop data from messages

2018-11-22 Thread John Fastabend
This adds a BPF SK_MSG program helper so that we can pop data from a msg. We use this to pop metadata from a previous push data call. Signed-off-by: John Fastabend --- include/uapi/linux/bpf.h | 13 +++- net/core/filter.c| 169 +++ net/ipv4

[PATCH bpf-next 3/3] bpf: test_sockmap, add options for msg_pop_data()

2018-11-22 Thread John Fastabend
Similar to msg_pull_data and msg_push_data add a set of options to have msg_pop_data() exercised. Signed-off-by: John Fastabend --- tools/testing/selftests/bpf/test_sockmap.c | 127 +++- tools/testing/selftests/bpf/test_sockmap_kern.h | 70 ++--- 2 files

[PATCH net-next 3/3] nfp: flower: include geneve as supported offload tunnel type

2018-11-07 Thread John Hurley
Offload of geneve decap rules is supported in NFP. Include geneve in the check for supported types. Signed-off-by: John Hurley Reviewed-by: Jakub Kicinski --- drivers/net/ethernet/netronome/nfp/flower/tunnel_conf.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/ethernet

[PATCH net-next 2/3] nfp: flower: use geneve and vxlan helpers

2018-11-07 Thread John Hurley
Make use of the recently added VXLAN and geneve helper functions to determine the type of the netdev from its rtnl_link_ops. Signed-off-by: John Hurley Reviewed-by: Jakub Kicinski --- drivers/net/ethernet/netronome/nfp/flower/action.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions

[PATCH net-next 1/3] net: add netif_is_geneve()

2018-11-07 Thread John Hurley
Add a helper function to determine if the type of a netdev is geneve based on its rtnl_link_ops. This allows drivers that may wish to offload tunnels to check the underlying type of the device. A recent patch added a similar helper to vxlan.h Signed-off-by: John Hurley Reviewed-by: Jakub

[PATCH net-next 0/3] nfp: add and use tunnel netdev helpers

2018-11-07 Thread John Hurley
A recent patch introduced the function netif_is_vxlan() to verify the tunnel type of a given netdev as vxlan. Add a similar function to detect geneve netdevs and make use of this function in the NFP driver. Also make use of the vxlan helper where applicable. John Hurley (3): net: add

Rules for retransmitting sk_buffs?

2018-11-05 Thread John Ousterhout
doing something fundamentally wrong here? E.g., do I need to clone the sk_buff before retransmitting it? If so, are there any restrictions on *when* I clone it (I'd prefer not to do this unless retransmission is necessary, just to save work). Thanks in advance for any advice/pointers. -John-

ethtool 4.19 released

2018-11-02 Thread John W. Linville
for combinations of FEC modes * Fix: Fix uninitialized variable use at qsfp dump John -- John W. LinvilleSomeday the world will need a hero, and you linvi...@tuxdriver.com might be all we have. Be ready.

Re: [PATCH bpf-next] bpf_load: add map name to load_maps error message

2018-10-29 Thread John Fastabend
)); > + printf("failed to create map %d (%s): %d %s\n", > +i, maps[i].name, errno, strerror(errno)); > return 1; > } > maps[i].fd = map_fd[i]; > LGTM Acked-by: John Fastabend

Re: [PATCH bpf-next] xdp: sample code for redirecting vlan packets to specific cpus

2018-10-29 Thread John Fastabend
use a bitpattern of CPUs rather than a CPU id > to allow multiple CPUs per vlan. Great, so does this solve your use case then? At least on drivers with XDP support? > > Signed-off-by: Shannon Nelson > --- Some really small and trivial nits below. Acked-by: Jo

Re: [PATCH] bpf: tcp_bpf_recvmsg should return EAGAIN when nonblocking and no data

2018-10-29 Thread John Fastabend
On 10/29/2018 12:31 PM, John Fastabend wrote: > We return 0 in the case of a nonblocking socket that has no data > available. However, this is incorrect and may confuse applications. > After this patch we do the correct thing and return the error > EAGAIN. > > Quoting return

[PATCH] bpf: tcp_bpf_recvmsg should return EAGAIN when nonblocking and no data

2018-10-29 Thread John Fastabend
nonblocking and the receive operation would block, or a receive timeout had been set and the timeout expired before data was received. Signed-off-by: John Fastabend --- net/ipv4/tcp_bpf.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/ipv4/tcp_bpf.c b/net/ipv4/tcp_bpf.c index b7918d4

Re: [RFC net-next v2 1/8] net: sched: register callbacks for indirect tc block binds

2018-10-29 Thread John Hurley
On Sun, Oct 28, 2018 at 11:10 AM Or Gerlitz wrote: > > On Thu, Oct 25, 2018 at 3:28 PM John Hurley wrote: > > Currently drivers can register to receive TC block bind/unbind callbacks > > by implementing the setup_tc ndo in any of their given netdevs. However, > > driver

Re: [RFC net-next v2 2/8] net: add netif_is_geneve()

2018-10-29 Thread John Hurley
On Fri, Oct 26, 2018 at 9:52 AM Sergei Shtylyov wrote: > > Hello! > > On 25.10.2018 15:26, John Hurley wrote: > > > Add a helper function to determine if the type of a netdev is geneve based > > on its rtnl_link_ops. This allows drivers that may wish to ofload tunnels

Re: [RFC net-next v2 2/8] net: add netif_is_geneve()

2018-10-25 Thread John Hurley
unnels > >to check the underlying type of the device. > > > >A recent patch added a similar helper to vxlan.h > > > >Signed-off-by: John Hurley > >Reviewed-by: Jakub Kicinski > > I don't understand why this and the next patch are part of this > patchset. T

Re: [RFC net-next v2 0/8] indirect tc block cb registration

2018-10-25 Thread John Hurley
nts this new indirect block registration in the > >NFP driver to allow the offloading of tunnel rules. The use of egdev > >offload (which is currently only used for tunnel offload) is subsequently > >removed. > > John, I'm missing v1->v2 changelog. Could you please add it? &

[RFC net-next v2 8/8] nfp: flower: remove unnecessary code in flow lookup

2018-10-25 Thread John Hurley
to be NULL. Signed-off-by: John Hurley Reviewed-by: Jakub Kicinski --- drivers/net/ethernet/netronome/nfp/flower/main.h | 3 +-- drivers/net/ethernet/netronome/nfp/flower/metadata.c | 11 +++ drivers/net/ethernet/netronome/nfp/flower/offload.c | 6 ++ 3 files changed, 6 insertions

[RFC net-next v2 5/8] nfp: flower: add infastructure for indirect TC block register

2018-10-25 Thread John Hurley
Add support structures and functions that can be used by NFP to impliment the indirect block register functionality of TC. Signed-off-by: John Hurley Reviewed-by: Jakub Kicinski --- drivers/net/ethernet/netronome/nfp/flower/main.c | 13 +++ drivers/net/ethernet/netronome/nfp/flower/main.h

[RFC net-next v2 6/8] nfp: flower: offload tunnel decap rules via indirect TC blocks

2018-10-25 Thread John Hurley
registration, this is triggered for already existing netdevs. This means that NFP can register for offloads from devices that exist before it is loaded (filter rules will be replayed from the TC core). Signed-off-by: John Hurley Reviewed-by: Jakub Kicinski --- drivers/net/ethernet/netronome/nfp/flower

[RFC net-next v2 7/8] nfp: flower: remove TC egdev offloads

2018-10-25 Thread John Hurley
Previously, only tunnel decap rules required egdev registration for offload in NFP. These are now supported via indirect TC block callbacks. Remove the egdev code from NFP. Signed-off-by: John Hurley Reviewed-by: Jakub Kicinski --- drivers/net/ethernet/netronome/nfp/flower/main.c | 12

[RFC net-next v2 2/8] net: add netif_is_geneve()

2018-10-25 Thread John Hurley
Add a helper function to determine if the type of a netdev is geneve based on its rtnl_link_ops. This allows drivers that may wish to ofload tunnels to check the underlying type of the device. A recent patch added a similar helper to vxlan.h Signed-off-by: John Hurley Reviewed-by: Jakub

[RFC net-next v2 4/8] nfp: flower: allow non repr netdev offload

2018-10-25 Thread John Hurley
then base its offload decision on a combination of ingress device and egress port for a rule. Signed-off-by: John Hurley Reviewed-by: Jakub Kicinski --- drivers/net/ethernet/netronome/nfp/flower/action.c | 14 drivers/net/ethernet/netronome/nfp/flower/main.h | 3 +- drivers/net/ethernet

[RFC net-next v2 3/8] nfp: flower: include geneve as supported offload tunnel type

2018-10-25 Thread John Hurley
Offload of geneve decap rules is supported in NFP. Include geneve in the check for supported types. Signed-off-by: John Hurley Reviewed-by: Jakub Kicinski --- drivers/net/ethernet/netronome/nfp/flower/tunnel_conf.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/ethernet

[RFC net-next v2 0/8] indirect tc block cb registration

2018-10-25 Thread John Hurley
register for block offload rules using already existing functions. The patchset also implements this new indirect block registration in the NFP driver to allow the offloading of tunnel rules. The use of egdev offload (which is currently only used for tunnel offload) is subsequently removed. John

[RFC net-next v2 1/8] net: sched: register callbacks for indirect tc block binds

2018-10-25 Thread John Hurley
. In this case (if it is an ingress block), register and also trigger the callback meaning that any already installed rules can be replayed to the calling driver. Signed-off-by: John Hurley Signed-off-by: Jakub Kicinski --- include/net/pkt_cls.h | 56 + include/net/sch_generic.h | 3 + net

[bpf-next v2 2/3] bpf: libbpf support for msg_push_data

2018-10-19 Thread John Fastabend
Add support for new bpf_msg_push_data in libbpf. Signed-off-by: John Fastabend --- tools/include/uapi/linux/bpf.h| 20 +++- tools/testing/selftests/bpf/bpf_helpers.h | 2 ++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/tools/include/uapi/linux

[bpf-next v2 0/3] sockmap, bpf_msg_push_data helper

2018-10-19 Thread John Fastabend
updates test_sockmap to run msg_push_data tests. v2: rebase after queue map and in filter.c convert int -> u32 John Fastabend (3): bpf: sk_msg program helper bpf_msg_push_data bpf: libbpf support for msg_push_data bpf: test_sockmap add options to use msg_push_data include/linux/skms

[bpf-next v2 1/3] bpf: sk_msg program helper bpf_msg_push_data

2018-10-19 Thread John Fastabend
. However, a copy will be required if the ring is full and its possible for the helper to fail with ENOMEM or EINVAL errors which need to be handled by the BPF program. This can be used similar to XDP metadata to pass data between sk_msg layer and lower layers. Signed-off-by: John Fastabend --- include

[bpf-next v2 3/3] bpf: test_sockmap add options to use msg_push_data

2018-10-19 Thread John Fastabend
. This is analagous to the options that are used to pull data, --txmsg_start and --txmsg_end. In addition to adding the options tests are added to the test suit to run the tests similar to what was done for msg_pull_data. Signed-off-by: John Fastabend --- tools/testing/selftests/bpf/test_sockmap.c | 58

Re: [bpf-next v3 0/2] Fix kcm + sockmap by checking psock type

2018-10-19 Thread John Fastabend
On 10/19/2018 03:57 PM, Daniel Borkmann wrote: > On 10/20/2018 12:51 AM, Daniel Borkmann wrote: >> On 10/18/2018 10:58 PM, John Fastabend wrote: >>> We check if the sk_user_data (the psock in skmsg) is in fact a sockmap >>> type to late, after we read the refcnt which i

[bpf-next PATCH 0/3] sockmap, bpf_msg_push_data helper

2018-10-18 Thread John Fastabend
updates test_sockmap to run msg_push_data tests. --- John Fastabend (3): bpf: sk_msg program helper bpf_msg_push_data bpf: libbpf support for msg_push_data bpf: test_sockmap add options to use msg_push_data include/linux/skmsg.h |5 + include/uapi

[bpf-next PATCH 1/3] bpf: sk_msg program helper bpf_msg_push_data

2018-10-18 Thread John Fastabend
. However, a copy will be required if the ring is full and its possible for the helper to fail with ENOMEM or EINVAL errors which need to be handled by the BPF program. This can be used similar to XDP metadata to pass data between sk_msg layer and lower layers. Signed-off-by: John Fastabend --- include

[bpf-next PATCH 2/3] bpf: libbpf support for msg_push_data

2018-10-18 Thread John Fastabend
Add support for new bpf_msg_push_data in libbpf. Signed-off-by: John Fastabend --- tools/include/uapi/linux/bpf.h| 20 +++- tools/testing/selftests/bpf/bpf_helpers.h |2 ++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/tools/include/uapi/linux

[bpf-next PATCH 3/3] bpf: test_sockmap add options to use msg_push_data

2018-10-18 Thread John Fastabend
. This is analagous to the options that are used to pull data, --txmsg_start and --txmsg_end. In addition to adding the options tests are added to the test suit to run the tests similar to what was done for msg_pull_data. Signed-off-by: John Fastabend --- tools/testing/selftests/bpf/test_sockmap.c | 58

Re: [PATCH bpf-next 2/2] samples: bpf: get ifindex from ifname

2018-10-18 Thread John Fastabend
. And because I consistently run this with the ifname before realizing its the ifindex not string name I'll Ack it. Acked-by: John Fastabend

[bpf-next v3 0/2] Fix kcm + sockmap by checking psock type

2018-10-18 Thread John Fastabend
John Fastabend (2): bpf: skmsg, fix psock create on existing kcm/tls port bpf: test_maps add a test to catch kcm + sockmap include/linux/skmsg.h | 25 +--- net/core/sock_map.c | 11 +++--- tools/testing/selftests/bpf/Makefile | 2 +- tools

[bpf-next v3 1/2] bpf: skmsg, fix psock create on existing kcm/tls port

2018-10-18 Thread John Fastabend
] sock_map_link.isra.6+0x41f/0xe30 net/core/sock_map.c:178 sock_hash_update_common+0x19b/0x11e0 net/core/sock_map.c:669 sock_hash_update_elem+0x306/0x470 net/core/sock_map.c:738 map_update_elem+0x819/0xdf0 kernel/bpf/syscall.c:818 Signed-off-by: John Fastabend Reported-by: Eric Dumazet Fixes

[bpf-next v3 2/2] bpf: test_maps add a test to catch kcm + sockmap

2018-10-18 Thread John Fastabend
Adding a socket to both sockmap and kcm is not supported due to collision on sk_user_data usage. If selftests is run without KCM support we will issue a warning and continue with the tests. Signed-off-by: John Fastabend --- tools/testing/selftests/bpf/Makefile | 2 +- tools/testing

Re: [bpf-next v2 1/2] bpf: skmsg, fix psock create on existing kcm/tls port

2018-10-18 Thread John Fastabend
On 10/18/2018 10:34 AM, Eric Dumazet wrote: > > > On 10/17/2018 10:20 PM, John Fastabend wrote: >> Before using the psock returned by sk_psock_get() when adding it to a >> sockmap we need to ensure it is actually a sockmap based psock. >> Previously we were only check

[bpf-next v2 1/2] bpf: skmsg, fix psock create on existing kcm/tls port

2018-10-17 Thread John Fastabend
] sock_map_link.isra.6+0x41f/0xe30 net/core/sock_map.c:178 sock_hash_update_common+0x19b/0x11e0 net/core/sock_map.c:669 sock_hash_update_elem+0x306/0x470 net/core/sock_map.c:738 map_update_elem+0x819/0xdf0 kernel/bpf/syscall.c:818 Signed-off-by: John Fastabend Reported-by: Eric Dumazet Fixes

[bpf-next v2 0/2] Fix kcm + sockmap by checking psock type

2018-10-17 Thread John Fastabend
also found an issue with KCM and kTLS where each uses sk_data_ready hooks and associated stream parser breaking expectations in kcm, ktls or both. But that fix will need to go to net. Thanks to Eric for reporting. v2: Fix up file +/- my scripts lost track of them John Fastabend (2): bpf: skmsg

[bpf-next v2 2/2] bpf: test_maps add a test to catch kcm + sockmap

2018-10-17 Thread John Fastabend
Adding a socket to both sockmap and kcm is not supported due to collision on sk_user_data usage. If selftests is run without KCM support we will issue a warning and continue with the tests. Signed-off-by: John Fastabend --- tools/testing/selftests/bpf/Makefile | 2 +- tools/testing

[bpf-next PATCH 0/2] Fix kcm + sockmap by checking psock type

2018-10-17 Thread John Fastabend
also found an issue with KCM and kTLS where each uses sk_data_ready hooks and associated stream parser breaking expectations in kcm, ktls or both. But that fix will need to go to net. Thanks to Eric for reporting. --- John Fastabend (2): bpf: skmsg, fix psock create on existing kcm/tls port

[bpf-next PATCH 2/2] bpf: test_maps add a test to catch kcm + sockmap

2018-10-17 Thread John Fastabend
Adding a socket to both sockmap and kcm is not supported due to collision on sk_user_data usage. If selftests is run without KCM support we will issue a warning and continue with the tests. Signed-off-by: John Fastabend --- tools/testing/selftests/bpf/Makefile |2 - tools/testing

[bpf-next PATCH 1/2] bpf: skmsg, fix psock create on existing kcm/tls port

2018-10-17 Thread John Fastabend
] sock_map_link.isra.6+0x41f/0xe30 net/core/sock_map.c:178 sock_hash_update_common+0x19b/0x11e0 net/core/sock_map.c:669 sock_hash_update_elem+0x306/0x470 net/core/sock_map.c:738 map_update_elem+0x819/0xdf0 kernel/bpf/syscall.c:818 Signed-off-by: John Fastabend Reported-by: Eric Dumazet Fixes

Re: [PATCH linux-firmware] linux-firmware: liquidio: fix GPL compliance issue

2018-10-17 Thread John W. Linville
the kernel in question without having to announce themselves. The "send an email to i...@cavium.com" offer may (or may not) be sufficient for the letter of the law. But it seems both fragile and prone to subjective frustrations and delays for users to obtain the sources at some future date

[bpf-next PATCH 2/3] bpf: sockmap, support for msg_peek in sk_msg with redirect ingress

2018-10-16 Thread John Fastabend
This adds support for the MSG_PEEK flag when doing redirect to ingress and receiving on the sk_msg psock queue. Previously the flag was being ignored which could confuse applications if they expected the flag to work as normal. Signed-off-by: John Fastabend --- include/net/tcp.h |2 +- net

[bpf-next PATCH 1/3] bpf: skmsg, improve sk_msg_used_element to work in cork context

2018-10-16 Thread John Fastabend
the helper always reports an empty ring. To fix this add a test for the full ring case to avoid reporting a full ring has 0 elements. This additional functionality will be used in the next patches from recvmsg context where end = head with a full ring is a valid case. Signed-off-by: John Fastabend

[bpf-next PATCH 3/3] bpf: sockmap, add msg_peek tests to test_sockmap

2018-10-16 Thread John Fastabend
Add tests that do a MSG_PEEK recv followed by a regular receive to test flag support. Signed-off-by: John Fastabend --- tools/testing/selftests/bpf/test_sockmap.c | 167 +++- 1 file changed, 115 insertions(+), 52 deletions(-) diff --git a/tools/testing/selftests/bpf

[bpf-next PATCH 0/3] sockmap support for msg_peek flag

2018-10-16 Thread John Fastabend
MSG_PEEK call all tests continue to PASS. --- John Fastabend (3): bpf: skmsg, improve sk_msg_used_element to work in cork context bpf: sockmap, support for msg_peek in sk_msg with redirect ingress bpf: sockmap, add msg_peek tests to test_sockmap include/linux/skmsg.h

[bpf-next PATCH] bpf: sockmap, fix skmsg recvmsg handler to track size correctly

2018-10-16 Thread John Fastabend
' will be decremented with sk_mem_uncharge(). Signed-off-by: John Fastabend --- include/linux/skmsg.h |1 + net/ipv4/tcp_bpf.c|1 + 2 files changed, 2 insertions(+) diff --git a/include/linux/skmsg.h b/include/linux/skmsg.h index 0b919f0..31df0d9 100644 --- a/include/linux/skmsg.h +++ b

[bpf-next PATCH v3 2/2] bpf: bpftool, add flag to allow non-compat map definitions

2018-10-15 Thread John Fastabend
field now but I kept the original API around also in case users of the API don't want to expose this. The flags field is an int in case we need more control over how the API call handles errors/features/etc in the future. Signed-off-by: John Fastabend --- tools/bpf/bpftool/Documentation

[bpf-next PATCH v3 1/2] bpf: bpftool, add support for attaching programs to maps

2018-10-15 Thread John Fastabend
programs to maps and then detach them. Signed-off-by: John Fastabend Reviewed-by: Jakub Kicinski --- tools/bpf/bpftool/Documentation/bpftool-prog.rst | 11 ++ tools/bpf/bpftool/Documentation/bpftool.rst |2 tools/bpf/bpftool/bash-completion/bpftool| 19 tools/bpf/bpftool

[bpf-next PATCH v3 0/2] bpftool support for sockmap use cases

2018-10-15 Thread John Fastabend
. This allows using bpftool with maps that have a extra fields that the user knows can be ignored. This is needed to work correctly with maps being loaded by other tools or directly via syscalls. v3: add bash completion and doc updates for --mapcompat --- John Fastabend (2): bpf: bpftool

[bpf-next PATCH v2 2/2] bpf: bpftool, add flag to allow non-compat map definitions

2018-10-15 Thread John Fastabend
field now but I kept the original API around also in case users of the API don't want to expose this. The flags field is an int in case we need more control over how the API call handles errors/features/etc in the future. Signed-off-by: John Fastabend --- tools/bpf/bpftool/main.c |7

[bpf-next PATCH v2 1/2] bpf: bpftool, add support for attaching programs to maps

2018-10-15 Thread John Fastabend
programs to maps and then detach them. Signed-off-by: John Fastabend --- tools/bpf/bpftool/Documentation/bpftool-prog.rst | 11 ++ tools/bpf/bpftool/Documentation/bpftool.rst |2 tools/bpf/bpftool/bash-completion/bpftool| 19 tools/bpf/bpftool/prog.c

[bpf-next PATCH v2 0/2] bpftool support for sockmap use cases

2018-10-15 Thread John Fastabend
. This allows using bpftool with maps that have a extra fields that the user knows can be ignored. This is needed to work correctly with maps being loaded by other tools or directly via syscalls. --- John Fastabend (2): bpf: bpftool, add support for attaching programs to maps bpf

Re: [PATCH bpf-next 3/8] bpf, sockmap: convert to generic sk_msg interface

2018-10-11 Thread John Fastabend
here the record is being encrypted after BPF has run and came to >> a verdict. In order to get there, first step is to transform open >> coding of scatter-gather list handling into a common core framework >> that subsystems use. >> >> Joint work with John. >> >

Re: [RFC 0/2] net: sched: indirect/remote setup tc block cb registering

2018-10-11 Thread John Hurley
On Wed, Oct 10, 2018 at 2:38 PM Or Gerlitz wrote: > > On Thu, Oct 4, 2018 at 8:19 PM Jakub Kicinski > wrote: > > On Thu, 4 Oct 2018 17:20:43 +0100, John Hurley wrote: > > > > > In this case the hw driver will receive the rules from the tunnel > > > > &

Re: [PATCH] bpf: bpftool, add support for attaching programs to maps

2018-10-10 Thread John Fastabend
On 10/10/2018 10:11 AM, Jakub Kicinski wrote: > On Wed, 10 Oct 2018 09:44:26 -0700, John Fastabend wrote: >> Sock map/hash introduce support for attaching programs to maps. To >> date I have been doing this with custom tooling but this is less than >> ideal as we s

Re: [PATCH net-next] net: enable RPS on vlan devices

2018-10-10 Thread John Fastabend
On 10/10/2018 10:14 AM, Eric Dumazet wrote: > > > On 10/10/2018 09:18 AM, Shannon Nelson wrote: >> On 10/9/2018 7:17 PM, Eric Dumazet wrote: >>> >>> >>> On 10/09/2018 07:11 PM, Shannon Nelson wrote: Hence the reason we sent this as an RFC a couple of weeks ago.  We got no

[PATCH] bpf: bpftool, add support for attaching programs to maps

2018-10-10 Thread John Fastabend
programs to maps and then detach them. Signed-off-by: John Fastabend --- tools/bpf/bpftool/main.h |1 + tools/bpf/bpftool/prog.c | 92 ++ 2 files changed, 92 insertions(+), 1 deletion(-) diff --git a/tools/bpf/bpftool/main.h b/tools/bpf/bpftool

Re: [PATCH ethtool v2] ethtool: Fix uninitialized variable use at qsfp dump

2018-10-04 Thread John W. Linville
ing initialized at > sff8472_parse_eeprom function, to avoid the same issue here. > > Fixes: a5e73bb05ee4 ("ethtool:QSFP Plus/QSFP28 Diagnostics Information > Support") > Signed-off-by: Eran Ben Elisha OK, queued for next release... -- John W. LinvilleSom

Re: [RFC PATCH ethtool] ethtool: better syntax for combinations of FEC modes

2018-10-04 Thread John W. Linville
On Thu, Oct 04, 2018 at 05:06:29PM +0100, Edward Cree wrote: > On 04/10/18 15:08, John W. Linville wrote: > > Ping? > > > > On Mon, Oct 01, 2018 at 02:59:10PM -0400, John W. Linville wrote: > >> Is this patch still RFC? > Feel free to de-RFC and apply it. Great

Re: [RFC 0/2] net: sched: indirect/remote setup tc block cb registering

2018-10-04 Thread John Hurley
On Thu, Oct 4, 2018 at 4:53 PM Or Gerlitz wrote: > > On Thu, Oct 4, 2018 at 6:44 PM John Hurley wrote: > > On Thu, Oct 4, 2018 at 3:28 PM Or Gerlitz wrote: > > > On Thu, Oct 4, 2018 at 7:55 AM Jakub Kicinski > > > wrote: > > > > > This patchset

Re: [RFC 0/2] net: sched: indirect/remote setup tc block cb registering

2018-10-04 Thread John Hurley
On Thu, Oct 4, 2018 at 3:28 PM Or Gerlitz wrote: > > On Thu, Oct 4, 2018 at 7:55 AM Jakub Kicinski > wrote: > > > > Hi! > > > > This set contains a rough RFC implementation of a proposed [1] replacement > > for egdev cls_flower offloads. I did some last minute restructuring > > and removal of

Re: [RFC PATCH ethtool] ethtool: better syntax for combinations of FEC modes

2018-10-04 Thread John W. Linville
Ping? On Mon, Oct 01, 2018 at 02:59:10PM -0400, John W. Linville wrote: > Is this patch still RFC? > > On Wed, Sep 19, 2018 at 05:06:25PM +0100, Edward Cree wrote: > > Instead of commas, just have them as separate argvs. > > > > The parsing state machine might loo

Re: [RFC PATCH ethtool] ethtool: better syntax for combinations of FEC modes

2018-10-01 Thread John W. Linville
vname advertise foo" }, > { 1, "--set-fec devname" }, > { 0, "--set-fec devname encoding auto" }, > - { 0, "--set-fec devname encoding off," }, > - { 0, "--set-fec devname encoding baser,rs" }, > - { 0, &qu

Re: bpf: Massive skbuff_head_cache memory leak?

2018-09-26 Thread John Johansen
On 09/26/2018 02:22 PM, Daniel Borkmann wrote: > On 09/26/2018 11:09 PM, Tetsuo Handa wrote: >> Hello, Alexei and Daniel. >> >> Can you show us how to run testcases you are testing? > > Sorry for the delay; currently quite backlogged but will definitely take a > look > at these reports.

[bpf PATCH v4 2/3] bpf: sockmap, fix transition through disconnect without close

2018-09-18 Thread John Fastabend
about sockets always being ESTABLISHED state. To resolve this rely on the unhash hook, which is called in the disconnect case, to remove the sock from the sockmap. Reported-by: Eric Dumazet Fixes: 1aa12bdf1bfb ("bpf: sockmap, add sock close() hook to remove socks") Signed-off-by: John

[bpf PATCH v4 1/3] bpf: sockmap only allow ESTABLISHED sock state

2018-09-18 Thread John Fastabend
are BPF_SOCK_OPS_PASSIVE_ESTABLISHED_CB and BPF_SOCK_OPS_ACTIVE_ESTABLISHED_CB. Similar to TLS ULP this ensures sk_user_data is correct. Reported-by: Eric Dumazet Fixes: 1aa12bdf1bfb ("bpf: sockmap, add sock close() hook to remove socks") Signed-off-by: John Fastabend Acked-by: Yonghong Song ---

[bpf PATCH v4 3/3] bpf: test_maps, only support ESTABLISHED socks

2018-09-18 Thread John Fastabend
Ensure that sockets added to a sock{map|hash} that is not in the ESTABLISHED state is rejected. Fixes: 1aa12bdf1bfb ("bpf: sockmap, add sock close() hook to remove socks") Signed-off-by: John Fastabend Acked-by: Yonghong Song --- tools/testing/selftests/bpf/test_maps.c | 10 +++

[bpf PATCH v4 0/3] bpf, sockmap ESTABLISHED state only

2018-09-18 Thread John Fastabend
Yonghong I carried your ACKs forward. --- John Fastabend (3): bpf: sockmap only allow ESTABLISHED sock state bpf: sockmap, fix transition through disconnect without close bpf: test_maps, only support ESTABLISHED socks kernel/bpf/sockmap.c| 91

Re: [bpf PATCH 2/3] bpf: sockmap, fix transition through disconnect without close

2018-09-17 Thread John Fastabend
On 09/17/2018 02:09 PM, Y Song wrote: > On Mon, Sep 17, 2018 at 10:32 AM John Fastabend > wrote: >> >> It is possible (via shutdown()) for TCP socks to go trough TCP_CLOSE >> state via tcp_disconnect() without actually calling tcp_close which >> would then cal

Re: [bpf PATCH 3/3] bpf: test_maps, only support ESTABLISHED socks

2018-09-17 Thread John Fastabend
On 09/17/2018 02:21 PM, Y Song wrote: > On Mon, Sep 17, 2018 at 10:33 AM John Fastabend > wrote: >> >> Ensure that sockets added to a sock{map|hash} that is not in the >> ESTABLISHED state is rejected. >> >> Fixes: 1aa12bdf1bfb ("bpf: sockmap, add sock clo

[bpf PATCH v3 1/3] bpf: sockmap only allow ESTABLISHED sock state

2018-09-17 Thread John Fastabend
are BPF_SOCK_OPS_PASSIVE_ESTABLISHED_CB and BPF_SOCK_OPS_ACTIVE_ESTABLISHED_CB. Similar to TLS ULP this ensures sk_user_data is correct. Reported-by: Eric Dumazet Fixes: 1aa12bdf1bfb ("bpf: sockmap, add sock close() hook to remove socks") Signed-off-by: John Fastabend Acked-by: Yonghong Song --

[bpf PATCH v3 3/3] bpf: test_maps, only support ESTABLISHED socks

2018-09-17 Thread John Fastabend
Ensure that sockets added to a sock{map|hash} that is not in the ESTABLISHED state is rejected. Fixes: 1aa12bdf1bfb ("bpf: sockmap, add sock close() hook to remove socks") Signed-off-by: John Fastabend --- tools/testing/selftests/bpf/test_maps.c | 10 +++--- 1 file changed, 7

[bpf PATCH v3 2/3] bpf: sockmap, fix transition through disconnect without close

2018-09-17 Thread John Fastabend
about sockets always being ESTABLISHED state. To resolve this rely on the unhash hook, which is called in the disconnect case, to remove the sock from the sockmap. Reported-by: Eric Dumazet Fixes: 1aa12bdf1bfb ("bpf: sockmap, add sock close() hook to remove socks") Signed-off-by: John

[bpf PATCH v3 0/3] bpf, sockmap ESTABLISHED state only

2018-09-17 Thread John Fastabend
for ESTABLISH state in hash update sockmap as well v3: Do not release lock from unhash in error path, no lock was used in the first place. And drop not so useful code comments Thanks for reviewing Yonghong I carried your ACK forward on patch 1/3. Thanks, John --- John Fastabend (3): bpf

Re: [PATCH ethtool] ethtool: support combinations of FEC modes

2018-09-17 Thread John W. Linville
mma-less version in the syntax synopsis and only > mention the commas in the running-text. LGTM -- queued for next release...thanks! John > ethtool.8.in | 11 --- > ethtool.c | 50 +++--- > test-cmdline.c | 9 + >

Re: [bpf PATCH v2 2/3] bpf: sockmap, fix transition through disconnect without close

2018-09-17 Thread John Fastabend
On 09/17/2018 10:59 AM, John Fastabend wrote: > It is possible (via shutdown()) for TCP socks to go trough TCP_CLOSE > state via tcp_disconnect() without actually calling tcp_close which > would then call our bpf_tcp_close() callback. Because of this a user > could disconnect a soc

[bpf PATCH v2 3/3] bpf: test_maps, only support ESTABLISHED socks

2018-09-17 Thread John Fastabend
Ensure that sockets added to a sock{map|hash} that is not in the ESTABLISHED state is rejected. Fixes: 1aa12bdf1bfb ("bpf: sockmap, add sock close() hook to remove socks") Signed-off-by: John Fastabend --- tools/testing/selftests/bpf/test_maps.c | 10 +++--- 1 file changed, 7

[bpf PATCH v2 1/3] bpf: sockmap only allow ESTABLISHED sock state

2018-09-17 Thread John Fastabend
are BPF_SOCK_OPS_PASSIVE_ESTABLISHED_CB and BPF_SOCK_OPS_ACTIVE_ESTABLISHED_CB. Similar to TLS ULP this ensures sk_user_data is correct. Reported-by: Eric Dumazet Fixes: 1aa12bdf1bfb ("bpf: sockmap, add sock close() hook to remove socks") Signed-off-by: John Fastabend --- kernel/bpf/sockma

[bpf PATCH v2 2/3] bpf: sockmap, fix transition through disconnect without close

2018-09-17 Thread John Fastabend
about sockets always being ESTABLISHED state. To resolve this rely on the unhash hook, which is called in the disconnect case, to remove the sock from the sockmap. Reported-by: Eric Dumazet Fixes: 1aa12bdf1bfb ("bpf: sockmap, add sock close() hook to remove socks") Signed-off-by: John

[bpf PATCH v2 0/3] bpf, sockmap ESTABLISHED state only

2018-09-17 Thread John Fastabend
for ESTABLISH state in hash update sockmap as well. Thanks, John --- John Fastabend (3): bpf: sockmap only allow ESTABLISHED sock state bpf: sockmap, fix transition through disconnect without close bpf: test_maps, only support ESTABLISHED socks kernel/bpf/sockmap.c

[bpf PATCH 3/3] bpf: test_maps, only support ESTABLISHED socks

2018-09-17 Thread John Fastabend
Ensure that sockets added to a sock{map|hash} that is not in the ESTABLISHED state is rejected. Fixes: 1aa12bdf1bfb ("bpf: sockmap, add sock close() hook to remove socks") Signed-off-by: John Fastabend --- tools/testing/selftests/bpf/test_maps.c | 10 +++--- 1 file changed, 7

[bpf PATCH 2/3] bpf: sockmap, fix transition through disconnect without close

2018-09-17 Thread John Fastabend
about sockets always being ESTABLISHED state. To resolve this rely on the unhash hook, which is called in the disconnect case, to remove the sock from the sockmap. Reported-by: Eric Dumazet Fixes: 1aa12bdf1bfb ("bpf: sockmap, add sock close() hook to remove socks") Signed-off-by: John

[bpf PATCH 0/3] bpf, sockmap ESTABLISHED state only

2018-09-17 Thread John Fastabend
Eric noted that using the close callback is not sufficient to catch all transitions from ESTABLISHED state to a LISTEN state. So this series does two things. First, only allow adding socks in ESTABLISH state and second use unhash callback to catch tcp_disconnect() transitions. Thanks, John

[bpf PATCH 1/3] bpf: sockmap only allow ESTABLISHED sock state

2018-09-17 Thread John Fastabend
are BPF_SOCK_OPS_PASSIVE_ESTABLISHED_CB and BPF_SOCK_OPS_ACTIVE_ESTABLISHED_CB. Similar to TLS ULP this ensures sk_user_data is correct. Reported-by: Eric Dumazet Fixes: 1aa12bdf1bfb ("bpf: sockmap, add sock close() hook to remove socks") Signed-off-by: John Fastabend --- kernel/bpf/sockma

[net-next PATCH] tls: async support causes out-of-bounds access in crypto APIs

2018-09-14 Thread John Fastabend
oth the setup (in tls_do_decryption) and when we clear it from the crypto callback handler tls_decrypt_done(). After this selftests pass again and fixes KASAN errors/warnings. Fixes: 94524d8fc965 ("net/tls: Add support for async decryption of tls records") Signed-off-by: John Fastabend --- incl

  1   2   3   4   5   6   7   8   9   10   >