Netdev List
 help / color / mirror / Atom feed
* [PATCH net-next-2.6 v9 20/20] pch_can: Replace netif_rx to netif_receive_skb
From: Tomoya MORINAGA @ 2010-12-13  6:24 UTC (permalink / raw)
  To: wg, w.sang, chripell, 21cnbao, sameo, socketcan-core, netdev,
	linux-kernel
  Cc: qi.wang, yong.y.wang, andrew.chih.howe.khor, joel.clark,
	kok.howg.ewe, margie.foster, Tomoya MORINAGA
In-Reply-To: <1292221467-8039-19-git-send-email-tomoya-linux@dsn.okisemi.com>

Since this driver is implemented as NAPI,
netif_receive_skb must be used not netif_rx.

Signed-off-by: Tomoya MORINAGA <tomoya-linux@dsn.okisemi.com>
Acked-by: Marc Kleine-Budde <mkl@pengutronix.de>
---
 drivers/net/can/pch_can.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/can/pch_can.c b/drivers/net/can/pch_can.c
index 4697b1c..8d45fdd 100644
--- a/drivers/net/can/pch_can.c
+++ b/drivers/net/can/pch_can.c
@@ -572,7 +572,7 @@ static void pch_can_error(struct net_device *ndev, u32 status)
 	cf->data[7] = (errc & PCH_REC) >> 8;
 
 	priv->can.state = state;
-	netif_rx(skb);
+	netif_receive_skb(skb);
 
 	stats->rx_packets++;
 	stats->rx_bytes += cf->can_dlc;
-- 
1.6.0.6


^ permalink raw reply related

* [PATCH] ipv6: Use ip6_dst_hoplimit() instead of direct dst_metric() calls.
From: David Miller @ 2010-12-13  5:16 UTC (permalink / raw)
  To: netdev


Signed-off-by: David S. Miller <davem@davemloft.net>
---

I just noticed this while hacking on metrics.  IPV6 has to use
this special function because the default has a dynamic
per-interface value.  So it can't do the same trick ipv4 does
by pre-seeding the cached route metric.

 net/ipv6/netfilter/ip6t_REJECT.c |    2 +-
 net/ipv6/route.c                 |    1 +
 net/ipv6/xfrm6_mode_tunnel.c     |    3 ++-
 3 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/net/ipv6/netfilter/ip6t_REJECT.c b/net/ipv6/netfilter/ip6t_REJECT.c
index 2933396..bf998fe 100644
--- a/net/ipv6/netfilter/ip6t_REJECT.c
+++ b/net/ipv6/netfilter/ip6t_REJECT.c
@@ -124,7 +124,7 @@ static void send_reset(struct net *net, struct sk_buff *oldskb)
 	skb_reset_network_header(nskb);
 	ip6h = ipv6_hdr(nskb);
 	ip6h->version = 6;
-	ip6h->hop_limit = dst_metric(dst, RTAX_HOPLIMIT);
+	ip6h->hop_limit = ip6_dst_hoplimit(dst);
 	ip6h->nexthdr = IPPROTO_TCP;
 	ipv6_addr_copy(&ip6h->saddr, &oip6h->daddr);
 	ipv6_addr_copy(&ip6h->daddr, &oip6h->saddr);
diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index 4aed081..9b2d7bc 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -1119,6 +1119,7 @@ int ip6_dst_hoplimit(struct dst_entry *dst)
 	}
 	return hoplimit;
 }
