Netdev List
 help / color / mirror / Atom feed
* Re: [PATCH] forcedeth: Do not use legacy PCI power management
From: David Miller @ 2011-01-10  0:20 UTC (permalink / raw)
  To: rjw; +Cc: netdev, linux-kernel, linux-pm
In-Reply-To: <201101072212.05449.rjw@sisk.pl>

From: "Rafael J. Wysocki" <rjw@sisk.pl>
Date: Fri, 7 Jan 2011 22:12:05 +0100

> Subject: forcedeth: Do not use legacy PCI power management (v2)
> 
> The forcedeth driver uses the legacy PCI power management, so it has
> to do PCI-specific things in its ->suspend() and ->resume() callbacks
> and some of them are not done correctly.
> 
> Convert forcedeth to the new PCI power management framework and make
> it let the PCI subsystem take care of all the PCI-specific aspects of
> device handling during system power transitions.
> 
> Tested with nVidia Corporation MCP55 Ethernet (rev a2).
> 
> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>

Applied, thanks.

^ permalink raw reply

* Re: [patch] Re: genetlink misinterprets NEW as GET
From: David Miller @ 2011-01-10  0:25 UTC (permalink / raw)
  To: pablo; +Cc: jengelh, blp, netfilter-devel, netdev
In-Reply-To: <4D271614.6000303@netfilter.org>

From: Pablo Neira Ayuso <pablo@netfilter.org>
Date: Fri, 07 Jan 2011 14:33:08 +0100

> On 07/01/11 14:15, Jan Engelhardt wrote:
>> netlink: test for all flags of the NLM_F_DUMP composite
>> 
>> Due to NLM_F_DUMP is composed of two bits, NLM_F_ROOT | NLM_F_MATCH,
>> when doing "if (x & NLM_F_DUMP)", it tests for _either_ of the bits
>> being set. Because NLM_F_MATCH's value overlaps with NLM_F_EXCL,
>> non-dump requests with NLM_F_EXCL set are mistaken as dump requests.
>> 
>> Substitute the condition to test for _all_ bits being set.
>> 
>> Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
> 
> Acked-by: Pablo Neira Ayuso <pablo@netfilter.org>

Applied, and queued up for -stable, thanks guys!

^ permalink raw reply

* Re: [PATCH 6/6] net: fix kernel-doc warning in core/filter.c
From: David Miller @ 2011-01-10  0:27 UTC (permalink / raw)
  To: randy.dunlap; +Cc: netdev, torvalds
In-Reply-To: <20110108194142.22a0c3d8.randy.dunlap@oracle.com>

From: Randy Dunlap <randy.dunlap@oracle.com>
Date: Sat, 8 Jan 2011 19:41:42 -0800

> From: Randy Dunlap <randy.dunlap@oracle.com>
> 
> Fix new kernel-doc notation warning in net/core/filter.c:
> 
> Warning(net/core/filter.c:172): No description found for parameter 'fentry'
> Warning(net/core/filter.c:172): Excess function parameter 'filter' description in 'sk_run_filter'
> 
> Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>

Applied.

^ permalink raw reply

* Re: [PATCH 4/6] net/sock.h: make some fields private to fix kernel-doc warning(s)
From: David Miller @ 2011-01-10  0:27 UTC (permalink / raw)
  To: randy.dunlap; +Cc: linux-kernel, torvalds, netdev
In-Reply-To: <20110108193921.e03ca09e.randy.dunlap@oracle.com>

From: Randy Dunlap <randy.dunlap@oracle.com>
Date: Sat, 8 Jan 2011 19:39:21 -0800

> From: Randy Dunlap <randy.dunlap@oracle.com>
> 
> Fix new kernel-doc notation warning in sock.h by annotating skc_dontcopy_*
> as private fields.
> 
> Warning(include/net/sock.h:163): No description found for parameter 'skc_dontcopy_end[0]'
> 
> Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>

Applied.

^ permalink raw reply

* Re: [patch] phonet: some signedness bugs
From: David Miller @ 2011-01-10  0:45 UTC (permalink / raw)
  To: error27; +Cc: remi.denis-courmont, netdev, kernel-janitors, dan.j.rosenberg
In-Reply-To: <20110107203755.GB1959@bicker>

From: Dan Carpenter <error27@gmail.com>
Date: Fri, 7 Jan 2011 23:37:55 +0300

