Re: [PATCH bpf-next 4/7] nfp: bpf: copy range info for all operands of all ALU operations

2018-06-25 Thread Song Liu
On Sun, Jun 24, 2018 at 8:54 PM, Jakub Kicinski wrote: > From: Jiong Wang > > NFP verifier hook is coping range information of the shift amount for > indirect shift operation so optimized shift sequences could be generated. > > We want to use range info to do more things. For example, to decide w

Re: [patch net-next 0/9] net: sched: introduce chain templates support with offloading to mlxsw

2018-06-25 Thread Jiri Pirko
Tue, Jun 26, 2018 at 06:58:50AM CEST, jakub.kicin...@netronome.com wrote: >On Mon, 25 Jun 2018 23:01:39 +0200, Jiri Pirko wrote: >> From: Jiri Pirko >> >> For the TC clsact offload these days, some of HW drivers need >> to hold a magic ball. The reason is, with the first inserted rule inside >> H

Re: [patch net-next 6/9] net: sched: cls_flower: propagate chain teplate creation and destruction to drivers

2018-06-25 Thread Jiri Pirko
Tue, Jun 26, 2018 at 07:00:50AM CEST, jakub.kicin...@netronome.com wrote: >On Mon, 25 Jun 2018 23:01:45 +0200, Jiri Pirko wrote: >> From: Jiri Pirko >> >> Introduce a couple of flower offload commands in order to propagate >> template creation/destruction events down to device drivers. >> Drivers

Re: [PATCH bpf-next 2/7] lib: reciprocal_div: implement the improved algorithm on the paper mentioned

2018-06-25 Thread Song Liu
On Sun, Jun 24, 2018 at 8:54 PM, Jakub Kicinski wrote: > From: Jiong Wang > > The new added "reciprocal_value_adv" implements the advanced version of the > algorithm described in Figure 4.2 of the paper except when dividend has MSB > set which would require u128 divide on host and actually could

Re: [PATCH bpf-next 3/7] nfp: bpf: rename umin/umax to umin_src/umax_src

2018-06-25 Thread Song Liu
On Sun, Jun 24, 2018 at 8:54 PM, Jakub Kicinski wrote: > From: Jiong Wang > > The two fields are a copy of umin and umax info of bpf_insn->src_reg > generated by verifier. > > Rename to make their meaning clear. > > Signed-off-by: Jiong Wang > Reviewed-by: Jakub Kicinski Acked-by: Song Liu >

Re: [PATCH bpf-next 1/7] nfp: bpf: allow source ptr type be map ptr in memcpy optimization

2018-06-25 Thread Song Liu
On Sun, Jun 24, 2018 at 8:54 PM, Jakub Kicinski wrote: > From: Jiong Wang > > Map read has been supported on NFP, this patch enables optimization for > memcpy from map to packet. > > This patch also fixed one latent bug which will cause copying from > unexpected address once memcpy for map pointe

Re: [PATCH net-next 2/3] rds: Enable RDS IPv6 support

2018-06-25 Thread Ka-Cheong Poon
On 06/26/2018 01:50 AM, Sowmini Varadhan wrote: If a socket is bound, I guess the scope_id should be used. So if a socket is not bound to a link local address and the socket is used to sent to a link local peer, it should fail. PF_RDS sockets *MUST* alwasy be bound. See Documentation/network

Re: [patch net-next 6/9] net: sched: cls_flower: propagate chain teplate creation and destruction to drivers

2018-06-25 Thread Jakub Kicinski
On Mon, 25 Jun 2018 23:01:45 +0200, Jiri Pirko wrote: > From: Jiri Pirko > > Introduce a couple of flower offload commands in order to propagate > template creation/destruction events down to device drivers. > Drivers may use this information to prepare HW in an optimal way > for future filter in

Re: [patch net-next 0/9] net: sched: introduce chain templates support with offloading to mlxsw

2018-06-25 Thread Jakub Kicinski
On Mon, 25 Jun 2018 23:01:39 +0200, Jiri Pirko wrote: > From: Jiri Pirko > > For the TC clsact offload these days, some of HW drivers need > to hold a magic ball. The reason is, with the first inserted rule inside > HW they need to guess what fields will be used for the matching. If > later on th

Re: [PATCHv2 net-next] sctp: add support for SCTP_REUSE_PORT sockopt

2018-06-25 Thread Xin Long
On Mon, Jun 25, 2018 at 9:30 PM, Marcelo Ricardo Leitner wrote: > On Mon, Jun 25, 2018 at 10:06:46AM +0800, Xin Long wrote: >> This feature is actually already supported by sk->sk_reuse which can be >> set by socket level opt SO_REUSEADDR. But it's not working exactly as >> RFC6458 demands in sect

Re: [PATCH net-next 1/5] ipv4: add __ip_queue_xmit() that supports tos param

