[PATCH RFC bpf-next 1/3] bpf: Add BPF_F_ANY_ALIGNMENT.

2018-11-28 Thread David Miller
Often we want to write tests cases that check things like bad context offset accesses. And one way to do this is to use an odd offset on, for example, a 32-bit load. This unfortunately triggers the alignment checks first on platforms that do not set CONFIG_EFFICIENT_UNALIGNED_ACCESS. So the

[PATCH RFC bpf-next 0/3] bpf: Improve verifier coverage on sparc64 et al.

2018-11-28 Thread David Miller
On sparc64 a ton of test cases in test_verifier.c fail because the memory accesses in the test case are unaligned (or cannot be proven to be aligned by the verifier). Perhaps we can eventually try to (carefully) modify each one with this problem to not use unaligned accesses but: 1) That is

[PATCH RFC bpf-next 2/3] bpf: Make use of 'any' alignment in selftests.

2018-11-28 Thread David Miller
Add F_LOAD_WITH_ANY_ALIGNMENT. On architectures which are don't have efficient unaligned accesses, this provides a way to force test cases to ignore alignment issues and instead test the actual problem the testcase is targetting. Only use this initially for programs where the expected result

[PATCH RFC bpf-next 3/3] bpf: Apply F_LOAD_WITH_ANY_ALIGNMENT to ACCEPT test cases too.

2018-11-28 Thread David Miller
If a testcase has alignment problems but is expected to be ACCEPT, verify it using F_LOAD_WITH_ANY_ALIGNMENT however to not try to execute it. In this way folks on inefficient unaligned access architectures can more fully regression test the verifier. Signed-off-by: David S. Miller ---

Re: pull-request: can-next 2018-11-28,pull-request: can-next 2018-11-28,Re: pull-request: can-next 2018-11-28,pull-request: can-next 2018-11-28

2018-11-28 Thread David Miller
From: Marc Kleine-Budde Date: Thu, 29 Nov 2018 08:14:36 +0100 > Done, here's the pull request with the git:// URL: Pulled, thanks.

Re: pull-request: can-next 2018-11-28,pull-request: can-next 2018-11-28

2018-11-28 Thread Marc Kleine-Budde
On 11/28/18 8:21 PM, David Miller wrote: > From: Marc Kleine-Budde > Date: Wed, 28 Nov 2018 17:01:13 +0100 > >> >> ssh://g...@gitolite.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can-next.git >> tags/linux-can-next-for-4.21-20181128 > > This doesn't work f

[PATCHv2 net] sctp: hold transport before accessing its asoc in sctp_hash_transport

2018-11-28 Thread Xin Long
In sctp_hash_transport, it dereferences a transport's asoc only under rcu_read_lock. Without holding the transport, its asoc could be freed already, which leads to a use-after-free panic. A similar fix as Commit bab1be79a516 ("sctp: hold transport before accessing its asoc in

[PATCHv2 net] sctp: hold transport before accessing its asoc in sctp_epaddr_lookup_transport

2018-11-28 Thread Xin Long
Without holding transport to dereference its asoc, a use after free panic can be caused in sctp_epaddr_lookup_transport. Note that a sock lock can't protect these transports that belong to other socks. A similar fix as Commit bab1be79a516 ("sctp: hold transport before accessing its asoc in

[PATCHv2 net] sctp: check and update stream->out_curr when allocating stream_out

2018-11-28 Thread Xin Long
Now when using stream reconfig to add out streams, stream->out will get re-allocated, and all old streams' information will be copied to the new ones and the old ones will be freed. So without stream->out_curr updated, next time when trying to send from stream->out_curr stream, a panic would be

[PATCH bpf] bpf: Fix verifier log string check for bad alignment.

2018-11-28 Thread David Miller
The message got changed a lot time ago. This was responsible for 36 test case failures on sparc64. Fixes: f1174f77b50c ("bpf/verifier: rework value tracking") Signed-off-by: David S. Miller --- tools/testing/selftests/bpf/test_verifier.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

Re: [PATCH iproute2] ss: add support for delivered and delivered_ce fields

2018-11-28 Thread Eric Dumazet
On Wed, Nov 28, 2018 at 9:16 PM David Ahern wrote: > > On 11/28/18 10:10 PM, Eric Dumazet wrote: > > > > > > On 11/28/2018 04:01 PM, Stephen Hemminger wrote: > >> On Mon, 26 Nov 2018 14:29:53 -0800 > >> Eric Dumazet wrote: > >> > >>> Kernel support was added in linux-4.18 in commit feb5f2ec6464

Re: [PATCH bpf 2/2] bpf: test_verifier, test for lookup on queue/stack maps

2018-11-28 Thread Prashant Bhole
On 11/28/2018 10:06 PM, Mauricio Vasquez wrote: On 11/28/18 3:45 AM, Daniel Borkmann wrote: On 11/28/2018 08:51 AM, Prashant Bhole wrote: This patch adds tests to check whether bpf verifier prevents lookup on queue/stack maps Signed-off-by: Prashant Bhole ---  

Re: [PATCH iproute2] ss: add support for delivered and delivered_ce fields

2018-11-28 Thread David Ahern
On 11/28/18 10:10 PM, Eric Dumazet wrote: > > > On 11/28/2018 04:01 PM, Stephen Hemminger wrote: >> On Mon, 26 Nov 2018 14:29:53 -0800 >> Eric Dumazet wrote: >> >>> Kernel support was added in linux-4.18 in commit feb5f2ec6464 >>> ("tcp: export packets delivery info") >>> >>> Tested: >>> >>> ss

Re: [PATCH iproute2] ss: add support for delivered and delivered_ce fields

