Netdev List
 help / color / mirror / Atom feed
* [net-next-2.6 PATCH 1/5] igb: fix PHY config access on 82580
From: Jeff Kirsher @ 2010-07-01 23:37 UTC (permalink / raw)
  To: davem; +Cc: netdev, gospo, bphilips, Nicholas Nunley, Jeff Kirsher

From: Nick Nunley <nicholasx.d.nunley@intel.com>

82580 NICs can have up to 4 functions. This fixes phy accesses
to use the correct locks for functions 2 and 3.

Signed-off-by: Nicholas Nunley <nicholasx.d.nunley@intel.com>
Tested-by: Jeff Pieper <jeffrey.e.pieper@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---

 drivers/net/igb/e1000_82575.c   |    8 ++++++++
 drivers/net/igb/e1000_defines.h |    2 ++
 2 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/drivers/net/igb/e1000_82575.c b/drivers/net/igb/e1000_82575.c
index 86438b5..06251a9 100644
--- a/drivers/net/igb/e1000_82575.c
+++ b/drivers/net/igb/e1000_82575.c
@@ -295,6 +295,10 @@ static s32 igb_acquire_phy_82575(struct e1000_hw *hw)
 
 	if (hw->bus.func == E1000_FUNC_1)
 		mask = E1000_SWFW_PHY1_SM;
+	else if (hw->bus.func == E1000_FUNC_2)
+		mask = E1000_SWFW_PHY2_SM;
+	else if (hw->bus.func == E1000_FUNC_3)
+		mask = E1000_SWFW_PHY3_SM;
 
 	return igb_acquire_swfw_sync_82575(hw, mask);
 }
@@ -312,6 +316,10 @@ static void igb_release_phy_82575(struct e1000_hw *hw)
 
 	if (hw->bus.func == E1000_FUNC_1)
 		mask = E1000_SWFW_PHY1_SM;
+	else if (hw->bus.func == E1000_FUNC_2)
+		mask = E1000_SWFW_PHY2_SM;
+	else if (hw->bus.func == E1000_FUNC_3)
+		mask = E1000_SWFW_PHY3_SM;
 
 	igb_release_swfw_sync_82575(hw, mask);
 }
diff --git a/drivers/net/igb/e1000_defines.h b/drivers/net/igb/e1000_defines.h
index 24d9be6..90bc29d 100644
--- a/drivers/net/igb/e1000_defines.h
+++ b/drivers/net/igb/e1000_defines.h
@@ -164,6 +164,8 @@
 #define E1000_SWFW_EEP_SM   0x1
 #define E1000_SWFW_PHY0_SM  0x2
 #define E1000_SWFW_PHY1_SM  0x4
+#define E1000_SWFW_PHY2_SM  0x20
+#define E1000_SWFW_PHY3_SM  0x40
 
 /* FACTPS Definitions */
 /* Device Control */


^ permalink raw reply related

* [net-next-2.6 PATCH] x86: Drop CONFIG_MCORE2 check around setting of NET_IP_ALIGN
From: Jeff Kirsher @ 2010-07-01 23:28 UTC (permalink / raw)
  To: davem
  Cc: netdev, gospo, bphilips, Andi Kleen, Thomas Gleixner, Ingo Molnar,
	H. Peter Anvin, x86, Alexander Duyck, Jeff Kirsher

From: Alexander Duyck <alexander.h.duyck@intel.com>

This patch removes the CONFIG_MCORE2 check from around NET_IP_ALIGN.  It is
based on a suggestion from Andi Kleen.  The assumption is that there are
not any x86 cores where unaligned access is really slow, and this change
would allow for a performance improvement to still exist on configurations
that are not necessarily optimized for Core 2.

Cc: Andi Kleen <ak@linux.intel.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: x86@kernel.org
Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---

 arch/x86/include/asm/system.h |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/arch/x86/include/asm/system.h b/arch/x86/include/asm/system.h
index b4293fc..1db9bd2 100644
--- a/arch/x86/include/asm/system.h
+++ b/arch/x86/include/asm/system.h
@@ -457,7 +457,6 @@ static inline void rdtsc_barrier(void)
 	alternative(ASM_NOP3, "lfence", X86_FEATURE_LFENCE_RDTSC);
 }
 
-#ifdef CONFIG_MCORE2
 /*
  * We handle most unaligned accesses in hardware.  On the other hand
  * unaligned DMA can be quite expensive on some Nehalem processors.
@@ -465,5 +464,4 @@ static inline void rdtsc_barrier(void)
  * Based on this we disable the IP header alignment in network drivers.
  */
 #define NET_IP_ALIGN	0
-#endif
 #endif /* _ASM_X86_SYSTEM_H */


^ permalink raw reply related

* [net-2.6 PATCH 2/2] net: decreasing real_num_tx_queues needs to flush qdisc
From: Jeff Kirsher @ 2010-07-01 23:21 UTC (permalink / raw)
  To: davem; +Cc: netdev, gospo, bphilips, John Fastabend, Jeff Kirsher
In-Reply-To: <20100701232103.15685.48453.stgit@localhost.localdomain>

From: John Fastabend <john.r.fastabend@intel.com>

Reducing real_num_queues needs to flush the qdisc otherwise
skbs with queue_mappings greater then real_num_tx_queues can
be sent to the underlying driver.

The flow for this is,

dev_queue_xmit()
	dev_pick_tx()
		skb_tx_hash()  => hash using real_num_tx_queues
		skb_set_queue_mapping()
	...
	qdisc_enqueue_root() => enqueue skb on txq from hash
...
dev->real_num_tx_queues -= n
...
sch_direct_xmit()
	dev_hard_start_xmit()
		ndo_start_xmit(skb,dev) => skb queue set with old hash

skbs are enqueued on the qdisc with skb->queue_mapping set
0 < queue_mappings < real_num_tx_queues.  When the driver
decreases real_num_tx_queues skb's may be dequeued from the
qdisc with a queue_mapping greater then real_num_tx_queues.

This fixes a case in ixgbe where this was occurring with DCB
and FCoE. Because the driver is using queue_mapping to map
skbs to tx descriptor rings we can potentially map skbs to
rings that no longer exist.

Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
Tested-by: Ross Brattain <ross.b.brattain@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---

 drivers/net/ixgbe/ixgbe_main.c |    2 +-
 include/linux/netdevice.h      |    3 +++
 include/net/sch_generic.h      |   12 ++++++++----
 net/core/dev.c                 |   18 ++++++++++++++++++
 4 files changed, 30 insertions(+), 5 deletions(-)

diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c
index a0b3316..7b5d976 100644
--- a/drivers/net/ixgbe/ixgbe_main.c
+++ b/drivers/net/ixgbe/ixgbe_main.c
@@ -4001,7 +4001,7 @@ static void ixgbe_set_num_queues(struct ixgbe_adapter *adapter)
 
 done:
 	/* Notify the stack of the (possibly) reduced Tx Queue count. */
-	adapter->netdev->real_num_tx_queues = adapter->num_tx_queues;
+	netif_set_real_num_tx_queues(adapter->netdev, adapter->num_tx_queues);
 }
 
 static void ixgbe_acquire_msix_vectors(struct ixgbe_adapter *adapter,
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 40291f3..5e6188d 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -1656,6 +1656,9 @@ static inline int netif_is_multiqueue(const struct net_device *dev)
 	return (dev->num_tx_queues > 1);
 }
 
