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

2018-11-19 Thread Jiri Pirko
Mon, Nov 19, 2018 at 09:12:29PM CET, da...@davemloft.net wrote: >From: Pablo Neira Ayuso >Date: Mon, 19 Nov 2018 01:15:07 +0100 > >> This patchset introduces a kernel intermediate representation (IR) to >> express ACL hardware offloads, as already described in previous RFC and >> v1 patchset [1] [

Re: VETH & AF_PACKET problem

2018-11-19 Thread Anand H. Krishnan
Hello Willem, I was able to do scp without any problems with the patch. I agree with your reasoning of the patch. Thanks for your attention to this problem. Thanks, Anand On Tue, Nov 20, 2018 at 3:22 AM Willem de Bruijn wrote: > > On Mon, Nov 19, 2018 at 12:54 PM Willem de Bruijn > wrote: > >

Re: [PATCH ipsec-next] xfrm: policy: fix netlink/pf_key policy lookups

2018-11-19 Thread Steffen Klassert
On Thu, Nov 15, 2018 at 02:51:57AM +0100, Florian Westphal wrote: > Colin Ian King says: > Static analysis with CoverityScan found a potential issue [..] > It seems that pointer pol is set to NULL and then a check to see if it > is non-null is used to set pol to tmp; howeverm this check is alway

Re: [PATCH v2 bpf-next 0/2] bpf: adding support for mapinmap in libbpf

2018-11-19 Thread Y Song
On Mon, Nov 19, 2018 at 9:40 PM Nikita V. Shirokov wrote: > > in this patch series i'm adding a helper for libbpf which would allow > it to load map-in-map(BPF_MAP_TYPE_ARRAY_OF_MAPS and > BPF_MAP_TYPE_HASH_OF_MAPS). > first patch contains new helper + explains proposed workflow > second patch con

[PATCH net-next] mlxsw: core: Extend cooling device with cooling levels

2018-11-19 Thread Ido Schimmel
From: Vadim Pasternak Extend cooling device with cooling levels vector to allow more flexibility of PWM setting. Thermal zone algorithm operates with the numerical states for PWM setting. Each state is the index, defined in range from 0 to 10 and it's mapped to the relevant duty cycle value, whi

[PATCH v2 net-next] cxgb4/cxgb4vf: Fix mac_hlist initialization and free

2018-11-19 Thread Arjun Vynipadath
Null pointer dereference seen when cxgb4vf driver is unloaded without bringing up any interfaces, moving mac_hlist initialization to driver probe and free the mac_hlist in remove to fix the issue. Fixes: 24357e06ba51 ("cxgb4vf: fix memleak in mac_hlist initialization") Signed-off-by: Arjun Vynipad

[PATCH v2 bpf-next 2/2] bpf: adding tests for mapinmap helpber in libbpf

2018-11-19 Thread Nikita V. Shirokov
adding test/example of bpf_map__add_inner_map_fd usage Signed-off-by: Nikita V. Shirokov --- tools/testing/selftests/bpf/Makefile| 3 +- tools/testing/selftests/bpf/test_mapinmap.c | 49 + tools/testing/selftests/bpf/test_maps.c | 82 + 3

[PATCH v2 bpf-next 1/2] bpf: adding support for map in map in libbpf

2018-11-19 Thread Nikita V. Shirokov
idea is pretty simple. for specified map (pointed by struct bpf_map) we would provide descriptor of already loaded map, which is going to be used as a prototype for inner map. proposed workflow: 1) open bpf's object (bpf_object__open) 2) create bpf's map which is going to be used as a prototype 3)

[PATCH v2 bpf-next 0/2] bpf: adding support for mapinmap in libbpf

2018-11-19 Thread Nikita V. Shirokov
in this patch series i'm adding a helper for libbpf which would allow it to load map-in-map(BPF_MAP_TYPE_ARRAY_OF_MAPS and BPF_MAP_TYPE_HASH_OF_MAPS). first patch contains new helper + explains proposed workflow second patch contains tests which also could be used as example of usage v1->v2: - ad

Fwd: [PATCH RFC net-next] net: SAIL based FIB lookup for XDP

2018-11-19 Thread Md. Islam
Forgot to add everyone in the reply.. -- Forwarded message - From: Md. Islam Date: Mon, Nov 19, 2018 at 11:35 PM Subject: Re: [PATCH RFC net-next] net: SAIL based FIB lookup for XDP To: On Sun, Nov 18, 2018 at 12:42 PM David Ahern wrote: > > On 11/11/18 7:25 PM, Md. Islam wrot

[PATCH net] tg3: Add PHY reset for 5717/5719/5720 in change ring and flow control paths

2018-11-19 Thread Siva Reddy Kallam
From: Siva Reddy Kallam This patch has the fix to avoid PHY lockup with 5717/5719/5720 in change ring and flow control paths. This patch solves the RX hang while doing continuous ring or flow control parameters with heavy traffic from peer. Signed-off-by: Siva Reddy Kallam Acked-by: Michael Cha

Re: [pull request][net 00/13] Mellanox, mlx5 fixes 2018-11-19

2018-11-19 Thread David Miller
From: Saeed Mahameed Date: Mon, 19 Nov 2018 15:41:15 -0800 > The following fixes are for mlx5 core and netdev driver. Pulled. > For -stable v4.16 > bc7fda7d4637 ('net/mlx5e: IPoIB, Reset QP after channels are closed') > > For -stable v4.17 > 36917a270395 ('net/mlx5: IPSec, Fix the SA context h

Re: [PATCH net-next] add part of TCP counts explanations in snmp_counters.rst

2018-11-19 Thread peng yu
On Mon, Nov 19, 2018 at 10:51 AM Stephen Hemminger wrote: > > On Fri, 16 Nov 2018 11:17:40 -0800 > yupeng wrote: > > > +* TcpInSegs > > +Defined in `RFC1213 tcpInSegs`_ > > + > > +.. _RFC1213 tcpInSegs: https://tools.ietf.org/html/rfc1213#page-48 > > + > > +The number of packets received by the T

Re: [Patch net] net: invert the check of detecting hardware RX checksum fault

2018-11-19 Thread Herbert Xu
On Mon, Nov 19, 2018 at 11:25:47AM -0800, Cong Wang wrote: > > Hmm, it calls csum_tcpudp_magic() directly instead of > __skb_checksum_validate_complete(), but it also sets ip_summed > to CHECKSUM_UNNECESSARY: > > 20 if ((protocol == 0 && !csum_fold(skb->csum)) || > 21

Re: [PATCH net-next 00/14] gred: add offload support

2018-11-19 Thread David Miller
From: Jakub Kicinski Date: Mon, 19 Nov 2018 15:21:36 -0800 > This series adds support for GRED offload in the nfp driver. So > far we have only supported the RED Qdisc offload, but we need a > way to differentiate traffic types e.g. based on DSCP marking. > > It may seem like PRIO+RED is a good

Re: [PATCH net 0/2] qed: Fix Queue Manager getters

2018-11-19 Thread David Miller
From: Denis Bolotin Date: Mon, 19 Nov 2018 16:28:29 +0200 > This patch series fixes various queue manager getter functions. It is > important to make sure the getter's caller will receive a valid queue even > in error case to prevent more serious bugs. > Please consider applying to net. Series a

Re: [PATCH net] ipv6: fix a dst leak when removing its exception

2018-11-19 Thread David Ahern
On 11/19/18 7:16 PM, David Miller wrote: > From: Xin Long > Date: Thu, 15 Nov 2018 16:23:38 +0900 > >> The attachment is the ip6_dst.sh with IPVS. >> >> # sh ip6_dst.sh > > Maybe a selftests candidate? > That script was not a reliable reproducer for me. I created a much simpler one that shows

Re: [PATCH net] ipv6: fix a dst leak when removing its exception

2018-11-19 Thread David Miller
From: Xin Long Date: Thu, 15 Nov 2018 16:23:38 +0900 > The attachment is the ip6_dst.sh with IPVS. > > # sh ip6_dst.sh Maybe a selftests candidate?

Re: [PATCH net-next 00/18] selftests: Add tests for VXLAN at an 802.1d bridge

2018-11-19 Thread David Miller
From: Ido Schimmel Date: Mon, 19 Nov 2018 16:11:06 + > This patchset adds several tests for VXLAN attached to an 802.1d bridge > and fixes a related bug. So I'm still applying this as-is to net-next, but I still expect patch #1 to be submitted to net. Thanks.

Re: [PATCH v3 00/21] octeontx2-af: NPC MCAM support and FLR handling

2018-11-19 Thread David Miller
From: sunil.kovv...@gmail.com Date: Mon, 19 Nov 2018 16:17:22 +0530 > This patchset is a continuation to earlier submitted three patch > series to add a new driver for Marvell's OcteonTX2 SOC's > Resource virtualization unit (RVU) admin function driver. ... Series applied, thanks.

[PATCH v1 net-next] ip6_tunnel: Adding support of mapping rules for MAP-E tunnel

2018-11-19 Thread Felix Jia
From: Blair Steven Mapping of Addresses and Ports with Encapsulation (MAP-E) is defined in RFC7597, and is an IPv6 transition technology providing interoperability between IPv4 and IPv6 networks. MAP-E uses the encapsulation mode described in RFC2473 (IPv6 Tunneling) to transport IPv4 and IPv6 p

Re: [Patch net] net: invert the check of detecting hardware RX checksum fault

2018-11-19 Thread Eric Dumazet
On 11/19/2018 05:42 PM, Cong Wang wrote: > On Fri, Nov 16, 2018 at 12:15 PM Cong Wang wrote: >> >> On Thu, Nov 15, 2018 at 8:52 PM Eric Dumazet wrote: >>> >>> You could use trafgen to cook such a frame and confirm the theory. >>> >>> Something like : >> >> I will try it. > > I just tried it,

Re: [PATCH v1 1/2] ip6_tunnel: Adding support of mapping rules for MAP-E tunnel

2018-11-19 Thread David Miller
Please do not submit completely unrelated changes together in a patch series. Thank you.

[PATCH net-next] tcp: drop dst in tcp_add_backlog()

2018-11-19 Thread Eric Dumazet
Under stress, softirq rx handler often hits a socket owned by the user, and has to queue the packet into socket backlog. When this happens, skb dst refcount is taken before we escape rcu protected region. This is done from __sk_add_backlog() calling skb_dst_force(). Consumer will have to perform

Re: [Patch net] net: invert the check of detecting hardware RX checksum fault

2018-11-19 Thread Cong Wang
On Fri, Nov 16, 2018 at 12:15 PM Cong Wang wrote: > > On Thu, Nov 15, 2018 at 8:52 PM Eric Dumazet wrote: > > > > You could use trafgen to cook such a frame and confirm the theory. > > > > Something like : > > I will try it. I just tried it, it doesn't make much difference, the warning only show

Re: [PATCH iproute2-next 2/8] json: add %hhu helpers

2018-11-19 Thread Jakub Kicinski
On Mon, 19 Nov 2018 17:18:42 -0800, Stephen Hemminger wrote: > > void jsonw_hu_field(json_writer_t *self, const char *prop, unsigned short > > num) > > { > > jsonw_name(self, prop); > > Do you really need this? it turns out that because of C type > conversions print_uint should just work?

Re: [PATCH iproute2] bpf: initialise map symbol before retrieving and comparing its type

2018-11-19 Thread Y Song
On Mon, Nov 19, 2018 at 5:28 PM Quentin Monnet wrote: > > In order to compare BPF map symbol type correctly in regard to the > latest LLVM, commit 7a04dd84a7f9 ("bpf: check map symbol type properly > with newer llvm compiler") compares map symbol type to both NOTYPE and > OBJECT. To do so, it firs

Re: [PATCH bpf-next 2/2] bpf: adding tests for mapinmap helpber in libbpf

2018-11-19 Thread Nikita V. Shirokov
O Mon, Nov 19, 2018 at 05:18:46PM -0800, Y Song wrote: > On Mon, Nov 19, 2018 at 4:13 PM Nikita V. Shirokov > wrote: > > > > adding test/example of bpf_map__add_inner_map_fd usage > > > > Signed-off-by: Nikita V. Shirokov > > --- > > tools/testing/selftests/bpf/Makefile| 3 +- > > tool

Re: [PATCH bpf-next 1/2] bpf: adding support for map in map in libbpf

2018-11-19 Thread Nikita V. Shirokov
On Mon, Nov 19, 2018 at 05:12:43PM -0800, Y Song wrote: > On Mon, Nov 19, 2018 at 4:13 PM Nikita V. Shirokov > wrote: > > > > idea is pretty simple. for specified map (pointed by struct bpf_map) > > we would provide descriptor of already loaded map, which is going to be > > used as a prototype fo

Re: [PATCH net-next 00/11] r8169: series with further smaller improvements

2018-11-19 Thread David Miller
From: Heiner Kallweit Date: Mon, 19 Nov 2018 22:30:25 +0100 > Again nothing exciting, just smaller improvements. Series applied, thank you!

[PATCH v1 1/2] ip6_tunnel: Adding support of mapping rules for MAP-E tunnel

2018-11-19 Thread Felix Jia
From: Blair Steven Mapping of Addresses and Ports with Encapsulation (MAP-E) is defined in RFC7597, and is an IPv6 transition technology providing interoperability between IPv4 and IPv6 networks. MAP-E uses the encapsulation mode described in RFC2473 (IPv6 Tunneling) to transport IPv4 and IPv6 p

[PATCH v1 2/2] netfilter: Add PSID mode to MASQUERADE

2018-11-19 Thread Felix Jia
From: Blair Steven This adds support for masquerading into a smaller subset of ports - defined by the PSID values from RFC-7597 Section 5.1. This is part of the support for MAP-E, which allows multiple devices to share an IPv4 address by splitting the L4 port / id into ranges by both masquerading

[PATCH net-next] net_sched: sch_fq: avoid calling ktime_get_ns() if not needed

2018-11-19 Thread Eric Dumazet
There are two cases were we can avoid calling ktime_get_ns() : 1) Queue is empty. 2) Internal queue is not empty. Signed-off-by: Eric Dumazet --- net/sched/sch_fq.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/net/sched/sch_fq.c b/net/sched/sch_fq.c index 1da886450

[PATCH iproute2] bpf: initialise map symbol before retrieving and comparing its type

2018-11-19 Thread Quentin Monnet
In order to compare BPF map symbol type correctly in regard to the latest LLVM, commit 7a04dd84a7f9 ("bpf: check map symbol type properly with newer llvm compiler") compares map symbol type to both NOTYPE and OBJECT. To do so, it first retrieves the type from "sym.st_info" and stores it into a temp

Re: [PATCH bpf-next] bpf: libbpf: retry program creation without the name

2018-11-19 Thread Y Song
On Mon, Nov 19, 2018 at 4:52 PM Stanislav Fomichev wrote: > > [Recent commit 23499442c319 ("bpf: libbpf: retry map creation without > the name") fixed this issue for maps, let's do the same for programs.] > > Since commit 88cda1c9da02 ("bpf: libbpf: Provide basic API support > to specify BPF obj n

Re: [PATCH bpf-next 2/2] bpf: adding tests for mapinmap helpber in libbpf

2018-11-19 Thread Y Song
On Mon, Nov 19, 2018 at 4:13 PM Nikita V. Shirokov wrote: > > adding test/example of bpf_map__add_inner_map_fd usage > > Signed-off-by: Nikita V. Shirokov > --- > tools/testing/selftests/bpf/Makefile| 3 +- > tools/testing/selftests/bpf/test_mapinmap.c | 53 > tools

Re: [PATCH iproute2-next 2/8] json: add %hhu helpers

2018-11-19 Thread Stephen Hemminger
On Mon, 19 Nov 2018 15:03:29 -0800 Jakub Kicinski wrote: > Add helpers for printing char-size values. > > Signed-off-by: Jakub Kicinski > Reviewed-by: Quentin Monnet > --- > include/json_print.h | 1 + > include/json_writer.h | 2 ++ > lib/json_print.c | 1 + > lib/json_writer.c

Re: [PATCH bpf-next 1/2] bpf: adding support for map in map in libbpf

2018-11-19 Thread Y Song
On Mon, Nov 19, 2018 at 4:13 PM Nikita V. Shirokov wrote: > > idea is pretty simple. for specified map (pointed by struct bpf_map) > we would provide descriptor of already loaded map, which is going to be > used as a prototype for inner map. proposed workflow: > 1) open bpf's object (bpf_object__o

Re: [PATCH bpf-next v2] filter: add BPF_ADJ_ROOM_DATA mode to bpf_skb_adjust_room()

2018-11-19 Thread Daniel Borkmann
On 11/13/2018 05:35 PM, Nicolas Dichtel wrote: > This new mode enables to add or remove an l2 header in a programmatic way > with cls_bpf. > For example, it enables to play with mpls headers. > > Signed-off-by: Nicolas Dichtel > Acked-by: Martin KaFai Lau (Sorry for late reply, swamped due to P

[PATCH bpf-next] bpf: libbpf: retry program creation without the name

2018-11-19 Thread Stanislav Fomichev
[Recent commit 23499442c319 ("bpf: libbpf: retry map creation without the name") fixed this issue for maps, let's do the same for programs.] Since commit 88cda1c9da02 ("bpf: libbpf: Provide basic API support to specify BPF obj name"), libbpf unconditionally sets bpf_attr->name for programs. Pre v4

Re: [PATCH 0/3] Fix unsafe BPF_PROG_TEST_RUN interface

2018-11-19 Thread Daniel Borkmann
On 11/19/2018 03:30 PM, Lorenz Bauer wrote: > On Sun, 18 Nov 2018 at 06:13, Y Song wrote: >> >> There is a slight change of user space behavior for this patch. >> Without this patch, the value bpf_attr.test.data_size_out is output only. >> For example, >>output buffer : out_buf (user allocated

Re: [PATCH bpf-next v2] bpf: libbpf: retry map creation without the name

2018-11-19 Thread Stanislav Fomichev
On 11/20, Daniel Borkmann wrote: > On 11/19/2018 11:49 PM, Stanislav Fomichev wrote: > > Since commit 88cda1c9da02 ("bpf: libbpf: Provide basic API support > > to specify BPF obj name"), libbpf unconditionally sets bpf_attr->name > > for maps. Pre v4.14 kernels don't know about map names and return

[PATCH bpf-next 1/2] bpf: adding support for map in map in libbpf

2018-11-19 Thread Nikita V. Shirokov
idea is pretty simple. for specified map (pointed by struct bpf_map) we would provide descriptor of already loaded map, which is going to be used as a prototype for inner map. proposed workflow: 1) open bpf's object (bpf_object__open) 2) create bpf's map which is going to be used as a prototype 3)

[PATCH bpf-next 0/2] bpf: adding support for mapinmap in libbpf

2018-11-19 Thread Nikita V. Shirokov
in this patch series i'm adding a helper for libbpf which would allow it to load map-in-map(BPF_MAP_TYPE_ARRAY_OF_MAPS and BPF_MAP_TYPE_HASH_OF_MAPS). first patch contains new helper + explains proposed workflow second patch contains tests which also could be used as example of usage Nikita V. Shi

[PATCH bpf-next 2/2] bpf: adding tests for mapinmap helpber in libbpf

2018-11-19 Thread Nikita V. Shirokov
adding test/example of bpf_map__add_inner_map_fd usage Signed-off-by: Nikita V. Shirokov --- tools/testing/selftests/bpf/Makefile| 3 +- tools/testing/selftests/bpf/test_mapinmap.c | 53 tools/testing/selftests/bpf/test_maps.c | 76 +

Re: [PATCH bpf-next v2] bpf: libbpf: retry map creation without the name

2018-11-19 Thread Daniel Borkmann
On 11/19/2018 11:49 PM, Stanislav Fomichev wrote: > Since commit 88cda1c9da02 ("bpf: libbpf: Provide basic API support > to specify BPF obj name"), libbpf unconditionally sets bpf_attr->name > for maps. Pre v4.14 kernels don't know about map names and return an > error about unexpected non-zero dat

Re: [PATCH v3 0/4] bpf: allow zero-initialising hash map seed

2018-11-19 Thread Daniel Borkmann
On 11/16/2018 12:41 PM, Lorenz Bauer wrote: > Allow forcing the seed of a hash table to zero, for deterministic > execution during benchmarking and testing. > > Changes from v2: > * Change ordering of BPF_F_ZERO_SEED in linux/bpf.h > > Comments adressed from v1: > * Add comment to discourage prod

Re: netns_id in bpf_sk_lookup_{tcp,udp}

2018-11-19 Thread David Ahern
On 11/19/18 2:59 PM, Joe Stringer wrote: > @@ -2221,12 +,13 @@ union bpf_attr { > * **sizeof**\ (*tuple*\ **->ipv6**) > * Look for an IPv6 socket. > * > - * If the *netns* is zero, then the socket lookup table in the > - * netns associa

[net 13/13] net/mlx5e: Fix failing ethtool query on FEC query error

2018-11-19 Thread Saeed Mahameed
From: Shay Agroskin If FEC caps query fails when executing 'ethtool ' the whole callback fails unnecessarily, fixed that by replacing the error return code with debug logging only. Fixes: 6cfa94605091 ("net/mlx5e: Ethtool driver callback for query/set FEC policy") Signed-off-by: Shay Agroskin

[net 12/13] net/mlx5e: Removed unnecessary warnings in FEC caps query

2018-11-19 Thread Saeed Mahameed
From: Shay Agroskin Querying interface FEC caps with 'ethtool [int]' after link reset throws warning regading link speed. This warning is not needed as there is already an indication in user space that the link is not up. Fixes: 0696d60853d5 ("net/mlx5e: Receive buffer configuration") Signed-off

[net 07/13] net/mlx5e: Apply the correct check for supporting TC esw rules split

2018-11-19 Thread Saeed Mahameed
From: Roi Dayan The mirror and not the output count is the one denoting a split. Fix to condition the offload attempt on the mirror count being > 0 along the firmware to have the related capability. Fixes: 592d36515969 ("net/mlx5e: Parse mirroring action for offloaded TC eswitch flows") Signed-

[net 10/13] net/mlx5e: Fix a bug in turning off FEC policy in unsupported speeds

2018-11-19 Thread Saeed Mahameed
From: Shay Agroskin Some speeds don't support turning FEC policy off. In case a requested FEC policy is not supported for a speed (including current speed), its new FEC policy would be: no FEC - if disabling FEC is supported for that speed unchanged - else Fixes: 2095b2641477 ("n

[net 09/13] net/mlx5e: Fix selftest for small MTUs

2018-11-19 Thread Saeed Mahameed
From: Valentine Fatiev Loopback test had fixed packet size, which can be bigger than configured MTU. Shorten the loopback packet size to be bigger than minimal MTU allowed by the device. Text field removed from struct 'mlx5ehdr' as redundant to allow send small packets as minimal allowed MTU. Fi

[net 03/13] net/mlx5e: Don't match on vlan non-existence if ethertype is wildcarded

2018-11-19 Thread Saeed Mahameed
From: Or Gerlitz For the "all" ethertype we should not care whether the packet has vlans. Besides being wrong, the way we did it caused FW error for rules such as: tc filter add dev eth0 protocol all parent : \ prio 1 flower skip_sw action drop b/c the matching meta-data (outer head

[net 11/13] net/mlx5e: Fix wrong field name in FEC related functions

2018-11-19 Thread Saeed Mahameed
From: Shay Agroskin This bug would result in reading wrong FEC capabilities for 10G/40G. Fixes: 2095b2641477 ("net/mlx5e: Add port FEC get/set functions") Signed-off-by: Shay Agroskin Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/en/port.c | 4 ++-- 1 file changed,

[net 05/13] net/mlx5e: Always use the match level enum when parsing TC rule match

2018-11-19 Thread Saeed Mahameed
From: Or Gerlitz We get the match level (none, l2, l3, l4) while going over the match dissectors of an offloaded tc rule. When doing this, the match level enum and the not min inline enum values should be used, fix that. This worked accidentally b/c both enums have the same numerical values. Fi

[net 08/13] net/mlx5e: RX, verify received packet size in Linear Striding RQ

2018-11-19 Thread Saeed Mahameed
From: Moshe Shemesh In case of striding RQ, we use MPWRQ (Multi Packet WQE RQ), which means that WQE (RX descriptor) can be used for many packets and so the WQE is much bigger than MTU. In virtualization setups where the port mtu can be larger than the vf mtu, if received packet is bigger than

[net 06/13] net/mlx5e: Adjust to max number of channles when re-attaching

2018-11-19 Thread Saeed Mahameed
From: Yuval Avnery When core driver enters deattach/attach flow after pci reset, Number of logical CPUs may have changed. As a result we need to update the cpu affiliated resource tables. 1. indirect rqt list 2. eq table Reproduction (PowerPC): echo 1000 > /sys/kernel/deb

[net 04/13] net/mlx5e: Claim TC hw offloads support only under a proper build config

2018-11-19 Thread Saeed Mahameed
From: Or Gerlitz Currently, we are only supporting tc hw offloads when the eswitch support is compiled in, but we are not gating the adevertizment of the NETIF_F_HW_TC feature on this config being set. Fix it, and while doing that, also avoid dealing with the feature on ethtool when the config i

[net 01/13] net/mlx5: IPSec, Fix the SA context hash key

2018-11-19 Thread Saeed Mahameed
From: Raed Salem The commit "net/mlx5: Refactor accel IPSec code" introduced a bug where asynchronous short time change in hash key value by create/release SA context might happen during an asynchronous hash resize operation this could cause a subsequent remove SA context operation to fail as the

[net 02/13] net/mlx5e: IPoIB, Reset QP after channels are closed

2018-11-19 Thread Saeed Mahameed
From: Denis Drozdov The mlx5e channels should be closed before mlx5i_uninit_underlay_qp puts the QP into RST (reset) state during mlx5i_close. Currently QP state incorrectly set to RST before channels got deactivated and closed, since mlx5_post_send request expects QP in RTS (Ready To Send) state

[pull request][net 00/13] Mellanox, mlx5 fixes 2018-11-19

2018-11-19 Thread Saeed Mahameed
Hi Dave, The following fixes are for mlx5 core and netdev driver. For -stable v4.16 bc7fda7d4637 ('net/mlx5e: IPoIB, Reset QP after channels are closed') For -stable v4.17 36917a270395 ('net/mlx5: IPSec, Fix the SA context hash key') For -stable v4.18 6492a432be3a ('net/mlx5e: Always use the ma

[PATCH v5 bpf-next 10/13] tools/bpf: do not use pahole if clang/llvm can generate BTF sections

2018-11-19 Thread Martin KaFai Lau
From: Yonghong Song Add additional checks in tools/testing/selftests/bpf and samples/bpf such that if clang/llvm compiler can generate BTF sections, do not use pahole. Signed-off-by: Yonghong Song Signed-off-by: Martin KaFai Lau --- samples/bpf/Makefile | 8 tools/tes

[PATCH v5 bpf-next 13/13] tools/bpf: bpftool: add support for func types

2018-11-19 Thread Martin KaFai Lau
From: Yonghong Song This patch added support to print function signature if btf func_info is available. Note that ksym now uses function name instead of prog_name as prog_name has a limit of 16 bytes including ending '\0'. The following is a sample output for selftests test_btf with file test_bt

[PATCH v5 bpf-next 09/13] tools/bpf: add support to read .BTF.ext sections

2018-11-19 Thread Martin KaFai Lau
From: Yonghong Song The .BTF section is already available to encode types. These types can be used for map pretty print. The whole .BTF will be passed to the kernel as well for which kernel can verify and return to the user space for pretty print etc. The llvm patch at https://reviews.llvm.org/D

[PATCH v5 bpf-next 11/13] tools/bpf: refactor to implement btf_get_from_id() in lib/bpf

2018-11-19 Thread Martin KaFai Lau
From: Yonghong Song The function get_btf() is implemented in tools/bpf/bpftool/map.c to get a btf structure given a map_info. This patch refactored this function to be function btf_get_from_id() in tools/lib/bpf so that it can be used later. Signed-off-by: Yonghong Song Signed-off-by: Martin Ka

[PATCH v5 bpf-next 03/13] tools/bpf: Sync kernel btf.h header

2018-11-19 Thread Martin KaFai Lau
The kernel uapi btf.h is synced to the tools directory. Signed-off-by: Martin KaFai Lau Signed-off-by: Yonghong Song --- tools/include/uapi/linux/btf.h | 18 +++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/tools/include/uapi/linux/btf.h b/tools/include/uapi/lin

[PATCH v5 bpf-next 00/13] bpf: Add btf func info support

2018-11-19 Thread Martin KaFai Lau
The BTF support was added to kernel by Commit 69b693f0aefa ("bpf: btf: Introduce BPF Type Format (BTF)"), which introduced .BTF section into ELF file and is primarily used for map pretty print. pahole is used to convert dwarf to BTF for ELF files. This patch added func info support to the kernel s

[PATCH v5 bpf-next 04/13] tools/bpf: Add tests for BTF_KIND_FUNC_PROTO and BTF_KIND_FUNC

2018-11-19 Thread Martin KaFai Lau
This patch adds unit tests for BTF_KIND_FUNC_PROTO and BTF_KIND_FUNC to test_btf. Signed-off-by: Martin KaFai Lau Signed-off-by: Yonghong Song --- tools/lib/bpf/btf.c| 4 + tools/testing/selftests/bpf/test_btf.c | 474 - 2 files changed, 476 inserti

[PATCH v5 bpf-next 12/13] tools/bpf: enhance test_btf file testing to test func info

2018-11-19 Thread Martin KaFai Lau
From: Yonghong Song Change the bpf programs test_btf_haskv.c and test_btf_nokv.c to have two sections, and enhance test_btf.c test_file feature to test btf func_info returned by the kernel. Signed-off-by: Yonghong Song Signed-off-by: Martin KaFai Lau --- tools/testing/selftests/bpf/test_btf.c

[PATCH v5 bpf-next 02/13] bpf: btf: Add BTF_KIND_FUNC and BTF_KIND_FUNC_PROTO

2018-11-19 Thread Martin KaFai Lau
This patch adds BTF_KIND_FUNC and BTF_KIND_FUNC_PROTO to support the function debug info. BTF_KIND_FUNC_PROTO must not have a name (i.e. !t->name_off) and it is followed by >= 0 'struct bpf_param' objects to describe the function arguments. The BTF_KIND_FUNC must have a valid name and it must ref

[PATCH v5 bpf-next 08/13] tools/bpf: extends test_btf to test load/retrieve func_type info

2018-11-19 Thread Martin KaFai Lau
From: Yonghong Song A two function bpf program is loaded with btf and func_info. After successful prog load, the bpf_get_info syscall is called to retrieve prog info to ensure the types returned from the kernel matches the types passed to the kernel from the user space. Several negative tests ar

[PATCH v5 bpf-next 05/13] bpf: Introduce bpf_func_info

2018-11-19 Thread Martin KaFai Lau
From: Yonghong Song This patch added interface to load a program with the following additional information: . prog_btf_fd . func_info, func_info_rec_size and func_info_cnt where func_info will provide function range and type_id corresponding to each function. The func_info_rec_size is intr

[PATCH v5 bpf-next 06/13] tools/bpf: sync kernel uapi bpf.h header to tools directory

2018-11-19 Thread Martin KaFai Lau
From: Yonghong Song The kernel uapi bpf.h is synced to tools directory. Signed-off-by: Yonghong Song Signed-off-by: Martin KaFai Lau --- tools/include/uapi/linux/bpf.h | 13 + 1 file changed, 13 insertions(+) diff --git a/tools/include/uapi/linux/bpf.h b/tools/include/uapi/linux/

[PATCH v5 bpf-next 07/13] tools/bpf: add new fields for program load in lib/bpf

2018-11-19 Thread Martin KaFai Lau
From: Yonghong Song The new fields are added for program load in lib/bpf so application uses api bpf_load_program_xattr() is able to load program with btf and func_info data. This functionality will be used in next patch by bpf selftest test_btf. Signed-off-by: Yonghong Song Signed-off-by: Mar

[PATCH v5 bpf-next 01/13] bpf: btf: Break up btf_type_is_void()

2018-11-19 Thread Martin KaFai Lau
This patch breaks up btf_type_is_void() into btf_type_is_void() and btf_type_is_fwd(). It also adds btf_type_nosize() to better describe it is testing a type has nosize info. Signed-off-by: Martin KaFai Lau --- kernel/bpf/btf.c | 37 ++--- 1 file changed, 22 inse

[PATCH net-next 02/14] nfp: abm: pass band parameter to functions

2018-11-19 Thread Jakub Kicinski
In preparation for per-band RED offload pass band parameter to functions. For now it will always be 0. Signed-off-by: Jakub Kicinski Reviewed-by: John Hurley --- drivers/net/ethernet/netronome/nfp/abm/ctrl.c | 52 ++- drivers/net/ethernet/netronome/nfp/abm/main.h | 10 ++-- ...

[PATCH net-next 09/14] nfp: abm: add GRED offload

2018-11-19 Thread Jakub Kicinski
Add support for GRED offload. It behaves much like RED, but can apply different parameters to different bands. GRED operates pretty much exactly like our HW/FW with a single FIFO and different RED state instances. Signed-off-by: Jakub Kicinski Reviewed-by: John Hurley --- drivers/net/ethernet

[PATCH net-next 12/14] nfp: abm: add functions to update DSCP -> virtual queue map

2018-11-19 Thread Jakub Kicinski
Learn how to set the DSCP map. FW uses a packed array which geometry depends on the number of supported priorities and virtual queues. Write code to assemble this map and to communicate the setting to the FW via mailbox. Signed-off-by: Jakub Kicinski Reviewed-by: John Hurley --- drivers/net/e

[PATCH net-next 07/14] net: sched: gred: support reporting stats from offloads

2018-11-19 Thread Jakub Kicinski
Allow drivers which offload GRED to report back statistics. Since A lot of GRED stats is fairly ad hoc in nature pass to drivers the standard struct gnet_stats_basic/gnet_stats_queue pairs, and untangle the values in the core. Signed-off-by: Jakub Kicinski Reviewed-by: John Hurley --- include/

[PATCH net-next 05/14] nfp: abm: add up bands for sto/non-sto stats

2018-11-19 Thread Jakub Kicinski
Add up stats for all bands for the extra ethtool statistics. Signed-off-by: Jakub Kicinski Reviewed-by: John Hurley --- drivers/net/ethernet/netronome/nfp/abm/ctrl.c | 36 --- 1 file changed, 24 insertions(+), 12 deletions(-) diff --git a/drivers/net/ethernet/netronome/nfp/abm/

[PATCH net-next 11/14] nfp: abm: calculate PRIO map len and check mailbox size

2018-11-19 Thread Jakub Kicinski
In preparation for PRIO offload calculate how long the prio map for FW will be and make sure the configuration can be performed via the vNIC mailbox. Signed-off-by: Jakub Kicinski Reviewed-by: John Hurley --- drivers/net/ethernet/netronome/nfp/abm/ctrl.c | 42 ++- drivers/net/et

[PATCH net-next 14/14] nfp: abm: add support for more threshold actions

2018-11-19 Thread Jakub Kicinski
Original FW only allowed us to perform ECN marking. Newer releases also support plain old drop. Add the ability to configure drop policy. This is particularly useful in combination with GRED, because different bands can have different ECN marking setting. Signed-off-by: Jakub Kicinski Reviewed

[PATCH net-next 03/14] nfp: abm: size threshold table to account for bands

2018-11-19 Thread Jakub Kicinski
Make sure the threshold table is large enough to hold information for all bands. Signed-off-by: Jakub Kicinski Reviewed-by: John Hurley --- drivers/net/ethernet/netronome/nfp/abm/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/netronome/nfp/ab

[PATCH net-next 04/14] nfp: abm: switch to extended stats for reading packet/byte counts

2018-11-19 Thread Jakub Kicinski
In PRIO-enabled FW read the statistics from per-band symbol, rather than from the standard per-PCIe-queue counters. Signed-off-by: Jakub Kicinski Reviewed-by: John Hurley --- drivers/net/ethernet/netronome/nfp/abm/ctrl.c | 47 +-- drivers/net/ethernet/netronome/nfp/abm/main.h |

[PATCH net-next 06/14] net: sched: gred: add basic Qdisc offload

2018-11-19 Thread Jakub Kicinski
Add basic offload for the GRED Qdisc. Inform the drivers any time Qdisc or virtual queue configuration changes. Signed-off-by: Jakub Kicinski Reviewed-by: John Hurley --- include/linux/netdevice.h | 1 + include/net/pkt_cls.h | 36 ++ net/sched/sch_gred.c

[PATCH net-next 08/14] nfp: abm: wrap RED parameters in bands

2018-11-19 Thread Jakub Kicinski
Wrap RED parameters and stats into a structure, and a 1-element array. Upcoming GRED offload will add the support for more bands. Signed-off-by: Jakub Kicinski Reviewed-by: John Hurley --- drivers/net/ethernet/netronome/nfp/abm/main.h | 26 +++--- .../net/ethernet/netronome/nfp/abm/qdisc.c

[PATCH net-next 13/14] nfp: abm: add cls_u32 offload for simple band classification

2018-11-19 Thread Jakub Kicinski
Use offload of very simple u32 filters to direct packets to GRED bands based on the DSCP marking. No u32 hashing is supported, just plain simple filters matching on ToS or Priority with appropriate mask device can support. Signed-off-by: Jakub Kicinski Reviewed-by: John Hurley --- drivers/net/

[PATCH net-next 10/14] net: sched: cls_u32: add res to offload information

2018-11-19 Thread Jakub Kicinski
In case of egress offloads the class/flowid assigned by the filter may be very important for offloaded Qdisc selection. Provide this info to drivers. Signed-off-by: Jakub Kicinski Reviewed-by: John Hurley --- include/net/pkt_cls.h | 1 + net/sched/cls_u32.c | 2 ++ 2 files changed, 3 inserti

[PATCH net-next 01/14] nfp: abm: map per-band symbols

2018-11-19 Thread Jakub Kicinski
In preparation for multi-band RED offload if FW is capable map the extended symbols which will allow us to set per-band parameters and read stats. Signed-off-by: Jakub Kicinski Reviewed-by: John Hurley --- drivers/net/ethernet/netronome/nfp/abm/ctrl.c | 56 ++- drivers/net/ether

[PATCH net-next 00/14] gred: add offload support

2018-11-19 Thread Jakub Kicinski
Hi! This series adds support for GRED offload in the nfp driver. So far we have only supported the RED Qdisc offload, but we need a way to differentiate traffic types e.g. based on DSCP marking. It may seem like PRIO+RED is a good match for this job, however, (a) we don't need strict priority be

Re: [PATCH V1 net 0/3] net: ena: hibernation and rmmod bug fixes

2018-11-19 Thread David Miller
From: Date: Mon, 19 Nov 2018 12:05:19 +0200 > From: Arthur Kiyanovski > > This patchset includes 2 bug fixes: > 1. A fix to a crash during resume from hibernation. > 2. A fix to an illegal memory access during driver removal (e.g. during rmmod) >which might cause a crash in certain systems.

Re: [PATCH] ipv4: allow newer DSCP values in ip rules

2018-11-19 Thread David Miller
From: Pavel Balaev Date: Mon, 19 Nov 2018 12:00:45 +0300 > After this patch this one can use it: You can "configure it" but it doesn't work at all. Did you test this in any way beyond simply dumping the FIB rule tables? The whole kernel masks the TOS value using RT_TOS() so it is going to cle

[PATCH v2 5/5] Bluetooth: btusb: Use the hw_reset method to allow resetting the BT chip

2018-11-19 Thread Rajat Jain
If the platform provides it, use the reset gpio to reset the BT chip (requested by the HCI core if needed). This has been found helpful on some of Intel bluetooth controllers where the firmware gets stuck and the only way out is a hard reset pin provided by the platform. Signed-off-by: Rajat Jain

[PATCH iproute2-next 1/8] tc: gred: remove unclear comment

2018-11-19 Thread Jakub Kicinski
The comment about providing a proper message seems similar to the comment in the kernel which says: /* hack -- fix at some point with proper message This is how we indicate to tc that there is no VQ at this DP */ it's unclear what that message would be, and whether it's needed.

[PATCH iproute2-next 5/8] tc: gred: separate out stats printing

2018-11-19 Thread Jakub Kicinski
Printing GRED statistics is long and deserves a function on its own. Signed-off-by: Jakub Kicinski Reviewed-by: Quentin Monnet --- tc/q_gred.c | 67 +++-- 1 file changed, 34 insertions(+), 33 deletions(-) diff --git a/tc/q_gred.c b/tc/q_gred.c in

[PATCH iproute2-next 4/8] tc: gred: jsonify GRED output

2018-11-19 Thread Jakub Kicinski
Make GRED dump JSON-compatible. Signed-off-by: Jakub Kicinski Reviewed-by: Quentin Monnet --- tc/q_gred.c | 105 1 file changed, 74 insertions(+), 31 deletions(-) diff --git a/tc/q_gred.c b/tc/q_gred.c index 80a9ccbbd3cb..768b77ba3b0d 100644

[PATCH iproute2-next 2/8] json: add %hhu helpers

2018-11-19 Thread Jakub Kicinski
Add helpers for printing char-size values. Signed-off-by: Jakub Kicinski Reviewed-by: Quentin Monnet --- include/json_print.h | 1 + include/json_writer.h | 2 ++ lib/json_print.c | 1 + lib/json_writer.c | 11 +++ 4 files changed, 15 insertions(+) diff --git a/include/jso

[PATCH iproute2-next 3/8] tc: move RED flag printing to helper

2018-11-19 Thread Jakub Kicinski
Number of qdiscs use the same set of flags to control shared RED implementation. Add a helper for printing those flags. Signed-off-by: Jakub Kicinski Reviewed-by: Quentin Monnet --- tc/q_choke.c | 3 +-- tc/q_red.c | 14 ++ tc/q_sfq.c | 3 +-- tc/tc_red.c | 20 ++

[PATCH iproute2-next 6/8] tc: gred: use extended stats if available

2018-11-19 Thread Jakub Kicinski
Use the extended attributes with extra and better stats, when possible. Signed-off-by: Jakub Kicinski Reviewed-by: Quentin Monnet --- tc/q_gred.c | 122 1 file changed, 114 insertions(+), 8 deletions(-) diff --git a/tc/q_gred.c b/tc/q_gred.c

  1   2   3   >