[RFC] ip: introduce IFA_F_DHCP flag

2017-10-18 Thread Girish Moodalbail
This flag identifies that the address was obtained through DHCP. Today there is no easy way to find out whether an address on an interface is DHCP controlled or is static. Either you will need to grep for 'dhclient' process (or something else in case one is using a different DHCP client) or if you

Re: [PATCH net v2 2/2] net: fec: Let fec_ptp have its own interrupt routine

2017-10-18 Thread Troy Kisky
On 10/18/2017 11:10 AM, Troy Kisky wrote: > On 10/17/2017 7:30 PM, Andy Duan wrote: >> From: Troy Kisky Sent: Wednesday, October >> 18, 2017 5:34 AM > This is better for code locality and should slightly speed up normal >>> interrupts. > > This also allows PPS clock output to start wo

[PATCH net-next] tcp: socket option to set TCP fast open key

2017-10-18 Thread Yuchung Cheng
New socket option TCP_FASTOPEN_KEY to allow different keys per listener. The listener by default uses the global key until the socket option is set. The key is a 16 bytes long binary data. This option has no effect on regular non-listener TCP sockets. Signed-off-by: Yuchung Cheng Reviewed-by: E

Re: [PATCH net v2 2/2] net: fec: Let fec_ptp have its own interrupt routine

2017-10-18 Thread Troy Kisky
On 10/17/2017 7:30 PM, Andy Duan wrote: > From: Troy Kisky Sent: Wednesday, October > 18, 2017 5:34 AM This is better for code locality and should slightly speed up normal >> interrupts. This also allows PPS clock output to start working for i.mx7. This is because i.mx7 w

[iproute PATCH] ss: Detect IPPROTO_ICMPV6 sockets

2017-10-18 Thread Phil Sutter
Prefix IPPROTO_ICMPV6 sockets with 'icmp6' instead of '???'. Signed-off-by: Phil Sutter --- misc/ss.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/misc/ss.c b/misc/ss.c index e37aba6022eb4..b5c6bbc05766e 100644 --- a/misc/ss.c +++ b/misc/ss.c @@ -784,6 +784,8 @@ static const char *proto

RE: [PATCH v1 RFC 7/7] Modify tag_ksz.c so that tail tag code can be used by other KSZ switch drivers

2017-10-18 Thread Tristram.Ha
> > +#define KSZ9477_INGRESS_TAG_LEN2 > > +#define KSZ9477_PTP_TAG_LEN4 > > +#define KSZ9477_PTP_TAG_INDICATION 0x80 > > + > > +#define KSZ9477_TAIL_TAG_OVERRIDE BIT(9) > > +#define KSZ9477_TAIL_TAG_LOOKUPBIT(10) > > + > > +static int ksz9477_get_tag(u8 *tag

[iproute PATCH] ss: Distinguish between IPv4 and IPv6 wildcard sockets

2017-10-18 Thread Phil Sutter
Commit aba9c23a6e1cb ("ss: enclose IPv6 address in brackets") unified display of wildcard sockets in IPv4 and IPv6 to print the unspecified address as '*'. Users then complained that they can't distinguish between address families anymore, so change this again to what Stephen Hemminger suggested:

Re: [PATCH] lib/dynamic_queue_limits.c: relax BUG_ON to WARN_ON in dql_complete()

2017-10-18 Thread Ard Biesheuvel
On 18 October 2017 at 17:29, Eric Dumazet wrote: > On Wed, 2017-10-18 at 16:45 +0100, Ard Biesheuvel wrote: >> Even though calling dql_completed() with a count that exceeds the >> queued count is a serious error, it still does not justify bringing >> down the entire kernel with a BUG_ON(). So rela

Re: [PATCH net-next 3/3] ipv6: obsolete cached dst when removing them from fib tree

2017-10-18 Thread Wei Wang
On Wed, Oct 18, 2017 at 6:03 AM, Paolo Abeni wrote: > On Tue, 2017-10-17 at 13:48 -0700, Wei Wang wrote: >> On Tue, Oct 17, 2017 at 1:02 PM, Paolo Abeni wrote: >> > Meanwhile others sockets may grab more references to (and use) the same >> > aged-out dst. >> > >> >> I don't think other sockets co

RE: [PATCH v1 RFC 1/1] Add Microchip KSZ8795 DSA driver

2017-10-18 Thread Tristram.Ha
> > +static void ksz8795_r_mib_cnt(struct ksz_device *dev, int port, u16 addr, > > + u64 *cnt) > > +{ > > + u32 data; > > + u16 ctrl_addr; > > + u8 check; > > + int loop; > > + > > + ctrl_addr = addr + SWITCH_COUNTER_NUM * port; > > + ctrl_addr |= IND_ACC_TABLE(T

Re: [PATCH 2/2] liquidio: mark expected switch fall-through in octeon_destroy_resources

2017-10-18 Thread Felix Manlunas
On Tue, Oct 17, 2017 at 02:01:45PM -0500, Gustavo A. R. Silva wrote: > In preparation to enabling -Wimplicit-fallthrough, mark switch cases > where we are expecting to fall through. > > Signed-off-by: Gustavo A. R. Silva > --- > This code was tested by compilation only (GCC 7.2.0 was used). > Ple

Re: [PATCH 1/2] liquidio: remove unnecessary NULL check before kfree in delete_glists

2017-10-18 Thread Felix Manlunas
On Tue, Oct 17, 2017 at 01:59:20PM -0500, Gustavo A. R. Silva wrote: > NULL check before freeing functions like kfree is not needed. > > This issue was detected with the help of Coccinelle. > > Signed-off-by: Gustavo A. R. Silva > --- > This code was tested by compilation only. > > drivers/net

Re: [net-next] dsa: slave: support phy devices on external MII bus

2017-10-18 Thread Martin Hundebøll
On 2017-10-18 18:51, Florian Fainelli wrote: On 10/18/2017 09:21 AM, Andrew Lunn wrote: Hi Martin Sorry for starting a new thread. I deleted the patchset from my mailbox. Florian said: The logic goes like this: - try to connect to the PHY via phy-handle - if we have a PHY we are connectin

Re: using verifier to ensure a BPF program uses certain metadata?

2017-10-18 Thread Alexei Starovoitov
On Wed, Oct 18, 2017 at 08:56:31AM +0200, Johannes Berg wrote: > > > Now, I realize that people could trivially just work around this in > > > their program if they wanted, but I think most will take the > > > reminder > > > and just implement > > > > > > if (ctx->is_data_ethernet) > > >

Get rid of RCU callbacks in TC filters?

2017-10-18 Thread Cong Wang
Hi, all Recently, the RCU callbacks used in TC filters and TC actions keep drawing my attention, they introduce at least 4 race condition bugs: 1. A simple one fixed by Daniel: commit c78e1746d3ad7d548bdf3fe491898cc453911a49 Author: Daniel Borkmann Date: Wed May 20 17:13:33 2015 +0200 ne

Re: [net PATCH 2/5] bpf: avoid preempt enable/disable in sockmap using tcp_skb_cb region

2017-10-18 Thread Alexei Starovoitov
On Wed, Oct 18, 2017 at 07:10:36AM -0700, John Fastabend wrote: > From: John Fastabend > > SK_SKB BPF programs are run from the socket/tcp context but early in > the stack before much of the TCP metadata is needed in tcp_skb_cb. So > we can use some unused fields to place BPF metadata needed for

[PATCH net-next] liquidio: xmit_more support

2017-10-18 Thread Felix Manlunas
From: Intiyaz Basha Do not write the Tx doorbell if skb->xmit_more is set unless the Tx queue is full or stopped. Signed-off-by: Intiyaz Basha Signed-off-by: Derek Chickles Signed-off-by: Felix Manlunas --- drivers/net/ethernet/cavium/liquidio/lio_core.c| 6 -- drivers/net/ether

Re: [net PATCH 5/5] bpf: require CAP_NET_ADMIN when using devmap

2017-10-18 Thread Alexei Starovoitov
On Wed, Oct 18, 2017 at 07:11:44AM -0700, John Fastabend wrote: > From: John Fastabend > > Devmap is used with XDP which requires CAP_NET_ADMIN so lets also > make CAP_NET_ADMIN required to use the map. > > Signed-off-by: John Fastabend > Acked-by: Daniel Borkmann Acked-by: Alexei Starovoitov

Re: [net PATCH 4/5] bpf: require CAP_NET_ADMIN when using sockmap maps

2017-10-18 Thread Alexei Starovoitov
On Wed, Oct 18, 2017 at 07:11:22AM -0700, John Fastabend wrote: > From: John Fastabend > > Restrict sockmap to CAP_NET_ADMIN. > > Signed-off-by: John Fastabend > Acked-by: Daniel Borkmann Acked-by: Alexei Starovoitov

Re: [net PATCH 3/5] bpf: remove mark access for SK_SKB program types

2017-10-18 Thread Alexei Starovoitov
On Wed, Oct 18, 2017 at 07:10:58AM -0700, John Fastabend wrote: > From: John Fastabend > > The skb->mark field is a union with reserved_tailroom which is used > in the TCP code paths from stream memory allocation. Allowing SK_SKB > programs to set this field creates a conflict with future code >

Re: [net PATCH 1/5] bpf: enforce TCP only support for sockmap

2017-10-18 Thread Alexei Starovoitov
On Wed, Oct 18, 2017 at 07:10:15AM -0700, John Fastabend wrote: > From: John Fastabend > > Only TCP sockets have been tested and at the moment the state change > callback only handles TCP sockets. This adds a check to ensure that > sockets actually being added are TCP sockets. > > For net-next w

[PATCH V2 net-next] liquidio: pass date and time info to NIC firmware

2017-10-18 Thread Felix Manlunas
From: Veerasenareddy Burru Pass date and time information to NIC firmware at the time of loading firmware and periodically update the host time to NIC firmware. This is to make NIC firmware use the same time reference as Host, so that it is easy to correlate logs from firmware and host for debugg

[net-next:master 299/301] include/trace/events/tcp.h:12:1: note: in expansion of macro 'TRACE_EVENT'

2017-10-18 Thread kbuild test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git master head: b9f1f1ce866c28e3d9b86202441b220244754a69 commit: 386fd5da401dc6c4b0ab6a54d333609876b699fe [299/301] tcp: Check daddr_cache before use in tracepoint config: x86_64-kexec (attached as .config) compiler: gcc-6

Re: [iproute2] regression in ss output

2017-10-18 Thread Phil Sutter
On Mon, Oct 16, 2017 at 07:49:58PM -0700, Stephen Hemminger wrote: > On Mon, 16 Oct 2017 19:00:36 -0700 > Eric Dumazet wrote: > > > On Mon, 2017-10-16 at 14:28 -0700, Stephen Hemminger wrote: > > > On Mon, 16 Oct 2017 20:44:07 + > > > Humberto Alves wrote: > > > > > > > Yes, just get rid

[PATCH v3 net-next 2/5] net: ipv6: Make inet6addr_validator a blocking notifier

2017-10-18 Thread David Ahern
inet6addr_validator chain was added by commit 3ad7d2468f79f ("Ipvlan should return an error when an address is already in use") to allow address validation before changes are committed and to be able to fail the address change with an error back to the user. The address validation is not done for a

[PATCH v3 net-next 4/5] mlxsw: spectrum: router: Add support for address validator notifier

2017-10-18 Thread David Ahern
Add support for inetaddr_validator and inet6addr_validator. The notifiers provide a means for validating ipv4 and ipv6 addresses before the addresses are installed and on failure the error is propagated back to the user. Signed-off-by: David Ahern Reviewed-by: Ido Schimmel --- drivers/net/ether

[PATCH v3 net-next 1/5] ipv6: addrconf: cleanup locking in ipv6_add_addr

2017-10-18 Thread David Ahern
ipv6_add_addr is called in process context with rtnl lock held (e.g., manual config of an address) or during softirq processing (e.g., autoconf and address from a router advertisement). Currently, ipv6_add_addr calls rcu_read_lock_bh shortly after entry and does not call unlock until exit, minus t

[PATCH v3 net-next 3/5] net: Add extack to validator_info structs used for address notifier

2017-10-18 Thread David Ahern
Add extack to in_validator_info and in6_validator_info. Update the one user of each, ipvlan, to return an error message for failures. Only manual configuration of an address is plumbed in the IPv6 code path. Signed-off-by: David Ahern Reviewed-by: Ido Schimmel --- drivers/net/ipvlan/ipvlan_mai

[PATCH v3 net-next 5/5] mlxsw: spectrum_router: Add extack message for RIF and VRF overflow

2017-10-18 Thread David Ahern
Add extack argument down to mlxsw_sp_rif_create and mlxsw_sp_vr_create to set an error message on RIF or VR overflow. Now on overflow of either resource the user gets an informative message as opposed to failing with EBUSY. Signed-off-by: David Ahern Reviewed-by: Ido Schimmel --- .../net/ethern

[PATCH v3 net-next 0/5] mlxsw: spectrum_router: Add extack messages for RIF and VRF overflow

2017-10-18 Thread David Ahern
Currently, exceeding the number of VRF instances or the number of router interfaces either fails with a non-intuitive EBUSY: $ ip li set swp1s1.6 vrf vrf-1s1-6 up RTNETLINK answers: Device or resource busy or fails silently (IPv6) since the checks are done in a work queue. This set adds su

Re: [net-next] dsa: slave: support phy devices on external MII bus

2017-10-18 Thread Florian Fainelli
On 10/18/2017 09:21 AM, Andrew Lunn wrote: > Hi Martin > > Sorry for starting a new thread. I deleted the patchset from my mailbox. > > Florian said: > >> The logic goes like this: >> >> - try to connect to the PHY via phy-handle >> - if we have a PHY we are connecting via phy-handle but we need

Re: [PATCH v7 02/10] arm: dts: sunxi: Restore EMAC changes

2017-10-18 Thread Andrew Lunn
On Wed, Oct 18, 2017 at 01:44:50PM +0200, Corentin Labbe wrote: > The original dwmac-sun8i DT bindings have some issue on how to handle > integrated PHY and was reverted in last RC of 4.13. > But now we have a solution so we need to get back that was reverted. > > This patch restore arm DT about d

Re: [patch net v2 1/4] net/sched: Change tc_action refcnt and bindcnt to atomic

2017-10-18 Thread Cong Wang
On Tue, Oct 17, 2017 at 6:03 PM, Chris Mi wrote: >> -Original Message- >> From: Cong Wang [mailto:xiyou.wangc...@gmail.com] >> Sent: Tuesday, October 17, 2017 11:53 PM >> To: Chris Mi >> Cc: Linux Kernel Network Developers ; Jamal Hadi >> Salim ; Lucas Bates ; Jiri Pirko >> ; David Miller

Re: [PATCH v7 02/10] arm: dts: sunxi: Restore EMAC changes

2017-10-18 Thread Andrew Lunn
> index e1dba9ffa94b..f2292deaa590 100644 > --- a/arch/arm/boot/dts/sun8i-h3-bananapi-m2-plus.dts > +++ b/arch/arm/boot/dts/sun8i-h3-bananapi-m2-plus.dts > @@ -52,6 +52,7 @@ > compatible = "sinovoip,bpi-m2-plus", "allwinner,sun8i-h3"; > > aliases { > + ethernet0 = &emac; >

Re: [patch net v3 2/4] net/sched: Use action array instead of action list as parameter

2017-10-18 Thread Cong Wang
On Tue, Oct 17, 2017 at 5:58 PM, Chris Mi wrote: > > >> -Original Message- >> From: Cong Wang [mailto:xiyou.wangc...@gmail.com] >> Sent: Wednesday, October 18, 2017 12:56 AM >> To: Chris Mi >> Cc: Linux Kernel Network Developers ; Jamal Hadi >> Salim ; Lucas Bates ; Jiri Pirko >> ; David

Re: [PATCH] lib/dynamic_queue_limits.c: relax BUG_ON to WARN_ON in dql_complete()

2017-10-18 Thread Eric Dumazet
On Wed, 2017-10-18 at 16:45 +0100, Ard Biesheuvel wrote: > Even though calling dql_completed() with a count that exceeds the > queued count is a serious error, it still does not justify bringing > down the entire kernel with a BUG_ON(). So relax it to a WARN_ON() > instead. > > Signed-off-by: Ard

Re: [PATCH net-next] tcp: Remove use of inet6_sk and add IPv6 checks to tracepoint

2017-10-18 Thread Song Liu
> On Oct 18, 2017, at 8:28 AM, Eric Dumazet wrote: > > On Wed, 2017-10-18 at 08:17 -0700, David Ahern wrote: >> 386fd5da401d ("tcp: Check daddr_cache before use in tracepoint") was the >> second version of the tracepoint fixup patch. This patch is the delta >> between v2 and v3. Specifically, r

[net-next] dsa: slave: support phy devices on external MII bus

2017-10-18 Thread Andrew Lunn
Hi Martin Sorry for starting a new thread. I deleted the patchset from my mailbox. Florian said: > The logic goes like this: > > - try to connect to the PHY via phy-handle > - if we have a PHY we are connecting via phy-handle but we need to > divert MDIO reads/writes connect using its address

RE: [PATCH] lib/dynamic_queue_limits.c: relax BUG_ON to WARN_ON in dql_complete()

2017-10-18 Thread David Laight
From: Ard Biesheuvel > Sent: 18 October 2017 16:45 > Even though calling dql_completed() with a count that exceeds the > queued count is a serious error, it still does not justify bringing > down the entire kernel with a BUG_ON(). So relax it to a WARN_ON() > instead. > > Signed-off-by: Ard Bieshe

Re: [PATCH net-next 12/13] s390/qeth: support GRO flush timer

2017-10-18 Thread Eric Dumazet
On Wed, 2017-10-18 at 17:40 +0200, Julian Wiedmann wrote: > Switch to napi_complete_done(), and thus enable delayed GRO flushing. > The timeout is configured via /sys/class/net//gro_flush_timeout. > > Default timeout is 0, so no change in behaviour. > > Signed-off-by: Julian Wiedmann > --- Revi

Re: [PATCH v2 02/15] usb: gadget: make config_item_type structures const

2017-10-18 Thread Laurent Pinchart
Hi Bhumika, Thank you for the patch. On Monday, 16 October 2017 18:18:41 EEST Bhumika Goyal wrote: > Make these structures const as they are only passed to the const > argument of the functions config_{group/item}_init_type_name. > > Signed-off-by: Bhumika Goyal > --- > * Changes in v2- Combine

Re:

2017-10-18 Thread Mrs . Marie Angèle O
-- I solicit for your partnership to claim $11 million. You will be entitled to 40% of the sum reply for more details.

Re: Linux 4.12+ memory leak on router with i40e NICs

2017-10-18 Thread Paweł Staszewski
W dniu 2017-10-17 o 16:08, Paweł Staszewski pisze: W dniu 2017-10-17 o 13:52, Paweł Staszewski pisze: W dniu 2017-10-17 o 13:05, Paweł Staszewski pisze: W dniu 2017-10-17 o 12:59, Paweł Staszewski pisze: W dniu 2017-10-17 o 12:51, Paweł Staszewski pisze: W dniu 2017-10-17 o 12:20,

Re: [PATCH 1/7] devlink: Add permanent config parameter get/set operations

2017-10-18 Thread Steve Lin
On Wed, Oct 18, 2017 at 11:22 AM, Or Gerlitz wrote: > On Tue, Oct 17, 2017 at 11:44 PM, Steve Lin > wrote: >> >> Add support for permanent config parameter get/set commands. Used >> for parameters held in NVRAM, persistent device configuration. >> The config_get() and config_set() operations oper

[PATCH] lib/dynamic_queue_limits.c: relax BUG_ON to WARN_ON in dql_complete()

2017-10-18 Thread Ard Biesheuvel
Even though calling dql_completed() with a count that exceeds the queued count is a serious error, it still does not justify bringing down the entire kernel with a BUG_ON(). So relax it to a WARN_ON() instead. Signed-off-by: Ard Biesheuvel --- lib/dynamic_queue_limits.c | 2 +- 1 file changed, 1

[PATCH net-next 05/13] s390/qeth: fix early exit from error path

2017-10-18 Thread Julian Wiedmann
When the allocation of the addr buffer fails, we need to free our refcount on the inetdevice before returning. Signed-off-by: Julian Wiedmann --- drivers/s390/net/qeth_l3_main.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/s390/net/qeth_l3_main.c b/drivers/s3

[PATCH net-next 03/13] s390/qeth: remove duplicated device matching

2017-10-18 Thread Julian Wiedmann
With commit "s390/ccwgroup: tie a ccwgroup driver to its ccw driver", the ccwgroup core now ensures that a qeth group device only consists of ccw devices which are supported by qeth. Therefore remove qeth's internal device matching, and use .driver_info to determine the card type. Signed-off-by: J

[PATCH net-next 13/13] s390/qeth: don't dump control cmd twice

2017-10-18 Thread Julian Wiedmann
A few lines down, qeth_prepare_control_data() makes further changes to the control cmd buffer, and then also writes a trace entry for it. So the first entry just pollutes the trace file with intermediate data, drop it. Signed-off-by: Julian Wiedmann Reviewed-by: Ursula Braun --- drivers/s390/ne

[PATCH net-next 09/13] s390/qeth: clean up page frag creation

2017-10-18 Thread Julian Wiedmann
Replace the open-coded skb_add_rx_frag(), and use a fall-through to remove some duplicated code. Signed-off-by: Julian Wiedmann --- drivers/s390/net/qeth_core_main.c | 31 +++ 1 file changed, 11 insertions(+), 20 deletions(-) diff --git a/drivers/s390/net/qeth_core_m

[PATCH net-next 12/13] s390/qeth: support GRO flush timer

2017-10-18 Thread Julian Wiedmann
Switch to napi_complete_done(), and thus enable delayed GRO flushing. The timeout is configured via /sys/class/net//gro_flush_timeout. Default timeout is 0, so no change in behaviour. Signed-off-by: Julian Wiedmann --- drivers/s390/net/qeth_core_main.c | 2 +- 1 file changed, 1 insertion(+), 1

[PATCH net-next 06/13] s390/qeth: clean up initial MTU determination

2017-10-18 Thread Julian Wiedmann
1. Drop the support for Token Ring, 2. use the ETH_DATA_LEN macro for the default L2 MTU, 3. handle OSM via the default case (as OSM is L2-only), and 4. document why the L3 MTU is reduced. Signed-off-by: Julian Wiedmann --- drivers/s390/net/qeth_core_main.c | 14 -- 1 file changed, 4

[PATCH net-next 02/13] s390/drivers: use setup_timer

2017-10-18 Thread Julian Wiedmann
From: Allen Pais Use setup_timer function instead of initializing timer with the function and data fields. Signed-off-by: Allen Pais Signed-off-by: Julian Wiedmann --- drivers/s390/net/fsm.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/s390/net/fsm.c b/d

[PATCH net-next 11/13] s390/qeth: try harder to get packets from RX buffer

2017-10-18 Thread Julian Wiedmann
Current code bails out when two subsequent buffer elements hold insufficient data to contain a qeth_hdr packet descriptor. This seems reasonable, but it would be legal for quirky hardware to leave a few elements empty and then present packets in a subsequent element. These packets would currently b

[PATCH net-next 04/13] s390/qeth: use kstrtobool() in qeth_bridgeport_hostnotification_store()

2017-10-18 Thread Julian Wiedmann
From: Andy Shevchenko The sysfs enabled value is a boolean, so kstrtobool() is a better fit for parsing the input string since it does the range checking for us. Signed-off-by: Andy Shevchenko Signed-off-by: Julian Wiedmann --- drivers/s390/net/qeth_l2_sys.c | 13 + 1 file changed

[PATCH net-next 08/13] s390/qeth: no VLAN support on OSM

2017-10-18 Thread Julian Wiedmann
Instead of silently discarding VLAN registration requests on OSM, just indicate that this card type doesn't support VLAN. Signed-off-by: Julian Wiedmann --- drivers/s390/net/qeth_l2_main.c | 17 ++--- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/drivers/s390/net/qet

[PATCH net-next 01/13] s390/qeth: rely on kernel for feature recovery

2017-10-18 Thread Julian Wiedmann
When recovering a device, qeth needs to re-run the IPA commands that enable all previously active HW features. Instead of duplicating qeth_set_features(), let netdev_update_features() recover the missing HW features from dev->wanted_features. Signed-off-by: Julian Wiedmann --- drivers/s390/net/q

[PATCH net-next 10/13] s390/qeth: consolidate skb allocation

2017-10-18 Thread Julian Wiedmann
Move the allocation of SG skbs into the main path. This allows for a little code sharing, and handling ENOMEM from within one place. As side effect, L2 SG skbs now get the proper amount of additional headroom (read: zero) instead of the hard-coded ETH_HLEN. Signed-off-by: Julian Wiedmann --- dr

[PATCH net-next 07/13] s390/qeth: don't verify device when setting MAC address

2017-10-18 Thread Julian Wiedmann
There's no reason why l2_set_mac_address() should ever be called for a netdevice that's not owned by qeth. It's certainly not required for VLAN devices, which have their own netdev_ops. Also: 1) we don't do such validation for any of the other netdev_ops routines. 2) the code in question clearly h

[PATCH net-next 00/13] s390/net: updates 2017-10-18

2017-10-18 Thread Julian Wiedmann
Hi Dave, please apply some additional robustness fixes and cleanups for 4.15. Thanks, Julian Allen Pais (1): s390/drivers: use setup_timer Andy Shevchenko (1): s390/qeth: use kstrtobool() in qeth_bridgeport_hostnotification_store() Julian Wiedmann (11): s390/qeth: rely on kernel for

[PATCH net-next] net/sched: Set the net-device for egress device instance

2017-10-18 Thread Or Gerlitz
Currently the netdevice field is not set and the egdev instance is not functional, fix that. Fixes: 3f55bdda8df ('net: sched: introduce per-egress action device callbacks') Signed-off-by: Or Gerlitz Acked-by: Jiri Pirko --- net/sched/act_api.c | 1 + 1 file changed, 1 insertion(+) diff --git a

Re: [PATCH net 0/3] Fix for BPF devmap percpu allocation splat

2017-10-18 Thread Daniel Borkmann
On 10/18/2017 05:28 PM, Alexei Starovoitov wrote: On Wed, Oct 18, 2017 at 7:22 AM, Daniel Borkmann wrote: Higher prio imo would be to make the allocation itself faster though, I remember we talked about this back in May wrt hashtable, but I kind of lost track whether there was an update on thi

Re: [PATCH net 0/3] Fix for BPF devmap percpu allocation splat

2017-10-18 Thread Alexei Starovoitov
On Wed, Oct 18, 2017 at 7:22 AM, Daniel Borkmann wrote: > > Higher prio imo would be to make the allocation itself faster > though, I remember we talked about this back in May wrt hashtable, > but I kind of lost track whether there was an update on this in > the mean time. ;-) new percpu allocato

Re: [PATCH net-next] tcp: Remove use of inet6_sk and add IPv6 checks to tracepoint

2017-10-18 Thread Eric Dumazet
On Wed, 2017-10-18 at 08:17 -0700, David Ahern wrote: > 386fd5da401d ("tcp: Check daddr_cache before use in tracepoint") was the > second version of the tracepoint fixup patch. This patch is the delta > between v2 and v3. Specifically, remove the use of inet6_sk and check > sk_family as requested

[PATCH net-next 2/8] cxgb4: add tc flower match support for vlan

2017-10-18 Thread Rahul Lakkireddy
From: Kumar Sanghvi Add support for matching on vlan tci. Construct vlan tci match param based on vlan-id and vlan-pcp values supplied by tc. Signed-off-by: Kumar Sanghvi Signed-off-by: Rahul Lakkireddy Signed-off-by: Ganesh Goudar --- .../net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.c | 35

[PATCH net-next 7/8] cxgb4: introduce fw_filter2_wr to prepare for L3/L4 rewrite support

2017-10-18 Thread Rahul Lakkireddy
From: Kumar Sanghvi Update driver to use new fw_filter2_wr in order to support rewrite of L3/L4 header fields via filters. Query FW_PARAMS_PARAM_DEV_FILTER2_WR to check whether FW supports this new wr. Signed-off-by: Kumar Sanghvi Signed-off-by: Rahul Lakkireddy Signed-off-by: Ganesh Goudar -

[PATCH net-next 8/8] cxgb4: add tc flower support for L3/L4 rewrite

2017-10-18 Thread Rahul Lakkireddy
From: Kumar Sanghvi Adds support to rewrite L3/L4 fields via TC-PEDIT action. Supported fields for rewrite are: IPv4 src/dst address, IPv6 src/dst address, TCP/UDP sport/dport. Also, process match fields first and then process the action items. Refactor pedit action validation to separate funct

[PATCH net-next 6/8] cxgb4: add tc flower support for ETH-SMAC rewrite

2017-10-18 Thread Rahul Lakkireddy
From: Kumar Sanghvi Adds support for ETH-SMAC rewrite via TC-PEDIT action. Signed-off-by: Kumar Sanghvi Signed-off-by: Rahul Lakkireddy Signed-off-by: Ganesh Goudar --- drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.c | 10 ++ drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.h

[PATCH net-next 5/8] cxgb4: introduce SMT ops to prepare for SMAC rewrite support

2017-10-18 Thread Rahul Lakkireddy
From: Kumar Sanghvi Introduce SMT operations for allocating/removing entries from SMAC table. Make TCAM filters use the SMT ops whenever SMAC rewrite is required. Signed-off-by: Kumar Sanghvi Signed-off-by: Rahul Lakkireddy Signed-off-by: Ganesh Goudar --- drivers/net/ethernet/chelsio/cxgb4/

[PATCH net-next 1/8] cxgb4: add tc flower match support for TOS

2017-10-18 Thread Rahul Lakkireddy
From: Kumar Sanghvi Add support for matching on IP TOS. Also check on ethtype value to be either IPv4 or IPv6. Signed-off-by: Kumar Sanghvi Signed-off-by: Rahul Lakkireddy Signed-off-by: Ganesh Goudar --- .../net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.c | 51 +- 1 file

[PATCH net-next 3/8] cxgb4: add tc flower support for action PASS

2017-10-18 Thread Rahul Lakkireddy
From: Kumar Sanghvi Add support for tc flower action PASS. Signed-off-by: Kumar Sanghvi Signed-off-by: Rahul Lakkireddy Signed-off-by: Ganesh Goudar --- drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/ne

[PATCH net-next 4/8] cxgb4: add tc flower support for ETH-DMAC rewrite

2017-10-18 Thread Rahul Lakkireddy
From: Kumar Sanghvi Add support for ETH-DMAC Rewrite via TC-PEDIT action. Also, add check to assert that vlan/eth-dmac rewrite actions are valid only in combination with action egress redirect. Signed-off-by: Kumar Sanghvi Signed-off-by: Rahul Lakkireddy Signed-off-by: Ganesh Goudar --- .../

[PATCH net-next 0/8] cxgb4: enable more tc flower offload matches and actions

2017-10-18 Thread Rahul Lakkireddy
This patch series enable more matches and actions for TC Flower Offload support on Chelsio adapters. Patch 1 enables matching on IP TOS. Patch 2 enables matching on VLAN TCI. Patch 3 adds support for action PASS. Patch 4 adds support for ETH-DMAC rewrite via TC-PEDIT action. Also, adds a check

[PATCH net-next] tcp: Remove use of inet6_sk and add IPv6 checks to tracepoint

2017-10-18 Thread David Ahern
386fd5da401d ("tcp: Check daddr_cache before use in tracepoint") was the second version of the tracepoint fixup patch. This patch is the delta between v2 and v3. Specifically, remove the use of inet6_sk and check sk_family as requested by Eric and add IS_ENABLED(CONFIG_IPV6) around the use of sk_v

Re: [pull request][for-next 00/12] Mellanox, mlx5 IPoIB Muli Pkey support 2017-10-11,Re: [pull request][for-next 00/12] Mellanox, mlx5 IPoIB Muli Pkey support 2017-10-11

2017-10-18 Thread Doug Ledford
On Mon, 2017-10-16 at 05:45 +0100, David Miller wrote: > > Once I hear that Dave is OK with the net changes, I'm ready to pull > > (if > > I need to). > > They look fine and I've pulled this into net-next. Thanks, pulled here as well. -- Doug Ledford GPG KeyID: B826A3330E572FDD Key fin

Re: [RFC PATCH 3/5] sctp: Add LSM hooks

2017-10-18 Thread Xin Long
On Tue, Oct 17, 2017 at 9:58 PM, Richard Haines wrote: > Add security hooks to allow security modules to exercise access control > over SCTP. > > Signed-off-by: Richard Haines > --- > include/net/sctp/structs.h | 10 > include/uapi/linux/sctp.h | 1 + > net/sctp/sm_make_chunk.c | 12

Re: [PATCH v2 net-next] tcp: Check daddr_cache before use in tracepoint

2017-10-18 Thread David Ahern
On 10/18/17 7:15 AM, David Miller wrote: > From: David Ahern > Date: Mon, 16 Oct 2017 15:32:07 -0700 > >> Running perf in one window to capture tcp_retransmit_skb tracepoint: >> $ perf record -e tcp:tcp_retransmit_skb -a >> >> And causing a retransmission on an active TCP session (e.g., dropp

Re: [PATCH net-next 2/2] net: dsa: lan9303: Add fdb/mdb manipulation

2017-10-18 Thread Egil Hjelmeland
On 18. okt. 2017 16:38, Vivien Didelot wrote: Hi Egil, Egil Hjelmeland writes: +/* Delete static port from ALR entry, delete entry if last port */ +static int lan9303_alr_del_port(struct lan9303 *chip, const u8 *mac, + int port) +{ + struct lan9303_alr_cach

Re: [PATCH net-next 2/2] net: dsa: lan9303: Add fdb/mdb manipulation

2017-10-18 Thread Vivien Didelot
Hi Egil, Egil Hjelmeland writes: > +/* Delete static port from ALR entry, delete entry if last port */ > +static int lan9303_alr_del_port(struct lan9303 *chip, const u8 *mac, > + int port) > +{ > + struct lan9303_alr_cache_entry *entr; > + > + entr = lan9303_a

Re: [PATCH v2 12/15] RDMA/cma: make config_item_type const

2017-10-18 Thread Doug Ledford
On Mon, 2017-10-16 at 17:18 +0200, Bhumika Goyal wrote: > Make these structures const as they are either passed to the > functions > having the argument as const or stored as a reference in the > "ci_type" > const field of a config_item structure. > > Signed-off-by: Bhumika Goyal Acked-by: Doug

[PATCH V2 net-next 1/3] smc: fix mutex unlocks during link group creation

2017-10-18 Thread Ursula Braun
Link group creation is synchronized with the smc_create_lgr_pending lock. In smc_listen_work() this mutex is sometimes unlocked, even though it has not been locked before. This issue will surface in presence of the SMC rendezvous code. Signed-off-by: Ursula Braun --- net/smc/af_smc.c | 26 ++

[PATCH V2 net-next 3/3] smc: add SMC rendezvous protocol

2017-10-18 Thread Ursula Braun
The SMC protocol [1] uses a rendezvous protocol to negotiate SMC capability between peers. The current Linux implementation does not yet use this rendezvous protocol and, thus, is not compliant to RFC7609 and incompatible with other SMC implementations like in zOS. This patch adds support for the S

[PATCH V2 net-next 0/3] TCP experimental option for SMC rendezvous

2017-10-18 Thread Ursula Braun
Dave, SMC-capability is to be negotiated with a TCP experimental option. As requested during code review of our previous approach using netfilter hooks, here's a new version. It touches tcp-code in the first patch and exploits the new tcp flag in the smc-code. Kind regards, Ursula Changelog: V2

[PATCH V2 net-next 2/3] tcp: TCP experimental option for SMC

2017-10-18 Thread Ursula Braun
The SMC protocol [1] relies on the use of a new TCP experimental option [2, 3]. With this option, SMC capabilities are exchanged between peers during the TCP three way handshake. This patch adds support for this experimental option to TCP. References: [1] SMC-R Informational RFC: http://www.rfc-ed

Re: [PATCH net] sctp: add the missing sock_owned_by_user check in sctp_icmp_redirect

2017-10-18 Thread Neil Horman
On Wed, Oct 18, 2017 at 09:37:49PM +0800, Xin Long wrote: > Now sctp processes icmp redirect packet in sctp_icmp_redirect where > it calls sctp_transport_dst_check in which tp->dst can be released. > > The problem is before calling sctp_transport_dst_check, it doesn't > check sock_owned_by_user, w

Re: [PATCH] doc: Update VRF documentation metric

2017-10-18 Thread David Ahern
On 10/18/17 8:24 AM, Donald Sharp wrote: > Two things: > > 1) Update examples to show usage of metric > 2) Discuss reasoning for using such a high metric. > > Signed-off-by: Donald Sharp > --- > Documentation/networking/vrf.txt | 13 + > 1 file changed, 9 insertions(+), 4 deletions(

[PATCH] doc: Update VRF documentation metric

2017-10-18 Thread Donald Sharp
Two things: 1) Update examples to show usage of metric 2) Discuss reasoning for using such a high metric. Signed-off-by: Donald Sharp --- Documentation/networking/vrf.txt | 13 + 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/Documentation/networking/vrf.txt b/Documen

Re: [PATCH net 0/3] Fix for BPF devmap percpu allocation splat

2017-10-18 Thread Daniel Borkmann
On 10/18/2017 04:03 PM, Daniel Borkmann wrote: On 10/18/2017 03:25 PM, Tejun Heo wrote: Hello, Daniel. (cc'ing Dennis) On Tue, Oct 17, 2017 at 04:55:51PM +0200, Daniel Borkmann wrote: The set fixes a splat in devmap percpu allocation when we alloc the flush bitmap. Patch 1 is a prerequisite f

Re: [RFC PATCH] can: m_can: Support higher speed CAN-FD bitrates

2017-10-18 Thread Franklin S Cooper Jr
On 10/18/2017 08:24 AM, Sekhar Nori wrote: > Hi Marc, > > On Wednesday 18 October 2017 06:14 PM, Marc Kleine-Budde wrote: >> On 09/21/2017 02:48 AM, Franklin S Cooper Jr wrote: >>> >>> >>> On 09/20/2017 04:37 PM, Mario Hüttel wrote: On 09/20/2017 10:19 PM, Franklin S Cooper Jr wro

Re: [PATCH] mac80211: aggregation: Convert timers to use timer_setup()

2017-10-18 Thread Kees Cook
On Wed, Oct 18, 2017 at 3:29 AM, Johannes Berg wrote: >> This has been the least trivial timer conversion yet. Given the use of >> RCU and other things I may not even know about, I'd love to get a close >> look at this. I *think* this is correct, as it will re-lookup the tid >> entries when firing

Re: [PATCH] mac80211: aggregation: Convert timers to use timer_setup()

2017-10-18 Thread Kees Cook
On Wed, Oct 18, 2017 at 4:37 AM, Johannes Berg wrote: > On Wed, 2017-10-18 at 13:31 +0200, Johannes Berg wrote: >> On Wed, 2017-10-18 at 12:29 +0200, Johannes Berg wrote: >> >> > Anyway, the change here looks correct to me, so I'll apply it and then >> > perhaps clean up more. I've only changed "u

Re: [iproute2] regression in ss output

2017-10-18 Thread Eric Dumazet
On Wed, 2017-10-18 at 14:08 +, Humberto Alves wrote: > Looks perfect to me. Thanks! > > On 10/17/2017 03:49 AM, Stephen Hemminger wrote: > > > > What about > > *:80<< both IPV6 and IPV4 > > [::]:80 << IPV6_ONLY > > 0.0.0.0:80 << IPV4_ONLY > > > Yes, I missed your email St

Re: [net-next V8 PATCH 3/5] bpf: cpumap xdp_buff to skb conversion and allocation

2017-10-18 Thread Michael S. Tsirkin
On Mon, Oct 16, 2017 at 12:19:39PM +0200, Jesper Dangaard Brouer wrote: > @@ -191,15 +280,45 @@ static int cpu_map_kthread_run(void *data) >* kthread_stop signal until queue is empty. >*/ > while (!kthread_should_stop() || !__ptr_ring_empty(rcpu->queue)) { > + unsi

Re: [PATCH] staging: irda: resolve sparse errors due to implicit pci_power_t casts

2017-10-18 Thread Greg KH
On Thu, Oct 05, 2017 at 04:38:23PM -0700, Matthew Giassa wrote: > Explicitly casting pci_power_t types to resolve sparse warnings (shown > below). > > Also fixing a related logging bug where pci_power_t is cast to unsigned > (can be negative, i.e. PCI_POWER_ERROR). > > Original sparse report: >

[net PATCH 5/5] bpf: require CAP_NET_ADMIN when using devmap

2017-10-18 Thread John Fastabend
From: John Fastabend Devmap is used with XDP which requires CAP_NET_ADMIN so lets also make CAP_NET_ADMIN required to use the map. Signed-off-by: John Fastabend Acked-by: Daniel Borkmann --- kernel/bpf/devmap.c |3 +++ 1 file changed, 3 insertions(+) diff --git a/kernel/bpf/devmap.c b/ke

[net PATCH 4/5] bpf: require CAP_NET_ADMIN when using sockmap maps

2017-10-18 Thread John Fastabend
From: John Fastabend Restrict sockmap to CAP_NET_ADMIN. Signed-off-by: John Fastabend Acked-by: Daniel Borkmann --- kernel/bpf/sockmap.c |3 +++ 1 file changed, 3 insertions(+) diff --git a/kernel/bpf/sockmap.c b/kernel/bpf/sockmap.c index beaabb2..2b6eb35 100644 --- a/kernel/bpf/sockmap

[net PATCH 3/5] bpf: remove mark access for SK_SKB program types

2017-10-18 Thread John Fastabend
From: John Fastabend The skb->mark field is a union with reserved_tailroom which is used in the TCP code paths from stream memory allocation. Allowing SK_SKB programs to set this field creates a conflict with future code optimizations, such as "gifting" the skb to the egress path instead of creat

[net PATCH 1/5] bpf: enforce TCP only support for sockmap

2017-10-18 Thread John Fastabend
From: John Fastabend Only TCP sockets have been tested and at the moment the state change callback only handles TCP sockets. This adds a check to ensure that sockets actually being added are TCP sockets. For net-next we can consider UDP support. Signed-off-by: John Fastabend Acked-by: Daniel B

[net PATCH 2/5] bpf: avoid preempt enable/disable in sockmap using tcp_skb_cb region

2017-10-18 Thread John Fastabend
From: John Fastabend SK_SKB BPF programs are run from the socket/tcp context but early in the stack before much of the TCP metadata is needed in tcp_skb_cb. So we can use some unused fields to place BPF metadata needed for SK_SKB programs when implementing the redirect function. This allows us t

[net PATCH 0/5] sockmap fixes for net

2017-10-18 Thread John Fastabend
The following implements a set of fixes for sockmap and changes the API slightly in a few places to reduce preempt_disable/enable scope. We do this here in net because it requires an API change and this avoids getting stuck with legacy API going forward. The short description: Access to skb mark

Re: [iproute2] regression in ss output

2017-10-18 Thread Humberto Alves
Looks perfect to me. Thanks! On 10/17/2017 03:49 AM, Stephen Hemminger wrote: On Mon, 16 Oct 2017 19:00:36 -0700 Eric Dumazet wrote: On Mon, 2017-10-16 at 14:28 -0700, Stephen Hemminger wrote: On Mon, 16 Oct 2017 20:44:07 + Humberto Alves wrote: Yes, just get rid of this 'if statem

<    1   2   3   4   >