+extern void netif_set_real_num_tx_queues(struct net_device *dev,
+					 unsigned int txq);
+
 /* Use this variant when it is known for sure that it
  * is executing from hardware interrupt context or with hardware interrupts
  * disabled.
diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h
index ba749be..433604b 100644
--- a/include/net/sch_generic.h
+++ b/include/net/sch_generic.h
@@ -313,13 +313,12 @@ extern void qdisc_calculate_pkt_len(struct sk_buff *skb,
 extern void tcf_destroy(struct tcf_proto *tp);
 extern void tcf_destroy_chain(struct tcf_proto **fl);
 
-/* Reset all TX qdiscs of a device.  */
-static inline void qdisc_reset_all_tx(struct net_device *dev)
+/* Reset all TX qdiscs greater then index of a device.  */
+static inline void qdisc_reset_all_tx_gt(struct net_device *dev, unsigned int i)
 {
-	unsigned int i;
 	struct Qdisc *qdisc;
 
-	for (i = 0; i < dev->num_tx_queues; i++) {
+	for (; i < dev->num_tx_queues; i++) {
 		qdisc = netdev_get_tx_queue(dev, i)->qdisc;
 		if (qdisc) {
 			spin_lock_bh(qdisc_lock(qdisc));
@@ -329,6 +328,11 @@ static inline void qdisc_reset_all_tx(struct net_device *dev)
 	}
 }
 
+static inline void qdisc_reset_all_tx(struct net_device *dev)
+{
+	qdisc_reset_all_tx_gt(dev, 0);
+}
+
 /* Are all TX queues of the device empty?  */
 static inline bool qdisc_all_tx_empty(const struct net_device *dev)
 {
diff --git a/net/core/dev.c b/net/core/dev.c
index 2b3bf53..723a347 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -1553,6 +1553,24 @@ static void dev_queue_xmit_nit(struct sk_buff *skb, struct net_device *dev)
 	rcu_read_unlock();
 }
 
+/*
+ * Routine to help set real_num_tx_queues. To avoid skbs mapped to queues
+ * greater then real_num_tx_queues stale skbs on the qdisc must be flushed.
+ */
+void netif_set_real_num_tx_queues(struct net_device *dev, unsigned int txq)
+{
+	unsigned int real_num = dev->real_num_tx_queues;
+
+	if (unlikely(txq > dev->num_tx_queues))
+		;
+	else if (txq > real_num)
+		dev->real_num_tx_queues = txq;
+	else if (txq < real_num) {
+		dev->real_num_tx_queues = txq;
+		qdisc_reset_all_tx_gt(dev, txq);
+	}
+}
+EXPORT_SYMBOL(netif_set_real_num_tx_queues);
 
 static inline void __netif_reschedule(struct Qdisc *q)
 {


^ permalink raw reply related

* [net-2.6 PATCH 1/2] sched: qdisc_reset_all_tx is calling qdisc_reset without qdisc_lock
From: Jeff Kirsher @ 2010-07-01 23:21 UTC (permalink / raw)
  To: davem; +Cc: netdev, gospo, bphilips, John Fastabend, Jeff Kirsher

From: John Fastabend <john.r.fastabend@intel.com>

When calling qdisc_reset() the qdisc lock needs to be held.  In
this case there is at least one driver i4l which is using this
without holding the lock.  Add the locking here.

Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---

 include/net/sch_generic.h |   12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h
index 03ca5d8..ba749be 100644
--- a/include/net/sch_generic.h
+++ b/include/net/sch_generic.h
@@ -317,8 +317,16 @@ extern void tcf_destroy_chain(struct tcf_proto **fl);
 static inline void qdisc_reset_all_tx(struct net_device *dev)
 {
 	unsigned int i;
-	for (i = 0; i < dev->num_tx_queues; i++)
-		qdisc_reset(netdev_get_tx_queue(dev, i)->qdisc);
+	struct Qdisc *qdisc;
+
+	for (i = 0; i < dev->num_tx_queues; i++) {
+		qdisc = netdev_get_tx_queue(dev, i)->qdisc;
+		if (qdisc) {
+			spin_lock_bh(qdisc_lock(qdisc));
+			qdisc_reset(qdisc);
+			spin_unlock_bh(qdisc_lock(qdisc));
+		}
+	}
 }
 
 /* Are all TX queues of the device empty?  */


^ permalink raw reply related

* [PATCH] linux/net.h: fix kernel-doc warnings
From: Randy Dunlap @ 2010-07-01 23:18 UTC (permalink / raw)
  To: netdev; +Cc: davem

From: Randy Dunlap <randy.dunlap@oracle.com>

Fix kernel-doc warnings in linux/net.h:

Warning(include/linux/net.h:151): No description found for parameter 'wq'
Warning(include/linux/net.h:151): Excess struct/union/enum/typedef member 'fasync_list' description in 'socket'
Warning(include/linux/net.h:151): Excess struct/union/enum/typedef member 'wait' description in 'socket'

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
---
 include/linux/net.h |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

--- linux-2.6.35-rc3-git5.orig/include/linux/net.h
+++ linux-2.6.35-rc3-git5/include/linux/net.h
@@ -129,10 +129,9 @@ struct socket_wq {
  *  @type: socket type (%SOCK_STREAM, etc)
  *  @flags: socket flags (%SOCK_ASYNC_NOSPACE, etc)
  *  @ops: protocol specific socket operations
- *  @fasync_list: Asynchronous wake up list
  *  @file: File back pointer for gc
  *  @sk: internal networking protocol agnostic socket representation
- *  @wait: wait queue for several uses
+ *  @wq: wait queue for several uses
  */
 struct socket {
 	socket_state		state;

^ permalink raw reply

* Re: [linux-pm] [PATCH 3/3] pm_qos: get rid of the allocation in pm_qos_add_request()
From: Rafael J. Wysocki @ 2010-07-01 22:38 UTC (permalink / raw)
  To: James Bottomley; +Cc: linux-pm, markgross, Takashi Iwai, netdev
In-Reply-To: <1278023439.2813.388.camel@mulgrave.site>

On Friday, July 02, 2010, James Bottomley wrote:
> On Fri, 2010-07-02 at 00:23 +0200, Rafael J. Wysocki wrote:
> > I would apply this one too, but I need a final changelog for it.  Care to send?
> 
> How about:
> 
> All current users of pm_qos_add_request() have the ability to supply the
> memory required by the pm_qos routines, so make them do this and
> eliminate the kmalloc() with pm_qos_add_request().  This has the double
> benefit of making the call never fail and allowing it to be called from
> atomic context.
> 
> + signoffs

OK

I'll apply it shortly.

Rafael

^ permalink raw reply

* Re: [linux-pm] [PATCH 3/3] pm_qos: get rid of the allocation in pm_qos_add_request()
From: James Bottomley @ 2010-07-01 22:30 UTC (permalink / raw)
  To: Rafael J. Wysocki; +Cc: linux-pm, markgross, Takashi Iwai, netdev
In-Reply-To: <201007020023.13815.rjw@sisk.pl>

On Fri, 2010-07-02 at 00:23 +0200, Rafael J. Wysocki wrote:
> I would apply this one too, but I need a final changelog for it.  Care to send?

How about:

All current users of pm_qos_add_request() have the ability to supply the
memory required by the pm_qos routines, so make them do this and
eliminate the kmalloc() with pm_qos_add_request().  This has the double
benefit of making the call never fail and allowing it to be called from
atomic context.

+ signoffs

James



^ permalink raw reply

* Re: [linux-pm] [PATCH 3/3] pm_qos: get rid of the allocation in pm_qos_add_request()
From: Rafael J. Wysocki @ 2010-07-01 22:23 UTC (permalink / raw)
  To: James Bottomley; +Cc: linux-pm, markgross, Takashi Iwai, netdev
In-Reply-To: <20100629043954.GB6250@gvim.org>

On Tuesday, June 29, 2010, mark gross wrote:
> On Mon, Jun 28, 2010 at 12:44:48PM -0500, James Bottomley wrote:
> > Since every caller has to squirrel away the returned pointer anyway,
> > they might as well supply the memory area.  This fixes a bug in a few of
> > the call sites where the returned pointer was dereferenced without
> > checking it for NULL (which gets returned if the kzalloc failed).
> > 
> > I'd like to hear how sound and netdev feels about this: it will add
> > about two more pointers worth of data to struct netdev and struct
> > snd_pcm_substream .. but I think it's worth it.  If you're OK, I'll add
> > your acks and send through the pm tree.
> > 
> > This also looks to me like an android independent clean up (even though
> > it renders the request_add atomically callable).  I also added include
> > guards to include/linux/pm_qos_params.h
> > 
> > cc: netdev@vger.kernel.org
> > cc: Takashi Iwai <tiwai@suse.de>
> > Signed-off-by: James Bottomley <James.Bottomley@suse.de>
> Thank you for doing this!, I'll integrate it into some testing targets
> in the morning!
> 
> Signed-off-by: mark gross <markgross@thegnar.org>

I would apply this one too, but I need a final changelog for it.  Care to send?

Rafael

^ permalink raw reply

* [GIT PULL rcu/urgent] revert ->br_port fix, obsoleted by netdev commit
From: Paul E. McKenney @ 2010-07-01 21:56 UTC (permalink / raw)
  To: mingo; +Cc: linux-kernel, arnd, davem, shemminger, netdev, eric.dumazet, sfr

Hello, Ingo,

This pull request reverts commit 81bdf5bd, which has been obsoleted
by commit f350a0a87374 from the netdev folks.  This conflict was caught
in the -next tree.

  git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-2.6-rcu.git rcu/next

							Thanx, Paul

------------------>
Paul E. McKenney (1):
      Revert "net: Make accesses to ->br_port safe for sparse RCU"

 include/linux/if_bridge.h           |    3 ---
 net/bridge/br_fdb.c                 |    2 +-
 net/bridge/br_private.h             |    5 -----
 net/bridge/netfilter/ebt_redirect.c |    2 +-
 net/bridge/netfilter/ebt_ulog.c     |    4 ++--
 net/bridge/netfilter/ebtables.c     |    4 ++--
 net/netfilter/nfnetlink_log.c       |    4 ++--
 net/netfilter/nfnetlink_queue.c     |    4 ++--
 8 files changed, 10 insertions(+), 18 deletions(-)

^ permalink raw reply

* RE: [Bugme-new] [Bug 16293] New: 82545GM in newest kernel not working.
From: Tantilov, Emil S @ 2010-07-01 21:40 UTC (permalink / raw)
  To: Andrew Morton, netdev@vger.kernel.org, Kirsher, Jeffrey T,
	"Brandeburg, Jesse" <jesse.brandeburg
  Cc: bugzilla-daemon@bugzilla.kernel.org,
	bugme-daemon@bugzilla.kernel.org, lukas.valach@zoznam.sk
In-Reply-To: <20100701140041.df2d147c.akpm@linux-foundation.org>

Andrew Morton wrote:
> (switched to email.  Please respond via emailed reply-to-all, not via
> the bugzilla web interface).
> 
> On Fri, 25 Jun 2010 17:48:43 GMT
> bugzilla-daemon@bugzilla.kernel.org wrote:
> 
>> https://bugzilla.kernel.org/show_bug.cgi?id=16293
>> 
>>            Summary: 82545GM in newest kernel not working.           
>>            Product: Drivers Version: 2.5
>>     Kernel Version: 2.6.32.15
>>           Platform: All
>>         OS/Version: Linux
>>               Tree: Mainline
>>             Status: NEW
>>           Severity: high
>>           Priority: P1
>>          Component: Network
>>         AssignedTo: drivers_network@kernel-bugs.osdl.org
>>         ReportedBy: lukas.valach@zoznam.sk
>>         Regression: No
>> 
>> 
>> lspci:
>> 
>> 01:01.0 Ethernet controller: Intel Corporation 82545GM Gigabit
>> Ethernet Controller (rev 04) 01:02.0 Ethernet controller: Intel
>> Corporation 82545GM Gigabit Ethernet Controller (rev 04) 02:01.0
>> Ethernet controller: Intel Corporation 82546GB Gigabit Ethernet
>> Controller (rev 03) 02:01.1 Ethernet controller: Intel Corporation
>> 82546GB Gigabit Ethernet Controller (rev 03)  
>> 
>> All interface are correctly configured. In kernel <2.6.26 get all
>> OK, in newest kernels network interfaces are not working. Problem is
>> in driver e1000. Tested on 2.6.31,2.6.32,2.6.34 and 2.6.35rc.
> 
> A somewhat old e1000 regression?

I ran a quick test on net-next with 82545GM NICs and was able to pass traffic without issues.

Would it be possible to get more information about the system/setup:

1. full lspci output (lspci -vvv)
2. ethtool -i ethX
3. ethtool -d ethX
4. ethtool -e ethX
5. dmesg  - after loading the driver and configuring the interfaces
6. kernel config

A better description of the issue would help as well. What exactly fails - ping?

Thanks,
Emil

^ permalink raw reply

* Re: [Bugme-new] [Bug 16293] New: 82545GM in newest kernel not working.
From: Andrew Morton @ 2010-07-01 21:00 UTC (permalink / raw)
  To: netdev, Jeff Kirsher, Jesse Brandeburg, Bruce Allan,
	Alex Duyck <alexander.h.duyck
  Cc: bugzilla-daemon, bugme-daemon, lukas.valach
In-Reply-To: <bug-16293-10286@https.bugzilla.kernel.org/>


(switched to email.  Please respond via emailed reply-to-all, not via the
bugzilla web interface).

On Fri, 25 Jun 2010 17:48:43 GMT
bugzilla-daemon@bugzilla.kernel.org wrote:

> https://bugzilla.kernel.org/show_bug.cgi?id=16293
> 
>            Summary: 82545GM in newest kernel not working.
>            Product: Drivers
>            Version: 2.5
>     Kernel Version: 2.6.32.15
>           Platform: All
>         OS/Version: Linux
>               Tree: Mainline
>             Status: NEW
>           Severity: high
>           Priority: P1
>          Component: Network
>         AssignedTo: drivers_network@kernel-bugs.osdl.org
>         ReportedBy: lukas.valach@zoznam.sk
>         Regression: No
> 
> 
> lspci:
> 
> 01:01.0 Ethernet controller: Intel Corporation 82545GM Gigabit Ethernet
> Controller (rev 04)
> 01:02.0 Ethernet controller: Intel Corporation 82545GM Gigabit Ethernet
> Controller (rev 04)
> 02:01.0 Ethernet controller: Intel Corporation 82546GB Gigabit Ethernet
> Controller (rev 03)
> 02:01.1 Ethernet controller: Intel Corporation 82546GB Gigabit Ethernet
> Controller (rev 03)
> 
> All interface are correctly configured. In kernel <2.6.26 get all OK, in newest
> kernels network interfaces are not working. Problem is in driver e1000. Tested
> on 2.6.31,2.6.32,2.6.34 and 2.6.35rc.

A somewhat old e1000 regression?

^ permalink raw reply

* Re: [net-next-2.6 PATCH v2] x86: Align skb w/ start of cacheline on newer core 2/Xeon Arch
From: H. Peter Anvin @ 2010-07-01 20:41 UTC (permalink / raw)
  To: Alexander Duyck
  Cc: Andi Kleen, Kirsher, Jeffrey T, davem@davemloft.net,
	netdev@vger.kernel.org, gospo@redhat.com, bphilips@novell.com,
	Thomas Gleixner, Ingo Molnar, x86@kernel.org
In-Reply-To: <4C2CFC87.6020003@intel.com>

On 07/01/2010 01:37 PM, Alexander Duyck wrote:
> Andi Kleen wrote:
>> Jeff Kirsher <jeffrey.t.kirsher@intel.com> writes:
>>
>>
>> Sorry for the late comment.
>>
>>>  
>>> +#ifdef CONFIG_MCORE2
>>> +/*
>>> + * We handle most unaligned accesses in hardware.  On the other hand
>>> + * unaligned DMA can be quite expensive on some Nehalem processors.
>>> + *
>>> + * Based on this we disable the IP header alignment in network drivers.
>>> + */
>>> +#define NET_IP_ALIGN	0
>>> +#endif
>>>  #endif /* _ASM_X86_SYSTEM_H */
>>
>> The ifdef should be imho dropped and the option be made unconditional
>> for all x86. I am not aware of any x86 core where unalignment is really
>> slow. This would increase the chance of it actually working on many
>> configurations which do not necessarily optimize for Core2.
>>
>> -Andi
> 
> Seems to make sense to me.  I will see about generating a patch that 
> drops the check for CONFIG_MCORE2.
> 

Just drop the #ifdef ... #endif.

	-hpa

^ permalink raw reply

* Re: [net-next-2.6 PATCH v2] x86: Align skb w/ start of cacheline on newer core 2/Xeon Arch
From: Alexander Duyck @ 2010-07-01 20:37 UTC (permalink / raw)
  To: Andi Kleen
  Cc: Kirsher, Jeffrey T, davem@davemloft.net, netdev@vger.kernel.org,
	gospo@redhat.com, bphilips@novell.com, Thomas Gleixner,
	Ingo Molnar, H. Peter Anvin, x86@kernel.org
In-Reply-To: <87tyojzbjm.fsf@basil.nowhere.org>

Andi Kleen wrote:
> Jeff Kirsher <jeffrey.t.kirsher@intel.com> writes:
> 
> 
> Sorry for the late comment.
> 
>>  
>> +#ifdef CONFIG_MCORE2
>> +/*
>> + * We handle most unaligned accesses in hardware.  On the other hand
>> + * unaligned DMA can be quite expensive on some Nehalem processors.
>> + *
>> + * Based on this we disable the IP header alignment in network drivers.
>> + */
>> +#define NET_IP_ALIGN	0
>> +#endif
>>  #endif /* _ASM_X86_SYSTEM_H */
> 
> The ifdef should be imho dropped and the option be made unconditional
> for all x86. I am not aware of any x86 core where unalignment is really
> slow. This would increase the chance of it actually working on many
> configurations which do not necessarily optimize for Core2.
> 
> -Andi

Seems to make sense to me.  I will see about generating a patch that 
drops the check for CONFIG_MCORE2.

Thanks,

Alex

^ permalink raw reply

* Re: [PATCH] vlan_dev: VLAN 0 should be treated as "no vlan tag" (802.1p packet)
From: Eric Dumazet @ 2010-07-01 20:19 UTC (permalink / raw)
  To: Pedro Garcia; +Cc: netdev, Patrick McHardy, Ben Hutchings, David Miller
In-Reply-To: <a372414c0d74e9ab599d095627353d94@dondevamos.com>

Le jeudi 01 juillet 2010 à 20:47 +0200, Pedro Garcia a écrit :
> The patch with the modifications suggested by David.
> 
> - Without the 8021q module loaded in the kernel, all 802.1p packets 
> (VLAN 0 but QoS tagging) are silently discarded (as expected, as 
> the protocol is not loaded).
> 
> - Without this patch in 8021q module, these packets are forwarded to 
> the module, but they are discarded also if VLAN 0 is not configured,
> which should not be the default behaviour, as VLAN 0 is not really
> a VLANed packet but a 802.1p packet. Defining VLAN 0 makes it almost
> impossible to communicate with mixed 802.1p and non 802.1p devices on
> the same network due to arp table issues.
> 
> - Changed logic to skip vlan specific code in vlan_skb_recv if VLAN 
> is 0 and we have not defined a VLAN with ID 0, but we accept the 
> packet with the encapsulated proto and pass it later to netif_rx.
> 
> - In the vlan device event handler, added some logic to add VLAN 0 
> to HW filter in devices that support it (this prevented any traffic
> in VLAN 0 to reach the stack in e1000e with HW filter under 2.6.35,
> and probably also with other HW filtered cards, so we fix it here).
> 
> - In the vlan unregister logic, prevent the elimination of VLAN 0 
> in devices with HW filter.
> 
> - The default behaviour is to ignore the VLAN 0 tagging and accept
> the packet as if it was not tagged, but we can still define a 
> VLAN 0 if desired (so it is backwards compatible).
> 
> Signed-off-by: Pedro Garcia <pedro.netdev@dondevamos.com>


Seems fine but you need to respin your patch against latest net-next-2.6
tree.

Check your tree got commit 9618e2ffd78aaa (vlan: 64 bit rx counters)

Thanks !



^ permalink raw reply

* Re: [PATCH] vlan_dev: VLAN 0 should be treated as "no vlan tag" (802.1p packet)
From: Pedro Garcia @ 2010-07-01 18:47 UTC (permalink / raw)
  To: netdev; +Cc: Patrick McHardy, Ben Hutchings, Eric Dumazet, David Miller
In-Reply-To: <20100630.131616.233403329.davem@davemloft.net>

The patch with the modifications suggested by David.

- Without the 8021q module loaded in the kernel, all 802.1p packets 
(VLAN 0 but QoS tagging) are silently discarded (as expected, as 
the protocol is not loaded).

- Without this patch in 8021q module, these packets are forwarded to 
the module, but they are discarded also if VLAN 0 is not configured,
which should not be the default behaviour, as VLAN 0 is not really
a VLANed packet but a 802.1p packet. Defining VLAN 0 makes it almost
impossible to communicate with mixed 802.1p and non 802.1p devices on
the same network due to arp table issues.

- Changed logic to skip vlan specific code in vlan_skb_recv if VLAN 
is 0 and we have not defined a VLAN with ID 0, but we accept the 
packet with the encapsulated proto and pass it later to netif_rx.

- In the vlan device event handler, added some logic to add VLAN 0 
to HW filter in devices that support it (this prevented any traffic
in VLAN 0 to reach the stack in e1000e with HW filter under 2.6.35,
and probably also with other HW filtered cards, so we fix it here).

- In the vlan unregister logic, prevent the elimination of VLAN 0 
in devices with HW filter.

- The default behaviour is to ignore the VLAN 0 tagging and accept
the packet as if it was not tagged, but we can still define a 
VLAN 0 if desired (so it is backwards compatible).

Signed-off-by: Pedro Garcia <pedro.netdev@dondevamos.com>
--
diff --git a/net/8021q/vlan.c b/net/8021q/vlan.c
index 3c1c8c1..a2ad152 100644
--- a/net/8021q/vlan.c
+++ b/net/8021q/vlan.c
@@ -155,9 +155,10 @@ void unregister_vlan_dev(struct net_device *dev, struct list_head *head)
 	BUG_ON(!grp);
 
 	/* Take it out of our own structures, but be sure to interlock with
-	 * HW accelerating devices or SW vlan input packet processing.
+	 * HW accelerating devices or SW vlan input packet processing if
+	 * VLAN is not 0 (leave it there for 802.1p).
 	 */
-	if (real_dev->features & NETIF_F_HW_VLAN_FILTER)
+	if (vlan_id && (real_dev->features & NETIF_F_HW_VLAN_FILTER))
 		ops->ndo_vlan_rx_kill_vid(real_dev, vlan_id);
 
 	grp->nr_vlans--;
@@ -419,6 +420,14 @@ static int vlan_device_event(struct notifier_block *unused, unsigned long event,
 	if (is_vlan_dev(dev))
 		__vlan_device_event(dev, event);
 
+	if ((event == NETDEV_UP) &&
+	    (dev->features & NETIF_F_HW_VLAN_FILTER) &&
+	    dev->netdev_ops->ndo_vlan_rx_add_vid) {
+		pr_info("8021q: adding VLAN 0 to HW filter on device %s\n",
+			dev->name);
+		dev->netdev_ops->ndo_vlan_rx_add_vid(dev, 0);
+	}
+
 	grp = __vlan_find_group(dev);
 	if (!grp)
 		goto out;
diff --git a/net/8021q/vlan_core.c b/net/8021q/vlan_core.c
index 50f58f5..0f91f46 100644
--- a/net/8021q/vlan_core.c
+++ b/net/8021q/vlan_core.c
@@ -8,6 +8,9 @@
 int __vlan_hwaccel_rx(struct sk_buff *skb, struct vlan_group *grp,
 		      u16 vlan_tci, int polling)
 {
+	struct net_device *vlan_dev;
+	u16 vlan_id;
+
 	if (netpoll_rx(skb))
 		return NET_RX_DROP;
 
@@ -16,9 +19,12 @@ int __vlan_hwaccel_rx(struct sk_buff *skb, struct vlan_group *grp,
 
 	skb->skb_iif = skb->dev->ifindex;
 	__vlan_hwaccel_put_tag(skb, vlan_tci);
-	skb->dev = vlan_group_get_device(grp, vlan_tci & VLAN_VID_MASK);
+	vlan_id = vlan_tci & VLAN_VID_MASK;
+	vlan_dev = vlan_group_get_device(grp, vlan_id);
 
-	if (!skb->dev)
+	if (vlan_dev)
+		skb->dev = vlan_dev;
+	else if (vlan_id)
 		goto drop;
 
 	return (polling ? netif_receive_skb(skb) : netif_rx(skb));
@@ -82,15 +88,20 @@ vlan_gro_common(struct napi_struct *napi, struct vlan_group *grp,
 		unsigned int vlan_tci, struct sk_buff *skb)
 {
 	struct sk_buff *p;
+	struct net_device *vlan_dev;
+	u16 vlan_id;
 
 	if (skb_bond_should_drop(skb, ACCESS_ONCE(skb->dev->master)))
 		skb->deliver_no_wcard = 1;
 
 	skb->skb_iif = skb->dev->ifindex;
 	__vlan_hwaccel_put_tag(skb, vlan_tci);
-	skb->dev = vlan_group_get_device(grp, vlan_tci & VLAN_VID_MASK);
+	vlan_id = vlan_tci & VLAN_VID_MASK;
+	vlan_dev = vlan_group_get_device(grp, vlan_id);
 
-	if (!skb->dev)
+	if (vlan_dev)
+		skb->dev = vlan_dev;
+	else if (vlan_id)
 		goto drop;
 
 	for (p = napi->gro_list; p; p = p->next) {
diff --git a/net/8021q/vlan_dev.c b/net/8021q/vlan_dev.c
index 5298426..21f7229 100644
--- a/net/8021q/vlan_dev.c
+++ b/net/8021q/vlan_dev.c
@@ -142,6 +142,7 @@ int vlan_skb_recv(struct sk_buff *skb, struct net_device *dev,
 {
 	struct vlan_hdr *vhdr;
 	struct vlan_rx_stats *rx_stats;
+	struct net_device *vlan_dev;
 	u16 vlan_id;
 	u16 vlan_tci;
 
@@ -157,53 +158,69 @@ int vlan_skb_recv(struct sk_buff *skb, struct net_device *dev,
 	vlan_id = vlan_tci & VLAN_VID_MASK;
 
 	rcu_read_lock();
-	skb->dev = __find_vlan_dev(dev, vlan_id);
-	if (!skb->dev) {
-		pr_debug("%s: ERROR: No net_device for VID: %u on dev: %s\n",
-			 __func__, vlan_id, dev->name);
-		goto err_unlock;
-	}
-
-	rx_stats = per_cpu_ptr(vlan_dev_info(skb->dev)->vlan_rx_stats,
-			       smp_processor_id());
-	rx_stats->rx_packets++;
-	rx_stats->rx_bytes += skb->len;
-
-	skb_pull_rcsum(skb, VLAN_HLEN);
-
-	skb->priority = vlan_get_ingress_priority(skb->dev, vlan_tci);
+	vlan_dev = __find_vlan_dev(dev, vlan_id);
 
-	pr_debug("%s: priority: %u for TCI: %hu\n",
-		 __func__, skb->priority, vlan_tci);
-
-	switch (skb->pkt_type) {
-	case PACKET_BROADCAST: /* Yeah, stats collect these together.. */
-		/* stats->broadcast ++; // no such counter :-( */
-		break;
-
-	case PACKET_MULTICAST:
-		rx_stats->multicast++;
-		break;
+	/* If the VLAN device is defined, we use it.
+	 * If not, and the VID is 0, it is a 802.1p packet (not
+	 * really a VLAN), so we will just netif_rx it later to the
+	 * original interface, but with the skb->proto set to the
+	 * wrapped proto: we do nothing here.
+	 */
 
-	case PACKET_OTHERHOST:
-		/* Our lower layer thinks this is not local, let's make sure.
-		 * This allows the VLAN to have a different MAC than the
-		 * underlying device, and still route correctly.
-		 */
-		if (!compare_ether_addr(eth_hdr(skb)->h_dest,
-					skb->dev->dev_addr))
-			skb->pkt_type = PACKET_HOST;
-		break;
-	default:
-		break;
+	if (!vlan_dev) {
+		if (vlan_id) {
+			pr_debug("%s: ERROR: No net_device for VID: %u on dev: %s\n",
+				 __func__, vlan_id, dev->name);
+			goto err_unlock;
+		}
+		rx_stats = NULL;
+	} else {
+		skb->dev = vlan_dev;
+
+		rx_stats = per_cpu_ptr(vlan_dev_info(skb->dev)->vlan_rx_stats,
+					smp_processor_id());
+		rx_stats->rx_packets++;
+		rx_stats->rx_bytes += skb->len;
+
+		skb->priority = vlan_get_ingress_priority(skb->dev, vlan_tci);
+
+		pr_debug("%s: priority: %u for TCI: %hu\n",
+			 __func__, skb->priority, vlan_tci);
+
+		switch (skb->pkt_type) {
+		case PACKET_BROADCAST:
+			/* Yeah, stats collect these together.. */
+			/* stats->broadcast ++; // no such counter :-( */
+			break;
+
+		case PACKET_MULTICAST:
+			rx_stats->multicast++;
+			break;
+
+		case PACKET_OTHERHOST:
+			/* Our lower layer thinks this is not local, let's make
+			* sure.
+			* This allows the VLAN to have a different MAC than the
+			* underlying device, and still route correctly.
+			*/
+			if (!compare_ether_addr(eth_hdr(skb)->h_dest,
+						skb->dev->dev_addr))
+				skb->pkt_type = PACKET_HOST;
+			break;
+		default:
+			break;
+		}
 	}
 
+	skb_pull_rcsum(skb, VLAN_HLEN);
 	vlan_set_encap_proto(skb, vhdr);
 
-	skb = vlan_check_reorder_header(skb);
-	if (!skb) {
-		rx_stats->rx_errors++;
-		goto err_unlock;
+	if (vlan_dev) {
+		skb = vlan_check_reorder_header(skb);
+		if (!skb) {
+			rx_stats->rx_errors++;
+			goto err_unlock;
+		}
 	}
 
 	netif_rx(skb);


^ permalink raw reply related

* pull request: wireless-next-2.6 2010-07-01
From: John W. Linville @ 2010-07-01 18:15 UTC (permalink / raw)
  To: davem-fT/PcQaiUtIeIZ0/mPfg9Q
  Cc: linux-wireless-u79uwXL29TY76Z2rM5mHXA,
	netdev-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA

David,

Two weeks since the last request, plenty of new stuff intended for
2.6.36...

Included are the usual bunch of driver updates, including a big
dump from the rt2x00 team.  This also includes cfg80211 support
for libertas, a flurry of (mostly trivial) stuff from me, and a
wireless-2.6 pull to resolve some patch dependencies.

Please let me know if there are problems!

Thanks,

John

---

The following changes since commit ea812ca1b06113597adcd8e70c0f84a413d97544:
  Alexander Duyck (1):
        x86: Align skb w/ start of cacheline on newer core 2/Xeon Arch

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6.git master

Bruno Randolf (1):
      ath5k: fix antenna div gc for <= AR5K_SREV_PHY_2413

Daniel Halperin (1):
      iwlwifi: update LQ for bcast station on channel change

Felix Fietkau (3):
      ath9k: fix retry count for A-MPDU rate control status reports
      mac80211: fix the for_each_sta_info macro
      ath9k: fix TSF after reset on AR913x

Gertjan van Wingerde (10):
      mac80211: Fix compile warning in scan.c.
      rt2x00: Fix frame dumping for USB devices.
      rt2x00: Move filling of TX URB to rt2x00usb_kick_tx_entry function.
      rt2x00: Merge PCI and USB versions of write_tx_data into single function.
      rt2x00: Move common txdone handling to rt2x00lib_txdone.
      rt2x00: Rename driver write_tx_datadesc callback function.
      rt2x00: Split of TXWI writing to write_tx_data callback in rt2800usb.
      eeprom_93cx6: Add support for 93c86 EEPROMs.
      rt2x00: Correctly detect 93C86 EEPROMs in rt2800pci.
      rt2x00: Align rt2800 EEPROM validation to Ralink vendor driver.

Helmut Schaa (6):
      rt2x00: Implement tx mpdu aggregation
      rt2x00: Fix beacon updates in rt2800pci
      rt2x00: Fix beacon updates in rt61pci
      rt2x00: Disable link tuning in AP mode
      rt2x00: fix beacon reset on rt2800
      mac82011: Allow selection of minstrel_ht as default rc algorithm

Ivo van Doorn (7):
      rt2x00: Write the BSSID to register when interface is added
      rt2x00: Remove unneeded variable
      rt2x00: Enable multiBSS in rt2800
      rt2x00: Fix IEEE80211_HT_CAP_RX_STBC assignment
      rt2x00: Fix antenna initialization
      rt2x00: Always set BBP_CSR_CFG_BBP_RW_MODE to 1
      rt2x00: Fix compile warning when debug disabled

Jay Sternberg (1):
      iwlwifi: display ucode SW Error in hex

Johannes Berg (7):
      mac80211_hwsim: fix fake_hw_scan
      mac80211: fix sw scan bracketing
      iwlagn: use mutex for aggregation
      iwlwifi: use sync commands for keys
      iwlwifi: return ucode errors from station management
      iwlwifi: fix multicast
      iwlwifi: read rfkill during resume

John W. Linville (14):
      libertas: mark lbs_ret_802_11d_domain_info static
      ath9k: declare MODULE_FIRMWARE for ath9k_htc
      rtl8180: mark rtl8180_beacon_work static
      mac80211: don't shadow mgmt variable in ieee80211_rx_h_action
      minstrel_ht: make *idx unsigned in minstrel_downgrade_rate
      wireless: mark reg_mutex as static
      minstrel_ht: move minstrel_mcs_groups declaration to header file
      mac80211: avoid scheduling while atomic in mesh_rx_plink_frame
      mac80211: use netif_receive_skb in ieee80211_rx callpath
      mac80211: use netif_receive_skb in ieee80211_tx_status callpath
      mac80211: remove unnecessary check in ieee80211_dump_survey
      mac80211: add basic tracing to drv_get_survey
      ath9k: remove unused function ath9k_hw_keyisvalid
      ath9k: make ath9k_hw_keysetmac static

Justin P. Mattock (2):
      wireless:hostap_main.c warning: variable 'iface' set but not used
      wireless:hostap_ap.c Fix warning: variable 'fc' set but not used

Juuso Oikarinen (3):
      mac80211: Add interface for driver to temporarily disable dynamic ps
      cfg80211/mac80211: Update set_tx_power to use mBm instead of dBm units
      nl80211: Add option to adjust transmit power

Kiran Divekar (3):
      Libertas: cfg80211 support
      Libertas: fix WARN_ON issues in cfg80211 support
      Libertas: Added 11d support using cfg80211

Larry Finger (1):
      b43: Clarify logged message after fatal DMA error and switch to PIO mode

Luis R. Rodriguez (5):
      ath9k_hw: fix ASPM setting for AR9003
      ath9k_hw: move LowPower array writes to ar9003_hw_configpcipowersave()
      ath9k_hw: add pcieSerDesWrite to disable SERDES ASPM tweaks
      ath9k_hw: dynamically choose the SERDES array for low power
      ath9k_hw: add an extra delay when reseting AR_RTC_RESET

Magnus Damm (1):
      b43: Add SDIO_DEVICE() for EW-CG1102GC

Ondrej Zary (1):
      rt2500usb: fallback to SW encryption for TKIP+AES

Reinette Chatre (2):
      Merge branch 'wireless-2.6' into wireless-next-2.6
      iwlagn: reduce severity of disconnected antennas warning

Sebastian Smolorz (2):
      at76c50x-usb: Move function at76_join() several lines up
      at76c50x-usb: Extract bssid from authentication frame

Sujith (2):
      ath9k_htc: Update supported product list
      ath9k_htc: Add LED support for AR7010

Uwe Kleine-König (2):
      cfg80211: move cfg80211_exit to .exit.text
      wireless: move regulatory_init to .init.text

Vasanthakumar Thiagarajan (4):
      ath9k: Fix bug in starting ani
      ath9k: Fix bug in paprd
      ath9k: Remove unused paprd_txok
      ath9k: Wakeup the chip in an appropriate place in ath_paprd_calibrate()

Vivek Natarajan (1):
      ath9k: Add a module parameter to disable led blinking.

Wey-Yi Guy (11):
      iwlwifi: move agn specific rx related code to iwl-agn-rx.c
      iwlwifi: move _agn statistics related structure
      iwlwifi: move calibration from iwlcore to iwlagn
      iwlwifi: code cleanup to remove un-necessary "goto"
      iwlwifi: remove non-exist reference
      iwlwifi: set TX_CMD_FLAG_PROT_REQUIRE_MSK in tx_flag
      iwlwifi: name change from signal protection flag
      iwlwifi: enable DC calibration based on config parameter
      iwlwifi: add a mechanism to disable plcp error checking
      iwlwifi: turn on RTS/CTS after aggregation become operational
      iwlwifi: add disable rf calibration support for 6000g2a and 6000g2b

 Documentation/networking/README.ipw2200            |    2 +-
 drivers/net/b44.c                                  |  144 +-
 drivers/net/wireless/at76c50x-usb.c                |  108 +-
 drivers/net/wireless/at76c50x-usb.h                |    1 +
 drivers/net/wireless/ath/ath5k/Makefile            |    1 +
 drivers/net/wireless/ath/ath5k/ani.c               |   20 +-
 drivers/net/wireless/ath/ath5k/ath5k.h             |   19 +-
 drivers/net/wireless/ath/ath5k/attach.c            |    2 -
 drivers/net/wireless/ath/ath5k/base.c              |  373 ++--
 drivers/net/wireless/ath/ath5k/caps.c              |    7 -
 drivers/net/wireless/ath/ath5k/debug.c             |   79 +-
 drivers/net/wireless/ath/ath5k/debug.h             |    9 +-
 drivers/net/wireless/ath/ath5k/desc.c              |  152 +-
 drivers/net/wireless/ath/ath5k/desc.h              |  310 ++--
 drivers/net/wireless/ath/ath5k/dma.c               |   13 -
 drivers/net/wireless/ath/ath5k/eeprom.c            |    3 +-
 drivers/net/wireless/ath/ath5k/gpio.c              |    7 -
 drivers/net/wireless/ath/ath5k/pcu.c               |   24 -
 drivers/net/wireless/ath/ath5k/phy.c               |   82 +-
 drivers/net/wireless/ath/ath5k/qcu.c               |    9 -
 drivers/net/wireless/ath/ath5k/reset.c             |   64 +-
 drivers/net/wireless/ath/ath5k/sysfs.c             |  116 +
 drivers/net/wireless/ath/ath9k/Makefile            |    3 +-
 drivers/net/wireless/ath/ath9k/ani.c               |  743 ++++++-
 drivers/net/wireless/ath/ath9k/ani.h               |   78 +-
 drivers/net/wireless/ath/ath9k/ar5008_phy.c        |  372 +++-
 drivers/net/wireless/ath/ath9k/ar9002_hw.c         |  118 +-
 drivers/net/wireless/ath/ath9k/ar9002_initvals.h   |    6 +-
 drivers/net/wireless/ath/ath9k/ar9002_phy.h        |    7 +
 .../{ar9003_initvals.h => ar9003_2p0_initvals.h}   |  254 ++--
 .../{ar9003_initvals.h => ar9003_2p2_initvals.h}   |  433 ++--
 drivers/net/wireless/ath/ath9k/ar9003_calib.c      |   10 +-
 drivers/net/wireless/ath/ath9k/ar9003_eeprom.c     |   13 +-
 drivers/net/wireless/ath/ath9k/ar9003_eeprom.h     |    4 +-
 drivers/net/wireless/ath/ath9k/ar9003_hw.c         |  185 ++-
 drivers/net/wireless/ath/ath9k/ar9003_mac.c        |   13 +
 drivers/net/wireless/ath/ath9k/ar9003_mac.h        |    5 +
 drivers/net/wireless/ath/ath9k/ar9003_paprd.c      |  714 ++++++
 drivers/net/wireless/ath/ath9k/ar9003_phy.c        |  513 ++++-
 drivers/net/wireless/ath/ath9k/ar9003_phy.h        |  298 ++-
 drivers/net/wireless/ath/ath9k/ath9k.h             |   89 +-
 drivers/net/wireless/ath/ath9k/beacon.c            |    3 +-
 drivers/net/wireless/ath/ath9k/common.c            |  314 +---
 drivers/net/wireless/ath/ath9k/common.h            |   77 +-
 drivers/net/wireless/ath/ath9k/debug.c             |   68 +-
 drivers/net/wireless/ath/ath9k/debug.h             |    2 +
 drivers/net/wireless/ath/ath9k/eeprom.c            |   29 +
 drivers/net/wireless/ath/ath9k/eeprom.h            |    5 +-
 drivers/net/wireless/ath/ath9k/eeprom_4k.c         |    1 +
 drivers/net/wireless/ath/ath9k/eeprom_9287.c       |  618 +++---
 drivers/net/wireless/ath/ath9k/eeprom_def.c        |    1 +
 drivers/net/wireless/ath/ath9k/gpio.c              |    9 +-
 drivers/net/wireless/ath/ath9k/hif_usb.c           |   71 +-
 drivers/net/wireless/ath/ath9k/hif_usb.h           |    2 +
 drivers/net/wireless/ath/ath9k/htc.h               |   38 +-
 drivers/net/wireless/ath/ath9k/htc_drv_beacon.c    |   23 +
 drivers/net/wireless/ath/ath9k/htc_drv_init.c      |  163 +-
 drivers/net/wireless/ath/ath9k/htc_drv_main.c      |  493 +++--
 drivers/net/wireless/ath/ath9k/htc_drv_txrx.c      |   86 +-
 drivers/net/wireless/ath/ath9k/htc_hst.c           |    3 +-
 drivers/net/wireless/ath/ath9k/hw-ops.h            |   16 +
 drivers/net/wireless/ath/ath9k/hw.c                |  304 ++--
 drivers/net/wireless/ath/ath9k/hw.h                |  100 +-
 drivers/net/wireless/ath/ath9k/init.c              |   58 +-
 drivers/net/wireless/ath/ath9k/mac.c               |   14 +-
 drivers/net/wireless/ath/ath9k/mac.h               |   13 +-
 drivers/net/wireless/ath/ath9k/main.c              |  427 ++---
 drivers/net/wireless/ath/ath9k/pci.c               |    1 +
 drivers/net/wireless/ath/ath9k/rc.c                |  184 +-
 drivers/net/wireless/ath/ath9k/recv.c              |  296 +++-
 drivers/net/wireless/ath/ath9k/reg.h               |   90 +-
 drivers/net/wireless/ath/ath9k/virtual.c           |    2 +-
 drivers/net/wireless/ath/ath9k/wmi.c               |    3 -
 drivers/net/wireless/ath/ath9k/xmit.c              |  161 +-
 drivers/net/wireless/b43/dma.c                     |   69 +-
 drivers/net/wireless/b43/main.c                    |    2 +-
 drivers/net/wireless/b43/sdio.c                    |    1 +
 drivers/net/wireless/b43legacy/dma.c               |   49 +-
 drivers/net/wireless/hostap/hostap_ap.c            |    3 +-
 drivers/net/wireless/hostap/hostap_main.c          |    2 -
 drivers/net/wireless/ipw2x00/ipw2100.c             |   18 +-
 drivers/net/wireless/ipw2x00/ipw2200.c             |    7 +-
 drivers/net/wireless/iwlwifi/Kconfig               |    6 +-
 drivers/net/wireless/iwlwifi/Makefile              |    4 +-
 drivers/net/wireless/iwlwifi/iwl-1000.c            |    5 +
 drivers/net/wireless/iwlwifi/iwl-3945-debugfs.c    |   28 +-
 drivers/net/wireless/iwlwifi/iwl-3945.c            |  208 +--
 drivers/net/wireless/iwlwifi/iwl-4965.c            |   96 +-
 drivers/net/wireless/iwlwifi/iwl-5000.c            |   67 +-
 drivers/net/wireless/iwlwifi/iwl-6000.c            |  487 +++--
 .../iwlwifi/{iwl-calib.c => iwl-agn-calib.c}       |   26 +-
 drivers/net/wireless/iwlwifi/iwl-agn-debugfs.c     |   91 +-
 drivers/net/wireless/iwlwifi/iwl-agn-hcmd.c        |   32 +-
 drivers/net/wireless/iwlwifi/iwl-agn-lib.c         |  233 +--
 drivers/net/wireless/iwlwifi/iwl-agn-rs.c          |   20 +-
 drivers/net/wireless/iwlwifi/iwl-agn-rx.c          |  284 +++
 drivers/net/wireless/iwlwifi/iwl-agn-tx.c          |   82 +-
 drivers/net/wireless/iwlwifi/iwl-agn-ucode.c       |  123 +
 drivers/net/wireless/iwlwifi/iwl-agn.c             |  392 +++-
 drivers/net/wireless/iwlwifi/iwl-agn.h             |   44 +
 drivers/net/wireless/iwlwifi/iwl-commands.h        |   35 +-
 drivers/net/wireless/iwlwifi/iwl-core.c            |  288 +--
 drivers/net/wireless/iwlwifi/iwl-core.h            |   35 +-
 drivers/net/wireless/iwlwifi/iwl-debugfs.c         |   92 +-
 drivers/net/wireless/iwlwifi/iwl-dev.h             |   95 +-
 drivers/net/wireless/iwlwifi/iwl-eeprom.c          |    3 +
 drivers/net/wireless/iwlwifi/iwl-helpers.h         |   27 +
 drivers/net/wireless/iwlwifi/iwl-rx.c              |  242 +--
 drivers/net/wireless/iwlwifi/iwl-scan.c            |   49 +-
 drivers/net/wireless/iwlwifi/iwl-sta.c             |  164 +-
 drivers/net/wireless/iwlwifi/iwl-sta.h             |   32 +-
 drivers/net/wireless/iwlwifi/iwl-tx.c              |   33 +-
 drivers/net/wireless/iwlwifi/iwl3945-base.c        |  138 +-
 drivers/net/wireless/iwmc3200wifi/cfg80211.c       |   12 +-
 drivers/net/wireless/iwmc3200wifi/hal.c            |    2 +-
 drivers/net/wireless/iwmc3200wifi/rx.c             |    4 +-
 drivers/net/wireless/libertas/Makefile             |    3 -
 drivers/net/wireless/libertas/assoc.c              | 2264 -------------------
 drivers/net/wireless/libertas/assoc.h              |  155 --
 drivers/net/wireless/libertas/cfg.c                | 2038 +++++++++++++++++-
 drivers/net/wireless/libertas/cfg.h                |   21 +-
 drivers/net/wireless/libertas/cmd.c                |  124 +-
 drivers/net/wireless/libertas/cmdresp.c            |  111 +-
 drivers/net/wireless/libertas/debugfs.c            |   54 +-
 drivers/net/wireless/libertas/decl.h               |   10 +-
 drivers/net/wireless/libertas/dev.h                |   68 +-
 drivers/net/wireless/libertas/ethtool.c            |   29 +-
 drivers/net/wireless/libertas/host.h               |   28 +-
 drivers/net/wireless/libertas/if_sdio.c            |   58 +
 drivers/net/wireless/libertas/if_usb.c             |   12 +-
 drivers/net/wireless/libertas/main.c               |  305 +--
 drivers/net/wireless/libertas/mesh.c               |    6 +-
 drivers/net/wireless/libertas/mesh.h               |    5 -
 drivers/net/wireless/libertas/rx.c                 |  121 +-
 drivers/net/wireless/libertas/scan.c               | 1354 -----------
 drivers/net/wireless/libertas/scan.h               |   63 -
 drivers/net/wireless/libertas/tx.c                 |   12 +-
 drivers/net/wireless/libertas/wext.c               | 2353 --------------------
 drivers/net/wireless/libertas/wext.h               |   17 -
 drivers/net/wireless/libertas_tf/if_usb.c          |    5 +-
 drivers/net/wireless/mac80211_hwsim.c              |    5 +
 drivers/net/wireless/mwl8k.c                       |   12 +-
 drivers/net/wireless/orinoco/hermes_dld.c          |    2 +-
 drivers/net/wireless/orinoco/orinoco_usb.c         |    4 +-
 drivers/net/wireless/orinoco/wext.c                |    4 +-
 drivers/net/wireless/p54/eeprom.c                  |    4 +-
 drivers/net/wireless/p54/p54spi.c                  |    5 +-
 drivers/net/wireless/p54/p54usb.c                  |    6 +-
 drivers/net/wireless/prism54/isl_ioctl.c           |   11 +-
 drivers/net/wireless/rndis_wlan.c                  |   56 +-
 drivers/net/wireless/rt2x00/rt2400pci.c            |   16 +-
 drivers/net/wireless/rt2x00/rt2500pci.c            |   16 +-
 drivers/net/wireless/rt2x00/rt2500usb.c            |   40 +-
 drivers/net/wireless/rt2x00/rt2800.h               |   57 +-
 drivers/net/wireless/rt2x00/rt2800lib.c            |  314 ++-
 drivers/net/wireless/rt2x00/rt2800lib.h            |   13 +-
 drivers/net/wireless/rt2x00/rt2800pci.c            |  151 +-
 drivers/net/wireless/rt2x00/rt2800pci.h            |   19 -
 drivers/net/wireless/rt2x00/rt2800usb.c            |  119 +-
 drivers/net/wireless/rt2x00/rt2800usb.h            |   37 -
 drivers/net/wireless/rt2x00/rt2x00.h               |   44 +-
 drivers/net/wireless/rt2x00/rt2x00config.c         |   12 +-
 drivers/net/wireless/rt2x00/rt2x00debug.c          |    1 +
 drivers/net/wireless/rt2x00/rt2x00dev.c            |   43 +-
 drivers/net/wireless/rt2x00/rt2x00dump.h           |    7 +-
 drivers/net/wireless/rt2x00/rt2x00ht.c             |   47 +-
 drivers/net/wireless/rt2x00/rt2x00lib.h            |   26 +-
 drivers/net/wireless/rt2x00/rt2x00link.c           |    8 +-
 drivers/net/wireless/rt2x00/rt2x00mac.c            |   10 +-
 drivers/net/wireless/rt2x00/rt2x00pci.c            |   33 +-
 drivers/net/wireless/rt2x00/rt2x00pci.h            |   10 -
 drivers/net/wireless/rt2x00/rt2x00queue.c          |   86 +-
 drivers/net/wireless/rt2x00/rt2x00queue.h          |    9 +-
 drivers/net/wireless/rt2x00/rt2x00usb.c            |   68 +-
 drivers/net/wireless/rt2x00/rt2x00usb.h            |   29 -
 drivers/net/wireless/rt2x00/rt61pci.c              |   62 +-
 drivers/net/wireless/rt2x00/rt73usb.c              |   52 +-
 drivers/net/wireless/rtl818x/rtl8180_dev.c         |    2 +-
 drivers/net/wireless/wl12xx/Kconfig                |    4 +-
 drivers/net/wireless/wl12xx/wl1251_main.c          |    4 +-
 drivers/net/wireless/wl12xx/wl1251_sdio.c          |   40 +-
 drivers/net/wireless/wl12xx/wl1271.h               |   31 +-
 drivers/net/wireless/wl12xx/wl1271_cmd.c           |   41 +-
 drivers/net/wireless/wl12xx/wl1271_cmd.h           |   28 +-
 drivers/net/wireless/wl12xx/wl1271_event.c         |   10 +-
 drivers/net/wireless/wl12xx/wl1271_ini.h           |  123 +
 drivers/net/wireless/wl12xx/wl1271_main.c          |   95 +-
 drivers/net/wireless/wl12xx/wl1271_sdio.c          |    2 +-
 drivers/net/wireless/wl12xx/wl1271_testmode.c      |   11 +-
 drivers/net/wireless/wl12xx/wl1271_tx.c            |   36 +-
 drivers/net/wireless/wl12xx/wl1271_tx.h            |    1 +
 drivers/net/wireless/zd1211rw/zd_mac.c             |    5 +-
 drivers/net/wireless/zd1211rw/zd_mac.h             |    3 +-
 drivers/net/wireless/zd1211rw/zd_usb.c             |    2 +-
 drivers/ssb/driver_chipcommon.c                    |   25 +
 drivers/ssb/driver_chipcommon_pmu.c                |   17 +-
 drivers/ssb/main.c                                 |   76 +-
 drivers/ssb/pci.c                                  |   15 +-
 include/linux/eeprom_93cx6.h                       |    1 +
 include/linux/nl80211.h                            |   24 +-
 include/linux/ssb/ssb.h                            |  159 +--
 include/net/cfg80211.h                             |  137 +-
 include/net/mac80211.h                             |  120 +-
 net/mac80211/Kconfig                               |    8 +
 net/mac80211/Makefile                              |    4 +
 net/mac80211/agg-rx.c                              |  123 +-
 net/mac80211/agg-tx.c                              |  554 +++--
 net/mac80211/cfg.c                                 |  100 +-
 net/mac80211/debugfs.c                             |  154 +-
 net/mac80211/debugfs_key.c                         |    2 +-
 net/mac80211/debugfs_sta.c                         |   65 +-
 net/mac80211/driver-ops.h                          |  102 +-
 net/mac80211/driver-trace.h                        |  210 +-
 net/mac80211/ht.c                                  |   50 +-
 net/mac80211/ibss.c                                |  109 +-
 net/mac80211/ieee80211_i.h                         |   73 +-
 net/mac80211/iface.c                               |  188 ++-
 net/mac80211/key.c                                 |  290 +--
 net/mac80211/key.h                                 |   30 +-
 net/mac80211/main.c                                |  116 +-
 net/mac80211/mesh.c                                |   73 +-
 net/mac80211/mesh.h                                |    2 -
 net/mac80211/mesh_hwmp.c                           |    4 +-
 net/mac80211/mesh_pathtbl.c                        |    4 +-
 net/mac80211/mesh_plink.c                          |   42 +-
 net/mac80211/mlme.c                                |  239 +--
 net/mac80211/pm.c                                  |   18 +-
 net/mac80211/rate.h                                |   13 +
 net/mac80211/rc80211_minstrel_ht.c                 |  825 +++++++
 net/mac80211/rc80211_minstrel_ht.h                 |  130 ++
 net/mac80211/rc80211_minstrel_ht_debugfs.c         |  118 +
 net/mac80211/rx.c                                  |  193 +-
 net/mac80211/scan.c                                |    6 +-
 net/mac80211/sta_info.c                            |   22 +-
 net/mac80211/sta_info.h                            |  113 +-
 net/mac80211/status.c                              |    6 +-
 net/mac80211/tx.c                                  |   93 +-
 net/mac80211/util.c                                |   31 +-
 net/mac80211/work.c                                |    2 +-
 net/mac80211/wpa.c                                 |    8 +-
 net/wireless/chan.c                                |    5 +-
 net/wireless/core.c                                |    2 +-
 net/wireless/core.h                                |    1 +
 net/wireless/mlme.c                                |    8 +-
 net/wireless/nl80211.c                             |   89 +-
 net/wireless/reg.c                                 |    6 +-
 net/wireless/reg.h                                 |    2 +-
 net/wireless/wext-compat.c                         |   10 +-
 248 files changed, 14685 insertions(+), 13932 deletions(-)
 create mode 100644 drivers/net/wireless/ath/ath5k/sysfs.c
 copy drivers/net/wireless/ath/ath9k/{ar9003_initvals.h => ar9003_2p0_initvals.h} (87%)
 rename drivers/net/wireless/ath/ath9k/{ar9003_initvals.h => ar9003_2p2_initvals.h} (78%)
 create mode 100644 drivers/net/wireless/ath/ath9k/ar9003_paprd.c
 rename drivers/net/wireless/iwlwifi/{iwl-calib.c => iwl-agn-calib.c} (98%)
 create mode 100644 drivers/net/wireless/iwlwifi/iwl-agn-rx.c
 delete mode 100644 drivers/net/wireless/libertas/assoc.c
 delete mode 100644 drivers/net/wireless/libertas/assoc.h
 delete mode 100644 drivers/net/wireless/libertas/scan.c
 delete mode 100644 drivers/net/wireless/libertas/scan.h
 delete mode 100644 drivers/net/wireless/libertas/wext.c
 delete mode 100644 drivers/net/wireless/libertas/wext.h
 create mode 100644 drivers/net/wireless/wl12xx/wl1271_ini.h
 create mode 100644 net/mac80211/rc80211_minstrel_ht.c
 create mode 100644 net/mac80211/rc80211_minstrel_ht.h
 create mode 100644 net/mac80211/rc80211_minstrel_ht_debugfs.c

Omnibus patch available here:

	http://www.kernel.org/pub/linux/kernel/people/linville/wireless-next-2.6-2010-07-01.patch.bz2

-- 
John W. Linville		Someday the world will need a hero, and you
linville-2XuSBdqkA4R54TAoqtyWWQ@public.gmane.org			might be all we have.  Be ready.
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply

* Re: [PATCH] igbvf: avoid name clash between PF and VF
From: Casey Leedom @ 2010-07-01 17:12 UTC (permalink / raw)
  To: Stefan Assmann
  Cc: e1000-devel, netdev, gregory.v.rose, jeffrey.t.kirsher,
	Andy Gospodarek
In-Reply-To: <4C2C378D.4090806@redhat.com>

| From: Stefan Assmann <sassmann@redhat.com>
| Date: Wednesday, June 30, 2010 11:37 pm
| 
| You're correct, the problem shouldn't occur with cxgb4vf and therefore
| this change shouldn't be necessary. However we might consider a
| consistent naming scheme for VFs in all drivers. But I don't have a
| strong opinion about this, either way would be fine by me.

  Sorry, I hadn't meant to imply any criticism of your naming proposal.  I was 
just trying to clarify when/where such a scheme might be necessary.

  On the naming proposal itself, it strikes me that the most common use of PCI-E 
SR-IOV Virtual Functions will be to export them to KVM Virtual Machines via PCI 
"Pass Through."  So there shouldn't be any naming conflict there, right?  Or is 
it the same scenario you described before: that the VF NIC device might be found 
before the normal "eth0", etc. withing the Virtual Machine?

  In any case, I don't really have any feelings one way or the other about 
interface naming.  As I mentioned before, the cxgb4vf driver will end up with 
persistent MAC addresses so all the normal interface management stuff will work 
normally (naming, DHCP, etc.)

Casey

------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
E1000-devel mailing list
E1000-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/e1000-devel
To learn more about Intel&#174; Ethernet, visit http://communities.intel.com/community/wired

^ permalink raw reply

* [GIT PULL net-2.6] vhost-net: more error handling fixes
From: Michael S. Tsirkin @ 2010-07-01 16:41 UTC (permalink / raw)
  To: David Miller; +Cc: kvm, virtualization, netdev, linux-kernel, krkumar2

David,
The following tree includes more fixes dealing with
error handling in vhost-net. It is on top of net-2.6.
Please merge it for 2.6.35.
Thanks!

The following changes since commit 38000a94a902e94ca8b5498f7871c6316de8957a:

  sky2: enable rx/tx in sky2_phy_reinit() (2010-06-23 14:37:04 -0700)

are available in the git repository at:
  git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git vhost-net

Michael S. Tsirkin (2):
      vhost: break out of polling loop on error
      vhost: add unlikely annotations to error path

 drivers/vhost/net.c   |   12 ++++++-
 drivers/vhost/vhost.c |   86 +++++++++++++++++++++++++------------------------
 drivers/vhost/vhost.h |    8 ++--
 3 files changed, 58 insertions(+), 48 deletions(-)
-- 
MST

^ permalink raw reply

* Re: RFC:  Allow 'ip' to run in daemon mode?
From: Stephen Hemminger @ 2010-07-01 16:35 UTC (permalink / raw)
  To: Ben Greear; +Cc: Simon Horman, NetDev
In-Reply-To: <4C2CB739.3020001@candelatech.com>

On Thu, 01 Jul 2010 08:41:45 -0700
Ben Greear <greearb@candelatech.com> wrote:

> On 07/01/2010 12:07 AM, Simon Horman wrote:
> > On Tue, Jun 29, 2010 at 08:34:41AM -0700, Ben Greear wrote:
> >> I'm considering modifying 'ip' to be able to run in daemon
> >> mode so that I can do lots of IP commands without having to
> >> pay the startup cost of iproute.
> >>
> >> The -batch option almost works, but it's hard to programatically
> >> figure out failure codes.
> >>
> >> I'm thinking about making these changes:
> >>
> >> 1)  Move all of the error printing code into common methods (basically,
> >>     wrap printf).  In daemon mode this text can be sent back to the
> >>     calling process, and in normal mode, it will be printed to stdout/stderr
> >>     as it is currently.
> >>
> >> 2)  Remove all or most calls to 'exit' and instead return error codes
> >>     to the calling logic.
> >>
> >> 3)  Add ability to listen on a unix socket for commands, basically treat
> >>     them just like batch commands, one command per packet.
> >>
> >> 4)  Return well formatted error code and text response to calling process
> >>     over the unix socket, maybe something like:
> >>
> >> RV: [errno or equiv, zero for success]\n
> >> CMD: [ command string this relates to ]\n
> >> [ Optional free form text ]
> >>
> >>
> >> Does something like this have any chance of upstream inclusion?
> >
> > Hi Ben,
> >
> > can't you achieve as much by omitting 3) and using stdio (cleanly)?
> > Or in other words, fix batch mode rather than adding another mode.
> > Or are you worried about backwards-compatibility?
> 
> I think the most of the work will be in steps 1 and 2.  Adding a listening
> socket and dealing with that is probably 50-100 lines of code.
> 
> I'd be happy to attempt steps 1, 2, and possibly 4 for standard iproute2.
> If the unix socket thing still isn't wanted, it would be relatively easy for me
> to carry a patch to enable it in my own code.
> 
> I think a lot of folks are scraping the output of 'ip', so backwards compat of
> the error messages is a concern.

Use libnl and write a real service. Maybe even use json


-- 

^ permalink raw reply

* Re: [PATCH ethtool 2/2] ethtool: Add support for control of RX flow hash indirection
From: Ben Hutchings @ 2010-07-01 16:03 UTC (permalink / raw)
  To: Jeff Garzik; +Cc: netdev, linux-net-drivers
In-Reply-To: <1277910792.2082.18.camel@achroite.uk.solarflarecom.com>

On Wed, 2010-06-30 at 16:13 +0100, Ben Hutchings wrote:
> Many NICs use an indirection table to map an RX flow hash value to one
> of an arbitrary number of queues (not necessarily a power of 2).  It
> can be useful to remove some queues from this indirection table so
> that they are only used for flows that are specifically filtered
> there.  It may also be useful to weight the mapping to account for
> user processes with the same CPU-affinity as the RX interrupts.
[...]
> +	printf("RX flow hash indirection table for %s with %llu RX ring(s):\n",
> +	       devname, ring_count.data);
> +	for (i = 0; i < indir->size; i++) {
> +		if (i % 8 == 0)
> +			printf("%5zu: ", i);
> +		printf(" %5u", indir->ring_index[i]);
> +		if (i % 8 == 7)
> +			fputc('\n', stdout);
> +	}
[...]

The "%5zu: " above should be "%5u: ".  I can either send another patch
or leave you to fix this up, as you prefer.

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-next-2.6 PATCH 1/8] e1000e: cleanup ethtool loopback setup code
From: Ben Hutchings @ 2010-07-01 15:55 UTC (permalink / raw)
  To: Allan, Bruce W; +Cc: David Miller, Kirsher, Jeffrey T, netdev@vger.kernel.org
In-Reply-To: <8DD2590731AB5D4C9DBF71A877482A9001591F6130@orsmsx509.amr.corp.intel.com>

On Wed, 2010-06-30 at 15:41 -0700, Allan, Bruce W wrote:
> On Friday, June 18, 2010 10:15 PM, David Miller wrote:
> > I've applied this series however:
> > 
> > 1) Please address Ben's concerns about turning EEE on by default
> >    given that standardization is not complete yet.
> > 
> > 2) I hate module parameters, I'd rather you create a new ethtool
> >    feature bit and thus allow the setting to be modified at run
> >    time.  Please create a new ethtool control flag, and remove
> >    this module option.
> > 
> > Thanks.
> 
> Hi Dave,
> 
> I've been looking into your request number 2 above (as a reminder, it
> had to do with a patch I submitted that added a module parameter to
> e1000e in order to enable/disable Energy Efficient Ethernet for a
> particular type of adapter).
> 
> For this new ethtool feature bit/flag for EEE, would you prefer it be
> set via:
> 1) the generic parameter setting option (e.g. -s ethX [eee on|off]),
> 2) yet another new show/change option pair, or
> 3) a new option that can set this new feature and be expandable to
> future features that are likewise not related to existing ethtool
> options (e.g. -F [eee on|off] [whizbang on|off])?

The ethtool utility is maintained by Jeff Garzik, not David.

> For #2 or #3, it makes sense to use ethtool_op_[g|s]et_flags with new
> ETH_FLAG_<feature> and NETIF_F_<feature> defines, but #1 can be
> implemented that way or by using remaining reserved elements of struct
> ethtool_cmd - if your preference is for #1, would you prefer it be
> implemented with the former or latter?

I don't think this belongs in the netdev features because it's nothing
that the networking stack needs to care about.  It could go in the
ethtool flags though currently the ethtool utility assumes those are
only for protocol offload/acceleration features.

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: RFC:  Allow 'ip' to run in daemon mode?
From: Ben Greear @ 2010-07-01 15:41 UTC (permalink / raw)
  To: Simon Horman; +Cc: NetDev, Stephen Hemminger
In-Reply-To: <20100701070753.GA15216@verge.net.au>

On 07/01/2010 12:07 AM, Simon Horman wrote:
> On Tue, Jun 29, 2010 at 08:34:41AM -0700, Ben Greear wrote:
>> I'm considering modifying 'ip' to be able to run in daemon
>> mode so that I can do lots of IP commands without having to
>> pay the startup cost of iproute.
>>
>> The -batch option almost works, but it's hard to programatically
>> figure out failure codes.
>>
>> I'm thinking about making these changes:
>>
>> 1)  Move all of the error printing code into common methods (basically,
>>     wrap printf).  In daemon mode this text can be sent back to the
>>     calling process, and in normal mode, it will be printed to stdout/stderr
>>     as it is currently.
>>
>> 2)  Remove all or most calls to 'exit' and instead return error codes
>>     to the calling logic.
>>
>> 3)  Add ability to listen on a unix socket for commands, basically treat
>>     them just like batch commands, one command per packet.
>>
>> 4)  Return well formatted error code and text response to calling process
>>     over the unix socket, maybe something like:
>>
>> RV: [errno or equiv, zero for success]\n
>> CMD: [ command string this relates to ]\n
>> [ Optional free form text ]
>>
>>
>> Does something like this have any chance of upstream inclusion?
>
> Hi Ben,
>
> can't you achieve as much by omitting 3) and using stdio (cleanly)?
> Or in other words, fix batch mode rather than adding another mode.
> Or are you worried about backwards-compatibility?

