[PATCH net-next] cxgb4: fix possible deadlock

2018-01-25 Thread Ganesh Goudar
t4_wr_mbox_meat_timeout() can be called from both softirq context and process context, hence protect the mbox with spin_lock_bh() instead of simple spin_lock() Signed-off-by: Ganesh Goudar --- drivers/net/ethernet/chelsio/cxgb4/t4_hw.c | 20 ++-- 1 file changed, 10 insertions(+),

Re: [PATCH net-next 1/8] pkt_cls: add new tc cls helper to check offload flag and chain index

2018-01-25 Thread Jiri Pirko
Thu, Jan 25, 2018 at 01:17:46AM CET, jakub.kicin...@netronome.com wrote: >Very few (mlxsw) upstream drivers seem to allow offload of chains >other than 0. Save driver developers typing and add a helper for >checking both if ethtool's TC offload flag is on and if chain is 0. >This helper will set t

Re: Subject: [RFC][PATCH 04/11] stmmac: fix breakage in stmmac_hw_setup()

2018-01-25 Thread Niklas Cassel
On Tue, Jan 9, 2018 at 3:02 AM, David Miller wrote: > From: Al Viro > Date: Fri, 05 Jan 2018 19:31:58 + > >> Since "drivers: net: stmmac: reworking the PCS code" ->pcs_ctrl_ane() >> had been taking iomem address to access as the first argument; its >> predecessor (->ctrl_ane()) used to take s

Re: e1000e hardware unit hangs

2018-01-25 Thread Neftin, Sasha
On 1/24/2018 20:41, Ben Greear wrote: On 01/24/2018 10:38 AM, Denys Fedoryshchenko wrote: On 2018-01-24 20:31, Ben Greear wrote: On 01/24/2018 08:34 AM, Neftin, Sasha wrote: On 1/24/2018 18:11, Alexander Duyck wrote: On Tue, Jan 23, 2018 at 3:46 PM, Ben Greear wrote: Hello, Anyone have any

Re: [PATCH 1/8] dt-bindings: can: rcar_can: document r8a774[35] can support

2018-01-25 Thread Marc Kleine-Budde
On 01/24/2018 06:22 PM, Fabrizio Castro wrote: > thank you for Acking the patch, just wondering if this patch has any > chance to end up in v4.16? I can take this via the linux-can tree, if no one else takes it. Marc -- Pengutronix e.K. | Marc Kleine-Budde | Industria

Re: [Intel-wired-lan] [RFC v2 net-next 01/10] net: Add a new socket option for a future transmit time.

2018-01-25 Thread Miroslav Lichvar
On Fri, Jan 19, 2018 at 06:09:15PM -0800, Richard Cochran wrote: > On Fri, Jan 19, 2018 at 04:15:46PM -0500, Willem de Bruijn wrote: > > > + if (cmsg->cmsg_len != CMSG_LEN(sizeof(ktime_t))) > > > + return -EINVAL; > > > > I don't see any existing reference to kt

Re: [PATCH] net/mlx4_en: ensure rx_desc updating reaches HW before prod db updating

2018-01-25 Thread Tariq Toukan
On 25/01/2018 8:25 AM, jianchao.wang wrote: Hi Eric Thanks for you kindly response and suggestion. That's really appreciated. Jianchao On 01/25/2018 11:55 AM, Eric Dumazet wrote: On Thu, 2018-01-25 at 11:27 +0800, jianchao.wang wrote: Hi Tariq On 01/22/2018 10:12 AM, jianchao.wang wrote:

[PATCH net-next 2/6] net/smc: handle state SMC_PEERFINCLOSEWAIT correctly

2018-01-25 Thread Ursula Braun
A state transition from closing state SMC_PEERFINCLOSEWAIT to closing state SMC_APPFINCLOSEWAIT is not allowed. Once a closing indication from the peer has been received, the socket reaches state SMC_CLOSED. And receiving a peer_conn_abort just changes the state of the socket into one of the state

[PATCH net-next 1/6] net/smc: cancel tx worker in case of socket aborts

2018-01-25 Thread Ursula Braun
If an SMC socket is aborted, the tx worker should be cancelled. Signed-off-by: Ursula Braun --- net/smc/smc_close.c | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/net/smc/smc_close.c b/net/smc/smc_close.c index 1468a2a3cdf4..6de909612bd0 100644 --- a/net/smc/smc

[PATCH net-next 6/6] net/smc: check for healthy link group resp. connections

2018-01-25 Thread Ursula Braun
If a problem for at least one connection of a link group is detected, the whole link group and all its connections are terminated. This patch adds a check for healthy link group when trying to reserve a work request, and checks for healthy connections before starting a tx worker. Signed-off-by: Ur

[PATCH net-next 5/6] net/smc: wake up wr_reg_wait when terminating a link group

2018-01-25 Thread Ursula Braun
If a new connection with a new rmb is added to a link group, its memory region is registered. If a link group is terminated, a pending registration requires a wake up. And consolidate setting of tx_flag peer_conn_abort in smc_lgr_terminate(). Signed-off-by: Ursula Braun --- net/smc/smc_close.c

[PATCH net-next 3/6] net/smc: terminate link group for ib_post_send problems

2018-01-25 Thread Ursula Braun
If ib_post_send() fails, terminate all connections of this link group. Signed-off-by: Ursula Braun --- net/smc/smc_tx.c | 4 +++- net/smc/smc_wr.c | 8 +++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/net/smc/smc_tx.c b/net/smc/smc_tx.c index fea6482233a6..71b7d9f079f0 10

[PATCH net-next 4/6] net/smc: do not reuse a linkgroup with setup problems

2018-01-25 Thread Ursula Braun
Once a linkgroup is created successfully, it stays alive for a certain time to service more connections potentially created. If one of the initialization steps for a new linkgroup fails, the linkgroup should not be reused by other connections following. Signed-off-by: Ursula Braun --- net/smc/af

[PATCH net-next 0/6] net/smc: more socket closing improvements

2018-01-25 Thread Ursula Braun
Dave, these patches improve the smc behavior for abnormal socket closing. Thanks, Ursula Ursula Braun (6): net/smc: cancel tx worker in case of socket aborts net/smc: handle state SMC_PEERFINCLOSEWAIT correctly net/smc: terminate link group for ib_post_send problems net/smc: do not reuse

[PATCH] qed: code indent should use tabs where possible

2018-01-25 Thread Rohit Visavalia
Issue found by checkpatch. Signed-off-by: Rohit Visavalia --- drivers/net/ethernet/qlogic/qed/qed_rdma.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/net/ethernet/qlogic/qed/qed_rdma.c b/drivers/net/ethernet/qlogic/qed/qed_rdma.c index b7abb8205d3a..ae3

RE: [PATCH] qed: code indent should use tabs where possible

2018-01-25 Thread Kalderon, Michal
> From: Rohit Visavalia [mailto:rohit.visava...@softnautics.com] > Sent: Thursday, January 25, 2018 12:26 PM > To: Elior, Ariel ; Dept-Eng Everest Linux L2 engeverestlinu...@cavium.com> > Cc: netdev@vger.kernel.org; linux-ker...@vger.kernel.org; Rohit Visavalia > > Subject: [PATCH] qed: code inde

Re: [PATCH v6 16/36] nds32: DMA mapping API

2018-01-25 Thread Arnd Bergmann
On Thu, Jan 25, 2018 at 4:45 AM, Greentime Hu wrote: > 2018-01-24 19:36 GMT+08:00 Arnd Bergmann : >> On Tue, Jan 23, 2018 at 12:52 PM, Greentime Hu wrote: >>> 2018-01-23 16:23 GMT+08:00 Greentime Hu : 2018-01-18 18:26 GMT+08:00 Arnd Bergmann : > On Mon, Jan 15, 2018 at 6:53 AM, Greentime

linux-next: manual merge of the crypto tree with the net-next tree

2018-01-25 Thread Stephen Rothwell
Hi Herbert, Today's linux-next merge of the crypto tree got a conflict in: drivers/net/ethernet/chelsio/cxgb4/cxgb4.h between commit: 9d5fd927d20b ("cxgb4/cxgb4vf: add support for ndo_set_vf_vlan") from the net-next tree and commit: a6ec572bfa7d ("cxgb4: Add support for Inline IPSec Tx"

pull request: bluetooth-next 2018-01-25

2018-01-25 Thread Johan Hedberg
Hi Dave, Here's one last bluetooth-next pull request for the 4.16 kernel: - Improved support for Intel controllers - New set_parity method to serdev (agreed with maintainers to be taken through bluetooth-next) - Fix error path in hci_bcm (missing call to serdev close) - New ID for BCM4343A

RE: [PATCH 1/8] dt-bindings: can: rcar_can: document r8a774[35] can support

2018-01-25 Thread Fabrizio Castro
Thank you Marc. Cheers, Fabrizio > -Original Message- > From: Marc Kleine-Budde [mailto:m...@pengutronix.de] > Sent: 25 January 2018 08:53 > To: Fabrizio Castro > Cc: Simon Horman ; Geert Uytterhoeven > ; linux-...@vger.kernel.org; > netdev@vger.kernel.org; devicet...@vger.kernel.org;

Re: [PATCH v3] net: ethernet: cavium: Correct Cavium Thunderx NIC module and driver names

2018-01-25 Thread Vadim Lomovtsev
On Wed, Jan 24, 2018 at 04:27:37PM -0500, David Miller wrote: > From: Vadim Lomovtsev > Date: Mon, 22 Jan 2018 06:13:27 -0800 > > > From: Vadim Lomovtsev > > > > It was found that ethtool provides unexisting module name while > > it queries the specified network device for associated driver > >

Re: [PATCH nf-next,RFC v4] netfilter: nf_flow_table: add hardware offload support

2018-01-25 Thread Pablo Neira Ayuso
On Wed, Jan 24, 2018 at 05:31:36PM -0800, Jakub Kicinski wrote: > On Thu, 25 Jan 2018 01:09:41 +0100, Pablo Neira Ayuso wrote: > > This patch adds the infrastructure to offload flows to hardware, in case > > the nic/switch comes with built-in flow tables capabilities. > > > > If the hardware comes

Re: [PATCH v2 net] netfilter: x_tables: avoid out-of-bounds reads in xt_request_find_{match|target}

2018-01-25 Thread Pablo Neira Ayuso
On Wed, Jan 24, 2018 at 05:16:09PM -0800, Eric Dumazet wrote: > From: Eric Dumazet > > It looks like syzbot found its way into netfilter territory. > > Issue here is that @name comes from user space and might > not be null terminated. > > Out-of-bound reads happen, KASAN is not happy. > > v2 a

[PATCH v4] net: ethernet: cavium: Correct Cavium Thunderx NIC driver names accordingly to module name

2018-01-25 Thread Vadim Lomovtsev
From: Vadim Lomovtsev It was found that ethtool provides unexisting module name while it queries the specified network device for associated driver information. Then user tries to unload that module by provided module name and fails. This happens because ethtool reads value of DRV_NAME macro, wh

[PATCH] net: clean the sk_frag.page of new cloned socket

2018-01-25 Thread Li RongQing
Clean the sk_frag.page of new cloned socket, otherwise it will release twice wrongly since the reference count of this sk_frag page is not increased. sk_clone_lock() is used to clone a new socket from sock which is in listening state and has not sk_frag.page, but a socket has sent data and can get

Re: [PATCH v2 0/4] Check size of packets before sending

2018-01-25 Thread Eric Dumazet
On Thu, 2018-01-25 at 15:31 +1100, Daniel Axtens wrote: > There are a few ways we can send packets that are too large to a > network driver. > > When non-GSO packets are forwarded, we validate their size, based on > the MTU of the destination device. However, when GSO packets are > forwarded, we d

Re: [PATCH] net: clean the sk_frag.page of new cloned socket

2018-01-25 Thread Eric Dumazet
On Thu, 2018-01-25 at 20:08 +0800, Li RongQing wrote: > Clean the sk_frag.page of new cloned socket, otherwise it will release > twice wrongly since the reference count of this sk_frag page is not > increased. > > sk_clone_lock() is used to clone a new socket from sock which is in > listening stat

[PATCH] be2net: networking block comments don't use an empty /* line

2018-01-25 Thread Rohit Visavalia
Resolved Warning: networking block comments don't use an empty /* line, use /* Comment... Issue found by checkpatch. Signed-off-by: Rohit Visavalia --- drivers/net/ethernet/emulex/benet/be_main.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/ethernet/emulex/be

Re: [PATCH net-next 0/3 V1] rtnetlink: enable IFLA_IF_NETNSID for RTM_{DEL,SET}LINK

2018-01-25 Thread Christian Brauner
On Wed, Jan 24, 2018 at 03:26:31PM +0100, Christian Brauner wrote: > Hi, > > Based on the previous discussion this enables passing a IFLA_IF_NETNSID > property along with RTM_SETLINK and RTM_DELLINK requests. The patch for > RTM_NEWLINK will be sent out in a separate patch since there are more > c

Re: ixgbe tuning reset when XDP is setup

2018-01-25 Thread Peter Manev
On Fri, Dec 15, 2017 at 5:56 PM, Peter Manev wrote: > >> On 15 Dec 2017, at 17:51, Alexander Duyck wrote: >> >> On Fri, Dec 15, 2017 at 8:03 AM, John Fastabend >> wrote: >>> On 12/15/2017 07:53 AM, David Miller wrote: From: Eric Leblond Date: Fri, 15 Dec 2017 11:24:46 +0100 >

Re: [PATCH] kbuild: make Makefile|Kbuild in each directory optional

2018-01-25 Thread Masahiro Yamada
2018-01-25 10:41 GMT+09:00 Jakub Kicinski : > It is useful to be able to build single object files, e.g.: > $ make net/sched/cls_flower.o W=1 C=2 > > Currently kbuild does a hard include of a Kbuild or Makefile > for directory where that object would reside. Kbuild doesn't > cater too well to mult

Re: [PATCH v2 0/4] Check size of packets before sending

2018-01-25 Thread Daniel Axtens
Hi Eric, > May I ask which tree are you targeting ? > > ( Documentation/networking/netdev-FAQ.txt ) I have been targeting net-next, but I haven't pulled for about two weeks. I will rebase and if there are conflicts I will resend early next week. > Anything touching GSO is very risky and should t

Re: [PATCH net-next] ptr_ring: fix integer overflow

2018-01-25 Thread Michael S. Tsirkin
On Thu, Jan 25, 2018 at 03:31:42PM +0800, Jason Wang wrote: > We try to allocate one more entry for lockless peeking. The adding > operation may overflow which causes zero to be passed to kmalloc(). > In this case, it returns ZERO_SIZE_PTR without any notice by ptr > ring. Try to do producing or co

Re: [PATCH v6 16/36] nds32: DMA mapping API

2018-01-25 Thread Greentime Hu
Hi, Arnd: 2018-01-25 18:42 GMT+08:00 Arnd Bergmann : > On Thu, Jan 25, 2018 at 4:45 AM, Greentime Hu wrote: >> 2018-01-24 19:36 GMT+08:00 Arnd Bergmann : >>> On Tue, Jan 23, 2018 at 12:52 PM, Greentime Hu wrote: 2018-01-23 16:23 GMT+08:00 Greentime Hu : > 2018-01-18 18:26 GMT+08:00 Arnd

Re: 88e6161 failed create slave phy