> Dan Rosenberg pointed out that there were some signed comparison bugs
> in the phonet protocol.
> 
> http://marc.info/?l=full-disclosure&m=129424528425330&w=2
> 
> If you have already have CAP_SYS_ADMIN then you could use the bugs to
> get root, or someone could cause an oops by mistake.
> 
> Signed-off-by: Dan Carpenter <error27@gmail.com>

Applied and queued up for -stable, thanks Dan.

^ permalink raw reply

* Re: [patch] phonet: some signedness bugs
From: David Miller @ 2011-01-10  2:13 UTC (permalink / raw)
  To: error27; +Cc: remi.denis-courmont, netdev, kernel-janitors, dan.j.rosenberg
In-Reply-To: <20110109.164548.58428218.davem@davemloft.net>

From: David Miller <davem@davemloft.net>
Date: Sun, 09 Jan 2011 16:45:48 -0800 (PST)

> From: Dan Carpenter <error27@gmail.com>
> Date: Fri, 7 Jan 2011 23:37:55 +0300
> 
>> Dan Rosenberg pointed out that there were some signed comparison bugs
>> in the phonet protocol.
>> 
>> http://marc.info/?l=full-disclosure&m=129424528425330&w=2
>> 
>> If you have already have CAP_SYS_ADMIN then you could use the bugs to
>> get root, or someone could cause an oops by mistake.
>> 
>> Signed-off-by: Dan Carpenter <error27@gmail.com>
> 
> Applied and queued up for -stable, thanks Dan.

Actually I'm reverting this.

You can't change the prototype of pn_socket_create() because if you do
then it doesn't match up with the prototype required by
net_proto_family->create().

You didn't see this warning in your build?

net/phonet/af_phonet.c:124:2: warning: initialization from incompatible pointer type

^ permalink raw reply

* Re: [GIT] Networking
From: David Miller @ 2011-01-10  2:15 UTC (permalink / raw)
  To: romieu; +Cc: torvalds, benh, hayeswang, dwmw2, akpm, netdev, linux-kernel
In-Reply-To: <20110108121726.GA2216@electric-eye.fr.zoreil.com>

From: Francois Romieu <romieu@fr.zoreil.com>
Date: Sat, 8 Jan 2011 13:17:26 +0100

> r8169: delay phy init until device opens.
> 
> It workarounds the 60s firmware load failure timeout for the
> non-modular case.
> 
> Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>

Applied, thanks.

^ permalink raw reply

* [PATCH] iwmc3200wifi: Return proper error for iwm_if_alloc
From: Axel Lin @ 2011-01-10  2:26 UTC (permalink / raw)
  To: linux-kernel
  Cc: Samuel Ortiz, Intel Linux Wireless, Zhu Yi, John W. Linville,
	linux-wireless, netdev

In the case of alloc_netdev_mq failure and kmalloc failure,
current implementation returns ERR_PTR(0).

As a result, the caller of iwm_if_alloc does not catch the error by IS_ERR
macro. Fix it by setting proper error code for ret variable in the failure
cases.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
---
 drivers/net/wireless/iwmc3200wifi/netdev.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/net/wireless/iwmc3200wifi/netdev.c b/drivers/net/wireless/iwmc3200wifi/netdev.c
index 13a69eb..5091d77 100644
--- a/drivers/net/wireless/iwmc3200wifi/netdev.c
+++ b/drivers/net/wireless/iwmc3200wifi/netdev.c
@@ -126,6 +126,7 @@ void *iwm_if_alloc(int sizeof_bus, struct device *dev,
 	ndev = alloc_netdev_mq(0, "wlan%d", ether_setup, IWM_TX_QUEUES);
 	if (!ndev) {
 		dev_err(dev, "no memory for network device instance\n");
+		ret = -ENOMEM;
 		goto out_priv;
 	}
 
@@ -138,6 +139,7 @@ void *iwm_if_alloc(int sizeof_bus, struct device *dev,
 				    GFP_KERNEL);
 	if (!iwm->umac_profile) {
 		dev_err(dev, "Couldn't alloc memory for profile\n");
+		ret = -ENOMEM;
 		goto out_profile;
 	}
 
-- 
1.7.2

^ permalink raw reply related

* RE: [PATCH] net/r8169: Update the function of parsing firmware
From: hayeswang @ 2011-01-10  2:25 UTC (permalink / raw)
  To: 'Ben Hutchings'; +Cc: romieu, netdev, linux-kernel
In-Reply-To: <20110107151755.GN3702@decadent.org.uk>

> From: Ben Hutchings [mailto:benh@debian.org] 
> Sent: Friday, January 07, 2011 11:18 PM
> To: Hayeswang
> Cc: romieu@fr.zoreil.com; netdev@vger.kernel.org; 
> linux-kernel@vger.kernel.org
> Subject: Re: [PATCH] net/r8169: Update the function of 
> parsing firmware
> 
> On Fri, 2011-01-07 at 17:45 +0800, Hayes Wang wrote:
> > Update rtl_phy_write_fw function. The new function could parse the 
> > complex firmware which is used by RTL8111E and later.
> > The new firmware may read data and do some operations, not just do 
> > writing only.
> > 
> > Signed-off-by: Hayes Wang <hayeswang@realtek.com>
> > ---
> >  drivers/net/r8169.c |  112 
> > ++++++++++++++++++++++++++++++++++++++++++++-------
> >  1 files changed, 97 insertions(+), 15 deletions(-)
> > 
> > diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c index 
> > 27a7c20..2115424 100644
> > --- a/drivers/net/r8169.c
> > +++ b/drivers/net/r8169.c
> [...] 
> > -	while (i-- != 0) {
> > -		u32 action = le32_to_cpu(*phytable);
> > -		u32 data = action & 0x0000ffff;
> > -		u32 reg = (action & 0x0fff0000) >> 16;
> > +	predata = 0;
> > +	count = 0;
> > +
> > +	for (index = 0; index < fw->size / sizeof(*phytable); ) {
> > +		u32 action = le32_to_cpu(phytable[index]);
> > +		u32 data = action & 0x0000FFFF;
> > +		u32 regno = (action & 0x0FFF0000) >> 16;
> > +
> > +		if (!action)
> > +			break;
> >  
> > -		switch(action & 0xf0000000) {
> > +		switch(action & 0xF0000000) {
> [...]
> > +		case PHY_BJMPN:
> > +			index -= regno;
> > +			break;
> [...]
> 
> I'm concerned that this is being extended from a firmware 
> upload interface to a quite general interpreter for PHY 
> initialisation.  I realise that this will make it easier to 
> fix PHY firmware bugs in future but it also allows you to 
> accidentally introduce infinite loops.
> The initialisation programs will obviously not be subject to 
> the same sort of review on netdev that new C code is.
> 
I know the situation which you worry. However, the real action is depend to the
status of the hardware, and it is hard that I couldn't assume any situation to
check the firmware. Thus, I just check if every commands are valid. I could only
promise that there is no infinite loop if the firmware is correct.

> > +		case PHY_DELAY_MS:
> > +			mdelay(data);
> > +			index++;
> > +			break;
> 
> Why mdelay() and not msleep()?  This is not an atomic context.
> 
Accounding to the document, the msleep have to larger than 10ms. It would run
more than 10ms if you set less than 10 for msleep. I think it takes more delay
than which I need. Beside, I don't sure if it would be run during atomic
context, so I think using mdelay is safer.

> > +		case PHY_READ_MAC_BYTE:
> > +		case PHY_WRITE_MAC_BYTE:
> > +		case PHY_WRITE_ERI_WORD:
> >  		default:
> >  			BUG();
> >  		}
> > +
> > +		if (index < 0)
> > +			BUG();
> [...]
> 
> index is unsigned so it can't be < 0.  It looks like the loop 
> condition should catch an out-of-range index, but really the 
> range-checking should be done in the first loop.
> 
I would try to fix this.

> Ben.
> 
> --
> Ben Hutchings
> We get into the habit of living before acquiring the habit of 
> thinking.
>                                                               
> - Albert Camus
> 
> 
> ------Please consider the environment before printing this e-mail. 
> 
> 


^ permalink raw reply

* Re: [PATCH v4 00/10] net/fec: add dual fec support for i.MX28
From: Shawn Guo @ 2011-01-10  3:08 UTC (permalink / raw)
  To: David Miller
  Cc: gerg, baruch, eric, bryan.wu, r64343, B32542, u.kleine-koenig, lw,
	w.sang, s.hauer, jamie, jamie, netdev, linux-arm-kernel
In-Reply-To: <20110109.154409.242134862.davem@davemloft.net>

On Sun, Jan 09, 2011 at 03:44:09PM -0800, David Miller wrote:
> From: Shawn Guo <shawn.guo@freescale.com>
> Date: Thu, 6 Jan 2011 15:13:08 +0800
> 
> > This patch series is to add dual fec support for mx28, which is
> > a mxs-based soc. Some code changes related to the following commits
> > are also made in this patch set for some reasons.
> > 
> >  e6b043d512fa8d9a3801bf5d72bfa3b8fc3b3cc8
> >  netdev/fec.c: add phylib supporting to enable carrier detection (v2)
> > 
> >  e3fe8558c7fc182972c3d947d88744482111f304
> >  net/fec: fix pm to survive to suspend/resume
> > 
> > It's been tested on mx28 evk and mx51 babbage. For mx28, it has
> > to work against the tree
> > 
> >  git://git.pengutronix.de/git/imx/linux-2.6.git imx-for-2.6.38
> > 
> > plus patch
> > 
> >  [PATCH v4] ARM: mxs: Change duart device to use amba-pl011
> > 
> > The 3 patches below preceding with * have changes since v3, and
> > the detailed change log can be found in individual patch.
> 
> I've applied all of the "net/fec:" patches (#1 to #5) to net-2.6,
> please push the ARM changes via the appropriate ARM tree.
> 
> Thanks.
> 
Thanks, David.  I will ping Sascha for ARM changes.

-- 
Regards,
Shawn


^ permalink raw reply

* Re: Bad TCP timestamps on non-PC platforms
From: Alex Dubov @ 2011-01-10  3:41 UTC (permalink / raw)
  To: Eric Dumazet; +Cc: netdev, David Miller

> > 
> > You dont give new informations ;)
> > 

Some additional information (my wireshark was not validating checksums, so
I missed the real culprit).

It so appears, that when timestamps are enabled on my dev board, TCP
checksum in SYN packet turns out to be incorrect. That's why those packets
are dropped by the remote side. When TCP timestamps are disabled, checksums
are correct.

Any ideas where this particular problem may originate?



      

^ permalink raw reply

* Re: Bad TCP timestamps on non-PC platforms
From: Stephen Hemminger @ 2011-01-10  3:57 UTC (permalink / raw)
  To: Alex Dubov; +Cc: Eric Dumazet, netdev, David Miller
In-Reply-To: <798351.95533.qm@web37603.mail.mud.yahoo.com>

On Sun, 9 Jan 2011 19:41:13 -0800 (PST)
Alex Dubov <oakad@yahoo.com> wrote:

> > > 
> > > You dont give new informations ;)
> > > 
> 
> Some additional information (my wireshark was not validating checksums, so
> I missed the real culprit).
> 
> It so appears, that when timestamps are enabled on my dev board, TCP
> checksum in SYN packet turns out to be incorrect. That's why those packets
> are dropped by the remote side. When TCP timestamps are disabled, checksums
> are correct.
> 
> Any ideas where this particular problem may originate?

Is there a bug in checksum offload in the driver?
Does the hardware correctly handle checksum of packets that are
unaligned or whose length is an odd number of bytes?

If the hardware can't do checksum correctly, the driver should either
disable checksum offload or in worst case copy the packet to a new
buffer that is in a known safe place.

^ permalink raw reply

* [PATCH 0/2] net: Allow allocating different number RX and TX mqs
From: Tom Herbert @ 2011-01-10  5:36 UTC (permalink / raw)
  To: davem, netdev

Add functions so that a different number of TX and RX queues can be
allocated in a netdevice.  Second patch modifies mlx4 driver to call
this function which is an example of a driver that allocates different
numbers for TX and RX queues.


^ permalink raw reply

* [PATCH 1/2] net: Add alloc_netdev_mqs function
From: Tom Herbert @ 2011-01-10  5:36 UTC (permalink / raw)
  To: davem, netdev

Added alloc_netdev_mqs function which allows the number of transmit and
receive queues to be specified independenty.  alloc_netdev_mq was
changed to a macro to call the new function.  Also added
alloc_etherdev_mqs with same purpose.

Signed-off-by: Tom Herbert <therbert@google.com>
---
 include/linux/etherdevice.h |    4 +++-
 include/linux/netdevice.h   |   10 +++++++---
 net/core/dev.c              |   32 +++++++++++++++++++++-----------
 net/ethernet/eth.c          |   12 +++++++-----
 4 files changed, 38 insertions(+), 20 deletions(-)

diff --git a/include/linux/etherdevice.h b/include/linux/etherdevice.h
index f16a010..bec8b82 100644
--- a/include/linux/etherdevice.h
+++ b/include/linux/etherdevice.h
@@ -48,8 +48,10 @@ extern int eth_validate_addr(struct net_device *dev);
 
 
 
-extern struct net_device *alloc_etherdev_mq(int sizeof_priv, unsigned int queue_count);
+extern struct net_device *alloc_etherdev_mqs(int sizeof_priv, unsigned int txqs,
+					    unsigned int rxqs);
 #define alloc_etherdev(sizeof_priv) alloc_etherdev_mq(sizeof_priv, 1)
+#define alloc_etherdev_mq(sizeof_priv, count) alloc_etherdev_mqs(sizeof_priv, count, count)
 
 /**
  * is_zero_ether_addr - Determine if give Ethernet address is all zeros.
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 0f6b1c9..132baf4 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -2191,11 +2191,15 @@ static inline void netif_addr_unlock_bh(struct net_device *dev)
 extern void		ether_setup(struct net_device *dev);
 
 /* Support for loadable net-drivers */
-extern struct net_device *alloc_netdev_mq(int sizeof_priv, const char *name,
+extern struct net_device *alloc_netdev_mqs(int sizeof_priv, const char *name,
 				       void (*setup)(struct net_device *),
-				       unsigned int queue_count);
+				       unsigned int txqs, unsigned int rxqs);
 #define alloc_netdev(sizeof_priv, name, setup) \
-	alloc_netdev_mq(sizeof_priv, name, setup, 1)
+	alloc_netdev_mqs(sizeof_priv, name, setup, 1, 1)
+
+#define alloc_netdev_mq(sizeof_priv, name, setup, count) \
+	alloc_netdev_mqs(sizeof_priv, name, setup, count, count)
+
 extern int		register_netdev(struct net_device *dev);
 extern void		unregister_netdev(struct net_device *dev);
 
diff --git a/net/core/dev.c b/net/core/dev.c
index a215269..d13cd64 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -5621,18 +5621,20 @@ struct netdev_queue *dev_ingress_queue_create(struct net_device *dev)
 }
 
 /**
- *	alloc_netdev_mq - allocate network device
+ *	alloc_netdev_mqs - allocate network device
  *	@sizeof_priv:	size of private data to allocate space for
  *	@name:		device name format string
  *	@setup:		callback to initialize device
- *	@queue_count:	the number of subqueues to allocate
+ *	@txqs:		the number of TX subqueues to allocate
+ *	@rxqs:		the number of RX subqueues to allocate
  *
  *	Allocates a struct net_device with private data area for driver use
  *	and performs basic initialization.  Also allocates subquue structs
- *	for each queue on the device at the end of the netdevice.
+ *	for each queue on the device.
  */
-struct net_device *alloc_netdev_mq(int sizeof_priv, const char *name,
-		void (*setup)(struct net_device *), unsigned int queue_count)
+struct net_device *alloc_netdev_mqs(int sizeof_priv, const char *name,
+		void (*setup)(struct net_device *),
+		unsigned int txqs, unsigned int rxqs)
 {
 	struct net_device *dev;
 	size_t alloc_size;
@@ -5640,12 +5642,20 @@ struct net_device *alloc_netdev_mq(int sizeof_priv, const char *name,
 
 	BUG_ON(strlen(name) >= sizeof(dev->name));
 
-	if (queue_count < 1) {
+	if (txqs < 1) {
 		pr_err("alloc_netdev: Unable to allocate device "
 		       "with zero queues.\n");
 		return NULL;
 	}
 
+#ifdef CONFIG_RPS
+	if (rxqs < 1) {
+		pr_err("alloc_netdev: Unable to allocate device "
+		       "with zero RX queues.\n");
+		return NULL;
+	}
+#endif
+
 	alloc_size = sizeof(struct net_device);
 	if (sizeof_priv) {
 		/* ensure 32-byte alignment of private area */
@@ -5676,14 +5686,14 @@ struct net_device *alloc_netdev_mq(int sizeof_priv, const char *name,
 
 	dev_net_set(dev, &init_net);
 
-	dev->num_tx_queues = queue_count;
-	dev->real_num_tx_queues = queue_count;
+	dev->num_tx_queues = txqs;
+	dev->real_num_tx_queues = txqs;
 	if (netif_alloc_netdev_queues(dev))
 		goto free_pcpu;
 
 #ifdef CONFIG_RPS
-	dev->num_rx_queues = queue_count;
-	dev->real_num_rx_queues = queue_count;
+	dev->num_rx_queues = rxqs;
+	dev->real_num_rx_queues = rxqs;
 	if (netif_alloc_rx_queues(dev))
 		goto free_pcpu;
 #endif
@@ -5711,7 +5721,7 @@ free_p:
 	kfree(p);
 	return NULL;
 }
-EXPORT_SYMBOL(alloc_netdev_mq);
+EXPORT_SYMBOL(alloc_netdev_mqs);
 
 /**
  *	free_netdev - free network device
diff --git a/net/ethernet/eth.c b/net/ethernet/eth.c
index f00ef2f..f9d7ac9 100644
--- a/net/ethernet/eth.c
+++ b/net/ethernet/eth.c
@@ -347,10 +347,11 @@ void ether_setup(struct net_device *dev)
 EXPORT_SYMBOL(ether_setup);
 
 /**
- * alloc_etherdev_mq - Allocates and sets up an Ethernet device
+ * alloc_etherdev_mqs - Allocates and sets up an Ethernet device
  * @sizeof_priv: Size of additional driver-private structure to be allocated
  *	for this Ethernet device
- * @queue_count: The number of queues this device has.
+ * @txqs: The number of TX queues this device has.
+ * @txqs: The number of RX queues this device has.
  *
  * Fill in the fields of the device structure with Ethernet-generic
  * values. Basically does everything except registering the device.
@@ -360,11 +361,12 @@ EXPORT_SYMBOL(ether_setup);
  * this private data area.
  */
 
-struct net_device *alloc_etherdev_mq(int sizeof_priv, unsigned int queue_count)
+struct net_device *alloc_etherdev_mqs(int sizeof_priv, unsigned int txqs,
+				      unsigned int rxqs)
 {
-	return alloc_netdev_mq(sizeof_priv, "eth%d", ether_setup, queue_count);
+	return alloc_netdev_mqs(sizeof_priv, "eth%d", ether_setup, txqs, rxqs);
 }
-EXPORT_SYMBOL(alloc_etherdev_mq);
+EXPORT_SYMBOL(alloc_etherdev_mqs);
 
 static size_t _format_mac_addr(char *buf, int buflen,
 			       const unsigned char *addr, int len)
-- 
1.7.3.1



^ permalink raw reply related

* [PATCH 2/2] mlx4: Call alloc_etherdev to allocate RX and TX queues
From: Tom Herbert @ 2011-01-10  5:36 UTC (permalink / raw)
  To: davem, netdev

Changed driver to call alloc_etherdev_mqs so that the number of TX
and RX queues can be set to correct values in the netdev device.

Signed-off-by: Tom Herbert <therbert@google.com>
---
 drivers/net/mlx4/en_netdev.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/net/mlx4/en_netdev.c b/drivers/net/mlx4/en_netdev.c
index 6d6806b..897f576 100644
--- a/drivers/net/mlx4/en_netdev.c
+++ b/drivers/net/mlx4/en_netdev.c
@@ -972,7 +972,8 @@ int mlx4_en_init_netdev(struct mlx4_en_dev *mdev, int port,
 	int i;
 	int err;
 
-	dev = alloc_etherdev_mq(sizeof(struct mlx4_en_priv), prof->tx_ring_num);
+	dev = alloc_etherdev_mqs(sizeof(struct mlx4_en_priv),
+	    prof->tx_ring_num, prof->rx_ring_num);
 	if (dev == NULL) {
 		mlx4_err(mdev, "Net device allocation failed\n");
 		return -ENOMEM;
-- 
1.7.3.1


^ permalink raw reply related

* what are txqueuelen and nic ring parameters exactly?
From: MK @ 2011-01-10  5:38 UTC (permalink / raw)
  To: netdev

Hello,

I often come across two variables that can be tuned for networking -

1) txqueuelen (via ifconfig )
2) NIC ring parameters for tx and rx (via ethtool)

Can someone please tell me where these queues are exactly? Are both
the same (seems not since their current values are different on my
computer) . Is txqueuelen somehow part of the linux networking
subsystem whereas the other is purely a h/w device construct?

Thanks a lot!

^ permalink raw reply

* Re: Bad TCP timestamps on non-PC platforms
From: Alex Dubov @ 2011-01-10  6:33 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: Eric Dumazet, netdev, David Miller
In-Reply-To: <20110109195711.1d622b2e@nehalam>


> > Any ideas where this particular problem may
> originate?
> 
> Is there a bug in checksum offload in the driver?
> Does the hardware correctly handle checksum of packets that
> are
> unaligned or whose length is an odd number of bytes?
> 
> If the hardware can't do checksum correctly, the driver
> should either
> disable checksum offload or in worst case copy the packet
> to a new
> buffer that is in a known safe place.

I managed to work around the issue by clearing the NETIF_F_IP_CSUM
feature flag of the gianfar network driver, so it appears the bug is
indeed somewhere there.



      

^ permalink raw reply

* Re: Bad TCP timestamps on non-PC platforms
From: Eric Dumazet @ 2011-01-10  7:07 UTC (permalink / raw)
  To: Alex Dubov; +Cc: Stephen Hemminger, netdev, David Miller
In-Reply-To: <373539.88491.qm@web37603.mail.mud.yahoo.com>

Le dimanche 09 janvier 2011 à 22:33 -0800, Alex Dubov a écrit :
> > > Any ideas where this particular problem may
> > originate?
> > 
> > Is there a bug in checksum offload in the driver?
> > Does the hardware correctly handle checksum of packets that
> > are
> > unaligned or whose length is an odd number of bytes?
> > 
> > If the hardware can't do checksum correctly, the driver
> > should either
> > disable checksum offload or in worst case copy the packet
> > to a new
> > buffer that is in a known safe place.
> 
> I managed to work around the issue by clearing the NETIF_F_IP_CSUM
> feature flag of the gianfar network driver, so it appears the bug is
> indeed somewhere there.
> 

Its incredible how TCP timestamps can be "usual suspects" ;)




^ permalink raw reply

* Re: [PATCH V8 02/13] ntp: add ADJ_SETOFFSET mode bit
From: Richard Cochran @ 2011-01-10  7:17 UTC (permalink / raw)
  To: Kuwahara,T.
  Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-api-u79uwXL29TY76Z2rM5mHXA, netdev-u79uwXL29TY76Z2rM5mHXA,
	Alan Cox, Arnd Bergmann, Christoph Lameter, David Miller,
	John Stultz, Krzysztof Halasa, Peter Zijlstra, Rodolfo Giometti,
	Thomas Gleixner
In-Reply-To: <AANLkTikigXGSACF6R6kfNHyKZ7GFWrUrCMxygvL3fUC6-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

On Mon, Jan 10, 2011 at 06:07:26AM +0900, Kuwahara,T. wrote:
> On Sun, Jan 9, 2011 at 2:50 AM, Richard Cochran
> <richardcochran-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> > we want to be able to jump the clock arbitrarily.
> 
> Another problem remains:  How do you deal with leap seconds?  I mean,
> given that 1 minute is not always 60 seconds, then what time was it
> XXXXX seconds ago?   Maybe some kind of lookup table is necessary, but
> in such case, isn't it a better choice just to use the
> clock_settime/settimeofday syscall?

Well, first of all, the PTP Hardware Clocks for which this whole patch
set was created in the first place will keep their time as TAI. Adding
seconds to such time values is unambiguous.

Secondly, the question you ask applies equally to the existing
interfaces, so it is a mute point with regard to the patch series.

Richard

^ permalink raw reply

* Re: Bad TCP timestamps on non-PC platforms
From: David Miller @ 2011-01-10  7:19 UTC (permalink / raw)
  To: eric.dumazet; +Cc: oakad, shemminger, netdev
In-Reply-To: <1294643276.2709.877.camel@edumazet-laptop>

From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Mon, 10 Jan 2011 08:07:56 +0100

> Le dimanche 09 janvier 2011 à 22:33 -0800, Alex Dubov a écrit :
>> I managed to work around the issue by clearing the NETIF_F_IP_CSUM
>> feature flag of the gianfar network driver, so it appears the bug is
>> indeed somewhere there.
>> 
> 
> Its incredible how TCP timestamps can be "usual suspects" ;)

Or RTC chips! :-)

^ permalink raw reply

* Re: [PATCH V8 02/13] ntp: add ADJ_SETOFFSET mode bit
From: Richard Cochran @ 2011-01-10  7:22 UTC (permalink / raw)
  To: Kuwahara,T.
  Cc: linux-kernel, linux-api, netdev, Alan Cox, Arnd Bergmann,
	Christoph Lameter, David Miller, John Stultz, Krzysztof Halasa,
	Peter Zijlstra, Rodolfo Giometti, Thomas Gleixner
In-Reply-To: <AANLkTikigXGSACF6R6kfNHyKZ7GFWrUrCMxygvL3fUC6@mail.gmail.com>

On Mon, Jan 10, 2011 at 06:07:26AM +0900, Kuwahara,T. wrote:
> 
> Another problem remains:  How do you deal with leap seconds?  I mean,

Since you have changed the topic, does that mean that you now agree
with adding a new mode bit? ;)

Richard

^ permalink raw reply

* Re: [PATCH 1/6] offloading: Accept NETIF_F_HW_CSUM for all protocols.
From: David Miller @ 2011-01-10  7:36 UTC (permalink / raw)
  To: jesse; +Cc: netdev
In-Reply-To: <1294590215-15541-1-git-send-email-jesse@nicira.com>


Thanks for doing this work Jesse, I've applied all of these patches.

I added a "net " prefix to the commit header lines so that people know
what kind of "offloading" these changes are about :-)