I think the most of the work will be in steps 1 and 2.  Adding a listening
socket and dealing with that is probably 50-100 lines of code.

I'd be happy to attempt steps 1, 2, and possibly 4 for standard iproute2.
If the unix socket thing still isn't wanted, it would be relatively easy for me
to carry a patch to enable it in my own code.

I think a lot of folks are scraping the output of 'ip', so backwards compat of
the error messages is a concern.

Thanks,
Ben

-- 
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc  http://www.candelatech.com

^ permalink raw reply

* Re: [PATCH repost] sched: export sched_set/getaffinity to modules
From: Peter Zijlstra @ 2010-07-01 14:55 UTC (permalink / raw)
  To: Tejun Heo
  Cc: Oleg Nesterov, Michael S. Tsirkin, Ingo Molnar, Sridhar Samudrala,
	netdev, lkml, kvm@vger.kernel.org, Andrew Morton, Dmitri Vorobiev,
	Jiri Kosina, Thomas Gleixner, Andi Kleen
In-Reply-To: <4C2CABF2.2020801@kernel.org>

On Thu, 2010-07-01 at 16:53 +0200, Tejun Heo wrote:
> Hello,
> 
> On 07/01/2010 04:46 PM, Oleg Nesterov wrote:
> >> It might be a good idea to make the function take extra clone flags
> >> but anyways once created cloned task can be treated the same way as
> >> other kthreads, so nothing else needs to be changed.
> > 
> > This makes kthread_stop() work. Otherwise the new thread is just
> > the CLONE_VM child of the caller, and the caller is the user-mode
> > task doing ioctl() ?
> 
> Hmmm, indeed.  It makes the attribute inheritance work but circumvents
> the whole reason there is kthreadd.

