Re: [PATCH RESEND net] net: handle 802.1P vlan 0 packets properly

2019-06-11 Thread Toshiaki Makita
On 2019/06/12 6:57, Govindarajulu Varadarajan (gvaradar) wrote: @On Tue, 2019-06-11 at 13:34 +0900, Toshiaki Makita wrote: On 2019/06/11 3:31, Govindarajulu Varadarajan wrote: When stack receives pkt: [802.1P vlan 0][802.1AD vlan 100][IPv4], vlan_do_receive() returns false if it does not find v

Re: [PATCH bpf-next v3 0/5] net: xdp: refactor XDP program queries

2019-06-11 Thread Björn Töpel
On 2019-06-11 19:22, Jakub Kicinski wrote: Three progs? Are we planning to allow SKB and DRV at the same time? No! :-) One prog and flags looked fairly reasonable to me. Flags can even be a u8. The offload prog can continue to live in the driver. Ok, I'll take that route (only adding a u

Re: [PATCH bpf] bpf: net: Set sk_bpf_storage back to NULL for cloned sk

2019-06-11 Thread Andrii Nakryiko
On Tue, Jun 11, 2019 at 8:33 PM Martin KaFai Lau wrote: > > The cloned sk should not carry its parent-listener's sk_bpf_storage. > This patch fixes it by setting it back to NULL. Makes sense. Acked-by: Andrii Nakryiko > > Fixes: 6ac99e8f23d4 ("bpf: Introduce bpf sk local storage") > Signed-off

Re: [PATCH net-next] net: dsa: tag_sja1105: Select CONFIG_PACKING

2019-06-11 Thread Randy Dunlap
On 6/11/19 11:47 AM, Vladimir Oltean wrote: > The packing facility is needed to decode Ethernet meta frames containing > source port and RX timestamping information. > > The DSA driver selects CONFIG_PACKING, but the tagger did not, and since > taggers can be now compiled as modules independently

[PATCH v4 net] sctp: Free cookie before we memdup a new one

2019-06-11 Thread Neil Horman
Based on comments from Xin, even after fixes for our recent syzbot report of cookie memory leaks, its possible to get a resend of an INIT chunk which would lead to us leaking cookie memory. To ensure that we don't leak cookie memory, free any previously allocated cookie first. --- Change notes v1

Re: net-next: KSZ switch driver oops in ksz_mib_read_work

2019-06-11 Thread Florian Fainelli
On 6/11/19 10:57 AM, Robert Hancock wrote: > We are using an embedded platform with a KSZ9897 switch. I am getting > the oops below in ksz_mib_read_work when testing with net-next branch. > After adding in some debug output, the problem is in this code: > > for (i = 0; i < dev->mib_port_cnt;

Re: [PATCH net-next] net: phy: Add more 1000BaseX support detection

2019-06-11 Thread Florian Fainelli
On 6/11/19 3:06 PM, Robert Hancock wrote: > Commit "net: phy: Add detection of 1000BaseX link mode support" added > support for not filtering out 1000BaseX mode from the PHY's supported > modes in genphy_config_init, but we have to make a similar change in > genphy_read_abilities in order to actual

[PATCH net-next] net: phy: Add more 1000BaseX support detection

2019-06-11 Thread Robert Hancock
Commit "net: phy: Add detection of 1000BaseX link mode support" added support for not filtering out 1000BaseX mode from the PHY's supported modes in genphy_config_init, but we have to make a similar change in genphy_read_abilities in order to actually detect it as a supported mode in the first plac

Re: [PATCH RESEND net] net: handle 802.1P vlan 0 packets properly

2019-06-11 Thread Govindarajulu Varadarajan (gvaradar)
@On Tue, 2019-06-11 at 13:34 +0900, Toshiaki Makita wrote: > On 2019/06/11 3:31, Govindarajulu Varadarajan wrote: > > When stack receives pkt: [802.1P vlan 0][802.1AD vlan 100][IPv4], > > vlan_do_receive() returns false if it does not find vlan_dev. Later > > __netif_receive_skb_core() fails to fin

Re: [PATCH bpf-next v3 2/3] bpf_xdp_redirect_map: Perform map lookup in eBPF helper

2019-06-11 Thread Jakub Kicinski
On Tue, 11 Jun 2019 17:44:00 +0200, Toke Høiland-Jørgensen wrote: > +#define XDP_REDIRECT_INVALID_MASK (XDP_ABORTED | XDP_DROP | XDP_PASS | > XDP_TX) It feels a little strange to OR in values which are not bits, even if it happens to work today (since those are values of 0, 1, 2, 3)...

[PATCH net-next 0/4] net: dsa: use switchdev attr and obj handlers

2019-06-11 Thread Vivien Didelot
This series reduces boilerplate in the handling of switchdev attribute and object operations by using the switchdev_handle_* helpers, which check the targeted devices and recurse into their lower devices. This also brings back the ability to inspect operations targeting the bridge device itself (w

[PATCH bpf] bpf: net: Set sk_bpf_storage back to NULL for cloned sk

2019-06-11 Thread Martin KaFai Lau
The cloned sk should not carry its parent-listener's sk_bpf_storage. This patch fixes it by setting it back to NULL. Fixes: 6ac99e8f23d4 ("bpf: Introduce bpf sk local storage") Signed-off-by: Martin KaFai Lau --- net/core/sock.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/net/core/soc

Re: [PATCH net v3 0/2] ipv6: Fix listing and flushing of cached route exceptions

2019-06-11 Thread David Ahern
On 6/11/19 2:19 PM, Martin Lau wrote: > On Tue, Jun 11, 2019 at 12:47:58AM +0200, Stefano Brivio wrote: >> On Mon, 10 Jun 2019 23:53:15 +0200 >> Stefano Brivio wrote: >> >>> On Mon, 10 Jun 2019 15:38:06 -0600 >>> David Ahern wrote: >>> in dot releases of stable trees, I think it would be bet

Re: [PATCH net v2] vrf: Increment Icmp6InMsgs on the original netdev

2019-06-11 Thread David Ahern
On 6/10/19 8:32 AM, Stephen Suryaputra wrote: > Get the ingress interface and increment ICMP counters based on that > instead of skb->dev when the the dev is a VRF device. > > This is a follow up on the following message: > https://www.spinics.net/lists/netdev/msg560268.html > > v2: Avoid changin

Re: [PATCH net-next] tcp: add optional per socket transmit delay

2019-06-11 Thread Eric Dumazet
On Tue, Jun 11, 2019 at 12:16 PM David Miller wrote: > > From: Eric Dumazet > Date: Mon, 10 Jun 2019 20:03:34 -0700 > > > This patchs adds TCP_TX_DELAY socket option, to set a delay in > > usec units. > > > > unsigned int tx_delay = 1; /* 10 msec */ > > > > setsockopt(fd, SOL_TCP, TCP_TX_

Re: [PATCH net-next v1 5/7] taprio: Add support for txtime offload mode.

2019-06-11 Thread Patel, Vedang
> On Jun 10, 2019, at 7:27 AM, Murali Karicheri wrote: > > Vedang, > > On 06/07/2019 05:12 PM, Patel, Vedang wrote: >> Hi Murali, >>> On Jun 7, 2019, at 11:52 AM, Murali Karicheri wrote: >>> >>> On 06/04/2019 04:06 PM, Patel, Vedang wrote: Hi Murali, > On Jun 3, 2019, at 7:15 AM, Mu

Re: [PATCH v3] [sctp] Free cookie before we memdup a new one

2019-06-11 Thread Neil Horman
On Tue, Jun 11, 2019 at 01:08:56PM -0700, David Miller wrote: > From: Neil Horman > Date: Tue, 11 Jun 2019 15:22:45 -0400 > > > v2->v3 > > net->sctp > > also free peer_chunks > > Neil this isn't the first time you're submitting sctp patches right? ;-) > > Subject: "[PATCH v3 net] sctp: Free coo

Re: [PATCH net-next 1/3] net/sched: Introduce action ct

2019-06-11 Thread Toke Høiland-Jørgensen
Marcelo Ricardo Leitner writes: > On Tue, Jun 11, 2019 at 05:34:50PM +0200, Toke Høiland-Jørgensen wrote: >> Paul Blakey writes: >> >> > On 6/11/2019 4:59 PM, Toke Høiland-Jørgensen wrote: >> >> Paul Blakey writes: >> >> >> >>> Allow sending a packet to conntrack and set conntrack zone, mark,

Re: [PATCH net v3 0/2] ipv6: Fix listing and flushing of cached route exceptions

2019-06-11 Thread Martin Lau
On Tue, Jun 11, 2019 at 12:47:58AM +0200, Stefano Brivio wrote: > On Mon, 10 Jun 2019 23:53:15 +0200 > Stefano Brivio wrote: > > > On Mon, 10 Jun 2019 15:38:06 -0600 > > David Ahern wrote: > > > > > in dot releases of stable trees, I think it would be better to converge > > > on consistent beha

Re: [PATCH v3] [sctp] Free cookie before we memdup a new one

2019-06-11 Thread David Miller
From: Neil Horman Date: Tue, 11 Jun 2019 15:22:45 -0400 > v2->v3 > net->sctp > also free peer_chunks Neil this isn't the first time you're submitting sctp patches right? ;-) Subject: "[PATCH v3 net] sctp: Free cookie before we memdup a new one" It's "subsystem_prefix: " and I even stated this

Re: [PATCH iproute2-next] Makefile: pass -pipe to the compiler

2019-06-11 Thread Stephen Hemminger
On Tue, 11 Jun 2019 20:05:13 +0200 Matteo Croce wrote: > Pass the -pipe option to GCC, to use pipes instead of temp files. > On a slow AMD G-T40E CPU we get a non negligible 6% improvement > in build time. > > real1m15,111s > user1m2,521s > sys 0m12,465s > > real1m10,861s > user

[PATCH v3] [sctp] Free cookie before we memdup a new one

2019-06-11 Thread Neil Horman
Based on comments from Xin, even after fixes for our recent syzbot report of cookie memory leaks, its possible to get a resend of an INIT chunk which would lead to us leaking cookie memory. To ensure that we don't leak cookie memory, free any previously allocated cookie first. --- Change notes v1

Re: [PATCH net-next 00/12] tls: add support for kernel-driven resync and nfp RX offload

2019-06-11 Thread David Miller
From: Jakub Kicinski Date: Mon, 10 Jun 2019 21:39:58 -0700 > This series adds TLS RX offload for NFP and completes the offload > by providing resync strategies. When TLS data stream looses segments > or experiences reorder NIC can no longer perform in line offload. > Resyncs provide information

Re: [PATCH net-next] tcp: add optional per socket transmit delay

2019-06-11 Thread David Miller
From: Eric Dumazet Date: Mon, 10 Jun 2019 20:03:34 -0700 > This patchs adds TCP_TX_DELAY socket option, to set a delay in > usec units. > > unsigned int tx_delay = 1; /* 10 msec */ > > setsockopt(fd, SOL_TCP, TCP_TX_DELAY, &tx_delay, sizeof(tx_delay)); I'm trying to think about what th

[PATCH net-next] r8169: let mdio read functions return -ETIMEDOUT

2019-06-11 Thread Heiner Kallweit
In case of a timeout currently ~0 is returned. Callers often just check whether a certain bit is set and therefore may behave incorrectly. So let's return -ETIMEDOUT in case of a timeout. r8168_phy_ocp_read is used in r8168g_mdio_read only, therefore we can apply the same change. Signed-off-by: H

[PATCH net-next] r8169: improve rtl_coalesce_info

2019-06-11 Thread Heiner Kallweit
tp->coalesce_info is used in rtl_coalesce_info() only, so we can remove this member. In addition replace phy_ethtool_get_link_ksettings with a direct access to tp->phydev->speed. Signed-off-by: Heiner Kallweit --- drivers/net/ethernet/realtek/r8169_main.c | 21 ++--- 1 file chang

Re: [PATCH net 0/2] Don't assume linear buffers in error handlers for VXLAN and GENEVE

2019-06-11 Thread David Miller
From: Stefano Brivio Date: Tue, 11 Jun 2019 00:27:04 +0200 > Guillaume noticed the same issue fixed by commit 26fc181e6cac ("fou, fou6: > do not assume linear skbs") for fou and fou6 is also present in VXLAN and > GENEVE error handlers: we can't assume linear buffers there, we need to > use pskb_

Re: [PATCH net v2] vrf: Increment Icmp6InMsgs on the original netdev

2019-06-11 Thread David Miller
From: Stephen Suryaputra Date: Mon, 10 Jun 2019 10:32:50 -0400 > Get the ingress interface and increment ICMP counters based on that > instead of skb->dev when the the dev is a VRF device. > > This is a follow up on the following message: > https://www.spinics.net/lists/netdev/msg560268.html >

Re: [PATCH net] net: openvswitch: do not free vport if register_netdevice() is failed.

2019-06-11 Thread David Miller
From: Taehee Yoo Date: Sun, 9 Jun 2019 23:26:21 +0900 > In order to create an internal vport, internal_dev_create() is used and > that calls register_netdevice() internally. > If register_netdevice() fails, it calls dev->priv_destructor() to free > private data of netdev. actually, a private dat

Re: [PATCH net-next] net: netlink: make netlink_walk_start() void return type

2019-06-11 Thread David Miller
From: Taehee Yoo Date: Mon, 10 Jun 2019 02:05:30 +0900 > netlink_walk_start() needed to return an error code because of > rhashtable_walk_init(). but that was converted to rhashtable_walk_enter() > and it is a void type function. so now netlink_walk_start() doesn't need > any return value. > >

Re: [PATCH net-next] net: openvswitch: remove unnecessary ASSERT_OVSL in ovs_vport_del()

2019-06-11 Thread David Miller
From: Taehee Yoo Date: Mon, 10 Jun 2019 02:19:06 +0900 > ASSERT_OVSL() in ovs_vport_del() is unnecessary because > ovs_vport_del() is only called by ovs_dp_detach_port() and > ovs_dp_detach_port() calls ASSERT_OVSL() too. > > Signed-off-by: Taehee Yoo Applied.

[PATCH net-next] net: dsa: tag_sja1105: Select CONFIG_PACKING

2019-06-11 Thread Vladimir Oltean
The packing facility is needed to decode Ethernet meta frames containing source port and RX timestamping information. The DSA driver selects CONFIG_PACKING, but the tagger did not, and since taggers can be now compiled as modules independently from the drivers themselves, this is an issue now, as

Re: [PATCH net] net: correct udp zerocopy refcnt also when zerocopy only on append

2019-06-11 Thread David Miller
From: Willem de Bruijn Date: Fri, 7 Jun 2019 17:57:48 -0400 > From: Willem de Bruijn > > The below patch fixes an incorrect zerocopy refcnt increment when > appending with MSG_MORE to an existing zerocopy udp skb. > > send(.., MSG_ZEROCOPY | MSG_MORE); // refcnt 1 > send(.., MSG_ZEROCOPY

Re: [PATCH net-next] selftests: pmtu: Introduce list_flush_ipv6_exception test case

2019-06-11 Thread David Miller
From: Stefano Brivio Date: Thu, 6 Jun 2019 22:15:09 +0200 > This test checks that route exceptions can be successfully listed and > flushed using ip -6 route {list,flush} cache. > > Signed-off-by: Stefano Brivio > --- > This will cause a minor conflict with David Ahern's patch: > "[PATCH net-n

Re: [PATCH bpf-next v3 2/3] bpf_xdp_redirect_map: Perform map lookup in eBPF helper

2019-06-11 Thread Toke Høiland-Jørgensen
Jesper Dangaard Brouer writes: > On Tue, 11 Jun 2019 17:44:00 +0200 > Toke Høiland-Jørgensen wrote: > >> From: Toke Høiland-Jørgensen >> >> The bpf_redirect_map() helper used by XDP programs doesn't return any >> indication of whether it can successfully redirect to the map index it was >> giv

[PATCH iproute2-next] Makefile: pass -pipe to the compiler

2019-06-11 Thread Matteo Croce
Pass the -pipe option to GCC, to use pipes instead of temp files. On a slow AMD G-T40E CPU we get a non negligible 6% improvement in build time. real1m15,111s user1m2,521s sys 0m12,465s real1m10,861s user1m2,520s sys 0m12,901s Signed-off-by: Matteo Croce --- Makefile |

[PATCH iproute2] testsuite: don't clobber /tmp

2019-06-11 Thread Matteo Croce
Even if not running the testsuite, every build will leave a stale tc_testkenv.* file in the system temp directory. Conditionally create the temp file only if we're running the testsuite. Signed-off-by: Matteo Croce --- testsuite/Makefile | 5 - 1 file changed, 4 insertions(+), 1 deletion(-)

Re: [PATCH bpf-next v3 2/3] bpf_xdp_redirect_map: Perform map lookup in eBPF helper

2019-06-11 Thread Jesper Dangaard Brouer
On Tue, 11 Jun 2019 17:44:00 +0200 Toke Høiland-Jørgensen wrote: > From: Toke Høiland-Jørgensen > > The bpf_redirect_map() helper used by XDP programs doesn't return any > indication of whether it can successfully redirect to the map index it was > given. Instead, BPF programs have to track thi

net-next: KSZ switch driver oops in ksz_mib_read_work

2019-06-11 Thread Robert Hancock
We are using an embedded platform with a KSZ9897 switch. I am getting the oops below in ksz_mib_read_work when testing with net-next branch. After adding in some debug output, the problem is in this code: for (i = 0; i < dev->mib_port_cnt; i++) { p = &dev->ports[i];

Re: [PATCH bpf-next v3 0/5] net: xdp: refactor XDP program queries

2019-06-11 Thread Jakub Kicinski
On Tue, 11 Jun 2019 09:24:41 +0200, Björn Töpel wrote: > On 2019-06-11 00:24, Jakub Kicinski wrote: > > On Mon, 10 Jun 2019 18:02:29 +0200, Björn Töpel wrote: > >> Jakub, what's your thoughts on the special handling of XDP offloading? > >> Maybe it's just overkill? Just allocate space for the off

[PATCH net-next] net: axienet: move use of resource after validity check

2019-06-11 Thread Robert Hancock
We were accessing the pointer returned from platform_get_resource before checking if it was valid, causing an oops if it was not. Move this access after the call to devm_ioremap_resource which does the validity check. Signed-off-by: Robert Hancock --- This bug was introduced in my recent axienet

[PATCH net-next 02/13] s390/qeth: use mm helpers

2019-06-11 Thread Julian Wiedmann
Slightly reduce the complexity of the core xmit path, by replacing some open-coded logic with the corresponding helpers. Signed-off-by: Julian Wiedmann --- drivers/s390/net/qeth_core_main.c | 33 +++ 1 file changed, 16 insertions(+), 17 deletions(-) diff --git a/driv

[PATCH net-next 03/13] s390/qeth: simplify DOWN state handling

2019-06-11 Thread Julian Wiedmann
When the tear down sequence in qeth_l?_stop_card() has finished, the card is guaranteed to be in DOWN state and we don't have to check for it again. With this insight we can also remove the redundant setting of card->state in qeth_l?_set_online()'s error path. Signed-off-by: Julian Wiedmann ---

[PATCH net-next 00/13] s390/qeth: updates 2019-06-11

2019-06-11 Thread Julian Wiedmann
Hi Dave, please apply the following patch series for qeth to net-next. This brings all sorts of cleanups and minor improvements, primarily for the control IO path. Thanks, Julian Julian Wiedmann (13): s390/qeth: don't mask TX errors on IQD devices s390/qeth: use mm helpers s390/qeth: simp

[PATCH net-next 13/13] s390/qeth: allocate a single cmd on read channel

2019-06-11 Thread Julian Wiedmann
We statically allocate 8 cmd buffers on the read channel, when the only IO left that's still using them is the long-running READ. Replace this with a single allocated cmd, that gets restarted whenever the READ completed. This introduces refcounting for allocated cmds, so that the READ cmd can surv

[PATCH net-next 07/13] s390/qeth: remove OSN-specific IO code

2019-06-11 Thread Julian Wiedmann
OSN currently provides a custom code path to submit IPA cmds, without waiting for the cmd response. Replace it with qeth_send_ipa_cmd(), which uses the common qeth_send_control_data() IO infrastructure. By setting a custom iob->callback, we can now provide feedback to the caller about whether the

[PATCH net-next 12/13] s390/qeth: command-chain the IDX sequence

2019-06-11 Thread Julian Wiedmann
The current IDX sequence first sends one WRITE cmd to activate the device, and then sends a second cmd that READs the response. Using qeth_alloc_cmd(), we can combine this into a single IO with two command-chained CCWs. Signed-off-by: Julian Wiedmann --- drivers/s390/net/qeth_core_main.c | 58 +

[PATCH net-next 10/13] s390/qeth: add support for dynamically allocated cmds

2019-06-11 Thread Julian Wiedmann
qeth currently uses a fixed set of statically allocated cmd buffers for the read and write IO channels. This (1) doesn't play well with the single RCD cmd we need to issue on the data channel, (2) doesn't provide the necessary flexibility for certain IDX improvements, and (3) is also rather wastefu

[PATCH net-next 05/13] s390/qeth: clean up setting of BLKT defaults

2019-06-11 Thread Julian Wiedmann
When called from qeth_core_probe_device(), qeth_determine_capabilities() initializes the device's BLKT defaults. From all other callers, the ccw_device has already been set online and the BLKT setting is skipped. Clean this up by extracting the BLKT setting into a separate helper that gets called

[PATCH net-next 06/13] s390/qeth: remove qeth_wait_for_buffer()

2019-06-11 Thread Julian Wiedmann
The basic MPC initialization sequence is strictly sequential, and waiting for an available cmd buffer should never be necessary. So this change only affects the OSN path, where dangling waiters on an unbounded wait_event() are not desirable. Switch to qeth_get_buffers(), and let OSN callers deal wi

[PATCH net-next 11/13] s390/qeth: convert RCD code to common IO infrastructure

2019-06-11 Thread Julian Wiedmann
The RCD code is the last remaining IO path that doesn't use the qeth_send_control_data() infrastructure. Doing so allows us to remove all sorts of custom state machinery and logic in the IRQ handler. Instead of introducing statically allocated cmd buffers for this single IO on the data channel, us

[PATCH net-next 04/13] s390/qeth: restart pending READ cmd from callback

2019-06-11 Thread Julian Wiedmann
The completion of a pending READ cmd is processed via qeth_issue_next_read_cb(). Let this callback also start the next READ cmd, instead of hardcoding that step into the IRQ handler. While at it remove the check of the channel state, __qeth_issue_next_read() already does this. Signed-off-by: Juli

[PATCH net-next 09/13] s390/qeth: remove 'channel' parameter from callbacks

2019-06-11 Thread Julian Wiedmann
Each cmd buffer maintains a pointer to the IO channel that it was/will be issued on. So when dealing with cmd buffers, we don't need to pass around a separate channel pointer. Signed-off-by: Julian Wiedmann --- drivers/s390/net/qeth_core.h | 5 ++-- drivers/s390/net/qeth_core_main.c | 38 +

[PATCH net-next 08/13] s390/qeth: convert device-specific trace entries

2019-06-11 Thread Julian Wiedmann
The vast majority of SETUP-classified trace entries can be moved to their device-specific trace file. This reduces pollution of the global SETUP file, and provides a consistent trace view of all activity on the device. Signed-off-by: Julian Wiedmann --- drivers/s390/net/qeth_core_main.c | 196 ++

[PATCH net-next 01/13] s390/qeth: don't mask TX errors on IQD devices

2019-06-11 Thread Julian Wiedmann
Current code suppresses debug entries when an TX buffer completes in ERROR state with no error indication set in SBALF15. This was introduced back with commit 58490f18071d ("qeth: HiperSockets SIGA retry support on CC=2."). But qeth no longer retries after CC=2, and this sort of suppression make no

[PATCH iproute2 v2 3/3] netns: make netns_{save,restore} static

2019-06-11 Thread Matteo Croce
The netns_{save,restore} functions are only used in ipnetns.c now, since the restore is not needed anymore after the netns exec command. Move them in ipnetns.c, and make them static. Signed-off-by: Matteo Croce --- include/namespace.h | 2 -- ip/ip.c | 1 - ip/ipnetns.c| 31

[PATCH iproute2] devlink: mnlg: Catch returned error value of dumpit commands

2019-06-11 Thread Moshe Shemesh
Devlink commands which implements the dumpit callback may return error. The netlink function netlink_dump() sends the errno value as the payload of the message, while answering user space with NLMSG_DONE. To enable receiving errno value for dumpit commands we have to check for it in the message. If

[PATCH iproute2 v2 2/3] ip vrf: use hook to change VRF in the child

2019-06-11 Thread Matteo Croce
On vrf exec, reset the VRF associations in the child process, via the new hook added to cmd_exec(). In this way, the parent doesn't have to reset the VRF associations before spawning other processes. Signed-off-by: Matteo Croce --- ip/ipnetns.c | 5 - ip/ipvrf.c | 12 2 files

[PATCH iproute2 v2 1/3] netns: switch netns in the child when executing commands

2019-06-11 Thread Matteo Croce
'ip netns exec' changes the current netns just before executing a child process, and restores it after forking. This is needed if we're running in batch or do_all mode. Some cleanups must be done both in the parent and in the child: the parent must restore the previous netns, while the child must r

[PATCH iproute2 v2 0/3] refactor the cmd_exec()

2019-06-11 Thread Matteo Croce
Refactor the netns and ipvrf code so less steps are needed to exec commands in a netns or a VRF context. Also remove some code which became dead. bloat-o-meter output: $ bloat-o-meter ip.old ip add/remove: 1/4 grow/shrink: 3/4 up/down: 174/-312 (-138) Function o

Re: [PATCH v2] [net] Free cookie before we memdup a new one

2019-06-11 Thread David Miller
From: Neil Horman Date: Tue, 11 Jun 2019 07:21:28 -0400 > Based on comments from Xin, even after fixes for our recent syzbot > report of cookie memory leaks, its possible to get a resend of an INIT > chunk which would lead to us leaking cookie memory. > > To ensure that we don't leak cookie memo

Re: [PATCH net-next 1/3] net/sched: Introduce action ct

2019-06-11 Thread Marcelo Ricardo Leitner
On Tue, Jun 11, 2019 at 05:34:50PM +0200, Toke Høiland-Jørgensen wrote: > Paul Blakey writes: > > > On 6/11/2019 4:59 PM, Toke Høiland-Jørgensen wrote: > >> Paul Blakey writes: > >> > >>> Allow sending a packet to conntrack and set conntrack zone, mark, > >>> labels and nat parameters. > >> How

[PATCH net-next v2 7/9] mlxsw: spectrum_ptp: Add implementation for physical hardware clock operations

2019-06-11 Thread Ido Schimmel
From: Shalom Toledo Implement physical hardware clock operations. Signed-off-by: Shalom Toledo Acked-by: Jiri Pirko Reviewed-by: Petr Machata Signed-off-by: Ido Schimmel --- drivers/net/ethernet/mellanox/mlxsw/Kconfig | 1 + drivers/net/ethernet/mellanox/mlxsw/Makefile | 1 + .../eth

[PATCH net-next v2 9/9] selftests: ptp: Add Physical Hardware Clock test

2019-06-11 Thread Ido Schimmel
From: Shalom Toledo Test the PTP Physical Hardware Clock functionality using the "phc_ctl" (a part of "linuxptp"). The test contains three sub-tests: * "settime" test * "adjtime" test * "adjfreq" test "settime" test: * set the PHC time to 0 seconds. * wait for 120.5 seconds. * check

[PATCH net-next v2 6/9] ptp: ptp_clock: Publish scaled_ppm_to_ppb

2019-06-11 Thread Ido Schimmel
From: Shalom Toledo Publish scaled_ppm_to_ppb to allow drivers to use it. Signed-off-by: Shalom Toledo Reviewed-by: Petr Machata Signed-off-by: Ido Schimmel --- drivers/ptp/ptp_clock.c | 3 ++- include/linux/ptp_clock_kernel.h | 8 2 files changed, 10 insertions(+), 1 delet

[PATCH net-next v2 8/9] mlxsw: spectrum: PTP physical hardware clock initialization

2019-06-11 Thread Ido Schimmel
From: Shalom Toledo Initialize the PTP physical hardware clock. Signed-off-by: Shalom Toledo Acked-by: Jiri Pirko Reviewed-by: Petr Machata Signed-off-by: Ido Schimmel --- .../net/ethernet/mellanox/mlxsw/spectrum.c| 36 +++ .../net/ethernet/mellanox/mlxsw/spectrum.h|

[PATCH net-next v2 5/9] mlxsw: reg: Add Management Pulse Per Second Register

2019-06-11 Thread Ido Schimmel
From: Shalom Toledo The MTPPS register provides the device PPS capabilities, configure the PPS in and out modules and holds the PPS in time stamp. Signed-off-by: Shalom Toledo Acked-by: Jiri Pirko Reviewed-by: Petr Machata Signed-off-by: Ido Schimmel --- drivers/net/ethernet/mellanox/mlxsw/

[PATCH net-next v2 0/9] mlxsw: Add support for physical hardware clock

2019-06-11 Thread Ido Schimmel
From: Ido Schimmel Shalom says: This patchset adds support for physical hardware clock for Spectrum-1 ASIC only. Patches #1, #2 and #3 add the ability to query the free running clock PCI address. Patches #4 and #5 add two new register, the Management UTC Register and the Management Pulse Per S

[PATCH net-next v2 1/9] mlxsw: cmd: Free running clock PCI BAR and offsets via query firmware

2019-06-11 Thread Ido Schimmel
From: Shalom Toledo Add free running clock PCI BAR and offset to query firmware command. Signed-off-by: Shalom Toledo Reviewed-by: Petr Machata Acked-by: Jiri Pirko Signed-off-by: Ido Schimmel --- drivers/net/ethernet/mellanox/mlxsw/cmd.h | 12 1 file changed, 12 insertions(+)

[PATCH net-next v2 3/9] mlxsw: pci: Query free running clock PCI BAR and offsets

2019-06-11 Thread Ido Schimmel
From: Shalom Toledo Query free running clock PCI BAR and offsets during the pci_init. Signed-off-by: Shalom Toledo Acked-by: Jiri Pirko Reviewed-by: Petr Machata Signed-off-by: Ido Schimmel --- drivers/net/ethernet/mellanox/mlxsw/pci.c| 32 drivers/net/ethernet/mell

[PATCH net-next v2 2/9] mlxsw: core: Add a new interface for reading the hardware free running clock

2019-06-11 Thread Ido Schimmel
From: Shalom Toledo Add two new bus operations for reading the hardware free running clock. Signed-off-by: Shalom Toledo Acked-by: Jiri Pirko Reviewed-by: Petr Machata Signed-off-by: Ido Schimmel --- drivers/net/ethernet/mellanox/mlxsw/core.c | 12 drivers/net/ethernet/mellanox

[PATCH net-next v2 4/9] mlxsw: reg: Add Management UTC Register

2019-06-11 Thread Ido Schimmel
From: Shalom Toledo The MTUTC register configures the HW UTC counter. Signed-off-by: Shalom Toledo Reviewed-by: Petr Machata Acked-by: Jiri Pirko Signed-off-by: Ido Schimmel --- drivers/net/ethernet/mellanox/mlxsw/reg.h | 45 +++ 1 file changed, 45 insertions(+) diff --

[PATCH bpf-next v3 0/3] xdp: Allow lookup into devmaps before redirect

2019-06-11 Thread Toke Høiland-Jørgensen
When using the bpf_redirect_map() helper to redirect packets from XDP, the eBPF program cannot currently know whether the redirect will succeed, which makes it impossible to gracefully handle errors. To properly fix this will probably require deeper changes to the way TX resources are allocated, bu

[PATCH bpf-next v3 3/3] devmap: Allow map lookups from eBPF

2019-06-11 Thread Toke Høiland-Jørgensen
From: Toke Høiland-Jørgensen We don't currently allow lookups into a devmap from eBPF, because the map lookup returns a pointer directly to the dev->ifindex, which shouldn't be modifiable from eBPF. However, being able to do lookups in devmaps is useful to know (e.g.) whether forwarding to a spe

[PATCH bpf-next v3 1/3] devmap/cpumap: Use flush list instead of bitmap

2019-06-11 Thread Toke Høiland-Jørgensen
From: Toke Høiland-Jørgensen The socket map uses a linked list instead of a bitmap to keep track of which entries to flush. Do the same for devmap and cpumap, as this means we don't have to care about the map index when enqueueing things into the map (and so we can cache the map lookup). Signed-

[PATCH bpf-next v3 2/3] bpf_xdp_redirect_map: Perform map lookup in eBPF helper

2019-06-11 Thread Toke Høiland-Jørgensen
From: Toke Høiland-Jørgensen The bpf_redirect_map() helper used by XDP programs doesn't return any indication of whether it can successfully redirect to the map index it was given. Instead, BPF programs have to track this themselves, leading to programs using duplicate maps to track which entries

Re: [PATCH net-next 1/3] net/sched: Introduce action ct

2019-06-11 Thread Toke Høiland-Jørgensen
Paul Blakey writes: > On 6/11/2019 4:59 PM, Toke Høiland-Jørgensen wrote: >> Paul Blakey writes: >> >>> Allow sending a packet to conntrack and set conntrack zone, mark, >>> labels and nat parameters. >> How is this different from the newly merged ctinfo action? >> >> -Toke > > Hi, > > ctinfo do

Re: [RFC net-next v2 1/1] net: sched: protect against loops in TC filter hooks

2019-06-11 Thread Florian Westphal
John Hurley wrote: > On Thu, Jun 6, 2019 at 8:52 PM Florian Westphal wrote: > > > > David Miller wrote: > > > From: Florian Westphal > > > Date: Thu, 6 Jun 2019 14:58:18 +0200 > > > > > > >> @@ -827,6 +828,7 @@ struct sk_buff { > > > >>__u8tc_at_ingress:1; > > > >>__

Re: [RFC net-next v2 1/1] net: sched: protect against loops in TC filter hooks

2019-06-11 Thread John Hurley
On Thu, Jun 6, 2019 at 8:52 PM Florian Westphal wrote: > > David Miller wrote: > > From: Florian Westphal > > Date: Thu, 6 Jun 2019 14:58:18 +0200 > > > > >> @@ -827,6 +828,7 @@ struct sk_buff { > > >>__u8tc_at_ingress:1; > > >>__u8tc_redirected:1;

Re: [PATCH net-next 1/3] net/sched: Introduce action ct

2019-06-11 Thread Paul Blakey
On 6/11/2019 4:59 PM, Toke Høiland-Jørgensen wrote: > Paul Blakey writes: > >> Allow sending a packet to conntrack and set conntrack zone, mark, >> labels and nat parameters. > How is this different from the newly merged ctinfo action? > > -Toke Hi, ctinfo does one of two very specific things,

[PATCH net-next 1/1] tc-tests: updated fw with bind actions by reference use cases

2019-06-11 Thread Roman Mashak
Extended fw TDC tests with use cases where actions are pre-created and attached to a filter by reference, i.e. by action index. Signed-off-by: Roman Mashak --- .../selftests/tc-testing/tc-tests/filters/fw.json | 144 + 1 file changed, 144 insertions(+) diff --git a/tools/te

Re: [PATCH net-next 1/3] net/sched: Introduce action ct

2019-06-11 Thread Toke Høiland-Jørgensen
Paul Blakey writes: > Allow sending a packet to conntrack and set conntrack zone, mark, > labels and nat parameters. How is this different from the newly merged ctinfo action? -Toke > Signed-off-by: Paul Blakey > Signed-off-by: Marcelo Ricardo Leitner > Signed-off-by: Yossi Kuperman > Acked

Re: [PATCH net-next 9/9] selftests: ptp: Add Physical Hardware Clock test

2019-06-11 Thread Shalom Toledo
On 07/06/2019 14:15, Vladimir Oltean wrote: > On Mon, 3 Jun 2019 at 15:25, Ido Schimmel wrote: >> >> From: Shalom Toledo >> >> Test the PTP Physical Hardware Clock functionality using the "phc_ctl" (a >> part of "linuxptp"). >> >> The test contains three sub-tests: >> * "settime" test >> * "a

Re: [PATCH net-next 3/3] selftests: mlxsw: Add speed and auto-negotiation test

2019-06-11 Thread Andrew Lunn
> The test currently resides under > tools/testing/selftests/drivers/net/mlxsw/, so it's specific to mlxsw. > > I believe the 56G quirk is the only thing in the test that is specific > to mlxsw. Should be possible to move it to > tools/testing/selftests/net/forwarding/ and skip 56G for mlxsw. Hi

[PATCH net-next 1/3] net/sched: Introduce action ct

2019-06-11 Thread Paul Blakey
Allow sending a packet to conntrack and set conntrack zone, mark, labels and nat parameters. Signed-off-by: Paul Blakey Signed-off-by: Marcelo Ricardo Leitner Signed-off-by: Yossi Kuperman Acked-by: Jiri Pirko --- include/net/flow_offload.h| 5 + include/net/tc_act/tc_ct.h|

[PATCH net-next 3/3] net/sched: cls_flower: Add matching on conntrack info

2019-06-11 Thread Paul Blakey
New matches for conntrack mark, label, zone, and state. Signed-off-by: Paul Blakey Signed-off-by: Marcelo Ricardo Leitner Signed-off-by: Yossi Kuperman Acked-by: Jiri Pirko --- include/uapi/linux/pkt_cls.h | 16 ++ net/sched/cls_flower.c | 127 ++

[PATCH net-next 2/3] net/flow_dissector: add connection tracking dissection

2019-06-11 Thread Paul Blakey
Retreives connection tracking zone, mark, label, and state from a SKB. Signed-off-by: Paul Blakey Signed-off-by: Marcelo Ricardo Leitner Acked-by: Jiri Pirko --- include/linux/skbuff.h | 10 ++ include/net/flow_dissector.h | 15 +++ net/core/flow_dissector.c| 44 +

Re: KASAN: null-ptr-deref Read in x25_connect

2019-06-11 Thread Dmitry Vyukov
On Tue, Jun 11, 2019 at 2:39 PM Arnd Bergmann wrote: > > On Tue, Jun 11, 2019 at 9:18 AM syzbot > wrote: > > > > Hello, > > > > syzbot found the following crash on: > > > > HEAD commit:f4cfcfbd net: dsa: sja1105: Fix link speed not working at .. > > git tree: net > > console output: htt

[PATCH net-next 0/3] net/sched: Introduce tc connection tracking

2019-06-11 Thread Paul Blakey
Hi, This patch series add connection tracking capabilities in tc sw datapath. It does so via a new tc action, called act_ct, and new tc flower classifier matching on conntrack state, mark and label. Usage is as follows: $ tc qdisc add dev ens1f0_0 ingress $ tc qdisc add dev ens1f0_1 ingress $ t

Re: DSA with MV88E6321 and imx28

2019-06-11 Thread Andrew Lunn
> I captured a ping from my device to my computer to look if outgoing is working > (captured on both devices). Here is the output from my device where i started > the: > > 00:24:24.752057 ARP, Request who-has 192.168.10.2 tell 192.168.10.1, length 28 > 0x: 0001 0800 0604 0001 6a2a ad79

Re: tp->copied_seq used before assignment in tcp_check_urg

2019-06-11 Thread Neal Cardwell
On Tue, Jun 11, 2019 at 2:46 AM Zhongjie Wang wrote: > > Hi Neal, > > Thanks for your valuable feedback! Yes, I think you are right. > It seems not a problem if tp->urg_data and tp->urg_seq are used together. > From our test results, we can only see there are some paths requiring > specific initia

Re: DSA with MV88E6321 and imx28

2019-06-11 Thread Benjamin Beckmeyer
> On Tue, Jun 11, 2019 at 09:36:16AM +0200, Benjamin Beckmeyer wrote: So all ports are now in forwarding mode (Switch port register 0x4 of all ports are 0x7f), but I don't reach it over ping. >>> Hi >>> >>> The most common error for people new to DSA is forgetting to bring >>> the

Re: [PATCH net-next 3/3] selftests: mlxsw: Add speed and auto-negotiation test

2019-06-11 Thread Ido Schimmel
On Tue, Jun 11, 2019 at 02:22:55PM +0200, Andrew Lunn wrote: > On Tue, Jun 11, 2019 at 09:35:26AM +0300, Ido Schimmel wrote: > > On Mon, Jun 10, 2019 at 04:06:33PM +0200, Andrew Lunn wrote: > > > On Mon, Jun 10, 2019 at 04:58:48PM +0300, Ido Schimmel wrote: > > > > On Mon, Jun 10, 2019 at 03:48:20P

Re: [PATCH net-next 3/3] selftests: mlxsw: Add speed and auto-negotiation test

2019-06-11 Thread Andrew Lunn
On Tue, Jun 11, 2019 at 09:35:26AM +0300, Ido Schimmel wrote: > On Mon, Jun 10, 2019 at 04:06:33PM +0200, Andrew Lunn wrote: > > On Mon, Jun 10, 2019 at 04:58:48PM +0300, Ido Schimmel wrote: > > > On Mon, Jun 10, 2019 at 03:48:20PM +0200, Andrew Lunn wrote: > > > > > + # Skip 56G becaus

Re: [PATCH bpf-next v3 0/5] net: xdp: refactor XDP program queries

2019-06-11 Thread Toke Høiland-Jørgensen
Björn Töpel writes: > On 2019-06-11 00:24, Jakub Kicinski wrote: >> On Mon, 10 Jun 2019 18:02:29 +0200, Björn Töpel wrote: >>> Jakub, what's your thoughts on the special handling of XDP offloading? >>> Maybe it's just overkill? Just allocate space for the offloaded >>> program regardless support

Re: DSA with MV88E6321 and imx28

2019-06-11 Thread Andrew Lunn
On Tue, Jun 11, 2019 at 09:36:16AM +0200, Benjamin Beckmeyer wrote: > >> So all ports are now in forwarding mode (Switch port register 0x4 of all > >> ports > >> are 0x7f), but I don't reach it over ping. > > Hi > > > > The most common error for people new to DSA is forgetting to bring > > the ma

Re: [PATCH v2] [net] Free cookie before we memdup a new one

2019-06-11 Thread Marcelo Ricardo Leitner
On Tue, Jun 11, 2019 at 07:21:28AM -0400, Neil Horman wrote: Btw, I guess DaveM had meant to add "sctp: " in the subject. Marcelo

[PATCH RESEND nf-next] netfilter: add support for matching IPv4 options

2019-06-11 Thread Stephen Suryaputra
This is the kernel change for the overall changes with this description: Add capability to have rules matching IPv4 options. This is developed mainly to support dropping of IP packets with loose and/or strict source route route options. Nevertheless, the implementation include others and ability to

[PATCH V3 net 7/7] net: ena: update driver version from 2.0.3 to 2.1.0

2019-06-11 Thread sameehj
From: Sameeh Jubran Update driver version to match device specification. Signed-off-by: Sameeh Jubran --- drivers/net/ethernet/amazon/ena/ena_netdev.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/amazon/ena/ena_netdev.h b/drivers/net/ethernet/am

[PATCH V3 net 6/7] net: ena: remove inline keyword from functions in *.c

2019-06-11 Thread sameehj
From: Sameeh Jubran Let the compiler decide if the function should be inline in *.c files Signed-off-by: Sameeh Jubran --- drivers/net/ethernet/amazon/ena/ena_com.c | 6 ++--- drivers/net/ethernet/amazon/ena/ena_eth_com.c | 26 +-- drivers/net/ethernet/amazon/ena/ena_netde

  1   2   >