^ permalink raw reply

* Re: [PATCH] tlan: Use pr_fmt, pr_<level> and netdev_<level>, remove changelog
From: David Miller @ 2011-01-10  7:39 UTC (permalink / raw)
  To: joe; +Cc: sakari.ailus, netdev, chessman
In-Reply-To: <1294354088.12561.295.camel@Joe-Laptop>

From: Joe Perches <joe@perches.com>
Date: Thu, 06 Jan 2011 14:48:08 -0800

> Neatening and standardization to the standard logging mechanisms.
> The changelog isn't useful anymore.
> Miscellaneous speen/speed typo correction.
> 
> Signed-off-by: Joe Perches <joe@perches.com>

This patch didn't apply cleanly to the current sources.

And anyways, please resubmit this once 2.6.38-rc1 is out and I
start taking net-next-2.6 patches again.

Thanks Joe.

^ permalink raw reply

* Re: [net-next 00/12][pull-request] Intel Wired LAN Driver Updates
From: David Miller @ 2011-01-10  7:45 UTC (permalink / raw)
  To: jeffrey.t.kirsher; +Cc: netdev, gospo, bphilips
In-Reply-To: <1294360629.2622.28.camel@jtkirshe-MOBL1>

From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Date: Thu, 06 Jan 2011 16:37:09 -0800