I thought the whole reason there was threadd was to avoid the
inheritance? So avoiding the avoiding of inheritance seems like the goal
here, no?

^ permalink raw reply

* Re: [PATCH repost] sched: export sched_set/getaffinity to modules
From: Tejun Heo @ 2010-07-01 14:53 UTC (permalink / raw)
  To: Oleg Nesterov
  Cc: Michael S. Tsirkin, Peter Zijlstra, Ingo Molnar,
	Sridhar Samudrala, netdev, lkml, kvm@vger.kernel.org,
	Andrew Morton, Dmitri Vorobiev, Jiri Kosina, Thomas Gleixner,
	Andi Kleen
In-Reply-To: <20100701144624.GA11171@redhat.com>

Hello,

On 07/01/2010 04:46 PM, Oleg Nesterov wrote:
>> It might be a good idea to make the function take extra clone flags
>> but anyways once created cloned task can be treated the same way as
>> other kthreads, so nothing else needs to be changed.
> 
> This makes kthread_stop() work. Otherwise the new thread is just
> the CLONE_VM child of the caller, and the caller is the user-mode
> task doing ioctl() ?

Hmmm, indeed.  It makes the attribute inheritance work but circumvents
the whole reason there is kthreadd.

Thanks.

-- 
tejun

^ permalink raw reply

