* Re: [net-next PATCH 1/1 V4] qdisc: bulk dequeue support for qdiscs with TCQ_F_ONETXQUEUE
From: Eric Dumazet @ 2014-09-25 2:12 UTC (permalink / raw)
To: Tom Herbert
Cc: Jesper Dangaard Brouer, Linux Netdev List, David S. Miller,
Alexander Duyck, Toke Høiland-Jørgensen,
Florian Westphal, Jamal Hadi Salim, Dave Taht, John Fastabend,
Daniel Borkmann, Hannes Frederic Sowa
In-Reply-To: <1411586550.15395.46.camel@edumazet-glaptop2.roam.corp.google.com>
On Wed, 2014-09-24 at 12:22 -0700, Eric Dumazet wrote:
> On Wed, 2014-09-24 at 11:34 -0700, Tom Herbert wrote:
> > >
> > I believe drivers typically use skb->len for BQL tracking. Since
> > bytelimit is based on BQL here, it might be more correct to use
> > skb->len.
Speaking of BQL, I wonder if we now should try to not wakeup queues as
soon some room was made, and instead have a 50% threshold ?
This would probably increase probability to have bulk dequeues ;)
diff --git a/include/linux/dynamic_queue_limits.h b/include/linux/dynamic_queue_limits.h
index 5621547d631b..c0be7ff5ae97 100644
--- a/include/linux/dynamic_queue_limits.h
+++ b/include/linux/dynamic_queue_limits.h
@@ -83,6 +83,13 @@ static inline int dql_avail(const struct dql *dql)
return dql->adj_limit - dql->num_queued;
}
+/* Returns true if a queue occupancy is less than half capacity */
+static inline bool dql_half_avail(const struct dql *dql)
+{
+ return dql->adj_limit >= (dql->num_queued << 1);
+}
+
+
/* Record number of completed objects and recalculate the limit. */
void dql_completed(struct dql *dql, unsigned int count);
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index c8e388e5fccc..1f7541284b32 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -2413,7 +2413,7 @@ static inline void netdev_tx_sent_queue(struct netdev_queue *dev_queue,
smp_mb();
/* check again in case another CPU has just made room avail */
- if (unlikely(dql_avail(&dev_queue->dql) >= 0))
+ if (unlikely(dql_half_avail(&dev_queue->dql)))
clear_bit(__QUEUE_STATE_STACK_XOFF, &dev_queue->state);
#endif
}
@@ -2448,7 +2448,7 @@ static inline void netdev_tx_completed_queue(struct netdev_queue *dev_queue,
*/
smp_mb();
- if (dql_avail(&dev_queue->dql) < 0)
+ if (!dql_half_avail(&dev_queue->dql))
return;
if (test_and_clear_bit(__QUEUE_STATE_STACK_XOFF, &dev_queue->state))
^ permalink raw reply related
* [PATCH] neigh: check error pointer instead of NULL for ipv4_neigh_lookup()
From: Cong Wang @ 2014-09-25 0:07 UTC (permalink / raw)
To: netdev; +Cc: Cong Wang, David S. Miller
Fixes: commit f187bc6efb7250afee0e2009b6106 ("ipv4: No need to set generic neighbour pointer")
Cc: David S. Miller <davem@davemloft.net>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
---
net/ipv4/route.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/ipv4/route.c b/net/ipv4/route.c
index 173e7ea..cbadb94 100644
--- a/net/ipv4/route.c
+++ b/net/ipv4/route.c
@@ -746,7 +746,7 @@ static void __ip_do_redirect(struct rtable *rt, struct sk_buff *skb, struct flow
}
n = ipv4_neigh_lookup(&rt->dst, NULL, &new_gw);
- if (n) {
+ if (!IS_ERR(n)) {
if (!(n->nud_state & NUD_VALID)) {
neigh_event_send(n, NULL);
} else {
--
1.8.3.1
^ permalink raw reply related
* [PATCH net-next 6/6] net: dsa: bcm_sf2: add support for controlling EEE
From: Florian Fainelli @ 2014-09-25 0:05 UTC (permalink / raw)
To: netdev; +Cc: davem, Florian Fainelli
In-Reply-To: <1411603522-8384-1-git-send-email-f.fainelli@gmail.com>
When EEE is enabled, negotiate this feature with the PHY and make sure
that the capability checking, local EEE advertisement, link partner EEE
advertisement and auto-negotiation resolution returned by phy_init_eee()
is positive, and enable EEE at the switch level.
While querying the current EEE settings, verify the low-power indication
and indicate its status.
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
drivers/net/dsa/bcm_sf2.c | 73 ++++++++++++++++++++++++++++++++++++++++++
drivers/net/dsa/bcm_sf2.h | 3 ++
drivers/net/dsa/bcm_sf2_regs.h | 3 ++
3 files changed, 79 insertions(+)
diff --git a/drivers/net/dsa/bcm_sf2.c b/drivers/net/dsa/bcm_sf2.c
index 634e44ee8d0d..b9625968daac 100644
--- a/drivers/net/dsa/bcm_sf2.c
+++ b/drivers/net/dsa/bcm_sf2.c
@@ -220,6 +220,19 @@ static void bcm_sf2_imp_setup(struct dsa_switch *ds, int port)
core_writel(priv, reg, CORE_STS_OVERRIDE_IMP);
}
+static void bcm_sf2_eee_enable_set(struct dsa_switch *ds, int port, bool enable)
+{
+ struct bcm_sf2_priv *priv = ds_to_priv(ds);
+ u32 reg;
+
+ reg = core_readl(priv, CORE_EEE_EN_CTRL);
+ if (enable)
+ reg |= 1 << port;
+ else
+ reg &= ~(1 << port);
+ core_writel(priv, reg, CORE_EEE_EN_CTRL);
+}
+
static int bcm_sf2_port_setup(struct dsa_switch *ds, int port,
struct phy_device *phy)
{
@@ -247,6 +260,10 @@ static int bcm_sf2_port_setup(struct dsa_switch *ds, int port,
bcm_sf2_imp_vlan_setup(ds, cpu_port);
+ /* If EEE was enabled, restore it */
+ if (priv->port_sts[port].eee.eee_enabled)
+ bcm_sf2_eee_enable_set(ds, port, true);
+
return 0;
}
@@ -279,6 +296,60 @@ static void bcm_sf2_port_disable(struct dsa_switch *ds, int port,
core_writel(priv, reg, CORE_MEM_PSM_VDD_CTRL);
}
+/* Returns 0 if EEE was not enabled, or 1 otherwise
+ */
+static int bcm_sf2_eee_init(struct dsa_switch *ds, int port,
+ struct phy_device *phy)
+{
+ struct bcm_sf2_priv *priv = ds_to_priv(ds);
+ struct ethtool_eee *p = &priv->port_sts[port].eee;
+ int ret;
+
+ p->supported = (SUPPORTED_1000baseT_Full | SUPPORTED_100baseT_Full);
+
+ ret = phy_init_eee(phy, 0);
+ if (ret)
+ return 0;
+
+ bcm_sf2_eee_enable_set(ds, port, true);
+
+ return 1;
+}
+
+static int bcm_sf2_sw_get_eee(struct dsa_switch *ds, int port,
+ struct ethtool_eee *e)
+{
+ struct bcm_sf2_priv *priv = ds_to_priv(ds);
+ struct ethtool_eee *p = &priv->port_sts[port].eee;
+ u32 reg;
+
+ reg = core_readl(priv, CORE_EEE_LPI_INDICATE);
+ e->eee_enabled = p->eee_enabled;
+ e->eee_active = !!(reg & (1 << port));
+
+ return 0;
+}
+
+static int bcm_sf2_sw_set_eee(struct dsa_switch *ds, int port,
+ struct phy_device *phydev,
+ struct ethtool_eee *e)
+{
+ struct bcm_sf2_priv *priv = ds_to_priv(ds);
+ struct ethtool_eee *p = &priv->port_sts[port].eee;
+
+ p->eee_enabled = e->eee_enabled;
+
+ if (!p->eee_enabled) {
+ bcm_sf2_eee_enable_set(ds, port, false);
+ } else {
+ p->eee_enabled = bcm_sf2_eee_init(ds, port, phydev);
+ if (!p->eee_enabled)
+ return -EOPNOTSUPP;
+ }
+
+ return 0;
+}
+
static irqreturn_t bcm_sf2_switch_0_isr(int irq, void *dev_id)
{
struct bcm_sf2_priv *priv = dev_id;
@@ -792,6 +863,8 @@ static struct dsa_switch_driver bcm_sf2_switch_driver = {
.set_wol = bcm_sf2_sw_set_wol,
.port_enable = bcm_sf2_port_setup,
.port_disable = bcm_sf2_port_disable,
+ .get_eee = bcm_sf2_sw_get_eee,
+ .set_eee = bcm_sf2_sw_set_eee,
};
static int __init bcm_sf2_init(void)
diff --git a/drivers/net/dsa/bcm_sf2.h b/drivers/net/dsa/bcm_sf2.h
index 8fd6c1451a84..ee9f650d5026 100644
--- a/drivers/net/dsa/bcm_sf2.h
+++ b/drivers/net/dsa/bcm_sf2.h
@@ -18,6 +18,7 @@
#include <linux/spinlock.h>
#include <linux/mutex.h>
#include <linux/mii.h>
+#include <linux/ethtool.h>
#include <net/dsa.h>
@@ -43,6 +44,8 @@ struct bcm_sf2_hw_params {
struct bcm_sf2_port_status {
unsigned int link;
+
+ struct ethtool_eee eee;
};
struct bcm_sf2_priv {
diff --git a/drivers/net/dsa/bcm_sf2_regs.h b/drivers/net/dsa/bcm_sf2_regs.h
index c65f138c777f..1bb49cb699ab 100644
--- a/drivers/net/dsa/bcm_sf2_regs.h
+++ b/drivers/net/dsa/bcm_sf2_regs.h
@@ -225,4 +225,7 @@
#define CORE_PORT_VLAN_CTL_PORT(x) (0xc400 + ((x) * 0x8))
#define PORT_VLAN_CTRL_MASK 0x1ff
+#define CORE_EEE_EN_CTRL 0x24800
+#define CORE_EEE_LPI_INDICATE 0x24810
+
#endif /* __BCM_SF2_REGS_H */
--
1.9.1
^ permalink raw reply related
* [PATCH net-next 5/6] net: dsa: allow switches driver to implement get/set EEE
From: Florian Fainelli @ 2014-09-25 0:05 UTC (permalink / raw)
To: netdev; +Cc: davem, Florian Fainelli
In-Reply-To: <1411603522-8384-1-git-send-email-f.fainelli@gmail.com>
Allow switches driver to query and enable/disable EEE on a per-port
basis by implementing the ethtool_{get,set}_eee settings and delegating
these operations to the switch driver.
set_eee() will need to coordinate with the PHY driver to make sure that
EEE is enabled, the link-partner supports it and the auto-negotiation
result is satisfactory.
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
include/net/dsa.h | 9 +++++++++
net/dsa/slave.c | 40 ++++++++++++++++++++++++++++++++++++++++
2 files changed, 49 insertions(+)
diff --git a/include/net/dsa.h b/include/net/dsa.h
index 4f664fe0e42c..58ad8c6492db 100644
--- a/include/net/dsa.h
+++ b/include/net/dsa.h
@@ -232,6 +232,15 @@ struct dsa_switch_driver {
struct phy_device *phy);
void (*port_disable)(struct dsa_switch *ds, int port,
struct phy_device *phy);
+
+ /*
+ * EEE setttings
+ */
+ int (*set_eee)(struct dsa_switch *ds, int port,
+ struct phy_device *phydev,
+ struct ethtool_eee *e);
+ int (*get_eee)(struct dsa_switch *ds, int port,
+ struct ethtool_eee *e);
};
void register_switch_driver(struct dsa_switch_driver *type);
diff --git a/net/dsa/slave.c b/net/dsa/slave.c
index 182d30ae6818..36953c84ff2d 100644
--- a/net/dsa/slave.c
+++ b/net/dsa/slave.c
@@ -342,6 +342,44 @@ static int dsa_slave_set_wol(struct net_device *dev, struct ethtool_wolinfo *w)
return ret;
}
+static int dsa_slave_set_eee(struct net_device *dev, struct ethtool_eee *e)
+{
+ struct dsa_slave_priv *p = netdev_priv(dev);
+ struct dsa_switch *ds = p->parent;
+ int ret;
+
+ if (!ds->drv->set_eee)
+ return -EOPNOTSUPP;
+
+ ret = ds->drv->set_eee(ds, p->port, p->phy, e);
+ if (ret)
+ return ret;
+
+ if (p->phy)
+ ret = phy_ethtool_set_eee(p->phy, e);
+
+ return ret;
+}
+
+static int dsa_slave_get_eee(struct net_device *dev, struct ethtool_eee *e)
+{
+ struct dsa_slave_priv *p = netdev_priv(dev);
+ struct dsa_switch *ds = p->parent;
+ int ret;
+
+ if (!ds->drv->get_eee)
+ return -EOPNOTSUPP;
+
+ ret = ds->drv->get_eee(ds, p->port, e);
+ if (ret)
+ return ret;
+
+ if (p->phy)
+ ret = phy_ethtool_get_eee(p->phy, e);
+
+ return ret;
+}
+
static const struct ethtool_ops dsa_slave_ethtool_ops = {
.get_settings = dsa_slave_get_settings,
.set_settings = dsa_slave_set_settings,
@@ -353,6 +391,8 @@ static const struct ethtool_ops dsa_slave_ethtool_ops = {
.get_sset_count = dsa_slave_get_sset_count,
.set_wol = dsa_slave_set_wol,
.get_wol = dsa_slave_get_wol,
+ .set_eee = dsa_slave_set_eee,
+ .get_eee = dsa_slave_get_eee,
};
static const struct net_device_ops dsa_slave_netdev_ops = {
--
1.9.1
^ permalink raw reply related
* [PATCH net-next 3/6] net: dsa: bcm_sf2: disable RGMII interface(s) when link is down
From: Florian Fainelli @ 2014-09-25 0:05 UTC (permalink / raw)
To: netdev; +Cc: davem, Florian Fainelli
In-Reply-To: <1411603522-8384-1-git-send-email-f.fainelli@gmail.com>
When the link is down, disable the RGMII interface to conserve as much
power as possible. We re-enable the RGMII interface whenever the link is
detected.
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
drivers/net/dsa/bcm_sf2.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/drivers/net/dsa/bcm_sf2.c b/drivers/net/dsa/bcm_sf2.c
index d9b7da545063..58b8fef25b96 100644
--- a/drivers/net/dsa/bcm_sf2.c
+++ b/drivers/net/dsa/bcm_sf2.c
@@ -506,6 +506,15 @@ static void bcm_sf2_sw_adjust_link(struct dsa_switch *ds, int port,
port_mode = EXT_REVMII;
break;
default:
+ /* All other PHYs: internal and MoCA */
+ goto force_link;
+ }
+
+ /* If the link is down, just disable the interface to conserve power */
+ if (!phydev->link) {
+ reg = reg_readl(priv, REG_RGMII_CNTRL_P(port));
+ reg &= ~RGMII_MODE_EN;
+ reg_writel(priv, reg, REG_RGMII_CNTRL_P(port));
goto force_link;
}
--
1.9.1
^ permalink raw reply related
* [PATCH net-next 4/6] net: dsa: bcm_sf2: add port_enable/disable callbacks
From: Florian Fainelli @ 2014-09-25 0:05 UTC (permalink / raw)
To: netdev; +Cc: davem, Florian Fainelli
In-Reply-To: <1411603522-8384-1-git-send-email-f.fainelli@gmail.com>
The SF2 switch driver is already architected around per-port
enable/disable callbacks, so we just need a slight update to our
existing bcm_sf2_port_setup() resp. bcm_sf2_port_disable() functions to
be suitable as callbacks for port_enable/port_disable.
We need to shuffle a little the code that does the per-port VLAN
configuration/isolation since ports can now be brought up/down
separately, so we need to make sure that IMP (CPU, management) port is
always included in that specific port setup.
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
drivers/net/dsa/bcm_sf2.c | 60 +++++++++++++++++++++++++++++++----------------
1 file changed, 40 insertions(+), 20 deletions(-)
diff --git a/drivers/net/dsa/bcm_sf2.c b/drivers/net/dsa/bcm_sf2.c
index 58b8fef25b96..634e44ee8d0d 100644
--- a/drivers/net/dsa/bcm_sf2.c
+++ b/drivers/net/dsa/bcm_sf2.c
@@ -135,10 +135,29 @@ static char *bcm_sf2_sw_probe(struct device *host_dev, int sw_addr)
return "Broadcom Starfighter 2";
}
-static void bcm_sf2_imp_setup(struct dsa_switch *ds, int port)
+static void bcm_sf2_imp_vlan_setup(struct dsa_switch *ds, int cpu_port)
{
struct bcm_sf2_priv *priv = ds_to_priv(ds);
unsigned int i;
+ u32 reg;
+
+ /* Enable the IMP Port to be in the same VLAN as the other ports
+ * on a per-port basis such that we only have Port i and IMP in
+ * the same VLAN.
+ */
+ for (i = 0; i < priv->hw_params.num_ports; i++) {
+ if (!((1 << i) & ds->phys_port_mask))
+ continue;
+
+ reg = core_readl(priv, CORE_PORT_VLAN_CTL_PORT(i));
+ reg |= (1 << cpu_port);
+ core_writel(priv, reg, CORE_PORT_VLAN_CTL_PORT(i));
+ }
+}
+
+static void bcm_sf2_imp_setup(struct dsa_switch *ds, int port)
+{
+ struct bcm_sf2_priv *priv = ds_to_priv(ds);
u32 reg, val;
/* Enable the port memories */
@@ -199,24 +218,13 @@ static void bcm_sf2_imp_setup(struct dsa_switch *ds, int port)
reg = core_readl(priv, CORE_STS_OVERRIDE_IMP);
reg |= (MII_SW_OR | LINK_STS);
core_writel(priv, reg, CORE_STS_OVERRIDE_IMP);
-
- /* Enable the IMP Port to be in the same VLAN as the other ports
- * on a per-port basis such that we only have Port i and IMP in
- * the same VLAN.
- */
- for (i = 0; i < priv->hw_params.num_ports; i++) {
- if (!((1 << i) & ds->phys_port_mask))
- continue;
-
- reg = core_readl(priv, CORE_PORT_VLAN_CTL_PORT(i));
- reg |= (1 << port);
- core_writel(priv, reg, CORE_PORT_VLAN_CTL_PORT(i));
- }
}
-static void bcm_sf2_port_setup(struct dsa_switch *ds, int port)
+static int bcm_sf2_port_setup(struct dsa_switch *ds, int port,
+ struct phy_device *phy)
{
struct bcm_sf2_priv *priv = ds_to_priv(ds);
+ s8 cpu_port = ds->dst[ds->index].cpu_port;
u32 reg;
/* Clear the memory power down */
@@ -236,9 +244,14 @@ static void bcm_sf2_port_setup(struct dsa_switch *ds, int port)
reg &= ~PORT_VLAN_CTRL_MASK;
reg |= (1 << port);
core_writel(priv, reg, CORE_PORT_VLAN_CTL_PORT(port));
+
+ bcm_sf2_imp_vlan_setup(ds, cpu_port);
+
+ return 0;
}
-static void bcm_sf2_port_disable(struct dsa_switch *ds, int port)
+static void bcm_sf2_port_disable(struct dsa_switch *ds, int port,
+ struct phy_device *phy)
{
struct bcm_sf2_priv *priv = ds_to_priv(ds);
u32 off, reg;
@@ -246,6 +259,11 @@ static void bcm_sf2_port_disable(struct dsa_switch *ds, int port)
if (priv->wol_ports_mask & (1 << port))
return;
+ if (port == 7) {
+ intrl2_1_mask_set(priv, P_IRQ_MASK(P7_IRQ_OFF));
+ intrl2_1_writel(priv, P_IRQ_MASK(P7_IRQ_OFF), INTRL2_CPU_CLEAR);
+ }
+
if (dsa_is_cpu_port(ds, port))
off = CORE_IMP_CTL;
else
@@ -363,11 +381,11 @@ static int bcm_sf2_sw_setup(struct dsa_switch *ds)
for (port = 0; port < priv->hw_params.num_ports; port++) {
/* IMP port receives special treatment */
if ((1 << port) & ds->phys_port_mask)
- bcm_sf2_port_setup(ds, port);
+ bcm_sf2_port_setup(ds, port, NULL);
else if (dsa_is_cpu_port(ds, port))
bcm_sf2_imp_setup(ds, port);
else
- bcm_sf2_port_disable(ds, port);
+ bcm_sf2_port_disable(ds, port, NULL);
}
/* Include the pseudo-PHY address and the broadcast PHY address to
@@ -638,7 +656,7 @@ static int bcm_sf2_sw_suspend(struct dsa_switch *ds)
for (port = 0; port < DSA_MAX_PORTS; port++) {
if ((1 << port) & ds->phys_port_mask ||
dsa_is_cpu_port(ds, port))
- bcm_sf2_port_disable(ds, port);
+ bcm_sf2_port_disable(ds, port, NULL);
}
return 0;
@@ -694,7 +712,7 @@ static int bcm_sf2_sw_resume(struct dsa_switch *ds)
for (port = 0; port < DSA_MAX_PORTS; port++) {
if ((1 << port) & ds->phys_port_mask)
- bcm_sf2_port_setup(ds, port);
+ bcm_sf2_port_setup(ds, port, NULL);
else if (dsa_is_cpu_port(ds, port))
bcm_sf2_imp_setup(ds, port);
}
@@ -772,6 +790,8 @@ static struct dsa_switch_driver bcm_sf2_switch_driver = {
.resume = bcm_sf2_sw_resume,
.get_wol = bcm_sf2_sw_get_wol,
.set_wol = bcm_sf2_sw_set_wol,
+ .port_enable = bcm_sf2_port_setup,
+ .port_disable = bcm_sf2_port_disable,
};
static int __init bcm_sf2_init(void)
--
1.9.1
^ permalink raw reply related
* [PATCH net-next 2/6] net: dsa: allow enabling and disable switch ports
From: Florian Fainelli @ 2014-09-25 0:05 UTC (permalink / raw)
To: netdev; +Cc: davem, Florian Fainelli
In-Reply-To: <1411603522-8384-1-git-send-email-f.fainelli@gmail.com>
Whenever a per-port network device is used/unused, invoke the switch
driver port_enable/port_disable callbacks to allow saving as much power
as possible by disabling unused parts of the switch (RX/TX logic, memory
arrays, PHYs...). We supply a PHY device argument to make sure the
switch driver can act on the PHY device if needed (like putting/taking
the PHY out of deep low power mode).
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
include/net/dsa.h | 8 ++++++++
net/dsa/slave.c | 14 ++++++++++++++
2 files changed, 22 insertions(+)
diff --git a/include/net/dsa.h b/include/net/dsa.h
index d8054fb4a4df..4f664fe0e42c 100644
--- a/include/net/dsa.h
+++ b/include/net/dsa.h
@@ -224,6 +224,14 @@ struct dsa_switch_driver {
*/
int (*suspend)(struct dsa_switch *ds);
int (*resume)(struct dsa_switch *ds);
+
+ /*
+ * Port enable/disable
+ */
+ int (*port_enable)(struct dsa_switch *ds, int port,
+ struct phy_device *phy);
+ void (*port_disable)(struct dsa_switch *ds, int port,
+ struct phy_device *phy);
};
void register_switch_driver(struct dsa_switch_driver *type);
diff --git a/net/dsa/slave.c b/net/dsa/slave.c
index 4392e983abda..182d30ae6818 100644
--- a/net/dsa/slave.c
+++ b/net/dsa/slave.c
@@ -62,6 +62,7 @@ static int dsa_slave_open(struct net_device *dev)
{
struct dsa_slave_priv *p = netdev_priv(dev);
struct net_device *master = p->parent->dst->master_netdev;
+ struct dsa_switch *ds = p->parent;
int err;
if (!(master->flags & IFF_UP))
@@ -84,11 +85,20 @@ static int dsa_slave_open(struct net_device *dev)
goto clear_allmulti;
}
+ if (ds->drv->port_enable) {
+ err = ds->drv->port_enable(ds, p->port, p->phy);
+ if (err)
+ goto clear_promisc;
+ }
+
if (p->phy)
phy_start(p->phy);
return 0;
+clear_promisc:
+ if (dev->flags & IFF_PROMISC)
+ dev_set_promiscuity(master, 0);
clear_allmulti:
if (dev->flags & IFF_ALLMULTI)
dev_set_allmulti(master, -1);
@@ -103,6 +113,7 @@ static int dsa_slave_close(struct net_device *dev)
{
struct dsa_slave_priv *p = netdev_priv(dev);
struct net_device *master = p->parent->dst->master_netdev;
+ struct dsa_switch *ds = p->parent;
if (p->phy)
phy_stop(p->phy);
@@ -117,6 +128,9 @@ static int dsa_slave_close(struct net_device *dev)
if (!ether_addr_equal(dev->dev_addr, master->dev_addr))
dev_uc_del(master, dev->dev_addr);
+ if (ds->drv->port_disable)
+ ds->drv->port_disable(ds, p->port, p->phy);
+
return 0;
}
--
1.9.1
^ permalink raw reply related
* [PATCH net-next 1/6] net: dsa: start and stop the PHY state machine
From: Florian Fainelli @ 2014-09-25 0:05 UTC (permalink / raw)
To: netdev; +Cc: davem, Florian Fainelli
In-Reply-To: <1411603522-8384-1-git-send-email-f.fainelli@gmail.com>
dsa_slave_open() should start the PHY library state machine for its PHY
interface, and dsa_slave_close() should stop the PHY library state
machine accordingly.
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
net/dsa/slave.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/net/dsa/slave.c b/net/dsa/slave.c
index 43c1e4ade689..4392e983abda 100644
--- a/net/dsa/slave.c
+++ b/net/dsa/slave.c
@@ -84,6 +84,9 @@ static int dsa_slave_open(struct net_device *dev)
goto clear_allmulti;
}
+ if (p->phy)
+ phy_start(p->phy);
+
return 0;
clear_allmulti:
@@ -101,6 +104,9 @@ static int dsa_slave_close(struct net_device *dev)
struct dsa_slave_priv *p = netdev_priv(dev);
struct net_device *master = p->parent->dst->master_netdev;
+ if (p->phy)
+ phy_stop(p->phy);
+
dev_mc_unsync(master, dev);
dev_uc_unsync(master, dev);
if (dev->flags & IFF_ALLMULTI)
--
1.9.1
^ permalink raw reply related
* [PATCH net-next 0/6] net: dsa: EEE and other PM features
From: Florian Fainelli @ 2014-09-25 0:05 UTC (permalink / raw)
To: netdev; +Cc: davem, Florian Fainelli
Hello David,
This patch set allows DSA switch drivers to enable/disable/query EEE on a
per-port level, as well as control precisely which switch ports are
enable/disabled.
I might already be too late for net-next, if that's the case, I will repost
when the tree re-opens.
Thanks!
Florian Fainelli (6):
net: dsa: start and stop the PHY state machine
net: dsa: allow enabling and disable switch ports
net: dsa: bcm_sf2: disable RGMII interface(s) when link is down
net: dsa: bcm_sf2: add port_enable/disable callbacks
net: dsa: allow switches driver to implement get/set EEE
net: dsa: bcm_sf2: add support for controlling EEE
drivers/net/dsa/bcm_sf2.c | 138 +++++++++++++++++++++++++++++++++++------
drivers/net/dsa/bcm_sf2.h | 3 +
drivers/net/dsa/bcm_sf2_regs.h | 3 +
include/net/dsa.h | 17 +++++
net/dsa/slave.c | 60 ++++++++++++++++++
5 files changed, 203 insertions(+), 18 deletions(-)
--
1.9.1
^ permalink raw reply
* Re: [net-next PATCH 1/1 V4] qdisc: bulk dequeue support for qdiscs with TCQ_F_ONETXQUEUE
From: Jamal Hadi Salim @ 2014-09-24 22:13 UTC (permalink / raw)
To: Jesper Dangaard Brouer, Eric Dumazet
Cc: netdev, therbert, David S. Miller, Alexander Duyck, toke,
Florian Westphal, Dave Taht, John Fastabend, Daniel Borkmann,
Hannes Frederic Sowa
In-Reply-To: <20140924195831.6fb91051@redhat.com>
On 09/24/14 13:58, Jesper Dangaard Brouer wrote:
> On Wed, 24 Sep 2014 10:23:15 -0700
> Eric Dumazet <eric.dumazet@gmail.com> wrote:
>
>
>> pktgen is nice, but do not represent the majority of the traffic we send
>> from high performance host where we want this bulk dequeue thing ;)
>
> This patch is actually targetted towards more normal use-cases.
> Pktgen cannot even use this work, as it bypass the qdisc layer...
When you post these patches - can you please also post basic performance
numbers? You dont have to show improvement if it is hard for bulking
to kick in, but you need to show no harm in at least latency for the
general use case (i.e not pktgen maybe forwarding activity or something
sourced from tcp).
cheers,
jamal
^ permalink raw reply
* Re: [RFC PATCH 00/24] TRILL implementation
From: Francois Romieu @ 2014-09-24 20:57 UTC (permalink / raw)
To: William Dauchy; +Cc: Stephen Hemminger, Ahmed Amamou, netdev, f.cachereul
In-Reply-To: <20140924165447.GG27183@gandi.net>
William Dauchy <william@gandi.net> :
> On Sep24 09:44, Stephen Hemminger wrote:
[...]
> > Also, it seems when you build with trill you lose normal bridge functionality.
> > Whether kernel is doing bridge or rbridge has to be a runtime (not compile time)
> > choice on a per-bridge basis.
>
> The normal bridge functionnality are still ok until TRILL is not
> enabled.
Imvho you should remove patch #24 and plug directly into br_handle_frame.
It is not fair for usual bridge interfaces to become second class
citizens - rbr_handle_frame _is_ unbalanced - as soon as CONFIG_TRILL is
set and they are not TRILL enabled.
--
Ueimor
^ permalink raw reply
* Re: [RFC PATCH 05/24] net: rbridge: Adapt Bridge structure
From: Francois Romieu @ 2014-09-24 20:56 UTC (permalink / raw)
To: Ahmed Amamou; +Cc: netdev, william, f.cachereul, Kamel Haddadou
In-Reply-To: <1411573940-14079-6-git-send-email-ahmed@gandi.net>
Ahmed Amamou <ahmed@gandi.net> :
[...]
> diff --git a/include/linux/etherdevice.h b/include/linux/etherdevice.h
> index 9c5529d..09dc18c 100644
> --- a/include/linux/etherdevice.h
> +++ b/include/linux/etherdevice.h
[...]
> @@ -391,4 +401,28 @@ static inline unsigned long compare_ether_header(const void *a, const void *b)
> #endif
> }
>
> +#ifdef CONFIG_TRILL
> +/**
> + * is_all_rbr_address - check if it is a specific Rbridge brodcast mac address
> + * @addr1: Pointer to a six-byte array containing the Ethernet address
> + *
> + * returns true if it is a RBridge brodcast address 01:80:C2:00:00:40
> + */
> +static inline bool is_all_rbr_address(const u8 * addr1)
> +{
> + return ether_addr_equal(addr1, eth_reserved_addr_all_rbridge);
> +}
> +
> +static inline bool is_isis_rbr_address(const u8 * addr1)
> +{
> + return ether_addr_equal(addr1, eth_reserved_addr_isis_rbridge);
> +}
> +
> +static inline bool is_esadi_rbr_address(const u8 * addr1)
> +{
> + return ether_addr_equal(addr1, eth_reserved_addr_esadi_rbridge);
> +}
Nit: s/addr1/addr (there's no addr2).
Neither is_isis_rbr_address nor is_esadi_rbr_address is ever used. They
could be added later.
You may consider merging the hunk above with patch #15.
--
Ueimor
^ permalink raw reply
* Re: [PATCH 3/4] powerpc: Update defconfigs which were missing CONFIG_NET.
From: Guenter Roeck @ 2014-09-24 20:53 UTC (permalink / raw)
To: David Miller; +Cc: netdev
In-Reply-To: <20140924.164546.1359832079578231208.davem@davemloft.net>
On Wed, Sep 24, 2014 at 04:45:46PM -0400, David Miller wrote:
> From: Guenter Roeck <linux@roeck-us.net>
> Date: Wed, 24 Sep 2014 13:38:01 -0700
>
> > On Wed, Sep 24, 2014 at 02:49:26PM -0400, David Miller wrote:
> >>
> >> Commit df568d8e ("scsi: Use 'depends' with LIBFC instead of
> >> 'select'.") removed what happened to be the only instance of 'select
> >> NET'. Defconfigs that were relying on the select now lack networking
> >> support.
> >>
> >> Signed-off-by: David S. Miller <davem@davemloft.net>
> >> ---
> >> arch/powerpc/configs/c2k_defconfig | 1 +
> >
> > Sure that is the only affected file ?
> > My list is a bit larger.
> >
> > powerpc:c2k_defconfig
> > powerpc:pmac32_defconfig
> > powerpc:ppc64_defconfig
> > powerpc:ppc64e_defconfig
> > powerpc:pseries_defconfig
> > powerpc:pseries_le_defconfig
>
> Those all have NET=y in my tree.
>
> I don't see what the problem is.
>
PBKC. I was missing Michal's patches in my tree. Same for the others.
Again, sorry for the noise.
Guenter
^ permalink raw reply
* Re: [PATCH 1/4] mips: Update some more defconfigs which were missing CONFIG_NET.
From: David Miller @ 2014-09-24 20:47 UTC (permalink / raw)
To: linux; +Cc: netdev
In-Reply-To: <20140924204007.GC27927@roeck-us.net>
From: Guenter Roeck <linux@roeck-us.net>
Date: Wed, 24 Sep 2014 13:40:07 -0700
> On Wed, Sep 24, 2014 at 02:49:14PM -0400, David Miller wrote:
>>
>> Commit df568d8e ("scsi: Use 'depends' with LIBFC instead of
>> 'select'.") removed what happened to be the only instance of 'select
>> NET'. Defconfigs that were relying on the select now lack networking
>> support.
>>
>> Signed-off-by: David S. Miller <davem@davemloft.net>
>> ---
>> arch/mips/configs/nlm_xlp_defconfig | 1 +
>> arch/mips/configs/nlm_xlr_defconfig | 1 +
>
> My list of affected configurations is much larger.
Can you actually check my tree?
I noted in my introductory posting (you did read it right?) that
these changes are on top of the patches already done by Michal
Marek.
^ permalink raw reply
* Re: [PATCH 4/4] parisc: Update defconfigs which were missing CONFIG_NET.
From: David Miller @ 2014-09-24 20:46 UTC (permalink / raw)
To: linux; +Cc: netdev
In-Reply-To: <20140924203909.GB27927@roeck-us.net>
From: Guenter Roeck <linux@roeck-us.net>
Date: Wed, 24 Sep 2014 13:39:09 -0700
> On Wed, Sep 24, 2014 at 02:49:29PM -0400, David Miller wrote:
>>
>> Commit df568d8e ("scsi: Use 'depends' with LIBFC instead of
>> 'select'.") removed what happened to be the only instance of 'select
>> NET'. Defconfigs that were relying on the select now lack networking
>> support.
>>
>> Signed-off-by: David S. Miller <davem@davemloft.net>
>> ---
>> arch/parisc/configs/a500_defconfig | 1 +
>
> My list also includes c8000_defconfig.
It has NET=y in my tree.
Via:
commit 25fee47f9ccd834bfb95c6f95e07033b0f2d5ddf
Author: Michal Marek <mmarek@suse.cz>
Date: Tue Sep 23 17:44:01 2014 +0200
parisc: Set CONFIG_NET=y in defconfigs
^ permalink raw reply
* Re: [PATCH 3/4] powerpc: Update defconfigs which were missing CONFIG_NET.
From: David Miller @ 2014-09-24 20:45 UTC (permalink / raw)
To: linux; +Cc: netdev
In-Reply-To: <20140924203801.GA27927@roeck-us.net>
From: Guenter Roeck <linux@roeck-us.net>
Date: Wed, 24 Sep 2014 13:38:01 -0700
> On Wed, Sep 24, 2014 at 02:49:26PM -0400, David Miller wrote:
>>
>> Commit df568d8e ("scsi: Use 'depends' with LIBFC instead of
>> 'select'.") removed what happened to be the only instance of 'select
>> NET'. Defconfigs that were relying on the select now lack networking
>> support.
>>
>> Signed-off-by: David S. Miller <davem@davemloft.net>
>> ---
>> arch/powerpc/configs/c2k_defconfig | 1 +
>
> Sure that is the only affected file ?
> My list is a bit larger.
>
> powerpc:c2k_defconfig
> powerpc:pmac32_defconfig
> powerpc:ppc64_defconfig
> powerpc:ppc64e_defconfig
> powerpc:pseries_defconfig
> powerpc:pseries_le_defconfig
Those all have NET=y in my tree.
I don't see what the problem is.
^ permalink raw reply
* Re: [PATCH 0/4] Fix up remaining defconfigs with missing CONFIG_NET
From: Guenter Roeck @ 2014-09-24 20:45 UTC (permalink / raw)
To: David Miller; +Cc: netdev
In-Reply-To: <20140924.144908.34261036132770745.davem@davemloft.net>
On Wed, Sep 24, 2014 at 02:49:08PM -0400, David Miller wrote:
>
> This is on top of Michal Marek's series and the IA64 fixups which are
> already in Linus's tree.
>
> I validated things two different ways:
>
> 1) I scanned every arch config file, and if it mentioned CONFIG_INET or
> CONFIG_UNIX, I made sure it had CONFIG_NET=y
>
> 2) I scanned every arch config file, and if it did not have CONFIG_NET=y
> I made sure it did not reference any networking config options.
>
> Signed-off-by: David S. Miller <davem@davemloft.net>
Ah, I was missing Michal's series. Sorry for the noise.
Guenter
^ permalink raw reply
* Re: [PATCH v3 2/3] net: Add Keystone NetCP ethernet driver
From: David Miller @ 2014-09-24 20:43 UTC (permalink / raw)
To: santosh.shilimkar-l0cyMroinI0
Cc: sandeep_n-l0cyMroinI0, netdev-u79uwXL29TY76Z2rM5mHXA,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
linux-kernel-u79uwXL29TY76Z2rM5mHXA,
robh+dt-DgEjT+Ai2ygdnm+yROfE0A,
grant.likely-QSEj5FYQhm4dnm+yROfE0A,
devicetree-u79uwXL29TY76Z2rM5mHXA, jhs-jkUAjuhPggJWk0Htik3J/w
In-Reply-To: <542320B3.9020902-l0cyMroinI0@public.gmane.org>
From: Santosh Shilimkar <santosh.shilimkar-l0cyMroinI0@public.gmane.org>
Date: Wed, 24 Sep 2014 15:51:15 -0400
> Here is an updated version with above fixed. Not posting the entire
> series again since its just small update on the patch.
That's not how this works.
If you want your changes re-reviewed and considered for real inclusion,
you must repost the entire patch series from scratch, with a proper
list of what changes between the previous submission and the new one.
--
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: [PATCH 1/4] mips: Update some more defconfigs which were missing CONFIG_NET.
From: Guenter Roeck @ 2014-09-24 20:40 UTC (permalink / raw)
To: David Miller; +Cc: netdev
In-Reply-To: <20140924.144914.467369651395057588.davem@davemloft.net>
On Wed, Sep 24, 2014 at 02:49:14PM -0400, David Miller wrote:
>
> Commit df568d8e ("scsi: Use 'depends' with LIBFC instead of
> 'select'.") removed what happened to be the only instance of 'select
> NET'. Defconfigs that were relying on the select now lack networking
> support.
>
> Signed-off-by: David S. Miller <davem@davemloft.net>
> ---
> arch/mips/configs/nlm_xlp_defconfig | 1 +
> arch/mips/configs/nlm_xlr_defconfig | 1 +
My list of affected configurations is much larger.
mips:gpr_defconfig
mips:ip27_defconfig
mips:jazz_defconfig
mips:loongson3_defconfig
mips:malta_defconfig
mips:malta_kvm_defconfig
mips:malta_kvm_guest_defconfig
mips:mtx1_defconfig
mips:nlm_xlp_defconfig
mips:nlm_xlr_defconfig
mips:rm200_defconfig
Guenter
^ permalink raw reply
* Re: [PATCH 4/4] parisc: Update defconfigs which were missing CONFIG_NET.
From: Guenter Roeck @ 2014-09-24 20:39 UTC (permalink / raw)
To: David Miller; +Cc: netdev
In-Reply-To: <20140924.144929.1831753286382773236.davem@davemloft.net>
On Wed, Sep 24, 2014 at 02:49:29PM -0400, David Miller wrote:
>
> Commit df568d8e ("scsi: Use 'depends' with LIBFC instead of
> 'select'.") removed what happened to be the only instance of 'select
> NET'. Defconfigs that were relying on the select now lack networking
> support.
>
> Signed-off-by: David S. Miller <davem@davemloft.net>
> ---
> arch/parisc/configs/a500_defconfig | 1 +
My list also includes c8000_defconfig.
Guenter
^ permalink raw reply
* Re: [PATCH 3/4] powerpc: Update defconfigs which were missing CONFIG_NET.
From: Guenter Roeck @ 2014-09-24 20:38 UTC (permalink / raw)
To: David Miller; +Cc: netdev
In-Reply-To: <20140924.144926.1013677655715591915.davem@davemloft.net>
On Wed, Sep 24, 2014 at 02:49:26PM -0400, David Miller wrote:
>
> Commit df568d8e ("scsi: Use 'depends' with LIBFC instead of
> 'select'.") removed what happened to be the only instance of 'select
> NET'. Defconfigs that were relying on the select now lack networking
> support.
>
> Signed-off-by: David S. Miller <davem@davemloft.net>
> ---
> arch/powerpc/configs/c2k_defconfig | 1 +
Sure that is the only affected file ?
My list is a bit larger.
powerpc:c2k_defconfig
powerpc:pmac32_defconfig
powerpc:ppc64_defconfig
powerpc:ppc64e_defconfig
powerpc:pseries_defconfig
powerpc:pseries_le_defconfig
Guenter
^ permalink raw reply
* Re: [PATCH net-next 3/3] ipv6: mld: remove duplicate code from mld_update_qri
From: Hannes Frederic Sowa @ 2014-09-24 20:36 UTC (permalink / raw)
To: Daniel Borkmann, davem; +Cc: netdev
In-Reply-To: <1411455828-5196-4-git-send-email-dborkman@redhat.com>
On Tue, Sep 23, 2014, at 09:03, Daniel Borkmann wrote:
> The QRI (Query Response Interval) from RFC3810, section 9.3. is the same
> as we calculate anyway earlier. Therefore, we can just remove that code
> and simply reuse the value of max_delay.
>
> Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
Acked-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
Thanks,
Hannes
^ permalink raw reply
* Re: [PATCH net-next 2/3] ipv6: mld: do not overwrite uri when receiving an mldv2 query
From: Hannes Frederic Sowa @ 2014-09-24 20:36 UTC (permalink / raw)
To: Daniel Borkmann, davem; +Cc: netdev
In-Reply-To: <1411455828-5196-3-git-send-email-dborkman@redhat.com>
On Tue, Sep 23, 2014, at 09:03, Daniel Borkmann wrote:
> While reviewing the code, I found it confusing why we update the URI when
> receiving an MLDv2 query. The RFC does not mention any of this, and I
> also
> double-checked with other implementations.
>
> [...]
>
> Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
Acked-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
^ permalink raw reply
* Re: [PATCH net-next 1/3] ipv6: mld: rename mc_maxdelay into mc_uri
From: Hannes Frederic Sowa @ 2014-09-24 20:34 UTC (permalink / raw)
To: Daniel Borkmann, davem; +Cc: netdev
In-Reply-To: <1411455828-5196-2-git-send-email-dborkman@redhat.com>
On Tue, Sep 23, 2014, at 09:03, Daniel Borkmann wrote:
> The name mc_maxdelay is quite confusing as it actually denotes the
> unsolicited report interval. Since we have query response interval
> named as mc_qri, name unsolicited report interval analogously as
> mc_uri. Note that both are not the same!
>
> Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
Acked-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
^ permalink raw reply
* Re: [PATCH] ixgbe: delete one duplicate marcro definition of IXGBE_MAX_L2A_QUEUES
From: Jeff Kirsher @ 2014-09-24 20:12 UTC (permalink / raw)
To: Ethan Zhao
Cc: alexander.h.duyck, e1000-devel, bruce.w.allan, jesse.brandeburg,
linux-kernel, john.ronciak, netdev, linux.nics
In-Reply-To: <1411210407-3185-1-git-send-email-ethan.zhao@oracle.com>
[-- Attachment #1.1: Type: text/plain, Size: 406 bytes --]
On Sat, 2014-09-20 at 18:53 +0800, Ethan Zhao wrote:
> There is typo in ixgbe.h, two marcro definition of
> IXGBE_MAX_L2A_QUEUES to 4,
> delete one, clear the compiler warning.
>
> Signed-off-by: Ethan Zhao <ethan.zhao@oracle.com>
> ---
> drivers/net/ethernet/intel/ixgbe/ixgbe.h | 1 -
> 1 files changed, 0 insertions(+), 1 deletions(-)
I have added your patch to my queue, thanks Ethan!
[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
[-- Attachment #2: Type: text/plain, Size: 430 bytes --]
------------------------------------------------------------------------------
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
[-- Attachment #3: Type: text/plain, Size: 257 bytes --]
_______________________________________________
E1000-devel mailing list
E1000-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/e1000-devel
To learn more about Intel® Ethernet, visit http://communities.intel.com/community/wired
^ 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