Netdev List
 help / color / mirror / Atom feed
* Re: [PATCH] improved xfrm_audit_log() patch
From: David Miller @ 2007-08-22 19:51 UTC (permalink / raw)
  To: latten; +Cc: netdev, linux-audit
In-Reply-To: <20070821.002405.88473654.davem@davemloft.net>

From: David Miller <davem@davemloft.net>
Date: Tue, 21 Aug 2007 00:24:05 -0700 (PDT)

> Looks good, applied to net-2.6.24, thanks Joy.

Something is still buggered up in this patch, you can't add this local
"audit_info" variable unconditionally to these functions, and
alternatively you also can't add a bunch of ifdefs to xfrm_user.c to
cover it up either.

  CC [M]  net/xfrm/xfrm_user.o
net/xfrm/xfrm_user.c: In function ^[$,1rx^[(Bxfrm_add_sa^[$,1ry^[(B:
net/xfrm/xfrm_user.c:450: warning: unused variable ^[$,1rx^[(Baudit_info^[$,1ry^[(B
net/xfrm/xfrm_user.c: In function ^[$,1rx^[(Bxfrm_del_sa^[$,1ry^[(B:
net/xfrm/xfrm_user.c:525: warning: unused variable ^[$,1rx^[(Baudit_info^[$,1ry^[(B
net/xfrm/xfrm_user.c: In function ^[$,1rx^[(Bxfrm_add_policy^[$,1ry^[(B:
net/xfrm/xfrm_user.c:1140: warning: unused variable ^[$,1rx^[(Baudit_info^[$,1ry^[(B
net/xfrm/xfrm_user.c: In function ^[$,1rx^[(Bxfrm_get_policy^[$,1ry^[(B:
net/xfrm/xfrm_user.c:1404: warning: unused variable ^[$,1rx^[(Baudit_info^[$,1ry^[(B
net/xfrm/xfrm_user.c: In function ^[$,1rx^[(Bxfrm_add_pol_expire^[$,1ry^[(B:
net/xfrm/xfrm_user.c:1651: warning: unused variable ^[$,1rx^[(Baudit_info^[$,1ry^[(B
net/xfrm/xfrm_user.c: In function ^[$,1rx^[(Bxfrm_add_sa_expire^[$,1ry^[(B:
net/xfrm/xfrm_user.c:1688: warning: unused variable ^[$,1rx^[(Baudit_info^[$,1ry^[(B

So I'm going to revert for now.  Let me know when you have
a fixed version of the patch.

Thanks.

^ permalink raw reply

* Re: [PATCH 03/16] [XFRM] netlink: Use nlmsg_data() instead of NLMSG_DATA()
From: David Miller @ 2007-08-22 19:49 UTC (permalink / raw)
  To: tgraf; +Cc: netdev
In-Reply-To: <20070822145630.199729600@lsx.localdomain>

From: Thomas Graf <tgraf@suug.ch>
Date: Wed, 22 Aug 2007 16:55:41 +0200

> Signed-off-by: Thomas Graf <tgraf@suug.ch>

Applied, thanks.

^ permalink raw reply

* Re: r8169: slow samba performance
From: Bruce Cole @ 2007-08-22 19:46 UTC (permalink / raw)
  To: Shane; +Cc: netdev
In-Reply-To: <20070822182116.GA5445@csy.ca>

Shane wrote:
> On Wed, Aug 22, 2007 at 09:39:47AM -0700, Bruce Cole wrote:
>   
>> Shane, join the crowd :)  Try the fix I just re-posted over here:
>>     
>
> Bruce, gigabit speeds thanks for the pointer.  This fix
> works well for me though I just added the three or so lines
> in the elseif statement as it rejected with the
> r8169-20070818.  I suppose I could've merged the whole
> thing and if you need that tested, let me know but this is
> looking good.
>   
Glad it works for you.  I'm not the maintainer, and also don't have 
adequate specs from Realtek to definitively explain why the NPQ bit 
apparently needs to be re-enabled when some but not all of the TX FIFO 
is dequeued.  It is documented as if it isn't cleared until the FIFO is 
empty.  So I assume an official patch will have to wait until Francois 
is back.




^ permalink raw reply

* Re: [PATCH 02/16] [XFRM] netlink: Use nlmsg_end() and nlmsg_cancel()
From: David Miller @ 2007-08-22 19:47 UTC (permalink / raw)
  To: tgraf; +Cc: netdev
In-Reply-To: <20070822145630.052210318@lsx.localdomain>

From: Thomas Graf <tgraf@suug.ch>
Date: Wed, 22 Aug 2007 16:55:40 +0200

> Signed-off-by: Thomas Graf <tgraf@suug.ch>

Applied.

^ permalink raw reply

* [PATCH] xfrm: export sysctl_xfrm_acq_expires
From: Neil Horman @ 2007-08-22 19:42 UTC (permalink / raw)
  To: netdev; +Cc: davem, kuznet, pekkas, jmorris, yoshfuji, kaber, nhorman

Hey all-
	I had noticed that an extra sysctl for xfrm had been added while back
(specifically sysctl_xfrm_acq_expires).  Unlike its related sysctl's however,
this was never exported so that out-of-tree modules could access it, and I
thought it would be a good idea if it was.  This patch handles that.

Thanks & Regards
Neil

Signed-off-by: Neil Horman <nhorman@tuxdriver.com>


 xfrm_state.c |    1 +
 1 file changed, 1 insertion(+)


diff --git a/net/xfrm/xfrm_state.c b/net/xfrm/xfrm_state.c
index d4356e6..62ae5a2 100644
--- a/net/xfrm/xfrm_state.c
+++ b/net/xfrm/xfrm_state.c
@@ -34,6 +34,7 @@ u32 sysctl_xfrm_aevent_rseqth __read_mostly = XFRM_AE_SEQT_SIZE;
 EXPORT_SYMBOL(sysctl_xfrm_aevent_rseqth);
 
 u32 sysctl_xfrm_acq_expires __read_mostly = 30;
+EXPORT_SYMBOL(sysctl_xfrm_acq_expires);
 
 /* Each xfrm_state may be linked to two tables:
 
-- 
/***************************************************
 *Neil Horman
 *Software Engineer
 *Red Hat, Inc.
 *nhorman@tuxdriver.com
 *gpg keyid: 1024D / 0x92A74FA1
 *http://pgp.mit.edu
 ***************************************************/

^ permalink raw reply related

* Re: [PATCH 01/16] [XFRM] netlink: Use nlmsg_put() instead of NLMSG_PUT()
From: David Miller @ 2007-08-22 19:47 UTC (permalink / raw)
  To: tgraf; +Cc: netdev
In-Reply-To: <20070822145629.894490697@lsx.localdomain>

From: Thomas Graf <tgraf@suug.ch>
Date: Wed, 22 Aug 2007 16:55:39 +0200

> Signed-off-by: Thomas Graf <tgraf@suug.ch>

Applied.

^ permalink raw reply

* Re: [PATCH] netdevice: kernel docbook addition
From: David Miller @ 2007-08-22 19:46 UTC (permalink / raw)
  To: shemminger; +Cc: netdev
In-Reply-To: <20070822123314.785dea2a@freepuppy.rosehill.hemminger.net>

From: Stephen Hemminger <shemminger@linux-foundation.org>
Date: Wed, 22 Aug 2007 12:33:14 -0700

> Add more kernel doc's for part of the network device API.
> This is only a start, and needs more work.
> 
> Applies against net-2.6.24
> 
> Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>

Applied, thanks Stephen.

^ permalink raw reply

* Re: [PATCH] xfrm: export sysctl_xfrm_acq_expires
From: David Miller @ 2007-08-22 19:44 UTC (permalink / raw)
  To: nhorman; +Cc: netdev, kuznet, pekkas, jmorris, yoshfuji, kaber
In-Reply-To: <20070822194202.GB17694@hmsreliant.think-freely.org>

From: Neil Horman <nhorman@tuxdriver.com>
Date: Wed, 22 Aug 2007 15:42:02 -0400

> Hey all-
> 	I had noticed that an extra sysctl for xfrm had been added while back
> (specifically sysctl_xfrm_acq_expires).  Unlike its related sysctl's however,
> this was never exported so that out-of-tree modules could access it, and I
> thought it would be a good idea if it was.  This patch handles that.
> 
> Thanks & Regards
> Neil
> 
> Signed-off-by: Neil Horman <nhorman@tuxdriver.com>

There is no reason for out-of-tree code to access it and no
current examples exist.

It is an internal knob controlling how a specific part of the IPSEC
rule lookup operates, and that is all in-tree.


^ permalink raw reply

* Re: [RFC IPROUTE]: Add flow classifier support
From: David Miller @ 2007-08-22 19:36 UTC (permalink / raw)
  To: shemminger; +Cc: kaber, netdev, hadi
In-Reply-To: <20070822104615.550dd952@freepuppy.rosehill.hemminger.net>

From: Stephen Hemminger <shemminger@linux-foundation.org>
Date: Wed, 22 Aug 2007 10:46:15 -0700

> On Wed, 30 May 2007 11:42:01 +0200
> Patrick McHardy <kaber@trash.net> wrote:
> 
> > The iproute patch for the flow classifier.
> > 
> > 
> 
> This patch is on hold since the netlink changes haven't made it upstream yet.

I don't have the kernel side in my queue either, perhaps
I lost it or I didn't see it when it was sent out.

Patrick?

^ permalink raw reply

* Re: [PATCH] santize tc_ematch headers
From: David Miller @ 2007-08-22 19:36 UTC (permalink / raw)
  To: shemminger; +Cc: netdev
In-Reply-To: <20070822101838.31178935@freepuppy.rosehill.hemminger.net>

From: Stephen Hemminger <shemminger@linux-foundation.org>
Date: Wed, 22 Aug 2007 10:18:38 -0700

> The headers in tc_ematch are used by iproute2, so these headers
> should be processed.
> 
> Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>

Applied, thanks Stephen.

^ permalink raw reply

* Re: [PATCH] AH4: Update IPv4 options handling to conform to RFC 4302.
From: David Miller @ 2007-08-22 19:34 UTC (permalink / raw)
  To: nbowler; +Cc: netdev
In-Reply-To: <20070822142253.GA14870@totient.ellipticsemi.com>

From: Nick Bowler <nbowler@ellipticsemi.com>
Date: Wed, 22 Aug 2007 10:22:53 -0400

> In testing our ESP/AH offload hardware, I discovered an issue with how AH
> handles mutable fields in IPv4.  RFC 4302 (AH) states the following on the
> subject:
> 
>         For IPv4, the entire option is viewed as a unit; so even
>         though the type and length fields within most options are immutable
>         in transit, if an option is classified as mutable, the entire option
>         is zeroed for ICV computation purposes.
> 
> The current implementation does not zero the type and length fields, resulting
> in authentication failures when communicating with hosts that do (i.e. FreeBSD).
> 
> I have tested record route and timestamp options (ping -R and ping -T) on a
> small network involving Windows XP, FreeBSD 6.2, and Linux hosts, with one
> router.  In the presence of these options, the FreeBSD and Linux hosts (with
> the patch or with the hardware) can communicate.  The Windows XP host simply
> fails to accept these packets with or without the patch.
> 
> I have also been trying to test source routing options (using traceroute -g),
> but haven't had much luck getting this option to work *without* AH, let alone
> with.
> 
> Signed-off-by: Nick Bowler <nbowler@ellipticsemi.com>

Patch applied, thanks a lot Nick.

^ permalink raw reply

* [PATCH] netdevice: kernel docbook addition
From: Stephen Hemminger @ 2007-08-22 19:33 UTC (permalink / raw)
  To: David S. Miller; +Cc: netdev

Add more kernel doc's for part of the network device API.
This is only a start, and needs more work.

Applies against net-2.6.24

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>

--- a/Documentation/DocBook/kernel-api.tmpl	2007-08-21 15:43:37.000000000 -0700
+++ b/Documentation/DocBook/kernel-api.tmpl	2007-08-22 12:30:33.000000000 -0700
@@ -240,17 +240,23 @@ X!Ilib/string.c
      <sect1><title>Driver Support</title>
 !Enet/core/dev.c
 !Enet/ethernet/eth.c
+!Enet/sched/sch_generic.c
 !Iinclude/linux/etherdevice.h
+!Iinclude/linux/netdevice.h
+     </sect1>
+     <sect1><title>PHY Support</title>
 !Edrivers/net/phy/phy.c
 !Idrivers/net/phy/phy.c
 !Edrivers/net/phy/phy_device.c
 !Idrivers/net/phy/phy_device.c
 !Edrivers/net/phy/mdio_bus.c
 !Idrivers/net/phy/mdio_bus.c
+     </sect1>
 <!-- FIXME: Removed for now since no structured comments in source
+     <sect1><title>Wireless</title>
 X!Enet/core/wireless.c
--->
      </sect1>
+-->
      <sect1><title>Synchronous PPP</title>
 !Edrivers/net/wan/syncppp.c
      </sect1>
--- a/include/linux/netdevice.h	2007-08-21 15:44:00.000000000 -0700
+++ b/include/linux/netdevice.h	2007-08-22 12:00:16.000000000 -0700
@@ -302,17 +302,38 @@ enum
 
 extern void FASTCALL(__napi_schedule(struct napi_struct *n));
 
+/**
+ *	napi_schedule_prep - check if napi can be scheduled
+ *	@n: napi context
+ *
+ * Test if NAPI routine is already running, and if not mark
+ * it as running.  This is used as a condition variable
+ * insure only one NAPI poll instance runs
+ */
 static inline int napi_schedule_prep(struct napi_struct *n)
 {
 	return !test_and_set_bit(NAPI_STATE_SCHED, &n->state);
 }
 
+/**
+ *	napi_schedule - schedule NAPI poll
+ *	@n: napi context
+ *
+ * Schedule NAPI poll routine to be called if it is not already
+ * running.
+ */
 static inline void napi_schedule(struct napi_struct *n)
 {
 	if (napi_schedule_prep(n))
 		__napi_schedule(n);
 }
 
+/**
+ *	napi_complete - NAPI processing complete
+ *	@n: napi context
+ *
+ * Mark NAPI processing as complete.
+ */
 static inline void napi_complete(struct napi_struct *n)
 {
 	BUG_ON(!test_bit(NAPI_STATE_SCHED, &n->state));
@@ -320,12 +341,26 @@ static inline void napi_complete(struct 
 	clear_bit(NAPI_STATE_SCHED, &n->state);
 }
 
+/**
+ *	napi_disable - prevent NAPI from scheduling
+ *	@n: napi context
+ *
+ * Stop NAPI from being scheduled on this context.
+ * Waits till any outstanding processing completes.
+ */
 static inline void napi_disable(struct napi_struct *n)
 {
 	while (test_and_set_bit(NAPI_STATE_SCHED, &n->state))
 		msleep_interruptible(1);
 }
 
+/**
+ *	napi_disable - prevent NAPI from scheduling
+ *	@n: napi context
+ *
+ * Resume NAPI from being scheduled on this context.
+ * Must be paired with napi_disable.
+ */
 static inline void napi_enable(struct napi_struct *n)
 {
 	BUG_ON(!test_bit(NAPI_STATE_SCHED, &n->state));
@@ -636,6 +671,12 @@ struct net_device
 #define	NETDEV_ALIGN		32
 #define	NETDEV_ALIGN_CONST	(NETDEV_ALIGN - 1)
 
+/**
+ *	netdev_priv - access network device private data
+ *	@dev: network device
+ *
+ * Get network device private data
+ */
 static inline void *netdev_priv(const struct net_device *dev)
 {
 	return dev->priv;
@@ -773,11 +814,24 @@ static inline void netif_schedule(struct
 		__netif_schedule(dev);
 }
 
+/**
+ *	netif_start_queue - allow transmit
+ *	@dev: network device
+ *
+ *	Allow upper layers to call the device hard_start_xmit routine.
+ */
 static inline void netif_start_queue(struct net_device *dev)
 {
 	clear_bit(__LINK_STATE_XOFF, &dev->state);
 }
 
+/**
+ *	netif_wake_queue - restart transmit
+ *	@dev: network device
+ *
+ *	Allow upper layers to call the device hard_start_xmit routine.
+ *	Used for flow control when transmit resources are available.
+ */
 static inline void netif_wake_queue(struct net_device *dev)
 {
 #ifdef CONFIG_NETPOLL_TRAP
@@ -790,16 +844,35 @@ static inline void netif_wake_queue(stru
 		__netif_schedule(dev);
 }
 
+/**
+ *	netif_stop_queue - stop transmitted packets
+ *	@dev: network device
+ *
+ *	Stop upper layers calling the device hard_start_xmit routine.
+ *	Used for flow control when transmit resources are unavailable.
+ */
 static inline void netif_stop_queue(struct net_device *dev)
 {
 	set_bit(__LINK_STATE_XOFF, &dev->state);
 }
 
+/**
+ *	netif_queue_stopped - test if transmit queue is flowblocked
+ *	@dev: network device
+ *
+ *	Test if transmit queue on device is currently unable to send.
+ */
 static inline int netif_queue_stopped(const struct net_device *dev)
 {
 	return test_bit(__LINK_STATE_XOFF, &dev->state);
 }
 
+/**
+ *	netif_running - test if up
+ *	@dev: network device
+ *
+ *	Test if the device has been brought up.
+ */
 static inline int netif_running(const struct net_device *dev)
 {
 	return test_bit(__LINK_STATE_START, &dev->state);
@@ -811,6 +884,14 @@ static inline int netif_running(const st
  * done at the overall netdevice level.
  * Also test the device if we're multiqueue.
  */
+
+/**
+ *	netif_start_subqueue - allow sending packets on subqueue
+ *	@dev: network device
+ *	@queue_index: sub queue index
+ *
+ * Start individual transmit queue of a device with multiple transmit queues.
+ */
 static inline void netif_start_subqueue(struct net_device *dev, u16 queue_index)
 {
 #ifdef CONFIG_NETDEVICES_MULTIQUEUE
@@ -818,6 +899,13 @@ static inline void netif_start_subqueue(
 #endif
 }
 
+/**
+ *	netif_stop_subqueue - stop sending packets on subqueue
+ *	@dev: network device
+ *	@queue_index: sub queue index
+ *
+ * Stop individual transmit queue of a device with multiple transmit queues.
+ */
 static inline void netif_stop_subqueue(struct net_device *dev, u16 queue_index)
 {
 #ifdef CONFIG_NETDEVICES_MULTIQUEUE
@@ -829,6 +917,13 @@ static inline void netif_stop_subqueue(s
 #endif
 }
 
+/**
+ *	netif_subqueue_stopped - test status of subqueue
+ *	@dev: network device
+ *	@queue_index: sub queue index
+ *
+ * Check individual transmit queue of a device with multiple transmit queues.
+ */
 static inline int netif_subqueue_stopped(const struct net_device *dev,
 					 u16 queue_index)
 {
@@ -840,6 +935,14 @@ static inline int netif_subqueue_stopped
 #endif
 }
 
+
+/**
+ *	netif_wake_subqueue - allow sending packets on subqueue
+ *	@dev: network device
+ *	@queue_index: sub queue index
+ *
+ * Resume individual transmit queue of a device with multiple transmit queues.
+ */
 static inline void netif_wake_subqueue(struct net_device *dev, u16 queue_index)
 {
 #ifdef CONFIG_NETDEVICES_MULTIQUEUE
@@ -853,6 +956,13 @@ static inline void netif_wake_subqueue(s
 #endif
 }
 
+/**
+ *	netif_is_multiqueue - test if device has multiple transmit queues
+ *	@dev: network device
+ *
+ * Check if device has multiple transmit queues
+ * Always falls if NETDEVICE_MULTIQUEUE is not configured
+ */
 static inline int netif_is_multiqueue(const struct net_device *dev)
 {
 #ifdef CONFIG_NETDEVICES_MULTIQUEUE
@@ -889,18 +999,28 @@ extern int		dev_set_mac_address(struct n
 extern int		dev_hard_start_xmit(struct sk_buff *skb,
 					    struct net_device *dev);
 
-extern void		dev_init(void);
-
 extern int		netdev_budget;
 
 /* Called by rtnetlink.c:rtnl_unlock() */
 extern void netdev_run_todo(void);
 
+/**
+ *	dev_put - get reference to device
+ *	@dev: network device
+ *
+ * Hold reference to device to keep it from being freed.
+ */
 static inline void dev_put(struct net_device *dev)
 {
 	atomic_dec(&dev->refcnt);
 }
 
+/**
+ *	dev_hold - release reference to device
+ *	@dev: network device
+ *
+ * Release reference to device to allow it to be freed.
+ */
 static inline void dev_hold(struct net_device *dev)
 {
 	atomic_inc(&dev->refcnt);
@@ -917,6 +1037,12 @@ static inline void dev_hold(struct net_d
 
 extern void linkwatch_fire_event(struct net_device *dev);
 
+/**
+ *	netif_carrier_ok - test if carrier present
+ *	@dev: network device
+ *
+ * Check if carrier is present on device
+ */
 static inline int netif_carrier_ok(const struct net_device *dev)
 {
 	return !test_bit(__LINK_STATE_NOCARRIER, &dev->state);
@@ -928,30 +1054,66 @@ extern void netif_carrier_on(struct net_
 
 extern void netif_carrier_off(struct net_device *dev);
 
+/**
+ *	netif_dormant_on - mark device as dormant.
+ *	@dev: network device
+ *
+ * Mark device as dormant (as per RFC2863).
+ *
+ * The dormant state indicates that the relevant interface is not
+ * actually in a condition to pass packets (i.e., it is not 'up') but is
+ * in a "pending" state, waiting for some external event.  For "on-
+ * demand" interfaces, this new state identifies the situation where the
+ * interface is waiting for events to place it in the up state.
+ *
+ */
 static inline void netif_dormant_on(struct net_device *dev)
 {
 	if (!test_and_set_bit(__LINK_STATE_DORMANT, &dev->state))
 		linkwatch_fire_event(dev);
 }
 
+/**
+ *	netif_dormant_off - set device as not dormant.
+ *	@dev: network device
+ *
+ * Device is not in dormant state.
+ */
 static inline void netif_dormant_off(struct net_device *dev)
 {
 	if (test_and_clear_bit(__LINK_STATE_DORMANT, &dev->state))
 		linkwatch_fire_event(dev);
 }
 
+/**
+ *	netif_dormant - test if carrier present
+ *	@dev: network device
+ *
+ * Check if carrier is present on device
+ */
 static inline int netif_dormant(const struct net_device *dev)
 {
 	return test_bit(__LINK_STATE_DORMANT, &dev->state);
 }
 
 
+/**
+ *	netif_oper_up - test if device is operational
+ *	@dev: network device
+ *
+ * Check if carrier is operational
+ */
 static inline int netif_oper_up(const struct net_device *dev) {
 	return (dev->operstate == IF_OPER_UP ||
 		dev->operstate == IF_OPER_UNKNOWN /* backward compat */);
 }
 
-/* Hot-plugging. */
+/**
+ *	netif_device_present - is device available or removed
+ *	@dev: network device
+ *
+ * Check if device has not been removed from system.
+ */
 static inline int netif_device_present(struct net_device *dev)
 {
 	return test_bit(__LINK_STATE_PRESENT, &dev->state);
@@ -1080,6 +1242,12 @@ static inline void netif_rx_complete(str
 	local_irq_restore(flags);
 }
 
+/**
+ *	netif_tx_lock - grab network device transmit lock
+ *	@dev: network device
+ *
+ * Get network device transmit lock
+ */
 static inline void netif_tx_lock(struct net_device *dev)
 {
 	spin_lock(&dev->_xmit_lock);
--- a/net/core/dev.c	2007-08-21 15:44:04.000000000 -0700
+++ b/net/core/dev.c	2007-08-22 11:51:53.000000000 -0700
@@ -1256,7 +1256,12 @@ void dev_kfree_skb_any(struct sk_buff *s
 EXPORT_SYMBOL(dev_kfree_skb_any);
 
 
-/* Hot-plugging. */
+/**
+ * netif_device_detach - mark device as removed
+ * @dev: network device
+ *
+ * Mark device as removed from system and therefore no longer available.
+ */
 void netif_device_detach(struct net_device *dev)
 {
 	if (test_and_clear_bit(__LINK_STATE_PRESENT, &dev->state) &&
@@ -1266,6 +1271,12 @@ void netif_device_detach(struct net_devi
 }
 EXPORT_SYMBOL(netif_device_detach);
 
+/**
+ * netif_device_attach - mark device as attached
+ * @dev: network device
+ *
+ * Mark device as attached from system and restart if needed.
+ */
 void netif_device_attach(struct net_device *dev)
 {
 	if (!test_and_set_bit(__LINK_STATE_PRESENT, &dev->state) &&
--- a/net/sched/sch_generic.c	2007-08-21 15:44:05.000000000 -0700
+++ b/net/sched/sch_generic.c	2007-08-22 11:51:53.000000000 -0700
@@ -256,6 +256,12 @@ static void dev_watchdog_down(struct net
 	netif_tx_unlock_bh(dev);
 }
 
+/**
+ *	netif_carrier_on - set carrier
+ *	@dev: network device
+ *
+ * Device has detected that carrier.
+ */
 void netif_carrier_on(struct net_device *dev)
 {
 	if (test_and_clear_bit(__LINK_STATE_NOCARRIER, &dev->state))
@@ -264,6 +270,12 @@ void netif_carrier_on(struct net_device 
 		__netdev_watchdog_up(dev);
 }
 
+/**
+ *	netif_carrier_off - clear carrier
+ *	@dev: network device
+ *
+ * Device has detected loss of carrier.
+ */
 void netif_carrier_off(struct net_device *dev)
 {
 	if (!test_and_set_bit(__LINK_STATE_NOCARRIER, &dev->state))

^ permalink raw reply

* [ANNOUNCE] iproute2-2.6.23-rc3
From: Stephen Hemminger @ 2007-08-22 18:08 UTC (permalink / raw)
  To: netdev

There have been a lot of changes for 2.6.23, so here is a test release
of iproute2 that should capture all the submitted patches


http://developer.osdl.org/shemminger/iproute2/download/iproute2-2.6.23-rc3.tar.gz

Johannes Berg (1):
      show multicast groups

PJ Waskiewicz (1):
      iproute2: sch_rr support in tc

Patrick McHardy (6):
      TC action parsing bug fix
      Bug fix tc action drop
      IPROUTE2: RTNETLINK nested attributes
      Use FRA_* attributes for routing rules
      iplink: use netlink for link configuration
      Fix meta ematch usage of 0 values

Pavel Emelianov (1):
      Make ip utility veth driver aware

Sridhar Samudrala (1):
      Fix bug  in display of ipv6 cloned/cached routes

Stephen Hemminger (3):
      Fix ss to handle partial records.
      sanitized headers update to 2.6.23-rc3
      Fix m_ipt build

-- 
Stephen Hemminger <shemminger@linux-foundation.org>

^ permalink raw reply

* Re: [RFC IPROUTE]: Add flow classifier support
From: Stephen Hemminger @ 2007-08-22 17:46 UTC (permalink / raw)
  To: Patrick McHardy; +Cc: Kernel Netdev Mailing List, jamal
In-Reply-To: <465D46E9.2000808@trash.net>

On Wed, 30 May 2007 11:42:01 +0200
Patrick McHardy <kaber@trash.net> wrote:

> The iproute patch for the flow classifier.
> 
> 

This patch is on hold since the netlink changes haven't made it upstream yet.

-- 
Stephen Hemminger <shemminger@linux-foundation.org>

^ permalink raw reply

* [PATCH] santize tc_ematch headers
From: Stephen Hemminger @ 2007-08-22 17:18 UTC (permalink / raw)
  To: David S. Miller; +Cc: netdev

The headers in tc_ematch are used by iproute2, so these headers
should be processed.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
---
 include/linux/Kbuild |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/include/linux/Kbuild b/include/linux/Kbuild
index ad7f71a..818cc3a 100644
--- a/include/linux/Kbuild
+++ b/include/linux/Kbuild
@@ -7,6 +7,7 @@ header-y += raid/
 header-y += spi/
 header-y += sunrpc/
 header-y += tc_act/
+header-y += tc_ematch/
 header-y += netfilter/
 header-y += netfilter_arp/
 header-y += netfilter_bridge/
-- 
1.5.2.4


^ permalink raw reply related

* drivers/net/ppp_generic - __modpost error ( Re: 2.6.23-rc3-mm1 )
From: Gabriel C @ 2007-08-22 17:10 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-kernel, netdev
In-Reply-To: <20070822020648.5ea3a612.akpm@linux-foundation.org>

Got it with a randconfig ( http://194.231.229.228/kernel/mm/2.6.23-rc3-mm1/r/randconfig-9 )
( patch from http://lkml.org/lkml/2007/8/22/273 is needed too or CONFIG_SCSI_ADVANSYS need be N)


...

ERROR: "slhc_init" [drivers/net/ppp_generic.ko] undefined!
ERROR: "slhc_remember" [drivers/net/ppp_generic.ko] undefined!
ERROR: "slhc_uncompress" [drivers/net/ppp_generic.ko] undefined!
ERROR: "slhc_free" [drivers/net/ppp_generic.ko] undefined!
ERROR: "slhc_compress" [drivers/net/ppp_generic.ko] undefined!
ERROR: "slhc_toss" [drivers/net/ppp_generic.ko] undefined!
make[1]: *** [__modpost] Error 1
make: *** [modules] Error 2

...


Regards,

Gabriel

^ permalink raw reply

* [ofa-general] Re: [PATCH 0/9 Rev3] Implement batching skb API and support in IPoIB
From: Rick Jones @ 2007-08-22 17:09 UTC (permalink / raw)
  To: David Miller
  Cc: jagana, herbert, gaagaan, Robert.Olsson, kumarkr, rdreier,
	peter.p.waskiewicz.jr, hadi, mcarlson, jeff, general, mchan,
	tgraf, netdev, johnpol, shemminger, kaber, sri
In-Reply-To: <20070821.212229.82050253.davem@davemloft.net>

David Miller wrote:
> I think the jury is still out, but seeing TSO perform even slightly
> worse with the batching changes in place would be very worrysome.
> This applies to both throughput and cpu utilization.

Should it be any more or less worrysome than small packet performance (eg the 
TCP_RR stuff I posted recently) being rather worse with TSO enabled than with it 
disabled?

rick jones

^ permalink raw reply

* Re: 2.6.23-rc3-mm1
From: Gabriel C @ 2007-08-22 17:01 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-kernel, netdev
In-Reply-To: <20070822090953.78a3d90c.akpm@linux-foundation.org>

Andrew Morton wrote:
> On Wed, 22 Aug 2007 15:33:27 +0200 Gabriel C <nix.or.die@googlemail.com> wrote:
> 
>> ...
>>
>>  CC      arch/i386/boot/cpu.o
>>   CC      arch/i386/boot/cpucheck.o
>> WARNING: "div64_64" [net/netfilter/xt_connbytes.ko] has no CRC!
>>   CC      arch/i386/boot/edd.o
>>   AS      arch/i386/boot/header.o
>>   CC      arch/i386/boot/main.o
> 
> Yeah, I get that too.  I was hoping that someone who had a vague clue
> about what's causing it might fix it also.

Hmm.. I don't know ( added netdev to Cc ) I got one more :

...

WARNING: "div64_64" [net/ipv4/tcp_cubic.ko] has no CRC!

...

Btw when modprobing these the kernel gets tainted

...

[ 5498.536055] nf_conntrack version 0.5.0 (10240 buckets, 40960 max)
[ 5498.554844] xt_connbytes: no version for "div64_64" found: kernel tainted.

...


> 
>> ...
>>
>> config : http://194.231.229.228/kernel/mm/2.6.23-rc3-mm1/config
>> build-log: http://194.231.229.228/kernel/mm/2.6.23-rc3-mm1/build-log
>>

^ permalink raw reply

* Re: net/ipv4/fib_trie.c - compile error (Re: 2.6.23-rc3-mm1)
From: Paul E. McKenney @ 2007-08-22 17:03 UTC (permalink / raw)
  To: Adrian Bunk; +Cc: Gabriel C, Andrew Morton, linux-kernel, netdev
In-Reply-To: <20070822154111.GI30705@stusta.de>

On Wed, Aug 22, 2007 at 05:41:11PM +0200, Adrian Bunk wrote:
> On Wed, Aug 22, 2007 at 05:30:13PM +0200, Gabriel C wrote:
> > Got it with a randconfig ( http://194.231.229.228/kernel/mm/2.6.23-rc3-mm1/r/randconfig-8 )
> > 
> > ...
> > 
> > net/ipv4/fib_trie.c: In function 'trie_rebalance':
> > net/ipv4/fib_trie.c:969: error: lvalue required as unary '&' operand
> > net/ipv4/fib_trie.c:971: error: lvalue required as unary '&' operand
> > net/ipv4/fib_trie.c:977: error: lvalue required as unary '&' operand
> > net/ipv4/fib_trie.c:980: error: lvalue required as unary '&' operand
> >...
> 
> Side effect of the git-net removal, temporarily removing 
> immunize-rcu_dereference-against-crazy-compiler-writers.patch should 
> work around it.

Alternatively, the following one-line patch to net/ipv4/fib_trie.c could
be used.

Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
---

 fib_trie.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff -urpNa -X dontdiff linux-2.6.23-rc3-mm1/net/ipv4/fib_trie.c linux-2.6.23-rc3-mm1.compile/net/ipv4/fib_trie.c
--- linux-2.6.23-rc3-mm1/net/ipv4/fib_trie.c	2007-08-22 09:20:33.000000000 -0700
+++ linux-2.6.23-rc3-mm1.compile/net/ipv4/fib_trie.c	2007-08-22 09:47:33.000000000 -0700
@@ -94,7 +94,7 @@ typedef unsigned int t_key;
 #define T_LEAF  1
 #define NODE_TYPE_MASK	0x1UL
 #define NODE_PARENT(node) \
-	((struct tnode *)rcu_dereference(((node)->parent & ~NODE_TYPE_MASK)))
+	((struct tnode *)(rcu_dereference((node)->parent) & ~NODE_TYPE_MASK))
 
 #define NODE_TYPE(node) ((node)->parent & NODE_TYPE_MASK)
 

^ permalink raw reply

* Re: Oops in e100_up
From: Arnaldo Carvalho de Melo @ 2007-08-22 16:47 UTC (permalink / raw)
  To: Kok, Auke; +Cc: Gerrit Renker, netdev
In-Reply-To: <46CC65B8.1030006@intel.com>

Em Wed, Aug 22, 2007 at 09:35:04AM -0700, Kok, Auke escreveu:
> Gerrit Renker wrote:
> >With the davem-2.6.24 tree I get the following Oops in the e100 driver 
> >(cribbed from console):
> >
> >Code: 6c ff ff ff 8b 48 0c ba 01 00 00 00 89 f0 e8 1b f2 ff ff c7 86 9c 00 
> >00 00
> >      01 00 00 00 e9 4e ff ff ff 89 d0 e8 b3 f8 0b 00 eb 8e <0f> 0b eb fe 
> >      55 89 e5
> >      56 53 83 ec 0c 8b 98 dc 01 00 00 e8 ff b9
> >
> >EIP: e100_up+0x11d/0x121 
> >
> >SS:ESP 0068:f759ce38
> >
> >Stack: syscall_call -> sys_ioctl -> vfs_ioctl -> do_ioctl -> sock_ioctl -> 
> >inet_ioctl -> devinet_ioctl ->
> >       dev_change_flags -> dev_open -> e100_open -> oops
> >
> >The system log then goes on reporting "eth0: link up, 100Mbps, 
> >full-duplex" and hangs while trying to
> >restore the serial console state (not sure that this is related).
> 
> restore? Is this during resume from suspend or something?

This seems to have been fixed by a bug reported by akpm and fixed by
Thomas Graf, check a recent post with "netconsole" on the subject.

- Arnaldo

^ permalink raw reply

* r8169: slow samba performance
From: Bruce Cole @ 2007-08-22 16:39 UTC (permalink / raw)
  To: shane; +Cc: netdev, bacole

>Just upgraded a motherboard and it came with an onboard
>Realtek card which appears to use the r8169 driver.  The
>machine is a samba server and when serving files to a local
>Linux or Windows client, I only get approx 40-60 kbps. 
>Write performance is fine though, in the tens of mbps and
>scp, nfs, and ftp server all work well so it appears
>specific to the Samba load.  However, when serving to more
>than one client symoltaniously, performance goes up
>dramatically, again into the tens of mbps or when there is
>other network activity.

Shane, join the crowd :)  Try the fix I just re-posted over here:

http://www.spinics.net/lists/netdev/msg39244.html




^ permalink raw reply

* Re: Oops in e100_up
From: Kok, Auke @ 2007-08-22 16:35 UTC (permalink / raw)
  To: Gerrit Renker; +Cc: netdev
In-Reply-To: <200708220956.48297@strip-the-willow>

Gerrit Renker wrote:
> With the davem-2.6.24 tree I get the following Oops in the e100 driver (cribbed from console):
> 
> Code: 6c ff ff ff 8b 48 0c ba 01 00 00 00 89 f0 e8 1b f2 ff ff c7 86 9c 00 00 00
>       01 00 00 00 e9 4e ff ff ff 89 d0 e8 b3 f8 0b 00 eb 8e <0f> 0b eb fe 55 89 e5
>       56 53 83 ec 0c 8b 98 dc 01 00 00 e8 ff b9
> 
> EIP: e100_up+0x11d/0x121 
> 
> SS:ESP 0068:f759ce38
> 
> Stack: syscall_call -> sys_ioctl -> vfs_ioctl -> do_ioctl -> sock_ioctl -> inet_ioctl -> devinet_ioctl ->
>        dev_change_flags -> dev_open -> e100_open -> oops
> 
> The system log then goes on reporting "eth0: link up, 100Mbps, full-duplex" and hangs while trying to
> restore the serial console state (not sure that this is related).

restore? Is this during resume from suspend or something?

Auke

^ permalink raw reply

* Re: net/ipv4/fib_trie.c - compile error (Re: 2.6.23-rc3-mm1)
From: Gabriel C @ 2007-08-22 16:32 UTC (permalink / raw)
  To: Adrian Bunk; +Cc: Andrew Morton, linux-kernel, netdev
In-Reply-To: <20070822154111.GI30705@stusta.de>

Adrian Bunk wrote:
> On Wed, Aug 22, 2007 at 05:30:13PM +0200, Gabriel C wrote:
>> Got it with a randconfig ( http://194.231.229.228/kernel/mm/2.6.23-rc3-mm1/r/randconfig-8 )
>>
>> ...
>>
>> net/ipv4/fib_trie.c: In function 'trie_rebalance':
>> net/ipv4/fib_trie.c:969: error: lvalue required as unary '&' operand
>> net/ipv4/fib_trie.c:971: error: lvalue required as unary '&' operand
>> net/ipv4/fib_trie.c:977: error: lvalue required as unary '&' operand
>> net/ipv4/fib_trie.c:980: error: lvalue required as unary '&' operand
>> ...
> 
> Side effect of the git-net removal, temporarily removing 
> immunize-rcu_dereference-against-crazy-compiler-writers.patch should 
> work around it.

Yes it does , thx Adrian

> 
> cu
> Adrian
> 

Gabriel

^ permalink raw reply

* [PATCH] [-MM] e1000e: incorporate napi_struct changes from net-2.6.24.git
From: Auke Kok @ 2007-08-22 16:28 UTC (permalink / raw)
  To: akpm; +Cc: davem, jeff, shemminger, netdev

This incorporates the new napi_struct changes into e1000e.

Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
---

 drivers/net/e1000e/e1000.h  |    2 ++
 drivers/net/e1000e/netdev.c |   37 ++++++++++++++++++-------------------
 2 files changed, 20 insertions(+), 19 deletions(-)

diff --git a/drivers/net/e1000e/e1000.h b/drivers/net/e1000e/e1000.h
index e3cd877..ea6a9fe 100644
--- a/drivers/net/e1000e/e1000.h
+++ b/drivers/net/e1000e/e1000.h
@@ -196,6 +196,8 @@ struct e1000_adapter {
 	struct e1000_ring *tx_ring /* One per active queue */
 						____cacheline_aligned_in_smp;
 
+	struct napi_struct napi;
+
 	unsigned long tx_queue_len;
 	unsigned int restart_queue;
 	u32 txd_cmd;
diff --git a/drivers/net/e1000e/netdev.c b/drivers/net/e1000e/netdev.c
index 8ebe238..e30eae2 100644
--- a/drivers/net/e1000e/netdev.c
+++ b/drivers/net/e1000e/netdev.c
@@ -1149,12 +1149,12 @@ static irqreturn_t e1000_intr_msi(int irq, void *data)
 			mod_timer(&adapter->watchdog_timer, jiffies + 1);
 	}
 
-	if (netif_rx_schedule_prep(netdev)) {
+	if (netif_rx_schedule_prep(netdev, &adapter->napi)) {
 		adapter->total_tx_bytes = 0;
 		adapter->total_tx_packets = 0;
 		adapter->total_rx_bytes = 0;
 		adapter->total_rx_packets = 0;
-		__netif_rx_schedule(netdev);
+		__netif_rx_schedule(netdev, &adapter->napi);
 	} else {
 		atomic_dec(&adapter->irq_sem);
 	}
@@ -1212,12 +1212,12 @@ static irqreturn_t e1000_intr(int irq, void *data)
 			mod_timer(&adapter->watchdog_timer, jiffies + 1);
 	}
 
-	if (netif_rx_schedule_prep(netdev)) {
+	if (netif_rx_schedule_prep(netdev, &adapter->napi)) {
 		adapter->total_tx_bytes = 0;
 		adapter->total_tx_packets = 0;
 		adapter->total_rx_bytes = 0;
 		adapter->total_rx_packets = 0;
-		__netif_rx_schedule(netdev);
+		__netif_rx_schedule(netdev, &adapter->napi);
 	} else {
 		atomic_dec(&adapter->irq_sem);
 	}
@@ -1663,10 +1663,10 @@ set_itr_now:
  * e1000_clean - NAPI Rx polling callback
  * @adapter: board private structure
  **/
-static int e1000_clean(struct net_device *poll_dev, int *budget)
+static int e1000_clean(struct napi_struct *napi, int budget)
 {
-	struct e1000_adapter *adapter;
-	int work_to_do = min(*budget, poll_dev->quota);
+	struct e1000_adapter *adapter = container_of(napi, struct e1000_adapter, napi);
+	struct net_device *poll_dev = adapter->netdev;
 	int tx_cleaned = 0, work_done = 0;
 
 	/* Must NOT use netdev_priv macro here. */
@@ -1685,17 +1685,15 @@ static int e1000_clean(struct net_device *poll_dev, int *budget)
 		spin_unlock(&adapter->tx_queue_lock);
 	}
 
-	adapter->clean_rx(adapter, &work_done, work_to_do);
-	*budget -= work_done;
-	poll_dev->quota -= work_done;
+	adapter->clean_rx(adapter, &work_done, budget);
 
 	/* If no Tx and not enough Rx work done, exit the polling mode */
-	if ((!tx_cleaned && (work_done == 0)) ||
+	if ((tx_cleaned && (work_done < budget)) ||
 	   !netif_running(poll_dev)) {
 quit_polling:
 		if (adapter->itr_setting & 3)
 			e1000_set_itr(adapter);
-		netif_rx_complete(poll_dev);
+		netif_rx_complete(poll_dev, napi);
 		if (test_bit(__E1000_DOWN, &adapter->state))
 			atomic_dec(&adapter->irq_sem);
 		else
@@ -1703,7 +1701,7 @@ quit_polling:
 		return 0;
 	}
 
-	return 1;
+	return work_done;
 }
 
 static void e1000_vlan_rx_add_vid(struct net_device *netdev, u16 vid)
@@ -2441,7 +2439,7 @@ int e1000e_up(struct e1000_adapter *adapter)
 
 	clear_bit(__E1000_DOWN, &adapter->state);
 
-	netif_poll_enable(adapter->netdev);
+	napi_enable(&adapter->napi);
 	e1000_irq_enable(adapter);
 
 	/* fire a link change interrupt to start the watchdog */
@@ -2474,7 +2472,7 @@ void e1000e_down(struct e1000_adapter *adapter)
 	e1e_flush();
 	msleep(10);
 
-	netif_poll_disable(netdev);
+	napi_disable(&adapter->napi);
 	e1000_irq_disable(adapter);
 
 	del_timer_sync(&adapter->watchdog_timer);
@@ -2607,7 +2605,7 @@ static int e1000_open(struct net_device *netdev)
 	/* From here on the code is the same as e1000e_up() */
 	clear_bit(__E1000_DOWN, &adapter->state);
 
-	netif_poll_enable(netdev);
+	napi_enable(&adapter->napi);
 
 	e1000_irq_enable(adapter);
 
@@ -2643,6 +2641,8 @@ static int e1000_close(struct net_device *netdev)
 {
 	struct e1000_adapter *adapter = netdev_priv(netdev);
 
+	napi_disable(&adapter->napi);
+
 	WARN_ON(test_bit(__E1000_RESETTING, &adapter->state));
 	e1000e_down(adapter);
 	e1000_power_down_phy(adapter);
@@ -4102,8 +4102,7 @@ static int __devinit e1000_probe(struct pci_dev *pdev,
 	e1000e_set_ethtool_ops(netdev);
 	netdev->tx_timeout		= &e1000_tx_timeout;
 	netdev->watchdog_timeo		= 5 * HZ;
-	netdev->poll			= &e1000_clean;
-	netdev->weight			= 64;
+	netif_napi_add(netdev, &adapter->napi, e1000_clean, 64);
 	netdev->vlan_rx_register	= e1000_vlan_rx_register;
 	netdev->vlan_rx_add_vid		= e1000_vlan_rx_add_vid;
 	netdev->vlan_rx_kill_vid	= e1000_vlan_rx_kill_vid;
@@ -4272,7 +4271,7 @@ static int __devinit e1000_probe(struct pci_dev *pdev,
 	/* tell the stack to leave us alone until e1000_open() is called */
 	netif_carrier_off(netdev);
 	netif_stop_queue(netdev);
-	netif_poll_disable(netdev);
+	napi_disable(&adapter->napi);
 
 	strcpy(netdev->name, "eth%d");
 	err = register_netdev(netdev);

^ permalink raw reply related

* Re: [2.6.20.17 review 35/58] forcedeth bug fix: realtek phy
From: Willy Tarreau @ 2007-08-22 16:10 UTC (permalink / raw)
  To: Chuck Ebbert
  Cc: linux-kernel, stable, Ayaz Abdulla, Greg Kroah-Hartman, netdev
In-Reply-To: <46CC5CBA.2050901@redhat.com>

On Wed, Aug 22, 2007 at 11:56:42AM -0400, Chuck Ebbert wrote:
> On 08/22/2007 05:39 AM, Willy Tarreau wrote:
> > This patch contains errata fixes for the realtek phy. It only renamed the
> > defines to be phy specific.
> > 
> > Signed-off-by: Ayaz Abdulla <aabdulla@nvidia.com>
> > Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
> > Signed-off-by: Willy Tarreau <w@1wt.eu>
> > ---
> >  drivers/net/forcedeth.c |   54 +++++++++++++++++++++++++++++++++++++++++++++++
> >  1 files changed, 54 insertions(+), 0 deletions(-)
> > 
> > diff --git a/drivers/net/forcedeth.c b/drivers/net/forcedeth.c
> > index c383dc3..dbfdbed 100644
> > --- a/drivers/net/forcedeth.c
> > +++ b/drivers/net/forcedeth.c
> > @@ -554,6 +554,7 @@ union ring_type {
> >  #define PHY_OUI_MARVELL	0x5043
> >  #define PHY_OUI_CICADA	0x03f1
> >  #define PHY_OUI_VITESSE	0x01c1
> > +#define PHY_OUI_REALTEK	0x01c1
> >  #define PHYID1_OUI_MASK	0x03ff
> >  #define PHYID1_OUI_SHFT	6
> >  #define PHYID2_OUI_MASK	0xfc00
> 
> Realtek is 0x0732
> 
> This is still wrong upstream -- what happened to the patch to fix it?

Good catch, thanks Chuck! I've already seen the fix somewhere, I believe it
was on netdev, though I'm not sure. I'm fixing the patch in place right now.
I can add your signoff if you want.

Cheers,
Willy


^ 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