* [PATCH net-next v3 6/6] bonding: use RCU protection for alb xmit path
From: Ding Tianhong @ 2013-09-05 7:49 UTC (permalink / raw)
To: Jay Vosburgh, Andy Gospodarek, David S. Miller,
Nikolay Aleksandrov, Veaceslav Falico, Netdev, Hideaki YOSHIFUJI
The commit 278b20837511776dc9d5f6ee1c7fabd5479838bb
(bonding: initial RCU conversion) has convert the roundrobin, active-backup,
broadcast and xor xmit path to rcu protection, the performance will be better
for these mode, so this time, convert xmit path for alb mode.
Suggested-by: Nikolay Aleksandrov <nikolay@redhat.com>
Signed-off-by: Ding Tianhong <dingtianhong@huawei.com>
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Cc: Nikolay Aleksandrov <nikolay@redhat.com>
Cc: Veaceslav Falico <vfalico@redhat.com>
---
drivers/net/bonding/bond_alb.c | 20 +++++++++-----------
drivers/net/bonding/bonding.h | 2 +-
2 files changed, 10 insertions(+), 12 deletions(-)
diff --git a/drivers/net/bonding/bond_alb.c b/drivers/net/bonding/bond_alb.c
index c75d383..c0bfd56 100644
--- a/drivers/net/bonding/bond_alb.c
+++ b/drivers/net/bonding/bond_alb.c
@@ -229,7 +229,7 @@ static struct slave *tlb_get_least_loaded_slave(struct bonding *bond)
max_gap = LLONG_MIN;
/* Find the slave with the largest gap */
- bond_for_each_slave(bond, slave) {
+ bond_for_each_slave_rcu(bond, slave) {
if (SLAVE_IS_OK(slave)) {
long long gap = compute_gap(slave);
@@ -625,12 +625,14 @@ static struct slave *rlb_choose_channel(struct sk_buff *skb, struct bonding *bon
{
struct alb_bond_info *bond_info = &(BOND_ALB_INFO(bond));
struct arp_pkt *arp = arp_pkt(skb);
- struct slave *assigned_slave;
+ struct slave *assigned_slave, *curr_active_slave;
struct rlb_client_info *client_info;
u32 hash_index = 0;
_lock_rx_hashtbl(bond);
+ curr_active_slave = rcu_dereference(bond->curr_active_slave);
+
hash_index = _simple_hash((u8 *)&arp->ip_dst, sizeof(arp->ip_dst));
client_info = &(bond_info->rx_hashtbl[hash_index]);
@@ -654,9 +656,9 @@ static struct slave *rlb_choose_channel(struct sk_buff *skb, struct bonding *bon
* move the old client to primary (curr_active_slave) so
* that the new client can be assigned to this entry.
*/
- if (bond->curr_active_slave &&
- client_info->slave != bond->curr_active_slave) {
- client_info->slave = bond->curr_active_slave;
+ if (curr_active_slave &&
+ client_info->slave != curr_active_slave) {
+ client_info->slave = curr_active_slave;
rlb_update_client(client_info);
}
}
@@ -1338,8 +1340,6 @@ int bond_alb_xmit(struct sk_buff *skb, struct net_device *bond_dev)
/* make sure that the curr_active_slave do not change during tx
*/
- read_lock(&bond->lock);
- read_lock(&bond->curr_slave_lock);
switch (ntohs(skb->protocol)) {
case ETH_P_IP: {
@@ -1422,12 +1422,12 @@ int bond_alb_xmit(struct sk_buff *skb, struct net_device *bond_dev)
if (!tx_slave) {
/* unbalanced or unassigned, send through primary */
- tx_slave = bond->curr_active_slave;
+ tx_slave = rcu_dereference(bond->curr_active_slave);
bond_info->unbalanced_load += skb->len;
}
if (tx_slave && SLAVE_IS_OK(tx_slave)) {
- if (tx_slave != bond->curr_active_slave) {
+ if (tx_slave != rcu_dereference(bond->curr_active_slave)) {
memcpy(eth_data->h_source,
tx_slave->dev->dev_addr,
ETH_ALEN);
@@ -1442,8 +1442,6 @@ int bond_alb_xmit(struct sk_buff *skb, struct net_device *bond_dev)
}
}
- read_unlock(&bond->curr_slave_lock);
- read_unlock(&bond->lock);
if (res) {
/* no suitable interface, frame not sent */
kfree_skb(skb);
diff --git a/drivers/net/bonding/bonding.h b/drivers/net/bonding/bonding.h
index 80b170a..4282e65 100644
--- a/drivers/net/bonding/bonding.h
+++ b/drivers/net/bonding/bonding.h
@@ -536,7 +536,7 @@ static inline struct slave *bond_slave_has_mac(struct bonding *bond,
{
struct slave *tmp;
- bond_for_each_slave(bond, tmp)
+ bond_for_each_slave_rcu(bond, tmp)
if (ether_addr_equal_64bits(mac, tmp->dev->dev_addr))
return tmp;
--
1.8.2.1
^ permalink raw reply related
* [PATCH net-next v3 5/6] bonding: restructure and add rcu for bond_for_each_slave_next()
From: Ding Tianhong @ 2013-09-05 7:49 UTC (permalink / raw)
To: Jay Vosburgh, Andy Gospodarek, David S. Miller,
Nikolay Aleksandrov, Veaceslav Falico, Netdev
Remove the wordy int and add bond_for_each_slave_next_rcu() for future use.
Suggested-by: Nikolay Aleksandrov <nikolay@redhat.com>
Suggested-by: Veaceslav Falico <vfalico@redhat.com>
Signed-off-by: Ding Tianhong <dingtianhong@huawei.com>
Cc: Nikolay Aleksandrov <nikolay@redhat.com>
Cc: Veaceslav Falico <vfalico@redhat.com>
---
drivers/net/bonding/bond_alb.c | 3 +--
drivers/net/bonding/bond_main.c | 6 ++----
drivers/net/bonding/bonding.h | 23 +++++++++++++++++++----
3 files changed, 22 insertions(+), 10 deletions(-)
diff --git a/drivers/net/bonding/bond_alb.c b/drivers/net/bonding/bond_alb.c
index 91f179d..c75d383 100644
--- a/drivers/net/bonding/bond_alb.c
+++ b/drivers/net/bonding/bond_alb.c
@@ -383,7 +383,6 @@ static struct slave *rlb_next_rx_slave(struct bonding *bond)
{
struct alb_bond_info *bond_info = &(BOND_ALB_INFO(bond));
struct slave *rx_slave, *slave, *start_at;
- int i = 0;
if (bond_info->next_rx_slave)
start_at = bond_info->next_rx_slave;
@@ -392,7 +391,7 @@ static struct slave *rlb_next_rx_slave(struct bonding *bond)
rx_slave = NULL;
- bond_for_each_slave_from(bond, slave, i, start_at) {
+ bond_for_each_slave_from(bond, slave, start_at) {
if (SLAVE_IS_OK(slave)) {
if (!rx_slave) {
rx_slave = slave;
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index 39e5b1c..4190389 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -782,7 +782,6 @@ static struct slave *bond_find_best_slave(struct bonding *bond)
struct slave *new_active, *old_active;
struct slave *bestslave = NULL;
int mintime = bond->params.updelay;
- int i;
new_active = bond->curr_active_slave;
@@ -801,7 +800,7 @@ static struct slave *bond_find_best_slave(struct bonding *bond)
/* remember where to stop iterating over the slaves */
old_active = new_active;
- bond_for_each_slave_from(bond, new_active, i, old_active) {
+ bond_for_each_slave_from(bond, new_active, old_active) {
if (new_active->link == BOND_LINK_UP) {
return new_active;
} else if (new_active->link == BOND_LINK_BACK &&
@@ -2756,7 +2755,6 @@ do_failover:
static void bond_ab_arp_probe(struct bonding *bond)
{
struct slave *slave, *next_slave;
- int i;
read_lock(&bond->curr_slave_lock);
@@ -2788,7 +2786,7 @@ static void bond_ab_arp_probe(struct bonding *bond)
/* search for next candidate */
next_slave = bond_next_slave(bond, bond->current_arp_slave);
- bond_for_each_slave_from(bond, slave, i, next_slave) {
+ bond_for_each_slave_from(bond, slave, next_slave) {
if (IS_UP(slave->dev)) {
slave->link = BOND_LINK_BACK;
bond_set_slave_active_flags(slave);
diff --git a/drivers/net/bonding/bonding.h b/drivers/net/bonding/bonding.h
index f013b12..48fd41a 100644
--- a/drivers/net/bonding/bonding.h
+++ b/drivers/net/bonding/bonding.h
@@ -123,18 +123,33 @@
(bond_is_first_slave(bond, pos) ? bond_last_slave_rcu(bond) : \
bond_to_slave_rcu((pos)->list.prev))
+/* Check whether the slave is the only one in bond */
+
/**
* bond_for_each_slave_from - iterate the slaves list from a starting point
* @bond: the bond holding this list.
* @pos: current slave.
- * @cnt: counter for max number of moves
* @start: starting point.
*
* Caller must hold bond->lock
*/
-#define bond_for_each_slave_from(bond, pos, cnt, start) \
- for (cnt = 0, pos = start; pos && cnt < (bond)->slave_cnt; \
- cnt++, pos = bond_next_slave(bond, pos))
+#define bond_for_each_slave_from(bond, pos, start) \
+ for (pos = start; pos && &pos->list != &bond->slave_list; \
+ (pos = bond_next_slave(bond, pos)) != start ? pos : \
+ (pos = list_entry(&bond->slave_list, typeof(*pos), list)))
+
+/**
+ * bond_for_each_slave_from_rcu - iterate the slaves list from a starting point
+ * @bond: the bond holding this list.
+ * @pos: current slave.
+ * @start: starting point.
+ *
+ * Caller must hold rcu_read_lock
+ */
+#define bond_for_each_slave_from_rcu(bond, pos, start) \
+ for (pos = start; pos && &pos->list != &bond->slave_list; \
+ (pos = bond_next_slave_rcu(bond, pos)) != start ? pos : \
+ (pos = list_entry_rcu(&bond->slave_list, typeof(*pos), list)))
/**
* bond_for_each_slave - iterate over all slaves
--
1.8.2.1
^ permalink raw reply related
* [PATCH net-next v3 4/6] bonding: add rtnl lock for bonding_store_xmit_hash
From: Ding Tianhong @ 2013-09-05 7:48 UTC (permalink / raw)
To: Jay Vosburgh, Andy Gospodarek, David S. Miller,
Nikolay Aleksandrov, Veaceslav Falico, Netdev
the bonding_store_xmit_hash() could update bond's xmit_policy, and
the xmit_policy is used in xmit path for xor mode, maybe it is hard
to occur any problem, but just follow the logic "don't change anything
slave-related without rtnl", so I think the rntl lock is fit here. :)
Signed-off-by: Ding Tianhong <dingtianhong@huawei.com>
Cc: Nikolay Aleksandrov <nikolay@redhat.com>
---
drivers/net/bonding/bond_sysfs.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/net/bonding/bond_sysfs.c b/drivers/net/bonding/bond_sysfs.c
index 0f539de..deb1d8e 100644
--- a/drivers/net/bonding/bond_sysfs.c
+++ b/drivers/net/bonding/bond_sysfs.c
@@ -382,6 +382,9 @@ static ssize_t bonding_store_xmit_hash(struct device *d,
int new_value, ret = count;
struct bonding *bond = to_bond(d);
+ if (!rtnl_trylock())
+ return restart_syscall();
+
new_value = bond_parse_parm(buf, xmit_hashtype_tbl);
if (new_value < 0) {
pr_err("%s: Ignoring invalid xmit hash policy value %.*s.\n",
@@ -396,6 +399,7 @@ static ssize_t bonding_store_xmit_hash(struct device *d,
xmit_hashtype_tbl[new_value].modename, new_value);
}
+ rtnl_unlock();
return ret;
}
static DEVICE_ATTR(xmit_hash_policy, S_IRUGO | S_IWUSR,
--
1.8.2.1
^ permalink raw reply related
* [PATCH net-next v3 0/6] bonding: Patchset for rcu use in bonding
From: Ding Tianhong @ 2013-09-05 7:48 UTC (permalink / raw)
To: Jay Vosburgh, Andy Gospodarek, David S. Miller,
Nikolay Aleksandrov, Veaceslav Falico, Netdev
Hi:
The Patch Set convert the xmit of 3ad and alb mode to use rcu lock.
restructure and add more rcu list function.
add rtnl lock to protect bonding_store_xmit_hash().
remove read lock in bond_3ad_lacpdu_recv().
I test the patch well and no problems found till now.
v1: add 1 patch named remove the no effect lock for bond_3ad_lacpdu_recv().
get the advice from Nikolay Aleksandrov, and modify some mistake in the code.
v2: accept the Nikolay Aleksandrov's advise, modify the patch 05/06.
the new bond_for_each_slave_from will not use bond->slave_cnt and int cnt any more,
it test well.
move the rcu_dereference call of curr_active_slave after the lock avoid
a race condition with the slave removal.
v3: according to the advise of Veaceslav Falico and David S. Miller, modify the patch 01/06 and patch 05/06.
add rcu protect for read bond->slave_list.
simplify the bond_for_each_slave_from() and bond_for_each_slave_from_rcu()
Ding Tianhong (4):
Wang Yufen (1):
Yang Yingliang (1):
bonding: simplify and use RCU protection for 3ad xmit path
bonding: remove the no effect lock for bond_3ad_lacpdu_recv()
bonding: replace read_lock to rcu_read_lock for
bond_3ad_get_active_agg_info()
bonding: add rtnl lock for bonding_store_xmit_hash
bonding: restructure and simplify bond_for_each_slave_next()
bonding: use RCU protection for alb xmit path
drivers/net/bonding/bond_3ad.c | 38 +++++++++++++++--------------------
drivers/net/bonding/bond_alb.c | 23 ++++++++++-----------
drivers/net/bonding/bond_main.c | 6 ++----
drivers/net/bonding/bond_sysfs.c | 4 ++++
drivers/net/bonding/bonding.h | 43 +++++++++++++++++++++++++++++++++++-----
5 files changed, 70 insertions(+), 44 deletions(-)
--
1.8.2.1
^ permalink raw reply
* Re: [PATCH] net: mvneta: properly disable HW PHY polling and ensure adjust_link() works
From: Willy Tarreau @ 2013-09-05 7:44 UTC (permalink / raw)
To: Thomas Petazzoni
Cc: Ethan Tuttle, David S. Miller, netdev, linux-arm-kernel,
Lior Amsalem, Gregory Clement, Ezequiel Garcia, Jochen De Smet,
Peter Sanford, Chény Yves-Gael, Ryan Press, Simon Guinot,
vdonnefort, stable, Jason Cooper
In-Reply-To: <20130905092808.617da416@skate>
Hi Thomas,
On Thu, Sep 05, 2013 at 09:28:08AM +0200, Thomas Petazzoni wrote:
> I indeed submitted a revised/improved version of your patches some time
> ago, but they were rejected. See
> http://lists.infradead.org/pipermail/linux-arm-kernel/2013-June/173201.html.
Thanks for the link, that's indeed what I was referring to. Well, at least
the most boring part that constantly needed to be rebased was the DT patch.
Now it's much easier to keep the small remaining patches in one's local tree.
> Since this has been rejected, the available options are:
>
> (1) Use a DT-capable bootloader that will properly set the MAC
> addresses in the DT. Such DT capable bootloaders will soon be made
> available by Marvell, but I am really unsure Globalscale will
> provide an update for the Mirabox bootloader, rebased on the new
> Marvell bootloader that will be DT capable.
One simpler solution for them could be to slightly modify the boot loader
so that it sets the MAC address on the two ethernet controllers prior to
boot. Then your code which checks if a MAC is already set will simply
work.
> As an alternative, we (mainly Sebastian Hesselbarth and myself)
> have started adding Armada 370/XP support in the Barebox
> bootloader. We can already start Barebox on the Mirabox, but for
> now it's quite useless since only the serial port is supported,
> there is still no support for the network, SD card, USB or NAND.
> This will probably come over time, but it's not going to happen
> overnight.
And we must keep in mind that people are generally scared by boot loader
upgrades, especially when it's for a different one. At least on this
platform now we have a solution to reflash even after complete failures
so this is less of a problem.
> (2) Use the "impedance matcher" code written by Daniel Mack and
> extended by Jason Cooper, available at
> https://github.com/zonque/pxa-impedance-matcher. Essentially, it
> inserts a small binary between the installed bootloader and the
> kernel, that for example allows to choose a particular DTB amongst
> several, depending on the board that is detected. I believe it
> could probably be extended to cover other use cases such as
> modifying the DTB to add the MAC addresses where appropriate. I've
> added Jason Cooper in the Cc list if he wants to comment on that.
Could be a nice solution as well, indeed.
A last one would be to have the mvneta module accept an array of addresses
as a module parameter. This way it would just require a minor change in the
kernel's cmdline to pass the MAC addresses. I remember seeing this in the
past, I don't remember the platform (maybe the NSLU2 but I could be wrong).
Cheers,
Willy
^ permalink raw reply
* Re: [rfc] suspicious indentation in do_tcp_setsockopt
From: Daniel Borkmann @ 2013-09-05 7:42 UTC (permalink / raw)
To: Dave Jones; +Cc: David Miller, netdev
In-Reply-To: <20130905044318.GA22806@redhat.com>
On 09/05/2013 06:43 AM, Dave Jones wrote:
> On Thu, Sep 05, 2013 at 12:39:07AM -0400, David Miller wrote:
> > From: Dave Jones <davej@redhat.com>
> > Date: Thu, 5 Sep 2013 00:20:45 -0400
> >
> > > What's the intent here ?
> >
> > This stuff is great, do you have a script that looks for this false
> > indentation pattern?
>
> Coverity. I'm doing daily builds with it now, in the hope of trying
> to catch things faster, but there's a *ton* of old stuff in there
> like this that needs sorting through, because it seems to have strange
> of notions of what a 'new' bug is.
Right, it seems 'new' is just newly *detected*, not necessarily newly
introduced in recent code.
> Dave
^ permalink raw reply
* Re: [Xen-devel] [PATCH] net/core: Order-3 frag allocator causes SWIOTLB bouncing under Xen
From: Ian Campbell @ 2013-09-05 7:39 UTC (permalink / raw)
To: Konrad Rzeszutek Wilk
Cc: Eric Dumazet, Eliezer Tamir, Neil Horman, netdev, linux-kernel,
xen-devel, Eric Dumazet, Li Zefan, david.vrabel, Zoltan Kiss,
malcolm.crossley, David S. Miller
In-Reply-To: <20130904211110.GA17758@phenom.dumpdata.com>
On Wed, 2013-09-04 at 17:11 -0400, Konrad Rzeszutek Wilk wrote:
> On Wed, Sep 04, 2013 at 02:00:40PM -0700, Eric Dumazet wrote:
> > Maybe you could add proper infrastructure to deal with Xen limitations.
>
> I think Ian posted at some point an sysctl patch for that (more for
> debugging that anything else). And it kind
> of stalled: http://lists.xen.org/archives/html/xen-devel/2012-10/msg01832.html
I think I though you were looking into it from the swiotlb angle?
In any case I don't have time to look into this further.
> Is that what you mean by proper infrastructure ?
>
> Oh wait, did you mean via dev and not the whole system wide sysctl?
The system wide sysctl was not acceptable AFAIR, which seems reasonable.
Per-dev is hard because it affects the native drivers for each physical
NIC when running under Xen, not the Xen PV NIC which we fixed by
splitting compound frags into separate slots on the PV ring.
Ian.
^ permalink raw reply
* Re: [PATCH] xen-netback: count number required slots for an skb more carefully
From: Ian Campbell @ 2013-09-05 7:35 UTC (permalink / raw)
To: David Miller
Cc: david.vrabel, xen-devel, konrad.wilk, boris.ostrovsky, netdev
In-Reply-To: <20130904.144845.418858994067427938.davem@davemloft.net>
On Wed, 2013-09-04 at 14:48 -0400, David Miller wrote:
> Can you guys just post the patch you want applied once this thread
> moves closer to a consensus? Thanks.
Of course.
Ian.
^ permalink raw reply
* Re: linux-next: manual merge of the net-next tree with Linus' tree
From: Daniel Borkmann @ 2013-09-05 7:33 UTC (permalink / raw)
To: Stephen Rothwell; +Cc: David Miller, netdev, linux-next, linux-kernel
In-Reply-To: <20130905151933.10e0558611271fdd2133a790@canb.auug.org.au>
On 09/05/2013 07:19 AM, Stephen Rothwell wrote:
> Hi all,
>
> Today's linux-next merge of the net-next tree got a conflict in
> net/bridge/br_multicast.c between commit 2d98c29b6fb3 ("net: bridge:
> convert MLDv2 Query MRC into msecs_to_jiffies for max_delay") from Linus'
> tree and commit e3f5b17047de ("net: ipv6: mld: get rid of MLDV2_MRC and
> simplify calculation") from the net-next tree.
>
> I just used the net-next tree version and can carry the fix as necessary
> (no action is required).
Sounds good thanks Stephen!
^ permalink raw reply
* Re: [PATCH] net: mvneta: properly disable HW PHY polling and ensure adjust_link() works
From: Thomas Petazzoni @ 2013-09-05 7:28 UTC (permalink / raw)
To: Willy Tarreau
Cc: Ethan Tuttle, David S. Miller, netdev, linux-arm-kernel,
Lior Amsalem, Gregory Clement, Ezequiel Garcia, Jochen De Smet,
Peter Sanford, Chény Yves-Gael, Ryan Press, Simon Guinot,
vdonnefort, stable, Jason Cooper
In-Reply-To: <20130905051223.GB26000@1wt.eu>
Hello,
On Thu, 5 Sep 2013 07:12:23 +0200, Willy Tarreau wrote:
> > This is on 3.11 plus Thomas' patch, which includes the previous fix to
> > "read MAC address from hardware when available". Perhaps that fix
> > isn't working with the phylib?
>
> No this is unrelated. The MAC isn't configured by the boot loader when
> the NIC is not used. U-boot only passes it as a non-standard ATAG. I
> have some patches to reinject the non-standard atags into the device
> tree if you absolutely need this, but they're not suited for mainline
> inclusion from what I understood last time I proposed them (they use
> a marvell-specific atag header).
I indeed submitted a revised/improved version of your patches some time
ago, but they were rejected. See
http://lists.infradead.org/pipermail/linux-arm-kernel/2013-June/173201.html.
Since this has been rejected, the available options are:
(1) Use a DT-capable bootloader that will properly set the MAC
addresses in the DT. Such DT capable bootloaders will soon be made
available by Marvell, but I am really unsure Globalscale will
provide an update for the Mirabox bootloader, rebased on the new
Marvell bootloader that will be DT capable.
As an alternative, we (mainly Sebastian Hesselbarth and myself)
have started adding Armada 370/XP support in the Barebox
bootloader. We can already start Barebox on the Mirabox, but for
now it's quite useless since only the serial port is supported,
there is still no support for the network, SD card, USB or NAND.
This will probably come over time, but it's not going to happen
overnight.
(2) Use the "impedance matcher" code written by Daniel Mack and
extended by Jason Cooper, available at
https://github.com/zonque/pxa-impedance-matcher. Essentially, it
inserts a small binary between the installed bootloader and the
kernel, that for example allows to choose a particular DTB amongst
several, depending on the board that is detected. I believe it
could probably be extended to cover other use cases such as
modifying the DTB to add the MAC addresses where appropriate. I've
added Jason Cooper in the Cc list if he wants to comment on that.
(3) Continue to manually apply the patches from Willy that add support
for the Marvell-specific ATAGs.
Best regards,
Thomas
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
^ permalink raw reply
* Re: [PATCH] net: mvneta: properly disable HW PHY polling and ensure adjust_link() works
From: Ethan Tuttle @ 2013-09-05 6:52 UTC (permalink / raw)
To: Willy Tarreau
Cc: Chény Yves-Gael, Thomas Petazzoni, David S. Miller, netdev,
linux-arm-kernel, Lior Amsalem, Gregory Clement, Ezequiel Garcia,
Jochen De Smet, Peter Sanford, Ryan Press, Simon Guinot,
vdonnefort, stable
In-Reply-To: <20130905064036.GC26000@1wt.eu>
Works like a charm! Thanks for sharing these.
It may be a while until an alternative to Marvell's uboot is available
for the Mirabox, so it's a shame these patches won't be making it into
the mainline kernel.
Regards,
Ethan
On Wed, Sep 4, 2013 at 11:40 PM, Willy Tarreau <w@1wt.eu> wrote:
> On Thu, Sep 05, 2013 at 08:23:12AM +0200, yves@cheny.fr wrote:
>> Hi Willy,
>> i would be interested too !
>>
>> thx
>> Yves
>>
>> Le 2013-09-05 07:22, Ethan Tuttle a écrit :
>> >Understood. Ultimately, I'll use this board as a router, and stable
>> >mac addresses would be better than random. So I would be interested
>> >to try your atag -> device tree patches. Have they been posted
>> >somewhere I can find them?
>
> OK guys, here they come. Note that they're now simplified since the
> eth* aliases have been added to the dts.
>
> Willy
>
^ permalink raw reply
* [PATCH 2/2] ipv4 igmp: use del_timer_sync instead of del_timer in ip_mc_down
From: Salam Noureddine @ 2013-09-05 6:43 UTC (permalink / raw)
To: Salam Noureddine, David S. Miller, Alexey Kuznetsov, James Morris,
Hideaki YOSHIFUJI, Patrick McHardy, netdev
Delete timers using del_timer_sync in ip_mc_down. Otherwise, it is
possible for the timer to be the last to release its reference to the
in_device and since __in_dev_put doesn't destroy the in_device we
would end up leaking a reference to the net_device and see messages
like the following,
unregister_netdevice: waiting for eth0 to become free. Usage count = 1
Tested on linux-3.4.43.
Signed-off-by: Salam Noureddine <noureddine@aristanetworks.com>
---
net/ipv4/igmp.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/ipv4/igmp.c b/net/ipv4/igmp.c
index cd71190..f8c3bbb 100644
--- a/net/ipv4/igmp.c
+++ b/net/ipv4/igmp.c
@@ -1420,10 +1420,10 @@ void ip_mc_down(struct in_device *in_dev)
#ifdef CONFIG_IP_MULTICAST
in_dev->mr_ifc_count = 0;
- if (del_timer(&in_dev->mr_ifc_timer))
+ if (del_timer_sync(&in_dev->mr_ifc_timer))
__in_dev_put(in_dev);
in_dev->mr_gq_running = 0;
- if (del_timer(&in_dev->mr_gq_timer))
+ if (del_timer_sync(&in_dev->mr_gq_timer))
__in_dev_put(in_dev);
igmpv3_clear_delrec(in_dev);
#endif
--
1.7.4.4
^ permalink raw reply related
* [PATCH 1/2] ipv6 mcast: use del_timer_sync instead of del_timer in ipv6_mc_down
From: Salam Noureddine @ 2013-09-05 6:42 UTC (permalink / raw)
To: Salam Noureddine, David S. Miller, Alexey Kuznetsov, James Morris,
Hideaki YOSHIFUJI, Patrick McHardy, netdev
Delete timers using del_timer_sync in ipv6_mc_down. Otherwise, it is
possible for the timer to be the last to release its reference to the
inet6_dev and since __in6_dev_put doesn't destroy the inet6_dev we
would end up leaking a reference to the net_device and see messages
like the following,
unregister_netdevice: waiting for eth0 to become free. Usage count = 1
Tested on linux-3.4.43.
Signed-off-by: Salam Noureddine <noureddine@aristanetworks.com>
---
net/ipv6/mcast.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/net/ipv6/mcast.c b/net/ipv6/mcast.c
index 99cd65c..5c8d49d 100644
--- a/net/ipv6/mcast.c
+++ b/net/ipv6/mcast.c
@@ -2277,12 +2277,12 @@ void ipv6_mc_down(struct inet6_dev *idev)
read_lock_bh(&idev->lock);
idev->mc_ifc_count = 0;
- if (del_timer(&idev->mc_ifc_timer))
+ if (del_timer_sync(&idev->mc_ifc_timer))
__in6_dev_put(idev);
idev->mc_gq_running = 0;
- if (del_timer(&idev->mc_gq_timer))
+ if (del_timer_sync(&idev->mc_gq_timer))
__in6_dev_put(idev);
- if (del_timer(&idev->mc_dad_timer))
+ if (del_timer_sync(&idev->mc_dad_timer))
__in6_dev_put(idev);
for (i = idev->mc_list; i; i=i->next)
--
1.7.4.4
^ permalink raw reply related
* Re: [PATCH] net: mvneta: properly disable HW PHY polling and ensure adjust_link() works
From: Willy Tarreau @ 2013-09-05 6:40 UTC (permalink / raw)
To: yves
Cc: Thomas Petazzoni, Lior Amsalem, Jochen De Smet, Simon Guinot,
Ryan Press, netdev, vdonnefort, Ethan Tuttle, stable,
Ezequiel Garcia, Gregory Clement, Peter Sanford, David S. Miller,
linux-arm-kernel
In-Reply-To: <ca521df880b08225cb34214e3ef0fc2c@cheny.fr>
[-- Attachment #1: Type: text/plain, Size: 529 bytes --]
On Thu, Sep 05, 2013 at 08:23:12AM +0200, yves@cheny.fr wrote:
> Hi Willy,
> i would be interested too !
>
> thx
> Yves
>
> Le 2013-09-05 07:22, Ethan Tuttle a écrit :
> >Understood. Ultimately, I'll use this board as a router, and stable
> >mac addresses would be better than random. So I would be interested
> >to try your atag -> device tree patches. Have they been posted
> >somewhere I can find them?
OK guys, here they come. Note that they're now simplified since the
eth* aliases have been added to the dts.
Willy
[-- Attachment #2: 0001-ARM-atags-add-support-for-Marvell-s-u-boot.patch --]
[-- Type: text/plain, Size: 1213 bytes --]
>From d8254ce7d6b199eb0114ee1229a066bd24d7f339 Mon Sep 17 00:00:00 2001
From: Willy Tarreau <w@1wt.eu>
Date: Sun, 2 Dec 2012 19:59:28 +0100
Subject: ARM: atags: add support for Marvell's u-boot
Marvell uses a specific atag in its u-boot which includes among other
information the MAC addresses for up to 4 network interfaces.
Signed-off-by: Willy Tarreau <w@1wt.eu>
---
arch/arm/include/uapi/asm/setup.h | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/arch/arm/include/uapi/asm/setup.h b/arch/arm/include/uapi/asm/setup.h
index 979ff40..d1d0c19 100644
--- a/arch/arm/include/uapi/asm/setup.h
+++ b/arch/arm/include/uapi/asm/setup.h
@@ -143,6 +143,18 @@ struct tag_memclk {
__u32 fmemclk;
};
+/* Marvell uboot parameters */
+#define ATAG_MV_UBOOT 0x41000403
+struct tag_mv_uboot {
+ __u32 uboot_version;
+ __u32 tclk;
+ __u32 sysclk;
+ __u32 isUsbHost;
+ __u8 macAddr[4][6];
+ __u16 mtu[4];
+ __u32 nand_ecc;
+};
+
struct tag {
struct tag_header hdr;
union {
@@ -165,6 +177,11 @@ struct tag {
* DC21285 specific
*/
struct tag_memclk memclk;
+
+ /*
+ * Marvell specific
+ */
+ struct tag_mv_uboot mv_uboot;
} u;
};
--
1.7.12.2.21.g234cd45.dirty
[-- Attachment #3: 0002-ARM-atags-fdt-retrieve-MAC-addresses-from-Marvell-bo.patch --]
[-- Type: text/plain, Size: 1736 bytes --]
>From f2242fcc35ea1548bab13095a8d82dbf526ba9f7 Mon Sep 17 00:00:00 2001
From: Willy Tarreau <w@1wt.eu>
Date: Sun, 2 Dec 2012 19:56:58 +0100
Subject: ARM: atags/fdt: retrieve MAC addresses from Marvell boot loader
The atags are parsed and if a Marvell atag is found, up to 4 MAC
addresses are extracted there and assigned to node aliases eth0..3
with the name "mac-address".
This was tested on my Mirabox and the two NICs had their correct
address set.
Signed-off-by: Willy Tarreau <w@1wt.eu>
---
arch/arm/boot/compressed/atags_to_fdt.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/arch/arm/boot/compressed/atags_to_fdt.c b/arch/arm/boot/compressed/atags_to_fdt.c
index d1153c8..24b31ae 100644
--- a/arch/arm/boot/compressed/atags_to_fdt.c
+++ b/arch/arm/boot/compressed/atags_to_fdt.c
@@ -16,7 +16,7 @@ static int node_offset(void *fdt, const char *node_path)
}
static int setprop(void *fdt, const char *node_path, const char *property,
- uint32_t *val_array, int size)
+ void *val_array, int size)
{
int offset = node_offset(fdt, node_path);
if (offset < 0)
@@ -177,6 +177,12 @@ int atags_to_fdt(void *atag_list, void *fdt, int total_space)
initrd_start);
setprop_cell(fdt, "/chosen", "linux,initrd-end",
initrd_start + initrd_size);
+ } else if (atag->hdr.tag == ATAG_MV_UBOOT) {
+ /* This ATAG provides up to 4 MAC addresses */
+ setprop(fdt, "eth0", "mac-address", atag->u.mv_uboot.macAddr[0], 6);
+ setprop(fdt, "eth1", "mac-address", atag->u.mv_uboot.macAddr[1], 6);
+ setprop(fdt, "eth2", "mac-address", atag->u.mv_uboot.macAddr[2], 6);
+ setprop(fdt, "eth3", "mac-address", atag->u.mv_uboot.macAddr[3], 6);
}
}
--
1.7.12.2.21.g234cd45.dirty
[-- Attachment #4: Type: text/plain, Size: 176 bytes --]
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related
* Re: [PATCH] net: mvneta: properly disable HW PHY polling and ensure adjust_link() works
From: yves @ 2013-09-05 6:23 UTC (permalink / raw)
To: Ethan Tuttle
Cc: Willy Tarreau, Thomas Petazzoni, David S. Miller, netdev,
linux-arm-kernel, Lior Amsalem, Gregory Clement, Ezequiel Garcia,
Jochen De Smet, Peter Sanford, Ryan Press, Simon Guinot,
vdonnefort, stable
In-Reply-To: <CACzLR4uCQhGzgABV2nMG45EQBNsrW8=j5X7x-=eTSUmSvthLxg@mail.gmail.com>
Hi Willy,
i would be interested too !
thx
Yves
Le 2013-09-05 07:22, Ethan Tuttle a écrit :
> Understood. Ultimately, I'll use this board as a router, and stable
> mac addresses would be better than random. So I would be interested
> to try your atag -> device tree patches. Have they been posted
> somewhere I can find them?
>
> Thanks Willy.
>
> Ethan
>
> On Wed, Sep 4, 2013 at 10:12 PM, Willy Tarreau <w@1wt.eu> wrote:
>> Hi,
>>
>> On Wed, Sep 04, 2013 at 09:14:23PM -0700, Ethan Tuttle wrote:
>>> Just booted with the patch on my Mirabox. Both interfaces work!
>>> Thank you Thomas.
>>>
>>> One remaining issue is that the interface which uBoot didn't
>>> configure
>>> is still getting a random mac address:
>>>
>>> mvneta d0070000.ethernet eth0: Using hardware mac address
>>> f0:ad:4e:01:dc:97
>>> mvneta d0074000.ethernet eth1: Using random mac address
>>> d2:35:dd:c8:99:48
>>>
>>> This is on 3.11 plus Thomas' patch, which includes the previous fix
>>> to
>>> "read MAC address from hardware when available". Perhaps that fix
>>> isn't working with the phylib?
>>
>> No this is unrelated. The MAC isn't configured by the boot loader when
>> the NIC is not used. U-boot only passes it as a non-standard ATAG. I
>> have some patches to reinject the non-standard atags into the device
>> tree if you absolutely need this, but they're not suited for mainline
>> inclusion from what I understood last time I proposed them (they use
>> a marvell-specific atag header).
>>
>> Regards,
>> Willy
>>
^ permalink raw reply
* Re: [ovs-dev] [PATCH v2.38 0/6] MPLS actions and matches
From: Simon Horman @ 2013-09-05 5:31 UTC (permalink / raw)
To: Jesse Gross; +Cc: dev, netdev, Isaku Yamahata, Ravi K
In-Reply-To: <20130828071432.GA15577@verge.net.au>
On Wed, Aug 28, 2013 at 04:14:32PM +0900, Simon Horman wrote:
> On Fri, Aug 23, 2013 at 01:16:50PM +1000, Simon Horman wrote:
> > Hi,
> >
> > This series implements MPLS actions and matches based on work by
> > Ravi K, Leo Alterman, Yamahata-san and Joe Stringer.
> >
> > This series provides two changes
> >
> > * Provide user-space support for the VLAN/MPLS tag insertion order
> > up to and including OpenFlow 1.2, and the different ordering
> > specified from OpenFlow 1.3. In a nutshell the datapath always
> > uses the OpenFlow 1.3 ordering, which is to always insert tags
> > immediately after the L2 header, regardless of the presence of other
> > tags. And ovs-vswtichd provides compatibility for the behaviour up
> > to OpenFlow 1.2, which is that MPLS tags should follow VLAN tags
> > if present.
> >
> > * Adding basic MPLS action and match support to the kernel datapath
>
> Hi Jesse,
>
> I'm wondering if you could find some time to look over this series.
> I believe it addresses all the issues you raised with regards to v2.35.
Hi Jesse,
I have checked and I believe this series still applies against the
current master branch. I'm wondering of you could find some time to
review it.
>
> > Differences between v2.38 and v2.37:
> >
> > * Rebase for SCTP support
> > * Refactor validate_tp_port() to iterate over eth_types rather
> > than open-coding the loop. With the addition of SCTP this logic
> > is now used three times.
> >
> >
> > Differences between v2.37 and v2.36:
> >
> > * Rebase
> >
> >
> > Differences between v2.36 and v2.35:
> >
> > * Rebase
> >
> > * Do not add set_ethertype() to datapath/actions.c.
> > As this patch has evolved this function had devolved into
> > to sets of functionality wrapped into a single function with
> > only one line of common code. Refactor things to simply
> > open-code setting the ether type in the two locations where
> > set_ethertype() was previously used. The aim here is to improve
> > readability.
> >
> > * Update setting skb->ethertype after mpls push and pop.
> > - In the case of push_mpls it should be set unconditionally
> > as in v2.35 the behaviour of this function to always push
> > an MPLS LSE before any VLAN tags.
> > - In the case of mpls_pop eth_p_mpls(skb->protocol) is a better
> > test than skb->protocol != htons(ETH_P_8021Q) as it will give the
> > correct behaviour in the presence of other VLAN ethernet types,
> > for example 0x88a8 which is used by 802.1ad. Moreover, it seems
> > correct to update the ethernet type if it was previously set
> > according to the top-most MPLS LSE.
> >
> > * Deaccelerate VLANs when pushing MPLS tags the
> > - Since v2.35 MPLS push will insert an MPLS LSE before any VLAN tags.
> > This means that if an accelerated tag is present it should be
> > deaccelerated to ensure it ends up in the correct position.
> >
> > * Update skb->mac_len in push_mpls() so that it will be correct
> > when used by a subsequent call to pop_mpls().
> >
> > As things stand I do not believe this is strictly necessary as
> > ovs-vswitchd will not send a pop MPLS action after a push MPLS action.
> > However, I have added this in order to code more defensively as I believe
> > that if such a sequence did occur it would be rather unobvious why
> > it didn't work.
> >
> > * Do not add skb_cow_head() call in push_mpls().
> > It is unnecessary as there is a make_writable() call.
> > This change was also made in v2.30 but some how the
> > code regressed between then and v2.35.
> >
> >
> > Differences between v2.35 and v2.34:
> >
> > * Add support for the tag ordering specified up until OpenFlow 1.2 and
> > the ordering specified from OpenFlow 1.3.
> >
> > * Correct error in datapath patch's handling of GSO in the presence
> > of MPLS and absence of VLANs.
> >
> >
> > Patch overview:
> >
> > * The first 5 patches of this series are new,
> > adding support for different tag ordering.
> > * The last patch is a revised version of the patch to add MPLS support
> > to the datapath. It has been updated to use OpenFlow 1.3 tag ordering
> > and resolve a GSO handling bug: both mentioned above. Its change log
> > includes a history of changes.
> >
> >
> > To aid review this series is available in git at:
> >
> > git://github.com/horms/openvswitch.git devel/mpls-v2.38
> >
> >
> > Patch list and overall diffstat:
> >
> > Joe Stringer (5):
> > odp: Only pass vlan_tci to commit_vlan_action()
> > odp: Allow VLAN actions after MPLS actions
> > ofp-actions: Add OFPUTIL_OFPAT13_PUSH_MPLS
> > ofp-actions: Add separate OpenFlow 1.3 action parser
> > lib: Push MPLS tags in the OpenFlow 1.3 ordering
> >
> > Simon Horman (1):
> > datapath: Add basic MPLS support to kernel
> >
> > datapath/Modules.mk | 1 +
> > datapath/actions.c | 121 +++++-
> > datapath/datapath.c | 259 +++++++++++--
> > datapath/datapath.h | 9 +
> > datapath/flow.c | 58 ++-
> > datapath/flow.h | 17 +-
> > datapath/linux/compat/gso.c | 50 ++-
> > datapath/linux/compat/gso.h | 39 ++
> > datapath/linux/compat/include/linux/netdevice.h | 12 -
> > datapath/linux/compat/netdevice.c | 28 --
> > datapath/mpls.h | 15 +
> > datapath/vport-lisp.c | 1 +
> > datapath/vport-netdev.c | 44 ++-
> > include/linux/openvswitch.h | 7 +-
> > lib/flow.c | 2 +-
> > lib/odp-util.c | 22 +-
> > lib/odp-util.h | 4 +-
> > lib/ofp-actions.c | 68 +++-
> > lib/ofp-parse.c | 1 +
> > lib/ofp-util.c | 3 +
> > lib/ofp-util.h | 1 +
> > lib/packets.c | 10 +-
> > lib/packets.h | 2 +-
> > ofproto/ofproto-dpif-xlate.c | 103 ++++--
> > ofproto/ofproto-dpif-xlate.h | 5 +
> > tests/ofproto-dpif.at | 446 +++++++++++++++++++++++
> > 26 files changed, 1198 insertions(+), 130 deletions(-)
> > create mode 100644 datapath/mpls.h
> >
> > --
> > 1.7.10.4
> >
> > _______________________________________________
> > dev mailing list
> > dev@openvswitch.org
> > http://openvswitch.org/mailman/listinfo/dev
> >
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply
* linux-next: manual merge of the net-next tree with Linus' tree
From: Stephen Rothwell @ 2013-09-05 5:23 UTC (permalink / raw)
To: David Miller, netdev
Cc: linux-next, linux-kernel, Hannes Frederic Sowa, Nicolas Dichtel
[-- Attachment #1: Type: text/plain, Size: 1144 bytes --]
Hi all,
Today's linux-next merge of the net-next tree got a conflict in
net/ipv6/sit.c between commit 3d483058c8c8 ("ipv6: wire up
skb->encapsulation") from Linus' tree and commit 8b7ed2d91d6a
("iptunnels: remove net arg from iptunnel_xmit()") from the net-next tree.
I fixed it up (see below) and can carry the fix as necessary (no action
is required).
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
diff --cc net/ipv6/sit.c
index 21b25dd,19abcc9..0000000
--- a/net/ipv6/sit.c
+++ b/net/ipv6/sit.c
@@@ -886,13 -881,8 +879,13 @@@ static netdev_tx_t ipip6_tunnel_xmit(st
ttl = iph6->hop_limit;
tos = INET_ECN_encapsulate(tos, ipv6_get_dsfield(iph6));
+ if (likely(!skb->encapsulation)) {
+ skb_reset_inner_headers(skb);
+ skb->encapsulation = 1;
+ }
+
- err = iptunnel_xmit(dev_net(dev), rt, skb, fl4.saddr, fl4.daddr,
- IPPROTO_IPV6, tos, ttl, df);
+ err = iptunnel_xmit(rt, skb, fl4.saddr, fl4.daddr, IPPROTO_IPV6, tos,
+ ttl, df, !net_eq(tunnel->net, dev_net(dev)));
iptunnel_xmit_stats(err, &dev->stats, dev->tstats);
return NETDEV_TX_OK;
[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply
* Re: [PATCH] net: mvneta: properly disable HW PHY polling and ensure adjust_link() works
From: Ethan Tuttle @ 2013-09-05 5:22 UTC (permalink / raw)
To: Willy Tarreau
Cc: Thomas Petazzoni, David S. Miller, netdev, linux-arm-kernel,
Lior Amsalem, Gregory Clement, Ezequiel Garcia, Jochen De Smet,
Peter Sanford, Chény Yves-Gael, Ryan Press, Simon Guinot,
vdonnefort, stable
In-Reply-To: <20130905051223.GB26000@1wt.eu>
Understood. Ultimately, I'll use this board as a router, and stable
mac addresses would be better than random. So I would be interested
to try your atag -> device tree patches. Have they been posted
somewhere I can find them?
Thanks Willy.
Ethan
On Wed, Sep 4, 2013 at 10:12 PM, Willy Tarreau <w@1wt.eu> wrote:
> Hi,
>
> On Wed, Sep 04, 2013 at 09:14:23PM -0700, Ethan Tuttle wrote:
>> Just booted with the patch on my Mirabox. Both interfaces work!
>> Thank you Thomas.
>>
>> One remaining issue is that the interface which uBoot didn't configure
>> is still getting a random mac address:
>>
>> mvneta d0070000.ethernet eth0: Using hardware mac address f0:ad:4e:01:dc:97
>> mvneta d0074000.ethernet eth1: Using random mac address d2:35:dd:c8:99:48
>>
>> This is on 3.11 plus Thomas' patch, which includes the previous fix to
>> "read MAC address from hardware when available". Perhaps that fix
>> isn't working with the phylib?
>
> No this is unrelated. The MAC isn't configured by the boot loader when
> the NIC is not used. U-boot only passes it as a non-standard ATAG. I
> have some patches to reinject the non-standard atags into the device
> tree if you absolutely need this, but they're not suited for mainline
> inclusion from what I understood last time I proposed them (they use
> a marvell-specific atag header).
>
> Regards,
> Willy
>
^ permalink raw reply
* linux-next: manual merge of the net-next tree with Linus' tree
From: Stephen Rothwell @ 2013-09-05 5:19 UTC (permalink / raw)
To: David Miller, netdev; +Cc: linux-next, linux-kernel, Daniel Borkmann
[-- Attachment #1: Type: text/plain, Size: 555 bytes --]
Hi all,
Today's linux-next merge of the net-next tree got a conflict in
net/bridge/br_multicast.c between commit 2d98c29b6fb3 ("net: bridge:
convert MLDv2 Query MRC into msecs_to_jiffies for max_delay") from Linus'
tree and commit e3f5b17047de ("net: ipv6: mld: get rid of MLDV2_MRC and
simplify calculation") from the net-next tree.
I just used the net-next tree version and can carry the fix as necessary
(no action is required).
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply
* Re: [PATCH v2 net-next] pkt_sched: fq: Fair Queue packet scheduler
From: Jason Wang @ 2013-09-05 5:16 UTC (permalink / raw)
To: Eric Dumazet
Cc: David Miller, netdev, Yuchung Cheng, Neal Cardwell,
Michael S. Tsirkin
In-Reply-To: <1378352479.11205.5.camel@edumazet-glaptop>
On 09/05/2013 11:41 AM, Eric Dumazet wrote:
> On Thu, 2013-09-05 at 11:07 +0800, Jason Wang wrote:
>
>> > tc -s -d qdisc
>> > qdisc fq 8001: dev eth0 root refcnt 2 [Unknown qdisc, optlen=64]
>> > Sent 6680760347 bytes 4431855 pkt (dropped 0, overlimits 0 requeues 0)
>> > backlog 0b 0p requeues 0
>> >
>> > btw, is the fq support for tc merged into iproute2? Looks like I can't
>> > find them.
> Yep its there on net-next-3.11 branch
Thanks. With the tc in this branch, after test I get:
./tc -s -d qdisc
qdisc fq 8001: dev eth0 root refcnt 2 limit 10000p flow_limit 100p
buckets 1024 quantum 3028 initial_quantum 15140
Sent 3545374119 bytes 2341785 pkt (dropped 0, overlimits 0 requeues 0)
backlog 0b 0p requeues 0
5 flows (0 inactive, 0 throttled)
0 gc, 37 highprio, 51805 throttled
^ permalink raw reply
* Re: [PATCH] net: mvneta: properly disable HW PHY polling and ensure adjust_link() works
From: Willy Tarreau @ 2013-09-05 5:12 UTC (permalink / raw)
To: Ethan Tuttle
Cc: Thomas Petazzoni, Lior Amsalem, Jochen De Smet, Simon Guinot,
Ryan Press, netdev, vdonnefort, stable, Ezequiel Garcia,
Chény Yves-Gael, Gregory Clement, Peter Sanford,
David S. Miller, linux-arm-kernel
In-Reply-To: <CACzLR4uDQK2bkcEJQXLe805EfSA8=eF+YH-FTYovHA0q+8Y9NA@mail.gmail.com>
Hi,
On Wed, Sep 04, 2013 at 09:14:23PM -0700, Ethan Tuttle wrote:
> Just booted with the patch on my Mirabox. Both interfaces work!
> Thank you Thomas.
>
> One remaining issue is that the interface which uBoot didn't configure
> is still getting a random mac address:
>
> mvneta d0070000.ethernet eth0: Using hardware mac address f0:ad:4e:01:dc:97
> mvneta d0074000.ethernet eth1: Using random mac address d2:35:dd:c8:99:48
>
> This is on 3.11 plus Thomas' patch, which includes the previous fix to
> "read MAC address from hardware when available". Perhaps that fix
> isn't working with the phylib?
No this is unrelated. The MAC isn't configured by the boot loader when
the NIC is not used. U-boot only passes it as a non-standard ATAG. I
have some patches to reinject the non-standard atags into the device
tree if you absolutely need this, but they're not suited for mainline
inclusion from what I understood last time I proposed them (they use
a marvell-specific atag header).
Regards,
Willy
^ permalink raw reply
* Re: [E1000-devel] [net-next v4 7/8] i40e: sysfs and debugfs interfaces
From: Stephen Hemminger @ 2013-09-05 4:55 UTC (permalink / raw)
To: Nelson, Shannon
Cc: Kirsher, Jeffrey T, e1000-devel@lists.sourceforge.net,
netdev@vger.kernel.org, Brandeburg, Jesse, gospo@redhat.com,
davem@davemloft.net, sassmann@redhat.com
In-Reply-To: <FC41C24E35F18A40888AACA1A36F3E416C61CF23@FMSMSX102.amr.corp.intel.com>
I am very busy with work and personal issues. Don't depend on my time.
More surprising is that others did not see the same things.
Your business is your problem.
On Wed, Sep 4, 2013 at 6:25 PM, Nelson, Shannon
<shannon.nelson@intel.com> wrote:
>> -----Original Message-----
>> From: Stephen Hemminger [mailto:stephen@networkplumber.org]
>> Sent: Wednesday, September 04, 2013 5:38 PM
>>
>
> [ ... many good comments on i40e_sysfs.c ... ]
>
> Hi Stephen,
>
> Thanks for your comments. Frankly, we were hoping for this kind of feedback when we posted the first version of this driver a couple of months ago, with the intent of clearing up any issues in time to get settled and accepted about now. Yes, this is driven by business reasons that this list doesn't need to hear me whine about, but that is our reality.
>
> We'll be happy to work with you on- or off-list over the next few days to come up with a good resolution to your concerns, and from that we can publish follow-on patches to this current submission. We should be able to get it settled and done quickly and without too much fuss. I won't be at Plumber's this year, but perhaps Jesse or John can get together with you and other concerned sysfs folks if needed to finalize any issues.
>
> Will this work for you?
>
> Thanks,
> sln
>
^ permalink raw reply
* Re: [rfc] suspicious indentation in do_tcp_setsockopt
From: Joe Perches @ 2013-09-05 4:53 UTC (permalink / raw)
To: Dave Jones; +Cc: David Miller, netdev, Julia Lawall
In-Reply-To: <20130905044318.GA22806@redhat.com>
On Thu, 2013-09-05 at 00:43 -0400, Dave Jones wrote:
> On Thu, Sep 05, 2013 at 12:39:07AM -0400, David Miller wrote:
> > From: Dave Jones <davej@redhat.com>
> > Date: Thu, 5 Sep 2013 00:20:45 -0400
> >
> > > What's the intent here ?
> >
> > This stuff is great, do you have a script that looks for this false
> > indentation pattern?
>
> Coverity.
Good stuff.
> I'm doing daily builds with it now, in the hope of trying
> to catch things faster, but there's a *ton* of old stuff in there
> like this that needs sorting through, because it seems to have strange
> of notions of what a 'new' bug is.
I think scripts/coccinelle/misc/ifcol.cocci
does something similar.
^ permalink raw reply
* Re: [rfc] suspicious indentation in do_tcp_setsockopt
From: Dave Jones @ 2013-09-05 4:43 UTC (permalink / raw)
To: David Miller; +Cc: netdev
In-Reply-To: <20130905.003907.664285605568829856.davem@davemloft.net>
On Thu, Sep 05, 2013 at 12:39:07AM -0400, David Miller wrote:
> From: Dave Jones <davej@redhat.com>
> Date: Thu, 5 Sep 2013 00:20:45 -0400
>
> > What's the intent here ?
>
> This stuff is great, do you have a script that looks for this false
> indentation pattern?
Coverity. I'm doing daily builds with it now, in the hope of trying
to catch things faster, but there's a *ton* of old stuff in there
like this that needs sorting through, because it seems to have strange
of notions of what a 'new' bug is.
Dave
^ permalink raw reply
* Re: [rfc] suspicious indentation in do_tcp_setsockopt
From: Joe Perches @ 2013-09-05 4:43 UTC (permalink / raw)
To: Dave Jones, Yuchung Cheng; +Cc: netdev, Neal Cardwell
In-Reply-To: <20130905042045.GD15824@redhat.com>
(Adding Yuchung Cheng and Neal Cardwell as the
author and acker of the patch)
On Thu, 2013-09-05 at 00:20 -0400, Dave Jones wrote:
> What's the intent here ?
>
> This ?
I think the first is most likely.
>
> diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
> index b2f6c74..95544e4 100644
> --- a/net/ipv4/tcp.c
> +++ b/net/ipv4/tcp.c
> @@ -2454,10 +2454,11 @@ static int do_tcp_setsockopt(struct sock *sk, int level,
> case TCP_THIN_DUPACK:
> if (val < 0 || val > 1)
> err = -EINVAL;
> - else
> + else {
> tp->thin_dupack = val;
> if (tp->thin_dupack)
> tcp_disable_early_retrans(tp);
> + }
> break;
>
> case TCP_REPAIR:
>
> Or this ...
>
> diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
> index b2f6c74..187c5a4 100644
> --- a/net/ipv4/tcp.c
> +++ b/net/ipv4/tcp.c
> @@ -2456,8 +2456,9 @@ static int do_tcp_setsockopt(struct sock *sk, int level,
> err = -EINVAL;
> else
> tp->thin_dupack = val;
> - if (tp->thin_dupack)
> - tcp_disable_early_retrans(tp);
> +
> + if (tp->thin_dupack)
> + tcp_disable_early_retrans(tp);
> break;
>
> case TCP_REPAIR:
>
>
> I'll submit the right patch in the right form once I know what was intended.
>
> The former seems more 'correct' to me, but I'm unsure if that could break something.
>
> Dave
>
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
^ 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