> On Thu, 2011-01-06 at 16:29 -0800, Kirsher, Jeffrey T wrote:
>> From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
>> 
>> The following series contains ixgbe/e1000e cleanups and fixes.  The
>> addition of CE4100 support in e1000, and ixgb VLAN conversion to the
>> new model.
>> 
>> The following changes since commit dbbe68bb12b34f3e450da7a73c20e6fa1f85d63a:
>> 
>>   Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
>> 
>> are available in the git repository at:
>> 
>>   master.kernel.org:/pub/scm/linux/kernel/git/jkirsher/net-next-2.6.git master
 ...
> I apologize, I fat fingered Andy Gospodarek's email address.  I have
> corrected it in this response.

Since Jesse Gross found problems with patch #8 (the ixgb conversion to
the new VLAN model) I hand applied every patch except for #8 to my
tree while we wait for Emil's respin of that.

^ permalink raw reply

* Re: [patch] phonet: some signedness bugs
From: Rémi Denis-Courmont @ 2011-01-10  7:58 UTC (permalink / raw)
  To: ext Dan Carpenter
  Cc: David S. Miller, netdev, kernel-janitors, dan.j.rosenberg
In-Reply-To: <20110107203755.GB1959@bicker>

On Friday 07 January 2011 22:37:55 ext Dan Carpenter, you wrote:
> Dan Rosenberg pointed out that there were some signed comparison bugs
> in the phonet protocol.

There are two ways to solve this: change *only* the proto_get function to use 
an unsigned parameter, or cast the protocol to unsigned in the comparison.

As David pointed out, your patch breaks the socket() callback prototype.

-- 
Rémi Denis-Courmont
Nokia Devices R&D, Maemo Software, Helsinki

^ 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