* RE: [PATCH net-next 1/8] net: ipv4: refactor __ip_route_output_key_hash
From: Rosen, Rami @ 2017-05-24 19:33 UTC (permalink / raw)
To: Roopa Prabhu, davem@davemloft.net
Cc: netdev@vger.kernel.org, dsahern@gmail.com,
nikolay@cumulusnetworks.com
In-Reply-To: <1495649951-30417-2-git-send-email-roopa@cumulusnetworks.com>
Hi, Rupa /David Ahern,
First, thanks for this patch set!
Second, it seems to me that something might be incorrect here.
You have these additions in this patch (1/8):
...
+struct rtable *ip_route_output_key_hash_rcu(struct net *net, struct flowi4 *flp,
+ const struct sk_buff *skb,
+ struct fib_result *res);
...
+struct rtable *ip_route_output_key_hash(struct net *net, struct flowi4 *fl4,
+ const struct sk_buff *skb)
+{
+ struct fib_result res;
+ struct rtable *rth;
+
+ res.tclassid = 0;
+ res.fi = NULL;
+ res.table = NULL;
+
+ rcu_read_lock();
+ rth = ip_route_output_key_hash_rcu(net, fl4, &res, mp_hash);
rcu_read_unlock();
+
return rth;
}
-EXPORT_SYMBOL_GPL(__ip_route_output_key_hash);
+EXPORT_SYMBOL_GPL(ip_route_output_key_hash);
So the third parameter to ip_route_output_key_hash_rcu() should be skb*, and the fourth parameter should be fib_result *. However, you do not pass the skb parameter
when calling ip_route_output_key_hash_rcu() in
ip_route_output_key_hash() (in fact you don't use it at all), and you pass mp_hash as the fourth parameter.
Regards,
Rami Rosen
Intel Corporation
^ permalink raw reply
* [PATCH net-next 0/3] net: phy: Create sysfs reciprocal links for attached_dev/phydev
From: Florian Fainelli @ 2017-05-24 19:33 UTC (permalink / raw)
To: netdev; +Cc: davem, andrew, Florian Fainelli
Hi David, Andrew,
This patch series addresses a device topology shortcoming where a program
scanning /sys would not be able to establish a mapping between the network
device and the PHY device.
In the process it turned out that no PHY device documentation existed for
sysfs attributes.
Thanks!
Florian Fainelli (3):
net: phy: Create sysfs reciprocal links for attached_dev/phydev
net: sysfs: Document "phydev" symbolic link
net: sysfs: Document PHY device sysfs attributes
Documentation/ABI/testing/sysfs-class-net | 8 ++++++
Documentation/ABI/testing/sysfs-class-net-phydev | 32 ++++++++++++++++++++++++
drivers/net/phy/phy_device.c | 11 ++++++++
3 files changed, 51 insertions(+)
create mode 100644 Documentation/ABI/testing/sysfs-class-net-phydev
--
2.9.3
^ permalink raw reply
* [PATCH net-next 1/3] net: phy: Create sysfs reciprocal links for attached_dev/phydev
From: Florian Fainelli @ 2017-05-24 19:33 UTC (permalink / raw)
To: netdev; +Cc: davem, andrew, Florian Fainelli
In-Reply-To: <20170524193354.10739-1-f.fainelli@gmail.com>
There is currently no way for a program scanning /sys to know whether a
network device is attached to a particular PHY device, just like the PHY
device is not pointed back to its attached network device.
Create a symbolic link in the network device's namespace named "phydev"
which points to the PHY device and create a symbolic link in the PHY
device's namespace named "attached_dev" that points back to the network
device. These links are set up during phy_attach_direct() and removed
during phy_detach() for symetry.
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
drivers/net/phy/phy_device.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c
index 1219eeab69d1..8151477c7027 100644
--- a/drivers/net/phy/phy_device.c
+++ b/drivers/net/phy/phy_device.c
@@ -960,6 +960,15 @@ int phy_attach_direct(struct net_device *dev, struct phy_device *phydev,
phydev->attached_dev = dev;
dev->phydev = phydev;
+ err = sysfs_create_link(&phydev->mdio.dev.kobj, &dev->dev.kobj,
+ "attached_dev");
+ if (err)
+ goto error;
+
+ err = sysfs_create_link(&dev->dev.kobj, &phydev->mdio.dev.kobj,
+ "phydev");
+ if (err)
+ goto error;
phydev->dev_flags = flags;
@@ -1050,6 +1059,8 @@ void phy_detach(struct phy_device *phydev)
struct mii_bus *bus;
int i;
+ sysfs_remove_link(&dev->dev.kobj, "phydev");
+ sysfs_remove_link(&phydev->mdio.dev.kobj, "attached_dev");
phydev->attached_dev->phydev = NULL;
phydev->attached_dev = NULL;
phy_suspend(phydev);
--
2.9.3
^ permalink raw reply related
* [PATCH net-next 2/3] net: sysfs: Document "phydev" symbolic link
From: Florian Fainelli @ 2017-05-24 19:33 UTC (permalink / raw)
To: netdev; +Cc: davem, andrew, Florian Fainelli
In-Reply-To: <20170524193354.10739-1-f.fainelli@gmail.com>
Now that we link the network device to its PHY device, document this
sysfs symbolic link.
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
Documentation/ABI/testing/sysfs-class-net | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/Documentation/ABI/testing/sysfs-class-net b/Documentation/ABI/testing/sysfs-class-net
index 668604fc8e06..6856da99b6f7 100644
--- a/Documentation/ABI/testing/sysfs-class-net
+++ b/Documentation/ABI/testing/sysfs-class-net
@@ -251,3 +251,11 @@ Contact: netdev@vger.kernel.org
Description:
Indicates the unique physical switch identifier of a switch this
port belongs to, as a string.
+
+What: /sys/class/net/<iface>/phydev
+Date: May 2017
+KernelVersion: 4.13
+Contact: netdev@vger.kernel.org
+Description:
+ Symbolic link to the PHY device this network device is attached
+ to.
--
2.9.3
^ permalink raw reply related
* [PATCH net-next 3/3] net: sysfs: Document PHY device sysfs attributes
From: Florian Fainelli @ 2017-05-24 19:33 UTC (permalink / raw)
To: netdev; +Cc: davem, andrew, Florian Fainelli
In-Reply-To: <20170524193354.10739-1-f.fainelli@gmail.com>
Document the different sysfs attributes that exist for PHY devices:
attached_dev, phy_has_fixups, phy_id and phy_interface.
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
Documentation/ABI/testing/sysfs-class-net-phydev | 32 ++++++++++++++++++++++++
1 file changed, 32 insertions(+)
create mode 100644 Documentation/ABI/testing/sysfs-class-net-phydev
diff --git a/Documentation/ABI/testing/sysfs-class-net-phydev b/Documentation/ABI/testing/sysfs-class-net-phydev
new file mode 100644
index 000000000000..a05831667c3d
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-class-net-phydev
@@ -0,0 +1,32 @@
+What: /sys/class/mdio_bus/<bus>/<device>/attached_dev
+Date: May 2017
+KernelVersion: 4.13
+Contact: netdev@vger.kernel.org
+Description:
+ Symbolic link to the network device this PHY device is
+ attached to.
+
+What: /sys/class/mdio_bus/<bus>/<device>/phy_has_fixups
+Date: February 2014
+KernelVersion: 3.15
+Contact: netdev@vger.kernel.org
+Description:
+ Boolean value indicating whether the PHY device has
+ any fixups registered against it (phy_register_fixup)
+
+What: /sys/class/mdio_bus/<bus>/<device>/phy_id
+Date: November 2012
+KernelVersion: 3.8
+Contact: netdev@vger.kernel.org
+Description:
+ 32-bit hexadecimal value corresponding to the PHY device's OUI,
+ model and revision number.
+
+What: /sys/class/mdio_bus/<bus>/<device>/phy_interface
+Date: February 2014
+KernelVersion: 3.15
+Contact: netdev@vger.kernel.org
+Description:
+ String value indicating the PHY interface, possible
+ values are in include/linux/phy.h function phy_modes.
+
--
2.9.3
^ permalink raw reply related
* Re: [PATCH 2/2] at803x: double check SGMII side autoneg
From: Andrew Lunn @ 2017-05-24 19:34 UTC (permalink / raw)
To: Timur Tabi
Cc: Matthias May, Zefir Kurtisi, netdev, f.fainelli, David Miller,
Manoj Iyer, jhugo
In-Reply-To: <c2a54e2e-a1b6-24b4-d125-95fa9648fe95@codeaurora.org>
On Wed, May 24, 2017 at 01:58:09PM -0500, Timur Tabi wrote:
> On 05/24/2017 09:09 AM, Andrew Lunn wrote:
> > It could be, the copper side is up, but the SGMII side is down, at the
> > point at803x_aneg_done() is called. So it is correctly returning
> > 0. Sometime later the SGMII side goes up, but there is not a second
> > interrupt. Hence the phy core does not know that the full, 2 stage MAC
> > to PHY to peer PHY link is now up.
>
> Ok, I'm going to debug this some more. It turns out that the MAC side of
> the SGMII link can send an interrupt when it thinks that auto-negotiation is
> done. I might be able to use this.
You can use this for your board. But it still leaves the phy driver
broken for everybody else.
> What function should my MAC driver call when it wants the phy core to call
> at803x_aneg_done again to see if autonegotiation is done?
You want to trigger the PHY state machine. There is only one exported
API call to do this, phy_mac_interrupt(). But you are supposed to pass
the new link state. And your MAC driver has no idea of that, it does
not know if the copper side of the PHY is up.
So it might be better if you export phy_trigger_machine().
> Also, is there a way for the MAC driver to know that at803x_aneg_done()
> previously returned 0, and that it needs to tell the phy core to check again?
Not that i know of. The MAC layer is not supposed to be messing around
in the PHY layer. However, just triggering the PHY state machine
should be enough.
Andrew
^ permalink raw reply
* Re: [PATCH net] net/mlx4: Fix the check in attaching steering rules
From: David Miller @ 2017-05-24 19:36 UTC (permalink / raw)
To: tariqt; +Cc: netdev, eranbe, ogerlitz, talatb
In-Reply-To: <1495543807-14956-1-git-send-email-tariqt@mellanox.com>
From: Tariq Toukan <tariqt@mellanox.com>
Date: Tue, 23 May 2017 15:50:07 +0300
> diff --git a/drivers/net/ethernet/mellanox/mlx4/en_ethtool.c b/drivers/net/ethernet/mellanox/mlx4/en_ethtool.c
> index ae5fdc2df654..00a7cd3dcc2e 100644
> --- a/drivers/net/ethernet/mellanox/mlx4/en_ethtool.c
> +++ b/drivers/net/ethernet/mellanox/mlx4/en_ethtool.c
> @@ -1562,8 +1562,7 @@ static int mlx4_en_flow_replace(struct net_device *dev,
> qpn = priv->drop_qp.qpn;
> else if (cmd->fs.ring_cookie & EN_ETHTOOL_QP_ATTACH) {
> qpn = cmd->fs.ring_cookie & (EN_ETHTOOL_QP_ATTACH - 1);
> - if (qpn < priv->rss_map.base_qpn ||
> - qpn >= priv->rss_map.base_qpn + priv->rx_ring_num) {
> + if (!mlx4_qp_lookup(priv->mdev->dev, qpn)) {
> en_warn(priv, "rxnfc: QP (0x%x) doesn't exist\n", qpn);
> return -EINVAL;
> }
> diff --git a/drivers/net/ethernet/mellanox/mlx4/qp.c b/drivers/net/ethernet/mellanox/mlx4/qp.c
> index 2d6abd4662b1..1eff2fe32a8b 100644
> --- a/drivers/net/ethernet/mellanox/mlx4/qp.c
> +++ b/drivers/net/ethernet/mellanox/mlx4/qp.c
> @@ -384,6 +384,20 @@ static void mlx4_qp_free_icm(struct mlx4_dev *dev, int qpn)
> __mlx4_qp_free_icm(dev, qpn);
> }
>
> +struct mlx4_qp *mlx4_qp_lookup(struct mlx4_dev *dev, u32 qpn)
...
> +EXPORT_SYMBOL_GPL(mlx4_qp_lookup);
> +
This phony separation between MLX4_CORE and MLX4_EN is the only reason
you need this unreasonable symbol export.
I doubt you'll ever use this function anywhere outside of en_ethtool.c
so this export is wasted space in the kernel image. Probably compiler
could inline it decently as well.
So find another way to do this without the symbol export. I don't
really want to hear any stories about "clean separation" or whatever.
What's happening here is exactly why this separate modules scheme
results in ugly unreasonable code, and unnecessary gymnastics and
wasted object space just to make routines available in one place from
another.
^ permalink raw reply
* Re: [PATCH v6 net-next 01/17] net: qualcomm: remove unnecessary includes
From: David Miller @ 2017-05-24 19:41 UTC (permalink / raw)
To: stefan.wahren-eS4NqCHxEME
Cc: robh+dt-DgEjT+Ai2ygdnm+yROfE0A, mark.rutland-5wv7dgnIgG8,
gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r, jslaby-IBi9RG/b67k,
LinoSanfilippo-Mmb7MZpHnFY, kubakici-5tc4TXWwyLM,
devicetree-u79uwXL29TY76Z2rM5mHXA, netdev-u79uwXL29TY76Z2rM5mHXA,
linux-serial-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <1495545173-22150-2-git-send-email-stefan.wahren-eS4NqCHxEME@public.gmane.org>
From: Stefan Wahren <stefan.wahren-eS4NqCHxEME@public.gmane.org>
Date: Tue, 23 May 2017 15:12:37 +0200
> Most of the includes in qca_7k.c are unnecessary so we better remove them.
>
> Signed-off-by: Stefan Wahren <stefan.wahren-eS4NqCHxEME@public.gmane.org>
> ---
> drivers/net/ethernet/qualcomm/qca_7k.c | 4 ----
> 1 file changed, 4 deletions(-)
>
> diff --git a/drivers/net/ethernet/qualcomm/qca_7k.c b/drivers/net/ethernet/qualcomm/qca_7k.c
> index f0066fb..557d53c 100644
> --- a/drivers/net/ethernet/qualcomm/qca_7k.c
> +++ b/drivers/net/ethernet/qualcomm/qca_7k.c
> @@ -23,11 +23,7 @@
> * kernel-based SPI device.
> */
>
> -#include <linux/init.h>
> -#include <linux/module.h>
> -#include <linux/moduleparam.h>
> #include <linux/spi/spi.h>
> -#include <linux/version.h>
>
> #include "qca_7k.h"
>
> --
> 2.1.4
>
Changes like this drive me crazy.
The only reason you can remove those headers is because you are obtaining
things indirectly via qca_7k.h
And if that is indeed the case, you are also getting qca_spi.h which
in turn includes linux/spi/spi.h
So you could have removed that as well.
But seriously, it is so much harder to understand a driver and what
interfaces it needs via header files when you hide _all_ of it behind
these local private header files which just include _everything_
and then _every_ foo.c file in your driver gets _all_ of those kernel
headers whether they need it or not.
So if just one foo.c file needs 20 extra kernel headers than the rest
of the files in the driver, every foo.c file eats that cost of
including them.
I really don't like when drivers move in this direction for that
reason. And at best, as described at the beginning of my response,
this change is incomplete.
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
* Re: [pull request][net 0/8] Mellanox, mlx5 fixes 2017-05-23
From: David Miller @ 2017-05-24 19:45 UTC (permalink / raw)
To: saeedm; +Cc: netdev
In-Reply-To: <20170523141610.27833-1-saeedm@mellanox.com>
From: Saeed Mahameed <saeedm@mellanox.com>
Date: Tue, 23 May 2017 17:16:02 +0300
> This series contains some fixes for the mlx5 driver and one small patch that
> adds csum actions accessors in include/net/tc_act/tc_csum.h needed by some of
> mlx5 fixes patches.
>
> Details are below.
>
> Please pull and let me know if there's any problem.
>
> Note: This series doesn't introduce any merge conflict with the ongoing mlx5
> for-next submission.
>
> For -stable kernels >= 4.7:
> ("net/mlx5: Avoid using pending command interface slots")
> ("net/mlx5: Tolerate irq_set_affinity_hint() failures")
Pulled and queued up for -stable, thanks.
^ permalink raw reply
* Re: [PATCH] net/phy: fix mdio-octeon dependency and build
From: David Miller @ 2017-05-24 19:48 UTC (permalink / raw)
To: rdunlap; +Cc: netdev, andrew, f.fainelli, linux-kernel
In-Reply-To: <c37b4171-e3f2-c5cc-d734-6e1688c964f5@infradead.org>
From: Randy Dunlap <rdunlap@infradead.org>
Date: Tue, 23 May 2017 08:19:49 -0700
> From: Randy Dunlap <rdunlap@infradead.org>
>
> Fix build errors by making this driver depend on OF_MDIO, like
> several other similar drivers do.
>
> drivers/built-in.o: In function `octeon_mdiobus_remove':
> mdio-octeon.c:(.text+0x196ee0): undefined reference to `mdiobus_unregister'
> mdio-octeon.c:(.text+0x196ee8): undefined reference to `mdiobus_free'
> drivers/built-in.o: In function `octeon_mdiobus_probe':
> mdio-octeon.c:(.text+0x196f1d): undefined reference to `devm_mdiobus_alloc_size'
> mdio-octeon.c:(.text+0x196ffe): undefined reference to `of_mdiobus_register'
> mdio-octeon.c:(.text+0x197010): undefined reference to `mdiobus_free'
>
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Applied, thanks Randy.
^ permalink raw reply
* Re: [PATCH v3 net] net: phy: marvell: Limit errata to 88m1101
From: David Miller @ 2017-05-24 19:49 UTC (permalink / raw)
To: andrew; +Cc: netdev
In-Reply-To: <1495554553-21118-1-git-send-email-andrew@lunn.ch>
From: Andrew Lunn <andrew@lunn.ch>
Date: Tue, 23 May 2017 17:49:13 +0200
> The 88m1101 has an errata when configuring autoneg. However, it was
> being applied to many other Marvell PHYs as well. Limit its scope to
> just the 88m1101.
>
> Fixes: 76884679c644 ("phylib: Add support for Marvell 88e1111S and 88e1145")
> Reported-by: Daniel Walker <danielwa@cisco.com>
> Signed-off-by: Andrew Lunn <andrew@lunn.ch>
> Acked-by: Harini Katakam <harinik@xilinx.com>
Applied and queued up for -stable, thanks.
^ permalink raw reply
* Re: [PATCH net-next] geneve: fix fill_info when using collect_metadata
From: Eric Garver @ 2017-05-24 19:58 UTC (permalink / raw)
To: Pravin Shelar; +Cc: Linux Kernel Network Developers
In-Reply-To: <CAOrHB_CqAAWpHLuc+apQHbhL6SUS9bcKq3wW_TxbtWEWcgZrSA@mail.gmail.com>
On Wed, May 24, 2017 at 12:20:36PM -0700, Pravin Shelar wrote:
> On Tue, May 23, 2017 at 3:37 PM, Eric Garver <e@erig.me> wrote:
> > Since 9b4437a5b870 ("geneve: Unify LWT and netdev handling.") fill_info
> > does not return UDP_ZERO_CSUM6_RX when using COLLECT_METADATA. This is
> > because it uses ip_tunnel_info_af() with the device level info, which is
> > not valid for COLLECT_METADATA.
> >
> > Fix by checking for the presence of the actual sockets.
> >
> > Fixes: 9b4437a5b870 ("geneve: Unify LWT and netdev handling.")
> > Signed-off-by: Eric Garver <e@erig.me>
> Thanks for the patch.
>
> Acked-by: Pravin B Shelar <pshelar@ovn.org>
>
>
> I noticed that the MTU and encal_len calculation in geneve_configure()
> also needs to be fixed for collect metadata case. Can you send patch
> to fix it?
Ah, yes. I'll take a look at those as well.
Eric.
^ permalink raw reply
* Re: [PATCH v6 net-next 01/17] net: qualcomm: remove unnecessary includes
From: Stefan Wahren @ 2017-05-24 20:05 UTC (permalink / raw)
To: David Miller
Cc: linux-serial, jslaby, gregkh, netdev, robh+dt, linux-kernel,
kubakici, mark.rutland, LinoSanfilippo, devicetree
In-Reply-To: <20170524.154111.404338711401048909.davem@davemloft.net>
> David Miller <davem@davemloft.net> hat am 24. Mai 2017 um 21:41 geschrieben:
>
>
> From: Stefan Wahren <stefan.wahren@i2se.com>
> Date: Tue, 23 May 2017 15:12:37 +0200
>
> > Most of the includes in qca_7k.c are unnecessary so we better remove them.
> >
> > Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
> > ---
> > drivers/net/ethernet/qualcomm/qca_7k.c | 4 ----
> > 1 file changed, 4 deletions(-)
> >
> > diff --git a/drivers/net/ethernet/qualcomm/qca_7k.c b/drivers/net/ethernet/qualcomm/qca_7k.c
> > index f0066fb..557d53c 100644
> > --- a/drivers/net/ethernet/qualcomm/qca_7k.c
> > +++ b/drivers/net/ethernet/qualcomm/qca_7k.c
> > @@ -23,11 +23,7 @@
> > * kernel-based SPI device.
> > */
> >
> > -#include <linux/init.h>
> > -#include <linux/module.h>
> > -#include <linux/moduleparam.h>
> > #include <linux/spi/spi.h>
> > -#include <linux/version.h>
> >
> > #include "qca_7k.h"
> >
> > --
> > 2.1.4
> >
>
> Changes like this drive me crazy.
>
> The only reason you can remove those headers is because you are obtaining
> things indirectly via qca_7k.h
>
> And if that is indeed the case, you are also getting qca_spi.h which
> in turn includes linux/spi/spi.h
>
> So you could have removed that as well.
>
> But seriously, it is so much harder to understand a driver and what
> interfaces it needs via header files when you hide _all_ of it behind
> these local private header files which just include _everything_
> and then _every_ foo.c file in your driver gets _all_ of those kernel
> headers whether they need it or not.
>
> So if just one foo.c file needs 20 extra kernel headers than the rest
> of the files in the driver, every foo.c file eats that cost of
> including them.
>
> I really don't like when drivers move in this direction for that
> reason. And at best, as described at the beginning of my response,
> this change is incomplete.
>
The intension of this change wasn't to hide the includes into qca_7k.h
AFAIK these ones above aren't necessary (no init, no kernel module, no kernel parameter, no kernel version) for this C file. So i will double check it.
^ permalink raw reply
* Re: [PATCH net 1/3] bpf: fix incorrect pruning decision when alignment must be tracked
From: David Miller @ 2017-05-24 20:07 UTC (permalink / raw)
To: daniel; +Cc: ast, netdev
In-Reply-To: <170aa8062f2c54186a6567b5be8fca0cddec53be.1495556127.git.daniel@iogearbox.net>
From: Daniel Borkmann <daniel@iogearbox.net>
Date: Tue, 23 May 2017 18:30:41 +0200
> + if (!env->strict_alignment && old->off <= cur->off &&
You can't just test env->strict_alignment by itself, that's just an
override and doesn't determine the actual "strict" value we use which
is a combination of env->strict_alignment and
"!CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS".
So you'll have to update this test.
^ permalink raw reply
* Re: [PATCH net-next 3/3] net: sysfs: Document PHY device sysfs attributes
From: Andrew Lunn @ 2017-05-24 20:10 UTC (permalink / raw)
To: Florian Fainelli; +Cc: netdev, davem
In-Reply-To: <20170524193354.10739-4-f.fainelli@gmail.com>
> +What: /sys/class/mdio_bus/<bus>/<device>/phy_interface
> +Date: February 2014
> +KernelVersion: 3.15
> +Contact: netdev@vger.kernel.org
> +Description:
> + String value indicating the PHY interface, possible
> + values are in include/linux/phy.h function phy_modes.
Hi Florian
Does this suggest that these strings should be moved to
include/uapi/linux/phy.h?
Andrew
^ permalink raw reply
* Re: [PATCH net 1/3] bpf: fix incorrect pruning decision when alignment must be tracked
From: Daniel Borkmann @ 2017-05-24 20:17 UTC (permalink / raw)
To: David Miller; +Cc: ast, netdev
In-Reply-To: <20170524.160733.216900339299848648.davem@davemloft.net>
On 05/24/2017 10:07 PM, David Miller wrote:
> From: Daniel Borkmann <daniel@iogearbox.net>
> Date: Tue, 23 May 2017 18:30:41 +0200
>
>> + if (!env->strict_alignment && old->off <= cur->off &&
>
> You can't just test env->strict_alignment by itself, that's just an
> override and doesn't determine the actual "strict" value we use which
> is a combination of env->strict_alignment and
> "!CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS".
>
> So you'll have to update this test.
Argh, good point, true. Will respin with a v2.
^ permalink raw reply
* Re: [Patch net-next] net_sched: only create filter chains for new filters/actions
From: Jiri Pirko @ 2017-05-24 20:23 UTC (permalink / raw)
To: Cong Wang; +Cc: Linux Kernel Network Developers, Jamal Hadi Salim, Jiri Pirko
In-Reply-To: <CAM_iQpV7i1Z6rJke8Zr_j1MSxA2R696+kXvcU7a72LLFxKe87Q@mail.gmail.com>
Wed, May 24, 2017 at 05:53:42PM CEST, xiyou.wangcong@gmail.com wrote:
>On Tue, May 23, 2017 at 11:37 PM, Jiri Pirko <jiri@resnulli.us> wrote:
>> Tue, May 23, 2017 at 06:42:37PM CEST, xiyou.wangcong@gmail.com wrote:
>>>tcf_chain_get() always creates a new filter chain if not found
>>>in existing ones. This is totally unnecessary when we get or
>>>delete filters, new chain should be only created for new filters
>>>(or new actions).
>>>
>>>Fixes: 5bc1701881e3 ("net: sched: introduce multichain support for filters")
>>>Cc: Jamal Hadi Salim <jhs@mojatatu.com>
>>>Cc: Jiri Pirko <jiri@mellanox.com>
>>>Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
>>>---
>>> include/net/pkt_cls.h | 3 ++-
>>> net/sched/act_api.c | 2 +-
>>> net/sched/cls_api.c | 13 +++++++++----
>>> 3 files changed, 12 insertions(+), 6 deletions(-)
>>>
>>>diff --git a/include/net/pkt_cls.h b/include/net/pkt_cls.h
>>>index 2c213a6..f776229 100644
>>>--- a/include/net/pkt_cls.h
>>>+++ b/include/net/pkt_cls.h
>>>@@ -18,7 +18,8 @@ int register_tcf_proto_ops(struct tcf_proto_ops *ops);
>>> int unregister_tcf_proto_ops(struct tcf_proto_ops *ops);
>>>
>>> #ifdef CONFIG_NET_CLS
>>>-struct tcf_chain *tcf_chain_get(struct tcf_block *block, u32 chain_index);
>>>+struct tcf_chain *tcf_chain_get(struct tcf_block *block, u32 chain_index,
>>>+ bool create);
>>> void tcf_chain_put(struct tcf_chain *chain);
>>> int tcf_block_get(struct tcf_block **p_block,
>>> struct tcf_proto __rcu **p_filter_chain);
>>>diff --git a/net/sched/act_api.c b/net/sched/act_api.c
>>>index 0ecf2a8..aed6cf2 100644
>>>--- a/net/sched/act_api.c
>>>+++ b/net/sched/act_api.c
>>>@@ -34,7 +34,7 @@ static int tcf_action_goto_chain_init(struct tc_action *a, struct tcf_proto *tp)
>>>
>>> if (!tp)
>>> return -EINVAL;
>>>- a->goto_chain = tcf_chain_get(tp->chain->block, chain_index);
>>>+ a->goto_chain = tcf_chain_get(tp->chain->block, chain_index, true);
>>> if (!a->goto_chain)
>>> return -ENOMEM;
>>> return 0;
>>>diff --git a/net/sched/cls_api.c b/net/sched/cls_api.c
>>>index 01a8b8b..23d2236 100644
>>>--- a/net/sched/cls_api.c
>>>+++ b/net/sched/cls_api.c
>>>@@ -220,7 +220,8 @@ static void tcf_chain_destroy(struct tcf_chain *chain)
>>> kfree(chain);
>>> }
>>>
>>>-struct tcf_chain *tcf_chain_get(struct tcf_block *block, u32 chain_index)
>>>+struct tcf_chain *tcf_chain_get(struct tcf_block *block, u32 chain_index,
>>>+ bool create)
>>> {
>>> struct tcf_chain *chain;
>>>
>>>@@ -230,7 +231,10 @@ struct tcf_chain *tcf_chain_get(struct tcf_block *block, u32 chain_index)
>>> return chain;
>>> }
>>> }
>>>- return tcf_chain_create(block, chain_index);
>>>+ if (create)
>>>+ return tcf_chain_create(block, chain_index);
>>>+ else
>>>+ return NULL;
>>> }
>>> EXPORT_SYMBOL(tcf_chain_get);
>>>
>>>@@ -509,9 +513,10 @@ static int tc_ctl_tfilter(struct sk_buff *skb, struct nlmsghdr *n,
>>> err = -EINVAL;
>>> goto errout;
>>> }
>>>- chain = tcf_chain_get(block, chain_index);
>>>+ chain = tcf_chain_get(block, chain_index,
>>>+ n->nlmsg_type == RTM_NEWTFILTER);
>>
>> First of all, I really hate all these true/false arg dances. Totaly
>> confusing all the time.
>
>Sounds like you are able to understand the code at all.
>Sigh, I bet you never even read the changelog. ;)
>
>
>>
>>
>>
>>> if (!chain) {
>>>- err = -ENOMEM;
>>>+ err = n->nlmsg_type == RTM_NEWTFILTER ? -ENOMEM : -EINVAL;
>>
>> Confusing. Please do not obfuscate the code for a corner cases. Thanks.
>
>Either you don't understand the changelog or you don't understand
>ternary conditional operator. I can't help you if the latter.
>
>Sorry.
Heh. Really? All I say is, your patch is not needed at all. All it adds
makes to code harder to understand and no benefit.
^ permalink raw reply
* Re: [patch net-next v2 0/5] add tcp flags match support to flower and offload it
From: David Miller @ 2017-05-24 20:24 UTC (permalink / raw)
To: jiri; +Cc: netdev, jhs, xiyou.wangcong, simon.horman, mlxsw, idosch
In-Reply-To: <20170523164048.16514-1-jiri@resnulli.us>
From: Jiri Pirko <jiri@resnulli.us>
Date: Tue, 23 May 2017 18:40:43 +0200
> From: Jiri Pirko <jiri@mellanox.com>
>
> This patch adds support to dissect tcp flags, match on them using
> flower classifier and offload such rules to mlxsw Spectrum devices.
>
> ---
> v1->v2:
> - removed no longer relevant comment from patch 1 as suggested by Or
> - sent correct patches this time
Series applied, thanks.
^ permalink raw reply
* Re: [PATCH V3 net 0/3] Fix checksum issues with Q-in-Q vlans
From: David Miller @ 2017-05-24 20:25 UTC (permalink / raw)
To: vyasevich; +Cc: netdev, alexander.duyck, makita.toshiaki, vyasevic
In-Reply-To: <1495561123-1819-1-git-send-email-vyasevic@redhat.com>
From: Vladislav Yasevich <vyasevich@gmail.com>
Date: Tue, 23 May 2017 13:38:40 -0400
> TCP checksum appear broken on a lot of devices that
> advertise NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM. This problem
> becomes very visible/reproducable since the series
> commit afb0bc972b526 ("Merge branch 'stacked_vlan_tso'").
>
> In particular, the issue appeared consistently on bnx2 and be2net
> drivers (not all drivers were tested).
>
> This short series corrects this by disabling checksum offload
> support on packets sent through Q-in-Q vlans if the underlying HW only
> enables IP specific checksum features. We currently 'assume' that
> any drivers setting NETIF_F_HW_CSUM can correclty pass checksum offsets
> to HW. It is up to individual drivers to enable it properly through
> ndo_features_check if they have some support for Q-in-Q vlans.
>
> Additionally, be2net driver was fixed to make the proper call.
>
> While looking at the drivers, it was also found that virtio-net ended
> up disabling accelerations, which is unnecessary.
>
> V3: Fixed checkpatch errors.
>
> V2: Instead of disabling checksuming for all devices, only devices using
> NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM are now affected by this change.
> For drivers using NETIF_F_HW_CSUM, we will continue to use checksum
> offloading. If any drivers are found to be broken, they would need
> be fixed individually.
Series applied and queued up for -stable, thanks.
^ permalink raw reply
* Re: [PATCH net-next] net: dsa: support cross-chip ageing time
From: David Miller @ 2017-05-24 20:28 UTC (permalink / raw)
To: vivien.didelot; +Cc: netdev, linux-kernel, kernel, f.fainelli, andrew
In-Reply-To: <20170523192059.1720-1-vivien.didelot@savoirfairelinux.com>
From: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Date: Tue, 23 May 2017 15:20:59 -0400
> Now that the switchdev bridge ageing time attribute is propagated to all
> switch chips of the fabric, each switch can check if the requested value
> is valid and program itself, so that the whole fabric shares a common
> ageing time setting.
>
> This is especially needed for switch chips in between others, containing
> no bridge port members but evidently used in the data path.
>
> To achieve that, remove the condition which skips the other switches. We
> also don't need to identify the target switch anymore, thus remove the
> sw_index member of the dsa_notifier_ageing_time_info notifier structure.
>
> On ZII Dev Rev B (with two 88E6352 and one 88E6185) and ZII Dev Rev C
> (with two 88E6390X), we have the following hardware configuration:
...
> Before this patch:
...
> After this patch:
...
> Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Applied, thanks.
^ permalink raw reply
* Re: [PATCH net-next] tcp: fix TCP_SYNCNT flakes
From: David Miller @ 2017-05-24 20:30 UTC (permalink / raw)
To: eric.dumazet; +Cc: netdev, soheil, ycheng
In-Reply-To: <1495568315.6465.71.camel@edumazet-glaptop3.roam.corp.google.com>
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Tue, 23 May 2017 12:38:35 -0700
> From: Eric Dumazet <edumazet@google.com>
>
> After the mentioned commit, some of our packetdrill tests became flaky.
>
> TCP_SYNCNT socket option can limit the number of SYN retransmits.
>
> retransmits_timed_out() has to compare times computations based on
> local_clock() while timers are based on jiffies. With NTP adjustments
> and roundings we can observe 999 ms delay for 1000 ms timers.
> We end up sending one extra SYN packet.
>
> Gimmick added in commit 6fa12c850314 ("Revert Backoff [v3]: Calculate
> TCP's connection close threshold as a time value") makes no
> real sense for TCP_SYN_SENT sockets where no RTO backoff can happen at
> all.
>
> Lets use a simpler logic for TCP_SYN_SENT sockets and remove @syn_set
> parameter from retransmits_timed_out()
>
> Fixes: 9a568de4818d ("tcp: switch TCP TS option (RFC 7323) to 1ms clock")
> Signed-off-by: Eric Dumazet <edumazet@google.com>
> Signed-off-by: Yuchung Cheng <ycheng@google.com>
Applied, thanks Eric.
^ permalink raw reply
* Re: [patch net-next v2 0/8] mlxsw: Support firmware flash
From: David Miller @ 2017-05-24 20:33 UTC (permalink / raw)
To: jiri; +Cc: netdev, idosch, yotamg, mlxsw, Yuval.Mintz
In-Reply-To: <20170523195630.6460-1-jiri@resnulli.us>
From: Jiri Pirko <jiri@resnulli.us>
Date: Tue, 23 May 2017 21:56:22 +0200
> From: Jiri Pirko <jiri@mellanox.com>
>
> Add support for device firmware flash on mlxsw spectrum. The firmware files
> are expected to be in the Mellanox Firmware Archive version 2 (MFA2)
> format.
>
> The firmware flash is triggered on driver initialization time if the device
> firmware version does not meet the minimum firmware version supported by
> the driver.
>
> Currently, to activate the newly flashed firmware, the user needs to
> reboot his system.
>
> The first patch introduces the mlxfw module, which implements common logic
> needed for the firmware flash process on Mellanox products, such as the
> MFA2 format parsing and the firmware flash state machine logic. As the
> module implements common logic which will be needed by various different
> Mellanox drivers, it defines a set of callbacks needed to interact with the
> specific device.
>
> Patches 1-5 implement the needed mlxfw callbacks in the mlxsw spectrum
> driver.
>
> Patches 6 and 7 add boot-time firmware upgrade on the mlxsw spectrum
> driver.
>
> Patch 8 adds a fix needed for new firmware versions.
Series applied, although I hope you sort out the user interface
soon otherwise most of this is completely dead unused code.
Thanks.
^ permalink raw reply
* Re: [PATCH net-next v9 5/5] virtio_net: check return value of skb_to_sgvec always
From: Jason A. Donenfeld @ 2017-05-24 20:39 UTC (permalink / raw)
To: Sergei Shtylyov
Cc: Netdev, LKML, David Miller, Michael S. Tsirkin, Jason Wang
In-Reply-To: <decd478f-0d5d-af6a-5b59-b710658ea16b@cogentembedded.com>
On Wed, May 24, 2017 at 6:41 PM, Sergei Shtylyov
> I've only looked on the last 2 patches. You can add my:
>
> Reviewed-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
>
> if you want. :-)
Will do. For the series, or just for 5/5?
^ permalink raw reply
* Re: [PATCH v6 net-next 01/17] net: qualcomm: remove unnecessary includes
From: David Miller @ 2017-05-24 20:42 UTC (permalink / raw)
To: stefan.wahren
Cc: linux-serial, jslaby, gregkh, netdev, robh+dt, linux-kernel,
kubakici, mark.rutland, LinoSanfilippo, devicetree
In-Reply-To: <1746915556.279475.1495656327010@email.1und1.de>
From: Stefan Wahren <stefan.wahren@i2se.com>
Date: Wed, 24 May 2017 22:05:26 +0200 (CEST)
> AFAIK these ones above aren't necessary (no init, no kernel module,
> no kernel parameter, no kernel version) for this C file. So i will
> double check it.
You need the endianness translators like cpu_to_be32() or whatever,
so you need to figure out where you are getting that once these
explicit headers are removed.
And see, it's probably hidden inside of the private header's includes.
So we can't tell.
^ permalink raw reply
* Re: [PATCH net-next v9 5/5] virtio_net: check return value of skb_to_sgvec always
From: Sergei Shtylyov @ 2017-05-24 20:46 UTC (permalink / raw)
To: Jason A. Donenfeld
Cc: Netdev, LKML, David Miller, Michael S. Tsirkin, Jason Wang
In-Reply-To: <CAHmME9obros-WAMC69VWrg=Djb_ZwKz9WyBVvKkAMHmC3N87SA@mail.gmail.com>
On 05/24/2017 11:39 PM, Jason A. Donenfeld wrote:
>> I've only looked on the last 2 patches. You can add my:
>>
>> Reviewed-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
>>
>> if you want. :-)
>
> Will do. For the series, or just for 5/5?
5/5 only. :-)
MBR, Sergei
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox