[PATCH bpf-next] nfp: bpf: xdp_adjust_tail support

2018-08-03 Thread Jakub Kicinski
Add support for adjust_tail. There are no FW changes needed but add a FW capability just in case there would be any issue with previously released FW, or we will have to change the ABI in the future. The helper is trivial and shouldn't be used too often so just inline the body of the function.

Re: [pull request][net-next 00/10] Mellanox, mlx5 and devlink updates 2018-07-31

2018-08-03 Thread Jakub Kicinski
On Fri, 3 Aug 2018 19:41:50 +0300, Ido Schimmel wrote: > On Thu, Aug 02, 2018 at 03:53:15PM -0700, Jakub Kicinski wrote: > > No one is requesting full RED offload here.. if someone sets the > > parameters you can't support you simply won't offload them. And ignore > > the parameters which only

Re: KCM - recvmsg() mangles packets?

2018-08-03 Thread Dominique Martinet
Dominique Martinet wrote on Sat, Aug 04, 2018: > Actually, now I'm looking closer to the timing, it looks specific to the > connection setup. This send loop works: > int i = 1; > while(i <= 1000) { > int len = (i++ * 1312739ULL) % 31 + 1; >

Re: KCM - recvmsg() mangles packets?

2018-08-03 Thread Dominique Martinet
Tom Herbert wrote on Fri, Aug 03, 2018: > On Fri, Aug 3, 2018 at 4:20 PM, Dominique Martinet > wrote: > > Tom Herbert wrote on Fri, Aug 03, 2018: > >> struct my_proto { > >>struct _hdr { > >>uint32_t len; > >> } hdr; > >> char data[32]; > >> } __attribute__((packed)); > >> >

[stmmac][bug?] endianness of Flexible RX Parser code

2018-08-03 Thread Al Viro
The values passed in struct tc_u32_sel ->mask and ->val are 32bit net-endian. Your tc_fill_entry() does this: data = sel->keys[0].val; mask = sel->keys[0].mask; ... entry->frag_ptr = frag; entry->val.match_en = (mask << (rem * 8)) &

Re: KCM - recvmsg() mangles packets?

2018-08-03 Thread Tom Herbert
On Fri, Aug 3, 2018 at 4:20 PM, Dominique Martinet wrote: > Tom Herbert wrote on Fri, Aug 03, 2018: >> struct my_proto { >>struct _hdr { >>uint32_t len; >> } hdr; >> char data[32]; >> } __attribute__((packed)); >> >> // use htons to use LE header size, since load_half does a

Re: [PATCH RFC net-next] openvswitch: Queue upcalls to userspace in per-port round-robin order

2018-08-03 Thread Ben Pfaff
On Sat, Aug 04, 2018 at 02:43:24AM +0200, Stefano Brivio wrote: > On Fri, 3 Aug 2018 16:01:08 -0700 > Ben Pfaff wrote: > > I would be very pleased if we could integrate a simple mechanism for > > fairness, based for now on some simple criteria like the source port, > > but thinking ahead to how

Re: [PATCH RFC net-next] openvswitch: Queue upcalls to userspace in per-port round-robin order

2018-08-03 Thread Stefano Brivio
On Fri, 3 Aug 2018 16:01:08 -0700 Ben Pfaff wrote: > I think that a simple mechanism for fairness is fine. The direction > of extensibility that makes me anxious is how to decide what matters > for fairness. So far, we've talked about per-vport fairness. That > works pretty well for packets

Re: [PATCH net 0/5] tcp: more robust ooo handling

2018-08-03 Thread David Miller
From: David Woodhouse Date: Fri, 03 Aug 2018 11:55:37 +0100 > I see the first four in 4.9.116 but not the fifth (adding > tcp_ooo_try_coalesce()). > > Is that intentional?  I don't work on the 4.9 -stable backports, so I personally have no idea. I submitted for 4.17 and 4.14

Re: [PATCH v2 net-next] af_unix: ensure POLLOUT on remote close() for connected dgram socket

2018-08-03 Thread David Miller
From: Jason Baron Date: Fri, 3 Aug 2018 17:24:53 -0400 > Applications use -ECONNREFUSED as returned from write() in order to > determine that a socket should be closed. However, when using connected > dgram unix sockets in a poll/write loop, a final POLLOUT event can be > missed when the remote

Re: [PATCH RFC net-next] openvswitch: Queue upcalls to userspace in per-port round-robin order

2018-08-03 Thread Ben Pfaff
On Fri, Aug 03, 2018 at 06:52:41PM +0200, Stefano Brivio wrote: > On Tue, 31 Jul 2018 15:06:57 -0700 Ben Pfaff wrote: > > My current thought is that any fairness scheme we implement directly in > > the kernel is going to need to evolve over time. Maybe we could do > > something flexible with BPF

Re: [PATCH v2 0/2] net/sctp: Avoid allocating high order memory with kmalloc()

2018-08-03 Thread Marcelo Ricardo Leitner
On Fri, Aug 03, 2018 at 07:21:00PM +0300, Konstantin Khorenko wrote: ... > Performance results: > > * Kernel: v4.18-rc6 - stock and with 2 patches from Oleg (earlier in this > thread) > * Node: CPU (8 cores): Intel(R) Xeon(R) CPU E31230 @ 3.20GHz > RAM: 32 Gb >

Re: KCM - recvmsg() mangles packets?

2018-08-03 Thread Dominique Martinet
Tom Herbert wrote on Fri, Aug 03, 2018: > struct my_proto { >struct _hdr { >uint32_t len; > } hdr; > char data[32]; > } __attribute__((packed)); > > // use htons to use LE header size, since load_half does a first convertion > // from network byte order > const char