+EXPORT_SYMBOL(ip6_dst_hoplimit);
 
 /*
  *
diff --git a/net/ipv6/xfrm6_mode_tunnel.c b/net/ipv6/xfrm6_mode_tunnel.c
index b809812..645cb96 100644
--- a/net/ipv6/xfrm6_mode_tunnel.c
+++ b/net/ipv6/xfrm6_mode_tunnel.c
@@ -14,6 +14,7 @@
 #include <net/dsfield.h>
 #include <net/dst.h>
 #include <net/inet_ecn.h>
+#include <net/ip6_route.h>
 #include <net/ipv6.h>
 #include <net/xfrm.h>
 
@@ -53,7 +54,7 @@ static int xfrm6_mode_tunnel_output(struct xfrm_state *x, struct sk_buff *skb)
 	if (x->props.flags & XFRM_STATE_NOECN)
 		dsfield &= ~INET_ECN_MASK;
 	ipv6_change_dsfield(top_iph, 0, dsfield);
-	top_iph->hop_limit = dst_metric(dst->child, RTAX_HOPLIMIT);
+	top_iph->hop_limit = ip6_dst_hoplimit(dst->child);
 	ipv6_addr_copy(&top_iph->saddr, (struct in6_addr *)&x->props.saddr);
 	ipv6_addr_copy(&top_iph->daddr, (struct in6_addr *)&x->id.daddr);
 	return 0;
-- 
1.7.3.2


^ permalink raw reply related

* Re: [PATCH 1/3] bonding: add the debugfs facility to the bonding driver
From: David Miller @ 2010-12-13  5:15 UTC (permalink / raw)
  To: izumi.taku; +Cc: fubar, netdev, eric.dumazet, shemminger
In-Reply-To: <4D05AA8A.8020705@jp.fujitsu.com>

From: Taku Izumi <izumi.taku@jp.fujitsu.com>
Date: Mon, 13 Dec 2010 14:09:30 +0900

>  I resent the patch #2 and #3 with Jay's signoff.

Thank you.

^ permalink raw reply

* Re: [PATCH 1/3] bonding: add the debugfs facility to the bonding driver
From: Taku Izumi @ 2010-12-13  5:09 UTC (permalink / raw)
  To: David Miller; +Cc: fubar, netdev, eric.dumazet, shemminger
In-Reply-To: <20101210.162319.35837953.davem@davemloft.net>


(2010/12/11 9:23), David Miller wrote:
> From: Jay Vosburgh<fubar@us.ibm.com>
> Date: Fri, 10 Dec 2010 16:21:45 -0800
> 
>> Taku Izumi<izumi.taku@jp.fujitsu.com>  wrote:
>>
>>>
>>> This patch provides the debugfs facility to the bonding driver.
>>> The "bonding" directory is created in the debugfs root and directories of
>>> each bonding interface (like bond0, bond1...) are created in that.
>>>
>>> # mount -t debugfs none /sys/kernel/debug
>>>
>>> # ls /sys/kernel/debug/bonding
>>> bond0  bond1
>>>
>>> Signed-off-by: Taku Izumi<izumi.taku@jp.fujitsu.com>
>>
>> 	Tested replacement patch 1 with original patches 2 and 3.  Works
>> as advertised, no pesky crashes.
>>
>> Signed-off-by: Jay Vosburgh<fubar@us.ibm.com>
> 
> I'll apply this patch #1.  Taku-san, could you please report patch #2
> and #3 and remember to include Jay's signoff.
> 

 I resent the patch #2 and #3 with Jay's signoff.

Best regards,
Taku Izumi



^ permalink raw reply

* Re: [PATCH 3/3] bonding: add the debugfs interface to see RLB hash table
From: Taku Izumi @ 2010-12-13  5:04 UTC (permalink / raw)
  To: netdev@vger.kernel.org, Jay Vosburgh, David S. Miller
  Cc: eric.dumazet, shemminger
In-Reply-To: <4CF89AC2.6030606@jp.fujitsu.com>


This patch provices the debugfs interface to see RLB hash table
like the following:

# cat /sys/kernel/debug/bonding/bond0/rlb_hash_table
SourceIP        DestinationIP   Destination MAC   DEV
10.124.196.205  10.124.196.205  ff:ff:ff:ff:ff:ff eth4
10.124.196.205  10.124.196.81   00:19:99:XX:XX:XX eth3
10.124.196.205  10.124.196.1    00:21:d8:XX:XX:XX eth0

This is helpful to check if the receive load balancing works as expected.

Signed-off-by: Taku Izumi <izumi.taku@jp.fujitsu.com>
Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>

---
 drivers/net/bonding/bond_debugfs.c |   50 +++++++++++++++++++++++++++++++++++++
 1 file changed, 50 insertions(+)

Index: net-next/drivers/net/bonding/bond_debugfs.c
===================================================================
--- net-next.orig/drivers/net/bonding/bond_debugfs.c
+++ net-next/drivers/net/bonding/bond_debugfs.c
@@ -4,6 +4,7 @@
 #include <linux/netdevice.h>

 #include "bonding.h"
+#include "bond_alb.h"

 #ifdef CONFIG_DEBUG_FS

@@ -12,6 +13,52 @@

 static struct dentry *bonding_debug_root;

+/*
+ *  Show RLB hash table
+ */
+static int bond_debug_rlb_hash_show(struct seq_file *m, void *v)
+{
+	struct bonding *bond = m->private;
+	struct alb_bond_info *bond_info = &(BOND_ALB_INFO(bond));
+	struct rlb_client_info *client_info;
+	u32 hash_index;
+
+	if (bond->params.mode != BOND_MODE_ALB)
+		return 0;
+
+	seq_printf(m, "SourceIP        DestinationIP   "
+			"Destination MAC   DEV\n");
+
+	spin_lock_bh(&(BOND_ALB_INFO(bond).rx_hashtbl_lock));
+
+	hash_index = bond_info->rx_hashtbl_head;
+	for (; hash_index != RLB_NULL_INDEX; hash_index = client_info->next) {
+		client_info = &(bond_info->rx_hashtbl[hash_index]);
+		seq_printf(m, "%-15pI4 %-15pI4 %-17pM %s\n",
+			&client_info->ip_src,
+			&client_info->ip_dst,
+			&client_info->mac_dst,
+			client_info->slave->dev->name);
+	}
+
+	spin_unlock_bh(&(BOND_ALB_INFO(bond).rx_hashtbl_lock));
+
+	return 0;
+}
+
+static int bond_debug_rlb_hash_open(struct inode *inode, struct file *file)
+{
+	return single_open(file, bond_debug_rlb_hash_show, inode->i_private);
+}
+
+static const struct file_operations bond_debug_rlb_hash_fops = {
+	.owner		= THIS_MODULE,
+	.open		= bond_debug_rlb_hash_open,
+	.read		= seq_read,
+	.llseek		= seq_lseek,
+	.release	= single_release,
+};
+
 void bond_debug_register(struct bonding *bond)
 {
 	if (!bonding_debug_root)
@@ -25,6 +72,9 @@ void bond_debug_register(struct bonding
 			bond->dev->name);
 		return;
 	}
+
+	debugfs_create_file("rlb_hash_table", 0400, bond->debug_dir,
+				bond, &bond_debug_rlb_hash_fops);
 }

 void bond_debug_unregister(struct bonding *bond)



^ permalink raw reply

* Re: [PATCH 2/3] bonding: migrate some macros from bond_alb.c to bond_alb.h
From: Taku Izumi @ 2010-12-13  5:03 UTC (permalink / raw)
  To: netdev@vger.kernel.org, Jay Vosburgh, David S. Miller
  Cc: eric.dumazet, shemminger
In-Reply-To: <4CF89A9C.8080603@jp.fujitsu.com>


This patch simply migrates some macros from bond_alb.c to bond_alb.h.


Signed-off-by: Taku Izumi <izumi.taku@jp.fujitsu.com>
Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>

---
 drivers/net/bonding/bond_alb.c |   36 ------------------------------------
 drivers/net/bonding/bond_alb.h |   38 ++++++++++++++++++++++++++++++++++++++
 2 files changed, 38 insertions(+), 36 deletions(-)

Index: net-next/drivers/net/bonding/bond_alb.c
===================================================================
--- net-next.orig/drivers/net/bonding/bond_alb.c
+++ net-next/drivers/net/bonding/bond_alb.c
@@ -44,42 +44,6 @@
 #include "bond_alb.h"


-#define ALB_TIMER_TICKS_PER_SEC	    10	/* should be a divisor of HZ */
-#define BOND_TLB_REBALANCE_INTERVAL 10	/* In seconds, periodic re-balancing.
-					 * Used for division - never set
-					 * to zero !!!
-					 */
-#define BOND_ALB_LP_INTERVAL	    1	/* In seconds, periodic send of
-					 * learning packets to the switch
-					 */
-
-#define BOND_TLB_REBALANCE_TICKS (BOND_TLB_REBALANCE_INTERVAL \
-				  * ALB_TIMER_TICKS_PER_SEC)
-
-#define BOND_ALB_LP_TICKS (BOND_ALB_LP_INTERVAL \
-			   * ALB_TIMER_TICKS_PER_SEC)
-
-#define TLB_HASH_TABLE_SIZE 256	/* The size of the clients hash table.
-				 * Note that this value MUST NOT be smaller
-				 * because the key hash table is BYTE wide !
-				 */
-
-
-#define TLB_NULL_INDEX		0xffffffff
-#define MAX_LP_BURST		3
-
-/* rlb defs */
-#define RLB_HASH_TABLE_SIZE	256
-#define RLB_NULL_INDEX		0xffffffff
-#define RLB_UPDATE_DELAY	2*ALB_TIMER_TICKS_PER_SEC /* 2 seconds */
-#define RLB_ARP_BURST_SIZE	2
-#define RLB_UPDATE_RETRY	3	/* 3-ticks - must be smaller than the rlb
-					 * rebalance interval (5 min).
-					 */
-/* RLB_PROMISC_TIMEOUT = 10 sec equals the time that the current slave is
- * promiscuous after failover
- */
-#define RLB_PROMISC_TIMEOUT	10*ALB_TIMER_TICKS_PER_SEC

 #ifndef __long_aligned
 #define __long_aligned __attribute__((aligned((sizeof(long)))))
Index: net-next/drivers/net/bonding/bond_alb.h
===================================================================
--- net-next.orig/drivers/net/bonding/bond_alb.h
+++ net-next/drivers/net/bonding/bond_alb.h
@@ -31,6 +31,44 @@ struct slave;
 #define BOND_ALB_INFO(bond)   ((bond)->alb_info)
 #define SLAVE_TLB_INFO(slave) ((slave)->tlb_info)

+#define ALB_TIMER_TICKS_PER_SEC	    10	/* should be a divisor of HZ */
+#define BOND_TLB_REBALANCE_INTERVAL 10	/* In seconds, periodic re-balancing.
+					 * Used for division - never set
+					 * to zero !!!
+					 */
+#define BOND_ALB_LP_INTERVAL	    1	/* In seconds, periodic send of
+					 * learning packets to the switch
+					 */
+
+#define BOND_TLB_REBALANCE_TICKS (BOND_TLB_REBALANCE_INTERVAL \
+				  * ALB_TIMER_TICKS_PER_SEC)
+
+#define BOND_ALB_LP_TICKS (BOND_ALB_LP_INTERVAL \
+			   * ALB_TIMER_TICKS_PER_SEC)
+
+#define TLB_HASH_TABLE_SIZE 256	/* The size of the clients hash table.
+				 * Note that this value MUST NOT be smaller
+				 * because the key hash table is BYTE wide !
+				 */
+
+
+#define TLB_NULL_INDEX		0xffffffff
+#define MAX_LP_BURST		3
+
+/* rlb defs */
+#define RLB_HASH_TABLE_SIZE	256
+#define RLB_NULL_INDEX		0xffffffff
+#define RLB_UPDATE_DELAY	(2*ALB_TIMER_TICKS_PER_SEC) /* 2 seconds */
+#define RLB_ARP_BURST_SIZE	2
+#define RLB_UPDATE_RETRY	3 /* 3-ticks - must be smaller than the rlb
+				   * rebalance interval (5 min).
+				   */
+/* RLB_PROMISC_TIMEOUT = 10 sec equals the time that the current slave is
+ * promiscuous after failover
+ */
+#define RLB_PROMISC_TIMEOUT	(10*ALB_TIMER_TICKS_PER_SEC)
+
+
 struct tlb_client_info {
 	struct slave *tx_slave;	/* A pointer to slave used for transmiting
 				 * packets to a Client that the Hash function



^ permalink raw reply

* Re: set vlan CFI and TPID
From: hong zhiyi @ 2010-12-13  2:20 UTC (permalink / raw)
  To: Jesse Gross; +Cc: netdev
In-Reply-To: <AANLkTim3Rm91O2n6dCqTJYja8fy_sb0dKthCA1rf=FPV@mail.gmail.com>

On Mon, Dec 13, 2010 at 8:20 AM, Jesse Gross <jesse@nicira.com> wrote:
> On Tue, Dec 7, 2010 at 8:04 PM, hong zhiyi <zhiyi.hong@gmail.com> wrote:
>> Hi All,
>>
>> May I ask how to set the 1 bit CFI and 2 bytesTPID in the VLAN header
>> by vconfig?
>
> You can't change them using vconfig.  For 802.1q/Ethernet, the TPID is
> 0x8100 and the CFI is 0.
>
>> and what is the meaning of the egress map and ingress map?
>
> These convert between the PCP bits found in the vlan header and the
> priority field that is used internally for QoS, which you access
> through tc.
>

Hi Jesse,

Thank you for your reply.

Then how can it set the value of the TPID and the CFI? Also, I do not
understand you mentioned the *tc* means, what is the tc?

Best Regards
Hong Zhiyi

^ permalink raw reply

* Re: net-next-2.6 [Patch 1/1] dccp: dead code elimination
From: Shan Wei @ 2010-12-13  1:13 UTC (permalink / raw)
  To: Gerrit Renker; +Cc: davem, dccp, netdev
In-Reply-To: <1291982371-5666-1-git-send-email-gerrit@erg.abdn.ac.uk>

Gerrit Renker wrote, at 12/10/2010 07:59 PM:
> 
> Shan,
> I have edited the commit message (s/marcos/macros/). In future, please
> can you cc: your patches to netdev@vger also. Thank you.

Thanks for your suggesting. 
I'll do that next time.

-- 
Best Regards
-----
Shan Wei

^ permalink raw reply

* Re: [PATCH 10/27] ixgb: Don't check for vlan group on transmit
From: Jesse Gross @ 2010-12-13  1:00 UTC (permalink / raw)
  To: Jeff Kirsher; +Cc: davem, Emil Tantilov, netdev, gospo, bphilips
In-Reply-To: <1292048241-22026-11-git-send-email-jeffrey.t.kirsher@intel.com>

On Fri, Dec 10, 2010 at 10:17 PM, Jeff Kirsher
<jeffrey.t.kirsher@intel.com> wrote:
> From: Emil Tantilov <emil.s.tantilov@intel.com>
>
> Based on a patch from Jesse Gross.
>
> Enable vlan tag insertion even when vlan group is not configured.
>
> For ixgb HW both CTRL0.VME and VLE bit in the Tx descriptor need to be set
> in order to enable HW acceleration.
>
> Introduced separate functions for enabling/disabling of vlan tag stripping
> similar to ixgbe.

Thanks for working on this.  However, I don't think that this patch
actually does what it says.

In ixgb_xmit_frame() it's still checking whether adapter->vlgrp is
non-null before inserting a tag, so it will drop tags unless a vlan
group is configured.  Also, since it's not currently possible to
toggle NETIF_F_HW_VLAN_RX, vlan stripping will never get disabled.
This is actually a regression since before vlan stripping would get
disabled if no vlan group was configured.  Now, vlan headers will get
silently dropped if there is no vlan group.

Regardless of that, I still think this is a useful change on the road
towards adopting the new vlan interfaces, the problem is just that
currently it's halfway in between the old and the new.  Given that, it
would obviously be much better to move all the way over the new when
addressing this.

Out of curiosity, is the implication of this that vlan insertion on
transmit and stripping on receive are always configured together?  I
don't have hardware supported by this driver but when I worked on
ixgbe (which is at least superficially similar in this area) I didn't
have any problems configuring them independently.

Thanks.

^ permalink raw reply

* [PATCH update 2] firewire: net: add carrier detection
From: Stefan Richter @ 2010-12-13  0:46 UTC (permalink / raw)
  To: Ben Hutchings, Maxim Levitsky; +Cc: netdev, linux1394-devel, Peter Stuge
In-Reply-To: <1292195134.3136.296.camel@localhost>

From: Maxim Levitsky <maximlevitsky@gmail.com>

To make userland, e.g. NetworkManager work with firewire, we need to
detect whether cable is plugged or not.  Simple and correct way of doing
that is just counting number of peers.  No peers - no link and vice
versa.

(Stefan R.:  Drop ethtool_ops.get_link)

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
---
Update 2:  Removed ethtool related hunks; dev->peer_count does not need
to be accessed within the spinlock as I first thought; reduced pointer
reference depth in fwnet_remove_peer.

Maxim, do you observe a remaining need for a get_link implementation?
I can't tell, I use rather minimal userland that doesn't care for link
status.

 drivers/firewire/net.c |   16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)

Index: b/drivers/firewire/net.c
===================================================================
--- a/drivers/firewire/net.c
+++ b/drivers/firewire/net.c
@@ -179,6 +179,7 @@ struct fwnet_device {
 	/* Number of tx datagrams that have been queued but not yet acked */
 	int queued_datagrams;
 
+	int peer_count;
 	struct list_head peer_list;
 	struct fw_card *card;
 	struct net_device *netdev;
@@ -1465,6 +1466,10 @@ static int fwnet_add_peer(struct fwnet_d
 	list_add_tail(&peer->peer_link, &dev->peer_list);
 	spin_unlock_irq(&dev->lock);
 
+	/* dev->peer_count acess is serialized by fwnet_device_mutex. */
+	if (++dev->peer_count > 1)
+		netif_carrier_on(dev->netdev);
+
 	return 0;
 }
 
@@ -1543,13 +1548,16 @@ static int fwnet_probe(struct device *_d
 	return ret;
 }
 
-static void fwnet_remove_peer(struct fwnet_peer *peer)
+static void fwnet_remove_peer(struct fwnet_peer *peer, struct fwnet_device *dev)
 {
 	struct fwnet_partial_datagram *pd, *pd_next;
 
-	spin_lock_irq(&peer->dev->lock);
+	if (--dev->peer_count == 1)
+		netif_carrier_off(dev->netdev);
+
+	spin_lock_irq(&dev->lock);
 	list_del(&peer->peer_link);
-	spin_unlock_irq(&peer->dev->lock);
+	spin_unlock_irq(&dev->lock);
 
 	list_for_each_entry_safe(pd, pd_next, &peer->pd_list, pd_link)
 		fwnet_pd_delete(pd);
@@ -1566,7 +1574,7 @@ static int fwnet_remove(struct device *_
 
 	mutex_lock(&fwnet_device_mutex);
 
-	fwnet_remove_peer(peer);
+	fwnet_remove_peer(peer, dev);
 
 	if (list_empty(&dev->peer_list)) {
 		net = dev->netdev;


-- 
Stefan Richter
-=====-==-=- ==-- -==-=
http://arcgraph.de/sr/

------------------------------------------------------------------------------
Oracle to DB2 Conversion Guide: Learn learn about native support for PL/SQL,
new data types, scalar functions, improved concurrency, built-in packages, 
OCI, SQL*Plus, data movement tools, best practices and more.
http://p.sf.net/sfu/oracle-sfdev2dev 

^ permalink raw reply

* Re: [PATCH] ehea: Fixing LRO configuration
From: Jesse Gross @ 2010-12-13  0:39 UTC (permalink / raw)
  To: leitao; +Cc: shemminger, davem, netdev
In-Reply-To: <1291833062-27446-1-git-send-email-leitao@linux.vnet.ibm.com>

On Wed, Dec 8, 2010 at 10:31 AM,  <leitao@linux.vnet.ibm.com> wrote:
> In order to set LRO on ehea, the user must set a module parameter, which
> is not the standard way to do so. This patch adds a way to set LRO using
> the ethtool tool.
>
> Signed-off-by: Breno Leitao <leitao@linux.vnet.ibm.com>
>
> diff --git a/drivers/net/ehea/ehea_ethtool.c b/drivers/net/ehea/ehea_ethtool.c
> index 75b099c..1f37ee6 100644
> --- a/drivers/net/ehea/ehea_ethtool.c
> +++ b/drivers/net/ehea/ehea_ethtool.c
> @@ -261,6 +261,13 @@ static void ehea_get_ethtool_stats(struct net_device *dev,
>
>  }
>
> +static int ehea_set_flags(struct net_device *dev, u32 data)
> +{
> +       return ethtool_op_set_flags(dev, data, ETH_FLAG_LRO
> +                                       | ETH_FLAG_TXVLAN
> +                                       | ETH_FLAG_RXVLAN);

I don't think that this should enable those vlan offloading flags.  I
don't see any logic to actually disable vlan stripping on receive if
that flag is toggled.  Transmit might be OK, since it will cause the
networking core to insert the tag in software if offloading is
disabled.  However, I see some places where skb->protocol is accessed
to determine the protocol of the packet being transmitted.  In most
drivers this causes a problem when transmit vlan offloading is
disabled because the packet type becomes ETH_P_8021Q, instead of the
expected protocol.  On the other hand, it appears that there aren't
any offloads in vlan_features, so maybe it doesn't matter.

^ permalink raw reply

* Re: set vlan CFI and TPID
From: Jesse Gross @ 2010-12-13  0:20 UTC (permalink / raw)
  To: hong zhiyi; +Cc: netdev
In-Reply-To: <AANLkTimW35xF4dcr_UO6XX1tBb3VBcp2PWPq8SkMk60=@mail.gmail.com>

On Tue, Dec 7, 2010 at 8:04 PM, hong zhiyi <zhiyi.hong@gmail.com> wrote:
> Hi All,
>
> May I ask how to set the 1 bit CFI and 2 bytesTPID in the VLAN header
> by vconfig?

You can't change them using vconfig.  For 802.1q/Ethernet, the TPID is
0x8100 and the CFI is 0.

> and what is the meaning of the egress map and ingress map?

These convert between the PCP bits found in the vlan header and the
priority field that is used internally for QoS, which you access
through tc.

^ permalink raw reply

* Re: [PATCH 2.6.36] vlan: Avoid hwaccel vlan packets when vid not used
From: Jesse Gross @ 2010-12-13  0:11 UTC (permalink / raw)
  To: Michael Leun, Matt Carlson, Michael Chan
  Cc: Eric Dumazet, David Miller, Ben Greear, linux-kernel, netdev
In-Reply-To: <20101206222703.32fbe852@xenia.leun.net>

On Mon, Dec 6, 2010 at 1:27 PM, Michael Leun
<lkml20101129@newton.leun.net> wrote:
> On Mon, 6 Dec 2010 12:04:48 -0800
> Jesse Gross <jesse@nicira.com> wrote:
>
>> On Mon, Dec 6, 2010 at 11:34 AM, Michael Leun
>> <lkml20101129@newton.leun.net> wrote:
>> > On Mon, 6 Dec 2010 10:14:55 -0800
>> > Jesse Gross <jesse@nicira.com> wrote:
>> >
>> >> On Sun, Dec 5, 2010 at 2:44 AM, Michael Leun
>> >> <lkml20101129@newton.leun.net> wrote:
>> >> > Hi Jesse,
>> >> >
>> >> > On Sun, 5 Dec 2010 10:55:28 +0100
>> >> > Michael Leun <lkml20101129@newton.leun.net> wrote:
>> >> >
>> >> >> On Sun, 05 Dec 2010 09:03:53 +0100
>> >> >> Eric Dumazet <eric.dumazet@gmail.com> wrote:
>> >> >>
>> >> >> > > But on
>> >> >> > >
>> >> >> > > hpdl320g5:/home/ml # lspci | grep Eth
>> >> >> > > 03:04.0 Ethernet controller: Broadcom Corporation NetXtreme
>> >> >> > > BCM5714 Gigabit Ethernet (rev a3) 03:04.1 Ethernet
>> >> >> > > controller: Broadcom Corporation NetXtreme BCM5714 Gigabit
>> >> >> > > Ethernet (rev a3)
>> >> >> > >
>> >> >> > > the good message is that it also does not crash, but with
>> >> >> > > tcpdump I see vlan tags when no vlan devices configured on
>> >> >> > > the respective eth, if so I do not see tags anymore vlan
>> >> >> > > tags on the trunk interface.
>> >> >> > >
>> >> >> >
>> >> >> > For all these very specific needs, you'll have to try 2.6.37
>> >> >> > I am afraid. Jesse did huge changes to exactly make this
>> >> >> > working, we wont backport this to 2.6.36, but only avoid
>> >> >> > crashes.
>> >> >>
>> >> >> OK, I'm perfectly fine with that, of course, actually nice to
>> >> >> hear that the issue already is addressed.
>> >> >>
>> >> >> Likely I'll give some rc an shot on this machine (maybe over
>> >> >> christmas), but it is an production machine (acutally testing
>> >> >> other devices is the "product" produced on this machine), so
>> >> >> unfortunately I'm not that free in when and what I can do (but
>> >> >> the possibility to, for example, bridge the trunk interface
>> >> >> would make testing easier, that justifies something...).
>> >> >>
>> >> >> Thank you all very much for your work.
>> >> >
>> >> > Are these changes already in 2.6.37-rc4? Or, if not are they
>> >> > somewhere publically available already?
>> >> >
>> >> > I looked into various changelogs but have some difficulties to
>> >> > identify them...
>> >> >
>> >> > Maybe I have some time next days to give them an try...
>> >>
>> >> Yes, all of the existing vlan changes are in 2.6.37-rc4.  There
>> >> were a number of patches but the main one was
>> >> 3701e51382a026cba10c60b03efabe534fba4ca4
>> >
>> > Then, I'm afraid, this (seeing vlan tags even if vlan interfaces are
>> > configured) does not work on HP DL320G5 (for exact description and
>> > examples please see my mail a few days ago).
>>
>> What driver are you using?  Is it tg3?
>>
>> The vlan changes that I made unfortunately require updating drivers to
>> get the full benefit.  I've been busy lately so tg3 hasn't yet been
>> updated.
>>
>> I know that tg3 does some things differently depending on whether a
>> vlan group is configured, so that would likely be the cause of what
>> you are seeing.  I'd have to look at it in more detail to be sure
>> though.
>>
>> You said that everything works on the other Broadcom NIC that you
>> tested?  Maybe it uses bnx2 instead?
>>
>
> Both machines use tg3 / 2.6.36.1 - one is opensuse, one ubuntu (but
> this should not matter, I think).
>
> If I can do anything to support your investigations / work (most
> likely testing / providing information) please let me know.

Unfortunately, I probably won't have time to look at this in the near
future.  Given that the test works on one NIC but not another that
strongly suggests that it is a driver problem, even if both NICs use
the same driver.  I see tg3 can do different things with vlans
depending on the model and what features are enabled.  I also ran a
quick test on some of my machines and I didn't experience this issue.
They are running net-next with ixgbe.

One of the main goals of my general vlan changes was to remove as much
logic as possible from the drivers and put it in the networking core,
so we should in theory see consistent behavior.  However, in 2.6.36
and earlier, each driver knows about what vlan devices are configured
and does different things with that information.

Given all of that, the most logical step to me is simply to convert
tg3 to use the new vlan infrastructure.  It should be done regardless
and it will probably solve this problem.  Maybe you can convince the
Broadcom guys to do that?  It would be a lot faster for them to do it
than me.

^ permalink raw reply

* Re: System blocks (hangs) on ifconfig up
From: Stephen Hemminger @ 2010-12-12 23:29 UTC (permalink / raw)
  To: Shmulik Hen; +Cc: netdev
In-Reply-To: <4D04E38A.1040605@trego.co.il>

On Sun, 12 Dec 2010 17:00:26 +0200
Shmulik Hen <shmulik.hen@gmail.com> wrote:

> Hello,
> 
> My system is Ubuntu 10.04, running kernel 2.6.32-26-generic.
> 
> Whenever I try to bring up a specific ethernet interface for the second 
> time, my
> system becomes unresponsive for 60 seconds - i.e. no mouse, no keyboard, no
> screen refresh. etc.
> 
> Looking at the driver's code, I could see that it's dev->open() method calls
> wait_event_interruptible_timeout() with a timeout of 60 seconds - exactly
> the delay I'm seeing.
> 
> I have narrowed the code to a bare minimum (see below - loosely based on
> dummy.c), which only calls mdelay(10000) in it's dev->open() method, and
> still, my system blocks for exactly 10 seconds when I run the following
> sequence:
> 
>  > sudo ifconfig shmulik0 up
>  > sudo ifconfig shmulik0 down
>  > sudo ifconfig shmulik0 up
> 
> At this point - the system is stuck for 10 seconds.
> 
> 
> Thanks,
> Shmulik.

What driver is this? Where is the source? It sounds awful

-- 

^ permalink raw reply

* Re: [PATCH] pppoe.c: Fix kernel panic caused by __pppoe_xmit
From: David Miller @ 2010-12-12 23:06 UTC (permalink / raw)
  To: andrej; +Cc: jarkao2, netdev
In-Reply-To: <4D0407E4.1060805@ota.si>

From: Andrej Ota <andrej@ota.si>
Date: Sun, 12 Dec 2010 00:23:16 +0100

>> Thanks Andrej! I've only updated emails a bit.
> 
> Thank you for your help and support in submitting this patch.

Applied, thanks everyone.

^ permalink raw reply

* Re: [PATCH update] firewire: net: add carrier detection
From: Ben Hutchings @ 2010-12-12 23:05 UTC (permalink / raw)
  To: Stefan Richter; +Cc: Maxim Levitsky, Peter Stuge, linux1394-devel, netdev
In-Reply-To: <20101212180916.71a57a71@stein>

On Sun, 2010-12-12 at 18:09 +0100, Stefan Richter wrote:
> From: Maxim Levitsky <maximlevitsky@gmail.com>
> 
> To make userland, e.g. NetworkManager work with firewire, we need to
> detect whether cable is plugged or not.  Simple and correct way of doing
> that is just counting number of peers.  No peers - no link and vice
> versa.
[...]

NM doesn't use ETHTOOL_GLINK so you don't need to implement
ethtool_ops::get_link.

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: [net-2.6 PATCH 1/1] qlge: Fix deadlock when cancelling worker.
From: David Miller @ 2010-12-12 23:04 UTC (permalink / raw)
  To: ron.mercer; +Cc: netdev, jarkao2, mingo, Linux-Driver
In-Reply-To: <1292101610-30661-1-git-send-email-ron.mercer@qlogic.com>

From: Ron Mercer <ron.mercer@qlogic.com>
Date: Sat, 11 Dec 2010 13:06:50 -0800

> Removing usage of rtnl_lock() to protect firmware interface registers.
> These registers are accessed in some worker threads and can create a
> deadlock if rtnl_lock is taken by upper layers while the worker is still
> pending.
> We remove rtnl_lock and use a driver mutex just while mailboxes are
> accessed.
> 
> Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>

Applied.

^ permalink raw reply

* Re: [PATCH net-2.6 3/3] bnx2x: Advance a version number to 1.60.01-0
From: David Miller @ 2010-12-12 23:03 UTC (permalink / raw)
  To: vladz; +Cc: netdev, eilong
In-Reply-To: <1292163149.20811.162.camel@lb-tlvb-vladz>

From: "Vladislav Zolotarov" <vladz@broadcom.com>
Date: Sun, 12 Dec 2010 16:12:29 +0200

> Signed-off-by: Vladislav Zolotarov <vladz@broadcom.com>
> Signed-off-by: Eilon Greenstein <eilong@broadcom.com>

Applied.

^ permalink raw reply

* Re: [PATCH net-2.6 2/3] bnx2x: Fixed a compilation warning
From: David Miller @ 2010-12-12 23:03 UTC (permalink / raw)
  To: vladz; +Cc: netdev, eilong
In-Reply-To: <1292163132.20811.161.camel@lb-tlvb-vladz>

From: "Vladislav Zolotarov" <vladz@broadcom.com>
Date: Sun, 12 Dec 2010 16:12:12 +0200

> bnx2x_src_init_t2() is used only when BCM_CNIC is defined.
> So, to avoid a compilation warning, we won't define it unless
> BCM_CNIC is defined.
> 
> Signed-off-by: Vladislav Zolotarov <vladz@broadcom.com>
> Signed-off-by: Eilon Greenstein <eilong@broadcom.com>

Applied.

^ permalink raw reply

* Re: [PATCH net-2.6 1/3] bnx2x: LSO code was broken on BE platforms
From: David Miller @ 2010-12-12 23:03 UTC (permalink / raw)
  To: vladz; +Cc: netdev, eilong
In-Reply-To: <1292163105.20811.160.camel@lb-tlvb-vladz>

From: "Vladislav Zolotarov" <vladz@broadcom.com>
Date: Sun, 12 Dec 2010 16:11:45 +0200

> Make the LSO code work on BE platforms: parsing_data field of 
> a parsing BD (PBD) for 57712 was improperly composed which made FW read wrong 
> values for TCP header's length and offset and, as a result, the corresponding 
> PCI device was performing bad DMA reads triggering EEH.
> 
> Signed-off-by: Vladislav Zolotarov <vladz@broadcom.com>
> Signed-off-by: Eilon Greenstein <eilong@broadcom.com>

Applied.

^ permalink raw reply

* Re: [PATCH] WAN: Fix a TX IRQ causing BUG() in PC300 and PCI200SYN drivers.
From: David Miller @ 2010-12-12 23:03 UTC (permalink / raw)
  To: khc; +Cc: netdev
In-Reply-To: <m37hfe7iiw.fsf@intrepid.localdomain>

From: Krzysztof Halasa <khc@pm.waw.pl>
Date: Sun, 12 Dec 2010 23:06:47 +0100

> We must not wake the TX queue without free TX descriptors.
> sca_xmit() expects at least one free descriptor and BUGs otherwise.
> 
> Problem reported and fix tested by Bernie Innocenti and Ward Vandewege.
> 
> Signed-off-by: Krzysztof Hałasa <khc@pm.waw.pl>

Applied.

^ permalink raw reply

* Re: System blocks (hangs) on ifconfig up
From: Ben Hutchings @ 2010-12-12 23:03 UTC (permalink / raw)
  To: Shmulik Hen; +Cc: netdev
In-Reply-To: <4D04E38A.1040605@trego.co.il>

On Sun, 2010-12-12 at 17:00 +0200, Shmulik Hen wrote:
> Hello,
> 
> My system is Ubuntu 10.04, running kernel 2.6.32-26-generic.
> 
> Whenever I try to bring up a specific ethernet interface for the second 
> time, my
> system becomes unresponsive for 60 seconds - i.e. no mouse, no keyboard, no
> screen refresh. etc.
> 
> Looking at the driver's code, I could see that it's dev->open() method calls
> wait_event_interruptible_timeout() with a timeout of 60 seconds - exactly
> the delay I'm seeing.

That seems like a stupid thing for it to do.

> I have narrowed the code to a bare minimum (see below - loosely based on
> dummy.c), which only calls mdelay(10000) in it's dev->open() method, and
> still, my system blocks for exactly 10 seconds when I run the following
> sequence:
> 
>  > sudo ifconfig shmulik0 up
>  > sudo ifconfig shmulik0 down
>  > sudo ifconfig shmulik0 up
> 
> At this point - the system is stuck for 10 seconds.

Bringing an interface up or down is a synchronous operation and is
serialised with most other network configuration operations.  So this is
the expected behaviour.

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: [PATCHSET] net-dev: don't use flush_scheduled_work()
From: David Miller @ 2010-12-12 22:38 UTC (permalink / raw)
  To: tj; +Cc: linux-kernel, netdev
In-Reply-To: <1292169185-10579-1-git-send-email-tj@kernel.org>

From: Tejun Heo <tj@kernel.org>
Date: Sun, 12 Dec 2010 16:52:56 +0100

> This patchset removes the use of flush_scheduled_work(), which is
> being deprecated, from various network drivers.  It contains the
> following nine patches.
> 
>  0001-drivers-net-remove-unnecessary-flush_scheduled_work-.patch
>  0002-drivers-net-don-t-use-flush_scheduled_work.patch
>  0003-ehea-kill-unused-ehea_rereg_mr_task.patch
>  0004-ehea-don-t-use-flush_scheduled_work.patch
>  0005-iseries_veth-don-t-use-flush_scheduled_work.patch
>  0006-igb-v-ixgbe-don-t-use-flush_scheduled_work.patch
>  0007-sungem-update-gp-reset_task-flushing.patch
>  0008-i2400m-drop-i2400m_schedule_work.patch
>  0009-hostap-don-t-use-flush_scheduled_work.patch
> 
> 0001 and 0002 are straight forward conversions across multiple network
> drivers.  The rest are a bit more involved per-driver or driver family
> conversions.
> 
> This patchset is on top of the current net-next-2.6.git#master
> (ad1184c6cf067a13e8cb2a4e7ccc407f947027d0) and available in the
> following git branch.
> 
>  git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq.git net-dev-kill-flush_scheduled_work
> 
> diffstat follows.  Thanks.

I spent the afternoon going over these and they look good to me.
Pulled, thanks a lot.

If any follow-up bug fixes show up just send me relative patches,
thanks again!

^ permalink raw reply

* Re: [GIT PULL net-2.6] vhost-net: logging fixup
From: David Miller @ 2010-12-12 22:21 UTC (permalink / raw)
  To: mst; +Cc: kvm, virtualization, netdev, linux-kernel, stable
In-Reply-To: <20101212100943.GA12725@redhat.com>

From: "Michael S. Tsirkin" <mst@redhat.com>
Date: Sun, 12 Dec 2010 12:09:43 +0200

> Please merge the following fix for 2.6.37.
> It is also applicable to -stable.
> Thanks!
> 
> The following changes since commit a19faf0250e09b16cac169354126404bc8aa342b:
> 
>   net: fix skb_defer_rx_timestamp() (2010-12-10 16:20:56 -0800)

Pulled, thanks.

^ permalink raw reply

* [PATCH] WAN: Fix a TX IRQ causing BUG() in PC300 and PCI200SYN drivers.
From: Krzysztof Halasa @ 2010-12-12 22:06 UTC (permalink / raw)
  To: David Miller; +Cc: netdev

We must not wake the TX queue without free TX descriptors.
sca_xmit() expects at least one free descriptor and BUGs otherwise.

Problem reported and fix tested by Bernie Innocenti and Ward Vandewege.

Signed-off-by: Krzysztof Hałasa <khc@pm.waw.pl>

--- a/drivers/net/wan/hd64572.c
+++ b/drivers/net/wan/hd64572.c
@@ -293,6 +293,7 @@ static inline void sca_tx_done(port_t *port)
 	struct net_device *dev = port->netdev;
 	card_t* card = port->card;
 	u8 stat;
+	unsigned count = 0;
 
 	spin_lock(&port->lock);
 
@@ -316,10 +317,12 @@ static inline void sca_tx_done(port_t *port)
 			dev->stats.tx_bytes += readw(&desc->len);
 		}
 		writeb(0, &desc->stat);	/* Free descriptor */
+		count++;
 		port->txlast = (port->txlast + 1) % card->tx_ring_buffers;
 	}
 
-	netif_wake_queue(dev);
+	if (count)
+		netif_wake_queue(dev);
 	spin_unlock(&port->lock);
 }
 

^ permalink raw reply


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox