Netdev List
 help / color / mirror / Atom feed
* [PATCH net-next 1/8] sctp: add asconf_enable in struct sctp_endpoint
From: Xin Long @ 2019-08-19 14:02 UTC (permalink / raw)
  To: network dev, linux-sctp; +Cc: Marcelo Ricardo Leitner, Neil Horman, davem
In-Reply-To: <cover.1566223325.git.lucien.xin@gmail.com>

This patch is to make addip/asconf flag per endpoint,
and its value is initialized by the per netns flag,
net->sctp.addip_enable.

It also replaces the checks of net->sctp.addip_enable
with ep->asconf_enable in some places.

Signed-off-by: Xin Long <lucien.xin@gmail.com>
---
 include/net/sctp/structs.h |  1 +
 net/sctp/endpointola.c     |  3 ++-
 net/sctp/sm_make_chunk.c   | 18 +++++++++---------
 net/sctp/socket.c          | 17 +++++++----------
 4 files changed, 19 insertions(+), 20 deletions(-)

diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h
index ba5c4f6..daac1ef 100644
--- a/include/net/sctp/structs.h
+++ b/include/net/sctp/structs.h
@@ -1325,6 +1325,7 @@ struct sctp_endpoint {
 	__u8  auth_enable:1,
 	      intl_enable:1,
 	      prsctp_enable:1,
+	      asconf_enable:1,
 	      reconf_enable:1;
 
 	__u8  strreset_enable;
diff --git a/net/sctp/endpointola.c b/net/sctp/endpointola.c
index 69cebb2..38b8d7c 100644
--- a/net/sctp/endpointola.c
+++ b/net/sctp/endpointola.c
@@ -52,6 +52,7 @@ static struct sctp_endpoint *sctp_endpoint_init(struct sctp_endpoint *ep,
 	if (!ep->digest)
 		return NULL;
 
+	ep->asconf_enable = net->sctp.addip_enable;
 	ep->auth_enable = net->sctp.auth_enable;
 	if (ep->auth_enable) {
 		/* Allocate space for HMACS and CHUNKS authentication
@@ -86,7 +87,7 @@ static struct sctp_endpoint *sctp_endpoint_init(struct sctp_endpoint *ep,
 		/* If the Add-IP functionality is enabled, we must
 		 * authenticate, ASCONF and ASCONF-ACK chunks
 		 */
-		if (net->sctp.addip_enable) {
+		if (ep->asconf_enable) {
 			auth_chunks->chunks[0] = SCTP_CID_ASCONF;
 			auth_chunks->chunks[1] = SCTP_CID_ASCONF_ACK;
 			auth_chunks->param_hdr.length =
diff --git a/net/sctp/sm_make_chunk.c b/net/sctp/sm_make_chunk.c
index 36bd8a6e..338278f 100644
--- a/net/sctp/sm_make_chunk.c
+++ b/net/sctp/sm_make_chunk.c
@@ -207,7 +207,6 @@ struct sctp_chunk *sctp_make_init(const struct sctp_association *asoc,
 				  const struct sctp_bind_addr *bp,
 				  gfp_t gfp, int vparam_len)
 {
-	struct net *net = sock_net(asoc->base.sk);
 	struct sctp_supported_ext_param ext_param;
 	struct sctp_adaptation_ind_param aiparam;
 	struct sctp_paramhdr *auth_chunks = NULL;
@@ -255,7 +254,7 @@ struct sctp_chunk *sctp_make_init(const struct sctp_association *asoc,
 	 *  the ASCONF,the ASCONF-ACK, and the AUTH  chunks in its INIT and
 	 *  INIT-ACK parameters.
 	 */
-	if (net->sctp.addip_enable) {
+	if (asoc->ep->asconf_enable) {
 		extensions[num_ext] = SCTP_CID_ASCONF;
 		extensions[num_ext+1] = SCTP_CID_ASCONF_ACK;
 		num_ext += 2;
@@ -1964,7 +1963,9 @@ static int sctp_process_hn_param(const struct sctp_association *asoc,
 	return 0;
 }
 
-static int sctp_verify_ext_param(struct net *net, union sctp_params param)
+static int sctp_verify_ext_param(struct net *net,
+				 const struct sctp_endpoint *ep,
+				 union sctp_params param)
 {
 	__u16 num_ext = ntohs(param.p->length) - sizeof(struct sctp_paramhdr);
 	int have_asconf = 0;
@@ -1991,7 +1992,7 @@ static int sctp_verify_ext_param(struct net *net, union sctp_params param)
 	if (net->sctp.addip_noauth)
 		return 1;
 
-	if (net->sctp.addip_enable && !have_auth && have_asconf)
+	if (ep->asconf_enable && !have_auth && have_asconf)
 		return 0;
 
 	return 1;
@@ -2001,7 +2002,6 @@ static void sctp_process_ext_param(struct sctp_association *asoc,
 				   union sctp_params param)
 {
 	__u16 num_ext = ntohs(param.p->length) - sizeof(struct sctp_paramhdr);
-	struct net *net = sock_net(asoc->base.sk);
 	int i;
 
 	for (i = 0; i < num_ext; i++) {
@@ -2023,7 +2023,7 @@ static void sctp_process_ext_param(struct sctp_association *asoc,
 			break;
 		case SCTP_CID_ASCONF:
 		case SCTP_CID_ASCONF_ACK:
-			if (net->sctp.addip_enable)
+			if (asoc->ep->asconf_enable)
 				asoc->peer.asconf_capable = 1;
 			break;
 		case SCTP_CID_I_DATA:
@@ -2145,12 +2145,12 @@ static enum sctp_ierror sctp_verify_param(struct net *net,
 		break;
 
 	case SCTP_PARAM_SUPPORTED_EXT:
-		if (!sctp_verify_ext_param(net, param))
+		if (!sctp_verify_ext_param(net, ep, param))
 			return SCTP_IERROR_ABORT;
 		break;
 
 	case SCTP_PARAM_SET_PRIMARY:
-		if (net->sctp.addip_enable)
+		if (ep->asconf_enable)
 			break;
 		goto fallthrough;
 
@@ -2605,7 +2605,7 @@ static int sctp_process_param(struct sctp_association *asoc,
 		break;
 
 	case SCTP_PARAM_SET_PRIMARY:
-		if (!net->sctp.addip_enable)
+		if (!ep->asconf_enable)
 			goto fall_through;
 
 		addr_param = param.v + sizeof(struct sctp_addip_param);
diff --git a/net/sctp/socket.c b/net/sctp/socket.c
index 12503e1..559793f 100644
--- a/net/sctp/socket.c
+++ b/net/sctp/socket.c
@@ -524,7 +524,6 @@ static int sctp_send_asconf_add_ip(struct sock		*sk,
 				   struct sockaddr	*addrs,
 				   int 			addrcnt)
 {
-	struct net *net = sock_net(sk);
 	struct sctp_sock		*sp;
 	struct sctp_endpoint		*ep;
 	struct sctp_association		*asoc;
@@ -539,12 +538,12 @@ static int sctp_send_asconf_add_ip(struct sock		*sk,
 	int 				i;
 	int 				retval = 0;
 
-	if (!net->sctp.addip_enable)
-		return retval;
-
 	sp = sctp_sk(sk);
 	ep = sp->ep;
 
+	if (!ep->asconf_enable)
+		return retval;
+
 	pr_debug("%s: sk:%p, addrs:%p, addrcnt:%d\n",
 		 __func__, sk, addrs, addrcnt);
 
@@ -727,7 +726,6 @@ static int sctp_send_asconf_del_ip(struct sock		*sk,
 				   struct sockaddr	*addrs,
 				   int			addrcnt)
 {
-	struct net *net = sock_net(sk);
 	struct sctp_sock	*sp;
 	struct sctp_endpoint	*ep;
 	struct sctp_association	*asoc;
@@ -743,12 +741,12 @@ static int sctp_send_asconf_del_ip(struct sock		*sk,
 	int			stored = 0;
 
 	chunk = NULL;
-	if (!net->sctp.addip_enable)
-		return retval;
-
 	sp = sctp_sk(sk);
 	ep = sp->ep;
 
+	if (!ep->asconf_enable)
+		return retval;
+
 	pr_debug("%s: sk:%p, addrs:%p, addrcnt:%d\n",
 		 __func__, sk, addrs, addrcnt);
 
@@ -3330,7 +3328,6 @@ static int sctp_setsockopt_maxseg(struct sock *sk, char __user *optval, unsigned
 static int sctp_setsockopt_peer_primary_addr(struct sock *sk, char __user *optval,
 					     unsigned int optlen)
 {
-	struct net *net = sock_net(sk);
 	struct sctp_sock	*sp;
 	struct sctp_association	*asoc = NULL;
 	struct sctp_setpeerprim	prim;
@@ -3340,7 +3337,7 @@ static int sctp_setsockopt_peer_primary_addr(struct sock *sk, char __user *optva
 
 	sp = sctp_sk(sk);
 
-	if (!net->sctp.addip_enable)
+	if (!sp->ep->asconf_enable)
 		return -EPERM;
 
 	if (optlen != sizeof(struct sctp_setpeerprim))
-- 
2.1.0


^ permalink raw reply related

* [PATCH net-next 0/8] sctp: support per endpoint auth and asconf flags
From: Xin Long @ 2019-08-19 14:02 UTC (permalink / raw)
  To: network dev, linux-sctp; +Cc: Marcelo Ricardo Leitner, Neil Horman, davem

This patchset mostly does 3 things:

  1. add per endpint asconf flag and use asconf flag properly
     and add SCTP_ASCONF_SUPPORTED sockopt.
  2. use auth flag properly and add SCTP_AUTH_SUPPORTED sockopt.
  3. remove the 'global feature switch' to discard chunks.

Xin Long (8):
  sctp: add asconf_enable in struct sctp_endpoint
  sctp: not set peer.asconf_capable in sctp_association_init
  sctp: check asoc peer.asconf_capable before processing asconf
  sctp: add SCTP_ASCONF_SUPPORTED sockopt
  sctp: use ep and asoc auth_enable properly
  sctp: add sctp_auth_init and sctp_auth_free
  sctp: add SCTP_AUTH_SUPPORTED sockopt
  sctp: remove net sctp.x_enable working as a global switch

 include/net/sctp/auth.h    |   2 +
 include/net/sctp/structs.h |   1 +
 include/uapi/linux/sctp.h  |   2 +
 net/sctp/associola.c       |   9 --
 net/sctp/auth.c            | 101 ++++++++++++++++++--
 net/sctp/endpointola.c     |  64 ++-----------
 net/sctp/sm_make_chunk.c   |  18 ++--
 net/sctp/sm_statefuns.c    |   6 +-
 net/sctp/sm_statetable.c   |  28 +++---
 net/sctp/socket.c          | 230 ++++++++++++++++++++++++++++++++++++++-------
 10 files changed, 325 insertions(+), 136 deletions(-)

-- 
2.1.0


^ permalink raw reply

* Re: [PATCH net-next 4/6] net: dsa: mv88e6xxx: do not change STP state on port disabling
From: Andrew Lunn @ 2019-08-19 13:40 UTC (permalink / raw)
  To: Vivien Didelot; +Cc: netdev, marek.behun, davem, f.fainelli
In-Reply-To: <20190818173548.19631-5-vivien.didelot@gmail.com>

On Sun, Aug 18, 2019 at 01:35:46PM -0400, Vivien Didelot wrote:
> When disabling a port, that is not for the driver to decide what to
> do with the STP state. This is already handled by the DSA layer.

Hi Vivien

Putting the port into STP disabled state is how you actually disable
it, for the mv88e6xxx. So this is not really about STP, it is about
powering off the port. Maybe a comment is needed, rather than removing
the code?

    Thanks
	Andrew

^ permalink raw reply

* Re: [PATCH net-next 1/3] net: mdio: add support for passing a PTP system timestamp to the mii_bus driver
From: Vladimir Oltean @ 2019-08-19 13:37 UTC (permalink / raw)
  To: Andrew Lunn
  Cc: Hubert Feurstein, netdev, lkml, Richard Cochran, Florian Fainelli,
	Heiner Kallweit, David S. Miller
In-Reply-To: <CA+h21hou0v0gPURO3VHe2Ur1-heXnuueN5F92iDLffArB+1d5w@mail.gmail.com>

On Mon, 19 Aug 2019 at 16:34, Vladimir Oltean <olteanv@gmail.com> wrote:
>
> Hi Andrew,
>
> On Mon, 19 Aug 2019 at 16:17, Andrew Lunn <andrew@lunn.ch> wrote:
> >
> > On Fri, Aug 16, 2019 at 06:31:55PM +0200, Hubert Feurstein wrote:
> > > In order to improve the synchronisation precision of phc2sys (from
> > > the linuxptp project) for devices like switches which are attached
> > > to the MDIO bus, it is necessary the get the system timestamps as
> > > close as possible to the access which causes the PTP timestamp
> > > register to be snapshotted in the switch hardware. Usually this is
> > > triggered by an MDIO write access, the snapshotted timestamp is then
> > > transferred by several MDIO reads.
> > >
> > > This patch adds the required infrastructure to solve the problem described
> > > above.
> > >
> > > Signed-off-by: Hubert Feurstein <h.feurstein@gmail.com>
> > > ---
> > >  drivers/net/phy/mdio_bus.c | 105 +++++++++++++++++++++++++++++++++++++
> > >  include/linux/mdio.h       |   7 +++
> > >  include/linux/phy.h        |  25 +++++++++
> > >  3 files changed, 137 insertions(+)
> > >
> > > diff --git a/drivers/net/phy/mdio_bus.c b/drivers/net/phy/mdio_bus.c
> > > index bd04fe762056..167a21f267fa 100644
> > > --- a/drivers/net/phy/mdio_bus.c
> > > +++ b/drivers/net/phy/mdio_bus.c
> > > @@ -34,6 +34,7 @@
> > >  #include <linux/phy.h>
> > >  #include <linux/io.h>
> > >  #include <linux/uaccess.h>
> > > +#include <linux/ptp_clock_kernel.h>
> > >
> > >  #define CREATE_TRACE_POINTS
> > >  #include <trace/events/mdio.h>
> > > @@ -697,6 +698,110 @@ int mdiobus_write(struct mii_bus *bus, int addr, u32 regnum, u16 val)
> > >  }
> > >  EXPORT_SYMBOL(mdiobus_write);
> > >
> > > +/**
> > > + * __mdiobus_write_sts - Unlocked version of the mdiobus_write_sts function
> > > + * @bus: the mii_bus struct
> > > + * @addr: the phy address
> > > + * @regnum: register number to write
> > > + * @val: value to write to @regnum
> > > + * @sts: the ptp system timestamp
> > > + *
> > > + * Write a MDIO bus register and request the MDIO bus driver to take the
> > > + * system timestamps when sts-pointer is valid. When the bus driver doesn't
> > > + * support this, the timestamps are taken in this function instead.
> > > + *
> > > + * In order to improve the synchronisation precision of phc2sys (from
> > > + * the linuxptp project) for devices like switches which are attached
> > > + * to the MDIO bus, it is necessary the get the system timestamps as
> > > + * close as possible to the access which causes the PTP timestamp
> > > + * register to be snapshotted in the switch hardware. Usually this is
> > > + * triggered by an MDIO write access, the snapshotted timestamp is then
> > > + * transferred by several MDIO reads.
> > > + *
> > > + * Caller must hold the mdio bus lock.
> > > + *
> > > + * NOTE: MUST NOT be called from interrupt context.
> > > + */
> > > +int __mdiobus_write_sts(struct mii_bus *bus, int addr, u32 regnum, u16 val,
> > > +                     struct ptp_system_timestamp *sts)
> > > +{
> > > +     int retval;
> > > +
> > > +     WARN_ON_ONCE(!mutex_is_locked(&bus->mdio_lock));
> > > +
> > > +     if (!bus->ptp_sts_supported)
> > > +             ptp_read_system_prets(sts);
> >
> > How expensive is ptp_read_system_prets()? My original suggestion was
> > to unconditionally call it here, and then let the driver overwrite it
> > if it supports finer grained time stamping. MDIO is slow, so as long
> > as ptp_read_system_prets() is not too expensive, i prefer KISS.
> >
> >    Andrew
>
> While that works for the pre_ts, it doesn't work for the post_ts (the
> MDIO bus core will unconditionally overwrite the system timestamp from
> the driver).
> Unless you're suggesting to keep the pre_ts unconditional and the
> post_ts under the "if" condition, which is a bit odd.
> According to my tests with a scope (measuring the width between SPI
> transfers with and without the ptp_read_system_*ts calls), two calls
> to ktime_get_real_ts64 amount to around 750 ns on a 1200 MHz Cortex A7
> core, or around 90 clock cycles.

900 clock cycles, my bad.

>
> Regards,
> -Vladimir

^ permalink raw reply

* Re: [PATCH net-next 1/3] net: mdio: add support for passing a PTP system timestamp to the mii_bus driver
From: Vladimir Oltean @ 2019-08-19 13:34 UTC (permalink / raw)
  To: Andrew Lunn
  Cc: Hubert Feurstein, netdev, lkml, Richard Cochran, Florian Fainelli,
	Heiner Kallweit, David S. Miller
In-Reply-To: <20190819131736.GD8981@lunn.ch>

Hi Andrew,

On Mon, 19 Aug 2019 at 16:17, Andrew Lunn <andrew@lunn.ch> wrote:
>
> On Fri, Aug 16, 2019 at 06:31:55PM +0200, Hubert Feurstein wrote:
> > In order to improve the synchronisation precision of phc2sys (from
> > the linuxptp project) for devices like switches which are attached
> > to the MDIO bus, it is necessary the get the system timestamps as
> > close as possible to the access which causes the PTP timestamp
> > register to be snapshotted in the switch hardware. Usually this is
> > triggered by an MDIO write access, the snapshotted timestamp is then
> > transferred by several MDIO reads.
> >
> > This patch adds the required infrastructure to solve the problem described
> > above.
> >
> > Signed-off-by: Hubert Feurstein <h.feurstein@gmail.com>
> > ---
> >  drivers/net/phy/mdio_bus.c | 105 +++++++++++++++++++++++++++++++++++++
> >  include/linux/mdio.h       |   7 +++
> >  include/linux/phy.h        |  25 +++++++++
> >  3 files changed, 137 insertions(+)
> >
> > diff --git a/drivers/net/phy/mdio_bus.c b/drivers/net/phy/mdio_bus.c
> > index bd04fe762056..167a21f267fa 100644
> > --- a/drivers/net/phy/mdio_bus.c
> > +++ b/drivers/net/phy/mdio_bus.c
> > @@ -34,6 +34,7 @@
> >  #include <linux/phy.h>
> >  #include <linux/io.h>
> >  #include <linux/uaccess.h>
> > +#include <linux/ptp_clock_kernel.h>
> >
> >  #define CREATE_TRACE_POINTS
> >  #include <trace/events/mdio.h>
> > @@ -697,6 +698,110 @@ int mdiobus_write(struct mii_bus *bus, int addr, u32 regnum, u16 val)
> >  }
> >  EXPORT_SYMBOL(mdiobus_write);
> >
> > +/**
> > + * __mdiobus_write_sts - Unlocked version of the mdiobus_write_sts function
> > + * @bus: the mii_bus struct
> > + * @addr: the phy address
> > + * @regnum: register number to write
> > + * @val: value to write to @regnum
> > + * @sts: the ptp system timestamp
> > + *
> > + * Write a MDIO bus register and request the MDIO bus driver to take the
> > + * system timestamps when sts-pointer is valid. When the bus driver doesn't
> > + * support this, the timestamps are taken in this function instead.
> > + *
> > + * In order to improve the synchronisation precision of phc2sys (from
> > + * the linuxptp project) for devices like switches which are attached
> > + * to the MDIO bus, it is necessary the get the system timestamps as
> > + * close as possible to the access which causes the PTP timestamp
> > + * register to be snapshotted in the switch hardware. Usually this is
> > + * triggered by an MDIO write access, the snapshotted timestamp is then
> > + * transferred by several MDIO reads.
> > + *
> > + * Caller must hold the mdio bus lock.
> > + *
> > + * NOTE: MUST NOT be called from interrupt context.
> > + */
> > +int __mdiobus_write_sts(struct mii_bus *bus, int addr, u32 regnum, u16 val,
> > +                     struct ptp_system_timestamp *sts)
> > +{
> > +     int retval;
> > +
> > +     WARN_ON_ONCE(!mutex_is_locked(&bus->mdio_lock));
> > +
> > +     if (!bus->ptp_sts_supported)
> > +             ptp_read_system_prets(sts);
>
> How expensive is ptp_read_system_prets()? My original suggestion was
> to unconditionally call it here, and then let the driver overwrite it
> if it supports finer grained time stamping. MDIO is slow, so as long
> as ptp_read_system_prets() is not too expensive, i prefer KISS.
>
>    Andrew

While that works for the pre_ts, it doesn't work for the post_ts (the
MDIO bus core will unconditionally overwrite the system timestamp from
the driver).
Unless you're suggesting to keep the pre_ts unconditional and the
post_ts under the "if" condition, which is a bit odd.
According to my tests with a scope (measuring the width between SPI
transfers with and without the ptp_read_system_*ts calls), two calls
to ktime_get_real_ts64 amount to around 750 ns on a 1200 MHz Cortex A7
core, or around 90 clock cycles.

Regards,
-Vladimir

^ permalink raw reply

* Re: [PATCH net-next 2/3] tcp: ulp: add functions to dump ulp-specific information
From: Davide Caratti @ 2019-08-19 13:32 UTC (permalink / raw)
  To: Jakub Kicinski, Eric Dumazet
  Cc: Boris Pismenny, John Fastabend, Dave Watson, Aviad Yehezkel,
	David S. Miller, netdev
In-Reply-To: <20190815143810.3a190c81@cakuba.netronome.com>

On Thu, 2019-08-15 at 14:38 -0700, Jakub Kicinski wrote:
> On Thu, 15 Aug 2019 20:46:01 +0200, Eric Dumazet wrote:

hello Eric and Jakub, thanks a lot for looking at this.

> > On 8/15/19 6:00 PM, Davide Caratti wrote:
> > 
> > >  
> > > +	if (net_admin) {
> > > +		const struct tcp_ulp_ops *ulp_ops;
> > > +
> > > +		rcu_read_lock();
> > > +		ulp_ops = icsk->icsk_ulp_ops;
> > > +		if (ulp_ops)
> > > +			err = tcp_diag_put_ulp(skb, sk, ulp_ops);
> > > +		rcu_read_unlock();
> > > +		if (err)
> > > +			return err;
> > > +	}
> > >  	return 0;  
> > 
> > Why is rcu_read_lock() and rcu_read_unlock() used at all ?
> > 
> > icsk->icsk_ulp_ops does not seem to be rcu protected ?
> > 
> > If this was, then an rcu_dereference() would be appropriate.
> 
> Indeed it's ulp_data not ulp_ops that are protected. 

the goal is to protect execution of 'ss -tni' against concurrent removal
of tls.ko module, similarly to what was done in inet_sk_diag_fill() when
INET_DIAG_CONG is requested [1]. But after reading more carefully, the
assignment of ulp_ops needs to be:

	ulp_ops = READ_ONCE(icsk->icsk_ulp_ops);

which I lost in internal reviews, with some additional explanatory
comment. Ok if I correct the above hunk with READ_ONCE() and add a
comment?

> Davide, perhaps we could push the RCU lock into tls_get_info(), after all?

It depends on whether concurrent dump / module removal is an issue for TCP
ULPs, like it was for congestion control schemes [1]. Any advice?

> And tls_context has to use rcu_deference there, as Eric points out, 
> plus we should probably NULL-check it.

yes, it makes sense, for patch 3/3, in the assignment of 'ctx'. Instead of
calling tls_get_ctx() in tls_get_info() I will do

	ctx = rcu_dereference(inet_csk(sk)->icsk_ulp_data);

and let it return 0 in case of NULL ctx (as it doesn't look like a faulty
situation). Ok? 

-- 
davide


[1] see:
commit 521f1cf1dbb9d5ad858dca5dc75d1b45f64b6589
Author: Eric Dumazet <edumazet@google.com>
Date:   Thu Apr 16 18:10:35 2015 -0700

    inet_diag: fix access to tcp cc information


^ permalink raw reply

* Re: [PATCH net-next 2/3] net: dsa: mv88e6xxx: extend PTP gettime function to read system clock
From: Andrew Lunn @ 2019-08-19 13:27 UTC (permalink / raw)
  To: Hubert Feurstein
  Cc: netdev, linux-kernel, Richard Cochran, Vivien Didelot,
	Florian Fainelli, Vladimir Oltean, David S. Miller
In-Reply-To: <20190816163157.25314-3-h.feurstein@gmail.com>

> @@ -45,7 +45,8 @@ static int mv88e6xxx_smi_direct_write(struct mv88e6xxx_chip *chip,
>  {
>  	int ret;
>  
> -	ret = mdiobus_write_nested(chip->bus, dev, reg, data);
> +	ret = mdiobus_write_sts_nested(chip->bus, dev, reg, data,
> +				       chip->ptp_sts);
>  	if (ret < 0)
>  		return ret;
>  

Please also make a similar change to mv88e6xxx_smi_indirect_write().
The last write in that function should be timestamped.

Vivien, please could you think about these changes with respect to
RMU. We probably want to skip the RMU in this case, so we get slow but
uniform jitter, vs fast and unpredictable jitter from using the RMU.

Thanks
	Andrew

^ permalink raw reply

* Re: [PATCH net-next 1/3] net/tls: use RCU protection on icsk->icsk_ulp_data
From: Davide Caratti @ 2019-08-19 13:23 UTC (permalink / raw)
  To: Jakub Kicinski
  Cc: Boris Pismenny, John Fastabend, Dave Watson, Aviad Yehezkel,
	David S. Miller, netdev
In-Reply-To: <20190815143216.45f6da44@cakuba.netronome.com>

On Thu, 2019-08-15 at 14:32 -0700, Jakub Kicinski wrote:
> On Thu, 15 Aug 2019 18:00:42 +0200, Davide Caratti wrote:
> > From: Jakub Kicinski <jakub.kicinski@netronome.com>
> > 
> > We need to make sure context does not get freed while diag
> > code is interrogating it. Free struct tls_context with
> > kfree_rcu().
> > 
> > We add the __rcu annotation directly in icsk, and cast it
> > away in the datapath accessor. Presumably all ULPs will
> > do a similar thing.
> > 
> > Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>

hello Jakub,

> > @@ -251,14 +251,31 @@ static void tls_write_space(struct sock *sk)
> >  	ctx->sk_write_space(sk);
> >  }
> >  
> > -void tls_ctx_free(struct tls_context *ctx)
> > +/**
> > + * tls_ctx_free() - free TLS ULP context
> > + * @sk:  socket to with @ctx is attached
> > + * @ctx: TLS context structure
> > + *
> > + * Free TLS context. If @sk is %NULL caller guarantees that the socket
> > + * to which @ctx was attached has no outstanding references.
> > + */
> > +void tls_ctx_free(struct sock *sk, struct tls_context *ctx)
> >  {
> > +	struct inet_connection_sock *icsk;
> > +
> >  	if (!ctx)
> >  		return;
> >  
> >  	memzero_explicit(&ctx->crypto_send, sizeof(ctx->crypto_send));
> >  	memzero_explicit(&ctx->crypto_recv, sizeof(ctx->crypto_recv));
> > -	kfree(ctx);
> > +
> > +	if (sk) {
> > +		icsk = inet_csk(sk);
> > +		rcu_assign_pointer(icsk->icsk_ulp_data, NULL);
> 
> Now that we kind of want to set the icsk_ulp_data to NULL under the
> callback_lock I think we should let the callers do it.

Ok, I will fix this in series v2.

> > 
> > @@ -649,8 +666,8 @@ static void tls_hw_sk_destruct(struct sock *sk)
> >  
> >  	ctx->sk_destruct(sk);
> >  	/* Free ctx */
> > -	tls_ctx_free(ctx);
> > -	icsk->icsk_ulp_data = NULL;
> > +	tls_ctx_free(sk, ctx);
> > +	rcu_assign_pointer(icsk->icsk_ulp_data, NULL);
> 
> Let's reorder the assignment before the free.

Ok, I will fix this in series v2.

thanks!
-- 
davide



^ permalink raw reply

* Re: [PATCH net-next 1/3] net: mdio: add support for passing a PTP system timestamp to the mii_bus driver
From: Andrew Lunn @ 2019-08-19 13:17 UTC (permalink / raw)
  To: Hubert Feurstein
  Cc: netdev, linux-kernel, Richard Cochran, Florian Fainelli,
	Heiner Kallweit, Vladimir Oltean, David S. Miller
In-Reply-To: <20190816163157.25314-2-h.feurstein@gmail.com>

On Fri, Aug 16, 2019 at 06:31:55PM +0200, Hubert Feurstein wrote:
> In order to improve the synchronisation precision of phc2sys (from
> the linuxptp project) for devices like switches which are attached
> to the MDIO bus, it is necessary the get the system timestamps as
> close as possible to the access which causes the PTP timestamp
> register to be snapshotted in the switch hardware. Usually this is
> triggered by an MDIO write access, the snapshotted timestamp is then
> transferred by several MDIO reads.
> 
> This patch adds the required infrastructure to solve the problem described
> above.
> 
> Signed-off-by: Hubert Feurstein <h.feurstein@gmail.com>
> ---
>  drivers/net/phy/mdio_bus.c | 105 +++++++++++++++++++++++++++++++++++++
>  include/linux/mdio.h       |   7 +++
>  include/linux/phy.h        |  25 +++++++++
>  3 files changed, 137 insertions(+)
> 
> diff --git a/drivers/net/phy/mdio_bus.c b/drivers/net/phy/mdio_bus.c
> index bd04fe762056..167a21f267fa 100644
> --- a/drivers/net/phy/mdio_bus.c
> +++ b/drivers/net/phy/mdio_bus.c
> @@ -34,6 +34,7 @@
>  #include <linux/phy.h>
>  #include <linux/io.h>
>  #include <linux/uaccess.h>
> +#include <linux/ptp_clock_kernel.h>
>  
>  #define CREATE_TRACE_POINTS
>  #include <trace/events/mdio.h>
> @@ -697,6 +698,110 @@ int mdiobus_write(struct mii_bus *bus, int addr, u32 regnum, u16 val)
>  }
>  EXPORT_SYMBOL(mdiobus_write);
>  
> +/**
> + * __mdiobus_write_sts - Unlocked version of the mdiobus_write_sts function
> + * @bus: the mii_bus struct
> + * @addr: the phy address
> + * @regnum: register number to write
> + * @val: value to write to @regnum
> + * @sts: the ptp system timestamp
> + *
> + * Write a MDIO bus register and request the MDIO bus driver to take the
> + * system timestamps when sts-pointer is valid. When the bus driver doesn't
> + * support this, the timestamps are taken in this function instead.
> + *
> + * In order to improve the synchronisation precision of phc2sys (from
> + * the linuxptp project) for devices like switches which are attached
> + * to the MDIO bus, it is necessary the get the system timestamps as
> + * close as possible to the access which causes the PTP timestamp
> + * register to be snapshotted in the switch hardware. Usually this is
> + * triggered by an MDIO write access, the snapshotted timestamp is then
> + * transferred by several MDIO reads.
> + *
> + * Caller must hold the mdio bus lock.
> + *
> + * NOTE: MUST NOT be called from interrupt context.
> + */
> +int __mdiobus_write_sts(struct mii_bus *bus, int addr, u32 regnum, u16 val,
> +			struct ptp_system_timestamp *sts)
> +{
> +	int retval;
> +
> +	WARN_ON_ONCE(!mutex_is_locked(&bus->mdio_lock));
> +
> +	if (!bus->ptp_sts_supported)
> +		ptp_read_system_prets(sts);

How expensive is ptp_read_system_prets()? My original suggestion was
to unconditionally call it here, and then let the driver overwrite it
if it supports finer grained time stamping. MDIO is slow, so as long
as ptp_read_system_prets() is not too expensive, i prefer KISS.

   Andrew

^ permalink raw reply

* [PATCH v3] tun: fix use-after-free when register netdev failed
From: Yang Yingliang @ 2019-08-19 13:31 UTC (permalink / raw)
  To: netdev
  Cc: jasowang, eric.dumazet, xiyou.wangcong, davem, yangyingliang,
	weiyongjun1

I got a UAF repport in tun driver when doing fuzzy test:

[  466.269490] ==================================================================
[  466.271792] BUG: KASAN: use-after-free in tun_chr_read_iter+0x2ca/0x2d0
[  466.271806] Read of size 8 at addr ffff888372139250 by task tun-test/2699
[  466.271810]
[  466.271824] CPU: 1 PID: 2699 Comm: tun-test Not tainted 5.3.0-rc1-00001-g5a9433db2614-dirty #427
[  466.271833] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.12.1-0-ga5cab58e9a3f-prebuilt.qemu.org 04/01/2014
[  466.271838] Call Trace:
[  466.271858]  dump_stack+0xca/0x13e
[  466.271871]  ? tun_chr_read_iter+0x2ca/0x2d0
[  466.271890]  print_address_description+0x79/0x440
[  466.271906]  ? vprintk_func+0x5e/0xf0
[  466.271920]  ? tun_chr_read_iter+0x2ca/0x2d0
[  466.271935]  __kasan_report+0x15c/0x1df
[  466.271958]  ? tun_chr_read_iter+0x2ca/0x2d0
[  466.271976]  kasan_report+0xe/0x20
[  466.271987]  tun_chr_read_iter+0x2ca/0x2d0
[  466.272013]  do_iter_readv_writev+0x4b7/0x740
[  466.272032]  ? default_llseek+0x2d0/0x2d0
[  466.272072]  do_iter_read+0x1c5/0x5e0
[  466.272110]  vfs_readv+0x108/0x180
[  466.299007]  ? compat_rw_copy_check_uvector+0x440/0x440
[  466.299020]  ? fsnotify+0x888/0xd50
[  466.299040]  ? __fsnotify_parent+0xd0/0x350
[  466.299064]  ? fsnotify_first_mark+0x1e0/0x1e0
[  466.304548]  ? vfs_write+0x264/0x510
[  466.304569]  ? ksys_write+0x101/0x210
[  466.304591]  ? do_preadv+0x116/0x1a0
[  466.304609]  do_preadv+0x116/0x1a0
[  466.309829]  do_syscall_64+0xc8/0x600
[  466.309849]  entry_SYSCALL_64_after_hwframe+0x49/0xbe
[  466.309861] RIP: 0033:0x4560f9
[  466.309875] Code: 00 00 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48
[  466.309889] RSP: 002b:00007ffffa5166e8 EFLAGS: 00000206 ORIG_RAX: 0000000000000127
[  466.322992] RAX: ffffffffffffffda RBX: 0000000000400460 RCX: 00000000004560f9
[  466.322999] RDX: 0000000000000003 RSI: 00000000200008c0 RDI: 0000000000000003
[  466.323007] RBP: 00007ffffa516700 R08: 0000000000000004 R09: 0000000000000000
[  466.323014] R10: 0000000000000000 R11: 0000000000000206 R12: 000000000040cb10
[  466.323021] R13: 0000000000000000 R14: 00000000006d7018 R15: 0000000000000000
[  466.323057]
[  466.323064] Allocated by task 2605:
[  466.335165]  save_stack+0x19/0x80
[  466.336240]  __kasan_kmalloc.constprop.8+0xa0/0xd0
[  466.337755]  kmem_cache_alloc+0xe8/0x320
[  466.339050]  getname_flags+0xca/0x560
[  466.340229]  user_path_at_empty+0x2c/0x50
[  466.341508]  vfs_statx+0xe6/0x190
[  466.342619]  __do_sys_newstat+0x81/0x100
[  466.343908]  do_syscall_64+0xc8/0x600
[  466.345303]  entry_SYSCALL_64_after_hwframe+0x49/0xbe
[  466.347034]
[  466.347517] Freed by task 2605:
[  466.348471]  save_stack+0x19/0x80
[  466.349476]  __kasan_slab_free+0x12e/0x180
[  466.350726]  kmem_cache_free+0xc8/0x430
[  466.351874]  putname+0xe2/0x120
[  466.352921]  filename_lookup+0x257/0x3e0
[  466.354319]  vfs_statx+0xe6/0x190
[  466.355498]  __do_sys_newstat+0x81/0x100
[  466.356889]  do_syscall_64+0xc8/0x600
[  466.358037]  entry_SYSCALL_64_after_hwframe+0x49/0xbe
[  466.359567]
[  466.360050] The buggy address belongs to the object at ffff888372139100
[  466.360050]  which belongs to the cache names_cache of size 4096
[  466.363735] The buggy address is located 336 bytes inside of
[  466.363735]  4096-byte region [ffff888372139100, ffff88837213a100)
[  466.367179] The buggy address belongs to the page:
[  466.368604] page:ffffea000dc84e00 refcount:1 mapcount:0 mapping:ffff8883df1b4f00 index:0x0 compound_mapcount: 0
[  466.371582] flags: 0x2fffff80010200(slab|head)
[  466.372910] raw: 002fffff80010200 dead000000000100 dead000000000122 ffff8883df1b4f00
[  466.375209] raw: 0000000000000000 0000000000070007 00000001ffffffff 0000000000000000
[  466.377778] page dumped because: kasan: bad access detected
[  466.379730]
[  466.380288] Memory state around the buggy address:
[  466.381844]  ffff888372139100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[  466.384009]  ffff888372139180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[  466.386131] >ffff888372139200: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[  466.388257]                                                  ^
[  466.390234]  ffff888372139280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[  466.392512]  ffff888372139300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[  466.394667] ==================================================================

tun_chr_read_iter() accessed the memory which freed by free_netdev()
called by tun_set_iff():

        CPUA                                     CPUB
    tun_set_iff()
      alloc_netdev_mqs()
      tun_attach()
                                            tun_chr_read_iter()
                                              tun_get()
      register_netdevice() <-- inject error
      tun_detach_all()
        synchronize_net()
                                              tun_do_read()
                                                tun_ring_recv()
                                                  schedule()
      free_netdev()
        netdev_freemem()
                                              tun_put()
                                                dev_put() <-- UAF

Call netif_set_real_num_t/rx_queues() before register_netdevice().

Call tun_attach() after register_netdevice() to make sure tfile->tun
is not published until the netdevice is registered. So the read/write
thread can not use the tun pointer that may freed by free_netdev().
(The tun and dev pointer are allocated by alloc_netdev_mqs(), they can
be freed by netdev_freemem().)

---
Changes in v3:
 - call netif_set_real_num_t/rx_queues() before register_netdevice()

Changes in v2:
 - add a param in tun_set_real_num_queues()
 - move tun_set_real_num_queues() out of tun_attach()
 - call tun_set_real_num_queues() before register_netdevice()
 - call tun_attach() after register_netdevice()
---

Fixes: eb0fb363f920 ("tuntap: attach queue 0 before registering netdevice")
Reported-by: Hulk Robot <hulkci@huawei.com>
Suggested-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
---
 drivers/net/tun.c | 25 +++++++++++++------------
 1 file changed, 13 insertions(+), 12 deletions(-)

diff --git a/drivers/net/tun.c b/drivers/net/tun.c
index db16d7a13e00..07d1e945385a 100644
--- a/drivers/net/tun.c
+++ b/drivers/net/tun.c
@@ -2828,14 +2828,19 @@ static int tun_set_iff(struct net *net, struct file *file, struct ifreq *ifr)
 			      (ifr->ifr_flags & TUN_FEATURES);
 
 		INIT_LIST_HEAD(&tun->disabled);
-		err = tun_attach(tun, file, false, ifr->ifr_flags & IFF_NAPI,
-				 ifr->ifr_flags & IFF_NAPI_FRAGS);
-		if (err < 0)
-			goto err_free_flow;
+
+		netif_set_real_num_tx_queues(tun->dev, 1);
+		netif_set_real_num_rx_queues(tun->dev, 1);
 
 		err = register_netdevice(tun->dev);
 		if (err < 0)
-			goto err_detach;
+			/* register_netdevice() already called tun_free_netdev() */
+			goto err_free_dev;
+
+		err = tun_attach(tun, file, false, ifr->ifr_flags & IFF_NAPI,
+				 ifr->ifr_flags & IFF_NAPI_FRAGS);
+		if (err < 0)
+			goto err_unregister;
 	}
 
 	netif_carrier_on(tun->dev);
@@ -2851,14 +2856,10 @@ static int tun_set_iff(struct net *net, struct file *file, struct ifreq *ifr)
 	strcpy(ifr->ifr_name, tun->dev->name);
 	return 0;
 
-err_detach:
-	tun_detach_all(dev);
-	/* register_netdevice() already called tun_free_netdev() */
-	goto err_free_dev;
+err_unregister:
+	unregister_netdevice(dev);
+	return err;
 
-err_free_flow:
-	tun_flow_uninit(tun);
-	security_tun_dev_free_security(tun->security);
 err_free_stat:
 	free_percpu(tun->pcpu_stats);
 err_free_dev:
-- 
2.17.1


^ permalink raw reply related

* Re: [RFC v2] vsock: proposal to support multiple transports at runtime
From: Stefan Hajnoczi @ 2019-08-19 13:09 UTC (permalink / raw)
  To: Stefano Garzarella
  Cc: netdev, Dexuan Cui, Jorgen Hansen, David S. Miller, Vishnu Dasa,
	K. Y. Srinivasan, Haiyang Zhang, Stephen Hemminger, Sasha Levin
In-Reply-To: <20190606100912.f2zuzrkgmdyxckog@steredhat>

[-- Attachment #1: Type: text/plain, Size: 4778 bytes --]

On Thu, Jun 06, 2019 at 12:09:12PM +0200, Stefano Garzarella wrote:
> 
> Hi all,
> this is a v2 of a proposal addressing the comments made by Dexuan, Stefan,
> and Jorgen.
> 
> v1: https://www.spinics.net/lists/netdev/msg570274.html
> 
> 
> 
> We can define two types of transport that we have to handle at the same time
> (e.g. in a nested VM we would have both types of transport running together):
> 
> - 'host->guest' transport, it runs in the host and it is used to communicate
>   with the guests of a specific hypervisor (KVM, VMWare or Hyper-V). It also
>   runs in the guest who has nested guests, to communicate with them.
> 
>   [Phase 2]
>   We can support multiple 'host->guest' transport running at the same time,
>   but on x86 only one hypervisor uses VMX at any given time.
> 
> - 'guest->host' transport, it runs in the guest and it is used to communicate
>   with the host.
> 
> 
> The main goal is to find a way to decide what transport use in these cases:
> 1. connect() / sendto()
> 
>    a. use the 'host->guest' transport, if the destination is the guest
>       (dest_cid > VMADDR_CID_HOST).
> 
>       [Phase 2]
>       In order to support multiple 'host->guest' transports running at the same
>       time, we should assign CIDs uniquely across all transports. In this way,
>       a packet generated by the host side will get directed to the appropriate
>       transport based on the CID.
> 
>    b. use the 'guest->host' transport, if the destination is the host or the
>       hypervisor.
>       (dest_cid == VMADDR_CID_HOST || dest_cid == VMADDR_CID_HYPERVISOR)
> 
> 
> 2. listen() / recvfrom()
> 
>    a. use the 'host->guest' transport, if the socket is bound to
>       VMADDR_CID_HOST, or it is bound to VMADDR_CID_ANY and there is no
>       'guest->host' transport.
>       We could also define a new VMADDR_CID_LISTEN_FROM_GUEST in order to
>       address this case.
> 
>       [Phase 2]
>       We can support network namespaces to create independent AF_VSOCK
>       addressing domains:
>       - could be used to partition VMs between hypervisors or at a finer
>    	 granularity;
>       - could be used to isolate host applications from guest applications
>    	 using the same ports with CID_ANY;
> 
>    b. use the 'guest->host' transport, if the socket is bound to local CID
>       different from the VMADDR_CID_HOST (guest CID get with
>       IOCTL_VM_SOCKETS_GET_LOCAL_CID), or it is bound to VMADDR_CID_ANY (to be
>       backward compatible).
>       Also in this case, we could define a new VMADDR_CID_LISTEN_FROM_HOST.
> 
>    c. shared port space between transports
>       For incoming requests or packets, we should be able to choose which
>       transport use, looking at the 'port' requested.
> 
>       - stream sockets already support shared port space between transports
>         (one port can be assigned to only one transport)
> 
>       [Phase 2]
>       - datagram sockets will support it, but for now VMCI transport is the
>         default transport for any host side datagram socket (KVM and Hyper-V
>         do not yet support datagrams sockets)
> 
> We will make the loading of af_vsock.ko independent of the transports to
> allow to:
>    - create a AF_VSOCK socket without any loaded transports;
>    - listen on a socket (e.g. bound to VMADDR_CID_ANY) without any loaded
>      transports;
> 
> Hopefully, we could move MODULE_ALIAS_NETPROTO(PF_VSOCK) from the
> vmci_transport.ko to the af_vsock.ko.
> [Jorgen will check if this will impact the existing VMware products]
> 
> Notes:
>    - For Hyper-V sockets, the host can only be Windows. No changes should
>      be required on the Windows host to support the changes on this proposal.
> 
>    - Communication between guests are not allowed on any transports, so we can
>      drop packets sent from a guest to another guest (dest_cid >
>      VMADDR_CID_HOST) if the 'host->guest' transport is not available.
> 
>    - [Phase 2] tag used to identify things that can be done at a later stage,
>      but that should be taken into account during this design.
> 
>    - Namespace support will be developed in [Phase 2] or in a separate project.
> 
> 
> 
> Comments and suggestions are welcome.
> I'll be on PTO for next two weeks, so sorry in advance if I'll answer later.
> 
> If we agree on this proposal, when I get back, I'll start working on the code
> to get a first PATCH RFC.

Stefano,
I've reviewed your proposal and it looks good for solving nested
virtualization.

The tricky implementation details will be supporting listen sockets,
especially with VMADDR_CID_ANY so they can be accessed from both
transports.

Stefan

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply

* Re: [PATCH] net/mlx5: Fix a memory leak bug
From: Moshe Shemesh @ 2019-08-19 13:00 UTC (permalink / raw)
  To: Wenwen Wang
  Cc: Saeed Mahameed, Leon Romanovsky, David S. Miller,
	open list:MELLANOX MLX5 core VPI driver,
	open list:MELLANOX MLX5 core VPI driver, open list
In-Reply-To: <1565684495-2454-1-git-send-email-wenwen@cs.uga.edu>

Please don't change that.
On command timeout we don't release ent, since the FW event on
completion can occur after timeout, so it is released on the
completion handler mlx5_cmd_comp_handler().
See commit 73dd3a4839c1d ("net/mlx5: Avoid using pending command
interface slots").

On Tue, Aug 13, 2019 at 11:22 AM Wenwen Wang <wenwen@cs.uga.edu> wrote:
>
> In mlx5_cmd_invoke(), 'ent' is allocated through kzalloc() in alloc_cmd().
> After the work is queued, wait_func() is invoked to wait the completion of
> the work. If wait_func() returns -ETIMEDOUT, the following execution will
> be terminated. However, the allocated 'ent' is not deallocated on this
> program path, leading to a memory leak bug.
>
> To fix the above issue, free 'ent' before returning the error.
>
> Signed-off-by: Wenwen Wang <wenwen@cs.uga.edu>
> ---
>  drivers/net/ethernet/mellanox/mlx5/core/cmd.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/mellanox/mlx5/core/cmd.c b/drivers/net/ethernet/mellanox/mlx5/core/cmd.c
> index 8cdd7e6..90cdb9a 100644
> --- a/drivers/net/ethernet/mellanox/mlx5/core/cmd.c
> +++ b/drivers/net/ethernet/mellanox/mlx5/core/cmd.c
> @@ -1036,7 +1036,7 @@ static int mlx5_cmd_invoke(struct mlx5_core_dev *dev, struct mlx5_cmd_msg *in,
>
>         err = wait_func(dev, ent);
>         if (err == -ETIMEDOUT)
> -               goto out;
> +               goto out_free;
>
>         ds = ent->ts2 - ent->ts1;
>         op = MLX5_GET(mbox_in, in->first.data, opcode);
> --
> 2.7.4
>

^ permalink raw reply

* Help needed - Kernel lockup while running ipsec
From: Vakul Garg @ 2019-08-19 12:55 UTC (permalink / raw)
  To: netdev@vger.kernel.org

Hi

With kernel 4.14.122, I am getting a kernel softlockup while running single static ipsec tunnel.
The problem reproduces mostly after running 8-10 hours of ipsec encap test (on my dual core arm board).

I found that in function xfrm_policy_lookup_bytype(), the policy in variable 'ret' shows refcnt=0 under problem situation.
This creates an infinite loop in  xfrm_policy_lookup_bytype() and hence the lockup.

Can some body please provide me pointers about 'refcnt'?
Is it legitimate for 'refcnt' to become '0'? Under what condition can it become '0'?

Regards
Vakul

^ permalink raw reply

* BUG: MAX_STACK_TRACE_ENTRIES too low in tipc_topsrv_exit_net
From: syzbot @ 2019-08-19 12:22 UTC (permalink / raw)
  To: davem, jon.maloy, linux-kernel, netdev, syzkaller-bugs,
	tipc-discussion, ying.xue

Hello,

syzbot found the following crash on:

HEAD commit:    5181b473 net: phy: realtek: add NBase-T PHY auto-detection
git tree:       net-next
console output: https://syzkaller.appspot.com/x/log.txt?x=156b731c600000
kernel config:  https://syzkaller.appspot.com/x/.config?x=d4cf1ffb87d590d7
dashboard link: https://syzkaller.appspot.com/bug?extid=5f97459a05652f579f6c
compiler:       gcc (GCC) 9.0.0 20181231 (experimental)

Unfortunately, I don't have any reproducer for this crash yet.

IMPORTANT: if you fix the bug, please add the following tag to the commit:
Reported-by: syzbot+5f97459a05652f579f6c@syzkaller.appspotmail.com

BUG: MAX_STACK_TRACE_ENTRIES too low!
turning off the locking correctness validator.
CPU: 0 PID: 2581 Comm: kworker/u4:4 Not tainted 5.3.0-rc3+ #132
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS  
Google 01/01/2011
Workqueue: netns cleanup_net
Call Trace:
  __dump_stack lib/dump_stack.c:77 [inline]
  dump_stack+0x172/0x1f0 lib/dump_stack.c:113
  save_trace kernel/locking/lockdep.c:473 [inline]
  save_trace.isra.0.cold+0x14/0x19 kernel/locking/lockdep.c:458
  mark_lock+0x3db/0x11e0 kernel/locking/lockdep.c:3583
  mark_usage kernel/locking/lockdep.c:3517 [inline]
  __lock_acquire+0x538/0x4c30 kernel/locking/lockdep.c:3834
  lock_acquire+0x190/0x410 kernel/locking/lockdep.c:4412
  flush_workqueue+0x126/0x14b0 kernel/workqueue.c:2774
  drain_workqueue+0x1b4/0x470 kernel/workqueue.c:2939
  destroy_workqueue+0x21/0x6c0 kernel/workqueue.c:4320
  tipc_topsrv_work_stop net/tipc/topsrv.c:636 [inline]
  tipc_topsrv_stop net/tipc/topsrv.c:694 [inline]
  tipc_topsrv_exit_net+0x3fe/0x5d8 net/tipc/topsrv.c:706
  ops_exit_list.isra.0+0xaa/0x150 net/core/net_namespace.c:172
  cleanup_net+0x4e2/0xa70 net/core/net_namespace.c:594
  process_one_work+0x9af/0x1740 kernel/workqueue.c:2269
  worker_thread+0x98/0xe40 kernel/workqueue.c:2415
  kthread+0x361/0x430 kernel/kthread.c:255
  ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:352
kobject: 'rx-0' (000000000e2c91cd): kobject_cleanup, parent 000000002003fefb
kobject: 'rx-0' (000000000e2c91cd): auto cleanup 'remove' event
kobject: 'rx-0' (000000000e2c91cd): kobject_uevent_env
kobject: 'rx-0' (000000000e2c91cd): kobject_uevent_env: uevent_suppress  
caused the event to drop!
kobject: 'rx-0' (000000000e2c91cd): auto cleanup kobject_del
kobject: 'rx-0' (000000000e2c91cd): calling ktype release
kobject: 'rx-0': free name
kobject: 'tx-0' (0000000058b6f726): kobject_cleanup, parent 000000002003fefb
kobject: 'tx-0' (0000000058b6f726): auto cleanup 'remove' event
kobject: 'tx-0' (0000000058b6f726): kobject_uevent_env
kobject: 'tx-0' (0000000058b6f726): kobject_uevent_env: uevent_suppress  
caused the event to drop!
kobject: 'tx-0' (0000000058b6f726): auto cleanup kobject_del
kobject: 'tx-0' (0000000058b6f726): calling ktype release
kobject: 'tx-0': free name
kobject: 'queues' (000000002003fefb): kobject_cleanup, parent  
000000009c061a32
kobject: 'queues' (000000002003fefb): calling ktype release
kobject: 'queues' (000000002003fefb): kset_release
kobject: 'queues': free name
kobject: 'ip6gre0' (0000000018a24d65): kobject_uevent_env
kobject: 'ip6gre0' (0000000018a24d65): kobject_uevent_env: uevent_suppress  
caused the event to drop!
kobject: 'rx-0' (00000000940b22b0): kobject_cleanup, parent 0000000005a1fc3a
kobject: 'rx-0' (00000000940b22b0): auto cleanup 'remove' event
kobject: 'rx-0' (00000000940b22b0): kobject_uevent_env
kobject: 'rx-0' (00000000940b22b0): kobject_uevent_env: uevent_suppress  
caused the event to drop!
kobject: 'rx-0' (00000000940b22b0): auto cleanup kobject_del
kobject: 'rx-0' (00000000940b22b0): calling ktype release
kobject: 'rx-0': free name
kobject: 'tx-0' (00000000278e85e2): kobject_cleanup, parent 0000000005a1fc3a
kobject: 'tx-0' (00000000278e85e2): auto cleanup 'remove' event
kobject: 'tx-0' (00000000278e85e2): kobject_uevent_env
kobject: 'tx-0' (00000000278e85e2): kobject_uevent_env: uevent_suppress  
caused the event to drop!
kobject: 'tx-0' (00000000278e85e2): auto cleanup kobject_del
kobject: 'tx-0' (00000000278e85e2): calling ktype release
kobject: 'tx-0': free name
kobject: 'queues' (0000000005a1fc3a): kobject_cleanup, parent  
000000009c061a32
kobject: 'queues' (0000000005a1fc3a): calling ktype release
kobject: 'queues' (0000000005a1fc3a): kset_release
kobject: 'queues': free name
kobject: 'ip6gre0' (00000000c78b955b): kobject_uevent_env
kobject: 'ip6gre0' (00000000c78b955b): kobject_uevent_env: uevent_suppress  
caused the event to drop!
kobject: 'rx-0' (000000000fa7c1d1): kobject_cleanup, parent 00000000d264d5b4
kobject: 'rx-0' (000000000fa7c1d1): auto cleanup 'remove' event
kobject: 'rx-0' (000000000fa7c1d1): kobject_uevent_env
kobject: 'rx-0' (000000000fa7c1d1): kobject_uevent_env: uevent_suppress  
caused the event to drop!
kobject: 'rx-0' (000000000fa7c1d1): auto cleanup kobject_del
kobject: 'rx-0' (000000000fa7c1d1): calling ktype release
kobject: 'rx-0': free name
kobject: 'tx-0' (000000000f66c80c): kobject_cleanup, parent 00000000d264d5b4
kobject: 'tx-0' (000000000f66c80c): auto cleanup 'remove' event
kobject: 'tx-0' (000000000f66c80c): kobject_uevent_env
kobject: 'tx-0' (000000000f66c80c): kobject_uevent_env: uevent_suppress  
caused the event to drop!
kobject: 'tx-0' (000000000f66c80c): auto cleanup kobject_del
kobject: 'tx-0' (000000000f66c80c): calling ktype release
kobject: 'tx-0': free name
kobject: 'queues' (00000000d264d5b4): kobject_cleanup, parent  
000000009c061a32
kobject: 'queues' (00000000d264d5b4): calling ktype release
kobject: 'queues' (00000000d264d5b4): kset_release
kobject: 'queues': free name
kobject: 'ip6gre0' (00000000ef80dc29): kobject_uevent_env
kobject: 'ip6gre0' (00000000ef80dc29): kobject_uevent_env: uevent_suppress  
caused the event to drop!
kobject: 'rx-0' (00000000f928d911): kobject_cleanup, parent 000000003c7c9951
kobject: 'rx-0' (00000000f928d911): auto cleanup 'remove' event
kobject: 'rx-0' (00000000f928d911): kobject_uevent_env
kobject: 'rx-0' (00000000f928d911): kobject_uevent_env: uevent_suppress  
caused the event to drop!
kobject: 'rx-0' (00000000f928d911): auto cleanup kobject_del
kobject: 'rx-0' (00000000f928d911): calling ktype release
kobject: 'rx-0': free name
kobject: 'tx-0' (000000009bf7cc90): kobject_cleanup, parent 000000003c7c9951
kobject: 'tx-0' (000000009bf7cc90): auto cleanup 'remove' event
kobject: 'tx-0' (000000009bf7cc90): kobject_uevent_env
kobject: 'tx-0' (000000009bf7cc90): kobject_uevent_env: uevent_suppress  
caused the event to drop!
kobject: 'tx-0' (000000009bf7cc90): auto cleanup kobject_del
kobject: 'tx-0' (000000009bf7cc90): calling ktype release
kobject: 'tx-0': free name
kobject: 'queues' (000000003c7c9951): kobject_cleanup, parent  
000000009c061a32
kobject: 'queues' (000000003c7c9951): calling ktype release
kobject: 'queues' (000000003c7c9951): kset_release
kobject: 'queues': free name
kobject: 'ip6gre0' (00000000acb4e121): kobject_uevent_env
kobject: 'ip6gre0' (00000000acb4e121): kobject_uevent_env: uevent_suppress  
caused the event to drop!
kobject: 'rx-0' (0000000045fca4e1): kobject_cleanup, parent 000000001c9d9e42
kobject: 'rx-0' (0000000045fca4e1): auto cleanup 'remove' event
kobject: 'rx-0' (0000000045fca4e1): kobject_uevent_env
kobject: 'rx-0' (0000000045fca4e1): kobject_uevent_env: uevent_suppress  
caused the event to drop!
kobject: 'rx-0' (0000000045fca4e1): auto cleanup kobject_del
kobject: 'rx-0' (0000000045fca4e1): calling ktype release
kobject: 'rx-0': free name
kobject: 'tx-0' (00000000a309e805): kobject_cleanup, parent 000000001c9d9e42
kobject: 'tx-0' (00000000a309e805): auto cleanup 'remove' event
kobject: 'tx-0' (00000000a309e805): kobject_uevent_env
kobject: 'tx-0' (00000000a309e805): kobject_uevent_env: uevent_suppress  
caused the event to drop!
kobject: 'tx-0' (00000000a309e805): auto cleanup kobject_del
kobject: 'tx-0' (00000000a309e805): calling ktype release
kobject: 'tx-0': free name
kobject: 'queues' (000000001c9d9e42): kobject_cleanup, parent  
000000009c061a32
kobject: 'queues' (000000001c9d9e42): calling ktype release
kobject: 'queues' (000000001c9d9e42): kset_release
kobject: 'queues': free name
kobject: 'ip6gre0' (0000000094fbf7bb): kobject_uevent_env
kobject: 'ip6gre0' (0000000094fbf7bb): kobject_uevent_env: uevent_suppress  
caused the event to drop!
kobject: 'rx-0' (00000000443242e0): kobject_cleanup, parent 000000009f9df3e8
kobject: 'rx-0' (00000000443242e0): auto cleanup 'remove' event
kobject: 'rx-0' (00000000443242e0): kobject_uevent_env
kobject: 'rx-0' (00000000443242e0): kobject_uevent_env: uevent_suppress  
caused the event to drop!
kobject: 'rx-0' (00000000443242e0): auto cleanup kobject_del
kobject: 'rx-0' (00000000443242e0): calling ktype release
kobject: 'rx-0': free name
kobject: 'tx-0' (000000005588ef99): kobject_cleanup, parent 000000009f9df3e8
kobject: 'tx-0' (000000005588ef99): auto cleanup 'remove' event
kobject: 'tx-0' (000000005588ef99): kobject_uevent_env
kobject: 'tx-0' (000000005588ef99): kobject_uevent_env: uevent_suppress  
caused the event to drop!
kobject: 'tx-0' (000000005588ef99): auto cleanup kobject_del
kobject: 'tx-0' (000000005588ef99): calling ktype release
kobject: 'tx-0': free name
kobject: 'queues' (000000009f9df3e8): kobject_cleanup, parent  
000000009c061a32
kobject: 'queues' (000000009f9df3e8): calling ktype release
kobject: 'queues' (000000009f9df3e8): kset_release
kobject: 'queues': free name
kobject: 'ip6gre0' (0000000060028093): kobject_uevent_env
kobject: 'ip6gre0' (0000000060028093): kobject_uevent_env: uevent_suppress  
caused the event to drop!
kobject: 'rx-0' (0000000002c2db56): kobject_cleanup, parent 000000000ee23264
kobject: 'rx-0' (0000000002c2db56): auto cleanup 'remove' event
kobject: 'rx-0' (0000000002c2db56): kobject_uevent_env
kobject: 'rx-0' (0000000002c2db56): kobject_uevent_env: uevent_suppress  
caused the event to drop!
kobject: 'rx-0' (0000000002c2db56): auto cleanup kobject_del
kobject: 'rx-0' (0000000002c2db56): calling ktype release
kobject: 'rx-0': free name
kobject: 'tx-0' (00000000831daf90): kobject_cleanup, parent 000000000ee23264
kobject: 'tx-0' (00000000831daf90): auto cleanup 'remove' event
kobject: 'tx-0' (00000000831daf90): kobject_uevent_env
kobject: 'tx-0' (00000000831daf90): kobject_uevent_env: uevent_suppress  
caused the event to drop!
kobject: 'tx-0' (00000000831daf90): auto cleanup kobject_del
kobject: 'tx-0' (00000000831daf90): calling ktype release
kobject: 'tx-0': free name
kobject: 'queues' (000000000ee23264): kobject_cleanup, parent  
000000009c061a32
kobject: 'queues' (000000000ee23264): calling ktype release
kobject: 'queues' (000000000ee23264): kset_release
kobject: 'queues': free name
kobject: 'ip6gre0' (00000000e217374d): kobject_uevent_env
kobject: 'ip6gre0' (00000000e217374d): kobject_uevent_env: uevent_suppress  
caused the event to drop!
kobject: 'rx-0' (00000000f8e7f44b): kobject_cleanup, parent 000000003daaa7c9
kobject: 'rx-0' (00000000f8e7f44b): auto cleanup 'remove' event
kobject: 'rx-0' (00000000f8e7f44b): kobject_uevent_env
kobject: 'rx-0' (00000000f8e7f44b): kobject_uevent_env: uevent_suppress  
caused the event to drop!
kobject: 'rx-0' (00000000f8e7f44b): auto cleanup kobject_del
kobject: 'rx-0' (00000000f8e7f44b): calling ktype release
kobject: 'rx-0': free name
kobject: 'tx-0' (000000001277c9de): kobject_cleanup, parent 000000003daaa7c9
kobject: 'tx-0' (000000001277c9de): auto cleanup 'remove' event
kobject: 'tx-0' (000000001277c9de): kobject_uevent_env
kobject: 'tx-0' (000000001277c9de): kobject_uevent_env: uevent_suppress  
caused the event to drop!
kobject: 'tx-0' (000000001277c9de): auto cleanup kobject_del
kobject: 'tx-0' (000000001277c9de): calling ktype release
kobject: 'tx-0': free name
kobject: 'queues' (000000003daaa7c9): kobject_cleanup, parent  
000000009c061a32
kobject: 'queues' (000000003daaa7c9): calling ktype release
kobject: 'queues' (000000003daaa7c9): kset_release
kobject: 'queues': free name
kobject: 'ip6gre0' (00000000597e3c0a): kobject_uevent_env
kobject: 'ip6gre0' (00000000597e3c0a): kobject_uevent_env: uevent_suppress  
caused the event to drop!
kobject: 'rx-0' (00000000eb376580): kobject_cleanup, parent 0000000054d719cb
kobject: 'rx-0' (00000000eb376580): auto cleanup 'remove' event
kobject: 'rx-0' (00000000eb376580): kobject_uevent_env
kobject: 'rx-0' (00000000eb376580): kobject_uevent_env: uevent_suppress  
caused the event to drop!
kobject: 'rx-0' (00000000eb376580): auto cleanup kobject_del
kobject: 'rx-0' (00000000eb376580): calling ktype release
kobject: 'rx-0': free name
kobject: 'tx-0' (0000000040024191): kobject_cleanup, parent 0000000054d719cb
kobject: 'tx-0' (0000000040024191): auto cleanup 'remove' event
kobject: 'tx-0' (0000000040024191): kobject_uevent_env
kobject: 'tx-0' (0000000040024191): kobject_uevent_env: uevent_suppress  
caused the event to drop!
kobject: 'tx-0' (0000000040024191): auto cleanup kobject_del
kobject: 'tx-0' (0000000040024191): calling ktype release
kobject: 'tx-0': free name
kobject: 'queues' (0000000054d719cb): kobject_cleanup, parent  
000000009c061a32
kobject: 'queues' (0000000054d719cb): calling ktype release
kobject: 'queues' (0000000054d719cb): kset_release
kobject: 'queues': free name
kobject: 'ip6gre0' (00000000995a4c19): kobject_uevent_env
kobject: 'ip6gre0' (00000000995a4c19): kobject_uevent_env: uevent_suppress  
caused the event to drop!
kobject: 'ip6gre0' (0000000018a24d65): kobject_cleanup, parent  
000000009c061a32
kobject: 'ip6gre0' (0000000018a24d65): calling ktype release
kobject: 'ip6gre0': free name
kobject: 'ip6gre0' (00000000c78b955b): kobject_cleanup, parent  
000000009c061a32
kobject: 'ip6gre0' (00000000c78b955b): calling ktype release
kobject: 'ip6gre0': free name
kobject: 'ip6gre0' (00000000ef80dc29): kobject_cleanup, parent  
000000009c061a32
kobject: 'ip6gre0' (00000000ef80dc29): calling ktype release
kobject: 'ip6gre0': free name
kobject: 'ip6gre0' (00000000acb4e121): kobject_cleanup, parent  
000000009c061a32
kobject: 'ip6gre0' (00000000acb4e121): calling ktype release
kobject: 'ip6gre0': free name
kobject: 'ip6gre0' (0000000094fbf7bb): kobject_cleanup, parent  
000000009c061a32
kobject: 'ip6gre0' (0000000094fbf7bb): calling ktype release
kobject: 'ip6gre0': free name
kobject: 'ip6gre0' (0000000060028093): kobject_cleanup, parent  
000000009c061a32
kobject: 'ip6gre0' (0000000060028093): calling ktype release
kobject: 'ip6gre0': free name
kobject: 'ip6gre0' (00000000e217374d): kobject_cleanup, parent  
000000009c061a32
kobject: 'ip6gre0' (00000000e217374d): calling ktype release
kobject: 'ip6gre0': free name
kobject: 'ip6gre0' (00000000597e3c0a): kobject_cleanup, parent  
000000009c061a32
kobject: 'ip6gre0' (00000000597e3c0a): calling ktype release
kobject: 'ip6gre0': free name
kobject: 'ip6gre0' (00000000995a4c19): kobject_cleanup, parent  
000000009c061a32
kobject: 'ip6gre0' (00000000995a4c19): calling ktype release
kobject: 'ip6gre0': free name
kobject: 'rx-0' (00000000a530319b): kobject_cleanup, parent 0000000044c197cb
kobject: 'rx-0' (00000000a530319b): auto cleanup 'remove' event
kobject: 'rx-0' (00000000a530319b): kobject_uevent_env
kobject: 'rx-0' (00000000a530319b): kobject_uevent_env: uevent_suppress  
caused the event to drop!
kobject: 'rx-0' (00000000a530319b): auto cleanup kobject_del
kobject: 'rx-0' (00000000a530319b): calling ktype release
kobject: 'rx-0': free name
kobject: 'tx-0' (0000000036817586): kobject_cleanup, parent 0000000044c197cb
kobject: 'tx-0' (0000000036817586): auto cleanup 'remove' event
kobject: 'tx-0' (0000000036817586): kobject_uevent_env
kobject: 'tx-0' (0000000036817586): kobject_uevent_env: uevent_suppress  
caused the event to drop!
kobject: 'tx-0' (0000000036817586): auto cleanup kobject_del
kobject: 'tx-0' (0000000036817586): calling ktype release
kobject: 'tx-0': free name
kobject: 'queues' (0000000044c197cb): kobject_cleanup, parent  
000000009c061a32
kobject: 'queues' (0000000044c197cb): calling ktype release
kobject: 'queues' (0000000044c197cb): kset_release
kobject: 'queues': free name
kobject: 'ip6tnl0' (000000004d7cdca9): kobject_uevent_env
kobject: 'ip6tnl0' (000000004d7cdca9): kobject_uevent_env: uevent_suppress  
caused the event to drop!
kobject: 'rx-0' (000000009ad0ffcd): kobject_cleanup, parent 000000006632a50a
kobject: 'rx-0' (000000009ad0ffcd): auto cleanup 'remove' event
kobject: 'rx-0' (000000009ad0ffcd): kobject_uevent_env
kobject: 'rx-0' (000000009ad0ffcd): kobject_uevent_env: uevent_suppress  
caused the event to drop!
kobject: 'rx-0' (000000009ad0ffcd): auto cleanup kobject_del
kobject: 'rx-0' (000000009ad0ffcd): calling ktype release
kobject: 'rx-0': free name
kobject: 'tx-0' (00000000cc8f7d89): kobject_cleanup, parent 000000006632a50a
kobject: 'tx-0' (00000000cc8f7d89): auto cleanup 'remove' event
kobject: 'tx-0' (00000000cc8f7d89): kobject_uevent_env
kobject: 'tx-0' (00000000cc8f7d89): kobject_uevent_env: uevent_suppress  
caused the event to drop!
kobject: 'tx-0' (00000000cc8f7d89): auto cleanup kobject_del
kobject: 'tx-0' (00000000cc8f7d89): calling ktype release
kobject: 'tx-0': free name
kobject: 'queues' (000000006632a50a): kobject_cleanup, parent  
000000009c061a32
kobject: 'queues' (000000006632a50a): calling ktype release
kobject: 'queues' (000000006632a50a): kset_release
kobject: 'queues': free name
kobject: 'ip6tnl0' (00000000af12a50a): kobject_uevent_env
kobject: 'ip6tnl0' (00000000af12a50a): kobject_uevent_env: uevent_suppress  
caused the event to drop!
kobject: 'rx-0' (000000000f3a002b): kobject_cleanup, parent 000000008e667009
kobject: 'rx-0' (000000000f3a002b): auto cleanup 'remove' event
kobject: 'rx-0' (000000000f3a002b): kobject_uevent_env
kobject: 'rx-0' (000000000f3a002b): kobject_uevent_env: uevent_suppress  
caused the event to drop!
kobject: 'rx-0' (000000000f3a002b): auto cleanup kobject_del
kobject: 'rx-0' (000000000f3a002b): calling ktype release
kobject: 'rx-0': free name
kobject: 'tx-0' (000000003dd814d2): kobject_cleanup, parent 000000008e667009
kobject: 'tx-0' (000000003dd814d2): auto cleanup 'remove' event
kobject: 'tx-0' (000000003dd814d2): kobject_uevent_env
kobject: 'tx-0' (000000003dd814d2): kobject_uevent_env: uevent_suppress  
caused the event to drop!
kobject: 'tx-0' (000000003dd814d2): auto cleanup kobject_del
kobject: 'tx-0' (000000003dd814d2): calling ktype release
kobject: 'tx-0': free name
kobject: 'queues' (000000008e667009): kobject_cleanup, parent  
000000009c061a32
kobject: 'queues' (000000008e667009): calling ktype release
kobject: 'queues' (000000008e667009): kset_release
kobject: 'queues': free name
kobject: 'ip6tnl0' (00000000ad24f481): kobject_uevent_env
kobject: 'ip6tnl0' (00000000ad24f481): kobject_uevent_env: uevent_suppress  
caused the event to drop!
kobject: 'rx-0' (00000000b57b4b94): kobject_cleanup, parent 00000000c8f88c97
kobject: 'rx-0' (00000000b57b4b94): auto cleanup 'remove' event
kobject: 'rx-0' (00000000b57b4b94): kobject_uevent_env
kobject: 'rx-0' (00000000b57b4b94): kobject_uevent_env: uevent_suppress  
caused the event to drop!
kobject: 'rx-0' (00000000b57b4b94): auto cleanup kobject_del
kobject: 'rx-0' (00000000b57b4b94): calling ktype release
kobject: 'rx-0': free name
kobject: 'tx-0' (00000000035a9b1c): kobject_cleanup, parent 00000000c8f88c97
kobject: 'tx-0' (00000000035a9b1c): auto cleanup 'remove' event
kobject: 'tx-0' (00000000035a9b1c): kobject_uevent_env
kobject: 'tx-0' (00000000035a9b1c): kobject_uevent_env: uevent_suppress  
caused the event to drop!
kobject: 'tx-0' (00000000035a9b1c): auto cleanup kobject_del
kobject: 'tx-0' (00000000035a9b1c): calling ktype release
kobject: 'tx-0': free name
kobject: 'queues' (00000000c8f88c97): kobject_cleanup, parent  
000000009c061a32
kobject: 'queues' (00000000c8f88c97): calling ktype release
kobject: 'queues' (00000000c8f88c97): kset_release
kobject: 'queues': free name
kobject: 'ip6tnl0' (00000000e4871037): kobject_uevent_env
kobject: 'ip6tnl0' (00000000e4871037): kobject_uevent_env: uevent_suppress  
caused the event to drop!
kobject: 'rx-0' (000000009e5eabee): kobject_cleanup, parent 000000000bef0c44
kobject: 'rx-0' (000000009e5eabee): auto cleanup 'remove' event
kobject: 'rx-0' (000000009e5eabee): kobject_uevent_env
kobject: 'rx-0' (000000009e5eabee): kobject_uevent_env: uevent_suppress  
caused the event to drop!
kobject: 'rx-0' (000000009e5eabee): auto cleanup kobject_del
kobject: 'rx-0' (000000009e5eabee): calling ktype release
kobject: 'rx-0': free name
kobject: 'tx-0' (00000000917837d7): kobject_cleanup, parent 000000000bef0c44
kobject: 'tx-0' (00000000917837d7): auto cleanup 'remove' event
kobject: 'tx-0' (00000000917837d7): kobject_uevent_env
kobject: 'tx-0' (00000000917837d7): kobject_uevent_env: uevent_suppress  
caused the event to drop!
kobject: 'tx-0' (00000000917837d7): auto cleanup kobject_del
kobject: 'tx-0' (00000000917837d7): calling ktype release
kobject: 'tx-0': free name
kobject: 'queues' (000000000bef0c44): kobject_cleanup, parent  
000000009c061a32
kobject: 'queues' (000000000bef0c44): calling ktype release
kobject: 'queues' (000000000bef0c44): kset_release
kobject: 'queues': free name
kobject: 'ip6tnl0' (00000000a48d6ad0): kobject_uevent_env
kobject: 'ip6tnl0' (00000000a48d6ad0): kobject_uevent_env: uevent_suppress  
caused the event to drop!
kobject: 'rx-0' (0000000099277526): kobject_cleanup, parent 0000000085f382c3
kobject: 'rx-0' (0000000099277526): auto cleanup 'remove' event
kobject: 'rx-0' (0000000099277526): kobject_uevent_env
kobject: 'rx-0' (0000000099277526): kobject_uevent_env: uevent_suppress  
caused the event to drop!
kobject: 'rx-0' (0000000099277526): auto cleanup kobject_del
kobject: 'rx-0' (0000000099277526): calling ktype release
kobject: 'rx-0': free name
kobject: 'tx-0' (00000000e28e65a5): kobject_cleanup, parent 0000000085f382c3
kobject: 'tx-0' (00000000e28e65a5): auto cleanup 'remove' event
kobject: 'tx-0' (00000000e28e65a5): kobject_uevent_env
kobject: 'tx-0' (00000000e28e65a5): kobject_uevent_env: uevent_suppress  
caused the event to drop!
kobject: 'tx-0' (00000000e28e65a5): auto cleanup kobject_del
kobject: 'tx-0' (00000000e28e65a5): calling ktype release
kobject: 'tx-0': free name
kobject: 'queues' (0000000085f382c3): kobject_cleanup, parent  
000000009c061a32
kobject: 'queues' (0000000085f382c3): calling ktype release
kobject: 'queues' (0000000085f382c3): kset_release
kobject: 'queues': free name
kobject: 'ip6tnl0' (000000002480b06a): kobject_uevent_env
kobject: 'ip6tnl0' (000000002480b06a): kobject_uevent_env: uevent_suppress  
caused the event to drop!
kobject: 'rx-0' (00000000ad1f374e): kobject_cleanup, parent 000000004552107a
kobject: 'rx-0' (00000000ad1f374e): auto cleanup 'remove' event
kobject: 'rx-0' (00000000ad1f374e): kobject_uevent_env
kobject: 'rx-0' (00000000ad1f374e): kobject_uevent_env: uevent_suppress  
caused the event to drop!
kobject: 'rx-0' (00000000ad1f374e): auto cleanup kobject_del
kobject: 'rx-0' (00000000ad1f374e): calling ktype release
kobject: 'rx-0': free name
kobject: 'tx-0' (00000000a52c4930): kobject_cleanup, parent 000000004552107a
kobject: 'tx-0' (00000000a52c4930): auto cleanup 'remove' event
kobject: 'tx-0' (00000000a52c4930): kobject_uevent_env
kobject: 'tx-0' (00000000a52c4930): kobject_uevent_env: uevent_suppress  
caused the event to drop!
kobject: 'tx-0' (00000000a52c4930): auto cleanup kobject_del
kobject: 'tx-0' (00000000a52c4930): calling ktype release
kobject: 'tx-0': free name
kobject: 'queues' (000000004552107a): kobject_cleanup, parent  
000000009c061a32
kobject: 'queues' (000000004552107a): calling ktype release
kobject: 'queues' (000000004552107a): kset_release
kobject: 'queues': free name
kobject: 'ip6tnl0' (00000000b5c75a98): kobject_uevent_env
kobject: 'ip6tnl0' (00000000b5c75a98): kobject_uevent_env: uevent_suppress  
caused the event to drop!
kobject: 'rx-0' (0000000069cf2cec): kobject_cleanup, parent 000000000effb6b7
kobject: 'rx-0' (0000000069cf2cec): auto cleanup 'remove' event
kobject: 'rx-0' (0000000069cf2cec): kobject_uevent_env
kobject: 'rx-0' (0000000069cf2cec): kobject_uevent_env: uevent_suppress  
caused the event to drop!
kobject: 'rx-0' (0000000069cf2cec): auto cleanup kobject_del
kobject: 'rx-0' (0000000069cf2cec): calling ktype release
kobject: 'rx-0': free name
kobject: 'tx-0' (00000000f6dd67a1): kobject_cleanup, parent 000000000effb6b7
kobject: 'tx-0' (00000000f6dd67a1): auto cleanup 'remove' event
kobject: 'tx-0' (00000000f6dd67a1): kobject_uevent_env
kobject: 'tx-0' (00000000f6dd67a1): kobject_uevent_env: uevent_suppress  
caused the event to drop!
kobject: 'tx-0' (00000000f6dd67a1): auto cleanup kobject_del
kobject: 'tx-0' (00000000f6dd67a1): calling ktype release
kobject: 'tx-0': free name
kobject: 'queues' (000000000effb6b7): kobject_cleanup, parent  
000000009c061a32
kobject: 'queues' (000000000effb6b7): calling ktype release
kobject: 'queues' (000000000effb6b7): kset_release
kobject: 'queues': free name
kobject: 'ip6tnl0' (0000000017bab338): kobject_uevent_env
kobject: 'ip6tnl0' (0000000017bab338): kobject_uevent_env: uevent_suppress  
caused the event to drop!
kobject: 'rx-0' (000000005bed9a62): kobject_cleanup, parent 000000002a90c11d
kobject: 'rx-0' (000000005bed9a62): auto cleanup 'remove' event
kobject: 'rx-0' (000000005bed9a62): kobject_uevent_env
kobject: 'rx-0' (000000005bed9a62): kobject_uevent_env: uevent_suppress  
caused the event to drop!
kobject: 'rx-0' (000000005bed9a62): auto cleanup kobject_del
kobject: 'rx-0' (000000005bed9a62): calling ktype release
kobject: 'rx-0': free name
kobject: 'tx-0' (00000000148a89bb): kobject_cleanup, parent 000000002a90c11d
kobject: 'tx-0' (00000000148a89bb): auto cleanup 'remove' event
kobject: 'tx-0' (00000000148a89bb): kobject_uevent_env
kobject: 'tx-0' (00000000148a89bb): kobject_uevent_env: uevent_suppress  
caused the event to drop!
kobject: 'tx-0' (00000000148a89bb): auto cleanup kobject_del
kobject: 'tx-0' (00000000148a89bb): calling ktype release
kobject: 'tx-0': free name
kobject: 'queues' (000000002a90c11d): kobject_cleanup, parent  
000000009c061a32
kobject: 'queues' (000000002a90c11d): calling ktype release
kobject: 'queues' (000000002a90c11d): kset_release
kobject: 'queues': free name
kobject: 'ip6tnl0' (000000007855542e): kobject_uevent_env
kobject: 'ip6tnl0' (000000007855542e): kobject_uevent_env: uevent_suppress  
caused the event to drop!
kobject: 'ip6tnl0' (000000004d7cdca9): kobject_cleanup, parent  
000000009c061a32
kobject: 'ip6tnl0' (000000004d7cdca9): calling ktype release
kobject: 'ip6tnl0': free name
kobject: 'ip6tnl0' (00000000af12a50a): kobject_cleanup, parent  
000000009c061a32
kobject: 'ip6tnl0' (00000000af12a50a): calling ktype release
kobject: 'ip6tnl0': free name
kobject: 'ip6tnl0' (00000000ad24f481): kobject_cleanup, parent  
000000009c061a32
kobject: 'ip6tnl0' (00000000ad24f481): calling ktype release
kobject: 'ip6tnl0': free name
kobject: 'ip6tnl0' (00000000e4871037): kobject_cleanup, parent  
000000009c061a32
kobject: 'ip6tnl0' (00000000e4871037): calling ktype release
kobject: 'ip6tnl0': free name
kobject: 'ip6tnl0' (00000000a48d6ad0): kobject_cleanup, parent  
000000009c061a32
kobject: 'ip6tnl0' (00000000a48d6ad0): calling ktype release
kobject: 'ip6tnl0': free name
kobject: 'ip6tnl0' (000000002480b06a): kobject_cleanup, parent  
000000009c061a32
kobject: 'ip6tnl0' (000000002480b06a): calling ktype release
kobject: 'ip6tnl0': free name
kobject: 'ip6tnl0' (00000000b5c75a98): kobject_cleanup, parent  
000000009c061a32
kobject: 'ip6tnl0' (00000000b5c75a98): calling ktype release
kobject: 'ip6tnl0': free name
kobject: 'ip6tnl0' (0000000017bab338): kobject_cleanup, parent  
000000009c061a32
kobject: 'ip6tnl0' (0000000017bab338): calling ktype release
kobject: 'ip6tnl0': free name
kobject: 'ip6tnl0' (000000007855542e): kobject_cleanup, parent  
000000009c061a32
kobject: 'ip6tnl0' (000000007855542e): calling ktype release
kobject: 'ip6tnl0': free name
kobject: 'rx-0' (00000000faff8a75): kobject_cleanup, parent 000000003555e997
kobject: 'rx-0' (00000000faff8a75): auto cleanup 'remove' event
kobject: 'rx-0' (00000000faff8a75): kobject_uevent_env
kobject: 'rx-0' (00000000faff8a75): kobject_uevent_env: uevent_suppress  
caused the event to drop!
kobject: 'rx-0' (00000000faff8a75): auto cleanup kobject_del
kobject: 'rx-0' (00000000faff8a75): calling ktype release
kobject: 'rx-0': free name
kobject: 'tx-0' (000000003377944b): kobject_cleanup, parent 000000003555e997
kobject: 'tx-0' (000000003377944b): auto cleanup 'remove' event
kobject: 'tx-0' (000000003377944b): kobject_uevent_env
kobject: 'tx-0' (000000003377944b): kobject_uevent_env: uevent_suppress  
caused the event to drop!
kobject: 'tx-0' (000000003377944b): auto cleanup kobject_del
kobject: 'tx-0' (000000003377944b): calling ktype release
kobject: 'tx-0': free name
kobject: 'queues' (000000003555e997): kobject_cleanup, parent  
000000009c061a32
kobject: 'queues' (000000003555e997): calling ktype release
kobject: 'queues' (000000003555e997): kset_release
kobject: 'queues': free name
kobject: 'sit0' (00000000ba6470e9): kobject_uevent_env
kobject: 'sit0' (00000000ba6470e9): kobject_uevent_env: uevent_suppress  
caused the event to drop!
kobject: 'rx-0' (000000003577adaa): kobject_cleanup, parent 00000000c5fbab92
kobject: 'rx-0' (000000003577adaa): auto cleanup 'remove' event
kobject: 'rx-0' (000000003577adaa): kobject_uevent_env
kobject: 'rx-0' (000000003577adaa): kobject_uevent_env: uevent_suppress  
caused the event to drop!
kobject: 'rx-0' (000000003577adaa): auto cleanup kobject_del
kobject: 'rx-0' (000000003577adaa): calling ktype release
kobject: 'rx-0': free name
kobject: 'tx-0' (00000000f519527f): kobject_cleanup, parent 00000000c5fbab92
kobject: 'tx-0' (00000000f519527f): auto cleanup 'remove' event
kobject: 'tx-0' (00000000f519527f): kobject_uevent_env
kobject: 'tx-0' (00000000f519527f): kobject_uevent_env: uevent_suppress  
caused the event to drop!
kobject: 'tx-0' (00000000f519527f): auto cleanup kobject_del
kobject: 'tx-0' (00000000f519527f): calling ktype release
kobject: 'tx-0': free name
kobject: 'queues' (00000000c5fbab92): kobject_cleanup, parent  
000000009c061a32
kobject: 'queues' (00000000c5fbab92): calling ktype release
kobject: 'queues' (00000000c5fbab92): kset_release
kobject: 'queues': free name
kobject: 'sit0' (000000009f74c826): kobject_uevent_env
kobject: 'sit0' (000000009f74c826): kobject_uevent_env: uevent_suppress  
caused the event to drop!
kobject: 'rx-0' (00000000137dfc9e): kobject_cleanup, parent 00000000e8ee822b
kobject: 'rx-0' (00000000137dfc9e): auto cleanup 'remove' event
kobject: 'rx-0' (00000000137dfc9e): kobject_uevent_env
kobject: 'rx-0' (00000000137dfc9e): kobject_uevent_env: uevent_suppress  
caused the event to drop!
kobject: 'rx-0' (00000000137dfc9e): auto cleanup kobject_del
kobject: 'rx-0' (00000000137dfc9e): calling ktype release
kobject: 'rx-0': free name
kobject: 'tx-0' (00000000cf51e058): kobject_cleanup, parent 00000000e8ee822b
kobject: 'tx-0' (00000000cf51e058): auto cleanup 'remove' event
kobject: 'tx-0' (00000000cf51e058): kobject_uevent_env
kobject: 'tx-0' (00000000cf51e058): kobject_uevent_env: uevent_suppress  
caused the event to drop!
kobject: 'tx-0' (00000000cf51e058): auto cleanup kobject_del
kobject: 'tx-0' (00000000cf51e058): calling ktype release
kobject: 'tx-0': free name
kobject: 'queues' (00000000e8ee822b): kobject_cleanup, parent  
000000009c061a32
kobject: 'queues' (00000000e8ee822b): calling ktype release
kobject: 'queues' (00000000e8ee822b): kset_release
kobject: 'queues': free name
kobject: 'sit0' (0000000065e536c8): kobject_uevent_env
kobject: 'sit0' (0000000065e536c8): kobject_uevent_env: uevent_suppress  
caused the event to drop!
kobject: 'rx-0' (00000000265aa8c8): kobject_cleanup, parent 000000001c613bad
kobject: 'rx-0' (00000000265aa8c8): auto cleanup 'remove' event
kobject: 'rx-0' (00000000265aa8c8): kobject_uevent_env
kobject: 'rx-0' (00000000265aa8c8): kobject_uevent_env: uevent_suppress  
caused the event to drop!
kobject: 'rx-0' (00000000265aa8c8): auto cleanup kobject_del
kobject: 'rx-0' (00000000265aa8c8): calling ktype release
kobject: 'rx-0': free name
kobject: 'tx-0' (00000000669b1a88): kobject_cleanup, parent 000000001c613bad
kobject: 'tx-0' (00000000669b1a88): auto cleanup 'remove' event
kobject: 'tx-0' (00000000669b1a88): kobject_uevent_env
kobject: 'tx-0' (00000000669b1a88): kobject_uevent_env: uevent_suppress  
caused the event to drop!
kobject: 'tx-0' (00000000669b1a88): auto cleanup kobject_del
kobject: 'tx-0' (00000000669b1a88): calling ktype release
kobject: 'tx-0': free name
kobject: 'queues' (000000001c613bad): kobject_cleanup, parent  
000000009c061a32
kobject: 'queues' (000000001c613bad): calling ktype release
kobject: 'queues' (000000001c613bad): kset_release
kobject: 'queues': free name
kobject: 'sit0' (00000000b0b0bf77): kobject_uevent_env
kobject: 'sit0' (00000000b0b0bf77): kobject_uevent_env: uevent_suppress  
caused the event to drop!
kobject: 'rx-0' (00000000c08b3e35): kobject_cleanup, parent 000000004d964cab
kobject: 'rx-0' (00000000c08b3e35): auto cleanup 'remove' event
kobject: 'rx-0' (00000000c08b3e35): kobject_uevent_env
kobject: 'rx-0' (00000000c08b3e35): kobject_uevent_env: uevent_suppress  
caused the event to drop!
kobject: 'rx-0' (00000000c08b3e35): auto cleanup kobject_del
kobject: 'rx-0' (00000000c08b3e35): calling ktype release
kobject: 'rx-0': free name
kobject: 'tx-0' (000000006bb20443): kobject_cleanup, parent 000000004d964cab
kobject: 'tx-0' (000000006bb20443): auto cleanup 'remove' event
kobject: 'tx-0' (000000006bb20443): kobject_uevent_env
kobject: 'tx-0' (000000006bb20443): kobject_uevent_env: uevent_suppress  
caused the event to drop!
kobject: 'tx-0' (000000006bb20443): auto cleanup kobject_del
kobject: 'tx-0' (000000006bb20443): calling ktype release
kobject: 'tx-0': free name
kobject: 'queues' (000000004d964cab): kobject_cleanup, parent  
000000009c061a32
kobject: 'queues' (000000004d964cab): calling ktype release
kobject: 'queues' (000000004d964cab): kset_release
kobject: 'queues': free name
kobject: 'sit0' (00000000e3a2a337): kobject_uevent_env
kobject: 'sit0' (00000000e3a2a337): kobject_uevent_env: uevent_suppress  
caused the event to drop!
kobject: 'rx-0' (00000000fcf6c2df): kobject_cleanup, parent 000000001f378765
kobject: 'rx-0' (00000000fcf6c2df): auto cleanup 'remove' event
kobject: 'rx-0' (00000000fcf6c2df): kobject_uevent_env
kobject: 'rx-0' (00000000fcf6c2df): kobject_uevent_env: uevent_suppress  
caused the event to drop!
kobject: 'rx-0' (00000000fcf6c2df): auto cleanup kobject_del
kobject: 'rx-0' (00000000fcf6c2df): calling ktype release
kobject: 'rx-0': free name
kobject: 'tx-0' (00000000306e361a): kobject_cleanup, parent 000000001f378765
kobject: 'tx-0' (00000000306e361a): auto cleanup 'remove' event
kobject: 'tx-0' (00000000306e361a): kobject_uevent_env
kobject: 'tx-0' (00000000306e361a): kobject_uevent_env: uevent_suppress  
caused the event to drop!
kobject: 'tx-0' (00000000306e361a): auto cleanup kobject_del
kobject: 'tx-0' (00000000306e361a): calling ktype release
kobject: 'tx-0': free name
kobject: 'queues' (000000001f378765): kobject_cleanup, parent  
000000009c061a32
kobject: 'queues' (000000001f378765): calling ktype release
kobject: 'queues' (000000001f378765): kset_release
kobject: 'queues': free name
kobject: 'sit0' (0000000058d12d0d): kobject_uevent_env
kobject: 'sit0' (0000000058d12d0d): kobject_uevent_env: uevent_suppress  
caused the event to drop!
kobject: 'rx-0' (00000000078d95bd): kobject_cleanup, parent 000000003596feb5
kobject: 'rx-0' (00000000078d95bd): auto cleanup 'remove' event
kobject: 'rx-0' (00000000078d95bd): kobject_uevent_env
kobject: 'rx-0' (00000000078d95bd): kobject_uevent_env: uevent_suppress  
caused the event to drop!
kobject: 'rx-0' (00000000078d95bd): auto cleanup kobject_del
kobject: 'rx-0' (00000000078d95bd): calling ktype release
kobject: 'rx-0': free name
kobject: 'tx-0' (0000000037709752): kobject_cleanup, parent 000000003596feb5
kobject: 'tx-0' (0000000037709752): auto cleanup 'remove' event
kobject: 'tx-0' (0000000037709752): kobject_uevent_env
kobject: 'tx-0' (0000000037709752): kobject_uevent_env: uevent_suppress  
caused the event to drop!
kobject: 'tx-0' (0000000037709752): auto cleanup kobject_del
kobject: 'tx-0' (0000000037709752): calling ktype release
kobject: 'tx-0': free name
kobject: 'queues' (000000003596feb5): kobject_cleanup, parent  
000000009c061a32
kobject: 'queues' (000000003596feb5): calling ktype release
kobject: 'queues' (000000003596feb5): kset_release
kobject: 'queues': free name
kobject: 'sit0' (000000008276eda5): kobject_uevent_env
kobject: 'sit0' (000000008276eda5): kobject_uevent_env: uevent_suppress  
caused the event to drop!
kobject: 'rx-0' (000000004d3b044b): kobject_cleanup, parent 000000006b53a9a0
kobject: 'rx-0' (000000004d3b044b): auto cleanup 'remove' event
kobject: 'rx-0' (000000004d3b044b): kobject_uevent_env
kobject: 'rx-0' (000000004d3b044b): kobject_uevent_env: uevent_suppress  
caused the event to drop!
kobject: 'rx-0' (000000004d3b044b): auto cleanup kobject_del
kobject: 'rx-0' (000000004d3b044b): calling ktype release
kobject: 'rx-0': free name
kobject: 'tx-0' (00000000273da9ae): kobject_cleanup, parent 000000006b53a9a0
kobject: 'tx-0' (00000000273da9ae): auto cleanup 'remove' event
kobject: 'tx-0' (00000000273da9ae): kobject_uevent_env
kobject: 'tx-0' (00000000273da9ae): kobject_uevent_env: uevent_suppress  
caused the event to drop!
kobject: 'tx-0' (00000000273da9ae): auto cleanup kobject_del
kobject: 'tx-0' (00000000273da9ae): calling ktype release
kobject: 'tx-0': free name
kobject: 'queues' (000000006b53a9a0): kobject_cleanup, parent  
000000009c061a32
kobject: 'queues' (000000006b53a9a0): calling ktype release
kobject: 'queues' (000000006b53a9a0): kset_release
kobject: 'queues': free name
kobject: 'sit0' (000000005ed040cc): kobject_uevent_env
kobject: 'sit0' (000000005ed040cc): kobject_uevent_env: uevent_suppress  
caused the event to drop!
kobject: 'rx-0' (00000000f150476e): kobject_cleanup, parent 00000000a0cff6dd
kobject: 'rx-0' (00000000f150476e): auto cleanup 'remove' event
kobject: 'rx-0' (00000000f150476e): kobject_uevent_env
kobject: 'rx-0' (00000000f150476e): kobject_uevent_env: uevent_suppress  
caused the event to drop!
kobject: 'rx-0' (00000000f150476e): auto cleanup kobject_del
kobject: 'rx-0' (00000000f150476e): calling ktype release
kobject: 'rx-0': free name
kobject: 'tx-0' (00000000c81ff56b): kobject_cleanup, parent 00000000a0cff6dd
kobject: 'tx-0' (00000000c81ff56b): auto cleanup 'remove' event
kobject: 'tx-0' (00000000c81ff56b): kobject_uevent_env
kobject: 'tx-0' (00000000c81ff56b): kobject_uevent_env: uevent_suppress  
caused the event to drop!
kobject: 'tx-0' (00000000c81ff56b): auto cleanup kobject_del
kobject: 'tx-0' (00000000c81ff56b): calling ktype release
kobject: 'tx-0': free name
kobject: 'queues' (00000000a0cff6dd): kobject_cleanup, parent  
000000009c061a32
kobject: 'queues' (00000000a0cff6dd): calling ktype release
kobject: 'queues' (00000000a0cff6dd): kset_release
kobject: 'queues': free name
kobject: 'sit0' (000000009ebda3df): kobject_uevent_env
kobject: 'sit0' (000000009ebda3df): kobject_uevent_env: uevent_suppress  
caused the event to drop!
kobject: 'sit0' (00000000ba6470e9): kobject_cleanup, parent 000000009c061a32
kobject: 'sit0' (00000000ba6470e9): calling ktype release
kobject: 'sit0': free name
kobject: 'sit0' (000000009f74c826): kobject_cleanup, parent 000000009c061a32
kobject: 'sit0' (000000009f74c826): calling ktype release
kobject: 'sit0': free name
kobject: 'sit0' (0000000065e536c8): kobject_cleanup, parent 000000009c061a32
kobject: 'sit0' (0000000065e536c8): calling ktype release
kobject: 'sit0': free name
kobject: 'sit0' (00000000b0b0bf77): kobject_cleanup, parent 000000009c061a32
kobject: 'sit0' (00000000b0b0bf77): calling ktype release
kobject: 'sit0': free name
kobject: 'sit0' (00000000e3a2a337): kobject_cleanup, parent 000000009c061a32
kobject: 'sit0' (00000000e3a2a337): calling ktype release
kobject: 'sit0': free name
kobject: 'sit0' (0000000058d12d0d): kobject_cleanup, parent 000000009c061a32
kobject: 'sit0' (0000000058d12d0d): calling ktype release
kobject: 'sit0': free name
kobject: 'sit0' (000000008276eda5): kobject_cleanup, parent 000000009c061a32
kobject: 'sit0' (000000008276eda5): calling ktype release
kobject: 'sit0': free name
kobject: 'sit0' (000000005ed040cc): kobject_cleanup, parent 000000009c061a32
kobject: 'sit0' (000000005ed040cc): calling ktype release
kobject: 'sit0': free name
kobject: 'sit0' (000000009ebda3df): kobject_cleanup, parent 000000009c061a32
kobject: 'sit0' (000000009ebda3df): calling ktype release
kobject: 'sit0': free name
kobject: 'rx-0' (00000000011781b4): kobject_cleanup, parent 0000000037662b61
kobject: 'rx-0' (00000000011781b4): auto cleanup 'remove' event
kobject: 'rx-0' (00000000011781b4): kobject_uevent_env
kobject: 'rx-0' (00000000011781b4): kobject_uevent_env: uevent_suppress  
caused the event to drop!
kobject: 'rx-0' (00000000011781b4): auto cleanup kobject_del
kobject: 'rx-0' (00000000011781b4): calling ktype release
kobject: 'rx-0': free name
kobject: 'tx-0' (000000002bafd647): kobject_cleanup, parent 0000000037662b61
kobject: 'tx-0' (000000002bafd647): auto cleanup 'remove' event
kobject: 'tx-0' (000000002bafd647): kobject_uevent_env
kobject: 'tx-0' (000000002bafd647): kobject_uevent_env: uevent_suppress  
caused the event to drop!
kobject: 'tx-0' (000000002bafd647): auto cleanup kobject_del
kobject: 'tx-0' (000000002bafd647): calling ktype release
kobject: 'tx-0': free name
kobject: 'queues' (0000000037662b61): kobject_cleanup, parent  
000000009c061a32
kobject: 'queues' (0000000037662b61): calling ktype release
kobject: 'queues' (0000000037662b61): kset_release
kobject: 'queues': free name
kobject: 'ip6_vti0' (000000000e5b1a5c): kobject_uevent_env
kobject: 'ip6_vti0' (000000000e5b1a5c): kobject_uevent_env: uevent_suppress  
caused the event to drop!
kobject: 'rx-0' (0000000068311350): kobject_cleanup, parent 00000000facffc2f
kobject: 'rx-0' (0000000068311350): auto cleanup 'remove' event
kobject: 'rx-0' (0000000068311350): kobject_uevent_env
kobject: 'rx-0' (0000000068311350): kobject_uevent_env: uevent_suppress  
caused the event to drop!
kobject: 'rx-0' (0000000068311350): auto cleanup kobject_del
kobject: 'rx-0' (0000000068311350): calling ktype release
kobject: 'rx-0': free name
kobject: 'tx-0' (00000000d6e81326): kobject_cleanup, parent 00000000facffc2f
kobject: 'tx-0' (00000000d6e81326): auto cleanup 'remove' event
kobject: 'tx-0' (00000000d6e81326): kobject_uevent_env
kobject: 'tx-0' (00000000d6e81326): kobject_uevent_env: uevent_suppress  
caused the event to drop!
kobject: 'tx-0' (00000000d6e81326): auto cleanup kobject_del
kobject: 'tx-0' (00000000d6e81326): calling ktype release
kobject: 'tx-0': free name
kobject: 'queues' (00000000facffc2f): kobject_cleanup, parent  
000000009c061a32
kobject: 'queues' (00000000facffc2f): calling ktype release
kobject: 'queues' (00000000facffc2f): kset_release
kobject: 'queues': free name
kobject: 'ip6_vti0' (0000000084bcfa3e): kobject_uevent_env
kobject: 'ip6_vti0' (0000000084bcfa3e): kobject_uevent_env: uevent_suppress  
caused the event to drop!
kobject: 'rx-0' (00000000ce1fbf9a): kobject_cleanup, parent 00000000faad76b9
kobject: 'rx-0' (00000000ce1fbf9a): auto cleanup 'remove' event
kobject: 'rx-0' (00000000ce1fbf9a): kobject_uevent_env
kobject: 'rx-0' (00000000ce1fbf9a): kobject_uevent_env: uevent_suppress  
caused the event to drop!
kobject: 'rx-0' (00000000ce1fbf9a): auto cleanup kobject_del
kobject: 'rx-0' (00000000ce1fbf9a): calling ktype release
kobject: 'rx-0': free name
kobject: 'tx-0' (0000000054a9318d): kobject_cleanup, parent 00000000faad76b9
kobject: 'tx-0' (0000000054a9318d): auto cleanup 'remove' event
kobject: 'tx-0' (0000000054a9318d): kobject_uevent_env
kobject: 'tx-0' (0000000054a9318d): kobject_uevent_env: uevent_suppress  
caused the event to drop!
kobject: 'tx-0' (0000000054a9318d): auto cleanup kobject_del
kobject: 'tx-0' (0000000054a9318d): calling ktype release
kobject: 'tx-0': free name
kobject: 'queues' (00000000faad76b9): kobject_cleanup, parent  
000000009c061a32
kobject: 'queues' (00000000faad76b9): calling ktype release
kobject: 'queues' (00000000faad76b9): kset_release
kobject: 'queues': free name
kobject: 'ip6_vti0' (00000000a17dcb7a): kobject_uevent_env
kobject: 'ip6_vti0' (00000000a17dcb7a): kobject_uevent_env: uevent_suppress  
caused the event to drop!
kobject: 'rx-0' (00000000e1ec0489): kobject_cleanup, parent 0000000032133323
kobject: 'rx-0' (00000000e1ec0489): auto cleanup 'remove' event
kobject: 'rx-0' (00000000e1ec0489): kobject_uevent_env
kobject: 'rx-0' (00000000e1ec0489): kobject_uevent_env: uevent_suppress  
caused the event to drop!
kobject: 'rx-0' (00000000e1ec0489): auto cleanup kobject_del
kobject: 'rx-0' (00000000e1ec0489): calling ktype release
kobject: 'rx-0': free name
kobject: 'tx-0' (00000000c69707b0): kobject_cleanup, parent 0000000032133323
kobject: 'tx-0' (00000000c69707b0): auto cleanup 'remove' event
kobject: 'tx-0' (00000000c69707b0): kobject_uevent_env
kobject: 'tx-0' (00000000c69707b0): kobject_uevent_env: uevent_suppress  
caused the event to drop!
kobject: 'tx-0' (00000000c69707b0): auto cleanup kobject_del
kobject: 'tx-0' (00000000c69707b0): calling ktype release
kobject: 'tx-0': free name
kobject: 'queues' (0000000032133323): kobject_cleanup, parent  
000000009c061a32
kobject: 'queues' (0000000032133323): calling ktype release
kobject: 'queues' (0000000032133323): kset_release
kobject: 'queues': free name
kobject: 'ip6_vti0' (00000000f1a1ebea): kobject_uevent_env
kobject: 'ip6_vti0' (00000000f1a1ebea): kobject_uevent_env: uevent_suppress  
caused the event to drop!
kobject: 'rx-0' (00000000310059d9): kobject_cleanup, parent 000000002f7c701e
kobject: 'rx-0' (00000000310059d9): auto cleanup 'remove' event
kobject: 'rx-0' (00000000310059d9): kobject_uevent_env
kobject: 'rx-0' (00000000310059d9): kobject_uevent_env: uevent_suppress  
caused the event to drop!
kobject: 'rx-0' (00000000310059d9): auto cleanup kobject_del
kobject: 'rx-0' (00000000310059d9): calling ktype release
kobject: 'rx-0': free name
kobject: 'tx-0' (00000000463fbeb0): kobject_cleanup, parent 000000002f7c701e
kobject: 'tx-0' (00000000463fbeb0): auto cleanup 'remove' event
kobject: 'tx-0' (00000000463fbeb0): kobject_uevent_env
kobject: 'tx-0' (00000000463fbeb0): kobject_uevent_env: uevent_suppress  
caused the event to drop!
kobject: 'tx-0' (00000000463fbeb0): auto cleanup kobject_del
kobject: 'tx-0' (00000000463fbeb0): calling ktype release
kobject: 'tx-0': free name
kobject: 'queues' (000000002f7c701e): kobject_cleanup, parent  
000000009c061a32
kobject: 'queues' (000000002f7c701e): calling ktype release
kobject: 'queues' (000000002f7c701e): kset_release
kobject: 'queues': free name
kobject: 'ip6_vti0' (00000000e99a1c16): kobject_uevent_env
kobject: 'ip6_vti0' (00000000e99a1c16): kobject_uevent_env: uevent_suppress  
caused the event to drop!
kobject: 'rx-0' (00000000fc3878f1): kobject_cleanup, parent 0000000039005ce6
kobject: 'rx-0' (00000000fc3878f1): auto cleanup 'remove' event
kobject: 'rx-0' (00000000fc3878f1): kobject_uevent_env
kobject: 'rx-0' (00000000fc3878f1): kobject_uevent_env: uevent_suppress  
caused the event to drop!
kobject: 'rx-0' (00000000fc3878f1): auto cleanup kobject_del
kobject: 'rx-0' (00000000fc3878f1): calling ktype release
kobject: 'rx-0': free name
kobject: 'tx-0' (000000003da8a217): kobject_cleanup, parent 0000000039005ce6
kobject: 'tx-0' (000000003da8a217): auto cleanup 'remove' event
kobject: 'tx-0' (000000003da8a217): kobject_uevent_env
kobject: 'tx-0' (000000003da8a217): kobject_uevent_env: uevent_suppress  
caused the event to drop!
kobject: 'tx-0' (000000003da8a217): auto cleanup kobject_del
kobject: 'tx-0' (000000003da8a217): calling ktype release
kobject: 'tx-0': free name
kobject: 'queues' (0000000039005ce6): kobject_cleanup, parent  
000000009c061a32
kobject: 'queues' (0000000039005ce6): calling ktype release
kobject: 'queues' (0000000039005ce6): kset_release
kobject: 'queues': free name
kobject: 'ip6_vti0' (000000003f213163): kobject_uevent_env
kobject: 'ip6_vti0' (000000003f213163): kobject_uevent_env: uevent_suppress  
caused the event to drop!
kobject: 'rx-0' (0000000066dc1b5f): kobject_cleanup, parent 00000000e169d802
kobject: 'rx-0' (0000000066dc1b5f): auto cleanup 'remove' event
kobject: 'rx-0' (0000000066dc1b5f): kobject_uevent_env
kobject: 'rx-0' (0000000066dc1b5f): kobject_uevent_env: uevent_suppress  
caused the event to drop!
kobject: 'rx-0' (0000000066dc1b5f): auto cleanup kobject_del
kobject: 'rx-0' (0000000066dc1b5f): calling ktype release
kobject: 'rx-0': free name
kobject: 'tx-0' (00000000b99448c7): kobject_cleanup, parent 00000000e169d802
kobject: 'tx-0' (00000000b99448c7): auto cleanup 'remove' event
kobject: 'tx-0' (00000000b99448c7): kobject_uevent_env
kobject: 'tx-0' (00000000b99448c7): kobject_uevent_env: uevent_suppress  
caused the event to drop!
kobject: 'tx-0' (00000000b99448c7): auto cleanup kobject_del
kobject: 'tx-0' (00000000b99448c7): calling ktype release
kobject: 'tx-0': free name
kobject: 'queues' (00000000e169d802): kobject_cleanup, parent  
000000009c061a32
kobject: 'queues' (00000000e169d802): calling ktype release
kobject: 'queues' (00000000e169d802): kset_release
kobject: 'queues': free name
kobject: 'ip6_vti0' (000000003422603c): kobject_uevent_env
kobject: 'ip6_vti0' (000000003422603c): kobject_uevent_env: uevent_suppress  
caused the event to drop!
kobject: 'rx-0' (00000000b6464399): kobject_cleanup, parent 00000000785ed365
kobject: 'rx-0' (00000000b6464399): auto cleanup 'remove' event
kobject: 'rx-0' (00000000b6464399): kobject_uevent_env
kobject: 'rx-0' (00000000b6464399): kobject_uevent_env: uevent_suppress  
caused the event to drop!
kobject: 'rx-0' (00000000b6464399): auto cleanup kobject_del
kobject: 'rx-0' (00000000b6464399): calling ktype release
kobject: 'rx-0': free name
kobject: 'tx-0' (00000000c2beb7d2): kobject_cleanup, parent 00000000785ed365
kobject: 'tx-0' (00000000c2beb7d2): auto cleanup 'remove' event
kobject: 'tx-0' (00000000c2beb7d2): kobject_uevent_env
kobject: 'tx-0' (00000000c2beb7d2): kobject_uevent_env: uevent_suppress  
caused the event to drop!
kobject: 'tx-0' (00000000c2beb7d2): auto cleanup kobject_del
kobject: 'tx-0' (00000000c2beb7d2): calling ktype release
kobject: 'tx-0': free name
kobject: 'queues' (00000000785ed365): kobject_cleanup, parent  
000000009c061a32
kobject: 'queues' (00000000785ed365): calling ktype release
kobject: 'queues' (00000000785ed365): kset_release
kobject: 'queues': free name
kobject: 'ip6_vti0' (0000000031ab464d): kobject_uevent_env
kobject: 'ip6_vti0' (0000000031ab464d): kobject_uevent_env: uevent_suppress  
caused the event to drop!
kobject: 'rx-0' (00000000a7d5a6f7): kobject_cleanup, parent 00000000ed628333
kobject: 'rx-0' (00000000a7d5a6f7): auto cleanup 'remove' event
kobject: 'rx-0' (00000000a7d5a6f7): kobject_uevent_env
kobject: 'rx-0' (00000000a7d5a6f7): kobject_uevent_env: uevent_suppress  
caused the event to drop!
kobject: 'rx-0' (00000000a7d5a6f7): auto cleanup kobject_del
kobject: 'rx-0' (00000000a7d5a6f7): calling ktype release
kobject: 'rx-0': free name
kobject: 'tx-0' (00000000564c497f): kobject_cleanup, parent 00000000ed628333
kobject: 'tx-0' (00000000564c497f): auto cleanup 'remove' event
kobject: 'tx-0' (00000000564c497f): kobject_uevent_env
kobject: 'tx-0' (00000000564c497f): kobject_uevent_env: uevent_suppress  
caused the event to drop!
kobject: 'tx-0' (00000000564c497f): auto cleanup kobject_del
kobject: 'tx-0' (00000000564c497f): calling ktype release
kobject: 'tx-0': free name
kobject: 'queues' (00000000ed628333): kobject_cleanup, parent  
000000009c061a32
kobject: 'queues' (00000000ed628333): calling ktype release
kobject: 'queues' (00000000ed628333): kset_release
kobject: 'queues': free name
kobject: 'ip6_vti0' (00000000fb053a2a): kobject_uevent_env
kobject: 'ip6_vti0' (00000000fb053a2a): kobject_uevent_env: uevent_suppress  
caused the event to drop!
kobject: 'ip6_vti0' (000000000e5b1a5c): kobject_cleanup, parent  
000000009c061a32
kobject: 'ip6_vti0' (000000000e5b1a5c): calling ktype release
kobject: 'ip6_vti0': free name
kobject: 'ip6_vti0' (0000000084bcfa3e): kobject_cleanup, parent  
000000009c061a32
kobject: 'ip6_vti0' (0000000084bcfa3e): calling ktype release
kobject: 'ip6_vti0': free name
kobject: 'ip6_vti0' (00000000a17dcb7a): kobject_cleanup, parent  
000000009c061a32
kobject: 'ip6_vti0' (00000000a17dcb7a): calling ktype release
kobject: 'ip6_vti0': free name
kobject: 'ip6_vti0' (00000000f1a1ebea): kobject_cleanup, parent  
000000009c061a32
kobject: 'ip6_vti0' (00000000f1a1ebea): calling ktype release
kobject: 'ip6_vti0': free name
kobject: 'ip6_vti0' (00000000e99a1c16): kobject_cleanup, parent  
000000009c061a32
kobject: 'ip6_vti0' (00000000e99a1c16): calling ktype release
kobject: 'ip6_vti0': free name
kobject: 'ip6_vti0' (000000003f213163): kobject_cleanup, parent  
000000009c061a32
kobject: 'ip6_vti0' (000000003f213163): calling ktype release
kobject: 'ip6_vti0': free name
kobject: 'ip6_vti0' (000000003422603c): kobject_cleanup, parent  
000000009c061a32
kobject: 'ip6_vti0' (000000003422603c): calling ktype release
kobject: 'ip6_vti0': free name
kobject: 'ip6_vti0' (0000000031ab464d): kobject_cleanup, parent  
000000009c061a32
kobject: 'ip6_vti0' (0000000031ab464d): calling ktype release
kobject: 'ip6_vti0': free name
kobject: 'ip6_vti0' (00000000fb053a2a): kobject_cleanup, parent  
000000009c061a32
kobject: 'ip6_vti0' (00000000fb053a2a): calling ktype release
kobject: 'ip6_vti0': free name
kobject: 'rx-0' (00000000c827514b): kobject_cleanup, parent 000000004e70d3ea
kobject: 'rx-0' (00000000c827514b): auto cleanup 'remove' event
kobject: 'rx-0' (00000000c827514b): kobject_uevent_env
kobject: 'rx-0' (00000000c827514b): kobject_uevent_env: uevent_suppress  
caused the event to drop!
kobject: 'rx-0' (00000000c827514b): auto cleanup kobject_del
kobject: 'rx-0' (00000000c827514b): calling ktype release
kobject: 'rx-0': free name
kobject: 'tx-0' (00000000e9330ec4): kobject_cleanup, parent 000000004e70d3ea
kobject: 'tx-0' (00000000e9330ec4): auto cleanup 'remove' event
kobject: 'tx-0' (00000000e9330ec4): kobject_uevent_env
kobject: 'tx-0' (00000000e9330ec4): kobject_uevent_env: uevent_suppress  
caused the event to drop!
kobject: 'tx-0' (00000000e9330ec4): auto cleanup kobject_del
kobject: 'tx-0' (00000000e9330ec4): calling ktype release
kobject: 'tx-0': free name
kobject: 'queues' (000000004e70d3ea): kobject_cleanup, parent  
000000009c061a32
kobject: 'queues' (000000004e70d3ea): calling ktype release
kobject: 'queues' (000000004e70d3ea): kset_release
kobject: 'queues': free name
kobject: 'ip_vti0' (000000004ee7ad23): kobject_uevent_env
kobject: 'ip_vti0' (000000004ee7ad23): kobject_uevent_env: uevent_suppress  
caused the event to drop!
kobject: 'rx-0' (000000004dda38d8): kobject_cleanup, parent 00000000025cb3fe
kobject: 'rx-0' (000000004dda38d8): auto cleanup 'remove' event
kobject: 'rx-0' (000000004dda38d8): kobject_uevent_env
kobject: 'rx-0' (000000004dda38d8): kobject_uevent_env: uevent_suppress  
caused the event to drop!
kobject: 'rx-0' (000000004dda38d8): auto cleanup kobject_del
kobject: 'rx-0' (000000004dda38d8): calling ktype release
kobject: 'rx-0': free name
kobject: 'tx-0' (0000000097fba38d): kobject_cleanup, parent 00000000025cb3fe
kobject: 'tx-0' (0000000097fba38d): auto cleanup 'remove' event
kobject: 'tx-0' (0000000097fba38d): kobject_uevent_env
kobject: 'tx-0' (0000000097fba38d): kobject_uevent_env: uevent_suppress  
caused the event to drop!
kobject: 'tx-0' (0000000097fba38d): auto cleanup kobject_del
kobject: 'tx-0' (0000000097fba38d): calling ktype release
kobject: 'tx-0': free name
kobject: 'queues' (00000000025cb3fe): kobject_cleanup, parent  
000000009c061a32


---
This bug is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzkaller@googlegroups.com.

syzbot will keep track of this bug report. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

^ permalink raw reply

* [PATCH net-next] netdevsim: Fix build error without CONFIG_INET
From: YueHaibing @ 2019-08-19 12:08 UTC (permalink / raw)
  To: davem, idosch, jiri, mcroce; +Cc: linux-kernel, netdev, YueHaibing

If CONFIG_INET is not set, building fails:

drivers/net/netdevsim/dev.o: In function `nsim_dev_trap_report_work':
dev.c:(.text+0x67b): undefined reference to `ip_send_check'

Add CONFIG_INET Kconfig dependency to fix this.

Reported-by: Hulk Robot <hulkci@huawei.com>
Fixes: da58f90f11f5 ("netdevsim: Add devlink-trap support")
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 drivers/net/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig
index 48e209e..7bb786e 100644
--- a/drivers/net/Kconfig
+++ b/drivers/net/Kconfig
@@ -505,7 +505,7 @@ source "drivers/net/hyperv/Kconfig"
 
 config NETDEVSIM
 	tristate "Simulated networking device"
-	depends on DEBUG_FS
+	depends on INET && DEBUG_FS
 	select NET_DEVLINK
 	help
 	  This driver is a developer testing tool and software model that can
-- 
2.7.4



^ permalink raw reply related

* [PATCH][net-next] net: remove empty inet_exit_net
From: Li RongQing @ 2019-08-19 12:05 UTC (permalink / raw)
  To: netdev

Pointer members of an object with static storage duration, if not
explicitly initialized, will be initialized to a NULL pointer. The
net namespace API checks if this pointer is not NULL before using it,
it are safe to remove the function.

Signed-off-by: Li RongQing <lirongqing@baidu.com>
---
 net/ipv4/af_inet.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/net/ipv4/af_inet.c b/net/ipv4/af_inet.c
index ed2301ef872e..70f92aaca411 100644
--- a/net/ipv4/af_inet.c
+++ b/net/ipv4/af_inet.c
@@ -1845,13 +1845,8 @@ static __net_init int inet_init_net(struct net *net)
 	return 0;
 }
 
-static __net_exit void inet_exit_net(struct net *net)
-{
-}
-
 static __net_initdata struct pernet_operations af_inet_ops = {
 	.init = inet_init_net,
-	.exit = inet_exit_net,
 };
 
 static int __init init_inet_pernet_ops(void)
-- 
2.16.2


^ permalink raw reply related

* [PATCH rdma-next v3 2/3] IB/mlx5: Remove check of FW capabilities in ODP page fault handling
From: Leon Romanovsky @ 2019-08-19 12:08 UTC (permalink / raw)
  To: Doug Ledford, Jason Gunthorpe
  Cc: Leon Romanovsky, RDMA mailing list, Michael Guralnik,
	Saeed Mahameed, linux-netdev
In-Reply-To: <20190819120815.21225-1-leon@kernel.org>

From: Michael Guralnik <michaelgur@mellanox.com>

As page fault handling is initiated by FW, there is no need to check that
the ODP supports the operation and transport.

Signed-off-by: Michael Guralnik <michaelgur@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
---
 drivers/infiniband/hw/mlx5/odp.c | 48 +-------------------------------
 1 file changed, 1 insertion(+), 47 deletions(-)

diff --git a/drivers/infiniband/hw/mlx5/odp.c b/drivers/infiniband/hw/mlx5/odp.c
index 8b155a1f0b38..e7a4ea979209 100644
--- a/drivers/infiniband/hw/mlx5/odp.c
+++ b/drivers/infiniband/hw/mlx5/odp.c
@@ -986,17 +986,6 @@ static int pagefault_data_segments(struct mlx5_ib_dev *dev,
 	return ret < 0 ? ret : npages;
 }
 
-static const u32 mlx5_ib_odp_opcode_cap[] = {
-	[MLX5_OPCODE_SEND]	       = IB_ODP_SUPPORT_SEND,
-	[MLX5_OPCODE_SEND_IMM]	       = IB_ODP_SUPPORT_SEND,
-	[MLX5_OPCODE_SEND_INVAL]       = IB_ODP_SUPPORT_SEND,
-	[MLX5_OPCODE_RDMA_WRITE]       = IB_ODP_SUPPORT_WRITE,
-	[MLX5_OPCODE_RDMA_WRITE_IMM]   = IB_ODP_SUPPORT_WRITE,
-	[MLX5_OPCODE_RDMA_READ]	       = IB_ODP_SUPPORT_READ,
-	[MLX5_OPCODE_ATOMIC_CS]	       = IB_ODP_SUPPORT_ATOMIC,
-	[MLX5_OPCODE_ATOMIC_FA]	       = IB_ODP_SUPPORT_ATOMIC,
-};
-
 /*
  * Parse initiator WQE. Advances the wqe pointer to point at the
  * scatter-gather list, and set wqe_end to the end of the WQE.
@@ -1007,7 +996,6 @@ static int mlx5_ib_mr_initiator_pfault_handler(
 {
 	struct mlx5_wqe_ctrl_seg *ctrl = *wqe;
 	u16 wqe_index = pfault->wqe.wqe_index;
-	u32 transport_caps;
 	struct mlx5_base_av *av;
 	unsigned ds, opcode;
 	u32 qpn = qp->trans_qp.base.mqp.qpn;
@@ -1031,29 +1019,8 @@ static int mlx5_ib_mr_initiator_pfault_handler(
 	opcode = be32_to_cpu(ctrl->opmod_idx_opcode) &
 		 MLX5_WQE_CTRL_OPCODE_MASK;
 
-	switch (qp->ibqp.qp_type) {
-	case IB_QPT_XRC_INI:
+	if (qp->ibqp.qp_type == IB_QPT_XRC_INI)
 		*wqe += sizeof(struct mlx5_wqe_xrc_seg);
-		transport_caps = dev->odp_caps.per_transport_caps.xrc_odp_caps;
-		break;
-	case IB_QPT_RC:
-		transport_caps = dev->odp_caps.per_transport_caps.rc_odp_caps;
-		break;
-	case IB_QPT_UD:
-		transport_caps = dev->odp_caps.per_transport_caps.ud_odp_caps;
-		break;
-	default:
-		mlx5_ib_err(dev, "ODP fault on QP of an unsupported transport 0x%x\n",
-			    qp->ibqp.qp_type);
-		return -EFAULT;
-	}
-
-	if (unlikely(opcode >= ARRAY_SIZE(mlx5_ib_odp_opcode_cap) ||
-		     !(transport_caps & mlx5_ib_odp_opcode_cap[opcode]))) {
-		mlx5_ib_err(dev, "ODP fault on QP of an unsupported opcode 0x%x\n",
-			    opcode);
-		return -EFAULT;
-	}
 
 	if (qp->ibqp.qp_type == IB_QPT_UD) {
 		av = *wqe;
@@ -1118,19 +1085,6 @@ static int mlx5_ib_mr_responder_pfault_handler_rq(struct mlx5_ib_dev *dev,
 		return -EFAULT;
 	}
 
-	switch (qp->ibqp.qp_type) {
-	case IB_QPT_RC:
-		if (!(dev->odp_caps.per_transport_caps.rc_odp_caps &
-		      IB_ODP_SUPPORT_RECV))
-			goto invalid_transport_or_opcode;
-		break;
-	default:
-invalid_transport_or_opcode:
-		mlx5_ib_err(dev, "ODP fault on QP of an unsupported transport. transport: 0x%x\n",
-			    qp->ibqp.qp_type);
-		return -EFAULT;
-	}
-
 	*wqe_end = wqe + wqe_size;
 
 	return 0;
-- 
2.20.1


^ permalink raw reply related

* [PATCH rdma-next v3 3/3] IB/mlx5: Add page fault handler for DC initiator WQE
From: Leon Romanovsky @ 2019-08-19 12:08 UTC (permalink / raw)
  To: Doug Ledford, Jason Gunthorpe
  Cc: Leon Romanovsky, RDMA mailing list, Michael Guralnik,
	Saeed Mahameed, linux-netdev
In-Reply-To: <20190819120815.21225-1-leon@kernel.org>

From: Michael Guralnik <michaelgur@mellanox.com>

Parsing DC initiator WQEs upon page fault requires skipping an address
vector segment, as in UD WQEs.

Signed-off-by: Michael Guralnik <michaelgur@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
---
 drivers/infiniband/hw/mlx5/odp.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/infiniband/hw/mlx5/odp.c b/drivers/infiniband/hw/mlx5/odp.c
index e7a4ea979209..e6903e90aaf1 100644
--- a/drivers/infiniband/hw/mlx5/odp.c
+++ b/drivers/infiniband/hw/mlx5/odp.c
@@ -1022,7 +1022,8 @@ static int mlx5_ib_mr_initiator_pfault_handler(
 	if (qp->ibqp.qp_type == IB_QPT_XRC_INI)
 		*wqe += sizeof(struct mlx5_wqe_xrc_seg);
 
-	if (qp->ibqp.qp_type == IB_QPT_UD) {
+	if (qp->ibqp.qp_type == IB_QPT_UD ||
+	    qp->qp_sub_type == MLX5_IB_QPT_DCI) {
 		av = *wqe;
 		if (av->dqp_dct & cpu_to_be32(MLX5_EXTENDED_UD_AV))
 			*wqe += sizeof(struct mlx5_av);
-- 
2.20.1


^ permalink raw reply related

* [PATCH mlx5-next v3 1/3] net/mlx5: Set ODP capabilities for DC transport to max
From: Leon Romanovsky @ 2019-08-19 12:08 UTC (permalink / raw)
  To: Doug Ledford, Jason Gunthorpe
  Cc: Leon Romanovsky, RDMA mailing list, Michael Guralnik,
	Saeed Mahameed, linux-netdev
In-Reply-To: <20190819120815.21225-1-leon@kernel.org>

From: Michael Guralnik <michaelgur@mellanox.com>

In mlx5_core initialization, query max ODP capabilities for DC transport
from FW and set as current capabilities.

Signed-off-by: Michael Guralnik <michaelgur@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
---
 drivers/net/ethernet/mellanox/mlx5/core/main.c | 6 ++++++
 include/linux/mlx5/mlx5_ifc.h                  | 4 +++-
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/main.c b/drivers/net/ethernet/mellanox/mlx5/core/main.c
index fa0e991f1983..7f70ecb1db6d 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/main.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/main.c
@@ -495,6 +495,12 @@ static int handle_hca_cap_odp(struct mlx5_core_dev *dev)
 	ODP_CAP_SET_MAX(dev, xrc_odp_caps.write);
 	ODP_CAP_SET_MAX(dev, xrc_odp_caps.read);
 	ODP_CAP_SET_MAX(dev, xrc_odp_caps.atomic);
+	ODP_CAP_SET_MAX(dev, dc_odp_caps.srq_receive);
+	ODP_CAP_SET_MAX(dev, dc_odp_caps.send);
+	ODP_CAP_SET_MAX(dev, dc_odp_caps.receive);
+	ODP_CAP_SET_MAX(dev, dc_odp_caps.write);
+	ODP_CAP_SET_MAX(dev, dc_odp_caps.read);
+	ODP_CAP_SET_MAX(dev, dc_odp_caps.atomic);
 
 	if (do_set)
 		err = set_caps(dev, set_ctx, set_sz,
diff --git a/include/linux/mlx5/mlx5_ifc.h b/include/linux/mlx5/mlx5_ifc.h
index ab6ae723aae6..f037f8d5970e 100644
--- a/include/linux/mlx5/mlx5_ifc.h
+++ b/include/linux/mlx5/mlx5_ifc.h
@@ -946,7 +946,9 @@ struct mlx5_ifc_odp_cap_bits {
 
 	struct mlx5_ifc_odp_per_transport_service_cap_bits xrc_odp_caps;
 
-	u8         reserved_at_100[0x700];
+	struct mlx5_ifc_odp_per_transport_service_cap_bits dc_odp_caps;
+
+	u8         reserved_at_120[0x6E0];
 };
 
 struct mlx5_ifc_calc_op {
-- 
2.20.1


^ permalink raw reply related

* [PATCH rdma-next v3 0/3] ODP support for mlx5 DC QPs
From: Leon Romanovsky @ 2019-08-19 12:08 UTC (permalink / raw)
  To: Doug Ledford, Jason Gunthorpe
  Cc: Leon Romanovsky, RDMA mailing list, Michael Guralnik,
	Saeed Mahameed, linux-netdev

From: Leon Romanovsky <leonro@mellanox.com>

Changelog
 v3:
 * Rewrote patches to expose through DEVX without need to change mlx5-abi.h at all.
 v2: https://lore.kernel.org/linux-rdma/20190806074807.9111-1-leon@kernel.org
 * Fixed reserved_* field wrong name (Saeed M.)
 * Split first patch to two patches, one for mlx5-next and one for  rdma-next. (Saeed M.)
 v1: https://lore.kernel.org/linux-rdma/20190804100048.32671-1-leon@kernel.org
 * Fixed alignment to u64 in mlx5-abi.h (Gal P.)
 v0: https://lore.kernel.org/linux-rdma/20190801122139.25224-1-leon@kernel.org

---------------------------------------------------------------------------------
From Michael,

The series adds support for on-demand paging for DC transport.

As DC is mlx-only transport, the capabilities are exposed
to the user using DEVX objects and later on through mlx5dv_query_device.

Thanks

Michael Guralnik (3):
  net/mlx5: Set ODP capabilities for DC transport to max
  IB/mlx5: Remove check of FW capabilities in ODP page fault handling
  IB/mlx5: Add page fault handler for DC initiator WQE

 drivers/infiniband/hw/mlx5/odp.c              | 51 ++-----------------
 .../net/ethernet/mellanox/mlx5/core/main.c    |  6 +++
 include/linux/mlx5/mlx5_ifc.h                 |  4 +-
 3 files changed, 12 insertions(+), 49 deletions(-)

--
2.20.1


^ permalink raw reply

* [ANNOUNCE] nftables 0.9.2 release
From: Pablo Neira Ayuso @ 2019-08-19 11:58 UTC (permalink / raw)
  To: netfilter, netfilter-devel; +Cc: netdev, lwn

[-- Attachment #1: Type: text/plain, Size: 3857 bytes --]

Hi!

The Netfilter project proudly presents:

        nftables 0.9.2

This release contains fixes and new features, available up with Linux
kernels >= 5.3-rc.

* Transport header port matching, e.g.

        add rule x y ip protocol { tcp, udp } th dport 53

  This allows you to match on transport protocols with ports
  regardless the layer 4 protocol type. You can also use this from
  sets, maps and concatenations, e.g.

        table inet filter {
            set myset {
                    type ipv4_addr . inet_proto . inet_service
            }

            chain forward {
                    type filter hook forward priority filter; policy accept;
                    ip daddr . ip protocol . th dport @myset
            }
        }

* Allow to restore expiration for set elements:

        add element ip x y { 1.1.1.1 timeout 30s expires 15s }

* Match on IPv4 options, e.g.

        add rule x y ip option rr exists drop

  You can also match on type, ptr, length and addr fields of routing
  options, e.g.

        add rule x y ip option rr type 1 drop

  lsrr, rr, ssrr and ra IPv4 options are supported.

* Use prefix and ranges in statements, e.g.

        iifname ens3 snat to 10.0.0.0/28
        iifname ens3 snat to 10.0.0.1-10.0.0.15

* Allow for variables in chain definitions, e.g.

    define default_policy = accept
    add chain ip foo bar { type filter hook input priority filter; policy $default_policy }

  also when specifying chain priority, either numeric or literal:

    define prio = filter
    define prionum = 10
    define prioffset = "filter - 150"

    add table ip foo
    add chain ip foo bar { type filter hook input priority $prio; }
    add chain ip foo ber { type filter hook input priority $prionum; }
    add chain ip foo bor { type filter hook input priority $prioffset; }

* synproxy support, e.g.

    table ip x {
            chain y {
                    type filter hook prerouting priority raw; policy accept;
                    tcp dport 8888 tcp flags syn notrack
            }

            chain z {
                    type filter hook forward priority filter; policy accept;
                    tcp dport 8888 ct state invalid,untracked synproxy mss 1460 wscale 7 timestamp sack-perm
                    ct state invalid drop
            }
    }

  This ruleset above places the TCP port 8888 behind the synproxy.

* conntrack expectations via ruleset policy, e.g.

        table x {
                ct expectation myexpect {
                        protocol tcp
                        dport 5432
                        timeout 1h
                        size 12
                        l3proto ip
                }

                chain input {
                        type filter hook input priority 0;

                        ct state new tcp dport 8888 ct expectation set myexpect
                        ct state established,related counter accept
                }
        }

  This ruleset creates an expectation on TCP port 5432 for each new TCP
  connection to port 8888. This expectation expires after 1 hour and the
  maximum number of expectation that are pending to be confirmed are 12.

* The libnftables library only exports only public symbols.

* ... and bug fixes.

See ChangeLog that comes attached to this email for more details.

You can download it from:

http://www.netfilter.org/projects/nftables/downloads.html#nftables-0.9.2
ftp://ftp.netfilter.org/pub/nftables/

To build the code, libnftnl 1.1.4 and libmnl >= 1.0.3 are required:

* http://netfilter.org/projects/libnftnl/index.html
* http://netfilter.org/projects/libmnl/index.html

Visit our wikipage for user documentation at:

* http://wiki.nftables.org

For the manpage reference, check man(8) nft.

In case of bugs and feature request, file them via:

* https://bugzilla.netfilter.org

Happy firewalling!

[-- Attachment #2: changes-nftables-0.9.2.txt --]
[-- Type: text/plain, Size: 4128 bytes --]

Arturo Borrero Gonzalez (4):
      nft: don't use xzalloc()
      libnftables: reallocate definition of nft_print() and nft_gmp_print()
      libnftables: export public symbols only
      doc: don't check asciidoc output with xmllint

Brett Mastbergen (1):
      src: Sync comments with current expr definition

Fernando Fernandez Mancera (7):
      src: introduce SYNPROXY matching
      json: fix synproxy flag parser typo
      tests: py: add missing json outputs
      include: json: add missing synproxy stmt print stub
      src: osf: fix snprintf -Wformat-truncation warning
      src: allow variables in the chain priority specification
      src: allow variable in chain policy

Florian Westphal (17):
      src/ct: provide fixed data lengh sizes for ip/ip6 keys
      proto: add pseudo th protocol to match d/sport in generic way
      tests: shell: make sure we test nft binary from working tree, not host
      tests: fix up two broken json test cases
      doc: fib: explain example in more detail
      src: evaluate: support prefix expression in statements
      tests: shell: check for table re-definition usecase
      doc: fib: explain example in more detail
      scanner: don't rely on fseek for input stream repositioning
      src: mnl: fix setting rcvbuffer size
      src: fix jumps on bigendian arches
      src: parser: fix parsing of chain priority and policy on bigendian
      src: mnl: retry when we hit -ENOBUFS
      src: json: support json restore for "th" pseudoheader
      src: json: fix constant parsing on bigendian
      tests: make sure i is defined
      src: libnftnl: run single-initcalls only once

Jan Engelhardt (3):
      build: unbreak non-functionality of --disable-python
      build: avoid recursion into py/ if not selected
      build: avoid unnecessary call to xargs

Jeremy Sowden (2):
      libnftables: get rid of repeated initialization of netlink_ctx
      rule: removed duplicate member initializer.

Laura Garcia Liebana (2):
      src: enable set expiration date for set elements
      cache: incorrect flush flag for table/chain

M. Braun (2):
      src: Fix dumping vlan rules
      tests: add json test for vlan rule fix

Pablo Neira Ayuso (26):
      monitor: fix double cache update with --echo
      tests: shell: restore element expiration
      parser_bison: do not enforce semicolon from ct helper block
      rule: do not print semicolon in ct timeout
      rule: print space between policy and timeout
      mnl: remove unnecessary NLM_F_ACK flags
      tests: shell: update test to include reset command
      ipopt: missing ipopt.h and ipopt.c files
      src: use malloc() and free() from cli and main
      main: replace NFT_EXIT_NOMEM by EXIT_FAILURE
      cli: remove useless #include headers
      src: add set_is_datamap(), set_is_objmap() and set_is_map() helpers
      evaluate: missing object maps handling in list and flush commands
      src: use set_is_anonymous()
      evaluate: honor NFT_SET_OBJECT flag
      cache: incorrect flags for create commands
      evaluate: missing basic evaluation of expectations
      evaluate: bogus error when refering to existing non-base chain
      evaluate: missing location for chain nested in table definition
      cache: add NFT_CACHE_UPDATE and NFT_CACHE_FLUSHED flags
      src: add parse_ctx object
      src: remove global symbol_table
      tests: shell: move chain priority and policy to chain folder
      include: refresh nf_tables.h cached copy
      gmputil: assert length is non-zero
      build: Bump version to v0.9.2

Phil Sutter (7):
      json: Print newline at end of list output
      main: Bail if non-available JSON was requested
      files: Move netdev-ingress.nft to /etc/nftables as well
      files: Add inet family nat config
      json: Fix memleak in timeout_policy_json()
      parser_bison: Fix for deprecated statements
      src: Call bison with -Wno-yacc to silence warnings

Shekhar Sharma (1):
      tests: py: fix python3

Stephen Suryaputra (1):
      exthdr: add support for matching IPv4 options

Stéphane Veyret (1):
      src: add ct expectations support


^ permalink raw reply

* [PATCH mlx5-next 2/3] net/mlx5: Create bypass and loopback flow steering namespaces for RDMA RX
From: Leon Romanovsky @ 2019-08-19 11:36 UTC (permalink / raw)
  To: Doug Ledford, Jason Gunthorpe
  Cc: Leon Romanovsky, RDMA mailing list, Mark Bloch, Mark Zhang,
	Saeed Mahameed, linux-netdev
In-Reply-To: <20190819113626.20284-1-leon@kernel.org>

From: Mark Zhang <markz@mellanox.com>

Use different namespaces for bypass and switchdev loopback because they
have different priorities and default table miss action requirement:
1. bypass: with multiple priorities support, and
   MLX5_FLOW_TABLE_MISS_ACTION_DEF as the default table miss action;
2. switchdev loopback: with single priority support, and
   MLX5_FLOW_TABLE_MISS_ACTION_SWITCH_DOMAIN as the default table miss
   action.

Signed-off-by: Mark Zhang <markz@mellanox.com>
Reviewed-by: Mark Bloch <markb@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
---
 .../net/ethernet/mellanox/mlx5/core/fs_core.c | 49 +++++++++++++++----
 .../net/ethernet/mellanox/mlx5/core/rdma.c    |  2 +-
 include/linux/mlx5/fs.h                       |  1 +
 3 files changed, 41 insertions(+), 11 deletions(-)

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/fs_core.c b/drivers/net/ethernet/mellanox/mlx5/core/fs_core.c
index fb3cfdfbafbe..7bdec442f0ac 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/fs_core.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/fs_core.c
@@ -182,6 +182,26 @@ static struct init_tree_node egress_root_fs = {
 	}
 };
 
+#define RDMA_RX_BYPASS_PRIO 0
+#define RDMA_RX_KERNEL_PRIO 1
+static struct init_tree_node rdma_rx_root_fs = {
+	.type = FS_TYPE_NAMESPACE,
+	.ar_size = 2,
+	.children = (struct init_tree_node[]) {
+		[RDMA_RX_BYPASS_PRIO] =
+		ADD_PRIO(0, MLX5_BY_PASS_NUM_REGULAR_PRIOS, 0,
+			 FS_CHAINING_CAPS,
+			 ADD_NS(MLX5_FLOW_TABLE_MISS_ACTION_DEF,
+				ADD_MULTIPLE_PRIO(MLX5_BY_PASS_NUM_REGULAR_PRIOS,
+						  BY_PASS_PRIO_NUM_LEVELS))),
+		[RDMA_RX_KERNEL_PRIO] =
+		ADD_PRIO(0, MLX5_BY_PASS_NUM_REGULAR_PRIOS + 1, 0,
+			 FS_CHAINING_CAPS,
+			 ADD_NS(MLX5_FLOW_TABLE_MISS_ACTION_SWITCH_DOMAIN,
+				ADD_MULTIPLE_PRIO(1, 1))),
+	}
+};
+
 enum fs_i_lock_class {
 	FS_LOCK_GRANDPARENT,
 	FS_LOCK_PARENT,
@@ -2067,16 +2087,18 @@ struct mlx5_flow_namespace *mlx5_get_flow_namespace(struct mlx5_core_dev *dev,
 		if (steering->sniffer_tx_root_ns)
 			return &steering->sniffer_tx_root_ns->ns;
 		return NULL;
-	case MLX5_FLOW_NAMESPACE_RDMA_RX:
-		if (steering->rdma_rx_root_ns)
-			return &steering->rdma_rx_root_ns->ns;
-		return NULL;
 	default:
 		break;
 	}
 
 	if (type == MLX5_FLOW_NAMESPACE_EGRESS) {
 		root_ns = steering->egress_root_ns;
+	} else if (type == MLX5_FLOW_NAMESPACE_RDMA_RX) {
+		root_ns = steering->rdma_rx_root_ns;
+		prio = RDMA_RX_BYPASS_PRIO;
+	} else if (type == MLX5_FLOW_NAMESPACE_RDMA_RX_KERNEL) {
+		root_ns = steering->rdma_rx_root_ns;
+		prio = RDMA_RX_KERNEL_PRIO;
 	} else { /* Must be NIC RX */
 		root_ns = steering->root_ns;
 		prio = type;
@@ -2507,18 +2529,25 @@ static int init_sniffer_rx_root_ns(struct mlx5_flow_steering *steering)
 
 static int init_rdma_rx_root_ns(struct mlx5_flow_steering *steering)
 {
-	struct fs_prio *prio;
+	int err;
 
 	steering->rdma_rx_root_ns = create_root_ns(steering, FS_FT_RDMA_RX);
 	if (!steering->rdma_rx_root_ns)
 		return -ENOMEM;
 
-	steering->rdma_rx_root_ns->ns.def_miss_action =
-		MLX5_FLOW_TABLE_MISS_ACTION_SWITCH_DOMAIN;
+	err = init_root_tree(steering, &rdma_rx_root_fs,
+			     &steering->rdma_rx_root_ns->ns.node);
+	if (err)
+		goto out_err;
 
-	/* Create single prio */
-	prio = fs_create_prio(&steering->rdma_rx_root_ns->ns, 0, 1);
-	return PTR_ERR_OR_ZERO(prio);
+	set_prio_attrs(steering->rdma_rx_root_ns);
+
+	return 0;
+
+out_err:
+	cleanup_root_ns(steering->rdma_rx_root_ns);
+	steering->rdma_rx_root_ns = NULL;
+	return err;
 }
 static int init_fdb_root_ns(struct mlx5_flow_steering *steering)
 {
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/rdma.c b/drivers/net/ethernet/mellanox/mlx5/core/rdma.c
index 17ce9dd56b13..18af6981e0be 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/rdma.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/rdma.c
@@ -51,7 +51,7 @@ static int mlx5_rdma_enable_roce_steering(struct mlx5_core_dev *dev)
 		return -ENOMEM;
 	}
 
-	ns = mlx5_get_flow_namespace(dev, MLX5_FLOW_NAMESPACE_RDMA_RX);
+	ns = mlx5_get_flow_namespace(dev, MLX5_FLOW_NAMESPACE_RDMA_RX_KERNEL);
 	if (!ns) {
 		mlx5_core_err(dev, "Failed to get RDMA RX namespace");
 		err = -EOPNOTSUPP;
diff --git a/include/linux/mlx5/fs.h b/include/linux/mlx5/fs.h
index 04a569568eac..5235b09a8ef3 100644
--- a/include/linux/mlx5/fs.h
+++ b/include/linux/mlx5/fs.h
@@ -75,6 +75,7 @@ enum mlx5_flow_namespace_type {
 	MLX5_FLOW_NAMESPACE_SNIFFER_TX,
 	MLX5_FLOW_NAMESPACE_EGRESS,
 	MLX5_FLOW_NAMESPACE_RDMA_RX,
+	MLX5_FLOW_NAMESPACE_RDMA_RX_KERNEL,
 };
 
 enum {
-- 
2.20.1


^ permalink raw reply related

* [PATCH rdma-next 3/3] RDMA/mlx5: RDMA_RX flow type support for user applications
From: Leon Romanovsky @ 2019-08-19 11:36 UTC (permalink / raw)
  To: Doug Ledford, Jason Gunthorpe
  Cc: Leon Romanovsky, RDMA mailing list, Mark Bloch, Mark Zhang,
	Saeed Mahameed, linux-netdev
In-Reply-To: <20190819113626.20284-1-leon@kernel.org>

From: Mark Zhang <markz@mellanox.com>

Currently user applications can only steer TCP/IP(NIC RX/RX) traffic.
This patch adds RDMA_RX as a new flow type to allow the user to insert
steering rules to control RDMA traffic.
Two destinations are supported(but not set at the same time): devx
flow table object and QP.

Signed-off-by: Mark Zhang <markz@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
---
 drivers/infiniband/hw/mlx5/flow.c         | 13 +++++++++++--
 drivers/infiniband/hw/mlx5/main.c         |  7 +++++++
 drivers/infiniband/hw/mlx5/mlx5_ib.h      |  1 +
 include/uapi/rdma/mlx5_user_ioctl_verbs.h |  1 +
 4 files changed, 20 insertions(+), 2 deletions(-)

diff --git a/drivers/infiniband/hw/mlx5/flow.c b/drivers/infiniband/hw/mlx5/flow.c
index b8841355fcd5..571bb8539cdb 100644
--- a/drivers/infiniband/hw/mlx5/flow.c
+++ b/drivers/infiniband/hw/mlx5/flow.c
@@ -32,6 +32,9 @@ mlx5_ib_ft_type_to_namespace(enum mlx5_ib_uapi_flow_table_type table_type,
 	case MLX5_IB_UAPI_FLOW_TABLE_TYPE_FDB:
 		*namespace = MLX5_FLOW_NAMESPACE_FDB;
 		break;
+	case MLX5_IB_UAPI_FLOW_TABLE_TYPE_RDMA_RX:
+		*namespace = MLX5_FLOW_NAMESPACE_RDMA_RX;
+		break;
 	default:
 		return -EINVAL;
 	}
@@ -101,6 +104,11 @@ static int UVERBS_HANDLER(MLX5_IB_METHOD_CREATE_FLOW)(
 	if (fs_matcher->ns_type == MLX5_FLOW_NAMESPACE_FDB && !dest_devx)
 		return -EINVAL;
 
+	/* Allow only DEVX object or QP as dest when inserting to RDMA_RX */
+	if ((fs_matcher->ns_type == MLX5_FLOW_NAMESPACE_RDMA_RX) &&
+	    ((!dest_devx && !dest_qp) || (dest_devx && dest_qp)))
+		return -EINVAL;
+
 	if (dest_devx) {
 		devx_obj = uverbs_attr_get_obj(
 			attrs, MLX5_IB_ATTR_CREATE_FLOW_DEST_DEVX);
@@ -112,8 +120,9 @@ static int UVERBS_HANDLER(MLX5_IB_METHOD_CREATE_FLOW)(
 		 */
 		if (!mlx5_ib_devx_is_flow_dest(devx_obj, &dest_id, &dest_type))
 			return -EINVAL;
-		/* Allow only flow table as dest when inserting to FDB */
-		if (fs_matcher->ns_type == MLX5_FLOW_NAMESPACE_FDB &&
+		/* Allow only flow table as dest when inserting to FDB or RDMA_RX */
+		if ((fs_matcher->ns_type == MLX5_FLOW_NAMESPACE_FDB ||
+		     fs_matcher->ns_type == MLX5_FLOW_NAMESPACE_RDMA_RX) &&
 		    dest_type != MLX5_FLOW_DESTINATION_TYPE_FLOW_TABLE)
 			return -EINVAL;
 	} else if (dest_qp) {
diff --git a/drivers/infiniband/hw/mlx5/main.c b/drivers/infiniband/hw/mlx5/main.c
index 08020affdc17..4e86212e6ea8 100644
--- a/drivers/infiniband/hw/mlx5/main.c
+++ b/drivers/infiniband/hw/mlx5/main.c
@@ -3963,6 +3963,11 @@ _get_flow_table(struct mlx5_ib_dev *dev,
 		    esw_encap)
 			flags |= MLX5_FLOW_TABLE_TUNNEL_EN_REFORMAT;
 		priority = FDB_BYPASS_PATH;
+	} else if (fs_matcher->ns_type == MLX5_FLOW_NAMESPACE_RDMA_RX) {
+		max_table_size =
+			BIT(MLX5_CAP_FLOWTABLE_RDMA_RX(dev->mdev,
+						       log_max_ft_size));
+		priority = fs_matcher->priority;
 	}
 
 	max_table_size = min_t(int, max_table_size, MLX5_FS_MAX_ENTRIES);
@@ -3977,6 +3982,8 @@ _get_flow_table(struct mlx5_ib_dev *dev,
 		prio = &dev->flow_db->egress_prios[priority];
 	else if (fs_matcher->ns_type == MLX5_FLOW_NAMESPACE_FDB)
 		prio = &dev->flow_db->fdb;
+	else if (fs_matcher->ns_type == MLX5_FLOW_NAMESPACE_RDMA_RX)
+		prio = &dev->flow_db->rdma_rx[priority];
 
 	if (!prio)
 		return ERR_PTR(-EINVAL);
diff --git a/drivers/infiniband/hw/mlx5/mlx5_ib.h b/drivers/infiniband/hw/mlx5/mlx5_ib.h
index cb41a7e6255a..6abfbf3a69b7 100644
--- a/drivers/infiniband/hw/mlx5/mlx5_ib.h
+++ b/drivers/infiniband/hw/mlx5/mlx5_ib.h
@@ -200,6 +200,7 @@ struct mlx5_ib_flow_db {
 	struct mlx5_ib_flow_prio	sniffer[MLX5_IB_NUM_SNIFFER_FTS];
 	struct mlx5_ib_flow_prio	egress[MLX5_IB_NUM_EGRESS_FTS];
 	struct mlx5_ib_flow_prio	fdb;
+	struct mlx5_ib_flow_prio	rdma_rx[MLX5_IB_NUM_FLOW_FT];
 	struct mlx5_flow_table		*lag_demux_ft;
 	/* Protect flow steering bypass flow tables
 	 * when add/del flow rules.
diff --git a/include/uapi/rdma/mlx5_user_ioctl_verbs.h b/include/uapi/rdma/mlx5_user_ioctl_verbs.h
index 7e9900b0e746..88b6ca70c2fe 100644
--- a/include/uapi/rdma/mlx5_user_ioctl_verbs.h
+++ b/include/uapi/rdma/mlx5_user_ioctl_verbs.h
@@ -43,6 +43,7 @@ enum mlx5_ib_uapi_flow_table_type {
 	MLX5_IB_UAPI_FLOW_TABLE_TYPE_NIC_RX     = 0x0,
 	MLX5_IB_UAPI_FLOW_TABLE_TYPE_NIC_TX	= 0x1,
 	MLX5_IB_UAPI_FLOW_TABLE_TYPE_FDB	= 0x2,
+	MLX5_IB_UAPI_FLOW_TABLE_TYPE_RDMA_RX	= 0x3,
 };
 
 enum mlx5_ib_uapi_flow_action_packet_reformat_type {
-- 
2.20.1


^ permalink raw reply related

* [PATCH mlx5-next 1/3] net/mlx5: Add per-namespace flow table default miss action support
From: Leon Romanovsky @ 2019-08-19 11:36 UTC (permalink / raw)
  To: Doug Ledford, Jason Gunthorpe
  Cc: Leon Romanovsky, RDMA mailing list, Mark Bloch, Mark Zhang,
	Saeed Mahameed, linux-netdev
In-Reply-To: <20190819113626.20284-1-leon@kernel.org>

From: Mark Zhang <markz@mellanox.com>

Currently all the namespaces under the same steering domain share the same
default table miss action, however in some situations (e.g., RDMA RX)
different actions are required. This patch adds a per-namespace default
table miss action instead of using the miss action of the steering domain.

Signed-off-by: Mark Zhang <markz@mellanox.com>
Reviewed-by: Mark Bloch <markb@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
---
 .../net/ethernet/mellanox/mlx5/core/fs_cmd.c  |  4 +-
 .../net/ethernet/mellanox/mlx5/core/fs_core.c | 73 +++++++++++--------
 .../net/ethernet/mellanox/mlx5/core/fs_core.h |  3 +-
 3 files changed, 47 insertions(+), 33 deletions(-)

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.c b/drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.c
index b84a225bbe86..1e3381604b3d 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.c
@@ -182,7 +182,7 @@ static int mlx5_cmd_create_flow_table(struct mlx5_flow_root_namespace *ns,
 		} else {
 			MLX5_SET(create_flow_table_in, in,
 				 flow_table_context.table_miss_action,
-				 ns->def_miss_action);
+				 ft->def_miss_action);
 		}
 		break;
 
@@ -262,7 +262,7 @@ static int mlx5_cmd_modify_flow_table(struct mlx5_flow_root_namespace *ns,
 		} else {
 			MLX5_SET(modify_flow_table_in, in,
 				 flow_table_context.table_miss_action,
-				 ns->def_miss_action);
+				 ft->def_miss_action);
 		}
 	}
 
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/fs_core.c b/drivers/net/ethernet/mellanox/mlx5/core/fs_core.c
index 3e99799bdb40..fb3cfdfbafbe 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/fs_core.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/fs_core.c
@@ -60,7 +60,8 @@
 	ADD_PRIO(num_prios_val, 0, num_levels_val, {},\
 		 __VA_ARGS__)\
 
-#define ADD_NS(...) {.type = FS_TYPE_NAMESPACE,\
+#define ADD_NS(def_miss_act, ...) {.type = FS_TYPE_NAMESPACE,	\
+	.def_miss_action = def_miss_act,\
 	.children = (struct init_tree_node[]) {__VA_ARGS__},\
 	.ar_size = INIT_TREE_NODE_ARRAY_SIZE(__VA_ARGS__) \
 }
@@ -131,33 +132,41 @@ static struct init_tree_node {
 	int num_leaf_prios;
 	int prio;
 	int num_levels;
+	enum mlx5_flow_table_miss_action def_miss_action;
 } root_fs = {
 	.type = FS_TYPE_NAMESPACE,
 	.ar_size = 7,
-	.children = (struct init_tree_node[]) {
-		ADD_PRIO(0, BY_PASS_MIN_LEVEL, 0,
-			 FS_CHAINING_CAPS,
-			 ADD_NS(ADD_MULTIPLE_PRIO(MLX5_BY_PASS_NUM_PRIOS,
-						  BY_PASS_PRIO_NUM_LEVELS))),
-		ADD_PRIO(0, LAG_MIN_LEVEL, 0,
-			 FS_CHAINING_CAPS,
-			 ADD_NS(ADD_MULTIPLE_PRIO(LAG_NUM_PRIOS,
-						  LAG_PRIO_NUM_LEVELS))),
-		ADD_PRIO(0, OFFLOADS_MIN_LEVEL, 0, {},
-			 ADD_NS(ADD_MULTIPLE_PRIO(OFFLOADS_NUM_PRIOS, OFFLOADS_MAX_FT))),
-		ADD_PRIO(0, ETHTOOL_MIN_LEVEL, 0,
-			 FS_CHAINING_CAPS,
-			 ADD_NS(ADD_MULTIPLE_PRIO(ETHTOOL_NUM_PRIOS,
-						  ETHTOOL_PRIO_NUM_LEVELS))),
-		ADD_PRIO(0, KERNEL_MIN_LEVEL, 0, {},
-			 ADD_NS(ADD_MULTIPLE_PRIO(KERNEL_NIC_TC_NUM_PRIOS, KERNEL_NIC_TC_NUM_LEVELS),
-				ADD_MULTIPLE_PRIO(KERNEL_NIC_NUM_PRIOS,
-						  KERNEL_NIC_PRIO_NUM_LEVELS))),
-		ADD_PRIO(0, BY_PASS_MIN_LEVEL, 0,
-			 FS_CHAINING_CAPS,
-			 ADD_NS(ADD_MULTIPLE_PRIO(LEFTOVERS_NUM_PRIOS, LEFTOVERS_NUM_LEVELS))),
-		ADD_PRIO(0, ANCHOR_MIN_LEVEL, 0, {},
-			 ADD_NS(ADD_MULTIPLE_PRIO(ANCHOR_NUM_PRIOS, ANCHOR_NUM_LEVELS))),
+	  .children = (struct init_tree_node[]){
+		  ADD_PRIO(0, BY_PASS_MIN_LEVEL, 0, FS_CHAINING_CAPS,
+			   ADD_NS(MLX5_FLOW_TABLE_MISS_ACTION_DEF,
+				  ADD_MULTIPLE_PRIO(MLX5_BY_PASS_NUM_PRIOS,
+						    BY_PASS_PRIO_NUM_LEVELS))),
+		  ADD_PRIO(0, LAG_MIN_LEVEL, 0, FS_CHAINING_CAPS,
+			   ADD_NS(MLX5_FLOW_TABLE_MISS_ACTION_DEF,
+				  ADD_MULTIPLE_PRIO(LAG_NUM_PRIOS,
+						    LAG_PRIO_NUM_LEVELS))),
+		  ADD_PRIO(0, OFFLOADS_MIN_LEVEL, 0, {},
+			   ADD_NS(MLX5_FLOW_TABLE_MISS_ACTION_DEF,
+				  ADD_MULTIPLE_PRIO(OFFLOADS_NUM_PRIOS,
+						    OFFLOADS_MAX_FT))),
+		  ADD_PRIO(0, ETHTOOL_MIN_LEVEL, 0, FS_CHAINING_CAPS,
+			   ADD_NS(MLX5_FLOW_TABLE_MISS_ACTION_DEF,
+				  ADD_MULTIPLE_PRIO(ETHTOOL_NUM_PRIOS,
+						    ETHTOOL_PRIO_NUM_LEVELS))),
+		  ADD_PRIO(0, KERNEL_MIN_LEVEL, 0, {},
+			   ADD_NS(MLX5_FLOW_TABLE_MISS_ACTION_DEF,
+				  ADD_MULTIPLE_PRIO(KERNEL_NIC_TC_NUM_PRIOS,
+						    KERNEL_NIC_TC_NUM_LEVELS),
+				  ADD_MULTIPLE_PRIO(KERNEL_NIC_NUM_PRIOS,
+						    KERNEL_NIC_PRIO_NUM_LEVELS))),
+		  ADD_PRIO(0, BY_PASS_MIN_LEVEL, 0, FS_CHAINING_CAPS,
+			   ADD_NS(MLX5_FLOW_TABLE_MISS_ACTION_DEF,
+				  ADD_MULTIPLE_PRIO(LEFTOVERS_NUM_PRIOS,
+						    LEFTOVERS_NUM_LEVELS))),
+		  ADD_PRIO(0, ANCHOR_MIN_LEVEL, 0, {},
+			   ADD_NS(MLX5_FLOW_TABLE_MISS_ACTION_DEF,
+				  ADD_MULTIPLE_PRIO(ANCHOR_NUM_PRIOS,
+						    ANCHOR_NUM_LEVELS))),
 	}
 };
 
@@ -167,7 +176,8 @@ static struct init_tree_node egress_root_fs = {
 	.children = (struct init_tree_node[]) {
 		ADD_PRIO(0, MLX5_BY_PASS_NUM_PRIOS, 0,
 			 FS_CHAINING_CAPS_EGRESS,
-			 ADD_NS(ADD_MULTIPLE_PRIO(MLX5_BY_PASS_NUM_PRIOS,
+			 ADD_NS(MLX5_FLOW_TABLE_MISS_ACTION_DEF,
+				ADD_MULTIPLE_PRIO(MLX5_BY_PASS_NUM_PRIOS,
 						  BY_PASS_PRIO_NUM_LEVELS))),
 	}
 };
@@ -1014,6 +1024,7 @@ static struct mlx5_flow_table *__mlx5_create_flow_table(struct mlx5_flow_namespa
 	tree_init_node(&ft->node, del_hw_flow_table, del_sw_flow_table);
 	log_table_sz = ft->max_fte ? ilog2(ft->max_fte) : 0;
 	next_ft = find_next_chained_ft(fs_prio);
+	ft->def_miss_action = ns->def_miss_action;
 	err = root->cmds->create_flow_table(root, ft, log_table_sz, next_ft);
 	if (err)
 		goto free_ft;
@@ -2155,7 +2166,8 @@ static struct mlx5_flow_namespace *fs_init_namespace(struct mlx5_flow_namespace
 	return ns;
 }
 
-static struct mlx5_flow_namespace *fs_create_namespace(struct fs_prio *prio)
+static struct mlx5_flow_namespace *fs_create_namespace(struct fs_prio *prio,
+						       int def_miss_act)
 {
 	struct mlx5_flow_namespace	*ns;
 
@@ -2164,6 +2176,7 @@ static struct mlx5_flow_namespace *fs_create_namespace(struct fs_prio *prio)
 		return ERR_PTR(-ENOMEM);
 
 	fs_init_namespace(ns);
+	ns->def_miss_action = def_miss_act;
 	tree_init_node(&ns->node, NULL, del_sw_ns);
 	tree_add_node(&ns->node, &prio->node);
 	list_add_tail(&ns->node.list, &prio->node.children);
@@ -2230,7 +2243,7 @@ static int init_root_tree_recursive(struct mlx5_flow_steering *steering,
 		base = &fs_prio->node;
 	} else if (init_node->type == FS_TYPE_NAMESPACE) {
 		fs_get_obj(fs_prio, fs_parent_node);
-		fs_ns = fs_create_namespace(fs_prio);
+		fs_ns = fs_create_namespace(fs_prio, init_node->def_miss_action);
 		if (IS_ERR(fs_ns))
 			return PTR_ERR(fs_ns);
 		base = &fs_ns->node;
@@ -2500,7 +2513,7 @@ static int init_rdma_rx_root_ns(struct mlx5_flow_steering *steering)
 	if (!steering->rdma_rx_root_ns)
 		return -ENOMEM;
 
-	steering->rdma_rx_root_ns->def_miss_action =
+	steering->rdma_rx_root_ns->ns.def_miss_action =
 		MLX5_FLOW_TABLE_MISS_ACTION_SWITCH_DOMAIN;
 
 	/* Create single prio */
@@ -2543,7 +2556,7 @@ static int init_fdb_root_ns(struct mlx5_flow_steering *steering)
 	}
 
 	for (chain = 0; chain <= FDB_MAX_CHAIN; chain++) {
-		ns = fs_create_namespace(maj_prio);
+		ns = fs_create_namespace(maj_prio, MLX5_FLOW_TABLE_MISS_ACTION_DEF);
 		if (IS_ERR(ns)) {
 			err = PTR_ERR(ns);
 			goto out_err;
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/fs_core.h b/drivers/net/ethernet/mellanox/mlx5/core/fs_core.h
index c48c382f926f..69f809831959 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/fs_core.h
+++ b/drivers/net/ethernet/mellanox/mlx5/core/fs_core.h
@@ -145,6 +145,7 @@ struct mlx5_flow_table {
 	struct list_head		fwd_rules;
 	u32				flags;
 	struct rhltable			fgs_hash;
+	enum mlx5_flow_table_miss_action def_miss_action;
 };
 
 struct mlx5_ft_underlay_qp {
@@ -191,6 +192,7 @@ struct fs_prio {
 struct mlx5_flow_namespace {
 	/* parent == NULL => root ns */
 	struct	fs_node			node;
+	enum mlx5_flow_table_miss_action def_miss_action;
 };
 
 struct mlx5_flow_group_mask {
@@ -219,7 +221,6 @@ struct mlx5_flow_root_namespace {
 	struct mutex			chain_lock;
 	struct list_head		underlay_qpns;
 	const struct mlx5_flow_cmds	*cmds;
-	enum mlx5_flow_table_miss_action def_miss_action;
 };
 
 int mlx5_init_fc_stats(struct mlx5_core_dev *dev);
-- 
2.20.1


^ permalink raw reply related

* [PATCH rdma-next 0/3] RDMA RX RoCE Steering Support
From: Leon Romanovsky @ 2019-08-19 11:36 UTC (permalink / raw)
  To: Doug Ledford, Jason Gunthorpe
  Cc: Leon Romanovsky, RDMA mailing list, Mark Bloch, Mark Zhang,
	Saeed Mahameed, linux-netdev

From: Leon Romanovsky <leonro@mellanox.com>

Hi,

This series from Mark extends mlx5 with RDMA_RX RoCE flow steering support
for DEVX and QP objects.

Thanks

Mark Zhang (3):
  net/mlx5: Add per-namespace flow table default miss action support
  net/mlx5: Create bypass and loopback flow steering namespaces for RDMA
    RX
  RDMA/mlx5: RDMA_RX flow type support for user applications

 drivers/infiniband/hw/mlx5/flow.c             |  13 +-
 drivers/infiniband/hw/mlx5/main.c             |   7 +
 drivers/infiniband/hw/mlx5/mlx5_ib.h          |   1 +
 .../net/ethernet/mellanox/mlx5/core/fs_cmd.c  |   4 +-
 .../net/ethernet/mellanox/mlx5/core/fs_core.c | 120 ++++++++++++------
 .../net/ethernet/mellanox/mlx5/core/fs_core.h |   3 +-
 .../net/ethernet/mellanox/mlx5/core/rdma.c    |   2 +-
 include/linux/mlx5/fs.h                       |   1 +
 include/uapi/rdma/mlx5_user_ioctl_verbs.h     |   1 +
 9 files changed, 107 insertions(+), 45 deletions(-)

--
2.20.1


^ permalink raw reply


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox