Netdev List
 help / color / mirror / Atom feed
* Re: [PATCH net-next v4 00/10] net: dsa: Support for pdata in dsa2
From: David Miller @ 2017-01-18 21:50 UTC (permalink / raw)
  To: f.fainelli
  Cc: netdev, jason, andrew, sebastian.hesselbarth, gregory.clement,
	linux, vivien.didelot, gregkh, linux-arm-kernel, linux-kernel
In-Reply-To: <20170117232152.1661-1-f.fainelli@gmail.com>

From: Florian Fainelli <f.fainelli@gmail.com>
Date: Tue, 17 Jan 2017 15:21:42 -0800

> This is not exactly new, and was sent before, although back then, I did not
> have an user of the pre-declared MDIO board information, but now we do. Note
> that I have additional changes queued up to have b53 register platform data for
> MIPS bcm47xx and bcm63xx.
 ...

We're waiting for Greg's further review and Vivien's changes which I just
applied are going to create some conflicts, so I am presuming that you will
respin a v5 anyways.

^ permalink raw reply

* Re: [PATCH net-next 2/2] net: dsa: use cpu_switch instead of ds[0]
From: David Miller @ 2017-01-18 21:50 UTC (permalink / raw)
  To: vivien.didelot; +Cc: netdev, linux-kernel, kernel, f.fainelli, andrew
In-Reply-To: <20170118014139.31417-2-vivien.didelot@savoirfairelinux.com>

From: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Date: Tue, 17 Jan 2017 20:41:39 -0500

> Now that the DSA Ethernet switches are true Linux devices, the CPU
> switch is not necessarily the first one. If its address is higher than
> the second switch on the same MDIO bus, its index will be 1, not 0.
> 
> Avoid any confusion by using dst->cpu_switch instead of dst->ds[0].
> 
> Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>

Applied.

^ permalink raw reply

* Re: [PATCH net-next 1/2] net: dsa: store CPU switch structure in the tree
From: David Miller @ 2017-01-18 21:50 UTC (permalink / raw)
  To: vivien.didelot; +Cc: netdev, linux-kernel, kernel, f.fainelli, andrew
In-Reply-To: <20170118014139.31417-1-vivien.didelot@savoirfairelinux.com>

From: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Date: Tue, 17 Jan 2017 20:41:38 -0500

> Store a dsa_switch pointer to the CPU switch in the tree instead of only
> its index. This avoids the need to initialize it to -1.
> 
> Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>

Applied.

^ permalink raw reply

* Re: [PATCH RFC] net: dsa: remove unnecessary phy.h include
From: David Miller @ 2017-01-18 21:48 UTC (permalink / raw)
  To: linux; +Cc: andrew, vivien.didelot, f.fainelli, netdev, linux-kernel
In-Reply-To: <20170118214628.GO27312@n2100.armlinux.org.uk>

From: Russell King - ARM Linux <linux@armlinux.org.uk>
Date: Wed, 18 Jan 2017 21:46:28 +0000

> On Wed, Jan 18, 2017 at 04:37:14PM -0500, David Miller wrote:
>> From: Russell King - ARM Linux <linux@armlinux.org.uk>
>> Date: Wed, 18 Jan 2017 00:14:03 +0000
>> 
>> > Including phy.h and phy_fixed.h into net/dsa.h causes phy*.h to be an
>> > unnecessary dependency for quite a large amount of the kernel.  There's
>> > very little which actually requires definitions from phy.h in net/dsa.h
>> > - the include itself only wants the declaration of a couple of
>> > structures and IFNAMSIZ.
>> > 
>> > Add linux/if.h for IFNAMSIZ, declarations for the structures, phy.h to
>> > mv88e6xxx.h as it needs it for phy_interface_t, and remove both phy.h
>> > and phy_fixed.h from net/dsa.h.
>> > 
>> > This patch reduces from around 800 files rebuilt to around 40 - even
>> > with ccache, the time difference is noticable.
>> > 
>> > Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
>> 
>> Applied, thanks.
> 
> Hmm, now that's _really_ interesting.

It got reviewed-by and seemed reasonable.

I am always allowed to use my judgment to turn an RFC into a patch
I actually apply, especially when other developers review the change.

If you read your email now you'll see that I reverted it before
pushing it out, because of the fallout you mention.

^ permalink raw reply

* Re: [PATCH RFC] net: dsa: remove unnecessary phy.h include
From: David Miller @ 2017-01-18 21:47 UTC (permalink / raw)
  To: linux; +Cc: andrew, vivien.didelot, f.fainelli, netdev, linux-kernel
In-Reply-To: <20170118.163714.6755964924380784.davem@davemloft.net>

From: David Miller <davem@davemloft.net>
Date: Wed, 18 Jan 2017 16:37:14 -0500 (EST)

> From: Russell King - ARM Linux <linux@armlinux.org.uk>
> Date: Wed, 18 Jan 2017 00:14:03 +0000
> 
>> Including phy.h and phy_fixed.h into net/dsa.h causes phy*.h to be an
>> unnecessary dependency for quite a large amount of the kernel.  There's
>> very little which actually requires definitions from phy.h in net/dsa.h
>> - the include itself only wants the declaration of a couple of
>> structures and IFNAMSIZ.
>> 
>> Add linux/if.h for IFNAMSIZ, declarations for the structures, phy.h to
>> mv88e6xxx.h as it needs it for phy_interface_t, and remove both phy.h
>> and phy_fixed.h from net/dsa.h.
>> 
>> This patch reduces from around 800 files rebuilt to around 40 - even
>> with ccache, the time difference is noticable.
>> 
>> Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
> 
> Applied, thanks.

Acutallly, I'm reverting this, it breaks the build all over the place.

The problem is that it seems that somehow we are getting an implicit
module.h include via phy.h and this propagates all over the tree.  So
I get failures like:

net/core/netprio_cgroup.c:303:16: error: expected declaration specifiers or ‘...’ before string constant
 MODULE_LICENSE("GPL v2");
 ...
net/sunrpc/xprtrdma/svc_rdma_backchannel.c: In function ‘xprt_rdma_bc_put’:
net/sunrpc/xprtrdma/svc_rdma_backchannel.c:277:2: error: implicit declaration of function ‘module_put’ [-Werror=implicit-function-declaration]
  module_put(THIS_MODULE);
  ^
net/sunrpc/xprtrdma/svc_rdma_backchannel.c: In function ‘xprt_setup_rdma_bc’:
net/sunrpc/xprtrdma/svc_rdma_backchannel.c:348:7: error: implicit declaration of function ‘try_module_get’ [-Werror=implicit-function-declaration]
  if (!try_module_get(THIS_MODULE))

Please resubmit this after you can successfully complete an allmodconfig build.

Thanks.

^ permalink raw reply

* Re: [PATCH RFC] net: dsa: remove unnecessary phy.h include
From: Russell King - ARM Linux @ 2017-01-18 21:46 UTC (permalink / raw)
  To: David Miller; +Cc: andrew, vivien.didelot, f.fainelli, netdev, linux-kernel
In-Reply-To: <20170118.163714.6755964924380784.davem@davemloft.net>

On Wed, Jan 18, 2017 at 04:37:14PM -0500, David Miller wrote:
> From: Russell King - ARM Linux <linux@armlinux.org.uk>
> Date: Wed, 18 Jan 2017 00:14:03 +0000
> 
> > Including phy.h and phy_fixed.h into net/dsa.h causes phy*.h to be an
> > unnecessary dependency for quite a large amount of the kernel.  There's
> > very little which actually requires definitions from phy.h in net/dsa.h
> > - the include itself only wants the declaration of a couple of
> > structures and IFNAMSIZ.
> > 
> > Add linux/if.h for IFNAMSIZ, declarations for the structures, phy.h to
> > mv88e6xxx.h as it needs it for phy_interface_t, and remove both phy.h
> > and phy_fixed.h from net/dsa.h.
> > 
> > This patch reduces from around 800 files rebuilt to around 40 - even
> > with ccache, the time difference is noticable.
> > 
> > Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
> 
> Applied, thanks.

Hmm, now that's _really_ interesting.

I think you've said to others to send patches with RFC in them when they
aren't to be applied.  I sent this with RFC in, and it still got applied.

This is _really_ unfortunate, as the 0-day builder has been sending me a
stream of build errors over it, and I now have a branch with 9 patches
plus this one in fixing those errors...

And I did say in the comments below the --- that it should be left a few
days for the 0-day builder to run through it and find those errors.

Ho hum.

-- 
RMK's Patch system: http://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up
according to speedtest.net.

^ permalink raw reply

* Re: [RFC] RESEND - rdmatool - tool for RDMA users
From: Bart Van Assche @ 2017-01-18 21:45 UTC (permalink / raw)
  To: Jason Gunthorpe, Or Gerlitz
  Cc: Leon Romanovsky, Ariel Almog, linux-rdma@vger.kernel.org,
	Linux Netdev List
In-Reply-To: <20170118183127.GC14198@obsidianresearch.com>

On 01/18/2017 10:31 AM, Jason Gunthorpe wrote:
> I think it depends on what this tool is supposed to cover, but based
> on the description, I would start with netlink-only.
> 
> The only place verbs covers a similar ground is in 'device
> capabilities' - for some of that you might want to open a new-uAPI
> verbs fd, but even the capability data from that would not be
> totally offensive to be accessed over netlink.
> 
> IMHO netlink should cover almost everything found in sysfs today.

We would need a very strong argument to introduce a netlink API that
duplicates existing sysfs API functionality. Since the sysfs API is
extensible, why not extend that API further? E.g. the SCST sysfs API
shows that more is possible with sysfs than what most kernel drivers
realize.

Bart.

^ permalink raw reply

* [PATCH] net: qcom/emac: claim the irq only when the device is opened
From: Timur Tabi @ 2017-01-18 21:42 UTC (permalink / raw)
  To: David Miller, netdev

During reset, functions emac_mac_down() and emac_mac_up() are called,
so we don't want to free and claim the IRQ unnecessarily.  Move those
operations to open/close.

