* [PATCH net-next 2/8] net: dsa: Make most functions take a dsa_port argument
From: Florian Fainelli @ 2017-01-10 20:12 UTC (permalink / raw)
To: netdev
Cc: Andrew Lunn, Florian Fainelli, Ingo Tuchscherer, Jason Cooper,
Vivien Didelot, Greg Kroah-Hartman, open list, Russell King,
Stuart Yoder, Martin Schwidefsky, Gregory Clement,
Philippe Reynes, David S. Miller,
moderated list:ARM/Marvell Dove/MV78xx0/Orion SOC support,
Sebastian Hesselbarth
In-Reply-To: <20170110201235.21771-1-f.fainelli@gmail.com>
In preparation for allowing platform data, and therefore no valid
device_node pointer, make most DSA functions takes a pointer to a
dsa_port structure whenever possible. While at it, introduce a
dsa_port_is_valid() helper function which checks whether port->dn is
NULL or not at the moment.
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
net/dsa/dsa.c | 15 ++++++++------
net/dsa/dsa2.c | 61 +++++++++++++++++++++++++++++-------------------------
net/dsa/dsa_priv.h | 4 ++--
3 files changed, 44 insertions(+), 36 deletions(-)
diff --git a/net/dsa/dsa.c b/net/dsa/dsa.c
index fd532487dfdf..2306d1b87c83 100644
--- a/net/dsa/dsa.c
+++ b/net/dsa/dsa.c
@@ -110,8 +110,9 @@ dsa_switch_probe(struct device *parent, struct device *host_dev, int sw_addr,
/* basic switch operations **************************************************/
int dsa_cpu_dsa_setup(struct dsa_switch *ds, struct device *dev,
- struct device_node *port_dn, int port)
+ struct dsa_port *dport, int port)
{
+ struct device_node *port_dn = dport->dn;
struct phy_device *phydev;
int ret, mode;
@@ -141,15 +142,15 @@ int dsa_cpu_dsa_setup(struct dsa_switch *ds, struct device *dev,
static int dsa_cpu_dsa_setups(struct dsa_switch *ds, struct device *dev)
{
- struct device_node *port_dn;
+ struct dsa_port *dport;
int ret, port;
for (port = 0; port < DSA_MAX_PORTS; port++) {
if (!(dsa_is_cpu_port(ds, port) || dsa_is_dsa_port(ds, port)))
continue;
- port_dn = ds->ports[port].dn;
- ret = dsa_cpu_dsa_setup(ds, dev, port_dn, port);
+ dport = &ds->ports[port];
+ ret = dsa_cpu_dsa_setup(ds, dev, dport, port);
if (ret)
return ret;
}
@@ -366,8 +367,10 @@ dsa_switch_setup(struct dsa_switch_tree *dst, int index,
return ds;
}
-void dsa_cpu_dsa_destroy(struct device_node *port_dn)
+void dsa_cpu_dsa_destroy(struct dsa_port *port)
{
+ struct device_node *port_dn = port->dn;
+
if (of_phy_is_fixed_link(port_dn))
of_phy_deregister_fixed_link(port_dn);
}
@@ -393,7 +396,7 @@ static void dsa_switch_destroy(struct dsa_switch *ds)
for (port = 0; port < DSA_MAX_PORTS; port++) {
if (!(dsa_is_cpu_port(ds, port) || dsa_is_dsa_port(ds, port)))
continue;
- dsa_cpu_dsa_destroy(ds->ports[port].dn);
+ dsa_cpu_dsa_destroy(&ds->ports[port]);
/* Clearing a bit which is not set does no harm */
ds->cpu_port_mask |= ~(1 << port);
diff --git a/net/dsa/dsa2.c b/net/dsa/dsa2.c
index f0e3212ae9d5..91141ac6ec18 100644
--- a/net/dsa/dsa2.c
+++ b/net/dsa/dsa2.c
@@ -79,11 +79,16 @@ static void dsa_dst_del_ds(struct dsa_switch_tree *dst,
kref_put(&dst->refcount, dsa_free_dst);
}
-static bool dsa_port_is_dsa(struct device_node *port)
+static bool dsa_port_is_valid(struct dsa_port *port)
+{
+ return !!port->dn;
+}
+
+static bool dsa_port_is_dsa(struct dsa_port *port)
{
const char *name;
- name = of_get_property(port, "label", NULL);
+ name = of_get_property(port->dn, "label", NULL);
if (!name)
return false;
@@ -93,11 +98,11 @@ static bool dsa_port_is_dsa(struct device_node *port)
return false;
}
-static bool dsa_port_is_cpu(struct device_node *port)
+static bool dsa_port_is_cpu(struct dsa_port *port)
{
const char *name;
- name = of_get_property(port, "label", NULL);
+ name = of_get_property(port->dn, "label", NULL);
if (!name)
return false;
@@ -138,7 +143,7 @@ static struct dsa_switch *dsa_dst_find_port(struct dsa_switch_tree *dst,
static int dsa_port_complete(struct dsa_switch_tree *dst,
struct dsa_switch *src_ds,
- struct device_node *port,
+ struct dsa_port *port,
u32 src_port)
{
struct device_node *link;
@@ -146,7 +151,7 @@ static int dsa_port_complete(struct dsa_switch_tree *dst,
struct dsa_switch *dst_ds;
for (index = 0;; index++) {
- link = of_parse_phandle(port, "link", index);
+ link = of_parse_phandle(port->dn, "link", index);
if (!link)
break;
@@ -169,13 +174,13 @@ static int dsa_port_complete(struct dsa_switch_tree *dst,
*/
static int dsa_ds_complete(struct dsa_switch_tree *dst, struct dsa_switch *ds)
{
- struct device_node *port;
+ struct dsa_port *port;
u32 index;
int err;
for (index = 0; index < DSA_MAX_PORTS; index++) {
- port = ds->ports[index].dn;
- if (!port)
+ port = &ds->ports[index];
+ if (!dsa_port_is_valid(port))
continue;
if (!dsa_port_is_dsa(port))
@@ -215,7 +220,7 @@ static int dsa_dst_complete(struct dsa_switch_tree *dst)
return 0;
}
-static int dsa_dsa_port_apply(struct device_node *port, u32 index,
+static int dsa_dsa_port_apply(struct dsa_port *port, u32 index,
struct dsa_switch *ds)
{
int err;
@@ -230,13 +235,13 @@ static int dsa_dsa_port_apply(struct device_node *port, u32 index,
return 0;
}
-static void dsa_dsa_port_unapply(struct device_node *port, u32 index,
+static void dsa_dsa_port_unapply(struct dsa_port *port, u32 index,
struct dsa_switch *ds)
{
dsa_cpu_dsa_destroy(port);
}
-static int dsa_cpu_port_apply(struct device_node *port, u32 index,
+static int dsa_cpu_port_apply(struct dsa_port *port, u32 index,
struct dsa_switch *ds)
{
int err;
@@ -253,7 +258,7 @@ static int dsa_cpu_port_apply(struct device_node *port, u32 index,
return 0;
}
-static void dsa_cpu_port_unapply(struct device_node *port, u32 index,
+static void dsa_cpu_port_unapply(struct dsa_port *port, u32 index,
struct dsa_switch *ds)
{
dsa_cpu_dsa_destroy(port);
@@ -261,13 +266,13 @@ static void dsa_cpu_port_unapply(struct device_node *port, u32 index,
}
-static int dsa_user_port_apply(struct device_node *port, u32 index,
+static int dsa_user_port_apply(struct dsa_port *port, u32 index,
struct dsa_switch *ds)
{
const char *name;
int err;
- name = of_get_property(port, "label", NULL);
+ name = of_get_property(port->dn, "label", NULL);
err = dsa_slave_create(ds, ds->dev, index, name);
if (err) {
@@ -279,7 +284,7 @@ static int dsa_user_port_apply(struct device_node *port, u32 index,
return 0;
}
-static void dsa_user_port_unapply(struct device_node *port, u32 index,
+static void dsa_user_port_unapply(struct dsa_port *port, u32 index,
struct dsa_switch *ds)
{
if (ds->ports[index].netdev) {
@@ -291,7 +296,7 @@ static void dsa_user_port_unapply(struct device_node *port, u32 index,
static int dsa_ds_apply(struct dsa_switch_tree *dst, struct dsa_switch *ds)
{
- struct device_node *port;
+ struct dsa_port *port;
u32 index;
int err;
@@ -325,8 +330,8 @@ static int dsa_ds_apply(struct dsa_switch_tree *dst, struct dsa_switch *ds)
}
for (index = 0; index < DSA_MAX_PORTS; index++) {
- port = ds->ports[index].dn;
- if (!port)
+ port = &ds->ports[index];
+ if (!dsa_port_is_valid(port))
continue;
if (dsa_port_is_dsa(port)) {
@@ -353,12 +358,12 @@ static int dsa_ds_apply(struct dsa_switch_tree *dst, struct dsa_switch *ds)
static void dsa_ds_unapply(struct dsa_switch_tree *dst, struct dsa_switch *ds)
{
- struct device_node *port;
+ struct dsa_port *port;
u32 index;
for (index = 0; index < DSA_MAX_PORTS; index++) {
- port = ds->ports[index].dn;
- if (!port)
+ port = &ds->ports[index];
+ if (!dsa_port_is_valid(port))
continue;
if (dsa_port_is_dsa(port)) {
@@ -439,7 +444,7 @@ static void dsa_dst_unapply(struct dsa_switch_tree *dst)
dst->applied = false;
}
-static int dsa_cpu_parse(struct device_node *port, u32 index,
+static int dsa_cpu_parse(struct dsa_port *port, u32 index,
struct dsa_switch_tree *dst,
struct dsa_switch *ds)
{
@@ -447,7 +452,7 @@ static int dsa_cpu_parse(struct device_node *port, u32 index,
struct net_device *ethernet_dev;
struct device_node *ethernet;
- ethernet = of_parse_phandle(port, "ethernet", 0);
+ ethernet = of_parse_phandle(port->dn, "ethernet", 0);
if (!ethernet)
return -EINVAL;
@@ -480,13 +485,13 @@ static int dsa_cpu_parse(struct device_node *port, u32 index,
static int dsa_ds_parse(struct dsa_switch_tree *dst, struct dsa_switch *ds)
{
- struct device_node *port;
+ struct dsa_port *port;
u32 index;
int err;
for (index = 0; index < DSA_MAX_PORTS; index++) {
- port = ds->ports[index].dn;
- if (!port)
+ port = &ds->ports[index];
+ if (!dsa_port_is_valid(port))
continue;
if (dsa_port_is_cpu(port)) {
@@ -547,7 +552,7 @@ static int dsa_parse_ports_dn(struct device_node *ports, struct dsa_switch *ds)
* to have access to a correct value, just like what
* net/dsa/dsa.c::dsa_switch_setup_one does.
*/
- if (!dsa_port_is_cpu(port))
+ if (!dsa_port_is_cpu(&ds->ports[reg]))
ds->enabled_port_mask |= 1 << reg;
}
diff --git a/net/dsa/dsa_priv.h b/net/dsa/dsa_priv.h
index 7e3385ec73f4..a015ec97c289 100644
--- a/net/dsa/dsa_priv.h
+++ b/net/dsa/dsa_priv.h
@@ -50,8 +50,8 @@ struct dsa_slave_priv {
/* dsa.c */
int dsa_cpu_dsa_setup(struct dsa_switch *ds, struct device *dev,
- struct device_node *port_dn, int port);
-void dsa_cpu_dsa_destroy(struct device_node *port_dn);
+ struct dsa_port *dport, int port);
+void dsa_cpu_dsa_destroy(struct dsa_port *dport);
const struct dsa_device_ops *dsa_resolve_tag_protocol(int tag_protocol);
int dsa_cpu_port_ethtool_setup(struct dsa_switch *ds);
void dsa_cpu_port_ethtool_restore(struct dsa_switch *ds);
--
2.9.3
^ permalink raw reply related
* [PATCH net-next 1/8] net: dsa: Pass device pointer to dsa_register_switch
From: Florian Fainelli @ 2017-01-10 20:12 UTC (permalink / raw)
To: netdev
Cc: Andrew Lunn, Florian Fainelli, Ingo Tuchscherer, Jason Cooper,
Vivien Didelot, Greg Kroah-Hartman, open list, Russell King,
Stuart Yoder, Martin Schwidefsky, Gregory Clement,
Philippe Reynes, David S. Miller,
moderated list:ARM/Marvell Dove/MV78xx0/Orion SOC support,
Sebastian Hesselbarth
In-Reply-To: <20170110201235.21771-1-f.fainelli@gmail.com>
In preparation for allowing dsa_register_switch() to be supplied with
device/platform data, pass down a struct device pointer instead of a
struct device_node.
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
drivers/net/dsa/b53/b53_common.c | 2 +-
drivers/net/dsa/mv88e6xxx/chip.c | 11 ++++++-----
drivers/net/dsa/qca8k.c | 2 +-
include/net/dsa.h | 2 +-
net/dsa/dsa2.c | 7 ++++---
5 files changed, 13 insertions(+), 11 deletions(-)
diff --git a/drivers/net/dsa/b53/b53_common.c b/drivers/net/dsa/b53/b53_common.c
index 5102a3701a1a..7179eed9ee6d 100644
--- a/drivers/net/dsa/b53/b53_common.c
+++ b/drivers/net/dsa/b53/b53_common.c
@@ -1882,7 +1882,7 @@ int b53_switch_register(struct b53_device *dev)
pr_info("found switch: %s, rev %i\n", dev->name, dev->core_rev);
- return dsa_register_switch(dev->ds, dev->ds->dev->of_node);
+ return dsa_register_switch(dev->ds, dev->ds->dev);
}
EXPORT_SYMBOL(b53_switch_register);
diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b/drivers/net/dsa/mv88e6xxx/chip.c
index eea8e0176e33..1060597e160a 100644
--- a/drivers/net/dsa/mv88e6xxx/chip.c
+++ b/drivers/net/dsa/mv88e6xxx/chip.c
@@ -4407,8 +4407,7 @@ static struct dsa_switch_driver mv88e6xxx_switch_drv = {
.ops = &mv88e6xxx_switch_ops,
};
-static int mv88e6xxx_register_switch(struct mv88e6xxx_chip *chip,
- struct device_node *np)
+static int mv88e6xxx_register_switch(struct mv88e6xxx_chip *chip)
{
struct device *dev = chip->dev;
struct dsa_switch *ds;
@@ -4423,7 +4422,7 @@ static int mv88e6xxx_register_switch(struct mv88e6xxx_chip *chip,
dev_set_drvdata(dev, ds);
- return dsa_register_switch(ds, np);
+ return dsa_register_switch(ds, dev);
}
static void mv88e6xxx_unregister_switch(struct mv88e6xxx_chip *chip)
@@ -4507,9 +4506,11 @@ static int mv88e6xxx_probe(struct mdio_device *mdiodev)
if (err)
goto out_g2_irq;
- err = mv88e6xxx_register_switch(chip, np);
- if (err)
+ err = mv88e6xxx_register_switch(chip);
+ if (err) {
+ mv88e6xxx_mdio_unregister(chip);
goto out_mdio;
+ }
return 0;
diff --git a/drivers/net/dsa/qca8k.c b/drivers/net/dsa/qca8k.c
index 54d270d59eb0..c084aa484d2b 100644
--- a/drivers/net/dsa/qca8k.c
+++ b/drivers/net/dsa/qca8k.c
@@ -964,7 +964,7 @@ qca8k_sw_probe(struct mdio_device *mdiodev)
mutex_init(&priv->reg_mutex);
dev_set_drvdata(&mdiodev->dev, priv);
- return dsa_register_switch(priv->ds, priv->ds->dev->of_node);
+ return dsa_register_switch(priv->ds, &mdiodev->dev);
}
static void
diff --git a/include/net/dsa.h b/include/net/dsa.h
index b94d1f2ef912..16a502a6c26a 100644
--- a/include/net/dsa.h
+++ b/include/net/dsa.h
@@ -403,7 +403,7 @@ static inline bool dsa_uses_tagged_protocol(struct dsa_switch_tree *dst)
}
void dsa_unregister_switch(struct dsa_switch *ds);
-int dsa_register_switch(struct dsa_switch *ds, struct device_node *np);
+int dsa_register_switch(struct dsa_switch *ds, struct device *dev);
#ifdef CONFIG_PM_SLEEP
int dsa_switch_suspend(struct dsa_switch *ds);
int dsa_switch_resume(struct dsa_switch *ds);
diff --git a/net/dsa/dsa2.c b/net/dsa/dsa2.c
index bad119cee2a3..f0e3212ae9d5 100644
--- a/net/dsa/dsa2.c
+++ b/net/dsa/dsa2.c
@@ -592,8 +592,9 @@ static struct device_node *dsa_get_ports(struct dsa_switch *ds,
return ports;
}
-static int _dsa_register_switch(struct dsa_switch *ds, struct device_node *np)
+static int _dsa_register_switch(struct dsa_switch *ds, struct device *dev)
{
+ struct device_node *np = dev->of_node;
struct device_node *ports = dsa_get_ports(ds, np);
struct dsa_switch_tree *dst;
u32 tree, index;
@@ -673,12 +674,12 @@ static int _dsa_register_switch(struct dsa_switch *ds, struct device_node *np)
return err;
}
-int dsa_register_switch(struct dsa_switch *ds, struct device_node *np)
+int dsa_register_switch(struct dsa_switch *ds, struct device *dev)
{
int err;
mutex_lock(&dsa2_mutex);
- err = _dsa_register_switch(ds, np);
+ err = _dsa_register_switch(ds, dev);
mutex_unlock(&dsa2_mutex);
return err;
--
2.9.3
^ permalink raw reply related
* [PATCH net-next 0/8] net: dsa: Support for pdata in dsa2
From: Florian Fainelli @ 2017-01-10 20:12 UTC (permalink / raw)
To: netdev
Cc: Florian Fainelli, Jason Cooper, Andrew Lunn,
Sebastian Hesselbarth, Gregory Clement, Russell King,
Vivien Didelot, David S. Miller, Philippe Reynes,
Martin Schwidefsky, Greg Kroah-Hartman, Stuart Yoder,
Ingo Tuchscherer,
moderated list:ARM/Marvell Dove/MV78xx0/Orion SOC support,
open list
Hi all,
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.
Yes I know that we should have the Orion platforms eventually be converted to
Device Tree, but until that happens, I don't want any remaining users of the
old "dsa" platform device (hence the previous DTS submissions for ARM/mvebu)
and, there will be platforms out there that most likely won't never see DT
coming their way (BCM47xx is almost 100% sure, BCM63xx maybe not in a distant
future).
We would probably want the whole series to be merged via David Miller's tree
to simplify things.
Thanks!
Changes from last submission (few months back):
- rebased against latest net-next
- do not introduce dsa2_platform_data which was overkill and was meant to
allow us to do exaclty the same things with platform data and Device Tree
we use the existing dsa_platform_data instead
- properly register MDIO devices when the MDIO bus is registered and associate
platform_data with them
- add a change to the Orion platform code to demonstrate how this can be used
Thank you
Florian Fainelli (8):
net: dsa: Pass device pointer to dsa_register_switch
net: dsa: Make most functions take a dsa_port argument
net: dsa: Suffix function manipulating device_node with _dn
net: dsa: Move ports assignment closer to error checking
net: dsa: Export dev_to_net_device()
net: dsa: Add support for platform data
net: phy: Allow pre-declaration of MDIO devices
ARM: orion: Register DSA switch as a MDIO device
arch/arm/plat-orion/common.c | 19 ++++-
drivers/net/dsa/b53/b53_common.c | 2 +-
drivers/net/dsa/mv88e6xxx/chip.c | 8 +-
drivers/net/dsa/qca8k.c | 2 +-
drivers/net/phy/Makefile | 3 +-
drivers/net/phy/mdio-boardinfo.c | 86 ++++++++++++++++++++
drivers/net/phy/mdio-boardinfo.h | 19 +++++
drivers/net/phy/mdio_bus.c | 5 ++
drivers/net/phy/mdio_device.c | 11 +++
include/linux/mdio.h | 3 +
include/linux/mod_devicetable.h | 1 +
include/linux/phy.h | 19 +++++
include/net/dsa.h | 4 +-
net/dsa/dsa.c | 18 +++--
net/dsa/dsa2.c | 169 +++++++++++++++++++++++++++------------
net/dsa/dsa_priv.h | 4 +-
16 files changed, 301 insertions(+), 72 deletions(-)
create mode 100644 drivers/net/phy/mdio-boardinfo.c
create mode 100644 drivers/net/phy/mdio-boardinfo.h
--
2.9.3
^ permalink raw reply
* Re: [net-next PATCH 1/3] Revert "icmp: avoid allocating large struct on stack"
From: Jesper Dangaard Brouer @ 2017-01-10 20:08 UTC (permalink / raw)
To: Cong Wang
Cc: David Miller, Eric Dumazet, Linux Kernel Network Developers,
brouer
In-Reply-To: <CAM_iQpV0V23fndi6DOW1gu9kq+2UufHNrnfRYCME7uOOLCaX-Q@mail.gmail.com>
On Tue, 10 Jan 2017 10:44:59 -0800 Cong Wang <xiyou.wangcong@gmail.com> wrote:
> On Tue, Jan 10, 2017 at 10:12 AM, David Miller <davem@davemloft.net> wrote:
[...]
> > You can keep showing us how expertly you can deflect the real
> > issue we are discussion here, but that won't improve the situation
> > at all I am afraid.
>
> Of course, there are just too many people too lazy to do a google search:
>
> https://lists.debian.org/debian-kernel/2013/05/msg00500.html
My analysis of the problem shown in above link is not related to using
all the stack space, but instead that skb->cb was not cleared. This
can cause the ip_options_echo() call in icmp_send() to access garbage
as this is: __ip_options_echo(dopt, skb, &IPCB(skb)->opt).
Fixed by commit a622260254ee ("ip_tunnel: fix kernel panic with icmp_dest_unreach")
https://git.kernel.org/torvalds/c/a622260254ee
Thus, it is (likely) the __ip_options_echo() call that violates stack
access, as it is passed in a pointer to the stack, and advance this
based on garbage "optlen".
--
Best regards,
Jesper Dangaard Brouer
MSc.CS, Principal Kernel Engineer at Red Hat
LinkedIn: http://www.linkedin.com/in/brouer
^ permalink raw reply
* Re: [PATCH net v2] mlx4: Return EOPNOTSUPP instead of ENOTSUPP
From: Saeed Mahameed @ 2017-01-10 20:04 UTC (permalink / raw)
To: Martin KaFai Lau
Cc: Linux Netdev List, Saeed Mahameed, Tariq Toukan, Kernel Team
In-Reply-To: <1484070109-105991-1-git-send-email-kafai@fb.com>
On Tue, Jan 10, 2017 at 7:41 PM, Martin KaFai Lau <kafai@fb.com> wrote:
> In commit b45f0674b997 ("mlx4: xdp: Allow raising MTU up to one page minus eth and vlan hdrs"),
> it changed EOPNOTSUPP to ENOTSUPP by mistake. This patch fixes it.
>
> Fixes: b45f0674b997 ("mlx4: xdp: Allow raising MTU up to one page minus eth and vlan hdrs")
> Signed-off-by: Martin KaFai Lau <kafai@fb.com>
Acked-by: Saeed Mahameed <saeedm@mellanox.com>
Thank you martin.
Small question though,
is it essential for the upper layer to get the correct errno ? or this
is just a cleanup ?
^ permalink raw reply
* Re: [PATCH net-next 5/7] tcp_nv: make tcpnv_get_info static
From: Lawrence Brakmo @ 2017-01-10 19:50 UTC (permalink / raw)
To: Stephen Hemminger, davem@davemloft.net
Cc: netdev@vger.kernel.org, Stephen Hemminger
In-Reply-To: <20170110181816.18991-6-sthemmin@microsoft.com>
On 1/10/17, 10:18 AM, "netdev-owner@vger.kernel.org on behalf of Stephen
Hemminger" <netdev-owner@vger.kernel.org on behalf of
stephen@networkplumber.org> wrote:
>Function only used in this file.
>
>Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
>---
> net/ipv4/tcp_nv.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
>diff --git a/net/ipv4/tcp_nv.c b/net/ipv4/tcp_nv.c
>index 5de82a8d4d87..0065f44c40c1 100644
>--- a/net/ipv4/tcp_nv.c
>+++ b/net/ipv4/tcp_nv.c
>@@ -424,8 +424,8 @@ static void tcpnv_acked(struct sock *sk, const struct
>ack_sample *sample)
> }
>
> /* Extract info for Tcp socket info provided via netlink */
>-size_t tcpnv_get_info(struct sock *sk, u32 ext, int *attr,
>- union tcp_cc_info *info)
>+static size_t tcpnv_get_info(struct sock *sk, u32 ext, int *attr,
>+ union tcp_cc_info *info)
> {
> const struct tcpnv *ca = inet_csk_ca(sk);
>
>--
>2.11.0
>
You should also remove the line:
EXPORT_SYMBOL_GPL(tcpnv_get_info);
^ permalink raw reply
* Re: [PATCH v2 net-next] liquidio: store the L4 hash of rx packets in skb
From: David Miller @ 2017-01-10 19:23 UTC (permalink / raw)
To: felix.manlunas
Cc: netdev, raghu.vatsavayi, derek.chickles, satananda.burla,
eric.dumazet
In-Reply-To: <20170109224240.GA10166@felix.cavium.com>
From: Felix Manlunas <felix.manlunas@cavium.com>
Date: Mon, 9 Jan 2017 14:42:40 -0800
> From: Prasad Kanneganti <prasad.kanneganti@cavium.com>
>
> Store the L4 hash of received packets in the skb; the hash is computed in
> the NIC firmware.
>
> Signed-off-by: Prasad Kanneganti <prasad.kanneganti@cavium.com>
> Signed-off-by: Felix Manlunas <felix.manlunas@cavium.com>
> Signed-off-by: Derek Chickles <derek.chickles@cavium.com>
> Signed-off-by: Satanand Burla <satananda.burla@cavium.com>
Applied, thanks.
^ permalink raw reply
* Re: [PATCH net-next 0/3] sfc: physical port ids
From: David Miller @ 2017-01-10 19:18 UTC (permalink / raw)
To: ecree; +Cc: linux-net-drivers, netdev
In-Reply-To: <78b911fa-ba82-093e-ba00-f4bdb09f1896@solarflare.com>
From: Edward Cree <ecree@solarflare.com>
Date: Tue, 10 Jan 2017 16:22:26 +0000
> This series brings our handling of ndo_get_phys_port_id and related
> interfaces into line with the behaviour of other drivers.
Series applied, thanks.
^ permalink raw reply
* Re: [net-next PATCH 1/3] Revert "icmp: avoid allocating large struct on stack"
From: David Miller @ 2017-01-10 18:54 UTC (permalink / raw)
To: xiyou.wangcong; +Cc: eric.dumazet, brouer, netdev
In-Reply-To: <CAM_iQpV0V23fndi6DOW1gu9kq+2UufHNrnfRYCME7uOOLCaX-Q@mail.gmail.com>
From: Cong Wang <xiyou.wangcong@gmail.com>
Date: Tue, 10 Jan 2017 10:44:59 -0800
> On Tue, Jan 10, 2017 at 10:12 AM, David Miller <davem@davemloft.net> wrote:
> Facepalm is heavily used on Internet:
> https://en.wikipedia.org/wiki/Facepalm#Internet_usage
>
> it is how people including me react to disappointing.
Everyone here, except you, believe that this is rude behavior.
Keep coming up with your own reasons why you are special and
can behave this way.
> The only countries you hold netdev are Canada, Japan and Spain
> (to my knowledge). If you check:
>
> https://en.wikipedia.org/wiki/Visa_requirements_for_Chinese_citizens#Visa_requirements
>
> It is very easy to find out if it is an excuse or a fact.
The conference explciitly offers VISA help for anyone who needs it.
Many people come to the conference on a VISA we helped them obtain.
It is not hard to do. You have put in exactly zero effort in trying
to solve this problem. If you had simply contacted the conference
organizers asking for help, you would have gotten all the help you
needed.
In fact we explicitly asked you to attend, and you turned us down.
So don't say that every effort hasn't been made to get you into the
conference.
^ permalink raw reply
* Re: [net-next PATCH 1/3] Revert "icmp: avoid allocating large struct on stack"
From: Cong Wang @ 2017-01-10 18:48 UTC (permalink / raw)
To: David Miller
Cc: Eric Dumazet, Jesper Dangaard Brouer,
Linux Kernel Network Developers
In-Reply-To: <CAM_iQpV0V23fndi6DOW1gu9kq+2UufHNrnfRYCME7uOOLCaX-Q@mail.gmail.com>
On Tue, Jan 10, 2017 at 10:44 AM, Cong Wang <xiyou.wangcong@gmail.com> wrote:
> Of course, there are just too many people too lazy to do a google search:
>
> https://lists.debian.org/debian-kernel/2013/05/msg00500.html
>
One more:
https://communities.intel.com/thread/28935 (<-- search icmp_send)
^ permalink raw reply
* Re: [net-next PATCH 1/3] Revert "icmp: avoid allocating large struct on stack"
From: Cong Wang @ 2017-01-10 18:44 UTC (permalink / raw)
To: David Miller
Cc: Eric Dumazet, Jesper Dangaard Brouer,
Linux Kernel Network Developers
In-Reply-To: <20170110.131223.748150430551443881.davem@davemloft.net>
On Tue, Jan 10, 2017 at 10:12 AM, David Miller <davem@davemloft.net> wrote:
> From: Cong Wang <xiyou.wangcong@gmail.com>
> Date: Tue, 10 Jan 2017 10:06:01 -0800
>
>> On Mon, Jan 9, 2017 at 10:52 AM, David Miller <davem@davemloft.net> wrote:
>>> From: Eric Dumazet <eric.dumazet@gmail.com>
>>> Date: Mon, 09 Jan 2017 10:07:04 -0800
>>>
>>>> You really should come to netdev conferences so that you understand
>>>> goals and efforts, instead of living in your cave.
>>>
>>> I completely agree with Eric.
>>>
>>> Cong we have a very serious problem with you exactly because you make
>>> quite vicious emotional statements targetted at other developers
>>> merely when they say something you disagree with.
>>
>> What emotional? Pointing out Eris's words from 4 years ago is NOT
>> emotional, it is just a help.
>
> Saying "Facepalm" is emotional and has nothing to do with the
> technical issues.
Facepalm is heavily used on Internet:
https://en.wikipedia.org/wiki/Facepalm#Internet_usage
it is how people including me react to disappointing. It is those
who only see facepalm make it irrelevant to the technical discussion
in this thread.
>
> You can keep showing us how expertly you can deflect the real
> issue we are discussion here, but that won't improve the situation
> at all I am afraid.
Of course, there are just too many people too lazy to do a google search:
https://lists.debian.org/debian-kernel/2013/05/msg00500.html
>
>> Not everyone is as free to travel to Canada without a visa as you,
>> unfortunately.
>
> We hold netdev in other countries all over the world, stop making
> excuses.
The only countries you hold netdev are Canada, Japan and Spain
(to my knowledge). If you check:
https://en.wikipedia.org/wiki/Visa_requirements_for_Chinese_citizens#Visa_requirements
It is very easy to find out if it is an excuse or a fact.
^ permalink raw reply
* Re: [PATCH net-next 1/7] flow_dissector: make local function static
From: Stephen Hemminger @ 2017-01-10 18:43 UTC (permalink / raw)
To: David Miller; +Cc: netdev, sthemmin
In-Reply-To: <20170110.133201.2103096039977087636.davem@davemloft.net>
On Tue, 10 Jan 2017 13:32:01 -0500 (EST)
David Miller <davem@davemloft.net> wrote:
> From: Stephen Hemminger <stephen@networkplumber.org>
> Date: Tue, 10 Jan 2017 10:18:10 -0800
>
> > Fix warning: no previous prototype for ‘skb_flow_get_be16’
> > Function is only used in this file, make it static.
> >
> > Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
>
> Eric Dumazet already posted a patch which does this.
Yeah it looks like several of these got posted today.
^ permalink raw reply
* Re: [PATCH 2/3] xgbe: switch to pci_irq_alloc_vectors
From: Tom Lendacky @ 2017-01-10 18:40 UTC (permalink / raw)
To: Christoph Hellwig, linux-pci; +Cc: Mauro Carvalho Chehab, netdev, linux-media
In-Reply-To: <1483994260-19797-3-git-send-email-hch@lst.de>
On 1/9/2017 2:37 PM, Christoph Hellwig wrote:
> The newly added xgbe drivers uses the deprecated pci_enable_msi_exact
> and pci_enable_msix_range interfaces. Switch it to use
> pci_irq_alloc_vectors instead.
I was just working on switching over to this API with some additional
changes / simplification. I'm ok with using this patch so that you get
the API removal accomplished. Going through the PCI tree just means
it will probably be easier for me to hold off on the additional changes
I wanted to make until later.
Acked-by: Tom Lendacky <thomas.lendacky@amd.com>
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
> drivers/net/ethernet/amd/xgbe/xgbe-pci.c | 47 +++++++++++++-------------------
> drivers/net/ethernet/amd/xgbe/xgbe.h | 1 -
> 2 files changed, 19 insertions(+), 29 deletions(-)
>
> diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-pci.c b/drivers/net/ethernet/amd/xgbe/xgbe-pci.c
> index e76b7f6..be2690e 100644
> --- a/drivers/net/ethernet/amd/xgbe/xgbe-pci.c
> +++ b/drivers/net/ethernet/amd/xgbe/xgbe-pci.c
> @@ -133,12 +133,13 @@ static int xgbe_config_msi(struct xgbe_prv_data *pdata)
> pdata->tx_ring_count);
> msi_count = roundup_pow_of_two(msi_count);
>
> - ret = pci_enable_msi_exact(pdata->pcidev, msi_count);
> + ret = pci_alloc_irq_vectors(pdata->pcidev, msi_count, msi_count,
> + PCI_IRQ_MSI);
> if (ret < 0) {
> dev_info(pdata->dev, "MSI request for %u interrupts failed\n",
> msi_count);
>
> - ret = pci_enable_msi(pdata->pcidev);
> + ret = pci_alloc_irq_vectors(pdata->pcidev, 1, 1, PCI_IRQ_MSI);
> if (ret < 0) {
> dev_info(pdata->dev, "MSI enablement failed\n");
> return ret;
> @@ -149,25 +150,26 @@ static int xgbe_config_msi(struct xgbe_prv_data *pdata)
>
> pdata->irq_count = msi_count;
>
> - pdata->dev_irq = pdata->pcidev->irq;
> + pdata->dev_irq = pci_irq_vector(pdata->pcidev, 0);
>
> if (msi_count > 1) {
> - pdata->ecc_irq = pdata->pcidev->irq + 1;
> - pdata->i2c_irq = pdata->pcidev->irq + 2;
> - pdata->an_irq = pdata->pcidev->irq + 3;
> + pdata->ecc_irq = pci_irq_vector(pdata->pcidev, 1);
> + pdata->i2c_irq = pci_irq_vector(pdata->pcidev, 2);
> + pdata->an_irq = pci_irq_vector(pdata->pcidev, 3);
>
> for (i = XGBE_MSIX_BASE_COUNT, j = 0;
> (i < msi_count) && (j < XGBE_MAX_DMA_CHANNELS);
> i++, j++)
> - pdata->channel_irq[j] = pdata->pcidev->irq + i;
> + pdata->channel_irq[j] =
> + pci_irq_vector(pdata->pcidev, i);
> pdata->channel_irq_count = j;
>
> pdata->per_channel_irq = 1;
> pdata->channel_irq_mode = XGBE_IRQ_MODE_LEVEL;
> } else {
> - pdata->ecc_irq = pdata->pcidev->irq;
> - pdata->i2c_irq = pdata->pcidev->irq;
> - pdata->an_irq = pdata->pcidev->irq;
> + pdata->ecc_irq = pci_irq_vector(pdata->pcidev, 0);
> + pdata->i2c_irq = pci_irq_vector(pdata->pcidev, 0);
> + pdata->an_irq = pci_irq_vector(pdata->pcidev, 0);
> }
>
> if (netif_msg_probe(pdata))
> @@ -186,33 +188,22 @@ static int xgbe_config_msix(struct xgbe_prv_data *pdata)
> msix_count += max(pdata->rx_ring_count,
> pdata->tx_ring_count);
>
> - pdata->msix_entries = devm_kcalloc(pdata->dev, msix_count,
> - sizeof(struct msix_entry),
> - GFP_KERNEL);
> - if (!pdata->msix_entries)
> - return -ENOMEM;
> -
> - for (i = 0; i < msix_count; i++)
> - pdata->msix_entries[i].entry = i;
> -
> - ret = pci_enable_msix_range(pdata->pcidev, pdata->msix_entries,
> - XGBE_MSIX_MIN_COUNT, msix_count);
> + ret = pci_alloc_irq_vectors(pdata->pcidev, XGBE_MSIX_MIN_COUNT,
> + msix_count, PCI_IRQ_MSIX);
> if (ret < 0) {
> dev_info(pdata->dev, "MSI-X enablement failed\n");
> - devm_kfree(pdata->dev, pdata->msix_entries);
> - pdata->msix_entries = NULL;
> return ret;
> }
>
> pdata->irq_count = ret;
>
> - pdata->dev_irq = pdata->msix_entries[0].vector;
> - pdata->ecc_irq = pdata->msix_entries[1].vector;
> - pdata->i2c_irq = pdata->msix_entries[2].vector;
> - pdata->an_irq = pdata->msix_entries[3].vector;
> + pdata->dev_irq = pci_irq_vector(pdata->pcidev, 0);
> + pdata->ecc_irq = pci_irq_vector(pdata->pcidev, 1);
> + pdata->i2c_irq = pci_irq_vector(pdata->pcidev, 2);
> + pdata->an_irq = pci_irq_vector(pdata->pcidev, 3);
>
> for (i = XGBE_MSIX_BASE_COUNT, j = 0; i < ret; i++, j++)
> - pdata->channel_irq[j] = pdata->msix_entries[i].vector;
> + pdata->channel_irq[j] = pci_irq_vector(pdata->pcidev, i);
> pdata->channel_irq_count = j;
>
> pdata->per_channel_irq = 1;
> diff --git a/drivers/net/ethernet/amd/xgbe/xgbe.h b/drivers/net/ethernet/amd/xgbe/xgbe.h
> index f52a9bd..3bcb6f5 100644
> --- a/drivers/net/ethernet/amd/xgbe/xgbe.h
> +++ b/drivers/net/ethernet/amd/xgbe/xgbe.h
> @@ -980,7 +980,6 @@ struct xgbe_prv_data {
> unsigned int desc_ded_count;
> unsigned int desc_sec_count;
>
> - struct msix_entry *msix_entries;
> int dev_irq;
> int ecc_irq;
> int i2c_irq;
>
^ permalink raw reply
* Re: [PATCH iproute2 2/3] ip: add ip sr command to control SR-IPv6 internal structures
From: Stephen Hemminger @ 2017-01-10 18:35 UTC (permalink / raw)
To: David Lebrun; +Cc: netdev
In-Reply-To: <1484066486-22152-3-git-send-email-david.lebrun@uclouvain.be>
On Tue, 10 Jan 2017 17:41:25 +0100
David Lebrun <david.lebrun@uclouvain.be> wrote:
> This patch add commands to support the tunnel source properties
> ("ip sr tunsrc") and the HMAC key -> secret, algorithm binding
> ("ip sr hmac").
>
> Signed-off-by: David Lebrun <david.lebrun@uclouvain.be>
> ---
Man page?
^ permalink raw reply
* Re: [PATCH iproute2 1/3] sr: add header files for SR-IPv6
From: Stephen Hemminger @ 2017-01-10 18:33 UTC (permalink / raw)
To: David Lebrun; +Cc: netdev
In-Reply-To: <1484066486-22152-2-git-send-email-david.lebrun@uclouvain.be>
On Tue, 10 Jan 2017 17:41:24 +0100
David Lebrun <david.lebrun@uclouvain.be> wrote:
> This patch add the necessary header files to interface with the SR-IPv6 kernel
> implementation.
>
> Signed-off-by: David Lebrun <david.lebrun@uclouvain.be>
> ---
> include/linux/seg6.h | 54 +++++++++++++++++++++++++++++++++++++++++++
> include/linux/seg6_genl.h | 32 +++++++++++++++++++++++++
> include/linux/seg6_hmac.h | 21 +++++++++++++++++
> include/linux/seg6_iptunnel.h | 38 ++++++++++++++++++++++++++++++
> 4 files changed, 145 insertions(+)
> create mode 100644 include/linux/seg6.h
> create mode 100644 include/linux/seg6_genl.h
> create mode 100644 include/linux/seg6_hmac.h
> create mode 100644 include/linux/seg6_iptunnel.h
I get all headers from santized kernel headers generated by
$ make headers_install
but the segmentation stuff is missing.
When you added segment routing headers you forgot to export them.
Please send a patch to include/uapi/linux/Kbuild, after that is merged
I will pick them up.
Also this patch is only for net-next.
^ permalink raw reply
* Re: [PATCH net-next 1/7] flow_dissector: make local function static
From: David Miller @ 2017-01-10 18:32 UTC (permalink / raw)
To: stephen; +Cc: netdev, sthemmin
In-Reply-To: <20170110181816.18991-2-sthemmin@microsoft.com>
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Tue, 10 Jan 2017 10:18:10 -0800
> Fix warning: no previous prototype for ‘skb_flow_get_be16’
> Function is only used in this file, make it static.
>
> Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
Eric Dumazet already posted a patch which does this.
^ permalink raw reply
* Re: [PATCH net] net: skb_flow_get_be16() can be static
From: David Miller @ 2017-01-10 18:31 UTC (permalink / raw)
To: eric.dumazet; +Cc: netdev
In-Reply-To: <1483989481.21472.16.camel@edumazet-glaptop3.roam.corp.google.com>
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Mon, 09 Jan 2017 11:18:01 -0800
> From: Eric Dumazet <edumazet@google.com>
>
> Removes following sparse complain :
>
> net/core/flow_dissector.c:70:8: warning: symbol 'skb_flow_get_be16'
> was not declared. Should it be static?
>
> Fixes: 972d3876faa8 ("flow dissector: ICMP support")
> Signed-off-by: Eric Dumazet <edumazet@google.com>
Applied.
^ permalink raw reply
* Re: [PATCH net] ipv6: sr: fix BUG in HMAC init when preemption is enabled
From: ericnetdev dumazet @ 2017-01-10 18:31 UTC (permalink / raw)
To: David Miller; +Cc: David Lebrun, netdev
In-Reply-To: <20170110.132946.149711848864334015.davem@davemloft.net>
2017-01-10 10:29 GMT-08:00 David Miller <davem@davemloft.net>:
> From: ericnetdev dumazet <erdnetdev@gmail.com>
>
> Oh noez, do we have an imposter? :-)
My normal gmail account seems to have a huge lag , or maybe this is
the IMAP access only.
;)
^ permalink raw reply
* Re: [PATCH net] ipv6: sr: fix BUG in HMAC init when preemption is enabled
From: David Miller @ 2017-01-10 18:29 UTC (permalink / raw)
To: erdnetdev; +Cc: david.lebrun, netdev
In-Reply-To: <CAHTyZGxoCV=fUjbUq2r5vtH2rDqGScrf=ty2HYOL8KLhdf4R4w@mail.gmail.com>
From: ericnetdev dumazet <erdnetdev@gmail.com>
Oh noez, do we have an imposter? :-)
^ permalink raw reply
* Re: [PATCH] [v3] net: qcom/emac: add ethtool support
From: David Miller @ 2017-01-10 18:28 UTC (permalink / raw)
To: timur; +Cc: f.fainelli, netdev, alokc
In-Reply-To: <1483984992-21236-1-git-send-email-timur@codeaurora.org>
From: Timur Tabi <timur@codeaurora.org>
Date: Mon, 9 Jan 2017 12:03:12 -0600
> Add support for some ethtool methods: get/set link settings, get/set
> message level, get statistics, get link status, get ring params, get
> pause params, and restart autonegotiation.
>
> The code to collect the hardware statistics is moved into its own
> function so that it can be used by "get statistics" method.
>
> Signed-off-by: Timur Tabi <timur@codeaurora.org>
Applied, thanks.
^ permalink raw reply
* Re: [PATCH net-next] bridge: multicast to unicast
From: Dave Taht @ 2017-01-10 18:24 UTC (permalink / raw)
To: Felix Fietkau
Cc: Johannes Berg, Linus Lüssing, Stephen Hemminger, M. Braun,
netdev@vger.kernel.org, David S . Miller, bridge,
linux-kernel@vger.kernel.org, linux-wireless
In-Reply-To: <99c01ce6-d80c-790e-25e5-157be31aee9a@nbd.name>
On Tue, Jan 10, 2017 at 9:23 AM, Felix Fietkau <nbd@nbd.name> wrote:
> On 2017-01-10 18:17, Dave Taht wrote:
>> In the case of wifi I have 3 issues with this line of thought.
>>
>> multicast in wifi has generally supposed to be unreliable. This makes
>> it reliable. reliability comes at a cost -
>>
>> multicast is typically set at a fixed low rate today. unicast is
>> retried at different rates until it succeeds - for every station
>> listening. If one station is already at the lowest rate, the total
>> cost of the transmit increases, rather than decreases.
>>
>> unicast gets block acks until it succeeds. Again, more delay.
>>
>> I think there is something like 31 soft-retries in the ath9k driver....
> If I remember correctly, hardware retries are counted here as well.
I chopped this to something more reasonable but never got around to
quantifying it, so never pushed the patch. I figured I'd measure ATF
in a noisy environment (which I'd be doing now if it weren't for
https://bugs.lede-project.org/index.php?do=details&task_id=368 )
first.
>> what happens to diffserv markings here? for unicast CS1 goes into the
>> BE queue, CS6, the VO queue. Do we go from one flat queue for all of
>> multicast to punching it through one of the hardware queues based on
>> the diffserv mark now with this patch?
I meant CS1=BK here. Tracing the path through the bridge code made my
head hurt, I can go look at some aircaps to see if the mcast->unicast
conversion respects those markings or not (my vote is *not*).
>> I would like it if there was a way to preserve the unreliability
>> (which multiple mesh protocols depend on), send stuff with QoSNoack,
>> etc - or dynamically choose (based on the rates of the stations)
>> between conventional multicast and unicast.
>>
>> Or - better, IMHO, keep sending multicast as is but pick the best of
>> the rates available to all the listening stations for it.
> The advantage of the multicast-to-unicast conversion goes beyond simply
> selecting a better rate - aggregation matters a lot as well, and that is
> simply incompatible with normal multicast.
Except for the VO queue which cannot aggregate. And for that matter,
using any other hardware queue than BE tends to eat a txop that would
otherwise possibly be combined with an aggregate.
(and the VI queue has always misbehaved, long on my todo list)
> Some multicast streams use lots of small-ish packets, the airtime impact
> of those is vastly reduced, even if the transmission has to be
> duplicated for a few stations.
The question was basically how far up does it scale. Arguably, for a
very few, well connected stations, this patch would help. For a
network with more - and more badly connected stations, I think it
would hurt.
What sorts of multicast traffic are being observed that flood the
network sufficiently to be worth optimizing out? arp? nd? upnp? mdns?
uftp? tv?
(my questions above are related to basically trying to setup a sane
a/b test, I've been building up a new testbed in noisy environment to
match the one I have in a quiet one, and don't have any "good" mcast
tests defined. Has anyone done an a/b test of this code with some
repeatable test already?)
(In my observations... The only truly heavy creator of a multicast
"burp" has tended to be upnp and mdns on smaller networks. Things like
nd and arp get more problematic as the number of stations go up also.
I can try things like abusing vlc or uftp to see what happens?)
I certainly agree multicast is a "problem" (I've seen 20-80% or more
of a given wifi network eaten by multicast) but I'm not convinced that
making it reliable, aggregatable unicast scales much past
basement-level testing of a few "good" stations, and don't know which
protocols are making it worse, the worst, in typical environments.
Certainly apple gear puts out a lot of multicast.
...
As best as I recall a recommendation in the 802.11-2012 standard was
that multicast packets be rate-limited so that you'd have a fixed
amount of crap after each beacon sufficient to keep the rest of the
unicast traffic flowing rapidly, instead of dumping everything into a
given beacon transmit.
That, combined with (maybe) picking the "best" union of known rates
per station, was essentially the strategy I'd intended[1] to pursue
for tackling the currently infinite wifi multicast queue - fq the
entries, have a fairly short queue (codel is not the best choice here)
drop from head, and limit the number of packets transmitted per beacon
to spread them out. That would solve the issue for sparse multicast
(dhcp etc), and smooth out the burps from bigger chunks while
impacting conventional unicast minimally.
There's also the pursuit of less multicast overall at least in some protocols
https://tools.ietf.org/html/draft-ietf-dnssd-hybrid-05
>
> - Felix
[1] but make-wifi-fast has been out of funding since august
--
Dave Täht
Let's go make home routers and wifi faster! With better software!
http://blog.cerowrt.org
^ permalink raw reply
* [PATCH net-next 7/7] fq_codel: fix set never used warning
From: Stephen Hemminger @ 2017-01-10 18:18 UTC (permalink / raw)
To: davem; +Cc: netdev, Stephen Hemminger
In-Reply-To: <20170110181816.18991-1-sthemmin@microsoft.com>
prev_backlog was set in fq_codel_dequeue but never used.
Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
---
net/sched/sch_fq_codel.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/net/sched/sch_fq_codel.c b/net/sched/sch_fq_codel.c
index a5ea0e9b6be4..6709c62123ad 100644
--- a/net/sched/sch_fq_codel.c
+++ b/net/sched/sch_fq_codel.c
@@ -290,7 +290,6 @@ static struct sk_buff *fq_codel_dequeue(struct Qdisc *sch)
struct fq_codel_flow *flow;
struct list_head *head;
u32 prev_drop_count, prev_ecn_mark;
- unsigned int prev_backlog;
begin:
head = &q->new_flows;
@@ -309,7 +308,6 @@ static struct sk_buff *fq_codel_dequeue(struct Qdisc *sch)
prev_drop_count = q->cstats.drop_count;
prev_ecn_mark = q->cstats.ecn_mark;
- prev_backlog = sch->qstats.backlog;
skb = codel_dequeue(sch, &sch->qstats.backlog, &q->cparams,
&flow->cvars, &q->cstats, qdisc_pkt_len,
--
2.11.0
^ permalink raw reply related
* [PATCH net-next 6/7] ipv6: make udpv6_queue_rcv_skb static
From: Stephen Hemminger @ 2017-01-10 18:18 UTC (permalink / raw)
To: davem; +Cc: netdev, Stephen Hemminger
In-Reply-To: <20170110181816.18991-1-sthemmin@microsoft.com>
Only called once, and no prototype.
Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
---
net/ipv6/udp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/ipv6/udp.c b/net/ipv6/udp.c
index 4d5c4eee4b3f..2f8ad6477eaf 100644
--- a/net/ipv6/udp.c
+++ b/net/ipv6/udp.c
@@ -555,7 +555,7 @@ void udpv6_encap_enable(void)
}
EXPORT_SYMBOL(udpv6_encap_enable);
-int udpv6_queue_rcv_skb(struct sock *sk, struct sk_buff *skb)
+static int udpv6_queue_rcv_skb(struct sock *sk, struct sk_buff *skb)
{
struct udp_sock *up = udp_sk(sk);
int is_udplite = IS_UDPLITE(sk);
--
2.11.0
^ permalink raw reply related
* [PATCH net-next 5/7] tcp_nv: make tcpnv_get_info static
From: Stephen Hemminger @ 2017-01-10 18:18 UTC (permalink / raw)
To: davem; +Cc: netdev, Stephen Hemminger
In-Reply-To: <20170110181816.18991-1-sthemmin@microsoft.com>
Function only used in this file.
Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
---
net/ipv4/tcp_nv.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/ipv4/tcp_nv.c b/net/ipv4/tcp_nv.c
index 5de82a8d4d87..0065f44c40c1 100644
--- a/net/ipv4/tcp_nv.c
+++ b/net/ipv4/tcp_nv.c
@@ -424,8 +424,8 @@ static void tcpnv_acked(struct sock *sk, const struct ack_sample *sample)
}
/* Extract info for Tcp socket info provided via netlink */
-size_t tcpnv_get_info(struct sock *sk, u32 ext, int *attr,
- union tcp_cc_info *info)
+static size_t tcpnv_get_info(struct sock *sk, u32 ext, int *attr,
+ union tcp_cc_info *info)
{
const struct tcpnv *ca = inet_csk_ca(sk);
--
2.11.0
^ permalink raw reply related
* [PATCH net-next 4/7] dcb: validate netlink attribute link
From: Stephen Hemminger @ 2017-01-10 18:18 UTC (permalink / raw)
To: davem; +Cc: netdev, Stephen Hemminger
In-Reply-To: <20170110181816.18991-1-sthemmin@microsoft.com>
The dcb netlink code was not validating that the IEEE_APP netlink
element was correctly formed. Initially discovered because of the
warning ‘dcbnl_ieee_app’ defined but not used.
This indicated that the message was not being fully validated.
Compile tested only. Do not have DCB setup.
Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
---
net/dcb/dcbnl.c | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/net/dcb/dcbnl.c b/net/dcb/dcbnl.c
index 3202d75329b5..52f0f2fc0a51 100644
--- a/net/dcb/dcbnl.c
+++ b/net/dcb/dcbnl.c
@@ -178,10 +178,6 @@ static const struct nla_policy dcbnl_ieee_policy[DCB_ATTR_IEEE_MAX + 1] = {
[DCB_ATTR_IEEE_QCN_STATS] = {.len = sizeof(struct ieee_qcn_stats)},
};
-static const struct nla_policy dcbnl_ieee_app[DCB_ATTR_IEEE_APP_MAX + 1] = {
- [DCB_ATTR_IEEE_APP] = {.len = sizeof(struct dcb_app)},
-};
-
/* DCB number of traffic classes nested attributes. */
static const struct nla_policy dcbnl_featcfg_nest[DCB_FEATCFG_ATTR_MAX + 1] = {
[DCB_FEATCFG_ATTR_ALL] = {.type = NLA_FLAG},
@@ -1466,8 +1462,15 @@ static int dcbnl_ieee_set(struct net_device *netdev, struct nlmsghdr *nlh,
nla_for_each_nested(attr, ieee[DCB_ATTR_IEEE_APP_TABLE], rem) {
struct dcb_app *app_data;
+
if (nla_type(attr) != DCB_ATTR_IEEE_APP)
continue;
+
+ if (nla_len(attr) != sizeof(struct dcb_app)) {
+ err = -ERANGE;
+ goto err;
+ }
+
app_data = nla_data(attr);
if (ops->ieee_setapp)
err = ops->ieee_setapp(netdev, app_data);
--
2.11.0
^ permalink raw reply related
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