Netdev List
 help / color / mirror / Atom feed
* Re: [PATCH net] geneve: update skb dst pmtu on tx path
From: David Miller @ 2018-01-02 17:36 UTC (permalink / raw)
  To: lucien.xin; +Cc: netdev
In-Reply-To: <fe176067f43de7928afcbc9810b13acb26f7adf0.1514184238.git.lucien.xin@gmail.com>

From: Xin Long <lucien.xin@gmail.com>
Date: Mon, 25 Dec 2017 14:43:58 +0800

> Commit a93bf0ff4490 ("vxlan: update skb dst pmtu on tx path") has fixed
> a performance issue caused by the change of lower dev's mtu for vxlan.
> 
> The same thing needs to be done for geneve as well.
> 
> Note that geneve cannot adjust it's mtu according to lower dev's mtu
> when creating it. The performance is very low later when netperfing
> over it without fixing the mtu manually. This patch could also avoid
> this issue.
> 
> Signed-off-by: Xin Long <lucien.xin@gmail.com>

Applied.

^ permalink raw reply

* Re: [PATCH net] ip6_tunnel: allow ip6gre dev mtu to be set below 1280
From: David Miller @ 2018-01-02 17:36 UTC (permalink / raw)
  To: lucien.xin; +Cc: netdev
In-Reply-To: <2593c4a11b5ea0cf4efbec5517b7adec72ab4c17.1514184312.git.lucien.xin@gmail.com>

From: Xin Long <lucien.xin@gmail.com>
Date: Mon, 25 Dec 2017 14:45:12 +0800

> Commit 582442d6d5bc ("ipv6: Allow the MTU of ipip6 tunnel to be set
> below 1280") fixed a mtu setting issue. It works for ipip6 tunnel.
> 
> But ip6gre dev updates the mtu also with ip6_tnl_change_mtu. Since
> the inner packet over ip6gre can be ipv4 and it's mtu should also
> be allowed to set below 1280, the same issue also exists on ip6gre.
> 
> This patch is to fix it by simply changing to check if parms.proto
> is IPPROTO_IPV6 in ip6_tnl_change_mtu instead, to make ip6gre to
> go to 'else' branch.
> 
> Signed-off-by: Xin Long <lucien.xin@gmail.com>

Applied.

^ permalink raw reply

* Re: [RFC PATCH net-next 16/19] ipv6: Flush multipath routes when all siblings are dead
From: David Ahern @ 2018-01-02 17:38 UTC (permalink / raw)
  To: Ido Schimmel, netdev; +Cc: davem, roopa, nicolas.dichtel, mlxsw
In-Reply-To: <20171231161513.25785-17-idosch@mellanox.com>

On 12/31/17 9:15 AM, Ido Schimmel wrote:
> By default, IPv6 deletes nexthops from a multipath route when the
> nexthop device is put administratively down. This differs from IPv4
> where the nexthops are kept, but marked with the RTNH_F_DEAD flag. A
> multipath route is flushed when all of its nexthops become dead.
> 
> Align IPv6 with IPv4 and have it conform to the same guidelines.
> 
> In case the multipath route needs to be flushed, its siblings are
> flushed one by one. Otherwise, the nexthops are marked with the
> appropriate flags and the tree walker is instructed to skip all the
> siblings.
> 
> As explained in previous patches, care is taken to update the sernum of
> the affected tree nodes, so as to prevent the use of wrong dst entries.
> 
> Signed-off-by: Ido Schimmel <idosch@mellanox.com>
> ---
>  net/ipv6/route.c | 53 ++++++++++++++++++++++++++++++++++++++++++++++-------
>  1 file changed, 46 insertions(+), 7 deletions(-)
> 
> diff --git a/net/ipv6/route.c b/net/ipv6/route.c
> index ab95e07b5e74..9b142eb83f3c 100644
> --- a/net/ipv6/route.c
> +++ b/net/ipv6/route.c
> @@ -3486,8 +3486,10 @@ static int fib6_ifup(struct rt6_info *rt, void *p_arg)
>  	const struct arg_netdev_event *arg = p_arg;
>  	const struct net *net = dev_net(arg->dev);
>  
> -	if (rt != net->ipv6.ip6_null_entry && rt->dst.dev == arg->dev)
> +	if (rt != net->ipv6.ip6_null_entry && rt->dst.dev == arg->dev) {
>  		rt->rt6i_nh_flags &= ~arg->nh_flags;
> +		fib6_update_sernum_upto_root(dev_net(rt->dst.dev), rt);
> +	}
>  
>  	return 0;
>  }
> @@ -3528,6 +3530,35 @@ static void rt6_multipath_flush(struct rt6_info *rt)
>  		iter->should_flush = 1;
>  }
>  
> +static unsigned int rt6_multipath_dead_count(const struct rt6_info *rt,
> +					     const struct net_device *down_dev)
> +{
> +	struct rt6_info *iter;
> +	unsigned int dead = 0;
> +
> +	if (rt->dst.dev == down_dev || rt->rt6i_nh_flags & RTNH_F_DEAD)
> +		dead++;
> +	list_for_each_entry(iter, &rt->rt6i_siblings, rt6i_siblings)
> +		if (iter->dst.dev == down_dev ||
> +		    iter->rt6i_nh_flags & RTNH_F_DEAD)
> +			dead++;
> +
> +	return dead;
> +}
> +
> +static void rt6_multipath_nh_flags_set(struct rt6_info *rt,
> +				       const struct net_device *dev,
> +				       unsigned int nh_flags)
> +{
> +	struct rt6_info *iter;
> +
> +	if (rt->dst.dev == dev)
> +		rt->rt6i_nh_flags |= nh_flags;
> +	list_for_each_entry(iter, &rt->rt6i_siblings, rt6i_siblings)
> +		if (iter->dst.dev == dev)
> +			iter->rt6i_nh_flags |= nh_flags;
> +}
> +
>  /* called with write lock held for table with rt */
>  static int fib6_ifdown(struct rt6_info *rt, void *p_arg)
>  {
> @@ -3550,13 +3581,21 @@ static int fib6_ifdown(struct rt6_info *rt, void *p_arg)
>  		}
>  		return -2;
>  	case NETDEV_DOWN:
> -		if (rt->dst.dev != dev)
> -			break;
> -		if (rt->rt6i_nsiblings == 0 ||
> -		    !rt->rt6i_idev->cnf.ignore_routes_with_linkdown)
> +		if (rt->should_flush)
>  			return -1;
> -		rt->rt6i_nh_flags |= (RTNH_F_DEAD | RTNH_F_LINKDOWN);
> -		break;
> +		if (!rt->rt6i_nsiblings)
> +			return rt->dst.dev == dev ? -1 : 0;
> +		if (rt6_multipath_uses_dev(rt, dev)) {
> +			if (rt->rt6i_nsiblings + 1 ==
> +			    rt6_multipath_dead_count(rt, dev)) {

I'd prefer a tmp variable to make that line more readable and still
within the 80 column guideline.
			unsigned int count;

			count = rt6_multipath_dead_count(rt, dev);
			if (rt->rt6i_nsiblings + 1 == count) {


> +				rt6_multipath_flush(rt);
> +				return -1;
> +			}
> +			rt6_multipath_nh_flags_set(rt, dev, RTNH_F_DEAD |
> +						   RTNH_F_LINKDOWN);
> +			fib6_update_sernum(rt);
> +		}
> +		return -2;
>  	case NETDEV_CHANGE:
>  		if (rt->dst.dev != dev ||
>  		    rt->rt6i_flags & (RTF_LOCAL | RTF_ANYCAST))
> 

^ permalink raw reply

* Re: [patch net] mlxsw: spectrum_router: Fix NULL pointer deref
From: David Miller @ 2018-01-02 17:39 UTC (permalink / raw)
  To: jiri; +Cc: netdev, idosch, mlxsw
In-Reply-To: <20171225080254.GA1885@nanopsycho>

From: Jiri Pirko <jiri@resnulli.us>
Date: Mon, 25 Dec 2017 09:02:54 +0100

> Mon, Dec 25, 2017 at 08:57:35AM CET, jiri@resnulli.us wrote:
>>From: Ido Schimmel <idosch@mellanox.com>
>>
>>When we remove the neighbour associated with a nexthop we should always
>>refuse to write the nexthop to the adjacency table. Regardless if it is
>>already present in the table or not.
>>
>>Otherwise, we risk dereferencing the NULL pointer that was set instead
>>of the neighbour.
>>
>>Fixes: a7ff87acd995 ("mlxsw: spectrum_router: Implement next-hop routing")
>>Signed-off-by: Ido Schimmel <idosch@mellanox.com>
>>Reported-by: Alexander Petrovskiy <alexpe@mellanox.com>
>>Signed-off-by: Jiri Pirko <jiri@mellanox.com>
> 
> Dave, could you please queue this up for 4.14.y together
> with "mlxsw: spectrum: Relax sanity checks during enslavement".

Both applied and queued up for -stable.

^ permalink raw reply

* [PATCH iproute2] man: fix small formatting errors
From: Luca Boccassi @ 2018-01-02 17:42 UTC (permalink / raw)
  To: netdev

Lintian detected the following formatting errors:

 man/man8/devlink-sb.8.gz 230: warning: macro `b' not defined
 man/man8/ip-link.8.gz 1243: warning: macro `in-8' not defined
  (possibly missing space after `in')
 man/man8/tc-u32.8.gz `R' is a string (producing the registered sign),
  not a macro.

Signed-off-by: Luca Boccassi <bluca@debian.org>
---
 man/man8/devlink-sb.8 | 2 +-
 man/man8/ip-link.8.in | 2 +-
 man/man8/tc-u32.8     | 6 ++----
 3 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/man/man8/devlink-sb.8 b/man/man8/devlink-sb.8
index ffb5553e..1882833a 100644
--- a/man/man8/devlink-sb.8
+++ b/man/man8/devlink-sb.8
@@ -227,7 +227,7 @@ This command is used to browse shared buffer occupancy values. Values are showed
 current_value/max_value
 .in -16
 Note that before showing values, one has to issue
-.b occupancy snapshot
+.B occupancy snapshot
 command first.
 
 .PP
diff --git a/man/man8/ip-link.8.in b/man/man8/ip-link.8.in
index 9ddf0ffb..ff6bb9a2 100644
--- a/man/man8/ip-link.8.in
+++ b/man/man8/ip-link.8.in
@@ -1275,7 +1275,7 @@ or disable
 arptables hooks on the bridge.
 
 
-.in-8
+.in -8
 
 .TP
 MACsec Type Support
diff --git a/man/man8/tc-u32.8 b/man/man8/tc-u32.8
index e9475a93..2bf2e3e9 100644
--- a/man/man8/tc-u32.8
+++ b/man/man8/tc-u32.8
@@ -29,10 +29,8 @@ u32 \- universal 32bit traffic control filter
 .IR HANDLE " ] [ "
 .B indev
 .IR ifname " ] [ "
-.B skip_hw
-.R  "|"
-.B skip_sw
-.R " ] [ "
+.BR skip_hw " | "
+.BR skip_sw " ] [ "
 .BR help " ]"
 
 .ti -8
-- 
2.14.2

^ permalink raw reply related

* Re: [RFC PATCH net-next 13/19] ipv6: Flush all sibling routes upon NETDEV_UNREGISTER
From: David Ahern @ 2018-01-02 17:42 UTC (permalink / raw)
  To: Ido Schimmel, netdev; +Cc: davem, roopa, nicolas.dichtel, mlxsw
In-Reply-To: <20171231161513.25785-14-idosch@mellanox.com>

On 12/31/17 9:15 AM, Ido Schimmel wrote:
> IPv4 and IPv6 react differently to a netdev being unregistered. In IPv4,
> in case the netdev is used as a nexthop device in a multipath route, the
> entire route is flushed.
> 
> However, IPv6 only removes the nexthops associated with the unregistered
> netdev.
> 
> Align IPv4 and IPv6 and flush all the sibling routes when a nexthop
> device is unregistered.
> 
> Signed-off-by: Ido Schimmel <idosch@mellanox.com>
> ---
>  net/ipv6/route.c | 44 +++++++++++++++++++++++++++++++++++++++-----
>  1 file changed, 39 insertions(+), 5 deletions(-)

not so sure about this one.

When we get to nexthops as separate objects, we can bring in consistency
by allowing ipv4 routes to just drop a single nexthop in the route
versus the behavior today.

^ permalink raw reply

* Re: [bpf-next V3 PATCH 13/14] bpf: finally expose xdp_rxq_info to XDP bpf-programs
From: David Ahern @ 2018-01-02 17:47 UTC (permalink / raw)
  To: Jesper Dangaard Brouer, Daniel Borkmann, Alexei Starovoitov
  Cc: netdev, gospo, bjorn.topel, michael.chan
In-Reply-To: <151471812024.30703.13086182080575474605.stgit@firesoul>

On 12/31/17 4:02 AM, Jesper Dangaard Brouer wrote:
> Now all XDP driver have been updated to setup xdp_rxq_info and assign
> this to xdp_buff->rxq.  Thus, it is now safe to enable access to some
> of the xdp_rxq_info struct members.
> 
> This patch extend xdp_md and expose UAPI to userspace for
> ingress_ifindex and rx_queue_index.  Access happens via bpf
> instruction rewrite, that load data directly from struct xdp_rxq_info.
> 
> * ingress_ifindex map to xdp_rxq_info->dev->ifindex
> * rx_queue_index  map to xdp_rxq_info->queue_index
> 
> Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>
> ---
>  include/uapi/linux/bpf.h |    3 +++
>  net/core/filter.c        |   19 +++++++++++++++++++
>  2 files changed, 22 insertions(+)
> 
> diff --git a/include/uapi/linux/bpf.h b/include/uapi/linux/bpf.h
> index 69eabfcb9bdb..a6000a95d40e 100644
> --- a/include/uapi/linux/bpf.h
> +++ b/include/uapi/linux/bpf.h
> @@ -899,6 +899,9 @@ struct xdp_md {
>  	__u32 data;
>  	__u32 data_end;
>  	__u32 data_meta;
> +	/* Below access go though struct xdp_rxq_info */
> +	__u32 ingress_ifindex; /* rxq->dev->ifindex */
> +	__u32 rx_queue_index;  /* rxq->queue_index  */
>  };
>  
>  enum sk_action {


At some point we need to tackle the network namespace context for the
ifindex.

^ permalink raw reply

* Re: [PATCH net-next 2/2] l2tp: add peer_offset parameter
From: Guillaume Nault @ 2018-01-02 17:50 UTC (permalink / raw)
  To: James Chapman; +Cc: Lorenzo Bianconi, davem, netdev, liuhangbin
In-Reply-To: <27e0a7c8-b95b-04eb-d808-bcae67e417b1@katalix.com>

On Fri, Dec 29, 2017 at 06:53:56PM +0000, James Chapman wrote:
> On 28/12/17 19:45, Guillaume Nault wrote:
> > Here we have an option that:
> >    * creates invalid packets (AFAIK),
> >    * is buggy and leaks memory on the network,
> >    * doesn't seem to have any use case (even the manpage
> >      says "This is hardly ever used").
> > 
> > So I'm sorry, but I don't see the point in expanding this option to
> > allow even stranger setups. If there's a use case, then fine.
> > Otherwise, let's just acknowledge that the "peer_offset" option of
> > iproute2 is a noop (and maybe remove it from the manpage).
> > 
> > And the kernel "offset" option needs to be fixed. Actually, I wouldn't
> > mind if it was converted to be a noop, or even rejected. L2TP already
> > has its share of unused features that complicate the code and hamper
> > evolution and bug fixing. As I said earlier, if it's buggy, unused and
> > can't even produce valid packets, then why bothering with it?
> > 
> > But that's just my point of view. James, do you have an opinion on
> > this?
> 
> I agree, Guillaume.
> 
> The L2TPv3 protocol RFC dropped the configurable offset of L2TPv2 - instead,
> the Layer-2-Specific-Sublayer is supposed to handle any transport-specific
> data alignment requirements.
> 
Yes, and AFAIK, no RFC has ever defined an L2TPv3 sublayer using offsets.

> I think a configurable offset has found its way
> into iproute2 l2tp commands by mistake, perhaps because the netlink API
> defines an attribute for it, but which was only intended for use with
> L2TPv2.
>
Makes sense, however L2TP_ATTR_OFFSET seems to be a noop for L2TPv2 in
the current implementation.

> For L2TPv2, we only configure the offset for transmitted packets. In
> received packets, the offset (if present) is obtained from the L2TPv2 header
> in each received packet. There is no need to add a peer-offset netlink
> attribute to set the offset expected in received packets.
> 
Agreed for Rx side. I also agree on the theory for Tx, but in the current
implementation, l2tp_build_l2tpv2_header() doesn't take the session's
"offset" field into account. So, unless I've missed something,
L2TP_ATTR_OFFSET is already a noop for L2TPv2.

Not sure if it's worth handling this feature of L2TPv2. The Linux
implementation has been there for so long, and nobody ever complained
that there was no way to define an offset on Tx.

^ permalink raw reply

* [PATCH v17 0/4] Replace PCI pool by DMA pool API
From: Romain Perier @ 2018-01-02 17:53 UTC (permalink / raw)
  To: Jens Axboe, Andrew Morton, Dan Williams, Vinod Koul, Jeff Kirsher,
	Aviad Krawczyk, James E.J. Bottomley, Martin K. Petersen,
	linux-scsi, Bjorn Helgaas, linux-pci
  Cc: dmaengine, David S. Miller, netdev, linux-kernel,
	Greg Kroah-Hartman, Romain Perier

The current PCI pool API are simple macro functions direct expanded to
the appropriate dma pool functions. The prototypes are almost the same
and semantically, they are very similar. I propose to use the DMA pool
API directly and get rid of the old API.

This set of patches, replaces the old API by the dma pool API
and remove the defines.

Changes in v17:
- Rebased series onto next-20180102
- Added Acked-by tags by David S. Miller on patches 02/04
  and 03/04

Changes in v16:
- Rebased series onto next-20171215
- I have fixed patch 04/04, so it can be applied
- Added Acked-by for Bjorn Helgaas on patch 04/04

Changes in v15:
- Rebased series onto next-20171120
- Added patch 04/05 for mpt3sas scsi driver

Changes in v14:
- Rebased series onto next-20171018
- Rebased patch 03/05 on latest driver

Changes in v13:
- Rebased series onto next-20170906
- Added a new commit for the hinic ethernet driver
- Remove previously merged patches

Changes in v12:
- Rebased series onto next-20170822

Changes in v11:
- Rebased series onto next-20170809
- Removed patches 08-14, these have been merged.

Changes in v10:
- Rebased series onto next-20170706
- I have fixed and improved patch "scsi: megaraid: Replace PCI pool old API"

Changes in v9:
- Rebased series onto next-20170522
- I have fixed and improved the patch for lpfc driver

Changes in v8:
- Rebased series onto next-20170428

Changes in v7:
- Rebased series onto next-20170416
- Added Acked-by, Tested-by and Reviwed-by tags

Changes in v6:
- Fixed an issue reported by kbuild test robot about changes in DAC960
- Removed patches 15/19,16/19,17/19,18/19. They have been merged by Greg
- Added Acked-by Tags

Changes in v5:
- Re-worded the cover letter (remove sentence about checkpatch.pl)
- Rebased series onto next-20170308
- Fix typos in commit message
- Added Acked-by Tags

Changes in v4:
- Rebased series onto next-20170301
- Removed patch 20/20: checks done by checkpath.pl, no longer required.
  Thanks to Peter and Joe for their feedbacks.
- Added Reviewed-by tags

Changes in v3:
- Rebased series onto next-20170224
- Fix checkpath.pl reports for patch 11/20 and patch 12/20
- Remove prefix RFC
Changes in v2:
- Introduced patch 18/20
- Fixed cosmetic changes: spaces before brace, live over 80 characters
- Removed some of the check for NULL pointers before calling dma_pool_destroy
- Improved the regexp in checkpatch for pci_pool, thanks to Joe Perches
- Added Tested-by and Acked-by tags

Romain Perier (4):
  block: DAC960: Replace PCI pool old API
  net: e100: Replace PCI pool old API
  hinic: Replace PCI pool old API
  PCI: Remove PCI pool macro functions

 drivers/block/DAC960.c                            | 38 +++++++++++------------
 drivers/block/DAC960.h                            |  4 +--
 drivers/net/ethernet/huawei/hinic/hinic_hw_cmdq.c | 10 +++---
 drivers/net/ethernet/huawei/hinic/hinic_hw_cmdq.h |  2 +-
 drivers/net/ethernet/intel/e100.c                 | 12 +++----
 include/linux/pci.h                               |  9 ------
 6 files changed, 32 insertions(+), 43 deletions(-)

-- 
2.14.1

^ permalink raw reply

* [PATCH v17 1/4] block: DAC960: Replace PCI pool old API
From: Romain Perier @ 2018-01-02 17:53 UTC (permalink / raw)
  To: Jens Axboe, Andrew Morton, Dan Williams, Vinod Koul, Jeff Kirsher,
	Aviad Krawczyk, James E.J. Bottomley, Martin K. Petersen,
	linux-scsi, Bjorn Helgaas, linux-pci
  Cc: dmaengine, David S. Miller, netdev, linux-kernel,
	Greg Kroah-Hartman, Romain Perier
In-Reply-To: <20180102175356.7999-1-romain.perier@gmail.com>

From: Romain Perier <romain.perier@collabora.com>

The PCI pool API is deprecated. This commit replaces the PCI pool old
API by the appropriate function with the DMA pool API.

Signed-off-by: Romain Perier <romain.perier@collabora.com>
Acked-by: Peter Senna Tschudin <peter.senna@collabora.com>
Tested-by: Peter Senna Tschudin <peter.senna@collabora.com>
---
 drivers/block/DAC960.c | 38 ++++++++++++++++++--------------------
 drivers/block/DAC960.h |  4 ++--
 2 files changed, 20 insertions(+), 22 deletions(-)

diff --git a/drivers/block/DAC960.c b/drivers/block/DAC960.c
index 442e777bdfb2..df8e3a8f63ec 100644
--- a/drivers/block/DAC960.c
+++ b/drivers/block/DAC960.c
@@ -268,17 +268,17 @@ static bool DAC960_CreateAuxiliaryStructures(DAC960_Controller_T *Controller)
   void *AllocationPointer = NULL;
   void *ScatterGatherCPU = NULL;
   dma_addr_t ScatterGatherDMA;
-  struct pci_pool *ScatterGatherPool;
+  struct dma_pool *ScatterGatherPool;
   void *RequestSenseCPU = NULL;
   dma_addr_t RequestSenseDMA;
-  struct pci_pool *RequestSensePool = NULL;
+  struct dma_pool *RequestSensePool = NULL;
 
   if (Controller->FirmwareType == DAC960_V1_Controller)
     {
       CommandAllocationLength = offsetof(DAC960_Command_T, V1.EndMarker);
       CommandAllocationGroupSize = DAC960_V1_CommandAllocationGroupSize;
-      ScatterGatherPool = pci_pool_create("DAC960_V1_ScatterGather",
-		Controller->PCIDevice,
+      ScatterGatherPool = dma_pool_create("DAC960_V1_ScatterGather",
+		&Controller->PCIDevice->dev,
 	DAC960_V1_ScatterGatherLimit * sizeof(DAC960_V1_ScatterGatherSegment_T),
 	sizeof(DAC960_V1_ScatterGatherSegment_T), 0);
       if (ScatterGatherPool == NULL)
@@ -290,18 +290,18 @@ static bool DAC960_CreateAuxiliaryStructures(DAC960_Controller_T *Controller)
     {
       CommandAllocationLength = offsetof(DAC960_Command_T, V2.EndMarker);
       CommandAllocationGroupSize = DAC960_V2_CommandAllocationGroupSize;
-      ScatterGatherPool = pci_pool_create("DAC960_V2_ScatterGather",
-		Controller->PCIDevice,
+      ScatterGatherPool = dma_pool_create("DAC960_V2_ScatterGather",
+		&Controller->PCIDevice->dev,
 	DAC960_V2_ScatterGatherLimit * sizeof(DAC960_V2_ScatterGatherSegment_T),
 	sizeof(DAC960_V2_ScatterGatherSegment_T), 0);
       if (ScatterGatherPool == NULL)
 	    return DAC960_Failure(Controller,
 			"AUXILIARY STRUCTURE CREATION (SG)");
-      RequestSensePool = pci_pool_create("DAC960_V2_RequestSense",
-		Controller->PCIDevice, sizeof(DAC960_SCSI_RequestSense_T),
+      RequestSensePool = dma_pool_create("DAC960_V2_RequestSense",
+		&Controller->PCIDevice->dev, sizeof(DAC960_SCSI_RequestSense_T),
 		sizeof(int), 0);
       if (RequestSensePool == NULL) {
-	    pci_pool_destroy(ScatterGatherPool);
+	    dma_pool_destroy(ScatterGatherPool);
 	    return DAC960_Failure(Controller,
 			"AUXILIARY STRUCTURE CREATION (SG)");
       }
@@ -335,16 +335,16 @@ static bool DAC960_CreateAuxiliaryStructures(DAC960_Controller_T *Controller)
       Command->Next = Controller->FreeCommands;
       Controller->FreeCommands = Command;
       Controller->Commands[CommandIdentifier-1] = Command;
-      ScatterGatherCPU = pci_pool_alloc(ScatterGatherPool, GFP_ATOMIC,
+      ScatterGatherCPU = dma_pool_alloc(ScatterGatherPool, GFP_ATOMIC,
 							&ScatterGatherDMA);
       if (ScatterGatherCPU == NULL)
 	  return DAC960_Failure(Controller, "AUXILIARY STRUCTURE CREATION");
 
       if (RequestSensePool != NULL) {
-  	  RequestSenseCPU = pci_pool_alloc(RequestSensePool, GFP_ATOMIC,
+  	  RequestSenseCPU = dma_pool_alloc(RequestSensePool, GFP_ATOMIC,
 						&RequestSenseDMA);
   	  if (RequestSenseCPU == NULL) {
-                pci_pool_free(ScatterGatherPool, ScatterGatherCPU,
+                dma_pool_free(ScatterGatherPool, ScatterGatherCPU,
                                 ScatterGatherDMA);
     		return DAC960_Failure(Controller,
 					"AUXILIARY STRUCTURE CREATION");
@@ -379,8 +379,8 @@ static bool DAC960_CreateAuxiliaryStructures(DAC960_Controller_T *Controller)
 static void DAC960_DestroyAuxiliaryStructures(DAC960_Controller_T *Controller)
 {
   int i;
-  struct pci_pool *ScatterGatherPool = Controller->ScatterGatherPool;
-  struct pci_pool *RequestSensePool = NULL;
+  struct dma_pool *ScatterGatherPool = Controller->ScatterGatherPool;
+  struct dma_pool *RequestSensePool = NULL;
   void *ScatterGatherCPU;
   dma_addr_t ScatterGatherDMA;
   void *RequestSenseCPU;
@@ -411,9 +411,9 @@ static void DAC960_DestroyAuxiliaryStructures(DAC960_Controller_T *Controller)
 	  RequestSenseDMA = Command->V2.RequestSenseDMA;
       }
       if (ScatterGatherCPU != NULL)
-          pci_pool_free(ScatterGatherPool, ScatterGatherCPU, ScatterGatherDMA);
+          dma_pool_free(ScatterGatherPool, ScatterGatherCPU, ScatterGatherDMA);
       if (RequestSenseCPU != NULL)
-          pci_pool_free(RequestSensePool, RequestSenseCPU, RequestSenseDMA);
+          dma_pool_free(RequestSensePool, RequestSenseCPU, RequestSenseDMA);
 
       if ((Command->CommandIdentifier
 	   % Controller->CommandAllocationGroupSize) == 1) {
@@ -437,13 +437,11 @@ static void DAC960_DestroyAuxiliaryStructures(DAC960_Controller_T *Controller)
       Controller->CurrentStatusBuffer = NULL;
     }
 
-  if (ScatterGatherPool != NULL)
-  	pci_pool_destroy(ScatterGatherPool);
+  dma_pool_destroy(ScatterGatherPool);
   if (Controller->FirmwareType == DAC960_V1_Controller)
   	return;
 
-  if (RequestSensePool != NULL)
-	pci_pool_destroy(RequestSensePool);
+  dma_pool_destroy(RequestSensePool);
 
   for (i = 0; i < DAC960_MaxLogicalDrives; i++) {
 	kfree(Controller->V2.LogicalDeviceInformation[i]);
diff --git a/drivers/block/DAC960.h b/drivers/block/DAC960.h
index 6a6226a2b932..21aff470d268 100644
--- a/drivers/block/DAC960.h
+++ b/drivers/block/DAC960.h
@@ -2316,7 +2316,7 @@ typedef struct DAC960_Controller
   bool SuppressEnclosureMessages;
   struct timer_list MonitoringTimer;
   struct gendisk *disks[DAC960_MaxLogicalDrives];
-  struct pci_pool *ScatterGatherPool;
+  struct dma_pool *ScatterGatherPool;
   DAC960_Command_T *FreeCommands;
   unsigned char *CombinedStatusBuffer;
   unsigned char *CurrentStatusBuffer;
@@ -2429,7 +2429,7 @@ typedef struct DAC960_Controller
       bool NeedDeviceSerialNumberInformation;
       bool StartLogicalDeviceInformationScan;
       bool StartPhysicalDeviceInformationScan;
-      struct pci_pool *RequestSensePool;
+      struct dma_pool *RequestSensePool;
 
       dma_addr_t	FirstCommandMailboxDMA;
       DAC960_V2_CommandMailbox_T *FirstCommandMailbox;
-- 
2.14.1

^ permalink raw reply related

* [PATCH v17 2/4] net: e100: Replace PCI pool old API
From: Romain Perier @ 2018-01-02 17:53 UTC (permalink / raw)
  To: Jens Axboe, Andrew Morton, Dan Williams, Vinod Koul, Jeff Kirsher,
	Aviad Krawczyk, James E.J. Bottomley, Martin K. Petersen,
	linux-scsi, Bjorn Helgaas, linux-pci
  Cc: dmaengine, David S. Miller, netdev, linux-kernel,
	Greg Kroah-Hartman, Romain Perier
In-Reply-To: <20180102175356.7999-1-romain.perier@gmail.com>

From: Romain Perier <romain.perier@collabora.com>

The PCI pool API is deprecated. This commit replaces the PCI pool old
API by the appropriate function with the DMA pool API.

Signed-off-by: Romain Perier <romain.perier@collabora.com>
Acked-by: Peter Senna Tschudin <peter.senna@collabora.com>
Acked-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Acked-by: David S. Miller <davem@davemloft.net>
Tested-by: Peter Senna Tschudin <peter.senna@collabora.com>
---
 drivers/net/ethernet/intel/e100.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/net/ethernet/intel/e100.c b/drivers/net/ethernet/intel/e100.c
index 44b3937f7e81..29486478836e 100644
--- a/drivers/net/ethernet/intel/e100.c
+++ b/drivers/net/ethernet/intel/e100.c
@@ -607,7 +607,7 @@ struct nic {
 	struct mem *mem;
 	dma_addr_t dma_addr;
 
-	struct pci_pool *cbs_pool;
+	struct dma_pool *cbs_pool;
 	dma_addr_t cbs_dma_addr;
 	u8 adaptive_ifs;
 	u8 tx_threshold;
@@ -1892,7 +1892,7 @@ static void e100_clean_cbs(struct nic *nic)
 			nic->cb_to_clean = nic->cb_to_clean->next;
 			nic->cbs_avail++;
 		}
-		pci_pool_free(nic->cbs_pool, nic->cbs, nic->cbs_dma_addr);
+		dma_pool_free(nic->cbs_pool, nic->cbs, nic->cbs_dma_addr);
 		nic->cbs = NULL;
 		nic->cbs_avail = 0;
 	}
@@ -1910,7 +1910,7 @@ static int e100_alloc_cbs(struct nic *nic)
 	nic->cb_to_use = nic->cb_to_send = nic->cb_to_clean = NULL;
 	nic->cbs_avail = 0;
 
-	nic->cbs = pci_pool_zalloc(nic->cbs_pool, GFP_KERNEL,
+	nic->cbs = dma_pool_zalloc(nic->cbs_pool, GFP_KERNEL,
 				   &nic->cbs_dma_addr);
 	if (!nic->cbs)
 		return -ENOMEM;
@@ -2960,8 +2960,8 @@ static int e100_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 		netif_err(nic, probe, nic->netdev, "Cannot register net device, aborting\n");
 		goto err_out_free;
 	}
-	nic->cbs_pool = pci_pool_create(netdev->name,
-			   nic->pdev,
+	nic->cbs_pool = dma_pool_create(netdev->name,
+			   &nic->pdev->dev,
 			   nic->params.cbs.max * sizeof(struct cb),
 			   sizeof(u32),
 			   0);
@@ -3001,7 +3001,7 @@ static void e100_remove(struct pci_dev *pdev)
 		unregister_netdev(netdev);
 		e100_free(nic);
 		pci_iounmap(pdev, nic->csr);
-		pci_pool_destroy(nic->cbs_pool);
+		dma_pool_destroy(nic->cbs_pool);
 		free_netdev(netdev);
 		pci_release_regions(pdev);
 		pci_disable_device(pdev);
-- 
2.14.1

^ permalink raw reply related

* [PATCH v17 3/4] hinic: Replace PCI pool old API
From: Romain Perier @ 2018-01-02 17:53 UTC (permalink / raw)
  To: Jens Axboe, Andrew Morton, Dan Williams, Vinod Koul, Jeff Kirsher,
	Aviad Krawczyk, James E.J. Bottomley, Martin K. Petersen,
	linux-scsi, Bjorn Helgaas, linux-pci
  Cc: dmaengine, David S. Miller, netdev, linux-kernel,
	Greg Kroah-Hartman, Romain Perier
In-Reply-To: <20180102175356.7999-1-romain.perier@gmail.com>

From: Romain Perier <romain.perier@collabora.com>

The PCI pool API is deprecated. This commit replaces the PCI pool old
API by the appropriate function with the DMA pool API.

Signed-off-by: Romain Perier <romain.perier@collabora.com>
Acked-by: David S. Miller <davem@davemloft.net>
---
 drivers/net/ethernet/huawei/hinic/hinic_hw_cmdq.c | 10 +++++-----
 drivers/net/ethernet/huawei/hinic/hinic_hw_cmdq.h |  2 +-
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/net/ethernet/huawei/hinic/hinic_hw_cmdq.c b/drivers/net/ethernet/huawei/hinic/hinic_hw_cmdq.c
index 7d95f0866fb0..28a81ac97af5 100644
--- a/drivers/net/ethernet/huawei/hinic/hinic_hw_cmdq.c
+++ b/drivers/net/ethernet/huawei/hinic/hinic_hw_cmdq.c
@@ -143,7 +143,7 @@ int hinic_alloc_cmdq_buf(struct hinic_cmdqs *cmdqs,
 	struct hinic_hwif *hwif = cmdqs->hwif;
 	struct pci_dev *pdev = hwif->pdev;
 
-	cmdq_buf->buf = pci_pool_alloc(cmdqs->cmdq_buf_pool, GFP_KERNEL,
+	cmdq_buf->buf = dma_pool_alloc(cmdqs->cmdq_buf_pool, GFP_KERNEL,
 				       &cmdq_buf->dma_addr);
 	if (!cmdq_buf->buf) {
 		dev_err(&pdev->dev, "Failed to allocate cmd from the pool\n");
@@ -161,7 +161,7 @@ int hinic_alloc_cmdq_buf(struct hinic_cmdqs *cmdqs,
 void hinic_free_cmdq_buf(struct hinic_cmdqs *cmdqs,
 			 struct hinic_cmdq_buf *cmdq_buf)
 {
-	pci_pool_free(cmdqs->cmdq_buf_pool, cmdq_buf->buf, cmdq_buf->dma_addr);
+	dma_pool_free(cmdqs->cmdq_buf_pool, cmdq_buf->buf, cmdq_buf->dma_addr);
 }
 
 static unsigned int cmdq_wqe_size_from_bdlen(enum bufdesc_len len)
@@ -875,7 +875,7 @@ int hinic_init_cmdqs(struct hinic_cmdqs *cmdqs, struct hinic_hwif *hwif,
 	int err;
 
 	cmdqs->hwif = hwif;
-	cmdqs->cmdq_buf_pool = pci_pool_create("hinic_cmdq", pdev,
+	cmdqs->cmdq_buf_pool = dma_pool_create("hinic_cmdq", &pdev->dev,
 					       HINIC_CMDQ_BUF_SIZE,
 					       HINIC_CMDQ_BUF_SIZE, 0);
 	if (!cmdqs->cmdq_buf_pool)
@@ -916,7 +916,7 @@ int hinic_init_cmdqs(struct hinic_cmdqs *cmdqs, struct hinic_hwif *hwif,
 	devm_kfree(&pdev->dev, cmdqs->saved_wqs);
 
 err_saved_wqs:
-	pci_pool_destroy(cmdqs->cmdq_buf_pool);
+	dma_pool_destroy(cmdqs->cmdq_buf_pool);
 	return err;
 }
 
@@ -942,5 +942,5 @@ void hinic_free_cmdqs(struct hinic_cmdqs *cmdqs)
 
 	devm_kfree(&pdev->dev, cmdqs->saved_wqs);
 
-	pci_pool_destroy(cmdqs->cmdq_buf_pool);
+	dma_pool_destroy(cmdqs->cmdq_buf_pool);
 }
diff --git a/drivers/net/ethernet/huawei/hinic/hinic_hw_cmdq.h b/drivers/net/ethernet/huawei/hinic/hinic_hw_cmdq.h
index b35583400cb6..23f8d39eab68 100644
--- a/drivers/net/ethernet/huawei/hinic/hinic_hw_cmdq.h
+++ b/drivers/net/ethernet/huawei/hinic/hinic_hw_cmdq.h
@@ -157,7 +157,7 @@ struct hinic_cmdq {
 struct hinic_cmdqs {
 	struct hinic_hwif       *hwif;
 
-	struct pci_pool         *cmdq_buf_pool;
+	struct dma_pool         *cmdq_buf_pool;
 
 	struct hinic_wq         *saved_wqs;
 
-- 
2.14.1

^ permalink raw reply related

* [PATCH v17 4/4] PCI: Remove PCI pool macro functions
From: Romain Perier @ 2018-01-02 17:53 UTC (permalink / raw)
  To: Jens Axboe, Andrew Morton, Dan Williams, Vinod Koul, Jeff Kirsher,
	Aviad Krawczyk, James E.J. Bottomley, Martin K. Petersen,
	linux-scsi, Bjorn Helgaas, linux-pci
  Cc: dmaengine, David S. Miller, netdev, linux-kernel,
	Greg Kroah-Hartman, Romain Perier
In-Reply-To: <20180102175356.7999-1-romain.perier@gmail.com>

From: Romain Perier <romain.perier@collabora.com>

Now that all the drivers use dma pool API, we can remove the macro
functions for PCI pool.

Signed-off-by: Romain Perier <romain.perier@collabora.com>
Reviewed-by: Peter Senna Tschudin <peter.senna@collabora.com>
Acked-by: Bjorn Helgaas <bhelgaas@google.com>
---
 include/linux/pci.h | 9 ---------
 1 file changed, 9 deletions(-)

diff --git a/include/linux/pci.h b/include/linux/pci.h
index 66cca1c6f742..c5dd05021b14 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -1314,15 +1314,6 @@ int pci_set_vga_state(struct pci_dev *pdev, bool decode,
 #include <linux/pci-dma.h>
 #include <linux/dmapool.h>
 
-#define	pci_pool dma_pool
-#define pci_pool_create(name, pdev, size, align, allocation) \
-		dma_pool_create(name, &pdev->dev, size, align, allocation)
-#define	pci_pool_destroy(pool) dma_pool_destroy(pool)
-#define	pci_pool_alloc(pool, flags, handle) dma_pool_alloc(pool, flags, handle)
-#define	pci_pool_zalloc(pool, flags, handle) \
-		dma_pool_zalloc(pool, flags, handle)
-#define	pci_pool_free(pool, vaddr, addr) dma_pool_free(pool, vaddr, addr)
-
 struct msix_entry {
 	u32	vector;	/* Kernel uses to write allocated vector */
 	u16	entry;	/* Driver uses to specify entry, OS writes */
-- 
2.14.1

^ permalink raw reply related

* Re: [patch net-next v2 00/10] Add support for resource abstraction
From: David Ahern @ 2018-01-02 18:05 UTC (permalink / raw)
  To: Arkadi Sharshevsky, Jiri Pirko, netdev, roopa
  Cc: davem, mlxsw, andrew, vivien.didelot, f.fainelli, michael.chan,
	ganeshgr, saeedm, matanb, leonro, idosch, jakub.kicinski, ast,
	daniel, simon.horman, pieter.jansenvanvuuren, john.hurley,
	alexander.h.duyck, linville, gospo, steven.lin1, yuvalm, ogerlitz
In-Reply-To: <977652df-a0ed-d1a5-f299-1dc433ebd337@mellanox.com>

On 1/1/18 7:58 AM, Arkadi Sharshevsky wrote:
> 
> Just to summarize the current fixes required:
> 
> 1. ERIF dpipe table size is reporting wrong size. More precisely the
>    ERIF table does not take rifs, so it should not be linked to the rif
>    bank resource (is not part of this patchset, future extension).
> 2. Extended ACK user-space bug.
> 3. ABI documentation- Not sure we agreed upon it, Jiri?
> 
> If I missed something please respond. Nothing of the fixes mentioned
> above is relevant for this patchset actually.
> 

Can you fix the userspace command and then we come back to what else is
needed? Right now, it is hard to tell what is a user space bug and what
is a kernel space bug.

For example:
$ devlink resource set pci/0000:03:00.0 path /kvd/linear size 10000
$ devlink resource show pci/0000:03:00.0
pci/0000:03:00.0:
  name kvd size 245760 size_valid true
  resources:
    name linear size 98304 occ 0
    name hash_double size 60416
    name hash_single size 87040

The set command did not fail, yet there is no size_new arg in the output
like there is for this change:

$ devlink resource set pci/0000:03:00.0 path /kvd/linear size 0
$ devlink resource show pci/0000:03:00.0
pci/0000:03:00.0:
  name kvd size 245760 size_valid true
  resources:
    name linear size 98304 size_new 0 occ 0
    name hash_double size 60416
    name hash_single size 87040

^ permalink raw reply

* Re: [PATCH net-next 2/2] l2tp: add peer_offset parameter
From: Guillaume Nault @ 2018-01-02 18:05 UTC (permalink / raw)
  To: Lorenzo Bianconi; +Cc: James Chapman, David S. Miller, netdev, Hangbin Liu
In-Reply-To: <CAJ0CqmWc_-L1mXqBEDJ=UWsbJ9b-Xeug2q4MVwM_EcmTsOZyeA@mail.gmail.com>

> > Lorenzo, is this being added to fix interoperability with another L2TPv3
> > implementation? If so, can you share more details?
> >
> 
> Hi James,
> 
> I introduced peer_offset parameter to fix a specific setup where
> tunnel endpoints
> running L2TPv3 would use different values for tx offset (since in
> iproute2 there is no
> restriction on it), not to fix a given an interoperability issue.
> 
Yes, but was it just to test iproute2's peer_offset option? Or is there
a plan to use it for real?

> I introduced this feature since:
>  - offset has been added for long time to L2TPv3 implementation
>    (commit f7faffa3ff8ef6ae712ef16312b8a2aa7a1c95fe and
>    commit 309795f4bec2d69cd507a631f82065c2198a0825) and I wanted to
> preserve UABI
>  - have the same degree of freedom for offset parameter we have in
> L2TPv2 and fix the issue
>    described above
> 
AFAIU, the current L2TPv2 implementation never sets the offset field
and nobody ever realised.

> Now what we can do I guess is:
> - as suggested by Guillaume drop completely the offset support without removing
>   netlink attribute in order to not break UABI
> - fix offset support initializing properly padding bits
> 
I'd go for the first one. I just wonder if that looks acceptable to
David an James.

^ permalink raw reply

* Re: [patch net-next 0/2] net: sched: Fix RED qdisc offload flag
From: David Miller @ 2018-01-02 18:18 UTC (permalink / raw)
  To: nogahf; +Cc: netdev, jhs, xiyou.wangcong, jiri, mlxsw
In-Reply-To: <1514191902-53752-1-git-send-email-nogahf@mellanox.com>

From: Nogah Frankel <nogahf@mellanox.com>
Date: Mon, 25 Dec 2017 10:51:40 +0200

> Replacing the RED offload flag (TC_RED_OFFLOADED) with the generic one
> (TCQ_F_OFFLOADED) deleted some of the logic behind it. This patchset fixes
> this problem.

Series applied, thank you.

^ permalink raw reply

* Re: [PATCH V2 net-next] selftests/net: fix bugs in address and port initialization
From: David Miller @ 2018-01-02 18:27 UTC (permalink / raw)
  To: sowmini.varadhan; +Cc: netdev, willemdebruijn.kernel, willemb
In-Reply-To: <1514241784-115652-1-git-send-email-sowmini.varadhan@oracle.com>

From: Sowmini Varadhan <sowmini.varadhan@oracle.com>
Date: Mon, 25 Dec 2017 14:43:04 -0800

> Address/port initialization should work correctly regardless
> of the order in which command line arguments are supplied,
> E.g, cfg_port should be used to connect to the remote host
> even if it is processed after -D, src/dst address initialization
> should not require that [-4|-6] be specified before
> the -S or -D args, receiver should be able to bind to *.<cfg_port>
> 
> Achieve this by making sure that the address/port structures
> are initialized after all command line options are parsed.
> 
> Store cfg_port in host-byte order, and use htons()
> to set up the sin_port/sin6_port before bind/connect,
> so that the network system calls get the correct values
> in network-byte order.
> 
> Signed-off-by: Sowmini Varadhan <sowmini.varadhan@oracle.com>

Applied, thank you.

^ permalink raw reply

* Re: [PATCH net] net/sched: Fix update of lastuse in act modules implementing stats_update
From: David Miller @ 2018-01-02 18:28 UTC (permalink / raw)
  To: roid; +Cc: netdev, paulb, jiri, xiyou.wangcong, jhs, ogerlitz
In-Reply-To: <1514267331-18753-1-git-send-email-roid@mellanox.com>

From: Roi Dayan <roid@mellanox.com>
Date: Tue, 26 Dec 2017 07:48:51 +0200

> We need to update lastuse to to the most updated value between what
> is already set and the new value.
> If HW matching fails, i.e. because of an issue, the stats are not updated
> but it could be that software did match and updated lastuse.
> 
> Fixes: 5712bf9c5c30 ("net/sched: act_mirred: Use passed lastuse argument")
> Fixes: 9fea47d93bcc ("net/sched: act_gact: Update statistics when offloaded to hardware")
> Signed-off-by: Roi Dayan <roid@mellanox.com>
> Reviewed-by: Paul Blakey <paulb@mellanox.com>
> Acked-by: Jiri Pirko <jiri@mellanox.com>

Applied and queued up for -stable.

^ permalink raw reply

* Re: [PATCH net-next 1/1] forcedeth: optimize the rx with likely
From: David Miller @ 2018-01-02 18:30 UTC (permalink / raw)
  To: yanjun.zhu; +Cc: keescook, netdev
In-Reply-To: <1514269370-29241-1-git-send-email-yanjun.zhu@oracle.com>

From: Zhu Yanjun <yanjun.zhu@oracle.com>
Date: Tue, 26 Dec 2017 01:22:50 -0500

> In the rx fastpath, the function netdev_alloc_skb rarely fails.
> Therefore, a likely() optimization is added to this error check
> conditional.
> 
> CC: Srinivas Eeda <srinivas.eeda@oracle.com>
> CC: Joe Jin <joe.jin@oracle.com>
> CC: Junxiao Bi <junxiao.bi@oracle.com>
> Signed-off-by: Zhu Yanjun <yanjun.zhu@oracle.com>

Applied.

^ permalink raw reply

* Re: [PATCH net] macvlan: Fix one possible double free
From: David Miller @ 2018-01-02 18:30 UTC (permalink / raw)
  To: gfree.wind; +Cc: netdev
In-Reply-To: <1514295872-120876-1-git-send-email-gfree.wind@vip.163.com>

aFrom: gfree.wind@vip.163.com
Date: Tue, 26 Dec 2017 21:44:32 +0800

> From: Gao Feng <gfree.wind@vip.163.com>
> 
> Because the macvlan_uninit would free the macvlan port, so there is one
> double free case in macvlan_common_newlink. When the macvlan port is just
> created, then register_netdevice or netdev_upper_dev_link failed and they
> would invoke macvlan_uninit. Then it would reach the macvlan_port_destroy
> which triggers the double free.
> 
> Signed-off-by: Gao Feng <gfree.wind@vip.163.com>

Applied.

^ permalink raw reply

* Re: [net-next PATCH] net: ptr_ring: otherwise safe empty checks can overrun array bounds
From: David Miller @ 2018-01-02 18:33 UTC (permalink / raw)
  To: mst; +Cc: john.fastabend, jakub.kicinski, xiyou.wangcong, jiri, netdev
In-Reply-To: <20180102190107-mutt-send-email-mst@kernel.org>

From: "Michael S. Tsirkin" <mst@redhat.com>
Date: Tue, 2 Jan 2018 19:01:33 +0200

> On Tue, Jan 02, 2018 at 11:52:19AM -0500, David Miller wrote:
>> From: John Fastabend <john.fastabend@gmail.com>
>> Date: Wed, 27 Dec 2017 19:50:25 -0800
>> 
>> > When running consumer and/or producer operations and empty checks in
>> > parallel its possible to have the empty check run past the end of the
>> > array. The scenario occurs when an empty check is run while
>> > __ptr_ring_discard_one() is in progress. Specifically after the
>> > consumer_head is incremented but before (consumer_head >= ring_size)
>> > check is made and the consumer head is zeroe'd.
>> > 
>> > To resolve this, without having to rework how consumer/producer ops
>> > work on the array, simply add an extra dummy slot to the end of the
>> > array. Even if we did a rework to avoid the extra slot it looks
>> > like the normal case checks would suffer some so best to just
>> > allocate an extra pointer.
>> > 
>> > Reported-by: Jakub Kicinski <jakub.kicinski@netronome.com>
>> > Fixes: c5ad119fb6c09 ("net: sched: pfifo_fast use skb_array")
>> > Signed-off-by: John Fastabend <john.fastabend@gmail.com>
>> 
>> Applied, thanks John.
> 
> I think that patch is wrong. I'd rather it got reverted.

I agree with John's logic, the asynchronous test is always safe in
this parallel access case and John's change solves the out-of-bounds
test.

If you propose a cleaner way to handle this as a follow-on patch I'll
be happy to consider it.

Thanks.

^ permalink raw reply

* Re: [PATCH net-next] selftests: rtnetlink: add erspan and ip6erspan
From: David Miller @ 2018-01-02 18:38 UTC (permalink / raw)
  To: u9012063; +Cc: netdev
In-Reply-To: <1514315407-13721-1-git-send-email-u9012063@gmail.com>

From: William Tu <u9012063@gmail.com>
Date: Tue, 26 Dec 2017 11:10:07 -0800

> Add test cases for ipv4, ipv6 erspan, v1 and v2 native mode
> and external (collect metadata) mode.
> 
> Signed-off-by: William Tu <u9012063@gmail.com>

Applied.

^ permalink raw reply

* Re: [PATCH net] phylink: ensure we report link down when LOS asserted
From: David Miller @ 2018-01-02 18:41 UTC (permalink / raw)
  To: rmk+kernel; +Cc: andrew, f.fainelli, netdev
In-Reply-To: <E1eTyRE-0007ZC-Ap@rmk-PC.armlinux.org.uk>

From: Russell King <rmk+kernel@armlinux.org.uk>
Date: Tue, 26 Dec 2017 23:15:12 +0000

> Although we disable the netdev carrier, we fail to report in the kernel
> log that the link went down.  Fix this.
> 
> Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>

Applied and queued up for -stable.

^ permalink raw reply

* Re: [PATCH net] sfp: fix sfp-bus oops when removing socket/upstream
From: David Miller @ 2018-01-02 18:41 UTC (permalink / raw)
  To: rmk+kernel; +Cc: andrew, f.fainelli, netdev
In-Reply-To: <E1eTyRJ-0007ZJ-IS@rmk-PC.armlinux.org.uk>

From: Russell King <rmk+kernel@armlinux.org.uk>
Date: Tue, 26 Dec 2017 23:15:17 +0000

> When we remove a socket or upstream, and the other side isn't
> registered, we dereference a NULL pointer, causing a kernel oops.
> Fix this.
> 
> Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>

Applied and queued up for -stable.

^ permalink raw reply

* Re: [PATCH net-next] cxgb4: use CLIP with LIP6 on T6 for TCAM filters
From: David Miller @ 2018-01-02 18:44 UTC (permalink / raw)
  To: ganeshgr; +Cc: netdev, nirranjan, indranil, venkatesh, kumaras
In-Reply-To: <1514360577-28836-1-git-send-email-ganeshgr@chelsio.com>

From: Ganesh Goudar <ganeshgr@chelsio.com>
Date: Wed, 27 Dec 2017 13:12:57 +0530

> On T6, LIP compression is always enabled for IPv6 and uncompressed
> IPv6 for LIP is not supported. So, for IPv6 TCAM filters on T6,
> add LIP6 to CLIP on filter creation, and release the same on filter
> deletion.
> 
> Signed-off-by: Kumar Sanghvi <kumaras@chelsio.com>
> Signed-off-by: Ganesh Goudar <ganeshgr@chelsio.com>

Applied, thank you.

^ 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