Netdev List
 help / color / mirror / Atom feed
* Re: [Patch v10 0/3] net: reserve ports for applications using fixed port numbers
From: David Miller @ 2010-05-16  6:28 UTC (permalink / raw)
  To: amwang
  Cc: linux-kernel, opurdila, ebiederm, eric.dumazet, penguin-kernel,
	netdev, nhorman, xiaosuo, adobriyan
In-Reply-To: <20100505103033.5600.77502.sendpatchset@localhost.localdomain>

From: Amerigo Wang <amwang@redhat.com>
Date: Wed, 5 May 2010 06:26:34 -0400

> 
> Changes from the previous version:
> - Use 'true' and 'false' for bool's;
> - Fix some coding style problems;
> - Allow appending lines to bitmap proc file so that it will be
>   easier to add new bits.

Applied to net-next-2.6, thanks.

^ permalink raw reply

* Re: [PATCH] skge: use the DMA state API instead of the pci equivalents
From: David Miller @ 2010-05-16  6:29 UTC (permalink / raw)
  To: shemminger; +Cc: fujita.tomonori, netdev
In-Reply-To: <20100514183307.6c14f294@nehalam>

From: Stephen Hemminger <shemminger@linux-foundation.org>
Date: Fri, 14 May 2010 18:33:07 -0700

> On Wed, 28 Apr 2010 09:57:04 +0900
> FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> wrote:
> 
>> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
> 
> Yes, this works fine. Sorry for the delay but that test system
> was offline for several months and the disk went bad.
> 
> Acked-by: Stephen Hemminger <shemminger@vyatta.com>

Applied, thanks.

^ permalink raw reply

* Re: [RFC 0/5] generic rx recycling
From: David Miller @ 2010-05-16  6:32 UTC (permalink / raw)
  To: sebastian; +Cc: netdev, tglx
In-Reply-To: <1273070870-7821-1-git-send-email-sebastian@breakpoint.cc>

From: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>
Date: Wed,  5 May 2010 16:47:45 +0200

> This series merges the rx recycling code trying to come up with generic
> code. Recycling skbs from the tx path for incomming rx skips the memory
> allocater and improves latency during memory pressure.
> This is now used by just by just four drivers in the tree which were doing
> this on their own.

You're adding new unnecessary SMP locking to all of these drivers.

In the gianfar original code the recycle queue is accessed lockless
using __skb_dequeue() et al.  But you're using the skb_dequeue()
interface in the generic version which takes the SKB queue lock
which is absolutely unnecessary where these drivers make these
calls since they already need to have their chip RX path locked
already.

^ permalink raw reply

* Re: [PATCH net-next-2.6] net: adjust handle_macvlan to pass port struct to hook
From: David Miller @ 2010-05-16  6:48 UTC (permalink / raw)
  To: kaber; +Cc: jpirko, netdev
In-Reply-To: <4BE819B6.3020101@trash.net>

From: Patrick McHardy <kaber@trash.net>
Date: Mon, 10 May 2010 16:35:34 +0200

> Jiri Pirko wrote:
>> Now there's null check here and also again in the hook. Looking at bridge bits
>> which are simmilar, port structure is rcu_dereferenced right away in
>> handle_bridge and passed to hook. Looks nicer.
>> 
>> Signed-off-by: Jiri Pirko <jpirko@redhat.com>
> 
> Looks fine, thanks.
> 
> Acked-by: Patrick McHardy <kaber@trash.net>

Applied, thanks.

^ permalink raw reply

* Re: [PATCH] xfrm: fix policy unreferencing on larval drop
From: David Miller @ 2010-05-16  6:49 UTC (permalink / raw)
  To: timo.teras; +Cc: netdev
In-Reply-To: <1273146734-8022-1-git-send-email-timo.teras@iki.fi>

From: Timo Teras <timo.teras@iki.fi>
Date: Thu,  6 May 2010 14:52:14 +0300

> I mistakenly had the error path to use num_pols to decide how
> many policies we need to drop (cruft from earlier patch set
> version which did not handle socket policies right).
> 
> This is wrong since normally we do not keep explicit references
> (instead we hold reference to the cache entry which holds references
> to policies). drop_pols is set to num_pols if we are holding the
> references, so use that. Otherwise we eventually BUG_ON inside
> xfrm_policy_destroy due to premature policy deletion.
> 
> Signed-off-by: Timo Teras <timo.teras@iki.fi>

Applied, thanks a lot Timo.

^ permalink raw reply

* Re: [PATCH net-next-2.6] net: Consistent skb timestamping
From: David Miller @ 2010-05-16  6:56 UTC (permalink / raw)
  To: therbert; +Cc: eric.dumazet, netdev
In-Reply-To: <AANLkTikLgHvtpCtBTKmJZBwixmZDHjRjGb1c59oAemli@mail.gmail.com>

From: Tom Herbert <therbert@google.com>
Date: Thu, 6 May 2010 08:12:57 -0700

> I'm contemplating changing SO_TIMESTAMP to not enable global
> timestamps, but only take the timestamp for a packet once the socket
> is identified and the timestamp flag is set (this is the technique
> done in FreeBSD and Solaris, so I believe the external semantics
> would still be valid).

This is not tenable.

Users have made it clear in the past that when they ask for a timestamp
they really want the timestamp as close to the device receive handling
path as possible.

Users basically really want timestamps in two places:

1) As near the device RX handling as possible

2) The point at which recvmsg() got the data

The former is obtainable from SO_TIMESTAMP and the latter from
gettimeofday().

So putting it way down to the point where we choose the socket isn't
going to work at all.

FreeBSD and Solaris combined have a tiny sliver of the number of users
we have to cater to, so they can have all kinds of latitude with which
to break things like that.  So saying they do something is like saying
"the moon was out tonight", it has no relevance on whether we are able
to do it too :-)

The real fix is to make the devices less stupid and give us timestamps
directly, and thanks to things like PTP support in hardware that's
actually more and more of a reality these days.

^ permalink raw reply

* Re: [PATCH net-next-2.6] net: Consistent skb timestamping
From: David Miller @ 2010-05-16  6:57 UTC (permalink / raw)
  To: eric.dumazet; +Cc: therbert, netdev
In-Reply-To: <1273162488.2853.43.camel@edumazet-laptop>

From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Thu, 06 May 2010 18:14:48 +0200

> [PATCH v2 net-next-2.6] net: Consistent skb timestamping
 ...
> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>

Applied, thanks Eric.

^ permalink raw reply

* Re: [PATCH 2.6.34-rc6] net: Improve ks8851 snl transmit performance
From: David Miller @ 2010-05-16  7:26 UTC (permalink / raw)
  To: Tristram.Ha; +Cc: ben, netdev, linux-kernel, x0066660, s-jan
In-Reply-To: <14385191E87B904DBD836449AA30269D021A64@MORGANITE.micrel.com>

From: "Ha, Tristram" <Tristram.Ha@Micrel.Com>
Date: Thu, 6 May 2010 15:50:27 -0700

> From: Tristram Ha <Tristram.Ha@micrel.com>
> 
> Under heavy transmission the driver will put 4 1514-byte packets in
> queue and stop the device transmit queue.  Only the last packet
> triggers the transmit done interrupt and wakes up the device
> transmit queue.  That means a bit of time is wasted when the CPU
> cannot send any more packet.
> 
> The new implementation triggers the transmit interrupt when the
> transmit buffer left is less than 3 packets.  The maximum transmit
> buffer size is 6144 bytes.  This allows the device transmit queue to
> be restarted sooner so that CPU can send more packets.
> 
> For TCP receiving it also has the benefit of not triggering any transmit interrupt at all.
> 
> There is a driver option no_tx_opt so that the driver can revert to
> original implementation.  This allows user to verify if the transmit
> performance actually improves.
> 
> Signed-off-by: Tristram Ha <Tristram.Ha@micrel.com>

First, if you want to post patches you have to format them properly as
ascii text with no longer than 80 column lines in your commit message.
I really don't want to hear about your email client being a reason
you can't do this properly :-)

Second, I don't think you can use the skb->ip_summed for this hacked
state tracking you are using.  The packet might be shared with other
entities, and therefore if you change the field it won't be correct
for them any more.

^ permalink raw reply

* Re: [PATCH 1/2] netdev/fec: fix performance impact from mdio poll operation
From: David Miller @ 2010-05-16  7:28 UTC (permalink / raw)
  To: bryan.wu; +Cc: s.hauer, gerg, amit.kucheria, netdev, linux-kernel
In-Reply-To: <1273199239-11057-2-git-send-email-bryan.wu@canonical.com>

From: Bryan Wu <bryan.wu@canonical.com>
Date: Fri,  7 May 2010 10:27:18 +0800

> BugLink: http://bugs.launchpad.net/bugs/546649
> BugLink: http://bugs.launchpad.net/bugs/457878
> 
> After introducing phylib supporting, users experienced performace drop. That is
> because of the mdio polling operation of phylib. Use msleep to replace the busy
> waiting cpu_relax() and remove the warning message.
> 
> Signed-off-by: Bryan Wu <bryan.wu@canonical.com>
> Acked-by: Andy Whitcroft <apw@canonical.com>

As you've already been told, making these MDIO interfaces fail silently
is not acceptable.

Please fix this bug properly and resubmit this patch series.

Thanks.

^ permalink raw reply

* Re: TCP-MD5 checksum failure on x86_64 SMP
From: David Miller @ 2010-05-16  7:30 UTC (permalink / raw)
  To: shemminger; +Cc: eric.dumazet, bhaskie, bhutchings, netdev
In-Reply-To: <20100507103639.4f1a51fa@nehalam>

From: Stephen Hemminger <shemminger@vyatta.com>
Date: Fri, 7 May 2010 10:36:39 -0700

> On Fri, 07 May 2010 19:21:33 +0200
> Eric Dumazet <eric.dumazet@gmail.com> wrote:
> 
>> Le vendredi 07 mai 2010 à 10:14 -0700, Stephen Hemminger a écrit :
>> 
>> > Forget the per cpu data; the pool should just be scrapped.
>> > 
>> > The only reason the pool exists is that the crypto hash state which
>> > should just be moved into the md5_info (88 bytes).  The pseudo
>> > header can just be generated on the stack before passing to the crypto
>> > code.
>> 
>> 
>> Sure, but I'm afraid there is no generic API do do that (if we want to
>> reuse crypto/md5.c code).
> 
> It looks like the pool is just an optimization to avoid opening too
> many crypto API connections.  This should only be an issue if offloading
> MD5.

It's an issue because creating a crypto API context is expensive, so this
influences our connection rates with MD5.

^ permalink raw reply

* Re: TCP-MD5 checksum failure on x86_64 SMP
From: David Miller @ 2010-05-16  7:35 UTC (permalink / raw)
  To: eric.dumazet; +Cc: bhaskie, shemminger, bhutchings, netdev
In-Reply-To: <1273219222.2261.11.camel@edumazet-laptop>

From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Fri, 07 May 2010 10:00:22 +0200

> [PATCH] tcp: fix MD5 (RFC2385) support
> 
> TCP MD5 support uses percpu data for temporary storage. It currently
> disables preemption so that same storage cannot be reclaimed by another
> thread on same cpu.
> 
> We also have to make sure a softirq handler wont try to use also same
> context. Various bug reports demonstrated corruptions.
> 
> Fix is to disable preemption and BH.
> 
> Reported-by: Bhaskar Dutta <bhaskie@gmail.com>
> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>

Applied.

^ permalink raw reply

* Re: TCP-MD5 checksum failure on x86_64 SMP
From: David Miller @ 2010-05-16  7:37 UTC (permalink / raw)
  To: eric.dumazet; +Cc: bhaskie, shemminger, bhutchings, netdev
In-Reply-To: <1273267137.2325.31.camel@edumazet-laptop>

From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Fri, 07 May 2010 23:18:57 +0200

> [PATCH] net: Introduce sk_route_nocaps
> 
> TCP-MD5 sessions have intermittent failures, when route cache is
> invalidated. ip_queue_xmit() has to find a new route, calls
> sk_setup_caps(sk, &rt->u.dst), destroying the 
> 
> sk->sk_route_caps &= ~NETIF_F_GSO_MASK
> 
> that MD5 desperately try to make all over its way (from
> tcp_transmit_skb() for example)
> 
> So we send few bad packets, and everything is fine when
> tcp_transmit_skb() is called again for this socket.
> 
> Since ip_queue_xmit() is at a lower level than TCP-MD5, I chose to use a
> socket field, sk_route_nocaps, containing bits to mask on sk_route_caps.
> 
> Reported-by: Bhaskar Dutta <bhaskie@gmail.com>
> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>

Since the connection does recover eventually, I'm stuffing this into
net-next-2.6 into net-2.6

After some time in net-next-2.6, we can submit it to -stable.

^ permalink raw reply

* Re: VLAN I/F's and TX queue.
From: David Miller @ 2010-05-16  7:40 UTC (permalink / raw)
  To: joakim.tjernlund; +Cc: kaber, eric.dumazet, netdev
In-Reply-To: <OFC83B46CB.0E764A8E-ONC125771F.005109E4-C125771F.00518338@transmode.se>

From: Joakim Tjernlund <joakim.tjernlund@transmode.se>
Date: Mon, 10 May 2010 16:50:20 +0200

> Patrick McHardy <kaber@trash.net> wrote on 2010/05/10 16:33:00:
>>
>> Joakim Tjernlund wrote:
>> > Eric Dumazet <eric.dumazet@gmail.com> wrote on 2010/05/07 10:53:23:
>> >>> 3) I would expect lost pkgs to be accounted on eth0 instead of
>> >>>    the VLAN interface(s) since that is where the pkg is lost, why
>> >>>    isn't it so?
>> >> You try to send packets on eth0.XXX, some are dropped, and accounted for
>> >> on eth0.XXX stats. What is wrong with this ?
>> >
>> > In this case one lost pkg is accounted for twice, once on eth0.1 and
>> > once more on eth0.1.1. Note that eth0.1.1 is stacked on
>> > top of eth0.1
>> >
>> > I would at least expect eth0 to also account lost pkgs too.
>> > I was confused by the current accounting as I knew that
>> > the underlying HW I/F should be the only I/F that could
>> > drop pkgs.
>>
>> In case of NET_XMIT_CN, the packet is dropped by the qdisc before
>> it reaches eth0, so its only accounted on the upper devices.
> 
> hmm, I am afraid I don't follow this. Why would a pkg be dropped before
> it reaches eth0?

Because we have packet schedulers that sit before the device transmit
happens, and those packet schedulers enforce limits based upon
classification results or other criteria, and if those limits are
exceeded packets are droppers and NET_XMIT_CN is returned back up into
the transmit path of the networking stack.

The device never sees that packet get submitted to it's ->ndo_start_xmit()
routine, and this is entirely intentional.  And it is entirely intentional
that NET_XMIT_CN gets passed up into the caller, where protocols such as
TCP can key off this information to make congestion control decisions.


^ permalink raw reply

* Re: [PATCH v2] sctp: Fix a race between ICMP protocol unreachable and connect()
From: David Miller @ 2010-05-16  7:46 UTC (permalink / raw)
  To: vladislav.yasevich; +Cc: yjwei, netdev, linux-sctp
In-Reply-To: <4BE81144.8020806@hp.com>

From: Vlad Yasevich <vladislav.yasevich@hp.com>
Date: Mon, 10 May 2010 09:59:32 -0400

> 
> 
> Wei Yongjun wrote:
>> [PATCH] sctp: delete active ICMP proto unreachable timer when free transport
>> 
>> transport may be free before ICMP proto unreachable timer expire, so
>> we should delete active ICMP proto unreachable timer when transport
>> is going away.
>> 
>> Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
 ...
> ACK.  This fixes a race against close().  Although that will be fairly hard to
> do, it is possible.
> 
> Acked-by: Vlad Yasevich <vladislav.yasevich@hp.com>

Applied, thanks.

^ permalink raw reply

* Re: [patch 0/3] s390: qeth patches for 2.6.35
From: David Miller @ 2010-05-16  7:50 UTC (permalink / raw)
  To: frank.blaschka; +Cc: netdev, linux-s390
In-Reply-To: <20100512053444.035939000@de.ibm.com>

From: frank.blaschka@de.ibm.com
Date: Wed, 12 May 2010 07:34:44 +0200

> here are some qeth patches for 2.6.35 (net-next).
> 
> shortlog:
> Ursula Braun (1)
> qeth: new message if OLM limit is reached
> 
> Frank Blaschka (2)
> qeth: exploit HW TX checksumming
> qeth: synchronize configuration interface

Looks good, all applied, thanks!

^ permalink raw reply

* Re: [PATCH v2] net-next: remove useless union keyword
From: David Miller @ 2010-05-16  7:53 UTC (permalink / raw)
  To: xiaosuo; +Cc: eric.dumazet, netdev
In-Reply-To: <1273223662-6804-1-git-send-email-xiaosuo@gmail.com>

From: Changli Gao <xiaosuo@gmail.com>
Date: Fri,  7 May 2010 17:14:22 +0800

> remove useless union keyword in rtable, rt6_info and dn_route.
> 
> Since there is only one member in a union, the union keyword isn't useful.
> 
> Signed-off-by: Changli Gao <xiaosuo@gmail.com>

Sorry, this patch no longer applies cleanly to net-next-2.6

Please respin and resubmit this patch.

Thank you.

^ permalink raw reply

* Re: [PATCH] rtnetlink: make SR-IOV VF interface symmetric
From: David Miller @ 2010-05-16  8:05 UTC (permalink / raw)
  To: chrisw; +Cc: kaber, mitch.a.williams, arnd, scofeldm, shemminger, netdev