2018-11-28 Thread Eric Dumazet
On 11/28/2018 04:01 PM, Stephen Hemminger wrote: > On Mon, 26 Nov 2018 14:29:53 -0800 > Eric Dumazet wrote: > >> Kernel support was added in linux-4.18 in commit feb5f2ec6464 >> ("tcp: export packets delivery info") >> >> Tested: >> >> ss -ti >> ... >> ESTAB 0 2270520

Re: [Patch net v2] mlx5: fixup checksum for short ethernet frame padding

2018-11-28 Thread Eric Dumazet
On Wed, Nov 28, 2018 at 7:53 PM Cong Wang wrote: > > On Wed, Nov 28, 2018 at 7:50 PM Eric Dumazet wrote: > > > > On Wed, Nov 28, 2018 at 7:40 PM Cong Wang wrote: > > > > > > On Wed, Nov 28, 2018 at 4:07 PM Eric Dumazet wrote: > > > > > > > > A NIC is supposed to deliver frames, even the ones

Re: [Patch net v2] mlx5: fixup checksum for short ethernet frame padding

2018-11-28 Thread Cong Wang
On Wed, Nov 28, 2018 at 7:50 PM Eric Dumazet wrote: > > On Wed, Nov 28, 2018 at 7:40 PM Cong Wang wrote: > > > > On Wed, Nov 28, 2018 at 4:07 PM Eric Dumazet wrote: > > > > > > A NIC is supposed to deliver frames, even the ones that 'seem' bad. > > > > A quick test shows this is not the case

Re: [Patch net v2] mlx5: fixup checksum for short ethernet frame padding

2018-11-28 Thread Eric Dumazet
On Wed, Nov 28, 2018 at 7:40 PM Cong Wang wrote: > > On Wed, Nov 28, 2018 at 4:07 PM Eric Dumazet wrote: > > > > A NIC is supposed to deliver frames, even the ones that 'seem' bad. > > A quick test shows this is not the case for mlx5. > > With the trafgen script you gave to me, with tot_len==40,

Re: [Patch net v2] mlx5: fixup checksum for short ethernet frame padding

2018-11-28 Thread Cong Wang
On Wed, Nov 28, 2018 at 4:07 PM Eric Dumazet wrote: > > A NIC is supposed to deliver frames, even the ones that 'seem' bad. A quick test shows this is not the case for mlx5. With the trafgen script you gave to me, with tot_len==40, the dest host could receive all the packets. Changing tot_len

Re: [PATCH] udp: Allow to defer reception until connect() happened

2018-11-28 Thread Eric Dumazet
On Wed, Nov 28, 2018 at 7:09 PM Jana Iyengar wrote: > > > On Wed, Nov 28, 2018 at 6:19 PM Eric Dumazet wrote: >> >> On Wed, Nov 28, 2018 at 5:57 PM Christoph Paasch wrote: >> > >> > There are use-cases where a host wants to use a UDP socket with a >> > specific 4-tuple. The way to do this is to

Re: [PATCH net-next] net: qualcomm: rmnet: Remove set but not used variable 'cmd'

2018-11-28 Thread Subash Abhinov Kasiviswanathan
On 2018-11-28 19:36, YueHaibing wrote: Fixes gcc '-Wunused-but-set-variable' warning: drivers/net/ethernet/qualcomm/rmnet/rmnet_map_command.c: In function 'rmnet_map_do_flow_control': drivers/net/ethernet/qualcomm/rmnet/rmnet_map_command.c:23:36: warning: variable 'cmd' set but not used

[PATCH net-next] net: qualcomm: rmnet: Remove set but not used variable 'cmd'

2018-11-28 Thread YueHaibing
Fixes gcc '-Wunused-but-set-variable' warning: drivers/net/ethernet/qualcomm/rmnet/rmnet_map_command.c: In function 'rmnet_map_do_flow_control': drivers/net/ethernet/qualcomm/rmnet/rmnet_map_command.c:23:36: warning: variable 'cmd' set but not used [-Wunused-but-set-variable] struct

[PATCH net-next,v4 06/12] drivers: net: use flow action infrastructure

2018-11-28 Thread Pablo Neira Ayuso
This patch updates drivers to use the new flow action infrastructure. Signed-off-by: Pablo Neira Ayuso --- v4: rebase. drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c | 74 +++--- .../net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.c | 250 +--

[PATCH net-next,v4 01/12] flow_offload: add flow_rule and flow_match structures and use them

2018-11-28 Thread Pablo Neira Ayuso
This patch wraps the dissector key and mask - that flower uses to represent the matching side - around the flow_match structure. To avoid a follow up patch that would edit the same LoCs in the drivers, this patch also wraps this new flow match structure around the flow rule object. This new

[PATCH net-next,v4 10/12] dsa: bcm_sf2: use flow_rule infrastructure

2018-11-28 Thread Pablo Neira Ayuso
Update this driver to use the flow_rule infrastructure, hence we can use the same code to populate hardware IR from ethtool_rx_flow and the cls_flower interfaces. Signed-off-by: Pablo Neira Ayuso --- v4: comestic changes requested by Florian Fainelli. drivers/net/dsa/bcm_sf2_cfp.c | 98

[PATCH net-next,v4 07/12] cls_flower: don't expose TC actions to drivers anymore

2018-11-28 Thread Pablo Neira Ayuso
Now that drivers have been converted to use the flow action infrastructure, remove this field from the tc_cls_flower_offload structure. Signed-off-by: Pablo Neira Ayuso --- v4: rebase. include/net/pkt_cls.h | 1 - net/sched/cls_flower.c | 5 - 2 files changed, 6 deletions(-) diff --git

[PATCH net-next,v4 05/12] flow_offload: add statistics retrieval infrastructure and use it

2018-11-28 Thread Pablo Neira Ayuso
This patch provides the flow_stats structure that acts as container for tc_cls_flower_offload, then we can use to restore the statistics on the existing TC actions. Hence, tcf_exts_stats_update() is not used from drivers anymore. Signed-off-by: Pablo Neira Ayuso --- v4: rebase.

[PATCH net-next,v4 11/12] qede: place ethtool_rx_flow_spec after code after TC flower codebase

2018-11-28 Thread Pablo Neira Ayuso
This is a preparation patch to reuse the existing TC flower codebase from ethtool_rx_flow_spec. This patch is merely moving the core ethtool_rx_flow_spec parser after tc flower offload driver code so we can skip a few forward function declarations in the follow up patch. Signed-off-by: Pablo

[PATCH net-next,v4 08/12] flow_offload: add wake-up-on-lan and queue to flow_action

2018-11-28 Thread Pablo Neira Ayuso
These actions need to be added to support bcm sf2 features available through the ethtool_rx_flow interface. Reviewed-by: Florian Fainelli Signed-off-by: Pablo Neira Ayuso --- v4: rebase. include/net/flow_offload.h | 3 +++ 1 file changed, 3 insertions(+) diff --git

[PATCH net-next,v4 12/12] qede: use ethtool_rx_flow_rule() to remove duplicated parser code

2018-11-28 Thread Pablo Neira Ayuso
The qede driver supports for ethtool_rx_flow_spec and flower, both codebases look very similar. This patch uses the ethtool_rx_flow_rule() infrastructure to remove the duplicated ethtool_rx_flow_spec parser and consolidate ACL offload support around the flow_rule infrastructure. Furthermore,

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

2018-11-28 Thread Pablo Neira Ayuso
Hi, This patchset is another iteration to introduce an in-kernel intermediate representation (IR) to express ACL hardware offloads [1] [2] [3]. Changes from previous version, based on feedback from: * Marcelo Ricardo Leitner: - Fix bisect-ability due to update in flow_rule_alloc().

[PATCH net-next,v4 04/12] cls_api: add translator to flow_action representation

2018-11-28 Thread Pablo Neira Ayuso
This patch implements a new function to translate from native TC action to the new flow_action representation. Moreover, this patch also updates cls_flower to use this new function. Signed-off-by: Pablo Neira Ayuso --- v4: s/key/entry variable name for struct flow_action_entry in

[PATCH net-next,v4 09/12] ethtool: add basic ethtool_rx_flow_spec to flow_rule structure translator

2018-11-28 Thread Pablo Neira Ayuso
This patch adds a function to translate the ethtool_rx_flow_spec structure to the flow_rule representation. This allows us to reuse code from the driver side given that both flower and ethtool_rx_flow interfaces use the same representation. This patch also includes support for FLOW_EXT and

[PATCH net-next,v4 02/12] net/mlx5e: support for two independent packet edit actions

2018-11-28 Thread Pablo Neira Ayuso
This patch adds pedit_headers_action structure to store the result of parsing tc pedit actions. Then, it calls alloc_tc_pedit_action() to populate the mlx5e hardware intermediate representation once all actions have been parsed. This patch comes in preparation for the new flow_action

[PATCH net-next,v4 03/12] flow_offload: add flow action infrastructure

2018-11-28 Thread Pablo Neira Ayuso
This new infrastructure defines the nic actions that you can perform from existing network drivers. This infrastructure allows us to avoid a direct dependency with the native software TC action representation. Signed-off-by: Pablo Neira Ayuso --- v4: Use post-increment in flow_action_for_each(),

Re: [PATCH] udp: Allow to defer reception until connect() happened

2018-11-28 Thread Eric Dumazet
On Wed, Nov 28, 2018 at 5:57 PM Christoph Paasch wrote: > > There are use-cases where a host wants to use a UDP socket with a > specific 4-tuple. The way to do this is to bind() and then connect() the > socket. However, after the bind(), the socket starts receiving data even > if it does not

[PATCH] udp: Allow to defer reception until connect() happened

2018-11-28 Thread Christoph Paasch
There are use-cases where a host wants to use a UDP socket with a specific 4-tuple. The way to do this is to bind() and then connect() the socket. However, after the bind(), the socket starts receiving data even if it does not match the intended 4-tuple. That is because after the bind() UDP-socket

Re: [PATCH bpf-next 1/2] bpf: add BPF_LWT_ENCAP_IP option to bpf_lwt_push_encap

2018-11-28 Thread Peter Oskolkov
On Wed, Nov 28, 2018 at 4:47 PM David Ahern wrote: > > On 11/28/18 5:22 PM, Peter Oskolkov wrote: > > diff --git a/net/core/filter.c b/net/core/filter.c > > index bd0df75dc7b6..17f3c37218e5 100644 > > --- a/net/core/filter.c > > +++ b/net/core/filter.c > > @@ -4793,6 +4793,60 @@ static int

Re: [PATCH bpf-next 1/2] bpf: add BPF_LWT_ENCAP_IP option to bpf_lwt_push_encap

2018-11-28 Thread David Ahern
On 11/28/18 5:22 PM, Peter Oskolkov wrote: > diff --git a/net/core/filter.c b/net/core/filter.c > index bd0df75dc7b6..17f3c37218e5 100644 > --- a/net/core/filter.c > +++ b/net/core/filter.c > @@ -4793,6 +4793,60 @@ static int bpf_push_seg6_encap(struct sk_buff *skb, > u32 type, void *hdr, u32 len

Re: [PATCH bpf] tools: bpftool: fix a bitfield pretty print issue

2018-11-28 Thread Alexei Starovoitov
On Wed, Nov 28, 2018 at 09:38:23AM -0800, Yonghong Song wrote: > Commit b12d6ec09730 ("bpf: btf: add btf print functionality") > added btf pretty print functionality to bpftool. > There is a problem though in printing a bitfield whose type > has modifiers. > > For example, for a type like >

[PATCH bpf-next 2/2] selftests/bpf: add test_lwt_ip_encap selftest

2018-11-28 Thread Peter Oskolkov
This patch adds a sample/selftest that covers BPF_LWT_ENCAP_IP option added in the first patch in the series. Signed-off-by: Peter Oskolkov --- tools/testing/selftests/bpf/Makefile | 5 +- .../testing/selftests/bpf/test_lwt_ip_encap.c | 65 ++

[PATCH bpf-next 1/2] bpf: add BPF_LWT_ENCAP_IP option to bpf_lwt_push_encap

2018-11-28 Thread Peter Oskolkov
This patch enables BPF programs (specifically, of LWT_XMIT type) to add IP encapsulation headers to packets (e.g. IP/GRE, GUE, IPIP). This is useful when thousands of different short-lived flows should be encapped, each with different and dynamically determined destination. Although lwtunnels can

Re: [PATCH] bpf: Fix various lib and testsuite build failures on 32-bit.

2018-11-28 Thread Alexei Starovoitov
On Wed, Nov 28, 2018 at 12:56:10PM -0800, David Miller wrote: > > Cannot cast a u64 to a pointer on 32-bit without an intervening (long) > cast otherwise GCC warns. > > Signed-off-by: David S. Miller I was contemplating to apply that to bpf tree, but the first hunk is bpf-next only and later

Re: [Patch net v2] mlx5: fixup checksum for short ethernet frame padding

2018-11-28 Thread Eric Dumazet
On 11/28/2018 04:05 PM, Cong Wang wrote: > While we are on this page, mlx5e_lro_update_hdr() incorrectly assumes > TCP header is located right after struct iphdr, which is wrong if we could > have IP options on this path. > > It could the hardware which already verified this corner case

Re: [Patch net v2] mlx5: fixup checksum for short ethernet frame padding

2018-11-28 Thread Eric Dumazet
On Wed, Nov 28, 2018 at 3:57 PM Cong Wang wrote: > But again, I kinda feel the hardware already does the sanity check, > otherwise we have much more serious trouble in mlx5e_lro_update_hdr() > which parses into TCP header. > LRO is a different beast. For packets that are not recognized as LRO

[PATCH net 3/3] tcp: fix SNMP TCP timeout under-estimation

2018-11-28 Thread Yuchung Cheng
Previously the SNMP TCPTIMEOUTS counter has inconsistent accounting: 1. It counts all SYN and SYN-ACK timeouts 2. It counts timeouts in other states except recurring timeouts and timeouts after fast recovery or disorder state. Such selective accounting makes analysis difficult and complicated.

[PATCH net 1/3] tcp: fix off-by-one bug on aborting window-probing socket

2018-11-28 Thread Yuchung Cheng
Previously there is an off-by-one bug on determining when to abort a stalled window-probing socket. This patch fixes that so it is consistent with tcp_write_timeout(). Signed-off-by: Yuchung Cheng Signed-off-by: Eric Dumazet Signed-off-by: Neal Cardwell --- net/ipv4/tcp_timer.c | 2 +- 1 file

[PATCH net 2/3] tcp: fix SNMP under-estimation on failed retransmission

2018-11-28 Thread Yuchung Cheng
Previously the SNMP counter LINUX_MIB_TCPRETRANSFAIL is not counting the TSO/GSO properly on failed retransmission. This patch fixes that. Signed-off-by: Yuchung Cheng Signed-off-by: Eric Dumazet Signed-off-by: Neal Cardwell --- net/ipv4/tcp_output.c | 2 +- 1 file changed, 1 insertion(+), 1

[PATCH net 0/3] fixes in timeout and retransmission accounting

2018-11-28 Thread Yuchung Cheng
This patch set has assorted fixes of minor accounting issues in timeout, window probe, and retransmission stats. Yuchung Cheng (3): tcp: fix off-by-one bug on aborting window-probing socket tcp: fix SNMP under-estimation on failed retransmission tcp: fix SNMP TCP timeout under-estimation

Re: [PATCH bpf v2 0/4] bpf: btf: check name validity for various types

2018-11-28 Thread Alexei Starovoitov
On Tue, Nov 27, 2018 at 01:23:26PM -0800, Yonghong Song wrote: > This patch set added name checking for PTR, ARRAY, VOLATILE, TYPEDEF, > CONST, RESTRICT, STRUCT, UNION, ENUM and FWD types. Such a strict > name checking makes BTF more sound in the kernel and future > BTF-to-header-file converesion

Re: [Patch net v2] mlx5: fixup checksum for short ethernet frame padding

2018-11-28 Thread Cong Wang
On Wed, Nov 28, 2018 at 3:57 PM Cong Wang wrote: > But again, I kinda feel the hardware already does the sanity check, > otherwise we have much more serious trouble in mlx5e_lro_update_hdr() > which parses into TCP header. > While we are on this page, mlx5e_lro_update_hdr() incorrectly assumes

Re: [PATCH iproute2] ss: add support for delivered and delivered_ce fields

2018-11-28 Thread Stephen Hemminger
On Mon, 26 Nov 2018 14:29:53 -0800 Eric Dumazet wrote: > Kernel support was added in linux-4.18 in commit feb5f2ec6464 > ("tcp: export packets delivery info") > > Tested: > > ss -ti > ... > ESTAB 0 2270520 [2607:f8b0:8099:e16::]:47646 > [2607:f8b0:8099:e18::]:38953 >ts sack

Re: [PATCH iproute2] bridge: make -c match -compressvlans first instead of -color

2018-11-28 Thread Stephen Hemminger
On Tue, 27 Nov 2018 18:02:52 -0800 Roopa Prabhu wrote: > From: Roopa Prabhu > > commit c7c1a1ef51ae ("bridge: colorize output and use JSON print library") > broke previous use of -c to represent compressvlans. This restores > previous use of -c to represent compressvlans. Understand the

Re: [iproute PATCH] man: rdma: Add reference to rdma-resource.8

2018-11-28 Thread Stephen Hemminger
On Mon, 26 Nov 2018 18:58:31 +0100 Phil Sutter wrote: > All rdma-related man pages list each other in SEE ALSO section, only > rdma-resource.8 is missing. Add it for the sake of consistency. > > Signed-off-by: Phil Sutter Applied

Re: [Patch net v2] mlx5: fixup checksum for short ethernet frame padding

2018-11-28 Thread Cong Wang
On Wed, Nov 28, 2018 at 3:50 PM Eric Dumazet wrote: > > On Wed, Nov 28, 2018 at 2:16 PM Cong Wang wrote: > > > > On Wed, Nov 28, 2018 at 7:00 AM Eric Dumazet wrote: > > > > > > Nice packet of death alert. > > > > > > pad_len can be 0xFF67 here, if frame_len is smaller than pad_offset. > >

Re: [PATCH net-next v2 1/2] udp: msg_zerocopy

2018-11-28 Thread Willem de Bruijn
On Mon, Nov 26, 2018 at 2:49 PM Willem de Bruijn wrote: > > On Mon, Nov 26, 2018 at 1:19 PM Willem de Bruijn > wrote: > > > > On Mon, Nov 26, 2018 at 1:04 PM Paolo Abeni wrote: > > > > > > On Mon, 2018-11-26 at 12:59 -0500, Willem de Bruijn wrote: > > > > The callers of this function do flush

Re: [Patch net v2] mlx5: fixup checksum for short ethernet frame padding

2018-11-28 Thread Eric Dumazet
On Wed, Nov 28, 2018 at 2:16 PM Cong Wang wrote: > > On Wed, Nov 28, 2018 at 7:00 AM Eric Dumazet wrote: > > > > Nice packet of death alert. > > > > pad_len can be 0xFF67 here, if frame_len is smaller than pad_offset. > > Unless IP header is malformed, how could it be? This is totally

Re: [PATCH] bpf: Fix various lib and testsuite build failures on 32-bit.

2018-11-28 Thread Song Liu
On Wed, Nov 28, 2018 at 12:59 PM David Miller wrote: > > > Cannot cast a u64 to a pointer on 32-bit without an intervening (long) > cast otherwise GCC warns. > > Signed-off-by: David S. Miller Acked-by: Song Liu > -- > > diff --git a/tools/lib/bpf/btf.c b/tools/lib/bpf/btf.c > index

Re: [PATCH bpf] tools: bpftool: fix a bitfield pretty print issue

2018-11-28 Thread Song Liu
On Wed, Nov 28, 2018 at 10:09 AM Yonghong Song wrote: > > Commit b12d6ec09730 ("bpf: btf: add btf print functionality") > added btf pretty print functionality to bpftool. > There is a problem though in printing a bitfield whose type > has modifiers. > > For example, for a type like > typedef

[Patch net] mlx5: fix get_ip_proto()

2018-11-28 Thread Cong Wang
IP header is not necessarily located right after struct ethhdr, there could be multiple 802.1Q headers in between, this is why we call __vlan_get_protocol(). Fixes: fe1dc069990c ("net/mlx5e: don't set CHECKSUM_COMPLETE on SCTP packets") Cc: Alaa Hleihel Cc: Or Gerlitz Cc: Saeed Mahameed

Re: [PATCH RFC iproute2-next 1/2] rdma: add 'link add/delete' commands

2018-11-28 Thread Steve Wise
On 11/28/2018 4:25 PM, Jason Gunthorpe wrote: > On Wed, Nov 28, 2018 at 04:21:48PM -0600, Steve Wise wrote: > It does make sense to not require type.  The name must be unique so that should be enough.  I'll have to respin the kernel side though... >>> The delete_link really should be

[PATCH net-next v2 0/3] vxlan: a few minor cleanups

2018-11-28 Thread Roopa Prabhu
From: Roopa Prabhu Roopa Prabhu (3): vxlan: support changelink for a few more attributes vxlan: extack support for some changelink cases vxlan: move flag sets to use a helper func drivers/net/vxlan.c | 199 +++- 1 file changed, 102

[PATCH net-next v2 3/3] vxlan: move flag sets to use a helper func

2018-11-28 Thread Roopa Prabhu
From: Roopa Prabhu Signed-off-by: Roopa Prabhu --- drivers/net/vxlan.c | 95 - 1 file changed, 43 insertions(+), 52 deletions(-) diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c index 4cb6b50..47671fd 100644 --- a/drivers/net/vxlan.c

[PATCH net-next v2 2/3] vxlan: extack support for some changelink cases

2018-11-28 Thread Roopa Prabhu
From: Roopa Prabhu Signed-off-by: Roopa Prabhu --- drivers/net/vxlan.c | 76 + 1 file changed, 59 insertions(+), 17 deletions(-) diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c index 73caa65..4cb6b50 100644 --- a/drivers/net/vxlan.c

[PATCH net-next v2 1/3] vxlan: support changelink for a few more attributes

2018-11-28 Thread Roopa Prabhu
From: Roopa Prabhu We started very conservative when supporting changelink especially because not all attribute changes could be tested. This patch opens up a few more attributes for changelink. The reason for choosing this set of attributes is based on code references for these attributes. I

Re: [PATCH RFC iproute2-next 1/2] rdma: add 'link add/delete' commands

2018-11-28 Thread Jason Gunthorpe
On Wed, Nov 28, 2018 at 04:21:48PM -0600, Steve Wise wrote: > >> It does make sense to not require type.  The name must be unique so that > >> should be enough.  I'll have to respin the kernel side though... > > The delete_link really should be an operation on the ib_device, not > > the link_ops

Re: [PATCH net-next 3/3] vxlan: move flag sets to use a helper func vxlan_nl2conf

2018-11-28 Thread Roopa Prabhu
On Wed, Nov 28, 2018 at 2:10 PM Roopa Prabhu wrote: > > From: Roopa Prabhu > > Signed-off-by: Roopa Prabhu > --- just noticed a typo in the title, spinning v2. > drivers/net/vxlan.c | 95 > - > 1 file changed, 43 insertions(+), 52

Re: [PATCH RFC iproute2-next 1/2] rdma: add 'link add/delete' commands

2018-11-28 Thread Steve Wise
On 11/28/2018 4:17 PM, Jason Gunthorpe wrote: > On Wed, Nov 28, 2018 at 02:18:55PM -0600, Steve Wise wrote: >> >> On 11/28/2018 2:13 PM, Leon Romanovsky wrote: >>> On Wed, Nov 28, 2018 at 02:07:29PM -0600, Steve Wise wrote: On 11/28/2018 2:04 PM, Leon Romanovsky wrote: > On Wed, Nov

Re: [PATCH RFC iproute2-next 1/2] rdma: add 'link add/delete' commands

2018-11-28 Thread Jason Gunthorpe
On Wed, Nov 28, 2018 at 02:18:55PM -0600, Steve Wise wrote: > > > On 11/28/2018 2:13 PM, Leon Romanovsky wrote: > > On Wed, Nov 28, 2018 at 02:07:29PM -0600, Steve Wise wrote: > >> > >> On 11/28/2018 2:04 PM, Leon Romanovsky wrote: > >>> On Wed, Nov 28, 2018 at 01:08:05PM -0600, Steve Wise

Re: [Patch net v2] mlx5: fixup checksum for short ethernet frame padding

2018-11-28 Thread Cong Wang
On Wed, Nov 28, 2018 at 7:00 AM Eric Dumazet wrote: > > Nice packet of death alert. > > pad_len can be 0xFF67 here, if frame_len is smaller than pad_offset. Unless IP header is malformed, how could it be? Speaking of IP header sanity, I am totally aware of it, I don't check it because I

[PATCH net-next 1/3] vxlan: support changelink for a few more attributes

2018-11-28 Thread Roopa Prabhu
From: Roopa Prabhu We started very conservative when supporting changelink especially because not all attribute changes could be tested. This patch opens up a few more attributes for changelink. The reason for choosing this set of attributes is based on code references for these attributes. I

[PATCH net-next 3/3] vxlan: move flag sets to use a helper func vxlan_nl2conf

2018-11-28 Thread Roopa Prabhu
From: Roopa Prabhu Signed-off-by: Roopa Prabhu --- drivers/net/vxlan.c | 95 - 1 file changed, 43 insertions(+), 52 deletions(-) diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c index 4cb6b50..47671fd 100644 --- a/drivers/net/vxlan.c

[PATCH net-next 2/3] vxlan: extack support for some changelink cases

2018-11-28 Thread Roopa Prabhu
From: Roopa Prabhu Signed-off-by: Roopa Prabhu --- drivers/net/vxlan.c | 76 + 1 file changed, 59 insertions(+), 17 deletions(-) diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c index 73caa65..4cb6b50 100644 --- a/drivers/net/vxlan.c

[PATCH net-next 0/3] vxlan: a few minor cleanups

2018-11-28 Thread Roopa Prabhu
From: Roopa Prabhu Roopa Prabhu (3): vxlan: support changelink for a few more attributes vxlan: extack support for some changelink cases vxlan: move flag sets to use a helper func vxlan_nl2conf drivers/net/vxlan.c | 199 +++- 1 file

Re: [PATCH net-next] tun: implement carrier change

2018-11-28 Thread Andrew Lunn
On Wed, Nov 28, 2018 at 07:12:56PM +0100, Nicolas Dichtel wrote: > The userspace may need to control the carrier state. Hi Nicolas Could you explain your user case a bit more. Are you running a routing daemon on top of the interface, and want it to reroute when the carrier goes down? Thanks

Re: [PATCH] selftests/bpf: add config fragment CONFIG_FTRACE_SYSCALLS

2018-11-28 Thread Daniel Borkmann
On 11/27/2018 04:24 PM, Naresh Kamboju wrote: > CONFIG_FTRACE_SYSCALLS=y is required for get_cgroup_id_user test case > this test reads a file from debug trace path > /sys/kernel/debug/tracing/events/syscalls/sys_enter_nanosleep/id > > Signed-off-by: Naresh Kamboju > --- >

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

2018-11-28 Thread Daniel Borkmann
On 11/26/2018 11:16 PM, John Fastabend wrote: > After being able to add metadata to messages with sk_msg_push_data we > have also found it useful to be able to "pop" this metadata off before > sending it to applications in some cases. This series adds a new helper > sk_msg_pop_data() and the

[PATCH] bpf: Fix various lib and testsuite build failures on 32-bit.

2018-11-28 Thread David Miller
Cannot cast a u64 to a pointer on 32-bit without an intervening (long) cast otherwise GCC warns. Signed-off-by: David S. Miller -- diff --git a/tools/lib/bpf/btf.c b/tools/lib/bpf/btf.c index eadcf8d..c2d641f 100644 --- a/tools/lib/bpf/btf.c +++ b/tools/lib/bpf/btf.c @@ -466,7 +466,7 @@ int

Re: [PATCH RFC iproute2-next 1/2] rdma: add 'link add/delete' commands

2018-11-28 Thread Steve Wise
On 11/28/2018 2:13 PM, Leon Romanovsky wrote: > On Wed, Nov 28, 2018 at 02:07:29PM -0600, Steve Wise wrote: >> >> On 11/28/2018 2:04 PM, Leon Romanovsky wrote: >>> On Wed, Nov 28, 2018 at 01:08:05PM -0600, Steve Wise wrote: On 11/28/2018 12:26 PM, Leon Romanovsky wrote: > On Thu, Sep

Re: [PATCH RFC iproute2-next 1/2] rdma: add 'link add/delete' commands

2018-11-28 Thread Steve Wise
On 11/28/2018 2:08 PM, Leon Romanovsky wrote: > On Wed, Nov 28, 2018 at 10:02:04PM +0200, Leon Romanovsky wrote: >> On Wed, Nov 28, 2018 at 01:34:14PM -0600, Steve Wise wrote: >>> ... >>> >> +rd_prepare_msg(rd, RDMA_NLDEV_CMD_NEWLINK, , >> + (NLM_F_REQUEST

Re: [PATCH RFC iproute2-next 1/2] rdma: add 'link add/delete' commands

2018-11-28 Thread Leon Romanovsky
On Wed, Nov 28, 2018 at 02:07:29PM -0600, Steve Wise wrote: > > > On 11/28/2018 2:04 PM, Leon Romanovsky wrote: > > On Wed, Nov 28, 2018 at 01:08:05PM -0600, Steve Wise wrote: > >> > >> On 11/28/2018 12:26 PM, Leon Romanovsky wrote: > >>> On Thu, Sep 13, 2018 at 10:19:21AM -0700, Steve Wise wrote:

Re: [PATCH RFC iproute2-next 1/2] rdma: add 'link add/delete' commands

2018-11-28 Thread Leon Romanovsky
On Wed, Nov 28, 2018 at 10:02:04PM +0200, Leon Romanovsky wrote: > On Wed, Nov 28, 2018 at 01:34:14PM -0600, Steve Wise wrote: > > ... > > > > >>> + rd_prepare_msg(rd, RDMA_NLDEV_CMD_NEWLINK, , > > >>> + (NLM_F_REQUEST | NLM_F_ACK)); > > >>> +

Re: [PATCH RFC iproute2-next 1/2] rdma: add 'link add/delete' commands

2018-11-28 Thread Steve Wise
On 11/28/2018 2:04 PM, Leon Romanovsky wrote: > On Wed, Nov 28, 2018 at 01:08:05PM -0600, Steve Wise wrote: >> >> On 11/28/2018 12:26 PM, Leon Romanovsky wrote: >>> On Thu, Sep 13, 2018 at 10:19:21AM -0700, Steve Wise wrote: Add new 'link' subcommand 'add' and 'delete' to allow binding a

Re: [PATCH RFC iproute2-next 1/2] rdma: add 'link add/delete' commands

2018-11-28 Thread Leon Romanovsky
On Wed, Nov 28, 2018 at 01:08:05PM -0600, Steve Wise wrote: > > > On 11/28/2018 12:26 PM, Leon Romanovsky wrote: > > On Thu, Sep 13, 2018 at 10:19:21AM -0700, Steve Wise wrote: > >> Add new 'link' subcommand 'add' and 'delete' to allow binding a soft-rdma > >> device to a netdev interface. > >> >

Re: [PATCH RFC iproute2-next 1/2] rdma: add 'link add/delete' commands

2018-11-28 Thread Leon Romanovsky
On Wed, Nov 28, 2018 at 01:34:14PM -0600, Steve Wise wrote: > ... > > >>> + rd_prepare_msg(rd, RDMA_NLDEV_CMD_NEWLINK, , > >>> +(NLM_F_REQUEST | NLM_F_ACK)); > >>> + mnl_attr_put_strz(rd->nlh, RDMA_NLDEV_ATTR_DEV_NAME, name); > >>> + mnl_attr_put_strz(rd->nlh,

Re: [PATCH] selinux: add support for RTM_NEWCHAIN, RTM_DELCHAIN, and RTM_GETCHAIN

2018-11-28 Thread David Miller
From: Paul Moore Date: Wed, 28 Nov 2018 13:47:25 -0500 > On Wed, Nov 28, 2018 at 1:44 PM Paul Moore wrote: >> Commit 32a4f5ecd738 ("net: sched: introduce chain object to uapi") >> added new RTM_* definitions without properly updating SELinux, this >> patch adds the necessary SELinux support. >>

Re: [PATCH RFC iproute2-next 1/2] rdma: add 'link add/delete' commands

2018-11-28 Thread Steve Wise
... >>> + rd_prepare_msg(rd, RDMA_NLDEV_CMD_NEWLINK, , >>> + (NLM_F_REQUEST | NLM_F_ACK)); >>> + mnl_attr_put_strz(rd->nlh, RDMA_NLDEV_ATTR_DEV_NAME, name); >>> + mnl_attr_put_strz(rd->nlh, RDMA_NLDEV_ATTR_LINK_TYPE, type); >>> + mnl_attr_put_strz(rd->nlh,

Re: [net 0/4][pull request] Intel Wired LAN Driver Fixes 2018-11-28

2018-11-28 Thread David Miller
From: Jeff Kirsher Date: Wed, 28 Nov 2018 09:10:18 -0800 > This series contains fixes to igb, ixgbe and i40e. > > Yunjian Wang from Huawei resolves a variable that could potentially be > NULL before it is used. > > Lihong fixes an i40e issue which goes back to 4.17 kernels, where > deleting

Re: [PATCH net] be2net: Fix NULL pointer dereference in be_tx_timeout()

2018-11-28 Thread David Miller
From: Ivan Vecera Date: Wed, 28 Nov 2018 20:29:44 +0100 > And the right way? netif_device_detach() that does not fire > linkwatch events? Allocate all the TX queue resources first. Do not modify the TX queue configuration in any way whatsoever meanwhile. Only after successfully allocating the

Re: [PATCH net] be2net: Fix NULL pointer dereference in be_tx_timeout()

2018-11-28 Thread Ivan Vecera
On 28. 11. 18 20:00, David Miller wrote: From: Ivan Vecera Date: Wed, 28 Nov 2018 11:12:22 +0100 On 27. 11. 18 23:51, David Miller wrote: From: Petr Oros Date: Thu, 22 Nov 2018 15:24:07 +0100 @@ -4700,8 +4700,11 @@ int be_update_queues(struct be_adapter *adapter) struct net_device

Re: [PATCH bpf] bpf: Support sk lookup in netns with id 0

2018-11-28 Thread Joe Stringer
On Tue, 27 Nov 2018 at 13:12, Alexei Starovoitov wrote: > > On Tue, Nov 27, 2018 at 10:01:40AM -0800, Joe Stringer wrote: > > On Tue, 27 Nov 2018 at 06:49, Nicolas Dichtel > > wrote: > > > > > > Le 26/11/2018 ą 23:08, David Ahern a écrit : > > > > On 11/26/18 2:27 PM, Joe Stringer wrote: > > >

Re: pull-request: can-next 2018-11-28,pull-request: can-next 2018-11-28

2018-11-28 Thread David Miller
From: Marc Kleine-Budde Date: Wed, 28 Nov 2018 17:01:13 +0100 > > ssh://g...@gitolite.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can-next.git > tags/linux-can-next-for-4.21-20181128 This doesn't work for me at all. I'm not adding a custom .ssh config entry to point gitolite.k

Re: [PATCH net,stable] s390/qeth: fix length check in SNMP processing

2018-11-28 Thread David Miller
From: Julian Wiedmann Date: Wed, 28 Nov 2018 16:20:50 +0100 > The response for a SNMP request can consist of multiple parts, which > the cmd callback stages into a kernel buffer until all parts have been > received. If the callback detects that the staging buffer provides > insufficient space,

Re: [PATCH RFC iproute2-next 1/2] rdma: add 'link add/delete' commands

2018-11-28 Thread Steve Wise
On 11/28/2018 12:26 PM, Leon Romanovsky wrote: > On Thu, Sep 13, 2018 at 10:19:21AM -0700, Steve Wise wrote: >> Add new 'link' subcommand 'add' and 'delete' to allow binding a soft-rdma >> device to a netdev interface. >> >> EG: >> >> rdma link add rxe_eth0 type rxe dev eth0 >> rdma link delete

Re: BPF uapi structures and 32-bit

2018-11-28 Thread David Miller
From: Daniel Borkmann Date: Wed, 28 Nov 2018 11:34:55 +0100 > Yeah fully agree. Thinking diff below should address it, do you > have a chance to give this a spin for sparc / 32 bit to check if > test_verifier still explodes? Great, let me play with this. I did something simpler yesterday, just

Re: [PATCH net] be2net: Fix NULL pointer dereference in be_tx_timeout()

2018-11-28 Thread David Miller
From: Ivan Vecera Date: Wed, 28 Nov 2018 11:12:22 +0100 > On 27. 11. 18 23:51, David Miller wrote: >> From: Petr Oros >> Date: Thu, 22 Nov 2018 15:24:07 +0100 >> >>> @@ -4700,8 +4700,11 @@ int be_update_queues(struct be_adapter >>> *adapter) >>> struct net_device *netdev = adapter->netdev;

Re: [PATCH v2 net-next 0/8] dpaa2-eth: Introduce XDP support

2018-11-28 Thread David Miller
From: Ioana Ciocoi Radulescu Date: Wed, 28 Nov 2018 09:18:28 + > They apply cleanly for me. I figured out what happend. The patches were mis-ordered (specifically patches #3 and #4) when I added them to the patchwork bundle, and that is what causes them to fail. Series applied, thanks!

[PATCH mlx5-next 06/11] RDMA/mlx5: Remove SRQ signature global flag

2018-11-28 Thread Leon Romanovsky
From: Leon Romanovsky SRQ signature is not supported, hence no need for special static global variable to announce it. Reviewed-by: Mark Bloch Signed-off-by: Leon Romanovsky --- drivers/infiniband/hw/mlx5/srq.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git

[PATCH rdma-next 11/11] RDMA/mlx5: Unfold modify RMP function

2018-11-28 Thread Leon Romanovsky
From: Leon Romanovsky There is no need to perform modify_rmp in two separate function, while one of them uses stack as a placeholder for data while other allocates it dynamically. Combine those two functions to one call instead of two. Reviewed-by: Mark Bloch Signed-off-by: Leon Romanovsky

[PATCH mlx5-next 10/11] RDMA/mlx5: Unfold create RMP function

2018-11-28 Thread Leon Romanovsky
From: Leon Romanovsky There is no need to perform create_rmp in two separate function, while one of them uses stack as a placeholder for data while other allocates it dynamically. Combine those two functions to one instead of two. Reviewed-by: Mark Bloch Signed-off-by: Leon Romanovsky ---

[PATCH mlx5-next 09/11] RDMA/mlx5: Initialize SRQ tables on mlx5_ib

2018-11-28 Thread Leon Romanovsky
From: Leon Romanovsky Transfer initialization and cleanup from mlx5_priv struct of mlx5_core_dev to be part of mlx5_ib_dev. This completes removal of SRQ from mlx5_core. Reviewed-by: Mark Bloch Signed-off-by: Leon Romanovsky --- drivers/infiniband/hw/mlx5/ib_rep.c | 4 ++

  1   2   >