Signed-off-by: Timur Tabi <timur@codeaurora.org>
---
 drivers/net/ethernet/qualcomm/emac/emac-mac.c | 14 --------------
 drivers/net/ethernet/qualcomm/emac/emac.c     | 12 ++++++++++++
 drivers/net/ethernet/qualcomm/emac/emac.h     |  1 -
 3 files changed, 12 insertions(+), 15 deletions(-)

diff --git a/drivers/net/ethernet/qualcomm/emac/emac-mac.c b/drivers/net/ethernet/qualcomm/emac/emac-mac.c
index 384e1be..ab3a3c0 100644
--- a/drivers/net/ethernet/qualcomm/emac/emac-mac.c
+++ b/drivers/net/ethernet/qualcomm/emac/emac-mac.c
@@ -314,8 +314,6 @@ struct emac_skb_cb {
 	RX_PKT_INT2     |\
 	RX_PKT_INT3)
 
-#define EMAC_MAC_IRQ_RES                                    	"core0"
-
 void emac_mac_multicast_addr_set(struct emac_adapter *adpt, u8 *addr)
 {
 	u32 crc32, bit, reg, mta;
@@ -977,26 +975,16 @@ static void emac_adjust_link(struct net_device *netdev)
 int emac_mac_up(struct emac_adapter *adpt)
 {
 	struct net_device *netdev = adpt->netdev;
-	struct emac_irq	*irq = &adpt->irq;
 	int ret;
 
 	emac_mac_rx_tx_ring_reset_all(adpt);
 	emac_mac_config(adpt);
-
-	ret = request_irq(irq->irq, emac_isr, 0, EMAC_MAC_IRQ_RES, irq);
-	if (ret) {
-		netdev_err(adpt->netdev, "could not request %s irq\n",
-			   EMAC_MAC_IRQ_RES);
-		return ret;
-	}
-
 	emac_mac_rx_descs_refill(adpt, &adpt->rx_q);
 
 	ret = phy_connect_direct(netdev, adpt->phydev, emac_adjust_link,
 				 PHY_INTERFACE_MODE_SGMII);
 	if (ret) {
 		netdev_err(adpt->netdev, "could not connect phy\n");
-		free_irq(irq->irq, irq);
 		return ret;
 	}
 
@@ -1029,8 +1017,6 @@ void emac_mac_down(struct emac_adapter *adpt)
 	 */
 	writel(DIS_INT, adpt->base + EMAC_INT_STATUS);
 	writel(0, adpt->base + EMAC_INT_MASK);
-	synchronize_irq(adpt->irq.irq);
-	free_irq(adpt->irq.irq, &adpt->irq);
 
 	phy_disconnect(adpt->phydev);
 
diff --git a/drivers/net/ethernet/qualcomm/emac/emac.c b/drivers/net/ethernet/qualcomm/emac/emac.c
index b74ec7f..5926e54 100644
--- a/drivers/net/ethernet/qualcomm/emac/emac.c
+++ b/drivers/net/ethernet/qualcomm/emac/emac.c
@@ -256,18 +256,27 @@ static int emac_change_mtu(struct net_device *netdev, int new_mtu)
 static int emac_open(struct net_device *netdev)
 {
 	struct emac_adapter *adpt = netdev_priv(netdev);
+	struct emac_irq	*irq = &adpt->irq;
 	int ret;
 
+	ret = request_irq(irq->irq, emac_isr, 0, "emac-core0", irq);
+	if (ret) {
+		netdev_err(adpt->netdev, "could not request emac-core0 irq\n");
+		return ret;
+	}
+
 	/* allocate rx/tx dma buffer & descriptors */
 	ret = emac_mac_rx_tx_rings_alloc_all(adpt);
 	if (ret) {
 		netdev_err(adpt->netdev, "error allocating rx/tx rings\n");
+		free_irq(irq->irq, irq);
 		return ret;
 	}
 
 	ret = emac_mac_up(adpt);
 	if (ret) {
 		emac_mac_rx_tx_rings_free_all(adpt);
+		free_irq(irq->irq, irq);
 		return ret;
 	}
 
@@ -283,6 +292,9 @@ static int emac_close(struct net_device *netdev)
 
 	mutex_lock(&adpt->reset_lock);
 
+	synchronize_irq(adpt->irq.irq);
+	free_irq(adpt->irq.irq, &adpt->irq);
+
 	emac_mac_down(adpt);
 	emac_mac_rx_tx_rings_free_all(adpt);
 
diff --git a/drivers/net/ethernet/qualcomm/emac/emac.h b/drivers/net/ethernet/qualcomm/emac/emac.h
index 1368440..2725507 100644
--- a/drivers/net/ethernet/qualcomm/emac/emac.h
+++ b/drivers/net/ethernet/qualcomm/emac/emac.h
@@ -331,7 +331,6 @@ struct emac_adapter {
 
 int emac_reinit_locked(struct emac_adapter *adpt);
 void emac_reg_update32(void __iomem *addr, u32 mask, u32 val);
-irqreturn_t emac_isr(int irq, void *data);
 
 void emac_set_ethtool_ops(struct net_device *netdev);
 void emac_update_hw_stats(struct emac_adapter *adpt);
-- 
Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm
Technologies, Inc.  Qualcomm Technologies, Inc. is a member of the
Code Aurora Forum, a Linux Foundation Collaborative Project.

^ permalink raw reply related

* Re: [PATCH] net: ethernet: ti: davinci_cpdma: correct check on NULL in set rate
From: David Miller @ 2017-01-18 21:38 UTC (permalink / raw)
  To: ivan.khoronzhuk
  Cc: mugunthanvnm, grygorii.strashko, netdev, linux-omap, linux-kernel
In-Reply-To: <1484699286-6197-1-git-send-email-ivan.khoronzhuk@linaro.org>

From: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org>
Date: Wed, 18 Jan 2017 02:28:06 +0200

> Check "ch" on NULL first, then get ctlr.
> 
> Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org>

Applied, thanks.

^ permalink raw reply

* Re: [PATCH net-next] fq_codel: Avoid regenerating skb flow hash unless necessary
From: Eric Dumazet @ 2017-01-18 21:13 UTC (permalink / raw)
  To: Andrew Collins; +Cc: netdev, tom
In-Reply-To: <20170118210428.24006-1-acollins@cradlepoint.com>

On Wed, 2017-01-18 at 14:04 -0700, Andrew Collins wrote:
> The fq_codel qdisc currently always regenerates the skb flow hash.
> This wastes some cycles and prevents flow seperation in cases where
> the traffic has been encrypted and can no longer be understood by the
> flow dissector.
> 
> Change it to use the prexisting flow hash if one exists, and only
> regenerate if necessary.
> 
> Signed-off-by: Andrew Collins <acollins@cradlepoint.com>
> ---

Acked-by: Eric Dumazet <edumazet@google.com>

Thanks !

^ permalink raw reply

* Re: [PATCH net-next V5 0/3] vhost_net tx batching
From: David Miller @ 2017-01-18 21:35 UTC (permalink / raw)
  To: jasowang; +Cc: mst, virtualization, netdev, kvm, stephen, wexu, stefanha
In-Reply-To: <1484722923-7698-1-git-send-email-jasowang@redhat.com>

From: Jason Wang <jasowang@redhat.com>
Date: Wed, 18 Jan 2017 15:02:00 +0800

> This series tries to implement tx batching support for vhost. This was
> done by using MSG_MORE as a hint for under layer socket. The backend
> (e.g tap) can then batch the packets temporarily in a list and
> submit it all once the number of bacthed exceeds a limitation.
> 
> Tests shows obvious improvement on guest pktgen over over
> mlx4(noqueue) on host:
 ...

Series applied, thanks Jason.

^ permalink raw reply

* Re: [PATCH RFC] net: dsa: remove unnecessary phy.h include
From: David Miller @ 2017-01-18 21:37 UTC (permalink / raw)
  To: linux; +Cc: andrew, vivien.didelot, f.fainelli, netdev, linux-kernel
In-Reply-To: <20170118001403.GJ27312@n2100.armlinux.org.uk>

From: Russell King - ARM Linux <linux@armlinux.org.uk>
Date: Wed, 18 Jan 2017 00:14:03 +0000

> Including phy.h and phy_fixed.h into net/dsa.h causes phy*.h to be an
> unnecessary dependency for quite a large amount of the kernel.  There's
> very little which actually requires definitions from phy.h in net/dsa.h
> - the include itself only wants the declaration of a couple of
> structures and IFNAMSIZ.
> 
> Add linux/if.h for IFNAMSIZ, declarations for the structures, phy.h to
> mv88e6xxx.h as it needs it for phy_interface_t, and remove both phy.h
> and phy_fixed.h from net/dsa.h.
> 
> This patch reduces from around 800 files rebuilt to around 40 - even
> with ccache, the time difference is noticable.
> 
> Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>

Applied, thanks.

^ permalink raw reply

* Re: [PATCH v3 net-next] net:add one common config ARCH_WANT_RELAX_ORDER to support relax ordering
From: David Miller @ 2017-01-18 21:33 UTC (permalink / raw)
  To: maowenan; +Cc: netdev, alexander.duyck, jeffrey.t.kirsher
In-Reply-To: <1484700605-2412-1-git-send-email-maowenan@huawei.com>

From: Mao Wenan <maowenan@huawei.com>
Date: Wed, 18 Jan 2017 08:50:05 +0800

> Relax ordering(RO) is one feature of 82599 NIC, to enable this feature can
> enhance the performance for some cpu architecure, such as SPARC and so on.
> Currently it only supports one special cpu architecture(SPARC) in 82599
> driver to enable RO feature, this is not very common for other cpu architecture
> which really needs RO feature.
> This patch add one common config CONFIG_ARCH_WANT_RELAX_ORDER to set RO feature,
> and should define CONFIG_ARCH_WANT_RELAX_ORDER in sparc Kconfig firstly.
> 
> Signed-off-by: Mao Wenan <maowenan@huawei.com>
> Reviewed-by: Alexander Duyck <alexander.duyck@gmail.com>
> ---
> v2 -> v3: add reviewed information.

Applied, thanks.

^ permalink raw reply

* Re: [PATCHv2 7/7] IPVTAP: IP-VLAN based tap driver
From: David Miller @ 2017-01-18 21:28 UTC (permalink / raw)
  To: sainath.grandhi; +Cc: netdev, mahesh, linux-kernel
In-Reply-To: <1484697786-50323-8-git-send-email-sainath.grandhi@intel.com>

From: Sainath Grandhi <sainath.grandhi@intel.com>
Date: Tue, 17 Jan 2017 16:03:06 -0800

> +static void ipvtap_count_tx_dropped(struct tap_dev *tap)
> +{
> +	struct ipvl_dev *vlan = (struct ipvl_dev *)container_of(tap, struct ipvtap_dev, tap);
 ...
> +static void ipvtap_count_rx_dropped(struct tap_dev *tap)
> +{
> +	struct ipvl_dev *vlan = (struct ipvl_dev *)container_of(tap, struct ipvtap_dev, tap);
 ...
> +static void ipvtap_update_features(struct tap_dev *tap,
> +				   netdev_features_t features)
> +{
> +	struct ipvl_dev *vlan = (struct ipvl_dev *)container_of(tap, struct ipvtap_dev, tap);

More unnecessary casts, please remove.

^ permalink raw reply

* Re: [PATCHv2 4/7] TAP: Abstract type of virtual interface from tap implementation
From: David Miller @ 2017-01-18 21:27 UTC (permalink / raw)
  To: sainath.grandhi; +Cc: netdev, mahesh, linux-kernel
In-Reply-To: <1484697786-50323-5-git-send-email-sainath.grandhi@intel.com>

From: Sainath Grandhi <sainath.grandhi@intel.com>
Date: Tue, 17 Jan 2017 16:03:03 -0800

> @@ -46,22 +51,52 @@ static struct cdev macvtap_cdev;
>  #define TUN_OFFLOADS (NETIF_F_HW_CSUM | NETIF_F_TSO_ECN | NETIF_F_TSO | \
>  		      NETIF_F_TSO6 | NETIF_F_UFO)
>  
> +static void macvtap_count_tx_dropped(struct tap_dev *tap)
> +{
> +	struct macvlan_dev *vlan = (struct macvlan_dev *)container_of(tap, struct macvtap_dev, tap);
 ...
> +static void macvtap_count_rx_dropped(struct tap_dev *tap)
> +{
> +	struct macvlan_dev *vlan = (struct macvlan_dev *)container_of(tap, struct macvtap_dev, tap);
 ...
> +static void macvtap_update_features(struct tap_dev *tap,
> +				    netdev_features_t features)
> +{
> +	struct macvlan_dev *vlan = (struct macvlan_dev *)container_of(tap, struct macvtap_dev, tap);

These casts should be completely unnecessary, please remove them.

^ permalink raw reply

* Re: [PATCHv2 3/7] TAP: Tap character device creation/destroy API
From: David Miller @ 2017-01-18 21:26 UTC (permalink / raw)
  To: sainath.grandhi; +Cc: netdev, mahesh, linux-kernel
In-Reply-To: <1484697786-50323-4-git-send-email-sainath.grandhi@intel.com>

From: Sainath Grandhi <sainath.grandhi@intel.com>
Date: Tue, 17 Jan 2017 16:03:02 -0800

> +int tap_create_cdev(struct cdev *tap_cdev,
> +		    dev_t *tap_major, const char *device_name)
> +{
> +	int err;
> +
> +	err = alloc_chrdev_region(tap_major, 0, TAP_NUM_DEVS, device_name);
> +
> +	if (err)
> +		goto out1;

No need to have an empty line between the alloc_chrdev_region() call
and the "if (err)" test.

> diff --git a/include/linux/if_tap.h b/include/linux/if_tap.h
> index d887aaa..a2dfd90 100644
> --- a/include/linux/if_tap.h
> +++ b/include/linux/if_tap.h
> @@ -10,7 +10,7 @@ struct file;
>  struct socket;
>  static inline struct socket *tap_get_socket(struct file *f)
>  {
> -        return ERR_PTR(-EINVAL);
> +	return ERR_PTR(-EINVAL);
>  }

Instead of having to fix up the indentation here, get it right in the first place
in patch #2.

^ permalink raw reply

* Re: [PATCH net-next 0/2] net: ipv6: simplify rt6_fill_node
From: David Miller @ 2017-01-18 20:44 UTC (permalink / raw)
  To: dsa; +Cc: netdev
In-Reply-To: <1484697068-20106-1-git-send-email-dsa@cumulusnetworks.com>

From: David Ahern <dsa@cumulusnetworks.com>
Date: Tue, 17 Jan 2017 15:51:06 -0800

> Remove a couple of unnecessary input arguments to rt6_fill_node.

Looks good, series applied, thanks.

^ permalink raw reply

* [PATCH net-next] csum: eliminate sparse warning in remcsum_unadjust()
From: Lance Richardson @ 2017-01-18 20:14 UTC (permalink / raw)
  To: netdev

Cast second parameter of csum_sub() from __sum16 to __wsum.

Signed-off-by: Lance Richardson <lrichard@redhat.com>
---
 include/net/checksum.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/net/checksum.h b/include/net/checksum.h
index 35d0fab..aef2b2b 100644
--- a/include/net/checksum.h
+++ b/include/net/checksum.h
@@ -179,7 +179,7 @@ static inline __wsum remcsum_adjust(void *ptr, __wsum csum,
 
 static inline void remcsum_unadjust(__sum16 *psum, __wsum delta)
 {
-	*psum = csum_fold(csum_sub(delta, *psum));
+	*psum = csum_fold(csum_sub(delta, (__force __wsum)*psum));
 }
 
 #endif
-- 
2.5.5

^ permalink raw reply related

* Re: [RFC] RESEND - rdmatool - tool for RDMA users
From: Leon Romanovsky @ 2017-01-18 18:28 UTC (permalink / raw)
  To: Or Gerlitz; +Cc: Ariel Almog, linux-rdma@vger.kernel.org, Linux Netdev List
In-Reply-To: <CAJ3xEMiR1+NGghUZJ6aGq+=xTdOHU5Ph-BcPii5OUB8dT4Vq-A@mail.gmail.com>

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

On Wed, Jan 18, 2017 at 07:50:26PM +0200, Or Gerlitz wrote:
> On Wed, Jan 18, 2017 at 7:33 PM, Leon Romanovsky wrote:
> > On Wed, Jan 18, 2017 at 06:48:21PM +0200, Or Gerlitz wrote:
> >> On Wed, Jan 18, 2017 at 5:19 PM, Ariel Almog
> >> <arielalmogworkemails@gmail.com> wrote:
>
> >>> As of today, there is no single, simple, tool that allows monitoring
> >>> and configuration of RDMA stack.
>
> >> Before tool, what kernel UAPI you thought to use?
>
> > I'm aware of the following options:
> > 1) netlink
> > 2) RDMA ABI https://www.spinics.net/lists/linux-rdma/msg43960.html
> > 3) ioctl
> > 4) write/read
> >
> > The items 1 and 2 are preferred options and one of the main goals
> > for this RFC is to chose between them.
> >
> > For example, RDMA ABI has native support of querying and discovering
> > device capabilities via merge tree feature.
>
> To make it clear, when you wrote ABI in your initial email, I tend to
> think it was sort of unclear to the netdev crowd that you are talking
> on new UAPI which is now under the works for the IB subsystem, so with
> my netdev community member hat, I got confused... anyway

You are right, I missed it in my review for Ariel who wrote this RFC
and sent this RFC.

Thanks

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

^ permalink raw reply

* [PATCH net-next] fq_codel: Avoid regenerating skb flow hash unless necessary
From: Andrew Collins @ 2017-01-18 21:04 UTC (permalink / raw)
  To: netdev; +Cc: eric.dumazet, tom, Andrew Collins

The fq_codel qdisc currently always regenerates the skb flow hash.
This wastes some cycles and prevents flow seperation in cases where
the traffic has been encrypted and can no longer be understood by the
flow dissector.

Change it to use the prexisting flow hash if one exists, and only
regenerate if necessary.

Signed-off-by: Andrew Collins <acollins@cradlepoint.com>
---
 net/sched/sch_fq_codel.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/net/sched/sch_fq_codel.c b/net/sched/sch_fq_codel.c
index a5ea0e9..2f50e4c 100644
--- a/net/sched/sch_fq_codel.c
+++ b/net/sched/sch_fq_codel.c
@@ -57,7 +57,6 @@ struct fq_codel_sched_data {
 	struct fq_codel_flow *flows;	/* Flows table [flows_cnt] */
 	u32		*backlogs;	/* backlog table [flows_cnt] */
 	u32		flows_cnt;	/* number of flows */
-	u32		perturbation;	/* hash perturbation */
 	u32		quantum;	/* psched_mtu(qdisc_dev(sch)); */
 	u32		drop_batch_size;
 	u32		memory_limit;
@@ -75,9 +74,7 @@ struct fq_codel_sched_data {
 static unsigned int fq_codel_hash(const struct fq_codel_sched_data *q,
 				  struct sk_buff *skb)
 {
-	u32 hash = skb_get_hash_perturb(skb, q->perturbation);
-
-	return reciprocal_scale(hash, q->flows_cnt);
+	return reciprocal_scale(skb_get_hash(skb), q->flows_cnt);
 }
 
 static unsigned int fq_codel_classify(struct sk_buff *skb, struct Qdisc *sch,
@@ -482,7 +479,6 @@ static int fq_codel_init(struct Qdisc *sch, struct nlattr *opt)
 	q->memory_limit = 32 << 20; /* 32 MBytes */
 	q->drop_batch_size = 64;
 	q->quantum = psched_mtu(qdisc_dev(sch));
-	q->perturbation = prandom_u32();
 	INIT_LIST_HEAD(&q->new_flows);
 	INIT_LIST_HEAD(&q->old_flows);
 	codel_params_init(&q->cparams);
-- 
2.9.3

^ permalink raw reply related

* Re: [PATCH v3] audit: log 32-bit socketcalls
From: Paul Moore @ 2017-01-18 20:46 UTC (permalink / raw)
  To: Richard Guy Briggs; +Cc: netdev, linux-audit, linux-kernel
In-Reply-To: <299e5702e5876404ee2863cf95847f73cddb0a45.1484669022.git.rgb@redhat.com>

On Tue, Jan 17, 2017 at 11:07 AM, Richard Guy Briggs <rgb@redhat.com> wrote:
> 32-bit socketcalls were not being logged by audit on x86_64 systems.
> Log them.  This is basically a duplicate of the call from
> net/socket.c:sys_socketcall(), but it addresses the impedance mismatch
> between 32-bit userspace process and 64-bit kernel audit.
>
> See: https://github.com/linux-audit/audit-kernel/issues/14
>
> Signed-off-by: Richard Guy Briggs <rgb@redhat.com>
> ---
> v3:
>    Proper spacing around operators and functions.  Local var ordering.
>    Ditch unlikely, return early.
>
> v2:
>    Move work to audit_socketcall_compat() and use audit_dummy_context().
> ---
>  include/linux/audit.h |   20 ++++++++++++++++++++
>  net/compat.c          |   17 ++++++++++++++---
>  2 files changed, 34 insertions(+), 3 deletions(-)

Merged, thanks.

> diff --git a/include/linux/audit.h b/include/linux/audit.h
> index 9d4443f..2be99b2 100644
> --- a/include/linux/audit.h
> +++ b/include/linux/audit.h
> @@ -387,6 +387,20 @@ static inline int audit_socketcall(int nargs, unsigned long *args)
>                 return __audit_socketcall(nargs, args);
>         return 0;
>  }
> +
> +static inline int audit_socketcall_compat(int nargs, u32 *args)
> +{
> +       unsigned long a[AUDITSC_ARGS];
> +       int i;
> +
> +       if (audit_dummy_context())
> +               return 0;
> +
> +       for (i = 0; i < nargs; i++)
> +               a[i] = (unsigned long)args[i];
> +       return __audit_socketcall(nargs, a);
> +}
> +
>  static inline int audit_sockaddr(int len, void *addr)
>  {
>         if (unlikely(!audit_dummy_context()))
> @@ -513,6 +527,12 @@ static inline int audit_socketcall(int nargs, unsigned long *args)
>  {
>         return 0;
>  }
> +
> +static inline int audit_socketcall_compat(int nargs, u32 *args)
> +{
> +       return 0;
> +}
> +
>  static inline void audit_fd_pair(int fd1, int fd2)
>  { }
>  static inline int audit_sockaddr(int len, void *addr)
> diff --git a/net/compat.c b/net/compat.c
> index 1cd2ec0..a96fd2f 100644
> --- a/net/compat.c
> +++ b/net/compat.c
> @@ -22,6 +22,7 @@
>  #include <linux/filter.h>
>  #include <linux/compat.h>
>  #include <linux/security.h>
> +#include <linux/audit.h>
>  #include <linux/export.h>
>
>  #include <net/scm.h>
> @@ -781,14 +782,24 @@ COMPAT_SYSCALL_DEFINE5(recvmmsg, int, fd, struct compat_mmsghdr __user *, mmsg,
>
>  COMPAT_SYSCALL_DEFINE2(socketcall, int, call, u32 __user *, args)
>  {
> -       int ret;
> -       u32 a[6];
> +       u32 a[AUDITSC_ARGS];
> +       unsigned int len;
>         u32 a0, a1;
> +       int ret;
>
>         if (call < SYS_SOCKET || call > SYS_SENDMMSG)
>                 return -EINVAL;
> -       if (copy_from_user(a, args, nas[call]))
> +       len = nas[call];
> +       if (len > sizeof(a))
> +               return -EINVAL;
> +
> +       if (copy_from_user(a, args, len))
>                 return -EFAULT;
> +
> +       ret = audit_socketcall_compat(len / sizeof(a[0]), a);
> +       if (ret)
> +               return ret;
> +
>         a0 = a[0];
>         a1 = a[1];
>
> --
> 1.7.1
>
> --
> Linux-audit mailing list
> Linux-audit@redhat.com
> https://www.redhat.com/mailman/listinfo/linux-audit



-- 
paul moore
www.paul-moore.com

^ permalink raw reply

* Re: [PATCH net-next 2/2] net: dsa: use cpu_switch instead of ds[0]
From: Florian Fainelli @ 2017-01-18 20:38 UTC (permalink / raw)
  To: Andrew Lunn, Vivien Didelot; +Cc: netdev, linux-kernel, kernel, David S. Miller
In-Reply-To: <20170118125057.GB7690@lunn.ch>

On 01/18/2017 04:50 AM, Andrew Lunn wrote:
> On Tue, Jan 17, 2017 at 08:41:39PM -0500, Vivien Didelot wrote:
>> Now that the DSA Ethernet switches are true Linux devices, the CPU
>> switch is not necessarily the first one. If its address is higher than
>> the second switch on the same MDIO bus, its index will be 1, not 0.
>>
>> Avoid any confusion by using dst->cpu_switch instead of dst->ds[0].
>>
>> Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
> 
> Reviewed-by: Andrew Lunn <andrew@lunn.ch>

Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
-- 
Florian

^ permalink raw reply

* Re: resend: tcp: performance issue with fastopen connections (mss > window)
From: Neal Cardwell @ 2017-01-18 18:33 UTC (permalink / raw)
  To: Eric Dumazet
  Cc: Yuchung Cheng, Alexey Kodanev, Eric Dumazet, David Miller, netdev,
	Vasily Isaenko
In-Reply-To: <CANn89i+5E0nXEox0EHU7s3me00KegXNA4ZeKQWxQoWRC4jNbHQ@mail.gmail.com>

On Wed, Jan 18, 2017 at 1:16 PM, Eric Dumazet <edumazet@google.com> wrote:
>
> On Wed, Jan 18, 2017 at 10:13 AM, Yuchung Cheng <ycheng@google.com> wrote:
> > On Wed, Jan 18, 2017 at 9:35 AM, Eric Dumazet <edumazet@google.com> wrote:
> >>
> >> On Wed, Jan 18, 2017 at 9:32 AM, Alexey Kodanev
> >> <alexey.kodanev@oracle.com> wrote:
> >> > Hi Eric,
> >> >
> >> > On 01/13/2017 08:07 PM, Alexey Kodanev wrote:
> >> >
> >>
> >> > Looks like max_window not correctly initialized for tfo sockets.
> >> > On my test machine it has set to '5592320' in tcp_fastopen_create_child().
> >> >
> >> > This diff fixes the issue, the question: is this the right place to do it?
> >> >
> >> > diff --git a/net/ipv4/tcp_fastopen.c b/net/ipv4/tcp_fastopen.c
> >> > index 4e777a3..33ed508 100644
> >> > --- a/net/ipv4/tcp_fastopen.c
> >> > +++ b/net/ipv4/tcp_fastopen.c
> >> > @@ -206,6 +206,8 @@ static struct sock *tcp_fastopen_create_child(struct
> >> > sock *sk,
> >> >          */
> >> >         tp->snd_wnd = ntohs(tcp_hdr(skb)->window);
> >> >
> >> > +       tp->max_window = tp->snd_wnd;
> >> > +
> >>
> >> Excellent catch. Let me test our regression tests with this.
> > Indeed nice catch. Thanks for the investigative work!
> >
>
> We do have 2 failures, but tests might have depended on undocumented behavior
>
> (For googlers :
> Ran 211 tests: 209 passing, 0 flaky 2 failing
> Sponge: http://sponge/f1575065-6e1c-4514-bced-9167ce56d2ee
> )

Yes, exactly, those test failures look fine. Looks like the test was
implicitly expecting the old buggy behavior (and it wasn't noticed
because the 10*MSS output matches IW10, so it looked fine. But now
with the fix, I believe we are seeing the correct new behavior because
tcp_xmit_size_goal() is calling tcp_bound_to_half_wnd(), and now with
max_window fixed, the outgoing TSO skb is now the correct 5*MSS (half
of the rwin of 10000). So the test results look good to me.

Thanks, Alexey, for tracking this down! :-)

neal

^ permalink raw reply

* Re: [PATCH net] net: fix harmonize_features() vs NETIF_F_HIGHDMA
From: David Miller @ 2017-01-18 20:25 UTC (permalink / raw)
  To: eric.dumazet; +Cc: pshelar, ashiduka, fugang.duan, netdev, pshelar
In-Reply-To: <1484770337.13165.120.camel@edumazet-glaptop3.roam.corp.google.com>

From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Wed, 18 Jan 2017 12:12:17 -0800

> From: Eric Dumazet <edumazet@google.com>
> 
> Ashizuka reported a highmem oddity and sent a patch for freescale
> fec driver.
> 
> But the problem root cause is that core networking stack
> must ensure no skb with highmem fragment is ever sent through
> a device that does not assert NETIF_F_HIGHDMA in its features.
> 
> We need to call illegal_highdma() from harmonize_features()
> regardless of CSUM checks.
> 
> Fixes: ec5f06156423 ("net: Kill link between CSUM and SG features.")
> Signed-off-by: Eric Dumazet <edumazet@google.com>
> Cc: Pravin Shelar <pshelar@ovn.org>
> Reported-by: "Ashizuka, Yuusuke" <ashiduka@jp.fujitsu.com>

Applied, thanks Eric.

I guess few devices support SG and lack highmem support.

^ permalink raw reply

* Re: [PATCH net-next 2/2] net: dsa: use cpu_switch instead of ds[0]
From: Florian Fainelli @ 2017-01-18 20:35 UTC (permalink / raw)
  To: Vivien Didelot, netdev; +Cc: linux-kernel, kernel, David S. Miller, Andrew Lunn
In-Reply-To: <20170118014139.31417-2-vivien.didelot@savoirfairelinux.com>

On 01/17/2017 05:41 PM, Vivien Didelot wrote:
> Now that the DSA Ethernet switches are true Linux devices, the CPU
> switch is not necessarily the first one. If its address is higher than
> the second switch on the same MDIO bus, its index will be 1, not 0.
> 
> Avoid any confusion by using dst->cpu_switch instead of dst->ds[0].
> 
> Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>

Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
-- 
Florian

^ 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