2018-06-25 Thread Xin Long
On Mon, Jun 25, 2018 at 7:13 PM, Neil Horman wrote: > On Mon, Jun 25, 2018 at 04:26:54PM +0900, David Miller wrote: >> From: Xin Long >> Date: Mon, 25 Jun 2018 10:14:33 +0800 >> >> > +EXPORT_SYMBOL(__ip_queue_xmit); >> > + >> > +int ip_queue_xmit(struct sock *sk, struct sk_buff *skb, struct flowi

Re: [PATCH net-next 3/5] sctp: add spp_ipv6_flowlabel and spp_dscp for sctp_paddrparams

2018-06-25 Thread Xin Long
On Tue, Jun 26, 2018 at 12:31 AM, Marcelo Ricardo Leitner wrote: > Hi, > > On Tue, Jun 26, 2018 at 01:12:00AM +0900, 吉藤英明 wrote: >> Hi, >> >> 2018-06-25 22:03 GMT+09:00 Marcelo Ricardo Leitner >> : >> > On Mon, Jun 25, 2018 at 07:28:47AM -0400, Neil Horman wrote: >> >> On Mon, Jun 25, 2018 at 04:

Re: [PATCH rdma-next 00/12] RDMA fixes 2018-06-24

2018-06-25 Thread Leon Romanovsky
On Mon, Jun 25, 2018 at 03:34:38PM -0600, Jason Gunthorpe wrote: > On Sun, Jun 24, 2018 at 11:23:41AM +0300, Leon Romanovsky wrote: > > From: Leon Romanovsky > > > > Hi, > > > > This is bunch of patches trigged by running syzkaller internally. > > > > I'm sending them based on rdma-next mainly for

[PATCH net v2 0/2] nfp: MPLS and shared blocks TC offload fixes

2018-06-25 Thread Jakub Kicinski
Hi! This series brings two fixes to TC filter/action offload code. Pieter fixes matching MPLS packets when the match is purely on the MPLS ethertype and none of the MPLS fields are used. John provides a fix for offload of shared blocks. Unfortunately, with shared blocks there is currently no guar

[PATCH net v2 2/2] nfp: reject binding to shared blocks

2018-06-25 Thread Jakub Kicinski
From: John Hurley TC shared blocks allow multiple qdiscs to be grouped together and filters shared between them. Currently the chains of filters attached to a block are only flushed when the block is removed. If a qdisc is removed from a block but the block still exists, flow del messages are not

[PATCH net v2 1/2] nfp: flower: fix mpls ether type detection

2018-06-25 Thread Jakub Kicinski
From: Pieter Jansen van Vuuren Previously it was not possible to distinguish between mpls ether types and other ether types. This leads to incorrect classification of offloaded filters that match on mpls ether type. For example the following two filters overlap: # tc filter add dev eth0 parent

[PATCH net-next] neighbour: force neigh_invalidate when NUD_FAILED update is from admin

2018-06-25 Thread Roopa Prabhu
From: Roopa Prabhu In systems where neigh gc thresh holds are set to high values, admin deleted neigh entries (eg ip neigh flush or ip neigh del) can linger around in NUD_FAILED state for a long time until periodic gc kicks in. This patch forces neigh_invalidate when NUD_FAILED neigh_update is fr

Re: [net-next PATCH v4 3/7] net: sock: Change tx_queue_mapping in sock_common to unsigned short

2018-06-25 Thread Alexander Duyck
On Mon, Jun 25, 2018 at 6:34 PM, Tom Herbert wrote: > > > On Mon, Jun 25, 2018 at 11:04 AM, Amritha Nambiar > wrote: >> >> Change 'skc_tx_queue_mapping' field in sock_common structure from >> 'int' to 'unsigned short' type with 0 indicating unset and >> a positive queue value being set. This way

Re: [PATCH net-next] tcp: add SNMP counter for zero-window drops

2018-06-25 Thread David Miller
From: Yafang Shao Date: Sun, 24 Jun 2018 10:02:54 -0400 > It will be helpful if we could display the drops due to zero window or no > enough window space. > So a new SNMP MIB entry is added to track this behavior. > This entry is named LINUX_MIB_TCPZEROWINDOWDROP and published in > /proc/net/nets

Re: [PATCH v2 net] nfp: cast sizeof() to int when comparing with error code

2018-06-25 Thread cgxu519
On 06/26/2018 10:29 AM, Joe Perches wrote: On Tue, 2018-06-26 at 09:16 +0800, Chengguang Xu wrote: sizeof() will return unsigned value so in the error check negative error code will be always larger than sizeof(). [] diff --git a/drivers/net/ethernet/netronome/nfp/nfpcore/nfp_nffw.c b/driv

Re: [PATCH v2 net] nfp: cast sizeof() to int when comparing with error code

2018-06-25 Thread Joe Perches
On Tue, 2018-06-26 at 09:16 +0800, Chengguang Xu wrote: > sizeof() will return unsigned value so in the error check > negative error code will be always larger than sizeof(). [] > diff --git a/drivers/net/ethernet/netronome/nfp/nfpcore/nfp_nffw.c > b/drivers/net/ethernet/netronome/nfp/nfpcore/nfp_

[PATCH net-next] liquidio: fix kernel panic when NIC firmware is older than 1.7.2

2018-06-25 Thread Felix Manlunas
From: Rick Farrington Pre-1.7.2 NIC firmware does not support (and does not respond to) the "get speed" command which is sent by the 1.7.2 driver during modprobe. Due to a bug in older firmware (with respect to unknown commands), this unsupported command causes a cascade of errors that ends in a

Re: [net-next PATCH v4 5/7] net: Enable Tx queue selection based on Rx queues

2018-06-25 Thread kbuild test robot
Hi Amritha, Thank you for the patch! Yet something to improve: [auto build test ERROR on net-next/master] url: https://github.com/0day-ci/linux/commits/Amritha-Nambiar/Symmetric-queue-selection-using-XPS-for-Rx-queues/20180626-070944 config: i386-randconfig-x078-201825 (attached as .config)

Re: [PATCH net 2/2] nfp: reject binding to shared blocks

2018-06-25 Thread kbuild test robot
Hi John, Thank you for the patch! Yet something to improve: [auto build test ERROR on net/master] url: https://github.com/0day-ci/linux/commits/Jakub-Kicinski/nfp-MPLS-and-shared-blocks-TC-offload-fixes/20180626-042358 config: x86_64-randconfig-u0-06260533 (attached as .config) compiler: gcc

[PATCH v2 net] nfp: cast sizeof() to int when comparing with error code

2018-06-25 Thread Chengguang Xu
sizeof() will return unsigned value so in the error check negative error code will be always larger than sizeof(). Fixes: a0d8e02c35ff ("nfp: add support for reading nffw info") Signed-off-by: Chengguang Xu Acked-by: Jakub Kicinski --- v2: - Add more information to patch subject and commit log.

Re: [PATCH v2 net-next 3/4] netdevsim: add ipsec offload testing

2018-06-25 Thread Jakub Kicinski
On Mon, 25 Jun 2018 16:41:35 -0700, Shannon Nelson wrote: > Implement the IPsec/XFRM offload API for testing. > > Signed-off-by: Shannon Nelson > --- > V2 - addressed formatting comments from Jakub Kicinski Thanks! One more comment below, otherwise: Reviewed-by: Jakub Kicinski > +static void

Re: [PATCH v2 net-next] net/sched: add skbprio scheduler

2018-06-25 Thread Nishanth Devarajan
On Sun, Jun 24, 2018 at 11:43:07AM -0400, Jamal Hadi Salim wrote: > On 23/06/18 04:47 PM, Nishanth Devarajan wrote: > [..] > > >+/* Drop the packet at the tail of the lowest priority qdisc. */ > >+lp_qdisc = &q->qdiscs[lp]; > >+to_drop = __skb_dequeue_tail(lp_qdisc); > >+BUG_ON(!to

Re: [RFC v2 PATCH 0/4] eBPF and struct scatterlist

2018-06-25 Thread Tushar Dave
On 06/19/2018 11:00 AM, Tushar Dave wrote: This follows up on https://patchwork.ozlabs.org/cover/927050/ where the review feedback was to use bpf_skb_load_bytes() to deal with linear and non-linear skbs. While that feedback is valid and correct, the motivation for this work is to allow eBPF ba

Re: [PATCH v2 net-next] net/sched: add skbprio scheduler

2018-06-25 Thread Nishanth Devarajan
On Sat, Jun 23, 2018 at 03:10:32PM -0700, Alexander Duyck wrote: > On Sat, Jun 23, 2018 at 1:47 PM, Nishanth Devarajan > wrote: > > net/sched: add skbprio scheduler > > > > Skbprio (SKB Priority Queue) is a queueing discipline that prioritizes > > packets > > according to their skb->priority fie

[PATCH net-next 6/6] selftests: forwarding: README: Require diagrams

2018-06-25 Thread Petr Machata
ASCII art diagrams are well suited for presenting the topology that a test uses while being easy to embed directly in the test file iteslf. They make the information very easy to grasp even for simple topologies, and for more complex ones they are almost essential, as figuring out the interconnects

[PATCH net-next 3/6] selftests: forwarding: tc_rule_stats_get: Parameterize direction

2018-06-25 Thread Petr Machata
The GRE multipath tests need stats on an egress counter. Change tc_rule_stats_get() to take direction as an optional argument, with default of ingress. Take the opportunity to change line continuation character from | to \. Move the | to the next line, which indent. Signed-off-by: Petr Machata R

[PATCH net-next 5/6] selftests: forwarding: Test multipath tunneling

2018-06-25 Thread Petr Machata
Add a GRE-tunneling test such that there are two tunnels involved, with a multipath route listing both as next hops. Similarly to router_multipath.sh, test that the distribution of traffic to the tunnels honors the configured weights. Signed-off-by: Petr Machata Reviewed-by: Ido Schimmel --- ..

[PATCH net-next 4/6] selftests: forwarding: lib: Extract interface-init functions

2018-06-25 Thread Petr Machata
The function simple_if_init() does two things: it creates a VRF, then moves an interface into this VRF and configures addresses. The latter comes in handy when adding more interfaces into a VRF later on. The situation is similar for simple_if_fini(). Therefore split the interface remastering and a

[PATCH net-next 1/6] selftests: forwarding: Move multipath_eval() to lib.sh

2018-06-25 Thread Petr Machata
This function will be useful for the GRE multipath test that is coming later. Signed-off-by: Petr Machata Reviewed-by: Ido Schimmel --- tools/testing/selftests/net/forwarding/lib.sh | 39 ++ .../selftests/net/forwarding/router_multipath.sh | 39 --

[PATCH net-next 2/6] selftests: forwarding: multipath_eval(): Improve style

2018-06-25 Thread Petr Machata
- Change the indentation of the function body from 7 spaces to one tab. - Move initialization of weights_ratio up so that it can be referenced from the error message about packet difference being zero. - Move |'s consistently to continuation line, which reindent. Signed-off-by: Petr Machata Rev

[PATCH net-next 0/6] Multipath tests for tunnel devices

2018-06-25 Thread Petr Machata
This patchset adds a test for ECMP and weighted ECMP between two GRE tunnels. In patches #1 and #2, the function multipath_eval() is first moved from router_multipath.sh to lib.sh for ease of reuse, and then fixed up. In patch #3, the function tc_rule_stats_get() is parameterized to be useful for

[PATCH v2 net-next 2/4] selftests: rtnetlink: use dummydev as a test device

2018-06-25 Thread Shannon Nelson
We really shouldn't mess with local system settings, so let's use the already created dummy device instead for ipsec testing. Oh, and let's put the temp file into a proper directory. Signed-off-by: Shannon Nelson --- tools/testing/selftests/net/rtnetlink.sh | 15 +++ 1 file changed,

[PATCH v2 net-next 4/4] selftests: rtnetlink: add ipsec offload API test

2018-06-25 Thread Shannon Nelson
Using the netdevsim as a device for testing, try out the XFRM commands for setting up IPsec hardware offloads. Signed-off-by: Shannon Nelson --- tools/testing/selftests/net/rtnetlink.sh | 114 +++ 1 file changed, 114 insertions(+) diff --git a/tools/testing/selftests

[PATCH v2 net-next 3/4] netdevsim: add ipsec offload testing

2018-06-25 Thread Shannon Nelson
Implement the IPsec/XFRM offload API for testing. Signed-off-by: Shannon Nelson --- V2 - addressed formatting comments from Jakub Kicinski drivers/net/netdevsim/Makefile| 4 + drivers/net/netdevsim/ipsec.c | 298 ++ drivers/net/netdevsim/netdev.c

[PATCH v2 net-next 0/4] Updates for ipsec selftests

2018-06-25 Thread Shannon Nelson
Fix up the existing ipsec selftest and add tests for the ipsec offload driver API. v2: addressed formatting nits in netdevsim from Jakub Kicinski Shannon Nelson (4): selftests: rtnetlink: clear the return code at start of ipsec test selftests: rtnetlink: use dummydev as a test device netdev

[PATCH v2 net-next 1/4] selftests: rtnetlink: clear the return code at start of ipsec test

2018-06-25 Thread Shannon Nelson
Following the custom from the other functions, clear the global ret code before starting the test so as to not have previously failed tests cause us to thing this test has failed. Reported-by: Anders Roxell Signed-off-by: Shannon Nelson --- tools/testing/selftests/net/rtnetlink.sh | 2 ++ 1 fil

[PATCH v2] fib_rules: match rules based on suppress_* properties too

2018-06-25 Thread Jason A. Donenfeld
Two rules with different values of suppress_prefix or suppress_ifgroup are not the same. This fixes an -EEXIST when running: $ ip -4 rule add table main suppress_prefixlength 0 Signed-off-by: Jason A. Donenfeld Fixes: f9d4b0c1e969 ("fib_rules: move common handling of newrule delrule msgs int

Re: [PATCH net 2/2] nfp: reject binding to shared blocks

2018-06-25 Thread kbuild test robot
Hi John, Thank you for the patch! Yet something to improve: [auto build test ERROR on net/master] url: https://github.com/0day-ci/linux/commits/Jakub-Kicinski/nfp-MPLS-and-shared-blocks-TC-offload-fixes/20180626-042358 config: i386-randconfig-x001-201825 (attached as .config) compiler: gcc-7

[PATCH 3/4] net: lan78xx: Add support for VLAN tag stripping.

2018-06-25 Thread Dave Stevenson
The chip supports stripping the VLAN tag and reporting it in metadata. Complete the support for this. Signed-off-by: Dave Stevenson --- drivers/net/usb/lan78xx.c | 22 ++ 1 file changed, 22 insertions(+) diff --git a/drivers/net/usb/lan78xx.c b/drivers/net/usb/lan78xx.c inde

Re: [PATCH v2 net-next] net/sched: add skbprio scheduler

2018-06-25 Thread Nishanth Devarajan
On Sat, Jun 23, 2018 at 02:43:16PM -0700, Cong Wang wrote: > On Sat, Jun 23, 2018 at 1:47 PM, Nishanth Devarajan > wrote: > > diff --git a/include/uapi/linux/pkt_sched.h b/include/uapi/linux/pkt_sched.h > > index 37b5096..6fd07e8 100644 > > --- a/include/uapi/linux/pkt_sched.h > > +++ b/include/u

[PATCH net-next] selftests: forwarding: mirror_gre_vlan_bridge_1q: Unset rp_filter

2018-06-25 Thread Petr Machata
The IP addresses of tunnel endpoint at H3 are set at the VLAN device $h3.555. Therefore when test_gretap_untagged_egress() sets vlan 555 to egress untagged at $swp3, $h3's rp_filter rejects these packets. The test then spuriously fails. Therefore turn off net.ipv4.conf.{all, $h3}.rp_filter. Fixes

Re: [PATCH net-next 3/4] netdevsim: add ipsec offload testing

2018-06-25 Thread Jakub Kicinski
On Mon, 25 Jun 2018 15:37:10 -0700, Shannon Nelson wrote: > On 6/22/2018 9:07 PM, Jakub Kicinski wrote: > > On Fri, 22 Jun 2018 17:31:37 -0700, Shannon Nelson wrote: > >> Implement the IPsec/XFRM offload API for testing. > >> > >> Signed-off-by: Shannon Nelson > >> +#define NSIM_IPSEC_AUTH_BIT

[net-next PATCH v4 7/7] Documentation: Add explanation for XPS using Rx-queue(s) map

2018-06-25 Thread Amritha Nambiar
Signed-off-by: Amritha Nambiar --- Documentation/ABI/testing/sysfs-class-net-queues | 11 Documentation/networking/scaling.txt | 57 ++ 2 files changed, 58 insertions(+), 10 deletions(-) diff --git a/Documentation/ABI/testing/sysfs-class-net-queues b/Doc

[net-next PATCH v4 6/7] net-sysfs: Add interface for Rx queue(s) map per Tx queue

2018-06-25 Thread Amritha Nambiar
Extend transmit queue sysfs attribute to configure Rx queue(s) map per Tx queue. By default no receive queues are configured for the Tx queue. - /sys/class/net/eth0/queues/tx-*/xps_rxqs Signed-off-by: Amritha Nambiar --- net/core/net-sysfs.c | 81 ++

[net-next PATCH v4 4/7] net: Record receive queue number for a connection

2018-06-25 Thread Amritha Nambiar
This patch adds a new field to sock_common 'skc_rx_queue_mapping' which holds the receive queue number for the connection. The Rx queue is marked in tcp_finish_connect() to allow a client app to do SO_INCOMING_NAPI_ID after a connect() call to get the right queue association for a socket. Rx queue

[net-next PATCH v4 5/7] net: Enable Tx queue selection based on Rx queues

2018-06-25 Thread Amritha Nambiar
This patch adds support to pick Tx queue based on the Rx queue(s) map configuration set by the admin through the sysfs attribute for each Tx queue. If the user configuration for receive queue(s) map does not apply, then the Tx queue selection falls back to CPU(s) map based selection and finally to

[net-next PATCH v4 0/7] Symmetric queue selection using XPS for Rx queues

2018-06-25 Thread Amritha Nambiar
This patch series implements support for Tx queue selection based on Rx queue(s) map. This is done by configuring Rx queue(s) map per Tx-queue using sysfs attribute. If the user configuration for Rx queues does not apply, then the Tx queue selection falls back to XPS using CPUs and finally to hashi

[net-next PATCH v4 3/7] net: sock: Change tx_queue_mapping in sock_common to unsigned short

2018-06-25 Thread Amritha Nambiar
Change 'skc_tx_queue_mapping' field in sock_common structure from 'int' to 'unsigned short' type with 0 indicating unset and a positive queue value being set. This way it is consistent with the queue_mapping field in the sk_buff. This will also accommodate adding a new 'unsigned short' field in soc

[net-next PATCH v4 1/7] net: Refactor XPS for CPUs and Rx queues

2018-06-25 Thread Amritha Nambiar
Refactor XPS code to support Tx queue selection based on CPU(s) map or Rx queue(s) map. Signed-off-by: Amritha Nambiar --- include/linux/cpumask.h | 11 ++ include/linux/netdevice.h | 100 + net/core/dev.c| 211 ++---

[net-next PATCH v4 2/7] net: Use static_key for XPS maps

2018-06-25 Thread Amritha Nambiar
Use static_key for XPS maps to reduce the cost of extra map checks, similar to how it is used for RPS and RFS. This includes static_key 'xps_needed' for XPS and another for 'xps_rxqs_needed' for XPS using Rx queues map. Signed-off-by: Amritha Nambiar --- net/core/dev.c | 26 +++

Re: [PATCH net-next 3/4] netdevsim: add ipsec offload testing

2018-06-25 Thread Shannon Nelson
On 6/22/2018 9:07 PM, Jakub Kicinski wrote: On Fri, 22 Jun 2018 17:31:37 -0700, Shannon Nelson wrote: Implement the IPsec/XFRM offload API for testing. Signed-off-by: Shannon Nelson Thanks for the patch! Just a number of stylistic nit picks. diff --git a/drivers/net/netdevsim/ipsec.c b/dr

Re: [PATCH net-next v2 7/7] net: sched: call reoffload op on block callback reg

2018-06-25 Thread Jiri Pirko
Mon, Jun 25, 2018 at 11:30:10PM CEST, jakub.kicin...@netronome.com wrote: >From: John Hurley > >Call the reoffload tcf_proto_op on all tcf_proto nodes in all chains of a >block when a callback tries to register to a block that already has >offloaded rules. If all existing rules cannot be offloaded

Re: [PATCH net-next v2 4/7] net: sched: cls_matchall: implement offload tcf_proto_op

2018-06-25 Thread Jiri Pirko
Mon, Jun 25, 2018 at 11:30:07PM CEST, jakub.kicin...@netronome.com wrote: >From: John Hurley > >Add the reoffload tcf_proto_op in matchall to generate an offload message >for each filter in the given tcf_proto. Call the specified callback with >this new offload message. The function only returns a

Re: [PATCH net-next v2 3/7] net: sched: cls_flower: implement offload tcf_proto_op

2018-06-25 Thread Jiri Pirko
Mon, Jun 25, 2018 at 11:30:06PM CEST, jakub.kicin...@netronome.com wrote: >From: John Hurley > >Add the reoffload tcf_proto_op in flower to generate an offload message >for each filter in the given tcf_proto. Call the specified callback with >this new offload message. The function only returns an

Re: [PATCH net-next v2 2/7] net: sched: add tcf_proto_op to offload a rule

2018-06-25 Thread Jiri Pirko
Mon, Jun 25, 2018 at 11:30:05PM CEST, jakub.kicin...@netronome.com wrote: >From: John Hurley > >Create a new tcf_proto_op called 'reoffload' that generates a new offload >message for each node in a tcf_proto. Pointers to the tcf_proto and >whether the offload request is to add or delete the node a

Re: [PATCH net-next v2 1/7] net: sched: pass extack pointer to block binds and cb registration

2018-06-25 Thread Jiri Pirko
Mon, Jun 25, 2018 at 11:30:04PM CEST, jakub.kicin...@netronome.com wrote: >From: John Hurley > >Pass the extact struct from a tc qdisc add to the block bind function and, >in turn, to the setup_tc ndo of binding device via the tc_block_offload >struct. Pass this back to any block callback registra

Re: [PATCH rdma-next 00/12] RDMA fixes 2018-06-24

2018-06-25 Thread Jason Gunthorpe
On Sun, Jun 24, 2018 at 11:23:41AM +0300, Leon Romanovsky wrote: > From: Leon Romanovsky > > Hi, > > This is bunch of patches trigged by running syzkaller internally. > > I'm sending them based on rdma-next mainly for two reasons: > 1, Most of the patches fix the old issues and it doesn't matte

[PATCH net-next v2 1/7] net: sched: pass extack pointer to block binds and cb registration

2018-06-25 Thread Jakub Kicinski
From: John Hurley Pass the extact struct from a tc qdisc add to the block bind function and, in turn, to the setup_tc ndo of binding device via the tc_block_offload struct. Pass this back to any block callback registrations to allow netlink logging of fails in the bind process. Signed-off-by: Jo

[PATCH net-next v2 2/7] net: sched: add tcf_proto_op to offload a rule

2018-06-25 Thread Jakub Kicinski
From: John Hurley Create a new tcf_proto_op called 'reoffload' that generates a new offload message for each node in a tcf_proto. Pointers to the tcf_proto and whether the offload request is to add or delete the node are included. Also included is a callback function to send the offload message t

[PATCH net-next v2 5/7] net: sched: cls_u32: implement offload tcf_proto_op

2018-06-25 Thread Jakub Kicinski
From: John Hurley Add the offload tcf_proto_op in cls_u32 to generate an offload message for each filter and the hashtable in the given tcf_proto. Call the specified callback with this new offload message. The function only returns an error if the callback rejects adding a 'hardware only' rule.

[PATCH net-next v2 4/7] net: sched: cls_matchall: implement offload tcf_proto_op

2018-06-25 Thread Jakub Kicinski
From: John Hurley Add the reoffload tcf_proto_op in matchall to generate an offload message for each filter in the given tcf_proto. Call the specified callback with this new offload message. The function only returns an error if the callback rejects adding a 'hardware only' rule. Ensure matchall

[PATCH net-next v2 7/7] net: sched: call reoffload op on block callback reg

2018-06-25 Thread Jakub Kicinski
From: John Hurley Call the reoffload tcf_proto_op on all tcf_proto nodes in all chains of a block when a callback tries to register to a block that already has offloaded rules. If all existing rules cannot be offloaded then the registration is rejected. This replaces the previous policy of reject

[PATCH net-next v2 6/7] net: sched: cls_bpf: implement offload tcf_proto_op

2018-06-25 Thread Jakub Kicinski
From: John Hurley Add the offload tcf_proto_op in cls_bpf to generate an offload message for each bpf prog in the given tcf_proto. Call the specified callback with this new offload message. The function only returns an error if the callback rejects adding a 'hardware only' prog. A prog contains

[PATCH net-next v2 0/7] net: sched: support replay of filter offload when binding to block

2018-06-25 Thread Jakub Kicinski
Hi! This series from John adds the ability to replay filter offload requests when new offload callback is being registered on a TC block. This is most likely to take place for shared blocks today, when a block which already has rules is bound to another interface. Prior to this patch set if any

[PATCH net-next v2 3/7] net: sched: cls_flower: implement offload tcf_proto_op

2018-06-25 Thread Jakub Kicinski
From: John Hurley Add the reoffload tcf_proto_op in flower to generate an offload message for each filter in the given tcf_proto. Call the specified callback with this new offload message. The function only returns an error if the callback rejects adding a 'hardware only' rule. A filter contains

Re: [PATCH net-next 7/7] net: sched: call reoffload op on block callback reg

2018-06-25 Thread Jiri Pirko
Mon, Jun 25, 2018 at 11:10:14PM CEST, jakub.kicin...@netronome.com wrote: >On Mon, 25 Jun 2018 22:58:32 +0200, Jiri Pirko wrote: >> Mon, Jun 25, 2018 at 06:34:31AM CEST, jakub.kicin...@netronome.com wrote: >> >From: John Hurley >> >> [...] >> >> >+static int >> >+tcf_block_playbac

Re: [PATCH rdma-next 01/12] RDMA/uverbs: Protect from attempts to create flows on unsupported QP

2018-06-25 Thread Jason Gunthorpe
On Sun, Jun 24, 2018 at 11:23:42AM +0300, Leon Romanovsky wrote: > From: Leon Romanovsky > > Flows can be created on UD and RAW_PACKET QP types. Attempts to provide > other QP types as an input causes to various unpredictable failures. > > The reason to it that in order to support all various ty

Re: [PATCH net-next 7/7] net: sched: call reoffload op on block callback reg

2018-06-25 Thread Jakub Kicinski
On Mon, 25 Jun 2018 22:58:32 +0200, Jiri Pirko wrote: > Mon, Jun 25, 2018 at 06:34:31AM CEST, jakub.kicin...@netronome.com wrote: > >From: John Hurley > > [...] > > >+static int > >+tcf_block_playback_offloads(struct tcf_block *block, tc_setup_cb_t *cb, > >+void

[patch iproute2/net-next] tc: introduce support for chain templates

2018-06-25 Thread Jiri Pirko
From: Jiri Pirko Signed-off-by: Jiri Pirko --- include/uapi/linux/rtnetlink.h | 7 man/man8/tc.8 | 26 tc/tc_filter.c | 95 ++ tc/tc_monitor.c| 5 ++- 4 files changed, 105 insertions(+),

[patch net-next 4/9] net: sched: cls_flower: change fl_init_dissector to accept mask and dissector

2018-06-25 Thread Jiri Pirko
From: Jiri Pirko This function is going to be used for templates as well, so we need to pass the pointer separately. Signed-off-by: Jiri Pirko --- net/sched/cls_flower.c | 39 --- 1 file changed, 20 insertions(+), 19 deletions(-) diff --git a/net/sched/cls_

[patch net-next 5/9] net: sched: cls_flower: implement chain templates

2018-06-25 Thread Jiri Pirko
From: Jiri Pirko Use the previously introduced template extension and implement callback to create, destroy and dump chain template. The existing parsing and dumping functions are re-used. Also, check if newly added filters fit the template if it is set. Signed-off-by: Jiri Pirko --- net/sched

[patch net-next 6/9] net: sched: cls_flower: propagate chain teplate creation and destruction to drivers

2018-06-25 Thread Jiri Pirko
From: Jiri Pirko Introduce a couple of flower offload commands in order to propagate template creation/destruction events down to device drivers. Drivers may use this information to prepare HW in an optimal way for future filter insertions. Signed-off-by: Jiri Pirko --- include/net/pkt_cls.h

[patch net-next 7/9] mlxsw: spectrum: Implement chain template hinting

2018-06-25 Thread Jiri Pirko
From: Jiri Pirko Since cld_flower provides information about the filter template for specific chain, use this information in order to prepare a region. Use the template to find out what elements are going to be used and pass that down to mlxsw_sp_acl_tcam_group_add(). Later on, when the first fil

[patch net-next 3/9] net: sched: cls_flower: move key/mask dumping into a separate function

2018-06-25 Thread Jiri Pirko
From: Jiri Pirko Push key/mask dumping from fl_dump() into a separate function fl_dump_key(), that will be reused for template dumping. Signed-off-by: Jiri Pirko --- net/sched/cls_flower.c | 62 ++ 1 file changed, 37 insertions(+), 25 deletions(-

[patch net-next 2/9] net: sched: introduce chain templates

2018-06-25 Thread Jiri Pirko
From: Jiri Pirko Introduce a group of new tc-rtnl commands to allow user to set per-chain template. Templates lock down individual chains for particular classifier type/options combinations. The classifier needs to support templates, otherwise kernel would reply with error. For example, to lock

[patch net-next 1/9] net: sched: push ops lookup bits into tcf_proto_lookup_ops()

2018-06-25 Thread Jiri Pirko
From: Jiri Pirko Push all bits that take care of ops lookup, including module loading outside tcf_proto_create() function, into tcf_proto_lookup_ops() Signed-off-by: Jiri Pirko --- net/sched/cls_api.c | 53 +++-- 1 file changed, 31 insertions(+),

[patch net-next 0/9] net: sched: introduce chain templates support with offloading to mlxsw

2018-06-25 Thread Jiri Pirko
From: Jiri Pirko For the TC clsact offload these days, some of HW drivers need to hold a magic ball. The reason is, with the first inserted rule inside HW they need to guess what fields will be used for the matching. If later on this guess proves to be wrong and user adds a filter with a differen

[patch net-next 9/9] selftests: forwarding: add tests for TC chain templates

2018-06-25 Thread Jiri Pirko
From: Jiri Pirko Add basic sanity tests for TC chain templates. Signed-off-by: Jiri Pirko --- tools/testing/selftests/net/forwarding/lib.sh | 9 ++ .../selftests/net/forwarding/tc_chaintemplates.sh | 160 + 2 files changed, 169 insertions(+) create mode 100755 tool

[patch net-next 8/9] selftests: forwarding: move shblock tc support check to a separate helper

2018-06-25 Thread Jiri Pirko
From: Jiri Pirko The shared block support is only needed for tc_shblock.sh. No need to require that for other test. Signed-off-by: Jiri Pirko --- tools/testing/selftests/net/forwarding/lib.sh | 3 +++ tools/testing/selftests/net/forwarding/tc_shblocks.sh | 2 ++ 2 files changed, 5 inse

Re: [PATCH net-next 7/7] net: sched: call reoffload op on block callback reg

2018-06-25 Thread Jiri Pirko
Mon, Jun 25, 2018 at 06:34:31AM CEST, jakub.kicin...@netronome.com wrote: >From: John Hurley [...] >+static int >+tcf_block_playback_offloads(struct tcf_block *block, tc_setup_cb_t *cb, >+ void *cb_priv, bool add, bool offload_in_use, >+

Re: [PATCH net 2/2] nfp: reject binding to shared blocks

2018-06-25 Thread Jiri Pirko
Mon, Jun 25, 2018 at 10:50:14PM CEST, jakub.kicin...@netronome.com wrote: >On Mon, 25 Jun 2018 22:40:21 +0200, Jiri Pirko wrote: >> Mon, Jun 25, 2018 at 10:22:46PM CEST, jakub.kicin...@netronome.com wrote: >> >From: John Hurley >> > >> >TC shared blocks allow multiple qdiscs to be grouped together

Re: [PATCH net 2/2] nfp: reject binding to shared blocks

2018-06-25 Thread Jakub Kicinski
On Mon, 25 Jun 2018 22:40:21 +0200, Jiri Pirko wrote: > Mon, Jun 25, 2018 at 10:22:46PM CEST, jakub.kicin...@netronome.com wrote: > >From: John Hurley > > > >TC shared blocks allow multiple qdiscs to be grouped together and filters > >shared between them. Currently the chains of filters attached t

Re: [PATCH net-next 3/7] net: sched: cls_flower: implement offload tcf_proto_op

2018-06-25 Thread Jiri Pirko
Mon, Jun 25, 2018 at 06:34:27AM CEST, jakub.kicin...@netronome.com wrote: >From: John Hurley > >Add the reoffload tcf_proto_op in flower to generate an offload message >for each filter in the given tcf_proto. Call the specified callback with >this new offload message. The function only returns an

Re: [PATCH v3,net-next] vlan: implement vlan id and protocol changes

2018-06-25 Thread David Ahern
On 6/25/18 4:30 AM, Chas Williams wrote: > vlan_changelink silently ignores attempts to change the vlan id > or protocol id of an existing vlan interface. Implement by adding > the new vlan id and protocol to the interface's vlan group and then > removing the old vlan id and protocol from the vlan

Re: [PATCH net-next 2/7] net: sched: add tcf_proto_op to offload a rule

2018-06-25 Thread Jiri Pirko
Mon, Jun 25, 2018 at 06:34:26AM CEST, jakub.kicin...@netronome.com wrote: >From: John Hurley > >Create a new tcf_proto_op called 'reoffload' that generates a new offload >message for each node in a tcf_proto. Pointers to the tcf_proto and >whether the offload request is to add or delete the node a

Re: [PATCH net 2/2] nfp: reject binding to shared blocks

2018-06-25 Thread Jiri Pirko
Mon, Jun 25, 2018 at 10:22:46PM CEST, jakub.kicin...@netronome.com wrote: >From: John Hurley > >TC shared blocks allow multiple qdiscs to be grouped together and filters >shared between them. Currently the chains of filters attached to a block >are only flushed when the block is removed. If a qdis

[PATCH net 2/2] nfp: reject binding to shared blocks

2018-06-25 Thread Jakub Kicinski
From: John Hurley TC shared blocks allow multiple qdiscs to be grouped together and filters shared between them. Currently the chains of filters attached to a block are only flushed when the block is removed. If a qdisc is removed from a block but the block still exists, flow del messages are not

[PATCH net 0/2] nfp: MPLS and shared blocks TC offload fixes

2018-06-25 Thread Jakub Kicinski
Hi! This series brings two fixes to TC filter/action offload code. Pieter fixes matching MPLS packets when the match is purely on the MPLS ethertype and none of the MPLS fields are used. John provides a fix for offload of shared blocks. Unfortunately, with shared blocks there is currently no guar

[PATCH net 1/2] nfp: flower: fix mpls ether type detection

2018-06-25 Thread Jakub Kicinski
From: Pieter Jansen van Vuuren Previously it was not possible to distinguish between mpls ether types and other ether types. This leads to incorrect classification of offloaded filters that match on mpls ether type. For example the following two filters overlap: # tc filter add dev eth0 parent

Re: Route fallback issue

2018-06-25 Thread Grant Taylor
On 06/25/2018 12:50 PM, Julian Anastasov wrote: Hello, Hi Julian, Yes, ARP state for unreachable GWs may be updated slowly, there is in-time feedback only for reachable state. Fair. Most of the installations where I needed D.G.D. to work would be okay with a < 5 minute timeout. Obviously

Re: Route fallback issue

2018-06-25 Thread Julian Anastasov
Hello, On Sun, 24 Jun 2018, Erik Auerswald wrote: > Hello Julien, > > > http://ja.ssi.bg/dgd-usage.txt > > Thanks for that info! > > Can you tell us what parts from the above text is actually implemented > in the upstream Linux kernel, and starting with which version(s) > (approximat

Re: Route fallback issue

2018-06-25 Thread Julian Anastasov
Hello, On Thu, 21 Jun 2018, Grant Taylor wrote: > On 06/21/2018 01:57 PM, Julian Anastasov wrote: > > Hello, > > > http://ja.ssi.bg/dgd-usage.txt > > "DGD" or "Dead Gateway Detection" sounds very familiar. I referenced it in an > earlier reply. > > I distinctly remember DGD not beha

Re: [PATCH net-next 2/3] rds: Enable RDS IPv6 support

2018-06-25 Thread Santosh Shilimkar
On 6/25/2018 10:50 AM, Sowmini Varadhan wrote: On (06/26/18 01:43), Ka-Cheong Poon wrote: Yes, I think if the socket is bound, it should check the scope_id in msg_name (if not NULL) to make sure that they match. A bound RDS socket can send to multiple peers. But if the bound local address is

Re: [net regression] "fib_rules: move common handling of newrule delrule msgs into fib_nl2rule" breaks suppress_prefixlength

2018-06-25 Thread Roopa Prabhu
On Mon, Jun 25, 2018 at 8:23 AM, Roopa Prabhu wrote: > On Sat, Jun 23, 2018 at 8:46 AM, Jason A. Donenfeld wrote: >> Hey Roopa, >> >> On a kernel with a minimal networking config, >> CONFIG_IP_MULTIPLE_TABLES appears to be broken for certain rules after >> f9d4b0c1e9695e3de7af3768205bacc27312320c

[PATCH net-next] r8169: reject unsupported WoL options

2018-06-25 Thread Heiner Kallweit
So far unsupported WoL options are silently ignored. Change this and reject attempts to set unsupported options. This prevents situations where a user tries to set an unsupported WoL option and is under the impression it was successful because ethtool doesn't complain. Signed-off-by: Heiner Kallwe

  1   2   >