2018-01-25 Thread Andrew Lunn
On Thu, Jan 25, 2018 at 09:15:16PM +0800, ?? wrote: > hello, I am compiling kernel for 88f6281 with 88e6161 switch for 4.9.73.but > the dsa does not work correctly.I think it is a bug because 4.4 and 4.14 > works fine. > both two bindings get the same result (port uninitialized, could not set

[PATCH net] vhost_net: stop device during reset owner

2018-01-25 Thread Jason Wang
We don't stop device before reset owner, this means we could try to serve any virtqueue kick before reset dev->worker. This will result a warn since the work was pending at llist during owner resetting. Fix this by stopping device during owner reset. Reported-by: syzbot+eb17c6162478cc506...@syzkal

[PATCH net-next 1/2] dev: always advertise the new nsid when the netns iface changes

2018-01-25 Thread Nicolas Dichtel
The user should be able to follow any interface that moves to another netns. There is no reason to hide physical interfaces. CC: Jiri Benc CC: Christian Brauner Signed-off-by: Nicolas Dichtel --- net/core/dev.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/net/core/d

[PATCH net-next 0/2] Ease to follow an interface that moves to another netns

2018-01-25 Thread Nicolas Dichtel
The goal of this series is to ease the user to follow an interface that moves to another netns. After this series, with a patched iproute2: $ ip netns bar foo $ ip monitor link & $ ip link set dummy0 netns foo Deleted 5: dummy0: mtu 1500 qdisc noop state DOWN group default link/ether 6e:a7

[PATCH net-next 2/2] dev: advertise the new ifindex when the netns iface changes

2018-01-25 Thread Nicolas Dichtel
The goal is to let the user follow an interface that moves to another netns. CC: Jiri Benc CC: Christian Brauner Signed-off-by: Nicolas Dichtel --- include/linux/rtnetlink.h| 5 +++-- include/uapi/linux/if_link.h | 1 + net/core/dev.c | 19 --- net/core/rtne

Re: [PATCH net-next 3/8] mlx5: use tc_cls_can_offload_and_chain0()

2018-01-25 Thread Or Gerlitz
On Thu, Jan 25, 2018 at 2:17 AM, Jakub Kicinski wrote: > > Make use of tc_cls_can_offload_and_chain0() to set extack msg in case > ethtool tc offload flag is not set or chain unsupported. > > Signed-off-by: Jakub Kicinski > Reviewed-by: Simon Horman Acked-by: Or Gerlitz

Re: [RFC] net: qcom/emac: mdiobus-dev fwnode should point to emac-adev

2018-01-25 Thread Andrew Lunn
On Wed, Jan 24, 2018 at 10:14:39PM -0800, Wang Dongsheng wrote: > mdiobus always try to get a GPIO "reset" consumer, based on ACPI > the GPIO should be described in emac-adev _DSD or _CRS. > > ACPI uses mido common API to register, however mdio->dev->fwnode is not > pointing to any adev. So the "r

Re: [PATCH net-next] ptr_ring: fix integer overflow

2018-01-25 Thread Jason Wang
On 2018年01月25日 21:45, Michael S. Tsirkin wrote: On Thu, Jan 25, 2018 at 03:31:42PM +0800, Jason Wang wrote: We try to allocate one more entry for lockless peeking. The adding operation may overflow which causes zero to be passed to kmalloc(). In this case, it returns ZERO_SIZE_PTR without any

Re: [PATCH net-next 0/3 V1] rtnetlink: enable IFLA_IF_NETNSID for RTM_{DEL,SET}LINK

2018-01-25 Thread Nicolas Dichtel
Le 24/01/2018 à 17:35, Jiri Benc a écrit : > On Wed, 24 Jan 2018 16:24:34 +0100, Nicolas Dichtel wrote: >> I wonder if it would be possible to do something in the netlink framework, >> like >> NETLINK_LISTEN_ALL_NSID. >> Having some ancillary data at the netlink socket level and a function like >>

Re: [PATCH v2 0/4] Check size of packets before sending

2018-01-25 Thread Eric Dumazet
On Fri, 2018-01-26 at 00:44 +1100, Daniel Axtens wrote: > Hi Eric, > > > May I ask which tree are you targeting ? > > > > ( Documentation/networking/netdev-FAQ.txt ) > > I have been targeting net-next, but I haven't pulled for about two > weeks. I will rebase and if there are conflicts I will re

Re: [RFC] net: qcom/emac: mdiobus-dev fwnode should point to emac-adev

2018-01-25 Thread Timur Tabi
On 01/25/2018 12:14 AM, Wang Dongsheng wrote: mdiobus always try to get a GPIO "reset" consumer, based on ACPI the GPIO should be described in emac-adev _DSD or _CRS. Are you talking about this: /* de-assert bus level PHY GPIO reset */ gpiod = devm_gpiod_get_optional(&bus->dev,

Re: [PATCH net-next 2/7] rds: hold a sock ref from rds_message to the rds_sock

2018-01-25 Thread Willem de Bruijn
On Wed, Jan 24, 2018 at 12:45 PM, Sowmini Varadhan wrote: > The existing model holds a reference from the rds_sock to the > rds_message, but the rds_message does not itself hold a sock_put() > on the rds_sock. Instead the m_rs field in the rds_message is > assigned when the message is queued on th

[regresssion 4.15] Userspace compilation broken by uapi/linux/if_ether.h update

2018-01-25 Thread Guillaume Nault
Hi, Commit 6926e041a892 ("uapi/if_ether.h: prevent redefinition of struct ethhdr"), can break compilation of userspace programs (in my case, accel-ppp (https://accel-ppp.org)). This happens for userspace programs that end up including linux/if_ether.h, netinet/in.h and linux/in.h in this order:

[PATCH net] ptr_ring: keep consumer_head valid at all times

2018-01-25 Thread Michael S. Tsirkin
The comment near __ptr_ring_peek says: * If ring is never resized, and if the pointer is merely * tested, there's no need to take the lock - see e.g. __ptr_ring_empty. but this was in fact never possible as index gets out of range temporarily. We tried to allocate one more entry for lockless

Re: ixgbe tuning reset when XDP is setup

2018-01-25 Thread Alexander Duyck
On Thu, Jan 25, 2018 at 5:09 AM, Peter Manev wrote: > On Fri, Dec 15, 2017 at 5:56 PM, Peter Manev wrote: >> >>> On 15 Dec 2017, at 17:51, Alexander Duyck wrote: >>> >>> On Fri, Dec 15, 2017 at 8:03 AM, John Fastabend >>> wrote: On 12/15/2017 07:53 AM, David Miller wrote: > From: Eric

Re: [PATCH net-next v2 00/12] net: sched: propagate extack to cls offloads on destroy and only with skip_sw

2018-01-25 Thread Marcelo Ricardo Leitner
On Wed, Jan 24, 2018 at 12:54:12PM -0800, Jakub Kicinski wrote: > Hi! > > This series some of Jiri's comments and the fact that today drivers > may produce extack even if there is no skip_sw flag (meaning the > driver failure is not really a problem), and warning messages will > only confuse the u

Re: [PATCH net] ipv6: Fix SO_REUSEPORT UDP socket with implicit sk_ipv6only

2018-01-25 Thread Craig Gallek
On Thu, Jan 25, 2018 at 2:15 AM, Martin KaFai Lau wrote: > If a sk_v6_rcv_saddr is !IPV6_ADDR_ANY and !IPV6_ADDR_MAPPED, it > implicitly implies it is an ipv6only socket. However, in inet6_bind(), > this addr_type checking and setting sk->sk_ipv6only to 1 are only done > after sk->sk_prot->get_po

Re: [patch net-next v2 00/10] Add support for resource abstraction

2018-01-25 Thread Jiri Pirko
Thu, Jan 04, 2018 at 05:58:51PM CET, d...@cumulusnetworks.com wrote: >On 1/3/18 11:36 AM, Jiri Pirko wrote: >> Wed, Jan 03, 2018 at 07:29:46PM CET, d...@cumulusnetworks.com wrote: >>> On 1/3/18 11:17 AM, Jiri Pirko wrote: Wed, Jan 03, 2018 at 07:14:16PM CET, d...@cumulusnetworks.com wrote: >>>

Re: [PATCH net-next 2/7] rds: hold a sock ref from rds_message to the rds_sock

2018-01-25 Thread Sowmini Varadhan
On (01/25/18 15:44), Willem de Bruijn wrote: > > This patch manages the m_rs assignment in the rds_message with > > the necessary refcount book-keeping. > > You may alos be able to do the same as tcp zerocopy and > hold an sk reference on the notification skb. We tether the notification skb to th

Re: [PATCH v3 net-next] net/ipv6: Do not allow route add with a device that is down

2018-01-25 Thread Ido Schimmel
On Wed, Jan 24, 2018 at 07:45:29PM -0800, David Ahern wrote: > IPv6 allows routes to be installed when the device is not up (admin up). > Worse, it does not mark it as LINKDOWN. IPv4 does not allow it and really > there is no reason for IPv6 to allow it, so check the flags and deny if > device is a

Re: [patch net-next v2 00/10] Add support for resource abstraction

2018-01-25 Thread David Ahern
On 1/25/18 8:24 AM, Jiri Pirko wrote: Now I remember. You wrote it independently and but needed iproute2 be a delivery vehicle. It uses none of the common infrastructure from iproute2. Could we make this more difficult >>> >>> Feel free to rewrite it to use lib/libnetlink.c. Sho

Re: [PATCH] net: tcp: close sock if net namespace is exiting

2018-01-25 Thread David Miller
From: Dan Streetman Date: Thu, 18 Jan 2018 16:14:26 -0500 > When a tcp socket is closed, if it detects that its net namespace is > exiting, close immediately and do not wait for FIN sequence. > > For normal sockets, a reference is taken to their net namespace, so it will > never exit while the s

Re: [RFC] net: qcom/emac: mdiobus-dev fwnode should point to emac-adev

2018-01-25 Thread Timur Tabi
On 01/25/2018 08:15 AM, Andrew Lunn wrote: If i'm reading your patch correctly, you are looking for the MDIO reset in the MAC node. This is wrong. It is an MDIO property, so should be in the MDIO device. Once we have figured out how to represent MDIO busses in ACPI, the reset will be in the MDIO

Re: [PATCH net-next 1/8] pkt_cls: add new tc cls helper to check offload flag and chain index

2018-01-25 Thread Marcelo Ricardo Leitner
On Wed, Jan 24, 2018 at 04:17:46PM -0800, Jakub Kicinski wrote: ... > +static inline bool > +tc_cls_can_offload_and_chain0(const struct net_device *dev, > + struct tc_cls_common_offload *common) > +{ > + if (common->chain_index) { > + NL_SET_ERR_MSG(common-

Re: [PATCH v2 0/4] Check size of packets before sending

2018-01-25 Thread Marcelo Ricardo Leitner
On Thu, Jan 25, 2018 at 03:31:05PM +1100, Daniel Axtens wrote: > There are a few ways we can send packets that are too large to a > network driver. > > When non-GSO packets are forwarded, we validate their size, based on > the MTU of the destination device. However, when GSO packets are > forwarde

Re: [patch net-next v2 00/10] Add support for resource abstraction

2018-01-25 Thread Jiri Pirko
Thu, Jan 25, 2018 at 04:38:41PM CET, d...@cumulusnetworks.com wrote: >On 1/25/18 8:24 AM, Jiri Pirko wrote: > Now I remember. You wrote it independently and but needed iproute2 be a > delivery vehicle. It uses none of the common infrastructure from > iproute2. Could we make this more di

Re: [PATCH v3 net-next] net/ipv6: Do not allow route add with a device that is down

2018-01-25 Thread Roopa Prabhu
On Wed, Jan 24, 2018 at 7:45 PM, David Ahern wrote: > IPv6 allows routes to be installed when the device is not up (admin up). > Worse, it does not mark it as LINKDOWN. IPv4 does not allow it and really > there is no reason for IPv6 to allow it, so check the flags and deny if > device is admin dow

Re: [RFC] net: qcom/emac: mdiobus-dev fwnode should point to emac-adev

2018-01-25 Thread Andrew Lunn
On Thu, Jan 25, 2018 at 09:40:45AM -0600, Timur Tabi wrote: > On 01/25/2018 08:15 AM, Andrew Lunn wrote: > >If i'm reading your patch correctly, you are looking for the MDIO > >reset in the MAC node. This is wrong. It is an MDIO property, so > >should be in the MDIO device. Once we have figured out

Re: [RFC] net: qcom/emac: mdiobus-dev fwnode should point to emac-adev

2018-01-25 Thread Timur Tabi
On 01/25/2018 09:59 AM, Andrew Lunn wrote: I expect we will implement something like acpi_mdiobus_register(), and it will take a pointer to an ACPI node. And maybe on top of of_mdiobus_register() and of_mdiobus_register() we will add a device_mdiobus_register(). Makes sense. If you remember, p

Re: [PATCH net-next] net: Move net:netns_ids destruction out of rtnl_lock() and document locking scheme

2018-01-25 Thread David Miller
From: Kirill Tkhai Date: Fri, 19 Jan 2018 19:14:53 +0300 > Currently, we unhash a dying net from netns_ids lists > under rtnl_lock(). It's a leftover from the time when > net::netns_ids was introduced. There was no net::nsid_lock, > and rtnl_lock() was mostly need to order modification > of alive

Re: [PATCH] net: make sure skb_dst is valid before using

2018-01-25 Thread David Miller
From: Nicolas Dichtel Date: Wed, 24 Jan 2018 16:37:56 +0100 > I would prefer a patch that test if the handler is available. It > would prevent to have this bug again in the future. But I don't have > a strong opinion about this. Yes that's probably better, making all calls to these dst_ops that

Re: [PATCH] net:l2tp: Allow MAC to be configured via netlink

2018-01-25 Thread David Miller
From: Guillaume Nault Date: Wed, 24 Jan 2018 13:04:06 +0100 > Sorry if it looks like I'm pushing back on every l2tp patches lately, > but it'd really help if we could move the code forward and take > advantage of existing kernel infrastructures. Otherwise l2tp will keep > lagging behind. Agreed.

Re: [PATCH net-next] rds: tcp: per-netns flag to stop new connection creation when rds-tcp is being dismantled

2018-01-25 Thread David Miller
From: Santosh Shilimkar Date: Wed, 24 Jan 2018 13:32:20 -0800 > On 1/24/2018 1:03 PM, Sowmini Varadhan wrote: >> An rds_connection can get added during netns deletion between lines >> 528 >> and 529 of >>506 static void rds_tcp_kill_sock(struct net *net) >>: >>/* code to pull out all

Re: [PATCH net-next 0/7] RDS zerocopy support

2018-01-25 Thread Santosh Shilimkar
Hi Sowmini, On 1/24/2018 3:45 AM, Sowmini Varadhan wrote: This patch series follows up on the RFC and subsequent review comments at https://patchwork.ozlabs.org/cover/862248/ Review comments addressed are - drop MSG_PEEK change for sk_error_queue - (patch4) batch of SO_EE_ORIGIN_MAX_ZCOOKIES (#

Re: [PATCH net] ptr_ring: keep consumer_head valid at all times

2018-01-25 Thread Michael S. Tsirkin
On Thu, Jan 25, 2018 at 05:04:46PM +0200, Michael S. Tsirkin wrote: > The comment near __ptr_ring_peek says: > > * If ring is never resized, and if the pointer is merely > * tested, there's no need to take the lock - see e.g. __ptr_ring_empty. > > but this was in fact never possible as index g

Re: [Intel-wired-lan] [RFC v2 net-next 01/10] net: Add a new socket option for a future transmit time.

2018-01-25 Thread Richard Cochran
On Thu, Jan 25, 2018 at 10:12:25AM +0100, Miroslav Lichvar wrote: > Do I understand it correctly that no other interface is using > nanoseconds since 1970? We probably don't have to worry about year > 2262 yet, but wouldn't it be better to make it consistent with the > timestamping API using timesp

Re: [PATCH net] net: memcontrol: charge allocated memory after mem_cgroup_sk_alloc()

2018-01-25 Thread David Miller
From: Roman Gushchin Date: Thu, 25 Jan 2018 00:19:11 + > @@ -476,6 +477,10 @@ struct sock *inet_csk_accept(struct sock *sk, int flags, > int *err, bool kern) > spin_unlock_bh(&queue->fastopenq.lock); > } > mem_cgroup_sk_alloc(newsk); > + amt = sk_memory_allocate

Re: [PATCH net-next] ipv6: raw: use IPv4 raw_sendmsg on v4-mapped IPv6 destinations

2018-01-25 Thread David Miller
From: Ivan Delalande Date: Wed, 24 Jan 2018 17:43:43 -0800 > Make IPv6 SOCK_RAW sockets operate like IPv6 UDP and TCP sockets with > respect to IPv4 mapped addresses by calling IPv4 raw_sendmsg from > rawv6_sendmsg to send those messages out. > > Signed-off-by: Travis Brown > Signed-off-by: Iva

Re: [PATCH net] net: memcontrol: charge allocated memory after mem_cgroup_sk_alloc()

2018-01-25 Thread Roman Gushchin
On Thu, Jan 25, 2018 at 12:03:02PM -0500, David Miller wrote: > From: Roman Gushchin > Date: Thu, 25 Jan 2018 00:19:11 + > > > @@ -476,6 +477,10 @@ struct sock *inet_csk_accept(struct sock *sk, int > > flags, int *err, bool kern) > > spin_unlock_bh(&queue->fastopenq.lock); > >

[PATCH net-next 00/12] sfc: support PTP on 8000 and X2000 series NICs

2018-01-25 Thread Edward Cree
Starting from the 8000-series (Medford 1), SFC NICs can timestamp TX packets sent through an ordinary DMA queue, rather than a special control-plane operation as in the 7000-series. Patches 2-8 implement support for this. The X2000-series (Medford 2) changes the format of timestamps, from second

[PATCH net-next 01/12] sfc: remove tx and MCDI handling from NAPI budget consideration

2018-01-25 Thread Edward Cree
From: Bert Kenward The NAPI budget is only for RX processing work, not other work such as TX or MCDI completion handling. Signed-off-by: Bert Kenward Signed-off-by: Edward Cree --- drivers/net/ethernet/sfc/ef10.c | 20 drivers/net/ethernet/sfc/farch.c | 17 +++--

[PATCH net-next 02/12] sfc: handle TX timestamps in the normal data path

2018-01-25 Thread Edward Cree
From: Martin Habets Before this work, TX timestamping is done by sending each SKB to the MC. On the 8000 series (Medford1) we have high speed timestamping via the MAC, which means we can use normal TX queues for this without a significant drop in bandwidth. On the X2000 series (Medford2) suppo

[PATCH net-next 03/12] sfc: add function to determine which TX timestamping method to use

2018-01-25 Thread Edward Cree
From: Martin Habets Use MC capability MC_CMD_GET_CAPABILITIES_V2_OUT_TX_MAC_TIMESTAMPING to detect whether the NIC supports timestamping packets sent out the main datapath. Signed-off-by: Martin Habets Signed-off-by: Edward Cree --- drivers/net/ethernet/sfc/nic.h | 1 + drivers/net/etherne

[PATCH net-next 04/12] sfc: use main datapath for HW timestamps if available

2018-01-25 Thread Edward Cree
From: Martin Habets We can now transmit SKBs in 2 ways: 1. Via the MC (for the 7XXX series and earlier), using efx_ptp_xmit_skb_mc(). 2. Via the TX queues on the dedicated PTP channel (8XXX series and later), using efx_ptp_xmit_skb_queue(). The PTP worker thread uses the method set up at pr

[PATCH net-next 05/12] sfc: only enable TX timestamping if the adapter is licensed for it

2018-01-25 Thread Edward Cree
From: Martin Habets If we try to enable the feature and do not have the license for it, the MCPU will refuse and fail our TX queue init. Signed-off-by: Martin Habets Signed-off-by: Edward Cree --- drivers/net/ethernet/sfc/ef10.c | 28 drivers/net/ethernet/sfc/nic

[PATCH net-next 06/12] sfc: MAC TX timestamp handling on the 8000 series

2018-01-25 Thread Edward Cree
From: Martin Habets TX timestamps on 8000 series are supplied from the MAC. This timestamp is only 48 bits long. The high order bits from the last time sync event are used for the top 16 bits. Signed-off-by: Martin Habets Signed-off-by: Edward Cree --- drivers/net/ethernet/sfc/nic.h | 1 +

[PATCH net-next 07/12] sfc: on 8000 series use TX queues for TX timestamps

2018-01-25 Thread Edward Cree
For this we create and use one or more new TX queues on the PTP channel, and enable sync events for it. Based on a patch by Martin Habets . Signed-off-by: Edward Cree --- drivers/net/ethernet/sfc/ef10.c | 12 ++-- drivers/net/ethernet/sfc/efx.c| 11 +++ drivers/net

[PATCH net-next 08/12] sfc: only advertise TX timestamping if we have the license for it

2018-01-25 Thread Edward Cree
From: Martin Habets We check the license for TX hardware timestamping capability. The PTP probe will have enabled PTP sync events from the adapter. If later, at TX queue init, it turns out we do not have the license, we don't need the sync events either. Signed-off-by: Martin Habets Signed-o

[PATCH net-next 09/12] sfc: simplify RX datapath timestamping

2018-01-25 Thread Edward Cree
From: Laurence Evans Use timestamp conversion function with correction to avoid duplicate correction handling. Signed-off-by: Laurence Evans Signed-off-by: Edward Cree --- drivers/net/ethernet/sfc/ptp.c | 13 + 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/drivers

[PATCH net-next 10/12] sfc: support separate PTP and general timestamping

2018-01-25 Thread Edward Cree
From: Laurence Evans Support MC_CMD_PTP_OUT_GET_TIMESTAMP_CORRECTIONS_V2. Extract general timestamp corrections in addition to PTP corrections. Apply receive timestamp corrections for general datapath receive timestamping, and correspondingly for transmit. Signed-off-by: Laurence Evans Sig

[PATCH net-next 11/12] sfc: support second + quarter ns time format for receive datapath

2018-01-25 Thread Edward Cree
The time_format that we stash in the PTP data structure is never referenced, so we can remove it. Instead, store the information needed to interpret sync event timestamps. Also rolls in a couple of other related minor PTP fixes. Based on patches by Bert Kenward and Laurence Evans . Signed-of

[PATCH net-next 12/12] sfc: support Medford2 frequency adjustment format

2018-01-25 Thread Edward Cree
From: Laurence Evans Support increased precision frequency adjustment format (FP44) used by Medford2 adapters. Signed-off-by: Laurence Evans Signed-off-by: Edward Cree --- drivers/net/ethernet/sfc/ptp.c | 45 +- 1 file changed, 31 insertions(+), 14 del

Re: [PATCH net-next] ptr_ring: fix integer overflow

2018-01-25 Thread Michael S. Tsirkin
On Thu, Jan 25, 2018 at 10:17:38PM +0800, Jason Wang wrote: > > > On 2018年01月25日 21:45, Michael S. Tsirkin wrote: > > On Thu, Jan 25, 2018 at 03:31:42PM +0800, Jason Wang wrote: > > > We try to allocate one more entry for lockless peeking. The adding > > > operation may overflow which causes zero

Re: [PATCHv5 net-next 2/2] openvswitch: add erspan version I and II support

2018-01-25 Thread Pravin Shelar
On Wed, Jan 24, 2018 at 11:06 AM, William Tu wrote: > The patch adds support for openvswitch to configure erspan > v1 and v2. The OVS_TUNNEL_KEY_ATTR_ERSPAN_OPTS attr is added > to uapi as a binary blob to support all ERSPAN v1 and v2's > fields. Note that Previous commit "openvswitch: Add erspa

Re: [PATCH iproute2-next v3 0/8] ip: Introduce and use get_addr_rta()/inet_addr_match_rta()

2018-01-25 Thread David Ahern
On 1/24/18 11:56 AM, Serhey Popovych wrote: > Now we enhance get_addr() to return additional information about address > (e.g. if it unspecified or multicast) we want to have same functionality > for attributes in netlink message. > > Introduce and use get_addr_rta() that parses given netlink attr

[PATCH net] dccp: don't restart ccid2_hc_tx_rto_expire() if sk in closed state

2018-01-25 Thread Alexey Kodanev
ccid2_hc_tx_rto_expire() timer callback always restarts the timer again and can run indefinitely (unless it is stopped outside), and after commit 120e9dabaf55 ("dccp: defer ccid_hc_tx_delete() at dismantle time"), which moved sk_stop_timer() to sk_destruct(), this started to happen quite often. The

[PATCH net] net: don't call update_pmtu unconditionally

2018-01-25 Thread Nicolas Dichtel
Some dst_ops (e.g. md_dst_ops)) doesn't set this handler. It may result to: "BUG: unable to handle kernel NULL pointer dereference at (null)" Let's add a helper to check if update_pmtu is available before calling it. Fixes: 52a589d51f10 ("geneve: update skb dst pmtu on tx path") Fixes:

Re: [PATCH net] dccp: don't restart ccid2_hc_tx_rto_expire() if sk in closed state

2018-01-25 Thread Eric Dumazet
On Thu, 2018-01-25 at 20:43 +0300, Alexey Kodanev wrote: > ccid2_hc_tx_rto_expire() timer callback always restarts the timer > again and can run indefinitely (unless it is stopped outside), and > after commit 120e9dabaf55 ("dccp: defer ccid_hc_tx_delete() at > dismantle time"), which moved sk_stop_

Re: [PATCH net] net: don't call update_pmtu unconditionally

2018-01-25 Thread David Ahern
On 1/25/18 11:03 AM, Nicolas Dichtel wrote: > diff --git a/include/net/dst.h b/include/net/dst.h > index b091fd536098..6216edb58393 100644 > --- a/include/net/dst.h > +++ b/include/net/dst.h > @@ -521,4 +521,12 @@ static inline struct xfrm_state *dst_xfrm(const struct > dst_entry *dst) > } > #en

Re: [PATCH net-next] rds: tcp: per-netns flag to stop new connection creation when rds-tcp is being dismantled

2018-01-25 Thread Sowmini Varadhan
On (01/25/18 11:38), David Miller wrote: > > Please have a look at: > > commit 4ee806d51176ba7b8ff1efd81f271d7252e03a1d Thanks for pointing that one out.. The same tear-down sequence (rds_conn_destroy()) is currently used for both module unload as well as netns delete. And at least for init_net

Re: esp spi incorrectly reported by ip -s x p

2018-01-25 Thread Marco Berizzi
> Hello everyone, > > I'm running strongSwan 5.6.1 on linux-4.14.x (slackware 14.2 64bit) > with iproute 4.14.1 Hello everyone again, I have also git cloned the current iproute2, but same behavior. Linux version is 4.14.2 > When I issue 'ip -x s p', I get this output: > > src 10.180.0.0/16 ds

Re: [PATCHv5 net-next 2/2] openvswitch: add erspan version I and II support

2018-01-25 Thread William Tu
Thanks for the review. On Thu, Jan 25, 2018 at 9:32 AM, Pravin Shelar wrote: > On Wed, Jan 24, 2018 at 11:06 AM, William Tu wrote: >> The patch adds support for openvswitch to configure erspan >> v1 and v2. The OVS_TUNNEL_KEY_ATTR_ERSPAN_OPTS attr is added >> to uapi as a binary blob to support

Re: [PATCHv5 net-next 2/2] openvswitch: add erspan version I and II support

2018-01-25 Thread Pravin Shelar
On Thu, Jan 25, 2018 at 10:34 AM, William Tu wrote: > Thanks for the review. > > On Thu, Jan 25, 2018 at 9:32 AM, Pravin Shelar wrote: >> On Wed, Jan 24, 2018 at 11:06 AM, William Tu wrote: >>> The patch adds support for openvswitch to configure erspan >>> v1 and v2. The OVS_TUNNEL_KEY_ATTR_ERS

Re: [oss-drivers] Re: [PATCH] kbuild: make Makefile|Kbuild in each directory optional

2018-01-25 Thread Jakub Kicinski
On Thu, 25 Jan 2018 22:15:47 +0900, Masahiro Yamada wrote: > For your specific problem, please fix netronome/nfp/Makefile Would you be able to suggest a way of splitting a module Makefile? I failed to find a way of doing that. The only solution I see is to create empty Makefiles in subdirectorie

Re: [PATCH] hv_netvsc: update VF after name has changed.

2018-01-25 Thread Stephen Hemminger
On Tue, 26 Dec 2017 17:11:19 -0500 (EST) David Miller wrote: > From: Stephen Hemminger > Date: Tue, 26 Dec 2017 13:51:43 -0800 > > > On Tue, 26 Dec 2017 12:25:12 -0500 (EST) > > David Miller wrote: > > > >> From: Stephen Hemminger > >> Date: Wed, 20 Dec 2017 14:33:23 -0800 > >> > >> > S

Re: [PATCH net-next 1/8] pkt_cls: add new tc cls helper to check offload flag and chain index

2018-01-25 Thread Jakub Kicinski
On Thu, 25 Jan 2018 13:41:58 -0200, Marcelo Ricardo Leitner wrote: > On Wed, Jan 24, 2018 at 04:17:46PM -0800, Jakub Kicinski wrote: > ... > > +static inline bool > > +tc_cls_can_offload_and_chain0(const struct net_device *dev, > > + struct tc_cls_common_offload *common) > >

  1   2   3   >