* Re: [PATCH repost] sched: export sched_set/getaffinity to modules
From: Oleg Nesterov @ 2010-07-01 14:46 UTC (permalink / raw)
  To: Tejun Heo
  Cc: Michael S. Tsirkin, Peter Zijlstra, Ingo Molnar,
	Sridhar Samudrala, netdev, lkml, kvm@vger.kernel.org,
	Andrew Morton, Dmitri Vorobiev, Jiri Kosina, Thomas Gleixner,
	Andi Kleen
In-Reply-To: <4C2CA5C5.4040402@kernel.org>

On 07/01, Tejun Heo wrote:
>
> All that's necessary is shortcutting indirection through kthreadd.
> ie. An exported function which looks like the following,
>
>  struct kthread_clone_or_whatever(int (*threadfn).....)
>  {
> 	struct kthread_create_info create;
> 	int pid;
>
> 	INIT create;
>
> 	pid = kernel_thread(kthread, &create, CLONE_FS...);
> 	if (pid < 0)
> 		return ERROR;
> 	wait_for_completion(&create.done);
>
> 	if (!IS_ERR(create.result))
> 		SET NAME;
> 	return create.result;
>  }
>
> It might be a good idea to make the function take extra clone flags
> but anyways once created cloned task can be treated the same way as
> other kthreads, so nothing else needs to be changed.

This makes kthread_stop() work. Otherwise the new thread is just
the CLONE_VM child of the caller, and the caller is the user-mode
task doing ioctl() ?

Oleg.


^ 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