In-Reply-To: <20100515031416.GE15313@sequoia.sous-sol.org>

From: Chris Wright <chrisw@sous-sol.org>
Date: Fri, 14 May 2010 20:14:16 -0700

> Now we have a set of nested attributes:
> 
>   IFLA_VFINFO_LIST (NESTED)
>     IFLA_VF_INFO (NESTED)
>       IFLA_VF_MAC
>       IFLA_VF_VLAN
>       IFLA_VF_TX_RATE
> 
> This allows a single set to operate on multiple attributes if desired.
> Among other things, it means a dump can be replayed to set state.
> 
> The current interface has yet to be released, so this seems like
> something to consider for 2.6.34.
> 
> Signed-off-by: Chris Wright <chrisw@sous-sol.org

Agreed, applied to net-2.6, thanks Chris!

^ permalink raw reply

* [GIT] Networking
From: David Miller @ 2010-05-16  8:32 UTC (permalink / raw)
  To: torvalds; +Cc: akpm, netdev, linux-kernel


1) The new SR-IOV VF netlink messages had a critical error in their
   design, they were not designed to be symmetric (therefore you can't
   take a netlink message dump, and use the elements to recreate
   configurations like you can with other netlink message types).

   Cure this by using nested netlink attributes.

   Better to fix this before it appears in a released kernel.

   Fix from Chris Wright.

2) The per-cpu TCP md5 signature state was not properly softirq
   protected, leading to all kinds of corruptions.  Fix from Eric
   Dumazet.

3) SCTP transport teardown can leave a timer running, fix from Wei
   Yongjun.

Please pull, thanks!

The following changes since commit 4fc4c3ce0dc1096cbd0daa3fe8f6905cbec2b87e:
  Linus Torvalds (1):
        Merge branch 'for-linus' of git://git.infradead.org/users/eparis/notify

are available in the git repository at:

  master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6.git master

Chris Wright (1):
      rtnetlink: make SR-IOV VF interface symmetric

Eric Dumazet (1):
      tcp: fix MD5 (RFC2385) support

Wei Yongjun (1):
      sctp: delete active ICMP proto unreachable timer when free transport

 include/linux/if_link.h |   23 ++++++-
 include/net/tcp.h       |   21 +-----
 net/core/rtnetlink.c    |  159 ++++++++++++++++++++++++++++++++--------------
 net/ipv4/tcp.c          |   34 +++++++---
 net/sctp/transport.c    |    4 +
 5 files changed, 160 insertions(+), 81 deletions(-)

^ permalink raw reply

* [PATCH] dm9000: fix "BUG: spinlock recursion"
From: Baruch Siach @ 2010-05-16 10:06 UTC (permalink / raw)
  To: netdev; +Cc: Baruch Siach, stable, Sascha Hauer, Ben Dooks

dm9000_set_rx_csum and dm9000_hash_table are called from atomic context (in
dm9000_init_dm9000), and from non-atomic context (via ethtool_ops and
net_device_ops respectively). This causes a spinlock recursion BUG. Fix this by
renaming these functions to *_unlocked for the atomic context, and make the
original functions locking wrappers for use in the non-atomic context.

Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Cc: stable@kernel.org
Cc: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Ben Dooks <ben-linux@fluff.org>
---
 drivers/net/dm9000.c |   38 +++++++++++++++++++++++++++-----------
 1 files changed, 27 insertions(+), 11 deletions(-)

diff --git a/drivers/net/dm9000.c b/drivers/net/dm9000.c
index 7f9960f..3556b2c 100644
--- a/drivers/net/dm9000.c
+++ b/drivers/net/dm9000.c
@@ -476,17 +476,13 @@ static uint32_t dm9000_get_rx_csum(struct net_device *dev)
 	return dm->rx_csum;
 }
 
-static int dm9000_set_rx_csum(struct net_device *dev, uint32_t data)
+static int dm9000_set_rx_csum_unlocked(struct net_device *dev, uint32_t data)
 {
 	board_info_t *dm = to_dm9000_board(dev);
-	unsigned long flags;
 
 	if (dm->can_csum) {
 		dm->rx_csum = data;
-
-		spin_lock_irqsave(&dm->lock, flags);
 		iow(dm, DM9000_RCSR, dm->rx_csum ? RCSR_CSUM : 0);
-		spin_unlock_irqrestore(&dm->lock, flags);
 
 		return 0;
 	}
@@ -494,6 +490,19 @@ static int dm9000_set_rx_csum(struct net_device *dev, uint32_t data)
 	return -EOPNOTSUPP;
 }
 
+static int dm9000_set_rx_csum(struct net_device *dev, uint32_t data)
+{
+	board_info_t *dm = to_dm9000_board(dev);
+	unsigned long flags;
+	int ret;
+
+	spin_lock_irqsave(&dm->lock, flags);
+	ret = dm9000_set_rx_csum_unlocked(dev, data);
+	spin_unlock_irqrestore(&dm->lock, flags);
+
+	return ret;
+}
+
 static int dm9000_set_tx_csum(struct net_device *dev, uint32_t data)
 {
 	board_info_t *dm = to_dm9000_board(dev);
@@ -722,7 +731,7 @@ static unsigned char dm9000_type_to_char(enum dm9000_type type)
  *  Set DM9000 multicast address
  */
 static void
-dm9000_hash_table(struct net_device *dev)
+dm9000_hash_table_unlocked(struct net_device *dev)
 {
 	board_info_t *db = netdev_priv(dev);
 	struct dev_mc_list *mcptr;
@@ -730,12 +739,9 @@ dm9000_hash_table(struct net_device *dev)
 	u32 hash_val;
 	u16 hash_table[4];
 	u8 rcr = RCR_DIS_LONG | RCR_DIS_CRC | RCR_RXEN;
-	unsigned long flags;
 
 	dm9000_dbg(db, 1, "entering %s\n", __func__);
 
-	spin_lock_irqsave(&db->lock, flags);
-
 	for (i = 0, oft = DM9000_PAR; i < 6; i++, oft++)
 		iow(db, oft, dev->dev_addr[i]);
 
@@ -765,6 +771,16 @@ dm9000_hash_table(struct net_device *dev)
 	}
 
 	iow(db, DM9000_RCR, rcr);
+}
+
+static void
+dm9000_hash_table(struct net_device *dev)
+{
+	board_info_t *db = netdev_priv(dev);
+	unsigned long flags;
+
+	spin_lock_irqsave(&db->lock, flags);
+	dm9000_hash_table_unlocked(dev);
 	spin_unlock_irqrestore(&db->lock, flags);
 }
 
@@ -784,7 +800,7 @@ dm9000_init_dm9000(struct net_device *dev)
 	db->io_mode = ior(db, DM9000_ISR) >> 6;	/* ISR bit7:6 keeps I/O mode */
 
 	/* Checksum mode */
-	dm9000_set_rx_csum(dev, db->rx_csum);
+	dm9000_set_rx_csum_unlocked(dev, db->rx_csum);
 
 	/* GPIO0 on pre-activate PHY */
 	iow(db, DM9000_GPR, 0);	/* REG_1F bit0 activate phyxcer */
@@ -811,7 +827,7 @@ dm9000_init_dm9000(struct net_device *dev)
 	iow(db, DM9000_ISR, ISR_CLR_STATUS); /* Clear interrupt status */
 
 	/* Set address filter table */
-	dm9000_hash_table(dev);
+	dm9000_hash_table_unlocked(dev);
 
 	imr = IMR_PAR | IMR_PTM | IMR_PRM;
 	if (db->type != TYPE_DM9000E)
-- 
1.7.1


^ permalink raw reply related

* [PATCH] r6040: fix link checking with switches
From: Florian Fainelli @ 2010-05-16 12:30 UTC (permalink / raw)
  To: netdev, David Miller

The current link checking logic only works for one port, which is not correct
for swiches were multiple ports can have different link status. As a result
we would only check for link status on port 1 of the switch. Move the calls
to mii_check_media in r6040_timer which will be polling a single PHY chip
correctly and assume link is up for switches.

Signed-off-by: Florian Fainelli <florian@openwrt.org>
---
 drivers/net/r6040.c |    8 +++-----
 1 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/drivers/net/r6040.c b/drivers/net/r6040.c
index 4122916..eeee379 100644
--- a/drivers/net/r6040.c
+++ b/drivers/net/r6040.c
@@ -400,9 +400,6 @@ static void r6040_init_mac_regs(struct net_device *dev)
 	 * we may got called by r6040_tx_timeout which has left
 	 * some unsent tx buffers */
 	iowrite16(0x01, ioaddr + MTPR);
-
-	/* Check media */
-	mii_check_media(&lp->mii_if, 1, 1);
 }
 
 static void r6040_tx_timeout(struct net_device *dev)
@@ -530,8 +527,6 @@ static int r6040_phy_mode_chk(struct net_device *dev)
 			phy_dat = 0x0000;
 	}
 
-	mii_check_media(&lp->mii_if, 0, 1);
-
 	return phy_dat;
 };
 
@@ -813,6 +808,9 @@ static void r6040_timer(unsigned long data)
 
 	/* Timer active again */
 	mod_timer(&lp->timer, round_jiffies(jiffies + HZ));
+
+	/* Check media */
+	mii_check_media(&lp->mii_if, 1, 1);
 }
 
 /* Read/set MAC address routines */
-- 
1.7.1



^ permalink raw reply related

* [PATCH] atm: select FW_LOADER in Kconfig for solos-pci
From: Nathan Williams @ 2010-05-16 13:12 UTC (permalink / raw)
  To: netdev

solos-pci uses request_firmware() for firmware upgrades

Signed-off-by: Nathan Williams <nathan@traverse.com.au>

diff --git a/drivers/atm/Kconfig b/drivers/atm/Kconfig
index 191b85e..f1a0a00 100644
--- a/drivers/atm/Kconfig
+++ b/drivers/atm/Kconfig
@@ -394,6 +394,7 @@ config ATM_HE_USE_SUNI
 config ATM_SOLOS
 	tristate "Solos ADSL2+ PCI Multiport card driver"
 	depends on PCI
+	select FW_LOADER
 	help
 	  Support for the Solos multiport ADSL2+ card.


^ permalink raw reply related

* bnx2/BCM5709: why 5 interrupts on a 4 core system (2.6.33.3)
From: Krzysztof Oledzki @ 2010-05-16 13:33 UTC (permalink / raw)
  To: Michael Chan; +Cc: netdev

[-- Attachment #1: Type: TEXT/PLAIN, Size: 1531 bytes --]

Hello,

I have a Dell R610 server with BCM5709 NICs. The server has one, 4-core 
CPU (X5570) and four BCM5709 NICs onboard. I would like to assign each 
NIC's interrupt to a different CPU for a better performance. However, as I 
have 5 INTs to assign and only 4 CPUs available, it is not obvious how to 
do it right:

             CPU0       CPU1       CPU2       CPU3
   61:      85085          0          0          0   PCI-MSI-edge      eth1-0
   62:      23046          0          0          0   PCI-MSI-edge      eth1-1
   63:      24525          0          0          0   PCI-MSI-edge      eth1-2
   64:      77801          0          0          0   PCI-MSI-edge      eth1-3
   65:      24006          0          0          0   PCI-MSI-edge      eth1-4

# uname -r
2.6.33.3

# dmesg |grep  0000:01:00.0
bnx2 0000:01:00.0: PCI INT A -> GSI 36 (level, low) -> IRQ 36
bnx2 0000:01:00.0: setting latency timer to 64
bnx2 0000:01:00.0: firmware: requesting bnx2/bnx2-mips-09-5.0.0.j3.fw
bnx2 0000:01:00.0: firmware: requesting bnx2/bnx2-rv2p-09-5.0.0.j3.fw
bnx2 0000:01:00.0: irq 61 for MSI/MSI-X
bnx2 0000:01:00.0: irq 62 for MSI/MSI-X
bnx2 0000:01:00.0: irq 63 for MSI/MSI-X
bnx2 0000:01:00.0: irq 64 for MSI/MSI-X
bnx2 0000:01:00.0: irq 65 for MSI/MSI-X
bnx2 0000:01:00.0: irq 66 for MSI/MSI-X
bnx2 0000:01:00.0: irq 67 for MSI/MSI-X
bnx2 0000:01:00.0: irq 68 for MSI/MSI-X
bnx2 0000:01:00.0: irq 69 for MSI/MSI-X

Why the driver registers 5 interrupts instead of 4? How to limit it to 4?

Best regards,

 				Krzysztof Olędzki

^ permalink raw reply

* Re: VLAN I/F's and TX queue.
From: Joakim Tjernlund @ 2010-05-16 14:22 UTC (permalink / raw)
  To: David Miller; +Cc: eric.dumazet, kaber, netdev
In-Reply-To: <20100516.004041.73702151.davem@davemloft.net>


David Miller <davem@davemloft.net> wrote on 2010/05/16 09:40:41:
>
> From: Joakim Tjernlund <joakim.tjernlund@transmode.se>
> Date: Mon, 10 May 2010 16:50:20 +0200
>
> > Patrick McHardy <kaber@trash.net> wrote on 2010/05/10 16:33:00:
> >>
> >> Joakim Tjernlund wrote:
> >> > Eric Dumazet <eric.dumazet@gmail.com> wrote on 2010/05/07 10:53:23:
> >> >>> 3) I would expect lost pkgs to be accounted on eth0 instead of
> >> >>>    the VLAN interface(s) since that is where the pkg is lost, why
> >> >>>    isn't it so?
> >> >> You try to send packets on eth0.XXX, some are dropped, and accounted for
> >> >> on eth0.XXX stats. What is wrong with this ?
> >> >
> >> > In this case one lost pkg is accounted for twice, once on eth0.1 and
> >> > once more on eth0.1.1. Note that eth0.1.1 is stacked on
> >> > top of eth0.1
> >> >
> >> > I would at least expect eth0 to also account lost pkgs too.
> >> > I was confused by the current accounting as I knew that
> >> > the underlying HW I/F should be the only I/F that could
> >> > drop pkgs.
> >>
> >> In case of NET_XMIT_CN, the packet is dropped by the qdisc before
> >> it reaches eth0, so its only accounted on the upper devices.
> >
> > hmm, I am afraid I don't follow this. Why would a pkg be dropped before
> > it reaches eth0?
>
> Because we have packet schedulers that sit before the device transmit
> happens, and those packet schedulers enforce limits based upon
> classification results or other criteria, and if those limits are
> exceeded packets are droppers and NET_XMIT_CN is returned back up into
> the transmit path of the networking stack.

OK, but what I don't get is if pgks are dropped as soon as the underlying
device cannot handle the pkg directly(returns !NETDEV_TX_OK or stops the queue)?
Are !NETDEV_TX_OK and stopping the queue handled differently by upper layers?
I would have expected the pkg be added to the TX queue and transmitted somewhat later.
If not, what is the TX queue for?

>
> The device never sees that packet get submitted to it's ->ndo_start_xmit()
> routine, and this is entirely intentional.  And it is entirely intentional
> that NET_XMIT_CN gets passed up into the caller, where protocols such as
> TCP can key off this information to make congestion control decisions.

In this case it gets passed up to the VLAN driver, should the VLAN driver
do something else to use the TX queue?

      Jocke


^ permalink raw reply

* Re: Weird TCP retransmit behaviour in recent kernels
From: Michael Smith @ 2010-05-16 16:08 UTC (permalink / raw)
  To: Ilpo Järvinen; +Cc: Netdev
In-Reply-To: <alpine.DEB.2.00.1005160118240.30522@melkinpaasi.cs.helsinki.fi>

[-- Attachment #1: Type: TEXT/PLAIN, Size: 1091 bytes --]

On Sun, 16 May 2010, Ilpo Järvinen wrote:

> On Fri, 14 May 2010, Michael Smith wrote:

>> It seems like when consecutive packets are lost, the SLES11
>> server retransmits the first packet when the timeout fires. The client
>> ACKs, but the server doesn't retransmit the next lost packet; instead,
>> it sends a couple more new packets, which don't get ACKed.

> This is where your problem is, they should get acked in a _compliant_
> network (with duplicate ACKs).

> Some have seen similar phenomena, every time it has been fault in some
> middlebox/peer that does not do what it should. You can disable frto
> using tcp_frto sysctl if you like, however, I disagree with you as I'm
> pretty sure there is some broken middlebox in the network (which is trying
> to be too intelligent).

Thanks - tcp_frto=0 works around the problem here. The network in the 
middle is provided by a number of other parties, so I can try to point 
them in the right direction, but unless Microsoft turns on FRTO by default 
sometime soon, I doubt they will have time to care. :)

Mike

^ permalink raw reply

* Re: [PATCH net-next-2.6] net: Consistent skb timestamping
From: Dimitris Michailidis @ 2010-05-16 18:30 UTC (permalink / raw)
  To: David Miller; +Cc: therbert, eric.dumazet, netdev
In-Reply-To: <20100515.235635.63009445.davem@davemloft.net>

David Miller wrote:

> The real fix is to make the devices less stupid and give us timestamps
> directly, and thanks to things like PTP support in hardware that's
> actually more and more of a reality these days.

For cxgb4 a timestamp is written into Rx descriptors for each received 
packet.  The value comes from a TSC-like cycle counter.  The raw timestamp 
is very cheap to get, its value converted to system ktime a bit less so 
though not too bad.  It would be nicer though if the stack could hint the 
driver whether it should do the conversion at all.  Maybe export 
netstamp_needed and add an inline wrapper to read it?


^ 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