[linux-next:master 11347/11797] include/linux/compiler.h:61:17: warning: 'ib_query_gid' is deprecated

2018-08-03 Thread kbuild test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master head: 116b181bb646afedd770985de20a68721bdb2648 commit: 9f4c2b1ceca8021c68c23e655b275c693367a48c [11347/11797] next-20180802/net-next config: x86_64-randconfig-s1-08040602 (attached as .config) compiler: gcc-6

Re: KCM - recvmsg() mangles packets?

2018-08-03 Thread Tom Herbert
struct my_proto { struct _hdr { uint32_t len; } hdr; char data[32]; } __attribute__((packed)); // use htons to use LE header size, since load_half does a first convertion // from network byte order const char *bpf_prog_string = " \ ssize_t bpf_prog1(struct __sk_buff *skb) \ { \

[PATCH v2 net-next] af_unix: ensure POLLOUT on remote close() for connected dgram socket

2018-08-03 Thread Jason Baron
Applications use -ECONNREFUSED as returned from write() in order to determine that a socket should be closed. However, when using connected dgram unix sockets in a poll/write loop, a final POLLOUT event can be missed when the remote end closes. Thus, the poll is stuck forever: thread 1

Re: [PATCH v2 0/2] net/sctp: Avoid allocating high order memory with kmalloc()

2018-08-03 Thread Michael Tuexen
> On 3. Aug 2018, at 22:30, Marcelo Ricardo Leitner > wrote: > > On Fri, Aug 03, 2018 at 04:43:28PM +, David Laight wrote: >> From: Konstantin Khorenko >>> Sent: 03 August 2018 17:21 >>> >>> Each SCTP association can have up to 65535 input and output streams. >>> For each stream type an

Re: [PATCH v2 1/2] net/sctp: Make wrappers for accessing in/out streams

2018-08-03 Thread Marcelo Ricardo Leitner
On Fri, Aug 03, 2018 at 07:21:01PM +0300, Konstantin Khorenko wrote: > This patch introduces wrappers for accessing in/out streams indirectly. > This will enable to replace physically contiguous memory arrays > of streams with flexible arrays (or maybe any other appropriate > mechanism) which do

Re: [PATCH net] dccp: fix undefined behavior with 'cwnd' shift in ccid2_cwnd_restart()

2018-08-03 Thread David Miller
From: Alexey Kodanev Date: Thu, 2 Aug 2018 19:22:05 +0300 > Make sure that the value of "(now - hc->tx_lsndtime) / hc->tx_rto" is > properly limited when shifting 'u32 cwnd' with it, otherwise we can get: ... > Fixes: 113ced1f52e5 ("dccp ccid-2: Perform congestion-window validation") >

Re: [PATCH v2 0/2] net/sctp: Avoid allocating high order memory with kmalloc()

2018-08-03 Thread Marcelo Ricardo Leitner
On Fri, Aug 03, 2018 at 04:43:28PM +, David Laight wrote: > From: Konstantin Khorenko > > Sent: 03 August 2018 17:21 > > > > Each SCTP association can have up to 65535 input and output streams. > > For each stream type an array of sctp_stream_in or sctp_stream_out > > structures is allocated

Re: [PATCH ethtool] ethtool: Add support for WAKE_FILTER

2018-08-03 Thread David Miller
From: Florian Fainelli Date: Fri, 3 Aug 2018 12:58:12 -0700 > For instance, in the current HW, you can program 128 filters through > the switch, but only 8 of those could be wake-up capable at the > CPU/management (SYSTEM PORT) level. Yes, I noticed this in the driver patches. > Let me cook

Re: [PATCH ethtool] ethtool: Add support for WAKE_FILTER

2018-08-03 Thread Florian Fainelli
On 08/03/2018 12:07 PM, David Miller wrote: > From: Florian Fainelli > Date: Fri, 3 Aug 2018 10:57:13 -0700 > >> Does the current approach of specifying a bitmask of filters looks >> reasonable to you though? > > So, in order to answer that, I need some clarification. > > The mask, as I see

Re: [PATCH v2 net-next 0/3] ip: Use rb trees for IP frag queue

2018-08-03 Thread Peter Oskolkov
On Fri, Aug 3, 2018 at 12:33 PM Josh Hunt wrote: > > On Thu, Aug 2, 2018 at 4:34 PM, Peter Oskolkov wrote: >> >> This patchset >> * changes IPv4 defrag behavior to match that of IPv6: overlapping >>fragments now cause the whole IP datagram to be discarded (suggested >>by David Miller):

Re: [PATCH v2 1/2] net/sctp: Make wrappers for accessing in/out streams

2018-08-03 Thread David Miller
From: Konstantin Khorenko Date: Fri, 3 Aug 2018 19:21:01 +0300 > +struct sctp_stream_out *sctp_stream_out(const struct sctp_stream *stream, > + __u16 sid) > +{ > + return ((struct sctp_stream_out *)(stream->out)) + sid; > +} > + > +struct sctp_stream_in

Re: [PATCH net] l2tp: fix missing refcount drop in pppol2tp_tunnel_ioctl()

2018-08-03 Thread David Miller
From: Guillaume Nault Date: Fri, 3 Aug 2018 17:00:11 +0200 > If 'session' is not NULL and is not a PPP pseudo-wire, then we fail to > drop the reference taken by l2tp_session_get(). > > Fixes: ecd012e45ab5 ("l2tp: filter out non-PPP sessions in > pppol2tp_tunnel_ioctl()") > Signed-off-by:

Re: [Patch net] ipv6: fix double refcount of fib6_metrics

2018-08-03 Thread David Miller
From: Cong Wang Date: Thu, 2 Aug 2018 23:20:38 -0700 > All the callers of ip6_rt_copy_init()/rt6_set_from() hold refcnt > of the "from" fib6_info, so there is no need to hold fib6_metrics > refcnt again, because fib6_metrics refcnt is only released when > fib6_info is gone, that is, they have

Re: [PATCH net 0/4] mlxsw: Fix ACL actions error condition handling

2018-08-03 Thread David Miller
From: Ido Schimmel Date: Fri, 3 Aug 2018 15:57:40 +0300 > Nir says: > > Two issues were lately noticed within mlxsw ACL actions error condition > handling. The first patch deals with conflicting actions such as: > > # tc filter add dev swp49 parent : \ >protocol ip pref 10 flower

Re: [PATCH v2 net-next 0/3] ip: Use rb trees for IP frag queue

2018-08-03 Thread Josh Hunt
On Thu, Aug 2, 2018 at 4:34 PM, Peter Oskolkov wrote: > This patchset > * changes IPv4 defrag behavior to match that of IPv6: overlapping >fragments now cause the whole IP datagram to be discarded (suggested >by David Miller): there are no legitimate use cases for overlapping >

[PATCH net-next] net: sched: cls_flower: Fix an error code in fl_tmplt_create()

2018-08-03 Thread Dan Carpenter
We forgot to set the error code on this path, so we return NULL instead of an error pointer. In the current code kzalloc() won't fail for small allocations so this doesn't really affect runtime. Fixes: b95ec7eb3b4d ("net: sched: cls_flower: implement chain templates") Signed-off-by: Dan

Re: [PATCH net-next 0/4] net: dsa and systemport WoL changes

2018-08-03 Thread David Miller
From: Florian Fainelli Date: Fri, 3 Aug 2018 11:08:40 -0700 > This patch series extracts what was previously submitted as part of the > "WAKE_FILTER" Wake-on-LAN patch series into patches that do not. > > Changes in this series: > > - properly align the dsa_is_cpu_port() check in first patch

Re: [PATCH ethtool] ethtool: Add support for WAKE_FILTER

2018-08-03 Thread David Miller
From: Florian Fainelli Date: Fri, 3 Aug 2018 10:57:13 -0700 > Does the current approach of specifying a bitmask of filters looks > reasonable to you though? So, in order to answer that, I need some clarification. The mask, as I see it, is a bit map of 48 possible positions (SOPASS_MAX *

Re: [PATCH v3 net-next 5/9] net: stmmac: Add MDIO related functions for XGMAC2

2018-08-03 Thread Florian Fainelli
On 08/03/2018 08:50 AM, Jose Abreu wrote: > Add the MDIO related funcionalities for the new IP block XGMAC2. > > Signed-off-by: Jose Abreu > Cc: David S. Miller > Cc: Joao Pinto > Cc: Giuseppe Cavallaro > Cc: Alexandre Torgue > Cc: Andrew Lunn > --- > +satic int

Re: [PATCH v3 net-next 3/9] net: stmmac: Add DMA related callbacks for XGMAC2

2018-08-03 Thread Florian Fainelli
On 08/03/2018 08:50 AM, Jose Abreu wrote: > Add the DMA related callbacks for the new IP block XGMAC2. > > Signed-off-by: Jose Abreu > Cc: David S. Miller > Cc: Joao Pinto > Cc: Giuseppe Cavallaro > Cc: Alexandre Torgue > --- > + value &= ~XGMAC_RD_OSR_LMT; > + value |=

Re: [PATCH v3 net-next 1/9] net: stmmac: Add XGMAC 2.10 HWIF entry

2018-08-03 Thread Florian Fainelli
On 08/03/2018 08:50 AM, Jose Abreu wrote: > Add a new entry to HWIF table for XGMAC 2.10. For now we fill it with > empty callbacks which will be added in posterior patches. > > Signed-off-by: Jose Abreu > Cc: David S. Miller > Cc: Joao Pinto > Cc: Giuseppe Cavallaro > Cc: Alexandre Torgue >

Re: [PATCH net-next] net/tls: Calculate nsg for zerocopy path without skb_cow_data.

2018-08-03 Thread Doron Roberts-Kedes
On Fri, Aug 03, 2018 at 01:23:33AM +, Vakul Garg wrote: > > > > -Original Message- > > From: Doron Roberts-Kedes [mailto:doro...@fb.com] > > Sent: Friday, August 3, 2018 6:00 AM > > To: David S . Miller > > Cc: Dave Watson ; Vakul Garg > > ; Boris Pismenny ; Aviad > > Yehezkel ;

KCM - recvmsg() mangles packets?

2018-08-03 Thread Dominique Martinet
I've been playing with KCM on a 4.18.0-rc7 kernel and I'm running in a problem where the iovec filled by recvmsg() is mangled up: it is filled by the length of one packet, but contains (truncated) data from another packet, rendering KCM unuseable. (I haven't tried old kernels to see for how long

Re: [PATCH net-next 4/4] net: systemport: Create helper to set MPD

2018-08-03 Thread Andrew Lunn
On Fri, Aug 03, 2018 at 11:08:44AM -0700, Florian Fainelli wrote: > Create a helper function to turn on/off MPD, this will be used to avoid > duplicating code as we are going to add additional types of wake-up > types. > > Signed-off-by: Florian Fainelli Reviewed-by: Andrew Lunn Andrew

Re: [PATCH net-next 2/4] net: dsa: bcm_sf2: Disable learning while in WoL

2018-08-03 Thread Andrew Lunn
On Fri, Aug 03, 2018 at 11:08:42AM -0700, Florian Fainelli wrote: > When we are in Wake-on-LAN, we operate with the host sofware not running > a network stack, so we want to the switch to flood packets in order to > cause a system wake-up when matching specific filters (unicast or > multicast).

Re: [PATCH net-next 1/4] net: dsa: bcm_sf2: Allow targeting CPU ports for CFP rules

2018-08-03 Thread Andrew Lunn
On Fri, Aug 03, 2018 at 11:08:41AM -0700, Florian Fainelli wrote: > ds->enabled_port_mask only contains a bitmask of user-facing enabled > ports, we also need to allow programming CFP rules that target CPU ports > (e.g: ports 5 and 8). > > Signed-off-by: Florian Fainelli Reviewed-by: Andrew

[PATCH net-next 0/4] net: dsa and systemport WoL changes

2018-08-03 Thread Florian Fainelli
Hi David, This patch series extracts what was previously submitted as part of the "WAKE_FILTER" Wake-on-LAN patch series into patches that do not. Changes in this series: - properly align the dsa_is_cpu_port() check in first patch Florian Fainelli (4): net: dsa: bcm_sf2: Allow targeting CPU

[PATCH net-next 3/4] net: systemport: Do not re-configure upon WoL interrupt

2018-08-03 Thread Florian Fainelli
We already properly resume from Wake-on-LAN whether such a condition occured or not, no need to process the WoL interrupt for functional changes since that could race with other settings. Signed-off-by: Florian Fainelli --- drivers/net/ethernet/broadcom/bcmsysport.c | 4 +--- 1 file changed, 1

[PATCH net-next 1/4] net: dsa: bcm_sf2: Allow targeting CPU ports for CFP rules

2018-08-03 Thread Florian Fainelli
ds->enabled_port_mask only contains a bitmask of user-facing enabled ports, we also need to allow programming CFP rules that target CPU ports (e.g: ports 5 and 8). Signed-off-by: Florian Fainelli --- drivers/net/dsa/bcm_sf2_cfp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff

[PATCH net-next 4/4] net: systemport: Create helper to set MPD

2018-08-03 Thread Florian Fainelli
Create a helper function to turn on/off MPD, this will be used to avoid duplicating code as we are going to add additional types of wake-up types. Signed-off-by: Florian Fainelli --- drivers/net/ethernet/broadcom/bcmsysport.c | 20 +--- 1 file changed, 13 insertions(+), 7

[PATCH net-next 2/4] net: dsa: bcm_sf2: Disable learning while in WoL

2018-08-03 Thread Florian Fainelli
When we are in Wake-on-LAN, we operate with the host sofware not running a network stack, so we want to the switch to flood packets in order to cause a system wake-up when matching specific filters (unicast or multicast). This was not necessary before since we supported Magic Packet which are

Re: [PATCH iproute2] ip link: don't stop batch processing

2018-08-03 Thread Dave Taht
On Fri, Aug 3, 2018 at 10:50 AM Matteo Croce wrote: > > When 'ip link show dev DEVICE' is processed in a batch mode, ip exits > and stop processing further commands. > This because ipaddr_list_flush_or_save() calls exit() to avoid printing > the link information twice. > Replace the exit with a

Re: [PATCH ethtool] ethtool: Add support for WAKE_FILTER

2018-08-03 Thread Florian Fainelli
On 08/01/2018 09:32 AM, David Miller wrote: > From: Florian Fainelli > Date: Mon, 30 Jul 2018 15:26:24 -0700 > >> On 07/17/2018 08:36 AM, Florian Fainelli wrote: >>> Allow re-purposing the wol->sopass storage area to specify a bitmask of >>> filters >>> (programmed previously via

[PATCH iproute2] ip link: don't stop batch processing

2018-08-03 Thread Matteo Croce
When 'ip link show dev DEVICE' is processed in a batch mode, ip exits and stop processing further commands. This because ipaddr_list_flush_or_save() calls exit() to avoid printing the link information twice. Replace the exit with a classic goto out instruction. Signed-off-by: Matteo Croce ---

Re: [PATCH net-next 0/3] l2tp: sanitise MTU handling on sessions

2018-08-03 Thread David Miller
From: Guillaume Nault Date: Fri, 3 Aug 2018 12:38:32 +0200 > Most of the code handling sessions' MTU has no effect. The ->mtu field > in struct l2tp_session might be used at session creation time, but > neither PPP nor Ethernet pseudo-wires take updates into account. > > L2TP sessions don't

Re: [PATCH v3 net-next 5/9] net: stmmac: Add MDIO related functions for XGMAC2

2018-08-03 Thread Andrew Lunn
On Fri, Aug 03, 2018 at 04:50:23PM +0100, Jose Abreu wrote: > Add the MDIO related funcionalities for the new IP block XGMAC2. > > Signed-off-by: Jose Abreu > Cc: David S. Miller > Cc: Joao Pinto > Cc: Giuseppe Cavallaro > Cc: Alexandre Torgue > Cc: Andrew Lunn Reviewed-by: Andrew Lunn

Re: [PATCH RFC net-next] openvswitch: Queue upcalls to userspace in per-port round-robin order

2018-08-03 Thread Stefano Brivio
Hi Ben, On Tue, 31 Jul 2018 15:06:57 -0700 Ben Pfaff wrote: > This is an awkward problem to try to solve with sockets because of the > nature of sockets, which are strictly first-in first-out. What you > really want is something closer to the algorithm that we use in > ovs-vswitchd to send

Re: [patch net-next] net: sched: fix flush on non-existing chain

2018-08-03 Thread David Miller
From: Jiri Pirko Date: Fri, 3 Aug 2018 11:08:47 +0200 > From: Jiri Pirko > > User was able to perform filter flush on chain 0 even if it didn't have > any filters in it. With the patch that avoided implicit chain 0 > creation, this changed. So in case user wants filter flush on chain > which

Re: [pull request][net-next 00/10] Mellanox, mlx5 and devlink updates 2018-07-31

2018-08-03 Thread Ido Schimmel
On Thu, Aug 02, 2018 at 03:53:15PM -0700, Jakub Kicinski wrote: > No one is requesting full RED offload here.. if someone sets the > parameters you can't support you simply won't offload them. And ignore > the parameters which only make sense in software terms. Look at the > docs for mlxsw: >

RE: [PATCH v2 0/2] net/sctp: Avoid allocating high order memory with kmalloc()

2018-08-03 Thread David Laight
From: Konstantin Khorenko > Sent: 03 August 2018 17:21 > > Each SCTP association can have up to 65535 input and output streams. > For each stream type an array of sctp_stream_in or sctp_stream_out > structures is allocated using kmalloc_array() function. This function > allocates physically

RE: [PATCH v2 1/2] net/sctp: Make wrappers for accessing in/out streams

2018-08-03 Thread David Laight
From: Konstantin Khorenko > Sent: 03 August 2018 17:21 ... > --- a/net/sctp/stream.c > +++ b/net/sctp/stream.c > @@ -37,6 +37,18 @@ > #include > #include > > +struct sctp_stream_out *sctp_stream_out(const struct sctp_stream *stream, > + __u16 sid) > +{ > +

[PATCH v2 1/2] net/sctp: Make wrappers for accessing in/out streams

2018-08-03 Thread Konstantin Khorenko
This patch introduces wrappers for accessing in/out streams indirectly. This will enable to replace physically contiguous memory arrays of streams with flexible arrays (or maybe any other appropriate mechanism) which do memory allocation on a per-page basis. Signed-off-by: Oleg Babin

[PATCH v2 2/2] net/sctp: Replace in/out stream arrays with flex_array

2018-08-03 Thread Konstantin Khorenko
This path replaces physically contiguous memory arrays allocated using kmalloc_array() with flexible arrays. This enables to avoid memory allocation failures on the systems under a memory stress. Signed-off-by: Oleg Babin --- include/net/sctp/structs.h | 1 + net/sctp/stream.c | 78

[PATCH v2 0/2] net/sctp: Avoid allocating high order memory with kmalloc()

2018-08-03 Thread Konstantin Khorenko
Each SCTP association can have up to 65535 input and output streams. For each stream type an array of sctp_stream_in or sctp_stream_out structures is allocated using kmalloc_array() function. This function allocates physically contiguous memory regions, so this can lead to allocation of memory

[PATCH v3 net-next 9/9] dt-bindings: net: stmmac: Add the bindings documentation for XGMAC2.

2018-08-03 Thread Jose Abreu
Adds the documentation for XGMAC2 DT bindings. Signed-off-by: Jose Abreu Cc: David S. Miller Cc: Joao Pinto Cc: Giuseppe Cavallaro Cc: Alexandre Torgue Cc: Sergei Shtylyov Cc: devicet...@vger.kernel.org Cc: Rob Herring --- Changes from v1: - Correct header, now we also support

[PATCH v3 net-next 8/9] net: stmmac: Add the bindings parsing for XGMAC2

2018-08-03 Thread Jose Abreu
Add the bindings parsing for XGMAC2 IP block. Signed-off-by: Jose Abreu Cc: David S. Miller Cc: Joao Pinto Cc: Giuseppe Cavallaro Cc: Alexandre Torgue --- drivers/net/ethernet/stmicro/stmmac/dwmac-generic.c | 2 ++ drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c | 6 ++ 2 files

[PATCH v3 net-next 7/9] net: stmmac: Integrate XGMAC into main driver flow

2018-08-03 Thread Jose Abreu
Now that we have all the XGMAC related callbacks, lets start integrating this IP block into main driver. Also, we corrected the initialization flow to only start DMA after setting descriptors length. Signed-off-by: Jose Abreu Cc: David S. Miller Cc: Joao Pinto Cc: Giuseppe Cavallaro Cc:

[PATCH v3 net-next 6/9] net: stmmac: Add PTP support for XGMAC2

2018-08-03 Thread Jose Abreu
XGMAC2 uses the same engine of timestamping as GMAC4. Let's use the same callbacks. Signed-off-by: Jose Abreu Cc: David S. Miller Cc: Joao Pinto Cc: Giuseppe Cavallaro Cc: Alexandre Torgue --- drivers/net/ethernet/stmicro/stmmac/hwif.c | 4 ++--

[PATCH v3 net-next 5/9] net: stmmac: Add MDIO related functions for XGMAC2

2018-08-03 Thread Jose Abreu
Add the MDIO related funcionalities for the new IP block XGMAC2. Signed-off-by: Jose Abreu Cc: David S. Miller Cc: Joao Pinto Cc: Giuseppe Cavallaro Cc: Alexandre Torgue Cc: Andrew Lunn --- Changes from v2: - Use helper to set C22 (Andrew) - Wait for bus free before setting

[PATCH v3 net-next 3/9] net: stmmac: Add DMA related callbacks for XGMAC2

2018-08-03 Thread Jose Abreu
Add the DMA related callbacks for the new IP block XGMAC2. Signed-off-by: Jose Abreu Cc: David S. Miller Cc: Joao Pinto Cc: Giuseppe Cavallaro Cc: Alexandre Torgue --- drivers/net/ethernet/stmicro/stmmac/Makefile | 2 +- drivers/net/ethernet/stmicro/stmmac/dwxgmac2.h | 56 +++

[PATCH v3 net-next 4/9] net: stmmac: Add descriptor related callbacks for XGMAC2

2018-08-03 Thread Jose Abreu
Add the descriptor related callbacks for the new IP block XGMAC2. Signed-off-by: Jose Abreu Cc: David S. Miller Cc: Joao Pinto Cc: Giuseppe Cavallaro Cc: Alexandre Torgue --- drivers/net/ethernet/stmicro/stmmac/Makefile | 3 +- drivers/net/ethernet/stmicro/stmmac/dwxgmac2.h |

[PATCH v3 net-next 1/9] net: stmmac: Add XGMAC 2.10 HWIF entry

2018-08-03 Thread Jose Abreu
Add a new entry to HWIF table for XGMAC 2.10. For now we fill it with empty callbacks which will be added in posterior patches. Signed-off-by: Jose Abreu Cc: David S. Miller Cc: Joao Pinto Cc: Giuseppe Cavallaro Cc: Alexandre Torgue --- drivers/net/ethernet/stmicro/stmmac/common.h | 14

[PATCH v3 net-next 0/9] Add support for XGMAC2 in stmmac

2018-08-03 Thread Jose Abreu
This series adds support for 10Gigabit IP in stmmac. The IP is called XGMAC2 and has many similarities with GMAC4. Due to this, its relatively easy to incorporate this new IP into stmmac driver by adding a new block and filling the necessary callbacks. The functionality added by this series is

[PATCH v3 net-next 2/9] net: stmmac: Add MAC related callbacks for XGMAC2

2018-08-03 Thread Jose Abreu
Add the MAC related callbacks for the new IP block XGMAC2. Signed-off-by: Jose Abreu Cc: David S. Miller Cc: Joao Pinto Cc: Giuseppe Cavallaro Cc: Alexandre Torgue --- drivers/net/ethernet/stmicro/stmmac/Makefile | 2 +- drivers/net/ethernet/stmicro/stmmac/common.h | 3 +

Re: Security enhancement proposal for kernel TLS

2018-08-03 Thread Dave Watson
On 08/02/18 05:23 PM, Vakul Garg wrote: > > I agree that Boris' patch does what you say it does - it sets keys > > immediately > > after CCS instead of after FINISHED message. I disagree that the kernel tls > > implementation currently requires that specific ordering, nor do I think > > that it

Re: [PATCH v2 net-next 5/9] net: stmmac: Add MDIO related functions for XGMAC2

2018-08-03 Thread Andrew Lunn
> > Probably you want to wait for the bus to be idle before you change the > > mode to C22. Some PHYs can do both C22 and C45, e.g. EEE registers can > > be in C45 space, while the rest are in C22. > > Ok but I can't test C45 right now so maybe leave that change to > when I can test it ? I would

Re: [PATCH v2 net-next 5/9] net: stmmac: Add MDIO related functions for XGMAC2

2018-08-03 Thread Jose Abreu
Hi Andrew, On 03-08-2018 16:20, Andrew Lunn wrote: > On Fri, Aug 03, 2018 at 03:56:07PM +0100, Jose Abreu wrote: >> Add the MDIO related funcionalities for the new IP block XGMAC2. >> >> Signed-off-by: Jose Abreu >> Cc: David S. Miller >> Cc: Joao Pinto >> Cc: Giuseppe Cavallaro >> Cc:

Re: [PATCH v2 net-next 5/9] net: stmmac: Add MDIO related functions for XGMAC2

2018-08-03 Thread Andrew Lunn
On Fri, Aug 03, 2018 at 03:56:07PM +0100, Jose Abreu wrote: > Add the MDIO related funcionalities for the new IP block XGMAC2. > > Signed-off-by: Jose Abreu > Cc: David S. Miller > Cc: Joao Pinto > Cc: Giuseppe Cavallaro > Cc: Alexandre Torgue > Cc: Andrew Lunn > --- > Changes from v1: >

Re: UDP packets arriving on wrong sockets

2018-08-03 Thread Andrew Cann
On Fri, Aug 03, 2018 at 10:20:06AM -0400, Willem de Bruijn wrote: > On Fri, Aug 3, 2018 at 12:20 AM Andrew Cann wrote: > > > > On Thu, Aug 02, 2018 at 11:21:41AM -0400, Willem de Bruijn wrote: > > > You have two sockets bound to the same address and port? Is this using > > > SO_REUSEPORT? > > > >

[PATCH net] l2tp: fix missing refcount drop in pppol2tp_tunnel_ioctl()

2018-08-03 Thread Guillaume Nault
If 'session' is not NULL and is not a PPP pseudo-wire, then we fail to drop the reference taken by l2tp_session_get(). Fixes: ecd012e45ab5 ("l2tp: filter out non-PPP sessions in pppol2tp_tunnel_ioctl()") Signed-off-by: Guillaume Nault --- Sorry for the stupid mistake. I guess I got blinded by

[PATCH v2 net-next 7/9] net: stmmac: Integrate XGMAC into main driver flow

2018-08-03 Thread Jose Abreu
Now that we have all the XGMAC related callbacks, lets start integrating this IP block into main driver. Also, we corrected the initialization flow to only start DMA after setting descriptors length. Signed-off-by: Jose Abreu Cc: David S. Miller Cc: Joao Pinto Cc: Giuseppe Cavallaro Cc:

[PATCH v2 net-next 9/9] dt-bindings: net: stmmac: Add the bindings documentation for XGMAC2.

2018-08-03 Thread Jose Abreu
Adds the documentation for XGMAC2 DT bindings. Signed-off-by: Jose Abreu Cc: David S. Miller Cc: Joao Pinto Cc: Giuseppe Cavallaro Cc: Alexandre Torgue Cc: Sergei Shtylyov Cc: devicet...@vger.kernel.org Cc: Rob Herring --- Changes from v1: - Correct header, now we also support

[PATCH v2 net-next 5/9] net: stmmac: Add MDIO related functions for XGMAC2

2018-08-03 Thread Jose Abreu
Add the MDIO related funcionalities for the new IP block XGMAC2. Signed-off-by: Jose Abreu Cc: David S. Miller Cc: Joao Pinto Cc: Giuseppe Cavallaro Cc: Alexandre Torgue Cc: Andrew Lunn --- Changes from v1: - Remove C45 support (Andrew) - Add define for bits (Andrew)

[PATCH v2 net-next 4/9] net: stmmac: Add descriptor related callbacks for XGMAC2

2018-08-03 Thread Jose Abreu
Add the descriptor related callbacks for the new IP block XGMAC2. Signed-off-by: Jose Abreu Cc: David S. Miller Cc: Joao Pinto Cc: Giuseppe Cavallaro Cc: Alexandre Torgue --- drivers/net/ethernet/stmicro/stmmac/Makefile | 3 +- drivers/net/ethernet/stmicro/stmmac/dwxgmac2.h |

[PATCH v2 net-next 1/9] net: stmmac: Add XGMAC 2.10 HWIF entry

2018-08-03 Thread Jose Abreu
Add a new entry to HWIF table for XGMAC 2.10. For now we fill it with empty callbacks which will be added in posterior patches. Signed-off-by: Jose Abreu Cc: David S. Miller Cc: Joao Pinto Cc: Giuseppe Cavallaro Cc: Alexandre Torgue --- drivers/net/ethernet/stmicro/stmmac/common.h | 14

[PATCH v2 net-next 8/9] net: stmmac: Add the bindings parsing for XGMAC2

2018-08-03 Thread Jose Abreu
Add the bindings parsing for XGMAC2 IP block. Signed-off-by: Jose Abreu Cc: David S. Miller Cc: Joao Pinto Cc: Giuseppe Cavallaro Cc: Alexandre Torgue --- drivers/net/ethernet/stmicro/stmmac/dwmac-generic.c | 2 ++ drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c | 6 ++ 2 files

[PATCH v2 net-next 0/9] Add support for XGMAC2 in stmmac

2018-08-03 Thread Jose Abreu
This series adds support for 10Gigabit IP in stmmac. The IP is called XGMAC2 and has many similarities with GMAC4. Due to this, its relatively easy to incorporate this new IP into stmmac driver by adding a new block and filling the necessary callbacks. The functionality added by this series is

[PATCH v2 net-next 3/9] net: stmmac: Add DMA related callbacks for XGMAC2

2018-08-03 Thread Jose Abreu
Add the DMA related callbacks for the new IP block XGMAC2. Signed-off-by: Jose Abreu Cc: David S. Miller Cc: Joao Pinto Cc: Giuseppe Cavallaro Cc: Alexandre Torgue --- drivers/net/ethernet/stmicro/stmmac/Makefile | 2 +- drivers/net/ethernet/stmicro/stmmac/dwxgmac2.h | 56 +++

[PATCH v2 net-next 2/9] net: stmmac: Add MAC related callbacks for XGMAC2

2018-08-03 Thread Jose Abreu
Add the MAC related callbacks for the new IP block XGMAC2. Signed-off-by: Jose Abreu Cc: David S. Miller Cc: Joao Pinto Cc: Giuseppe Cavallaro Cc: Alexandre Torgue --- drivers/net/ethernet/stmicro/stmmac/Makefile | 2 +- drivers/net/ethernet/stmicro/stmmac/common.h | 3 +

[PATCH v2 net-next 6/9] net: stmmac: Add PTP support for XGMAC2

2018-08-03 Thread Jose Abreu
XGMAC2 uses the same engine of timestamping as GMAC4. Let's use the same callbacks. Signed-off-by: Jose Abreu Cc: David S. Miller Cc: Joao Pinto Cc: Giuseppe Cavallaro Cc: Alexandre Torgue --- drivers/net/ethernet/stmicro/stmmac/hwif.c | 4 ++--

Re: UDP packets arriving on wrong sockets

2018-08-03 Thread Willem de Bruijn
On Fri, Aug 3, 2018 at 12:20 AM Andrew Cann wrote: > > On Thu, Aug 02, 2018 at 11:21:41AM -0400, Willem de Bruijn wrote: > > You have two sockets bound to the same address and port? Is this using > > SO_REUSEPORT? > > Yes, this is using SO_REUSEPORT. Then this is working as intended. Without

Re: [PATCH net 1/4] mlxsw: core_acl_flex_actions: Return error for conflicting actions

2018-08-03 Thread Ido Schimmel
+Stephen On Fri, Aug 03, 2018 at 03:57:41PM +0300, Ido Schimmel wrote: > From: Nir Dotan > > Spectrum switch ACL action set is built in groups of three actions > which may point to additional actions. A group holds a single record > which can be set as goto record for pointing at a following

[PATCH net 3/4] mlxsw: core_acl_flex_actions: Remove redundant counter destruction

2018-08-03 Thread Ido Schimmel
From: Nir Dotan Each tc flower rule uses a hidden count action. As counter resource may not be available due to limited HW resources, update _counter_create() and _counter_destroy() pair to follow previously introduced symmetric error condition handling, add a call to mlxsw_afa_resource_del() as

[PATCH net 0/4] mlxsw: Fix ACL actions error condition handling

2018-08-03 Thread Ido Schimmel
Nir says: Two issues were lately noticed within mlxsw ACL actions error condition handling. The first patch deals with conflicting actions such as: # tc filter add dev swp49 parent : \ protocol ip pref 10 flower skip_sw dst_ip 192.168.101.1 \ action goto chain 100 \ action mirred

[PATCH net 1/4] mlxsw: core_acl_flex_actions: Return error for conflicting actions

2018-08-03 Thread Ido Schimmel
From: Nir Dotan Spectrum switch ACL action set is built in groups of three actions which may point to additional actions. A group holds a single record which can be set as goto record for pointing at a following group or can be set to mark the termination of the lookup. This is perfectly

[PATCH net 2/4] mlxsw: core_acl_flex_actions: Remove redundant resource destruction

2018-08-03 Thread Ido Schimmel
From: Nir Dotan Some ACL actions require the allocation of a separate resource prior to applying the action itself. When facing an error condition during the setup phase of the action, resource should be destroyed. For such actions the destruction was done twice which is dangerous and lead to a

[PATCH net 4/4] mlxsw: core_acl_flex_actions: Remove redundant mirror resource destruction

2018-08-03 Thread Ido Schimmel
From: Nir Dotan In previous patch mlxsw_afa_resource_del() was added to avoid a duplicate resource detruction scenario. For mirror actions, such duplicate destruction leads to a crash as in: # tc qdisc add dev swp49 ingress # tc filter add dev swp49 parent : \ protocol ip chain 100

Re: [PATCH v8 bpf-next 00/10] veth: Driver XDP

2018-08-03 Thread Toshiaki Makita
On 18/08/03 (金) 18:45, Jesper Dangaard Brouer wrote: On Fri, 3 Aug 2018 16:58:08 +0900 Toshiaki Makita wrote: This patch set introduces driver XDP for veth. Basically this is used in conjunction with redirect action of another XDP program. NIC ---> veth===veth (XDP) (redirect)

Re: [PATCH net 0/5] tcp: more robust ooo handling

2018-08-03 Thread David Woodhouse
On Mon, 2018-07-23 at 12:03 -0700, David Miller wrote: > From: Eric Dumazet > Date: Mon, 23 Jul 2018 09:28:16 -0700 > > > Juha-Matti Tilli reported that malicious peers could inject tiny > > packets in out_of_order_queue, forcing very expensive calls > > to tcp_collapse_ofo_queue() and

[PATCH net-next 3/3] l2tp: ignore L2TP_ATTR_MTU

2018-08-03 Thread Guillaume Nault
This attribute's handling is broken. It can only be used when creating Ethernet pseudo-wires, in which case its value can be used as the initial MTU for the l2tpeth device. However, when handling update requests, L2TP_ATTR_MTU only modifies session->mtu. This value is never propagated to the

[PATCH net-next 1/3] l2tp: define l2tp_tunnel_dst_mtu()

2018-08-03 Thread Guillaume Nault
Consolidate retrieval of tunnel's socket mtu in order to simplify l2tp_eth and l2tp_ppp a bit. Signed-off-by: Guillaume Nault --- net/l2tp/l2tp_core.h | 18 ++ net/l2tp/l2tp_eth.c | 14 -- net/l2tp/l2tp_ppp.c | 15 --- 3 files changed, 26 insertions(+),

[PATCH net-next 2/3] l2tp: simplify MTU handling in l2tp_ppp

2018-08-03 Thread Guillaume Nault
The value of the session's .mtu field, as defined by pppol2tp_connect() or pppol2tp_session_create(), is later overwritten by pppol2tp_session_init() (unless getting the tunnel's socket PMTU fails). This field is then only used when setting the PPP channel's MTU in pppol2tp_connect(). Furthermore,

[PATCH net-next 0/3] l2tp: sanitise MTU handling on sessions

2018-08-03 Thread Guillaume Nault
Most of the code handling sessions' MTU has no effect. The ->mtu field in struct l2tp_session might be used at session creation time, but neither PPP nor Ethernet pseudo-wires take updates into account. L2TP sessions don't have a concept of MTU, which is the reason why ->mtu is mostly ignored.

Re: [PATCH v8 bpf-next 00/10] veth: Driver XDP

2018-08-03 Thread Jesper Dangaard Brouer
On Fri, 3 Aug 2018 16:58:08 +0900 Toshiaki Makita wrote: > This patch set introduces driver XDP for veth. > Basically this is used in conjunction with redirect action of another XDP > program. > > NIC ---> veth===veth > (XDP) (redirect)(XDP) > I'm was playing with V7 on my

[patch net-next] net: sched: fix flush on non-existing chain

2018-08-03 Thread Jiri Pirko
From: Jiri Pirko User was able to perform filter flush on chain 0 even if it didn't have any filters in it. With the patch that avoided implicit chain 0 creation, this changed. So in case user wants filter flush on chain which does not exist, just return success. There's no reason for non-0

Re: [PATCH v8 bpf-next 05/10] veth: Handle xdp_frames in xdp napi ring

2018-08-03 Thread Jesper Dangaard Brouer
On Fri, 3 Aug 2018 16:58:13 +0900 Toshiaki Makita wrote: > This is preparation for XDP TX and ndo_xdp_xmit. > This allows napi handler to handle xdp_frames through xdp ring as well > as sk_buff. > > v8: > - Don't use xdp_frame pointer address to calculate skb->head and > headroom. > > v7: >

Re: [PATCH v8 bpf-next 04/10] xdp: Helper function to clear kernel pointers in xdp_frame

2018-08-03 Thread Jesper Dangaard Brouer
On Fri, 3 Aug 2018 16:58:12 +0900 Toshiaki Makita wrote: > xdp_frame has kernel pointers which should not be readable from bpf > programs. When we want to reuse xdp_frame region but it may be read by > bpf programs later, we can use this helper to clear kernel pointers. > This is more efficient

  1   2   >