* Re: pull request: r8169 driver fixes
From: David Miller @ 2011-02-23 23:05 UTC (permalink / raw)
To: romieu; +Cc: netdev, hayeswang, shemminger
In-Reply-To: <20110223225357.GA12821@electric-eye.fr.zoreil.com>
From: Francois Romieu <romieu@fr.zoreil.com>
Date: Wed, 23 Feb 2011 23:53:57 +0100
> Please pull from branch 'r8169-davem' in repository
>
> git://git.kernel.org/pub/scm/linux/kernel/git/romieu/netdev-2.6.git r8169-davem
>
> to get the changes below.
Pulled, thanks a lot.
^ permalink raw reply
* [PATCH net-next 3/6] netem: define NETEM_DIST_MAX
From: Stephen Hemminger @ 2011-02-23 23:04 UTC (permalink / raw)
To: David S. Miller; +Cc: netdev
In-Reply-To: <20110223230416.532009518@vyatta.com>
[-- Attachment #1: netem-maxsize.patch --]
[-- Type: text/plain, Size: 930 bytes --]
Rather than magic constant in code, expose the maximum size of
packet distribution table in API. In iproute2, q_netem defines
MAX_DIST as 16K already.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
---
include/linux/pkt_sched.h | 1 +
net/sched/sch_netem.c | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
--- a/include/linux/pkt_sched.h 2011-02-23 14:43:08.838297372 -0800
+++ b/include/linux/pkt_sched.h 2011-02-23 14:50:10.329760558 -0800
@@ -495,6 +495,7 @@ struct tc_netem_corrupt {
};
#define NETEM_DIST_SCALE 8192
+#define NETEM_DIST_MAX 16384
/* DRR */
--- a/net/sched/sch_netem.c 2011-02-23 14:50:09.445745344 -0800
+++ b/net/sched/sch_netem.c 2011-02-23 14:50:10.329760558 -0800
@@ -332,7 +332,7 @@ static int get_dist_table(struct Qdisc *
int i;
size_t s;
- if (n > 65536)
+ if (n > NETEM_DIST_MAX)
return -EINVAL;
s = sizeof(struct disttable) + n * sizeof(s16);
^ permalink raw reply
* [PATCH net-next 1/6] [PATCH 5/9] netem: cleanup dump code
From: Stephen Hemminger @ 2011-02-23 23:04 UTC (permalink / raw)
To: David S. Miller; +Cc: netdev
In-Reply-To: <20110223230416.532009518@vyatta.com>
[-- Attachment #1: netem-dump.patch --]
[-- Type: text/plain, Size: 1115 bytes --]
Use nla_put_nested to update netlink attribute value.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
---
net/sched/sch_netem.c | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
--- a/net/sched/sch_netem.c 2011-02-23 14:43:09.114302606 -0800
+++ b/net/sched/sch_netem.c 2011-02-23 14:43:27.598650361 -0800
@@ -562,8 +562,7 @@ static void netem_destroy(struct Qdisc *
static int netem_dump(struct Qdisc *sch, struct sk_buff *skb)
{
const struct netem_sched_data *q = qdisc_priv(sch);
- unsigned char *b = skb_tail_pointer(skb);
- struct nlattr *nla = (struct nlattr *) b;
+ struct nlattr *nla = (struct nlattr *) skb_tail_pointer(skb);
struct tc_netem_qopt qopt;
struct tc_netem_corr cor;
struct tc_netem_reorder reorder;
@@ -590,12 +589,10 @@ static int netem_dump(struct Qdisc *sch,
corrupt.correlation = q->corrupt_cor.rho;
NLA_PUT(skb, TCA_NETEM_CORRUPT, sizeof(corrupt), &corrupt);
- nla->nla_len = skb_tail_pointer(skb) - b;
-
- return skb->len;
+ return nla_nest_end(skb, nla);
nla_put_failure:
- nlmsg_trim(skb, b);
+ nlmsg_trim(skb, nla);
return -1;
}
^ permalink raw reply
* [PATCH net-next 2/6] netem: use vmalloc for distribution table
From: Stephen Hemminger @ 2011-02-23 23:04 UTC (permalink / raw)
To: David S. Miller; +Cc: netdev
In-Reply-To: <20110223230416.532009518@vyatta.com>
[-- Attachment #1: netem-vmalloc.patch --]
[-- Type: text/plain, Size: 1760 bytes --]
The netem probability table can be large (up to 64K bytes)
which may be too large to allocate in one contiguous chunk.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
--- a/net/sched/sch_netem.c 2011-02-23 14:43:27.000000000 -0800
+++ b/net/sched/sch_netem.c 2011-02-23 14:49:07.228646202 -0800
@@ -308,6 +308,16 @@ static void netem_reset(struct Qdisc *sc
qdisc_watchdog_cancel(&q->watchdog);
}
+static void dist_free(struct disttable *d)
+{
+ if (d) {
+ if (is_vmalloc_addr(d))
+ vfree(d);
+ else
+ kfree(d);
+ }
+}
+
/*
* Distribution data is a variable size payload containing
* signed 16 bit values.
@@ -315,16 +325,20 @@ static void netem_reset(struct Qdisc *sc
static int get_dist_table(struct Qdisc *sch, const struct nlattr *attr)
{
struct netem_sched_data *q = qdisc_priv(sch);
- unsigned long n = nla_len(attr)/sizeof(__s16);
+ size_t n = nla_len(attr)/sizeof(__s16);
const __s16 *data = nla_data(attr);
spinlock_t *root_lock;
struct disttable *d;
int i;
+ size_t s;
if (n > 65536)
return -EINVAL;
- d = kmalloc(sizeof(*d) + n*sizeof(d->table[0]), GFP_KERNEL);
+ s = sizeof(struct disttable) + n * sizeof(s16);
+ d = kmalloc(s, GFP_KERNEL);
+ if (!d)
+ d = vmalloc(s);
if (!d)
return -ENOMEM;
@@ -335,7 +349,7 @@ static int get_dist_table(struct Qdisc *
root_lock = qdisc_root_sleeping_lock(sch);
spin_lock_bh(root_lock);
- kfree(q->delay_dist);
+ dist_free(q->delay_dist);
q->delay_dist = d;
spin_unlock_bh(root_lock);
return 0;
@@ -556,7 +570,7 @@ static void netem_destroy(struct Qdisc *
qdisc_watchdog_cancel(&q->watchdog);
qdisc_destroy(q->qdisc);
- kfree(q->delay_dist);
+ dist_free(q->delay_dist);
}
static int netem_dump(struct Qdisc *sch, struct sk_buff *skb)
^ permalink raw reply
* [PATCH net-next 0/6] netem patches
From: Stephen Hemminger @ 2011-02-23 23:04 UTC (permalink / raw)
To: David S. Miller; +Cc: netdev
These have been resting in a moldy place for far to long.
The most important is the integration of a better packet
loss model for netem
^ permalink raw reply
* [PATCH net-next 4/6] [PATCH] Revert "sch_netem: Remove classful functionality"
From: Stephen Hemminger @ 2011-02-23 23:04 UTC (permalink / raw)
To: David S. Miller; +Cc: netdev
In-Reply-To: <20110223230416.532009518@vyatta.com>
[-- Attachment #1: netem-classful.patch --]
[-- Type: text/plain, Size: 3274 bytes --]
Many users have wanted the old functionality that was lost
to be able to use pfifo as inner qdisc for netem. The reason that
netem could not be classful with the older API was because of the
limitations of the old dequeue/requeue interface; now that qdisc API has
a peek function, there is no longer a problem with using any
inner qdisc's.
This reverts commit 02201464119334690fe209849843881b8e9cfa9f.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
---
net/sched/sch_netem.c | 87 +++++++++++++++++++++++++++++++++++++++++++++-----
1 file changed, 79 insertions(+), 8 deletions(-)
--- a/net/sched/sch_netem.c 2011-02-23 14:50:10.329760558 -0800
+++ b/net/sched/sch_netem.c 2011-02-23 14:50:19.933925120 -0800
@@ -238,14 +238,15 @@ static int netem_enqueue(struct sk_buff
ret = NET_XMIT_SUCCESS;
}
- if (likely(ret == NET_XMIT_SUCCESS)) {
- sch->q.qlen++;
- } else if (net_xmit_drop_count(ret)) {
- sch->qstats.drops++;
+ if (ret != NET_XMIT_SUCCESS) {
+ if (net_xmit_drop_count(ret)) {
+ sch->qstats.drops++;
+ return ret;
+ }
}
- pr_debug("netem: enqueue ret %d\n", ret);
- return ret;
+ sch->q.qlen++;
+ return NET_XMIT_SUCCESS;
}
static unsigned int netem_drop(struct Qdisc *sch)
@@ -287,9 +288,10 @@ static struct sk_buff *netem_dequeue(str
if (G_TC_FROM(skb->tc_verd) & AT_INGRESS)
skb->tstamp.tv64 = 0;
#endif
- pr_debug("netem_dequeue: return skb=%p\n", skb);
- qdisc_bstats_update(sch, skb);
+
sch->q.qlen--;
+ qdisc_unthrottled(sch);
+ qdisc_bstats_update(sch, skb);
return skb;
}
@@ -610,8 +612,77 @@ nla_put_failure:
return -1;
}
+static int netem_dump_class(struct Qdisc *sch, unsigned long cl,
+ struct sk_buff *skb, struct tcmsg *tcm)
+{
+ struct netem_sched_data *q = qdisc_priv(sch);
+
+ if (cl != 1) /* only one class */
+ return -ENOENT;
+
+ tcm->tcm_handle |= TC_H_MIN(1);
+ tcm->tcm_info = q->qdisc->handle;
+
+ return 0;
+}
+
+static int netem_graft(struct Qdisc *sch, unsigned long arg, struct Qdisc *new,
+ struct Qdisc **old)
+{
+ struct netem_sched_data *q = qdisc_priv(sch);
+
+ if (new == NULL)
+ new = &noop_qdisc;
+
+ sch_tree_lock(sch);
+ *old = q->qdisc;
+ q->qdisc = new;
+ qdisc_tree_decrease_qlen(*old, (*old)->q.qlen);
+ qdisc_reset(*old);
+ sch_tree_unlock(sch);
+
+ return 0;
+}
+
+static struct Qdisc *netem_leaf(struct Qdisc *sch, unsigned long arg)
+{
+ struct netem_sched_data *q = qdisc_priv(sch);
+ return q->qdisc;
+}
+
+static unsigned long netem_get(struct Qdisc *sch, u32 classid)
+{
+ return 1;
+}
+
+static void netem_put(struct Qdisc *sch, unsigned long arg)
+{
+}
+
+static void netem_walk(struct Qdisc *sch, struct qdisc_walker *walker)
+{
+ if (!walker->stop) {
+ if (walker->count >= walker->skip)
+ if (walker->fn(sch, 1, walker) < 0) {
+ walker->stop = 1;
+ return;
+ }
+ walker->count++;
+ }
+}
+
+static const struct Qdisc_class_ops netem_class_ops = {
+ .graft = netem_graft,
+ .leaf = netem_leaf,
+ .get = netem_get,
+ .put = netem_put,
+ .walk = netem_walk,
+ .dump = netem_dump_class,
+};
+
static struct Qdisc_ops netem_qdisc_ops __read_mostly = {
.id = "netem",
+ .cl_ops = &netem_class_ops,
.priv_size = sizeof(struct netem_sched_data),
.enqueue = netem_enqueue,
.dequeue = netem_dequeue,
^ permalink raw reply
* [PATCH net-next 5/6] netem: revised correlated loss generator
From: Stephen Hemminger @ 2011-02-23 23:04 UTC (permalink / raw)
To: David S. Miller; +Cc: netdev
In-Reply-To: <20110223230416.532009518@vyatta.com>
[-- Attachment #1: netem-loss-model.patch --]
[-- Type: text/plain, Size: 10589 bytes --]
This is a patch originated with Stefano Salsano and Fabio Ludovici.
It provides several alternative loss models for use with netem.
This patch adds two state machine based loss models.
See: http://netgroup.uniroma2.it/twiki/bin/view.cgi/Main/NetemCLG
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
---
include/linux/pkt_sched.h | 26 ++++
net/sched/sch_netem.c | 274 +++++++++++++++++++++++++++++++++++++++++++++-
2 files changed, 296 insertions(+), 4 deletions(-)
--- a/net/sched/sch_netem.c 2011-02-23 14:53:08.144607422 -0800
+++ b/net/sched/sch_netem.c 2011-02-23 15:01:29.159338952 -0800
@@ -47,6 +47,20 @@
layering other disciplines. It does not need to do bandwidth
control either since that can be handled by using token
bucket or other rate control.
+
+ Correlated Loss Generator models
+
+ Added generation of correlated loss according to the
+ "Gilbert-Elliot" model, a 4-state markov model.
+
+ References:
+ [1] NetemCLG Home http://netgroup.uniroma2.it/NetemCLG
+ [2] S. Salsano, F. Ludovici, A. Ordine, "Definition of a general
+ and intuitive loss model for packet networks and its implementation
+ in the Netem module in the Linux kernel", available in [1]
+
+ Authors: Stefano Salsano <stefano.salsano at uniroma2.it
+ Fabio Ludovici <fabio.ludovici at yahoo.it>
*/
struct netem_sched_data {
@@ -73,6 +87,26 @@ struct netem_sched_data {
u32 size;
s16 table[0];
} *delay_dist;
+
+ enum {
+ CLG_RANDOM,
+ CLG_4_STATES,
+ CLG_GILB_ELL,
+ } loss_model;
+
+ /* Correlated Loss Generation models */
+ struct clgstate {
+ /* state of the Markov chain */
+ u8 state;
+
+ /* 4-states and Gilbert-Elliot models */
+ u32 a1; /* p13 for 4-states or p for GE */
+ u32 a2; /* p31 for 4-states or r for GE */
+ u32 a3; /* p32 for 4-states or h for GE */
+ u32 a4; /* p14 for 4-states or 1-k for GE */
+ u32 a5; /* p23 used only in 4-states */
+ } clg;
+
};
/* Time stamp put into socket buffer control block */
@@ -115,6 +149,122 @@ static u32 get_crandom(struct crndstate
return answer;
}
+/* loss_4state - 4-state model loss generator
+ * Generates losses according to the 4-state Markov chain adopted in
+ * the GI (General and Intuitive) loss model.
+ */
+static bool loss_4state(struct netem_sched_data *q)
+{
+ struct clgstate *clg = &q->clg;
+ u32 rnd = net_random();
+
+ /*
+ * Makes a comparision between rnd and the transition
+ * probabilities outgoing from the current state, then decides the
+ * next state and if the next packet has to be transmitted or lost.
+ * The four states correspond to:
+ * 1 => successfully transmitted packets within a gap period
+ * 4 => isolated losses within a gap period
+ * 3 => lost packets within a burst period
+ * 2 => successfully transmitted packets within a burst period
+ */
+ switch (clg->state) {
+ case 1:
+ if (rnd < clg->a4) {
+ clg->state = 4;
+ return true;
+ } else if (clg->a4 < rnd && rnd < clg->a1) {
+ clg->state = 3;
+ return true;
+ } else if (clg->a1 < rnd)
+ clg->state = 1;
+
+ break;
+ case 2:
+ if (rnd < clg->a5) {
+ clg->state = 3;
+ return true;
+ } else
+ clg->state = 2;
+
+ break;
+ case 3:
+ if (rnd < clg->a3)
+ clg->state = 2;
+ else if (clg->a3 < rnd && rnd < clg->a2 + clg->a3) {
+ clg->state = 1;
+ return true;
+ } else if (clg->a2 + clg->a3 < rnd) {
+ clg->state = 3;
+ return true;
+ }
+ break;
+ case 4:
+ clg->state = 1;
+ break;
+ }
+
+ return false;
+}
+
+/* loss_gilb_ell - Gilbert-Elliot model loss generator
+ * Generates losses according to the Gilbert-Elliot loss model or
+ * its special cases (Gilbert or Simple Gilbert)
+ *
+ * Makes a comparision between random number and the transition
+ * probabilities outgoing from the current state, then decides the
+ * next state. A second random number is extracted and the comparision
+ * with the loss probability of the current state decides if the next
+ * packet will be transmitted or lost.
+ */
+static bool loss_gilb_ell(struct netem_sched_data *q)
+{
+ struct clgstate *clg = &q->clg;
+
+ switch (clg->state) {
+ case 1:
+ if (net_random() < clg->a1)
+ clg->state = 2;
+ if (net_random() < clg->a4)
+ return true;
+ case 2:
+ if (net_random() < clg->a2)
+ clg->state = 1;
+ if (clg->a3 > net_random())
+ return true;
+ }
+
+ return false;
+}
+
+static bool loss_event(struct netem_sched_data *q)
+{
+ switch (q->loss_model) {
+ case CLG_RANDOM:
+ /* Random packet drop 0 => none, ~0 => all */
+ return q->loss && q->loss >= get_crandom(&q->loss_cor);
+
+ case CLG_4_STATES:
+ /* 4state loss model algorithm (used also for GI model)
+ * Extracts a value from the markov 4 state loss generator,
+ * if it is 1 drops a packet and if needed writes the event in
+ * the kernel logs
+ */
+ return loss_4state(q);
+
+ case CLG_GILB_ELL:
+ /* Gilbert-Elliot loss model algorithm
+ * Extracts a value from the Gilbert-Elliot loss generator,
+ * if it is 1 drops a packet and if needed writes the event in
+ * the kernel logs
+ */
+ return loss_gilb_ell(q);
+ }
+
+ return false; /* not reached */
+}
+
+
/* tabledist - return a pseudo-randomly distributed value with mean mu and
* std deviation sigma. Uses table lookup to approximate the desired
* distribution, and a uniformly-distributed pseudo-random source.
@@ -167,8 +317,8 @@ static int netem_enqueue(struct sk_buff
if (q->duplicate && q->duplicate >= get_crandom(&q->dup_cor))
++count;
- /* Random packet drop 0 => none, ~0 => all */
- if (q->loss && q->loss >= get_crandom(&q->loss_cor))
+ /* Drop packet? */
+ if (loss_event(q))
--count;
if (count == 0) {
@@ -385,10 +535,66 @@ static void get_corrupt(struct Qdisc *sc
init_crandom(&q->corrupt_cor, r->correlation);
}
+static int get_loss_clg(struct Qdisc *sch, const struct nlattr *attr)
+{
+ struct netem_sched_data *q = qdisc_priv(sch);
+ const struct nlattr *la;
+ int rem;
+
+ nla_for_each_nested(la, attr, rem) {
+ u16 type = nla_type(la);
+
+ switch(type) {
+ case NETEM_LOSS_GI: {
+ const struct tc_netem_gimodel *gi = nla_data(la);
+
+ if (nla_len(la) != sizeof(struct tc_netem_gimodel)) {
+ pr_info("netem: incorrect gi model size\n");
+ return -EINVAL;
+ }
+
+ q->loss_model = CLG_4_STATES;
+
+ q->clg.state = 1;
+ q->clg.a1 = gi->p13;
+ q->clg.a2 = gi->p31;
+ q->clg.a3 = gi->p32;
+ q->clg.a4 = gi->p14;
+ q->clg.a5 = gi->p23;
+ break;
+ }
+
+ case NETEM_LOSS_GE: {
+ const struct tc_netem_gemodel *ge = nla_data(la);
+
+ if (nla_len(la) != sizeof(struct tc_netem_gemodel)) {
+ pr_info("netem: incorrect gi model size\n");
+ return -EINVAL;
+ }
+
+ q->loss_model = CLG_GILB_ELL;
+ q->clg.state = 1;
+ q->clg.a1 = ge->p;
+ q->clg.a2 = ge->r;
+ q->clg.a3 = ge->h;
+ q->clg.a4 = ge->k1;
+ break;
+ }
+
+ default:
+ pr_info("netem: unknown loss type %u\n", type);
+ return -EINVAL;
+ }
+ }
+
+ return 0;
+}
+
static const struct nla_policy netem_policy[TCA_NETEM_MAX + 1] = {
[TCA_NETEM_CORR] = { .len = sizeof(struct tc_netem_corr) },
[TCA_NETEM_REORDER] = { .len = sizeof(struct tc_netem_reorder) },
[TCA_NETEM_CORRUPT] = { .len = sizeof(struct tc_netem_corrupt) },
+ [TCA_NETEM_LOSS] = { .type = NLA_NESTED },
};
static int parse_attr(struct nlattr *tb[], int maxtype, struct nlattr *nla,
@@ -396,11 +602,15 @@ static int parse_attr(struct nlattr *tb[
{
int nested_len = nla_len(nla) - NLA_ALIGN(len);
- if (nested_len < 0)
+ if (nested_len < 0) {
+ pr_info("netem: invalid attributes len %d\n", nested_len);
return -EINVAL;
+ }
+
if (nested_len >= nla_attr_size(0))
return nla_parse(tb, maxtype, nla_data(nla) + NLA_ALIGN(len),
nested_len, policy);
+
memset(tb, 0, sizeof(struct nlattr *) * (maxtype + 1));
return 0;
}
@@ -456,7 +666,11 @@ static int netem_change(struct Qdisc *sc
if (tb[TCA_NETEM_CORRUPT])
get_corrupt(sch, tb[TCA_NETEM_CORRUPT]);
- return 0;
+ q->loss_model = CLG_RANDOM;
+ if (tb[TCA_NETEM_LOSS])
+ ret = get_loss_clg(sch, tb[TCA_NETEM_LOSS]);
+
+ return ret;
}
/*
@@ -551,6 +765,7 @@ static int netem_init(struct Qdisc *sch,
qdisc_watchdog_init(&q->watchdog, sch);
+ q->loss_model = CLG_RANDOM;
q->qdisc = qdisc_create_dflt(sch->dev_queue, &tfifo_qdisc_ops,
TC_H_MAKE(sch->handle, 1));
if (!q->qdisc) {
@@ -575,6 +790,54 @@ static void netem_destroy(struct Qdisc *
dist_free(q->delay_dist);
}
+static int dump_loss_model(const struct netem_sched_data *q,
+ struct sk_buff *skb)
+{
+ struct nlattr *nest;
+
+ nest = nla_nest_start(skb, TCA_NETEM_LOSS);
+ if (nest == NULL)
+ goto nla_put_failure;
+
+ switch (q->loss_model) {
+ case CLG_RANDOM:
+ /* legacy loss model */
+ nla_nest_cancel(skb, nest);
+ return 0; /* no data */
+
+ case CLG_4_STATES: {
+ struct tc_netem_gimodel gi = {
+ .p13 = q->clg.a1,
+ .p31 = q->clg.a2,
+ .p32 = q->clg.a3,
+ .p14 = q->clg.a4,
+ .p23 = q->clg.a5,
+ };
+
+ NLA_PUT(skb, NETEM_LOSS_GI, sizeof(gi), &gi);
+ break;
+ }
+ case CLG_GILB_ELL: {
+ struct tc_netem_gemodel ge = {
+ .p = q->clg.a1,
+ .r = q->clg.a2,
+ .h = q->clg.a3,
+ .k1 = q->clg.a4,
+ };
+
+ NLA_PUT(skb, NETEM_LOSS_GE, sizeof(ge), &ge);
+ break;
+ }
+ }
+
+ nla_nest_end(skb, nest);
+ return 0;
+
+nla_put_failure:
+ nla_nest_cancel(skb, nest);
+ return -1;
+}
+
static int netem_dump(struct Qdisc *sch, struct sk_buff *skb)
{
const struct netem_sched_data *q = qdisc_priv(sch);
@@ -605,6 +868,9 @@ static int netem_dump(struct Qdisc *sch,
corrupt.correlation = q->corrupt_cor.rho;
NLA_PUT(skb, TCA_NETEM_CORRUPT, sizeof(corrupt), &corrupt);
+ if (dump_loss_model(q, skb) != 0)
+ goto nla_put_failure;
+
return nla_nest_end(skb, nla);
nla_put_failure:
--- a/include/linux/pkt_sched.h 2011-02-23 14:53:08.164607720 -0800
+++ b/include/linux/pkt_sched.h 2011-02-23 14:58:19.532718370 -0800
@@ -464,6 +464,7 @@ enum {
TCA_NETEM_DELAY_DIST,
TCA_NETEM_REORDER,
TCA_NETEM_CORRUPT,
+ TCA_NETEM_LOSS,
__TCA_NETEM_MAX,
};
@@ -494,6 +495,31 @@ struct tc_netem_corrupt {
__u32 correlation;
};
+enum {
+ NETEM_LOSS_UNSPEC,
+ NETEM_LOSS_GI, /* General Intuitive - 4 state model */
+ NETEM_LOSS_GE, /* Gilbert Elliot models */
+ __NETEM_LOSS_MAX
+};
+#define NETEM_LOSS_MAX (__NETEM_LOSS_MAX - 1)
+
+/* State transition probablities for 4 state model */
+struct tc_netem_gimodel {
+ __u32 p13;
+ __u32 p31;
+ __u32 p32;
+ __u32 p14;
+ __u32 p23;
+};
+
+/* Gilbert-Elliot models */
+struct tc_netem_gemodel {
+ __u32 p;
+ __u32 r;
+ __u32 h;
+ __u32 k1;
+};
+
#define NETEM_DIST_SCALE 8192
#define NETEM_DIST_MAX 16384
^ permalink raw reply
* [PATCH net-next 6/6] netem: update version and cleanup
From: Stephen Hemminger @ 2011-02-23 23:04 UTC (permalink / raw)
To: David S. Miller; +Cc: netdev
In-Reply-To: <20110223230416.532009518@vyatta.com>
[-- Attachment #1: netem-update.patch --]
[-- Type: text/plain, Size: 1532 bytes --]
Get rid of debug message that are not useful, and enable
the log messages in case of error.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
---
net/sched/sch_netem.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
--- a/net/sched/sch_netem.c 2011-02-23 15:01:29.159338952 -0800
+++ b/net/sched/sch_netem.c 2011-02-23 15:02:00.451849096 -0800
@@ -24,7 +24,7 @@
#include <net/netlink.h>
#include <net/pkt_sched.h>
-#define VERSION "1.2"
+#define VERSION "1.3"
/* Network Emulation Queuing algorithm.
====================================
@@ -311,8 +311,6 @@ static int netem_enqueue(struct sk_buff
int ret;
int count = 1;
- pr_debug("netem_enqueue skb=%p\n", skb);
-
/* Random duplication */
if (q->duplicate && q->duplicate >= get_crandom(&q->dup_cor))
++count;
@@ -633,7 +631,7 @@ static int netem_change(struct Qdisc *sc
ret = fifo_set_limit(q->qdisc, qopt->limit);
if (ret) {
- pr_debug("netem: can't set fifo limit\n");
+ pr_info("netem: can't set fifo limit\n");
return ret;
}
@@ -769,13 +767,13 @@ static int netem_init(struct Qdisc *sch,
q->qdisc = qdisc_create_dflt(sch->dev_queue, &tfifo_qdisc_ops,
TC_H_MAKE(sch->handle, 1));
if (!q->qdisc) {
- pr_debug("netem: qdisc create failed\n");
+ pr_notice("netem: qdisc create tfifo qdisc failed\n");
return -ENOMEM;
}
ret = netem_change(sch, opt);
if (ret) {
- pr_debug("netem: change failed\n");
+ pr_info("netem: change failed\n");
qdisc_destroy(q->qdisc);
}
return ret;
^ permalink raw reply
* Re: [PATCH 1/2] bonding: fix incorrect transmit queue offset
From: Phil Oester @ 2011-02-23 23:08 UTC (permalink / raw)
To: Andy Gospodarek; +Cc: netdev, Ben Hutchings, Jay Vosburgh
In-Reply-To: <1298490169-5224-1-git-send-email-andy@greyhouse.net>
On Wed, Feb 23, 2011 at 02:42:49PM -0500, Andy Gospodarek wrote:
> + * destination queue. Using a helper function skips the a call to
s/the a/a/ or s/the a/the/
> + while (txq >= dev->real_num_tx_queues) {
> + /* let the user know if we do not have enough tx queues */
> + if (net_ratelimit())
> + pr_warning("%s selects invalid tx queue %d. Consider"
> + " setting module option tx_queues > %d.",
> + dev->name, txq, dev->real_num_tx_queues);
> + txq -= dev->real_num_tx_queues;
> + }
Think this would be better as a WARN_ONCE, as otherwise syslog will still
get flooded with this - even when ratelimited. See get_rps_cpu in
net/core/dev.c as an example.o
Will test this out.
Phil
^ permalink raw reply
* Re: [PATCH v2] ipvs: unify the formula to estimate the overhead of processing connections
From: Simon Horman @ 2011-02-23 23:09 UTC (permalink / raw)
To: Wensong Zhang
Cc: Changli Gao, David S. Miller, Patrick McHardy, Julian Anastasov,
netdev, lvs-devel, netfilter-devel
In-Reply-To: <AANLkTini6JkOQenO+bzF3AbzePPe1vMtMK_5pqfLifzz@mail.gmail.com>
Hi Wensong,
should I add an Acked-by?
On Wed, Feb 23, 2011 at 09:56:54AM +0800, Wensong Zhang wrote:
> Sure, I am ok with this patch. Thanks!
>
> On Tue, Feb 22, 2011 at 1:56 PM, Simon Horman <horms@verge.net.au> wrote:
> > On Sat, Feb 19, 2011 at 05:32:28PM +0800, Changli Gao wrote:
> >> lc and wlc use the same formula, but lblc and lblcr use another one. There
> >> is no reason for using two different formulas for the lc variants.
> >>
> >> The formula used by lc is used by all the lc variants in this patch.
> >
> > Wensong, are you ok with this version of the patch?
> >
> >>
> >> Signed-off-by: Changli Gao <xiaosuo@gmail.com>
> >> ---
> >> v2: use ip_vs_dest_conn_overhead() instead.
> >> include/net/ip_vs.h | 14 ++++++++++++++
> >> net/netfilter/ipvs/ip_vs_lblc.c | 13 +++----------
> >> net/netfilter/ipvs/ip_vs_lblcr.c | 25 +++++++------------------
> >> net/netfilter/ipvs/ip_vs_lc.c | 18 +-----------------
> >> net/netfilter/ipvs/ip_vs_wlc.c | 20 ++------------------
> >> 5 files changed, 27 insertions(+), 63 deletions(-)
> >> diff --git a/include/net/ip_vs.h b/include/net/ip_vs.h
> >> index 5d75fea..e80ffb7 100644
> >> --- a/include/net/ip_vs.h
> >> +++ b/include/net/ip_vs.h
> >> @@ -1241,6 +1241,20 @@ static inline void ip_vs_conn_drop_conntrack(struct ip_vs_conn *cp)
> >> /* CONFIG_IP_VS_NFCT */
> >> #endif
> >>
> >> +static inline unsigned int
> >> +ip_vs_dest_conn_overhead(struct ip_vs_dest *dest)
> >> +{
> >> + /*
> >> + * We think the overhead of processing active connections is 256
> >> + * times higher than that of inactive connections in average. (This
> >> + * 256 times might not be accurate, we will change it later) We
> >> + * use the following formula to estimate the overhead now:
> >> + * dest->activeconns*256 + dest->inactconns
> >> + */
> >> + return (atomic_read(&dest->activeconns) << 8) +
> >> + atomic_read(&dest->inactconns);
> >> +}
> >> +
> >> #endif /* __KERNEL__ */
> >>
> >> #endif /* _NET_IP_VS_H */
> >> diff --git a/net/netfilter/ipvs/ip_vs_lblc.c b/net/netfilter/ipvs/ip_vs_lblc.c
> >> index 00b5ffa..58ae403 100644
> >> --- a/net/netfilter/ipvs/ip_vs_lblc.c
> >> +++ b/net/netfilter/ipvs/ip_vs_lblc.c
> >> @@ -389,12 +389,7 @@ __ip_vs_lblc_schedule(struct ip_vs_service *svc)
> >> int loh, doh;
> >>
> >> /*
> >> - * We think the overhead of processing active connections is fifty
> >> - * times higher than that of inactive connections in average. (This
> >> - * fifty times might not be accurate, we will change it later.) We
> >> - * use the following formula to estimate the overhead:
> >> - * dest->activeconns*50 + dest->inactconns
> >> - * and the load:
> >> + * We use the following formula to estimate the load:
> >> * (dest overhead) / dest->weight
> >> *
> >> * Remember -- no floats in kernel mode!!!
> >> @@ -410,8 +405,7 @@ __ip_vs_lblc_schedule(struct ip_vs_service *svc)
> >> continue;
> >> if (atomic_read(&dest->weight) > 0) {
> >> least = dest;
> >> - loh = atomic_read(&least->activeconns) * 50
> >> - + atomic_read(&least->inactconns);
> >> + loh = ip_vs_dest_conn_overhead(least);
> >> goto nextstage;
> >> }
> >> }
> >> @@ -425,8 +419,7 @@ __ip_vs_lblc_schedule(struct ip_vs_service *svc)
> >> if (dest->flags & IP_VS_DEST_F_OVERLOAD)
> >> continue;
> >>
> >> - doh = atomic_read(&dest->activeconns) * 50
> >> - + atomic_read(&dest->inactconns);
> >> + doh = ip_vs_dest_conn_overhead(dest);
> >> if (loh * atomic_read(&dest->weight) >
> >> doh * atomic_read(&least->weight)) {
> >> least = dest;
> >> diff --git a/net/netfilter/ipvs/ip_vs_lblcr.c b/net/netfilter/ipvs/ip_vs_lblcr.c
> >> index bfa25f1..2ddefe8 100644
> >> --- a/net/netfilter/ipvs/ip_vs_lblcr.c
> >> +++ b/net/netfilter/ipvs/ip_vs_lblcr.c
> >> @@ -178,8 +178,7 @@ static inline struct ip_vs_dest *ip_vs_dest_set_min(struct ip_vs_dest_set *set)
> >>
> >> if ((atomic_read(&least->weight) > 0)
> >> && (least->flags & IP_VS_DEST_F_AVAILABLE)) {
> >> - loh = atomic_read(&least->activeconns) * 50
> >> - + atomic_read(&least->inactconns);
> >> + loh = ip_vs_dest_conn_overhead(least);
> >> goto nextstage;
> >> }
> >> }
> >> @@ -192,8 +191,7 @@ static inline struct ip_vs_dest *ip_vs_dest_set_min(struct ip_vs_dest_set *set)
> >> if (dest->flags & IP_VS_DEST_F_OVERLOAD)
> >> continue;
> >>
> >> - doh = atomic_read(&dest->activeconns) * 50
> >> - + atomic_read(&dest->inactconns);
> >> + doh = ip_vs_dest_conn_overhead(dest);
> >> if ((loh * atomic_read(&dest->weight) >
> >> doh * atomic_read(&least->weight))
> >> && (dest->flags & IP_VS_DEST_F_AVAILABLE)) {
> >> @@ -228,8 +226,7 @@ static inline struct ip_vs_dest *ip_vs_dest_set_max(struct ip_vs_dest_set *set)
> >> list_for_each_entry(e, &set->list, list) {
> >> most = e->dest;
> >> if (atomic_read(&most->weight) > 0) {
> >> - moh = atomic_read(&most->activeconns) * 50
> >> - + atomic_read(&most->inactconns);
> >> + moh = ip_vs_dest_conn_overhead(most);
> >> goto nextstage;
> >> }
> >> }
> >> @@ -239,8 +236,7 @@ static inline struct ip_vs_dest *ip_vs_dest_set_max(struct ip_vs_dest_set *set)
> >> nextstage:
> >> list_for_each_entry(e, &set->list, list) {
> >> dest = e->dest;
> >> - doh = atomic_read(&dest->activeconns) * 50
> >> - + atomic_read(&dest->inactconns);
> >> + doh = ip_vs_dest_conn_overhead(dest);
> >> /* moh/mw < doh/dw ==> moh*dw < doh*mw, where mw,dw>0 */
> >> if ((moh * atomic_read(&dest->weight) <
> >> doh * atomic_read(&most->weight))
> >> @@ -563,12 +559,7 @@ __ip_vs_lblcr_schedule(struct ip_vs_service *svc)
> >> int loh, doh;
> >>
> >> /*
> >> - * We think the overhead of processing active connections is fifty
> >> - * times higher than that of inactive connections in average. (This
> >> - * fifty times might not be accurate, we will change it later.) We
> >> - * use the following formula to estimate the overhead:
> >> - * dest->activeconns*50 + dest->inactconns
> >> - * and the load:
> >> + * We use the following formula to estimate the load:
> >> * (dest overhead) / dest->weight
> >> *
> >> * Remember -- no floats in kernel mode!!!
> >> @@ -585,8 +576,7 @@ __ip_vs_lblcr_schedule(struct ip_vs_service *svc)
> >>
> >> if (atomic_read(&dest->weight) > 0) {
> >> least = dest;
> >> - loh = atomic_read(&least->activeconns) * 50
> >> - + atomic_read(&least->inactconns);
> >> + loh = ip_vs_dest_conn_overhead(least);
> >> goto nextstage;
> >> }
> >> }
> >> @@ -600,8 +590,7 @@ __ip_vs_lblcr_schedule(struct ip_vs_service *svc)
> >> if (dest->flags & IP_VS_DEST_F_OVERLOAD)
> >> continue;
> >>
> >> - doh = atomic_read(&dest->activeconns) * 50
> >> - + atomic_read(&dest->inactconns);
> >> + doh = ip_vs_dest_conn_overhead(dest);
> >> if (loh * atomic_read(&dest->weight) >
> >> doh * atomic_read(&least->weight)) {
> >> least = dest;
> >> diff --git a/net/netfilter/ipvs/ip_vs_lc.c b/net/netfilter/ipvs/ip_vs_lc.c
> >> index 4f69db1..160cb80 100644
> >> --- a/net/netfilter/ipvs/ip_vs_lc.c
> >> +++ b/net/netfilter/ipvs/ip_vs_lc.c
> >> @@ -22,22 +22,6 @@
> >>
> >> #include <net/ip_vs.h>
> >>
> >> -
> >> -static inline unsigned int
> >> -ip_vs_lc_dest_overhead(struct ip_vs_dest *dest)
> >> -{
> >> - /*
> >> - * We think the overhead of processing active connections is 256
> >> - * times higher than that of inactive connections in average. (This
> >> - * 256 times might not be accurate, we will change it later) We
> >> - * use the following formula to estimate the overhead now:
> >> - * dest->activeconns*256 + dest->inactconns
> >> - */
> >> - return (atomic_read(&dest->activeconns) << 8) +
> >> - atomic_read(&dest->inactconns);
> >> -}
> >> -
> >> -
> >> /*
> >> * Least Connection scheduling
> >> */
> >> @@ -62,7 +46,7 @@ ip_vs_lc_schedule(struct ip_vs_service *svc, const struct sk_buff *skb)
> >> if ((dest->flags & IP_VS_DEST_F_OVERLOAD) ||
> >> atomic_read(&dest->weight) == 0)
> >> continue;
> >> - doh = ip_vs_lc_dest_overhead(dest);
> >> + doh = ip_vs_dest_conn_overhead(dest);
> >> if (!least || doh < loh) {
> >> least = dest;
> >> loh = doh;
> >> diff --git a/net/netfilter/ipvs/ip_vs_wlc.c b/net/netfilter/ipvs/ip_vs_wlc.c
> >> index bbddfdb..db751f5 100644
> >> --- a/net/netfilter/ipvs/ip_vs_wlc.c
> >> +++ b/net/netfilter/ipvs/ip_vs_wlc.c
> >> @@ -27,22 +27,6 @@
> >>
> >> #include <net/ip_vs.h>
> >>
> >> -
> >> -static inline unsigned int
> >> -ip_vs_wlc_dest_overhead(struct ip_vs_dest *dest)
> >> -{
> >> - /*
> >> - * We think the overhead of processing active connections is 256
> >> - * times higher than that of inactive connections in average. (This
> >> - * 256 times might not be accurate, we will change it later) We
> >> - * use the following formula to estimate the overhead now:
> >> - * dest->activeconns*256 + dest->inactconns
> >> - */
> >> - return (atomic_read(&dest->activeconns) << 8) +
> >> - atomic_read(&dest->inactconns);
> >> -}
> >> -
> >> -
> >> /*
> >> * Weighted Least Connection scheduling
> >> */
> >> @@ -71,7 +55,7 @@ ip_vs_wlc_schedule(struct ip_vs_service *svc, const struct sk_buff *skb)
> >> if (!(dest->flags & IP_VS_DEST_F_OVERLOAD) &&
> >> atomic_read(&dest->weight) > 0) {
> >> least = dest;
> >> - loh = ip_vs_wlc_dest_overhead(least);
> >> + loh = ip_vs_dest_conn_overhead(least);
> >> goto nextstage;
> >> }
> >> }
> >> @@ -85,7 +69,7 @@ ip_vs_wlc_schedule(struct ip_vs_service *svc, const struct sk_buff *skb)
> >> list_for_each_entry_continue(dest, &svc->destinations, n_list) {
> >> if (dest->flags & IP_VS_DEST_F_OVERLOAD)
> >> continue;
> >> - doh = ip_vs_wlc_dest_overhead(dest);
> >> + doh = ip_vs_dest_conn_overhead(dest);
> >> if (loh * atomic_read(&dest->weight) >
> >> doh * atomic_read(&least->weight)) {
> >> least = dest;
> >>
> >
>
^ permalink raw reply
* Re: [PATCH 1/2] bonding: fix incorrect transmit queue offset
From: Andy Gospodarek @ 2011-02-23 23:12 UTC (permalink / raw)
To: Jay Vosburgh; +Cc: Andy Gospodarek, netdev, Phil Oester, Ben Hutchings
In-Reply-To: <720.1298499545@death>
On Wed, Feb 23, 2011 at 02:19:05PM -0800, Jay Vosburgh wrote:
> Andy Gospodarek <andy@greyhouse.net> wrote:
>
> >Users noticed the following messages:
> >
> >kernel: bond0 selects TX queue 16, but real number of TX queues is 16
> >
> >were filling their logs when frames received from a device that
> >contained 16 input queues were being forwarded out of a bonded device.
> >Ben pointed out that the contents of skb->queue_mapping cannot be
> >directly mapped to a transmit queue, so I went with his suggestion for a
> >solution to the offset problem.
> >
> >The function now also warns the user to increase the default value for
> >tx_queues if needed and returns a valid tx queue to dev_pick_tx.
> >
> >Signed-off-by: Andy Gospodarek <andy@greyhouse.net>
> >Reported-by: Phil Oester <kernel@linuxace.com>
> >CC: Ben Hutchings <bhutchings@solarflare.com>
> >---
> > drivers/net/bonding/bond_main.c | 24 +++++++++++++++++-------
> > 1 files changed, 17 insertions(+), 7 deletions(-)
> >
> >diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
> >index 77e3c6a..1512c83 100644
> >--- a/drivers/net/bonding/bond_main.c
> >+++ b/drivers/net/bonding/bond_main.c
> >@@ -4533,15 +4533,25 @@ out:
> > return res;
> > }
> >
> >+/*
> >+ * This helper function exists to help dev_pick_tx get the correct
> >+ * destination queue. Using a helper function skips the a call to
> >+ * skb_tx_hash and will put the skbs in the queue we expect on their
> >+ * way down to the bonding driver.
> >+ */
> > static u16 bond_select_queue(struct net_device *dev, struct sk_buff *skb)
> > {
> >- /*
> >- * This helper function exists to help dev_pick_tx get the correct
> >- * destination queue. Using a helper function skips the a call to
> >- * skb_tx_hash and will put the skbs in the queue we expect on their
> >- * way down to the bonding driver.
> >- */
> >- return skb->queue_mapping;
> >+ u16 txq = skb_rx_queue_recorded(skb) ? skb_get_rx_queue(skb) : 0;
> >+
> >+ while (txq >= dev->real_num_tx_queues) {
> >+ /* let the user know if we do not have enough tx queues */
> >+ if (net_ratelimit())
> >+ pr_warning("%s selects invalid tx queue %d. Consider"
> >+ " setting module option tx_queues > %d.",
> >+ dev->name, txq, dev->real_num_tx_queues);
> >+ txq -= dev->real_num_tx_queues;
>
> Would this be better as:
>
> if (txq >= dev->real_num_tx_queues) {
> /* let the user know if we do not have enough tx queues */
> if (net_ratelimit())
> pr_warning("%s selects invalid tx queue %d. Consider"
> " setting module option tx_queues > %d.",
> dev->name, txq, dev->real_num_tx_queues);
> txq %= dev->real_num_tx_queues;
> }
>
> I.e., use one modulus instead of a looping subtraction? If the
> queue id in the packet is substantially out of range, the loop may
> interate multiple times. Presumably you want to distribute the out of
> range queue mappings (not just assign them all to the same queue id).
>
I hesitated to put the printk inside the while, but decided to do it as
it looked cleaner than a bunch of if/while statements and this loop was
likely to get run only once based on current settings and hardware out
there.
I'm not a big fan of modulo as it is generally pretty expensive when
most cases will be covered with a single subtraction. I could be
over-stating the expense, though.
While it would be nice to distribute things more evenly, this code
essentially does what the __skb_tx_hash does right now, so it seemed
logical to do the same.
If you would rather not see the pr_warning in the loop, this could work
as well and doesn't look too nasty.
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index 77e3c6a..2d3ae54 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -4533,15 +4533,27 @@ out:
return res;
}
+/*
+ * This helper function exists to help dev_pick_tx get the correct
+ * destination queue. Using a helper function skips the a call to
+ * skb_tx_hash and will put the skbs in the queue we expect on their
+ * way down to the bonding driver.
+ */
static u16 bond_select_queue(struct net_device *dev, struct sk_buff *skb)
{
- /*
- * This helper function exists to help dev_pick_tx get the correct
- * destination queue. Using a helper function skips the a call to
- * skb_tx_hash and will put the skbs in the queue we expect on their
- * way down to the bonding driver.
- */
- return skb->queue_mapping;
+ u16 txq = skb_rx_queue_recorded(skb) ? skb_get_rx_queue(skb) : 0;
+
+ if (txq >= dev->real_num_tx_queues) {
+ /* let the user know if we do not have enough tx queues */
+ if (net_ratelimit())
+ pr_warning("%s selects invalid tx queue %d. Consider"
+ " setting module option tx_queues > %d.",
+ dev->name, txq, dev->real_num_tx_queues);
+ do
+ txq -= dev->real_num_tx_queues;
+ while (txq >= dev->real_num_tx_queues);
+ }
+ return txq;
}
static netdev_tx_t bond_start_xmit(struct sk_buff *skb, struct net_device *dev)
^ permalink raw reply related
* Re: [PATCH 1/2] bonding: fix incorrect transmit queue offset
From: David Miller @ 2011-02-23 23:13 UTC (permalink / raw)
To: kernel; +Cc: andy, netdev, bhutchings, fubar
In-Reply-To: <20110223230844.GA16476@linuxace.com>
From: Phil Oester <kernel@linuxace.com>
Date: Wed, 23 Feb 2011 15:08:44 -0800
> On Wed, Feb 23, 2011 at 02:42:49PM -0500, Andy Gospodarek wrote:
>> + * destination queue. Using a helper function skips the a call to
>
> s/the a/a/ or s/the a/the/
>
>> + while (txq >= dev->real_num_tx_queues) {
>> + /* let the user know if we do not have enough tx queues */
>> + if (net_ratelimit())
>> + pr_warning("%s selects invalid tx queue %d. Consider"
>> + " setting module option tx_queues > %d.",
>> + dev->name, txq, dev->real_num_tx_queues);
>> + txq -= dev->real_num_tx_queues;
>> + }
>
> Think this would be better as a WARN_ONCE, as otherwise syslog will still
> get flooded with this - even when ratelimited. See get_rps_cpu in
> net/core/dev.c as an example.o
Agreed.
^ permalink raw reply
* Re: [PATCH 1/2] bonding: fix incorrect transmit queue offset
From: Ben Hutchings @ 2011-02-23 23:37 UTC (permalink / raw)
To: David Miller; +Cc: kernel, andy, netdev, fubar
In-Reply-To: <20110223.151357.245408084.davem@davemloft.net>
On Wed, 2011-02-23 at 15:13 -0800, David Miller wrote:
> From: Phil Oester <kernel@linuxace.com>
> Date: Wed, 23 Feb 2011 15:08:44 -0800
>
> > On Wed, Feb 23, 2011 at 02:42:49PM -0500, Andy Gospodarek wrote:
> >> + * destination queue. Using a helper function skips the a call to
> >
> > s/the a/a/ or s/the a/the/
> >
> >> + while (txq >= dev->real_num_tx_queues) {
> >> + /* let the user know if we do not have enough tx queues */
> >> + if (net_ratelimit())
> >> + pr_warning("%s selects invalid tx queue %d. Consider"
> >> + " setting module option tx_queues > %d.",
> >> + dev->name, txq, dev->real_num_tx_queues);
> >> + txq -= dev->real_num_tx_queues;
> >> + }
> >
> > Think this would be better as a WARN_ONCE, as otherwise syslog will still
> > get flooded with this - even when ratelimited. See get_rps_cpu in
> > net/core/dev.c as an example.o
>
> Agreed.
This shouldn't WARN at all. It is perfectly valid (though non-optimal)
to have different numbers of queues on two different multiqueue devices.
Ben.
--
Ben Hutchings, Senior Software Engineer, Solarflare Communications
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.
^ permalink raw reply
* Re: [PATCH 1/2] bonding: fix incorrect transmit queue offset
From: Andy Gospodarek @ 2011-02-23 23:43 UTC (permalink / raw)
To: Ben Hutchings; +Cc: David Miller, kernel, andy, netdev, fubar
In-Reply-To: <1298504269.2211.503.camel@localhost>
On Wed, Feb 23, 2011 at 11:37:49PM +0000, Ben Hutchings wrote:
> On Wed, 2011-02-23 at 15:13 -0800, David Miller wrote:
> > From: Phil Oester <kernel@linuxace.com>
> > Date: Wed, 23 Feb 2011 15:08:44 -0800
> >
> > > On Wed, Feb 23, 2011 at 02:42:49PM -0500, Andy Gospodarek wrote:
> > >> + * destination queue. Using a helper function skips the a call to
> > >
> > > s/the a/a/ or s/the a/the/
> > >
> > >> + while (txq >= dev->real_num_tx_queues) {
> > >> + /* let the user know if we do not have enough tx queues */
> > >> + if (net_ratelimit())
> > >> + pr_warning("%s selects invalid tx queue %d. Consider"
> > >> + " setting module option tx_queues > %d.",
> > >> + dev->name, txq, dev->real_num_tx_queues);
> > >> + txq -= dev->real_num_tx_queues;
> > >> + }
> > >
> > > Think this would be better as a WARN_ONCE, as otherwise syslog will still
> > > get flooded with this - even when ratelimited. See get_rps_cpu in
> > > net/core/dev.c as an example.o
> >
> > Agreed.
>
> This shouldn't WARN at all. It is perfectly valid (though non-optimal)
> to have different numbers of queues on two different multiqueue devices.
>
Agreed. Plus WARN seemed way to 'loud' for something like this.
^ permalink raw reply
* Re: [PATCH 1/2] bonding: fix incorrect transmit queue offset
From: David Miller @ 2011-02-23 23:54 UTC (permalink / raw)
To: bhutchings; +Cc: kernel, andy, netdev, fubar
In-Reply-To: <1298504269.2211.503.camel@localhost>
From: Ben Hutchings <bhutchings@solarflare.com>
Date: Wed, 23 Feb 2011 23:37:49 +0000
> On Wed, 2011-02-23 at 15:13 -0800, David Miller wrote:
>> From: Phil Oester <kernel@linuxace.com>
>> Date: Wed, 23 Feb 2011 15:08:44 -0800
>>
>> > On Wed, Feb 23, 2011 at 02:42:49PM -0500, Andy Gospodarek wrote:
>> >> + * destination queue. Using a helper function skips the a call to
>> >
>> > s/the a/a/ or s/the a/the/
>> >
>> >> + while (txq >= dev->real_num_tx_queues) {
>> >> + /* let the user know if we do not have enough tx queues */
>> >> + if (net_ratelimit())
>> >> + pr_warning("%s selects invalid tx queue %d. Consider"
>> >> + " setting module option tx_queues > %d.",
>> >> + dev->name, txq, dev->real_num_tx_queues);
>> >> + txq -= dev->real_num_tx_queues;
>> >> + }
>> >
>> > Think this would be better as a WARN_ONCE, as otherwise syslog will still
>> > get flooded with this - even when ratelimited. See get_rps_cpu in
>> > net/core/dev.c as an example.o
>>
>> Agreed.
>
> This shouldn't WARN at all. It is perfectly valid (though non-optimal)
> to have different numbers of queues on two different multiqueue devices.
That's also a good point.
^ permalink raw reply
* [GIT] Networking
From: David Miller @ 2011-02-23 23:57 UTC (permalink / raw)
To: torvalds; +Cc: akpm, netdev, linux-kernel
1) Eric B.'s remaining on-stack list_head fixes.
2) inet_twsk_deschedule() called in wrong context, from Eric Dumazet.
3) sfc ethtool large stack usage exposes uninitialzed kernel data to
user sometimes, from Eric Dumazet.
4) Packet scheduler private data needs to be long aligned, also from
Eric Dumazet.
5) R8169 bug fixes from Hayes Wang via Francois Romieu.
6) Timewait socket fix in tproxy from Florian Westphal.
7) Someone actually tried to use the ipv6 multicast snooping support
in bridging and it had lots of bugs. All fixed by Linus Lüssing.
a) packet header u16 access needs ntohs()
b) parsing mldv2 packets at wrong offset
c) MAC address creation for ipv6 is wrong
d) multicast entries stored in table with ETH_P_IP instead of ETH_P_IPV6
8) DM9000B locking and PHY power fixes from Henry Nestler.
9) TCP's undo_retrans can go negative, fix from Yuchung Cheng.
10) cfg80211 deadlock fix from Daniel J Blueman
Please pull, thanks a lot.
The following changes since commit 4a508dd259f5995b8d31c576b894263f5947d654:
Merge branch 'for-2639-rc4/i2c-fixes' of git://git.fluff.org/bjdooks/linux (2011-02-22 17:13:16 -0800)
are available in the git repository at:
master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6.git master
Cho, Yu-Chen (1):
Bluetooth: Add Atheros BT AR5BBU12 fw supported
Christian Lamparter (1):
p54pci: update receive dma buffers before and after processing
Daniel J Blueman (1):
fix cfg80211_wext_siwfreq lock ordering...
David S. Miller (3):
Merge branch 'master' of git://git.kernel.org/.../kaber/nf-2.6
Merge branch 'master' of git://git.kernel.org/.../linville/wireless-2.6
Merge branch 'r8169-davem' of git://git.kernel.org/.../romieu/netdev-2.6
Eric Dumazet (3):
tcp: fix inet_twsk_deschedule()
sfc: lower stack usage in efx_ethtool_self_test
net_sched: long word align struct qdisc_skb_cb data
Eric W. Biederman (1):
net: Fix more stale on-stack list_head objects.
Florian Westphal (1):
netfilter: tproxy: do not assign timewait sockets to skb->sk
Gertjan van Wingerde (1):
rt2x00: Fix WPA TKIP Michael MIC failures.
Hayes Wang (3):
r8169: fix incorrect args to oob notify.
r8169: correct settings of rtl8102e.
r8169: fix RTL8168DP power off issue.
Henry Nestler (2):
DM9000B: Fix reg_save after spin_lock in dm9000_timeout
DM9000B: Fix PHY power for network down/up
Jiri Bohac (1):
sctp: fix reporting of unknown parameters
Joerg Marx (1):
netfilter: ip6t_LOG: fix a flaw in printing the MAC
John Fastabend (1):
net: dcb: match dcb_app protocol field with 802.1Qaz spec
John W. Linville (1):
Merge branch 'master' of git://git.kernel.org/.../padovan/bluetooth-2.6
Linus Lüssing (7):
bridge: Fix IPv6 multicast snooping by storing correct protocol type
bridge: Fix IPv6 multicast snooping by correcting offset in MLDv2 report
bridge: Add missing ntohs()s for MLDv2 report parsing
ipv6: Add IPv6 multicast address flag defines
bridge: Allow mcast snooping for transient link local addresses too
bridge: Fix MLD queries' ethernet source address
bridge: Use IPv6 link-local address for multicast listener queries
Mohammed Shafi Shajakhan (1):
ath9k: Fix ath9k prevents CPU to enter C3 states
Nick Kossifidis (1):
ath5k: Fix fast channel switching
Nikolay Ledovskikh (1):
ath5k: Correct channel setting for AR2317 chip
Oliver Neukum (1):
Bluetooth: fix crash with quirky dongles doing sound
Shahar Havivi (1):
Added support for usb ethernet (0x0fe6, 0x9700)
Stanislaw Gruszka (1):
mac80211: fix conn_mon_timer running after disassociate
Vladislav P (1):
Bluetooth: Release BTM while sleeping to avoid deadlock
Xose Vazquez Perez (1):
wireless: rt2x00: rt2800pci.c: add two ids
Yuchung Cheng (1):
tcp: undo_retrans counter fixes
drivers/bluetooth/ath3k.c | 3 +
drivers/bluetooth/btusb.c | 7 +-
drivers/net/dm9000.c | 9 +-
drivers/net/r8169.c | 42 +++++----
drivers/net/sfc/ethtool.c | 22 +++--
drivers/net/usb/dm9601.c | 4 +
drivers/net/wireless/ath/ath5k/phy.c | 143 +++++++++++++++++++------------
drivers/net/wireless/ath/ath9k/ath9k.h | 6 --
drivers/net/wireless/ath/ath9k/init.c | 8 --
drivers/net/wireless/ath/ath9k/main.c | 8 --
drivers/net/wireless/p54/p54pci.c | 14 ++-
drivers/net/wireless/rt2x00/rt2800pci.c | 8 ++
drivers/net/wireless/rt2x00/rt2800usb.c | 6 ++
include/linux/dcbnl.h | 2 +-
include/net/ipv6.h | 12 +++
include/net/netfilter/nf_tproxy_core.h | 12 +---
include/net/sch_generic.h | 2 +-
net/bluetooth/rfcomm/tty.c | 2 +
net/bridge/br_multicast.c | 23 +++---
net/ipv4/inet_timewait_sock.c | 2 +
net/ipv4/tcp_input.c | 5 +-
net/ipv4/tcp_output.c | 2 +-
net/ipv6/netfilter/ip6t_LOG.c | 2 +-
net/mac80211/iface.c | 1 +
net/mac80211/mlme.c | 6 ++
net/netfilter/nf_tproxy_core.c | 27 +++---
net/netfilter/xt_TPROXY.c | 22 +++++-
net/netfilter/xt_socket.c | 13 +++-
net/sched/sch_generic.c | 1 +
net/sctp/sm_make_chunk.c | 10 +-
net/wireless/wext-compat.c | 4 +-
31 files changed, 258 insertions(+), 170 deletions(-)
^ permalink raw reply
* Re: [PATCH] e1000: power off PHY after reset when interface is down
From: Jeff Kirsher @ 2011-02-24 0:02 UTC (permalink / raw)
To: prasanna.panchamukhi@riverbed.com
Cc: Allan, Bruce W, Pieper, Jeffrey E,
e1000-devel@lists.sourceforge.net, netdev@vger.kernel.org
In-Reply-To: <1298424313-9840-1-git-send-email-prasanna.panchamukhi@riverbed.com>
[-- Attachment #1: Type: text/plain, Size: 988 bytes --]
On Tue, 2011-02-22 at 17:25 -0800, prasanna.panchamukhi@riverbed.com
wrote:
> From: Prasanna S. Panchamukhi <prasanna.panchamukhi@riverbed.com>
>
> Some Phys supported by the e1000 driver do not remain powered off
> across
> a reset of the device when the interface is down, e.g. on 82546.
> This patch powers down (only when WoL is disabled) the PHY after reset
> if
> the interface is down and ethtool diagnostics are not currently
> running.
>
> Similar problem was see on 82571 controller and was fixed in e1000e
> driver
> by Bruce Allan.
> Please refer commit 31dbe5b4ac6fca72dec946e4d0fa7f0913f1d9b1 for
> details.
>
> Signed-off-by: Prasanna S. Panchamukhi
> <prasanna.panchamukhi@riverbed.com>
> ---
> drivers/net/e1000/e1000_ethtool.c | 27 +++++++++++++++++++--------
> drivers/net/e1000/e1000_main.c | 7 +++++++
> 2 files changed, 26 insertions(+), 8 deletions(-)
Thanks Prasanna! I have added the patch to my queue of e1000 patches.
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 490 bytes --]
^ permalink raw reply
* Re: [PATCH] e1000: fix sparse warning
From: Jeff Kirsher @ 2011-02-24 0:03 UTC (permalink / raw)
To: Stephen Hemminger
Cc: Jesse Brandeburg, e1000-devel@lists.sourceforge.net,
netdev@vger.kernel.org
In-Reply-To: <20110223101203.0894c474@nehalam>
[-- Attachment #1: Type: text/plain, Size: 305 bytes --]
On Wed, 2011-02-23 at 10:12 -0800, Stephen Hemminger wrote:
> Sparse complains because the e1000 driver is calling ioread on a
> pointer
> not tagged as __iomem.
>
> Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Thanks Stephen! I have added this patch to my queue of e1000 patches.
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 490 bytes --]
^ permalink raw reply
* Re: [Bugme-new] [Bug 29562] New: Kernel Panic with b44 eth-module (Kernel 2.6.37) | Dell Vostro 1500
From: Andrew Morton @ 2011-02-24 0:12 UTC (permalink / raw)
To: Gary Zambrano; +Cc: bugzilla-daemon, bugme-daemon, netdev, ck.accounts
In-Reply-To: <bug-29562-10286@https.bugzilla.kernel.org/>
(switched to email. Please respond via emailed reply-to-all, not via the
bugzilla web interface).
On Mon, 21 Feb 2011 09:35:59 GMT
bugzilla-daemon@bugzilla.kernel.org wrote:
> https://bugzilla.kernel.org/show_bug.cgi?id=29562
>
> Summary: Kernel Panic with b44 eth-module (Kernel 2.6.37) |
> Dell Vostro 1500
> Product: Networking
> Version: 2.5
> Kernel Version: 2.6.37.1 (ArchLinux latest)
> Platform: All
> OS/Version: Linux
> Tree: Mainline
> Status: NEW
> Severity: high
> Priority: P1
> Component: Other
> AssignedTo: acme@ghostprotocols.net
> ReportedBy: ck.accounts@gmx.de
> Regression: No
>
>
> Hey,
>
> I have a problem with my network card (b44 driver). It's almost the same
> problem described here:
> https://bugzilla.redhat.com/show_bug.cgi?id=668088
>
> I think it's a common Dell problem. I found several Dell users with the same
> problem. The problem occured first with the kernel update to 2.6.37 (2.6.36.x
> -> 2.6.37)
>
> I have taken a picture of the panic-log:
> http://www.pic-upload.de/view-8728232/DSC00735.jpg.html
>
> The workaround for this issue is to block the module !b44 (-> network card
> doesn't work anymore).
>
> Some additional information:
> Laptop: Dell Vostro 1500
> Distro: ArchLinux x86_64
> Ethernet controler: 03:00.0 Ethernet controller: Broadcom Corporation
> BCM4401-B0 100Base-TX (rev 02)
>
> 1. boot PC without b44
> 2. # modprobe b44
> 3. kernel panic!
>
> I am not sure, whether it is a ArchLinux problem or a general kernel problem?
>
^ permalink raw reply
* [PATCH] ipvs: use enum to instead of magic numbers
From: Changli Gao @ 2011-02-24 0:19 UTC (permalink / raw)
To: Simon Horman
Cc: Wensong Zhang, Julian Anastasov, Patrick McHardy, David S. Miller,
netdev, lvs-devel, netfilter-devel, Changli Gao
Signed-off-by: Changli Gao <xiaosuo@gmail.com>
---
net/netfilter/ipvs/ip_vs_xmit.c | 41 ++++++++++++++++++++++++++--------------
1 file changed, 27 insertions(+), 14 deletions(-)
diff --git a/net/netfilter/ipvs/ip_vs_xmit.c b/net/netfilter/ipvs/ip_vs_xmit.c
index 1f2a4e3..a48239a 100644
--- a/net/netfilter/ipvs/ip_vs_xmit.c
+++ b/net/netfilter/ipvs/ip_vs_xmit.c
@@ -43,6 +43,13 @@
#include <net/ip_vs.h>
+enum {
+ IP_VS_RT_MODE_LOCAL = 1, /* Allow local dest */
+ IP_VS_RT_MODE_NON_LOCAL = 2, /* Allow non-local dest */
+ IP_VS_RT_MODE_RDR = 4, /* Allow redirect from remote daddr to
+ * local
+ */
+};
/*
* Destination cache to speed up outgoing route lookup
@@ -77,11 +84,7 @@ __ip_vs_dst_check(struct ip_vs_dest *dest, u32 rtos)
return dst;
}
-/*
- * Get route to destination or remote server
- * rt_mode: flags, &1=Allow local dest, &2=Allow non-local dest,
- * &4=Allow redirect from remote daddr to local
- */
+/* Get route to destination or remote server */
static struct rtable *
__ip_vs_get_out_rt(struct sk_buff *skb, struct ip_vs_dest *dest,
__be32 daddr, u32 rtos, int rt_mode)
@@ -126,15 +129,16 @@ __ip_vs_get_out_rt(struct sk_buff *skb, struct ip_vs_dest *dest,
}
local = rt->rt_flags & RTCF_LOCAL;
- if (!((local ? 1 : 2) & rt_mode)) {
+ if (!((local ? IP_VS_RT_MODE_LOCAL : IP_VS_RT_MODE_NON_LOCAL) &
+ rt_mode)) {
IP_VS_DBG_RL("Stopping traffic to %s address, dest: %pI4\n",
(rt->rt_flags & RTCF_LOCAL) ?
"local":"non-local", &rt->rt_dst);
ip_rt_put(rt);
return NULL;
}
- if (local && !(rt_mode & 4) && !((ort = skb_rtable(skb)) &&
- ort->rt_flags & RTCF_LOCAL)) {
+ if (local && !(rt_mode & IP_VS_RT_MODE_RDR) &&
+ !((ort = skb_rtable(skb)) && ort->rt_flags & RTCF_LOCAL)) {
IP_VS_DBG_RL("Redirect from non-local address %pI4 to local "
"requires NAT method, dest: %pI4\n",
&ip_hdr(skb)->daddr, &rt->rt_dst);
@@ -383,8 +387,8 @@ ip_vs_bypass_xmit(struct sk_buff *skb, struct ip_vs_conn *cp,
EnterFunction(10);
- if (!(rt = __ip_vs_get_out_rt(skb, NULL, iph->daddr,
- RT_TOS(iph->tos), 2)))
+ if (!(rt = __ip_vs_get_out_rt(skb, NULL, iph->daddr, RT_TOS(iph->tos),
+ IP_VS_RT_MODE_NON_LOCAL)))
goto tx_error_icmp;
/* MTU checking */
@@ -512,7 +516,10 @@ ip_vs_nat_xmit(struct sk_buff *skb, struct ip_vs_conn *cp,
}
if (!(rt = __ip_vs_get_out_rt(skb, cp->dest, cp->daddr.ip,
- RT_TOS(iph->tos), 1|2|4)))
+ RT_TOS(iph->tos),
+ IP_VS_RT_MODE_LOCAL |
+ IP_VS_RT_MODE_NON_LOCAL |
+ IP_VS_RT_MODE_RDR)))
goto tx_error_icmp;
local = rt->rt_flags & RTCF_LOCAL;
/*
@@ -755,7 +762,8 @@ ip_vs_tunnel_xmit(struct sk_buff *skb, struct ip_vs_conn *cp,
EnterFunction(10);
if (!(rt = __ip_vs_get_out_rt(skb, cp->dest, cp->daddr.ip,
- RT_TOS(tos), 1|2)))
+ RT_TOS(tos), IP_VS_RT_MODE_LOCAL |
+ IP_VS_RT_MODE_NON_LOCAL)))
goto tx_error_icmp;
if (rt->rt_flags & RTCF_LOCAL) {
ip_rt_put(rt);
@@ -984,7 +992,9 @@ ip_vs_dr_xmit(struct sk_buff *skb, struct ip_vs_conn *cp,
EnterFunction(10);
if (!(rt = __ip_vs_get_out_rt(skb, cp->dest, cp->daddr.ip,
- RT_TOS(iph->tos), 1|2)))
+ RT_TOS(iph->tos),
+ IP_VS_RT_MODE_LOCAL |
+ IP_VS_RT_MODE_NON_LOCAL)))
goto tx_error_icmp;
if (rt->rt_flags & RTCF_LOCAL) {
ip_rt_put(rt);
@@ -1128,7 +1138,10 @@ ip_vs_icmp_xmit(struct sk_buff *skb, struct ip_vs_conn *cp,
*/
if (!(rt = __ip_vs_get_out_rt(skb, cp->dest, cp->daddr.ip,
- RT_TOS(ip_hdr(skb)->tos), 1|2|4)))
+ RT_TOS(ip_hdr(skb)->tos),
+ IP_VS_RT_MODE_LOCAL |
+ IP_VS_RT_MODE_NON_LOCAL |
+ IP_VS_RT_MODE_RDR)))
goto tx_error_icmp;
local = rt->rt_flags & RTCF_LOCAL;
^ permalink raw reply related
* Re: [Bugme-new] [Bug 29612] New: skge ipv6 doesn't work after boot
From: Andrew Morton @ 2011-02-24 0:21 UTC (permalink / raw)
To: netdev; +Cc: bugzilla-daemon, bugme-daemon, gbillios, Stephen Hemminger
In-Reply-To: <bug-29612-10286@https.bugzilla.kernel.org/>
(switched to email. Please respond via emailed reply-to-all, not via the
bugzilla web interface).
On Mon, 21 Feb 2011 18:42:21 GMT
bugzilla-daemon@bugzilla.kernel.org wrote:
> https://bugzilla.kernel.org/show_bug.cgi?id=29612
>
> Summary: skge ipv6 doesn't work after boot
> Product: Drivers
> Version: 2.5
> Kernel Version: 2.6.38-rc4
> Platform: All
> OS/Version: Linux
> Tree: Mainline
> Status: NEW
> Severity: normal
> Priority: P1
> Component: Network
> AssignedTo: drivers_network@kernel-bugs.osdl.org
> ReportedBy: gbillios@gmail.com
> Regression: No
>
>
> I have noticed that after the initial boot, ipv6 doesn't work until I either
> reconnect to the network with or do an ifdown/up cycle.
>
> The adapter has an ipv6 address, ipv6 routing table seems fine but there is no
> actual connectivity until I do what described above. During my debugging tries
> I noticed that ipv6 starts working also when I start capturing data with
> wireshark. If I enable promiscuous mode it starts working, if I start the
> capture *without* promiscuous mode it does nothing, as if the card needs a
> 'push' to start working.
>
> Here is the relevant skge output from dmesg, kernel version doesn't really
> matter since I have this issue even with earlier kernels.
>
> skge 0000:07:01.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16
> skge: 1.13 addr 0xf7ffc000 irq 16 chip Yukon-Lite rev 9
> skge 0000:07:01.0: eth0: addr 00:22:b0:e7:47:71
> skge 0000:07:01.0: eth0: enabling interface
> skge 0000:07:01.0: eth0: Link is up at 1000 Mbps, full duplex, flow control
> both
> skge 0000:07:01.0: eth0: disabling interface
> skge 0000:07:01.0: eth0: enabling interface
> skge 0000:07:01.0: eth0: Link is up at 1000 Mbps, full duplex, flow control
> both
>
> Just to clarify, the ipv6 network setup is working just fine in general, other
> PCs on the network don't present this issue at all.
^ permalink raw reply
* [PATCH] skge: don't mark carrier down at start
From: Stephen Hemminger @ 2011-02-24 0:44 UTC (permalink / raw)
To: Andrew Morton; +Cc: netdev, bugzilla-daemon, bugme-daemon, gbillios
In-Reply-To: <20110223162156.17ab2bc5.akpm@linux-foundation.org>
The API for network devices has changed so that setting carrier
off at probe is no longer required. This should fix the IPv6 addrconf
issue.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
--- a/drivers/net/skge.c 2011-02-23 16:40:36.351045685 -0800
+++ b/drivers/net/skge.c 2011-02-23 16:40:48.315136410 -0800
@@ -3856,9 +3856,6 @@ static struct net_device *skge_devinit(s
memcpy_fromio(dev->dev_addr, hw->regs + B2_MAC_1 + port*8, ETH_ALEN);
memcpy(dev->perm_addr, dev->dev_addr, dev->addr_len);
- /* device is off until link detection */
- netif_carrier_off(dev);
-
return dev;
}
^ permalink raw reply
* Re: [PATCH] cls_u32: fix sparse warnings
From: jamal @ 2011-02-24 0:47 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: David Miller, netdev
In-Reply-To: <20110223101614.1cdc9d51@nehalam>
On Wed, 2011-02-23 at 10:16 -0800, Stephen Hemminger wrote:
> With current sparse and net-next it comes up clean.
weird. So _data has to be defined on the stack for sparse
to complain?
Another one is act_pedit.c
cheers,
jamal
^ permalink raw reply
* Re: [PATCH] ipvs: use enum to instead of magic numbers
From: Simon Horman @ 2011-02-24 0:47 UTC (permalink / raw)
To: Changli Gao
Cc: Wensong Zhang, Julian Anastasov, Patrick McHardy, David S. Miller,
netdev, lvs-devel, netfilter-devel
In-Reply-To: <1298506797-16124-1-git-send-email-xiaosuo@gmail.com>
On Thu, Feb 24, 2011 at 08:19:57AM +0800, Changli Gao wrote:
> Signed-off-by: Changli Gao <xiaosuo@gmail.com>
Thanks, applied.
^ permalink raw reply
* Re: [PATCH] skge: don't mark carrier down at start
From: Andrew Morton @ 2011-02-24 0:52 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: netdev, bugzilla-daemon, bugme-daemon, gbillios
In-Reply-To: <20110223164449.2a5206b8@nehalam>
On Wed, 23 Feb 2011 16:44:49 -0800
Stephen Hemminger <shemminger@linux-foundation.org> wrote:
> The API for network devices has changed so that setting carrier
> off at probe is no longer required. This should fix the IPv6 addrconf
> issue.
>
> Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
>
>
> --- a/drivers/net/skge.c 2011-02-23 16:40:36.351045685 -0800
> +++ b/drivers/net/skge.c 2011-02-23 16:40:48.315136410 -0800
> @@ -3856,9 +3856,6 @@ static struct net_device *skge_devinit(s
> memcpy_fromio(dev->dev_addr, hw->regs + B2_MAC_1 + port*8, ETH_ALEN);
> memcpy(dev->perm_addr, dev->dev_addr, dev->addr_len);
>
> - /* device is off until link detection */
> - netif_carrier_off(dev);
> -
> return dev;
> }
Thanks, but please don't forget to acknowledge the bug reporter's
efforts.
Also, quoting the bugzilla URL in the changelog helps when people come
along to close off open bug reports.
From: Stephen Hemminger <shemminger@linux-foundation.org>
The API for network devices has changed so that setting carrier off at
probe is no longer required. This should fix the IPv6 addrconf issue.
Addresses https://bugzilla.kernel.org/show_bug.cgi?id=29612
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Reported-by: George Billios <gbillios@gmail.com>
Cc: David Miller <davem@davemloft.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
drivers/net/skge.c | 3 ---
1 file changed, 3 deletions(-)
diff -puN drivers/net/skge.c~skge-dont-mark-carrier-down-at-start drivers/net/skge.c
--- a/drivers/net/skge.c~skge-dont-mark-carrier-down-at-start
+++ a/drivers/net/skge.c
@@ -3856,9 +3856,6 @@ static struct net_device *skge_devinit(s
memcpy_fromio(dev->dev_addr, hw->regs + B2_MAC_1 + port*8, ETH_ALEN);
memcpy(dev->perm_addr, dev->dev_addr, dev->addr_len);
- /* device is off until link detection */
- netif_carrier_off(dev);
-
return dev;
}
_
^ 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