* Re: [PATCH net-next-2.6] net: sk_add_backlog() take rmem_alloc into account
From: Eric Dumazet @ 2010-04-27 22:19 UTC (permalink / raw)
To: David Miller; +Cc: bmb, therbert, netdev, rick.jones2
In-Reply-To: <20100427.151103.146348463.davem@davemloft.net>
Le mardi 27 avril 2010 à 15:11 -0700, David Miller a écrit :
> From: David Miller <davem@davemloft.net>
> Date: Tue, 27 Apr 2010 14:43:07 -0700 (PDT)
>
> > This looks great, applied, thanks Eric!
>
> I have to fix this one up, for example SCTP stopped building because it
> still refers to the ->limit member you removed.
> --
Hmm, sorry for this, thanks !
^ permalink raw reply
* Re: [PATCH net-next-2.6] bnx2x: Remove two prefetch()
From: David Miller @ 2010-04-27 22:19 UTC (permalink / raw)
To: eric.dumazet; +Cc: xiaosuo, hadi, therbert, shemminger, netdev, eilong
In-Reply-To: <1272406693.2343.26.camel@edumazet-laptop>
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Wed, 28 Apr 2010 00:18:13 +0200
> [PATCH net-next-2.6] bnx2x: Remove two prefetch()
>
> 1) Even on 64bit arches, sizeof(struct sk_buff) < 256
> 2) No need to prefetch same pointer twice.
>
> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
> CC: Eilon Greenstein <eilong@broadcom.com>
Eilon please review and ACK/NACK
Thanks.
^ permalink raw reply
* [PATCH net-next-2.6] bnx2x: Remove two prefetch()
From: Eric Dumazet @ 2010-04-27 22:18 UTC (permalink / raw)
To: David Miller
Cc: xiaosuo, hadi, therbert, shemminger, netdev, Eilon Greenstein
In-Reply-To: <20100427.150817.84390202.davem@davemloft.net>
Le mardi 27 avril 2010 à 15:08 -0700, David Miller a écrit :
> From: Eric Dumazet <eric.dumazet@gmail.com>
> Date: Fri, 23 Apr 2010 12:26:06 +0200
>
> > Le vendredi 23 avril 2010 à 16:12 +0800, Changli Gao a écrit :
> >> batch skb dequeueing from softnet input_pkt_queue.
> >>
> >> batch skb dequeueing from softnet input_pkt_queue to reduce potential lock
> >> contention when RPS is enabled.
> >>
> >> Note: in the worst case, the number of packets in a softnet_data may be double
> >> of netdev_max_backlog.
> >>
> >> Signed-off-by: Changli Gao <xiaosuo@gmail.com>
> >> ----
> >
> > Oops, reading it again, I found process_backlog() was still taking the
> > lock twice, if only one packet is waiting in input_pkt_queue.
> >
> > Possible fix, on top of your patch :
>
> I've applied Changli's patch with this fixup added to it.
>
> If there are any follow-on changes necessary after further analysis,
> please send patches on top of this work.
>
Thanks David, I was about to resubmit the cumulative patch ;)
On my 'old' dev machine (two quad core), RPS is able to get a 300%
increase on udpsink test on 20 flows.
I yet have to make routing/firewalling tests as well.
I also noticed bnx2x driver has some strange prefetch() calls.
[PATCH net-next-2.6] bnx2x: Remove two prefetch()
1) Even on 64bit arches, sizeof(struct sk_buff) < 256
2) No need to prefetch same pointer twice.
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
CC: Eilon Greenstein <eilong@broadcom.com>
---
diff --git a/drivers/net/bnx2x_main.c b/drivers/net/bnx2x_main.c
index 613f727..f706ed1 100644
--- a/drivers/net/bnx2x_main.c
+++ b/drivers/net/bnx2x_main.c
@@ -1617,7 +1617,6 @@ static int bnx2x_rx_int(struct bnx2x_fastpath *fp, int budget)
rx_buf = &fp->rx_buf_ring[bd_cons];
skb = rx_buf->skb;
prefetch(skb);
- prefetch((u8 *)skb + 256);
len = le16_to_cpu(cqe->fast_path_cqe.pkt_len);
pad = cqe->fast_path_cqe.placement_offset;
@@ -1668,7 +1667,6 @@ static int bnx2x_rx_int(struct bnx2x_fastpath *fp, int budget)
dma_unmap_addr(rx_buf, mapping),
pad + RX_COPY_THRESH,
DMA_FROM_DEVICE);
- prefetch(skb);
prefetch(((char *)(skb)) + 128);
/* is this an error packet? */
^ permalink raw reply related
* Re: [PATCH net-next-2.6] net: sk_add_backlog() take rmem_alloc into account
From: David Miller @ 2010-04-27 22:11 UTC (permalink / raw)
To: eric.dumazet; +Cc: bmb, therbert, netdev, rick.jones2
In-Reply-To: <20100427.144307.22037530.davem@davemloft.net>
From: David Miller <davem@davemloft.net>
Date: Tue, 27 Apr 2010 14:43:07 -0700 (PDT)
> This looks great, applied, thanks Eric!
I have to fix this one up, for example SCTP stopped building because it
still refers to the ->limit member you removed.
^ permalink raw reply
* Re: [PATCH v5] rfs: Receive Flow Steering
From: David Miller @ 2010-04-27 22:10 UTC (permalink / raw)
To: eric.dumazet; +Cc: therbert, netdev
In-Reply-To: <1272406126.2343.17.camel@edumazet-laptop>
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Wed, 28 Apr 2010 00:08:46 +0200
> Le mardi 27 avril 2010 à 14:59 -0700, David Miller a écrit :
>> net: Make RFS socket operations not be inet specific.
>>
>> Idea from Eric Dumazet.
>>
>> As for placement inside of struct sock, I tried to choose a place
>> that otherwise has a 32-bit hole on 64-bit systems.
>>
>> Signed-off-by: David S. Miller <davem@davemloft.net>
>
> Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
>
> I tested same patch today (plus the skb->rxhash = sk->sk_rxhash) and got
> a very small speedup on my Nehalem machine, where get_rps_cpus() was
> using 1 % of cpu, now 0.25 %, on a tbench.
Great, I've added your ACK.
Thanks!
^ permalink raw reply
* Re: [PATCH v5] rfs: Receive Flow Steering
From: Eric Dumazet @ 2010-04-27 22:08 UTC (permalink / raw)
To: David Miller; +Cc: therbert, netdev
In-Reply-To: <20100427.145904.67907652.davem@davemloft.net>
Le mardi 27 avril 2010 à 14:59 -0700, David Miller a écrit :
> From: Eric Dumazet <eric.dumazet@gmail.com>
> Date: Mon, 26 Apr 2010 10:41:11 +0200
>
> > Le lundi 19 avril 2010 à 14:19 -0700, David Miller a écrit :
> >
> >>
> >> I was thinking also about how we could compute rxhash in the
> >> loopback driver :-)
> >
> > This would be easy if rxhash was not a "struct inet_sock" field but a
> > "struct sock" one
> >
> > sock_alloc_send_pskb() (or skb_set_owner_w())
> >
> > skb->rxhash = sk->rxhash;
>
> Agreed. I'll commit the following to net-next-2.6 after some build
> testing.
>
> net: Make RFS socket operations not be inet specific.
>
> Idea from Eric Dumazet.
>
> As for placement inside of struct sock, I tried to choose a place
> that otherwise has a 32-bit hole on 64-bit systems.
>
> Signed-off-by: David S. Miller <davem@davemloft.net>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
I tested same patch today (plus the skb->rxhash = sk->sk_rxhash) and got
a very small speedup on my Nehalem machine, where get_rps_cpus() was
using 1 % of cpu, now 0.25 %, on a tbench.
^ permalink raw reply
* Re: [PATCH v6] net: batch skb dequeueing from softnet input_pkt_queue
From: David Miller @ 2010-04-27 22:08 UTC (permalink / raw)
To: eric.dumazet; +Cc: xiaosuo, hadi, therbert, shemminger, netdev
In-Reply-To: <1272018366.7895.7930.camel@edumazet-laptop>
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Fri, 23 Apr 2010 12:26:06 +0200
> Le vendredi 23 avril 2010 à 16:12 +0800, Changli Gao a écrit :
>> batch skb dequeueing from softnet input_pkt_queue.
>>
>> batch skb dequeueing from softnet input_pkt_queue to reduce potential lock
>> contention when RPS is enabled.
>>
>> Note: in the worst case, the number of packets in a softnet_data may be double
>> of netdev_max_backlog.
>>
>> Signed-off-by: Changli Gao <xiaosuo@gmail.com>
>> ----
>
> Oops, reading it again, I found process_backlog() was still taking the
> lock twice, if only one packet is waiting in input_pkt_queue.
>
> Possible fix, on top of your patch :
I've applied Changli's patch with this fixup added to it.
If there are any follow-on changes necessary after further analysis,
please send patches on top of this work.
Thanks.
^ permalink raw reply
* Re: [PATCH v5] rfs: Receive Flow Steering
From: David Miller @ 2010-04-27 21:59 UTC (permalink / raw)
To: eric.dumazet; +Cc: therbert, netdev
In-Reply-To: <1272271271.2346.16.camel@edumazet-laptop>
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Mon, 26 Apr 2010 10:41:11 +0200
> Le lundi 19 avril 2010 à 14:19 -0700, David Miller a écrit :
>
>>
>> I was thinking also about how we could compute rxhash in the
>> loopback driver :-)
>
> This would be easy if rxhash was not a "struct inet_sock" field but a
> "struct sock" one
>
> sock_alloc_send_pskb() (or skb_set_owner_w())
>
> skb->rxhash = sk->rxhash;
Agreed. I'll commit the following to net-next-2.6 after some build
testing.
net: Make RFS socket operations not be inet specific.
Idea from Eric Dumazet.
As for placement inside of struct sock, I tried to choose a place
that otherwise has a 32-bit hole on 64-bit systems.
Signed-off-by: David S. Miller <davem@davemloft.net>
diff --git a/include/net/inet_sock.h b/include/net/inet_sock.h
index c1d4295..1653de5 100644
--- a/include/net/inet_sock.h
+++ b/include/net/inet_sock.h
@@ -102,7 +102,6 @@ struct rtable;
* @uc_ttl - Unicast TTL
* @inet_sport - Source port
* @inet_id - ID counter for DF pkts
- * @rxhash - flow hash received from netif layer
* @tos - TOS
* @mc_ttl - Multicasting TTL
* @is_icsk - is this an inet_connection_sock?
@@ -126,9 +125,6 @@ struct inet_sock {
__u16 cmsg_flags;
__be16 inet_sport;
__u16 inet_id;
-#ifdef CONFIG_RPS
- __u32 rxhash;
-#endif
struct ip_options *opt;
__u8 tos;
@@ -224,37 +220,4 @@ static inline __u8 inet_sk_flowi_flags(const struct sock *sk)
return inet_sk(sk)->transparent ? FLOWI_FLAG_ANYSRC : 0;
}
-static inline void inet_rps_record_flow(const struct sock *sk)
-{
-#ifdef CONFIG_RPS
- struct rps_sock_flow_table *sock_flow_table;
-
- rcu_read_lock();
- sock_flow_table = rcu_dereference(rps_sock_flow_table);
- rps_record_sock_flow(sock_flow_table, inet_sk(sk)->rxhash);
- rcu_read_unlock();
-#endif
-}
-
-static inline void inet_rps_reset_flow(const struct sock *sk)
-{
-#ifdef CONFIG_RPS
- struct rps_sock_flow_table *sock_flow_table;
-
- rcu_read_lock();
- sock_flow_table = rcu_dereference(rps_sock_flow_table);
- rps_reset_sock_flow(sock_flow_table, inet_sk(sk)->rxhash);
- rcu_read_unlock();
-#endif
-}
-
-static inline void inet_rps_save_rxhash(struct sock *sk, u32 rxhash)
-{
-#ifdef CONFIG_RPS
- if (unlikely(inet_sk(sk)->rxhash != rxhash)) {
- inet_rps_reset_flow(sk);
- inet_sk(sk)->rxhash = rxhash;
- }
-#endif
-}
#endif /* _INET_SOCK_H */
diff --git a/include/net/sock.h b/include/net/sock.h
index ef2f875..cf12b1e 100644
--- a/include/net/sock.h
+++ b/include/net/sock.h
@@ -198,6 +198,7 @@ struct sock_common {
* @sk_rcvlowat: %SO_RCVLOWAT setting
* @sk_rcvtimeo: %SO_RCVTIMEO setting
* @sk_sndtimeo: %SO_SNDTIMEO setting
+ * @sk_rxhash: flow hash received from netif layer
* @sk_filter: socket filtering instructions
* @sk_protinfo: private area, net family specific, when not using slab
* @sk_timer: sock cleanup timer
@@ -278,6 +279,9 @@ struct sock {
int sk_gso_type;
unsigned int sk_gso_max_size;
int sk_rcvlowat;
+#ifdef CONFIG_RPS
+ __u32 sk_rxhash;
+#endif
unsigned long sk_flags;
unsigned long sk_lingertime;
struct sk_buff_head sk_error_queue;
@@ -629,6 +633,40 @@ static inline int sk_backlog_rcv(struct sock *sk, struct sk_buff *skb)
return sk->sk_backlog_rcv(sk, skb);
}
+static inline void sock_rps_record_flow(const struct sock *sk)
+{
+#ifdef CONFIG_RPS
+ struct rps_sock_flow_table *sock_flow_table;
+
+ rcu_read_lock();
+ sock_flow_table = rcu_dereference(rps_sock_flow_table);
+ rps_record_sock_flow(sock_flow_table, sk->sk_rxhash);
+ rcu_read_unlock();
+#endif
+}
+
+static inline void sock_rps_reset_flow(const struct sock *sk)
+{
+#ifdef CONFIG_RPS
+ struct rps_sock_flow_table *sock_flow_table;
+
+ rcu_read_lock();
+ sock_flow_table = rcu_dereference(rps_sock_flow_table);
+ rps_reset_sock_flow(sock_flow_table, sk->sk_rxhash);
+ rcu_read_unlock();
+#endif
+}
+
+static inline void sock_rps_save_rxhash(struct sock *sk, u32 rxhash)
+{
+#ifdef CONFIG_RPS
+ if (unlikely(sk->sk_rxhash != rxhash)) {
+ sock_rps_reset_flow(sk);
+ sk->sk_rxhash = rxhash;
+ }
+#endif
+}
+
#define sk_wait_event(__sk, __timeo, __condition) \
({ int __rc; \
release_sock(__sk); \
diff --git a/net/ipv4/af_inet.c b/net/ipv4/af_inet.c
index 9f52880..c6c43bc 100644
--- a/net/ipv4/af_inet.c
+++ b/net/ipv4/af_inet.c
@@ -419,7 +419,7 @@ int inet_release(struct socket *sock)
if (sk) {
long timeout;
- inet_rps_reset_flow(sk);
+ sock_rps_reset_flow(sk);
/* Applications forget to leave groups before exiting */
ip_mc_drop_socket(sk);
@@ -722,7 +722,7 @@ int inet_sendmsg(struct kiocb *iocb, struct socket *sock, struct msghdr *msg,
{
struct sock *sk = sock->sk;
- inet_rps_record_flow(sk);
+ sock_rps_record_flow(sk);
/* We may need to bind the socket. */
if (!inet_sk(sk)->inet_num && inet_autobind(sk))
@@ -737,7 +737,7 @@ static ssize_t inet_sendpage(struct socket *sock, struct page *page, int offset,
{
struct sock *sk = sock->sk;
- inet_rps_record_flow(sk);
+ sock_rps_record_flow(sk);
/* We may need to bind the socket. */
if (!inet_sk(sk)->inet_num && inet_autobind(sk))
@@ -755,7 +755,7 @@ int inet_recvmsg(struct kiocb *iocb, struct socket *sock, struct msghdr *msg,
int addr_len = 0;
int err;
- inet_rps_record_flow(sk);
+ sock_rps_record_flow(sk);
err = sk->sk_prot->recvmsg(iocb, sk, msg, size, flags & MSG_DONTWAIT,
flags & ~MSG_DONTWAIT, &addr_len);
diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c
index 4d6717d..771f814 100644
--- a/net/ipv4/tcp_ipv4.c
+++ b/net/ipv4/tcp_ipv4.c
@@ -1672,7 +1672,7 @@ process:
skb->dev = NULL;
- inet_rps_save_rxhash(sk, skb->rxhash);
+ sock_rps_save_rxhash(sk, skb->rxhash);
bh_lock_sock_nested(sk);
ret = 0;
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c
index 776c844..63eb56b 100644
--- a/net/ipv4/udp.c
+++ b/net/ipv4/udp.c
@@ -1217,7 +1217,7 @@ int udp_disconnect(struct sock *sk, int flags)
sk->sk_state = TCP_CLOSE;
inet->inet_daddr = 0;
inet->inet_dport = 0;
- inet_rps_save_rxhash(sk, 0);
+ sock_rps_save_rxhash(sk, 0);
sk->sk_bound_dev_if = 0;
if (!(sk->sk_userlocks & SOCK_BINDADDR_LOCK))
inet_reset_saddr(sk);
@@ -1262,7 +1262,7 @@ static int __udp_queue_rcv_skb(struct sock *sk, struct sk_buff *skb)
int rc;
if (inet_sk(sk)->inet_daddr)
- inet_rps_save_rxhash(sk, skb->rxhash);
+ sock_rps_save_rxhash(sk, skb->rxhash);
rc = sock_queue_rcv_skb(sk, skb);
if (rc < 0) {
^ permalink raw reply related
* Re: [patch] ipheth: potential null dereferences on error path
From: David Miller @ 2010-04-27 21:49 UTC (permalink / raw)
To: agimenez; +Cc: error27, diego, netdev, kernel-janitors
In-Reply-To: <20100427214347.GA2376@bart.evergreen.loc>
From: L. Alberto Giménez <agimenez@sysvalve.es>
Date: Tue, 27 Apr 2010 23:43:47 +0200
> On Tue, Apr 27, 2010 at 11:20:12AM +0200, Dan Carpenter wrote:
>> The calls to usb_free_buffer() dereference rx_urb and tx_urb in the
>> parameter list but those could be NULL.
>>
>> Signed-off-by: Dan Carpenter <error27@gmail.com>
>
> Acked-by: L. Alberto Giménez <agimenez@sysvalve.es>
Applied, thanks everyone.
^ permalink raw reply
* Re: [PATCH kernel 2.6.34-rc5] smc91c92_cs: spin_unlock_irqrestore before calling smc_interrupt()
From: David Miller @ 2010-04-27 21:47 UTC (permalink / raw)
To: ken_kawasaki; +Cc: netdev
In-Reply-To: <20100425053709.ec182f63.ken_kawasaki@spring.nifty.jp>
From: Ken Kawasaki <ken_kawasaki@spring.nifty.jp>
Date: Sun, 25 Apr 2010 05:37:09 +0900
>
> smc91c92_cs:
> * spin_unlock_irqrestore before calling smc_interrupt() in media_check()
> to avoid lockup.
> * use spin_lock_irqsave for ethtool function.
>
> Signed-off-by: Ken Kawasaki <ken_kawasaki@spring.nifty.jp>
Applied, thank you.
^ permalink raw reply
* Re: [patch] ipheth: potential null dereferences on error path
From: L. Alberto Giménez @ 2010-04-27 21:43 UTC (permalink / raw)
To: Dan Carpenter; +Cc: Diego Giagio, David S. Miller, netdev, kernel-janitors
In-Reply-To: <20100427092012.GA29093@bicker>
On Tue, Apr 27, 2010 at 11:20:12AM +0200, Dan Carpenter wrote:
> The calls to usb_free_buffer() dereference rx_urb and tx_urb in the
> parameter list but those could be NULL.
>
> Signed-off-by: Dan Carpenter <error27@gmail.com>
Acked-by: L. Alberto Giménez <agimenez@sysvalve.es>
--
L. Alberto Giménez
JabberID agimenez@jabber.sysvalve.es
GnuPG key ID 0x3BAABDE1
^ permalink raw reply
* Re: [PATCH net-next-2.6] net: sk_add_backlog() take rmem_alloc into account
From: David Miller @ 2010-04-27 21:43 UTC (permalink / raw)
To: eric.dumazet; +Cc: bmb, therbert, netdev, rick.jones2
In-Reply-To: <1272399662.2343.12.camel@edumazet-laptop>
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Tue, 27 Apr 2010 22:21:02 +0200
> [PATCH net-next-2.6] net: sk_add_backlog() take rmem_alloc into account
>
> Current socket backlog limit is not enough to really stop DDOS attacks,
> because user thread spend many time to process a full backlog each
> round, and user might crazy spin on socket lock.
>
> We should add backlog size and receive_queue size (aka rmem_alloc) to
> pace writers, and let user run without being slow down too much.
>
> Introduce a sk_rcvqueues_full() helper, to avoid taking socket lock in
> stress situations.
>
> Under huge stress from a multiqueue/RPS enabled NIC, a single flow udp
> receiver can now process ~200.000 pps (instead of ~100 pps before the
> patch) on a 8 core machine.
>
> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
This looks great, applied, thanks Eric!
^ permalink raw reply
* Re: [PATCH 3/3] bnx2: Update version to 2.0.9.
From: David Miller @ 2010-04-27 21:38 UTC (permalink / raw)
To: mchan; +Cc: netdev, gospo, jfeeney
In-Reply-To: <1272403691-2934-3-git-send-email-mchan@broadcom.com>
From: "Michael Chan" <mchan@broadcom.com>
Date: Tue, 27 Apr 2010 14:28:11 -0700
> Signed-off-by: Michael Chan <mchan@broadcom.com>
Applied to net-2.6
^ permalink raw reply
* Re: [PATCH 2/3] bnx2: Prevent "scheduling while atomic" warning with cnic, bonding and vlan.
From: David Miller @ 2010-04-27 21:38 UTC (permalink / raw)
To: mchan; +Cc: netdev, gospo, jfeeney
In-Reply-To: <1272403691-2934-2-git-send-email-mchan@broadcom.com>
From: "Michael Chan" <mchan@broadcom.com>
Date: Tue, 27 Apr 2010 14:28:10 -0700
> The bonding driver calls ndo_vlan_rx_register() while holding bond->lock.
> The bnx2 driver calls bnx2_netif_stop() to stop the rx handling while
> changing the vlgrp. The call also stops the cnic driver which sleeps
> while the bond->lock is held and cause the warning.
>
> This code path only needs to stop the NAPI rx handling while we are
> changing the vlgrp. Since no reset is going to occur, there is no need
> to stop cnic in this case. By adding a parameter to bnx2_netif_stop()
> to skip stopping cnic, we can avoid the warning.
>
> Signed-off-by: Michael Chan <mchan@broadcom.com>
Applied to net-2.6
^ permalink raw reply
* Re: [PATCH 1/3] bnx2: Fix lost MSI-X problem on 5709 NICs.
From: David Miller @ 2010-04-27 21:38 UTC (permalink / raw)
To: mchan; +Cc: netdev, gospo, jfeeney
In-Reply-To: <1272403691-2934-1-git-send-email-mchan@broadcom.com>
From: "Michael Chan" <mchan@broadcom.com>
Date: Tue, 27 Apr 2010 14:28:09 -0700
> It has been reported that under certain heavy traffic conditions in MSI-X
> mode, the driver can lose an MSI-X vector causing all packets in the
> associated rx/tx ring pair to be dropped. The problem is caused by
> the chip dropping the write to unmask the MSI-X vector by the kernel
> (when migrating the IRQ for example).
>
> This can be prevented by increasing the GRC timeout value for these
> register read and write operations.
>
> Thanks to Dell for helping us debug this problem.
>
> Signed-off-by: Michael Chan <mchan@broadcom.com>
Applied to net-2.6
^ permalink raw reply
* Re: [net-next-2.6 PATCH] ixgbevf: Fix link speed display
From: David Miller @ 2010-04-27 21:36 UTC (permalink / raw)
To: jeffrey.t.kirsher; +Cc: netdev, gospo, gregory.v.rose
In-Reply-To: <20100427213143.25913.83381.stgit@localhost.localdomain>
From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Date: Tue, 27 Apr 2010 14:31:45 -0700
> From: Greg Rose <gregory.v.rose@intel.com>
>
> The ixgbevf driver would always report 10Gig speeds even when the link
> speed is downshifted to 1Gig. This patch fixes that problem.
>
> Signed-off-by: Greg Rose <gregory.v.rose@intel.com>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Applied.
^ permalink raw reply
* Re: [net-next-2.6 PATCH] ixgbe: Properly display 1 gig downshift warning for backplane
From: David Miller @ 2010-04-27 21:36 UTC (permalink / raw)
To: jeffrey.t.kirsher; +Cc: netdev, gospo, anjali.singhai
In-Reply-To: <20100427213124.25913.82475.stgit@localhost.localdomain>
From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Date: Tue, 27 Apr 2010 14:31:25 -0700
> From: Anjali Singhai <anjali.singhai@intel.com>
>
> Description: When using Intel smartspeed, the patch displays a
> warning when the link down shifts to 1 Gig.
>
> Signed-off-by: Anjali Singhai <anjali.singhai@intel.com>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Applied.
^ permalink raw reply
* Re: [net-next-2.6 PATCH] ixgbe: cleanup ethtool autoneg input
From: David Miller @ 2010-04-27 21:36 UTC (permalink / raw)
To: jeffrey.t.kirsher; +Cc: netdev, gospo, donald.c.skidmore
In-Reply-To: <20100427213002.25913.93796.stgit@localhost.localdomain>
From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Date: Tue, 27 Apr 2010 14:31:06 -0700
> From: Don Skidmore <donald.c.skidmore@intel.com>
>
> The way we were setting autoneg via ethtool was inconstant with that
> of our other drivers. It will change the following:
...
> Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Applied.
^ permalink raw reply
* Re: [patch] ipheth: potential null dereferences on error path
From: David Miller @ 2010-04-27 21:33 UTC (permalink / raw)
To: agimenez; +Cc: error27, diego, netdev, kernel-janitors
In-Reply-To: <20100427210003.GA13873@bart.evergreen.loc>
From: L. Alberto Giménez <agimenez@sysvalve.es>
Date: Tue, 27 Apr 2010 23:00:03 +0200
> On Tue, Apr 27, 2010 at 11:20:12AM +0200, Dan Carpenter wrote:
>> The calls to usb_free_buffer() dereference rx_urb and tx_urb in the
>> parameter list but those could be NULL.
>>
>> Signed-off-by: Dan Carpenter <error27@gmail.com>
>
> Seems good to me (should I ack it or any other kind of singoff?).
If you give it an "Acked-by: ..." that would be nice.
^ permalink raw reply
* Re: [PATCH v2] net: reimplement softnet_data.output_queue as a FIFO queue
From: David Miller @ 2010-04-27 21:32 UTC (permalink / raw)
To: eric.dumazet; +Cc: xiaosuo, netdev
In-Reply-To: <1272400618.2343.13.camel@edumazet-laptop>
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Tue, 27 Apr 2010 22:36:58 +0200
> Le mardi 27 avril 2010 à 17:06 +0800, Changli Gao a écrit :
>> reimplement softnet_data.output_queue as a FIFO queue.
>>
>> reimplement softnet_data.output_queue as a FIFO queue to keep the fairness among
>> the qdiscs rescheduled.
>>
>> Signed-off-by: Changli Gao <xiaosuo@gmail.com>
>
> Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
Applied, thanks everyone.
^ permalink raw reply
* [net-next-2.6 PATCH] ixgbevf: Fix link speed display
From: Jeff Kirsher @ 2010-04-27 21:31 UTC (permalink / raw)
To: davem; +Cc: netdev, gospo, Greg Rose, Jeff Kirsher
From: Greg Rose <gregory.v.rose@intel.com>
The ixgbevf driver would always report 10Gig speeds even when the link
speed is downshifted to 1Gig. This patch fixes that problem.
Signed-off-by: Greg Rose <gregory.v.rose@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
drivers/net/ixgbevf/defines.h | 12 +++++++-----
drivers/net/ixgbevf/vf.c | 3 ++-
2 files changed, 9 insertions(+), 6 deletions(-)
diff --git a/drivers/net/ixgbevf/defines.h b/drivers/net/ixgbevf/defines.h
index c44fdb0..ca2c81f 100644
--- a/drivers/net/ixgbevf/defines.h
+++ b/drivers/net/ixgbevf/defines.h
@@ -41,11 +41,13 @@ typedef u32 ixgbe_link_speed;
#define IXGBE_LINK_SPEED_1GB_FULL 0x0020
#define IXGBE_LINK_SPEED_10GB_FULL 0x0080
-#define IXGBE_CTRL_RST 0x04000000 /* Reset (SW) */
-#define IXGBE_RXDCTL_ENABLE 0x02000000 /* Enable specific Rx Queue */
-#define IXGBE_TXDCTL_ENABLE 0x02000000 /* Enable specific Tx Queue */
-#define IXGBE_LINKS_UP 0x40000000
-#define IXGBE_LINKS_SPEED 0x20000000
+#define IXGBE_CTRL_RST 0x04000000 /* Reset (SW) */
+#define IXGBE_RXDCTL_ENABLE 0x02000000 /* Enable specific Rx Queue */
+#define IXGBE_TXDCTL_ENABLE 0x02000000 /* Enable specific Tx Queue */
+#define IXGBE_LINKS_UP 0x40000000
+#define IXGBE_LINKS_SPEED_82599 0x30000000
+#define IXGBE_LINKS_SPEED_10G_82599 0x30000000
+#define IXGBE_LINKS_SPEED_1G_82599 0x20000000
/* Number of Transmit and Receive Descriptors must be a multiple of 8 */
#define IXGBE_REQ_TX_DESCRIPTOR_MULTIPLE 8
diff --git a/drivers/net/ixgbevf/vf.c b/drivers/net/ixgbevf/vf.c
index 852e9c4..f6f9299 100644
--- a/drivers/net/ixgbevf/vf.c
+++ b/drivers/net/ixgbevf/vf.c
@@ -359,7 +359,8 @@ static s32 ixgbevf_check_mac_link_vf(struct ixgbe_hw *hw,
else
*link_up = false;
- if (links_reg & IXGBE_LINKS_SPEED)
+ if ((links_reg & IXGBE_LINKS_SPEED_82599) ==
+ IXGBE_LINKS_SPEED_10G_82599)
*speed = IXGBE_LINK_SPEED_10GB_FULL;
else
*speed = IXGBE_LINK_SPEED_1GB_FULL;
^ permalink raw reply related
* [net-next-2.6 PATCH] ixgbe: Properly display 1 gig downshift warning for backplane
From: Jeff Kirsher @ 2010-04-27 21:31 UTC (permalink / raw)
To: davem; +Cc: netdev, gospo, Anjali Singhai, Jeff Kirsher
From: Anjali Singhai <anjali.singhai@intel.com>
Description: When using Intel smartspeed, the patch displays a
warning when the link down shifts to 1 Gig.
Signed-off-by: Anjali Singhai <anjali.singhai@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
drivers/net/ixgbe/ixgbe_82599.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/drivers/net/ixgbe/ixgbe_82599.c b/drivers/net/ixgbe/ixgbe_82599.c
index d189ba7..38c3840 100644
--- a/drivers/net/ixgbe/ixgbe_82599.c
+++ b/drivers/net/ixgbe/ixgbe_82599.c
@@ -642,6 +642,7 @@ static s32 ixgbe_setup_mac_link_smartspeed(struct ixgbe_hw *hw,
s32 i, j;
bool link_up = false;
u32 autoc_reg = IXGBE_READ_REG(hw, IXGBE_AUTOC);
+ struct ixgbe_adapter *adapter = hw->back;
hw_dbg(hw, "ixgbe_setup_mac_link_smartspeed.\n");
@@ -726,6 +727,10 @@ static s32 ixgbe_setup_mac_link_smartspeed(struct ixgbe_hw *hw,
autoneg_wait_to_complete);
out:
+ if (link_up && (link_speed == IXGBE_LINK_SPEED_1GB_FULL))
+ netif_info(adapter, hw, adapter->netdev, "Smartspeed has"
+ " downgraded the link speed from the maximum"
+ " advertised\n");
return status;
}
^ permalink raw reply related
* [net-next-2.6 PATCH] ixgbe: cleanup ethtool autoneg input
From: Jeff Kirsher @ 2010-04-27 21:31 UTC (permalink / raw)
To: davem; +Cc: netdev, gospo, Don Skidmore, Jeff Kirsher
From: Don Skidmore <donald.c.skidmore@intel.com>
The way we were setting autoneg via ethtool was inconstant with that
of our other drivers. It will change the following:
If autoneg is off:
>ethtool -a eth0
Pause parameters for eth0:
Autonegotiate: off
RX: off
TX: off
Before:
>ethtool -A eth0 autoneg on
>ethtool -a eth0
Pause parameters for eth0:
Autonegotiate: off
RX: off
TX: off
Now:
>ethtool -A eth0 autoneg on
>ethtool -a eth0
Pause parameters for eth0:
Autonegotiate: on
RX: on
TX: on
Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
drivers/net/ixgbe/ixgbe_ethtool.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/net/ixgbe/ixgbe_ethtool.c b/drivers/net/ixgbe/ixgbe_ethtool.c
index 5f8c6ab..dfbfe35 100644
--- a/drivers/net/ixgbe/ixgbe_ethtool.c
+++ b/drivers/net/ixgbe/ixgbe_ethtool.c
@@ -365,7 +365,7 @@ static int ixgbe_set_pauseparam(struct net_device *netdev,
else
fc.disable_fc_autoneg = false;
- if (pause->rx_pause && pause->tx_pause)
+ if ((pause->rx_pause && pause->tx_pause) || pause->autoneg)
fc.requested_mode = ixgbe_fc_full;
else if (pause->rx_pause && !pause->tx_pause)
fc.requested_mode = ixgbe_fc_rx_pause;
^ permalink raw reply related
* [PATCH 1/3] bnx2: Fix lost MSI-X problem on 5709 NICs.
From: Michael Chan @ 2010-04-27 21:28 UTC (permalink / raw)
To: davem; +Cc: netdev, gospo, jfeeney
It has been reported that under certain heavy traffic conditions in MSI-X
mode, the driver can lose an MSI-X vector causing all packets in the
associated rx/tx ring pair to be dropped. The problem is caused by
the chip dropping the write to unmask the MSI-X vector by the kernel
(when migrating the IRQ for example).
This can be prevented by increasing the GRC timeout value for these
register read and write operations.
Thanks to Dell for helping us debug this problem.
Signed-off-by: Michael Chan <mchan@broadcom.com>
---
drivers/net/bnx2.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c
index a257bab..4c1e51e 100644
--- a/drivers/net/bnx2.c
+++ b/drivers/net/bnx2.c
@@ -4759,8 +4759,12 @@ bnx2_reset_chip(struct bnx2 *bp, u32 reset_code)
rc = bnx2_alloc_bad_rbuf(bp);
}
- if (bp->flags & BNX2_FLAG_USING_MSIX)
+ if (bp->flags & BNX2_FLAG_USING_MSIX) {
bnx2_setup_msix_tbl(bp);
+ /* Prevent MSIX table reads and write from timing out */
+ REG_WR(bp, BNX2_MISC_ECO_HW_CTL,
+ BNX2_MISC_ECO_HW_CTL_LARGE_GRC_TMOUT_EN);
+ }
return rc;
}
--
1.6.4.GIT
^ permalink raw reply related
* [PATCH 3/3] bnx2: Update version to 2.0.9.
From: Michael Chan @ 2010-04-27 21:28 UTC (permalink / raw)
To: davem; +Cc: netdev, gospo, jfeeney
In-Reply-To: <1272403691-2934-2-git-send-email-mchan@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
---
drivers/net/bnx2.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c
index 35eec2d..ac90a38 100644
--- a/drivers/net/bnx2.c
+++ b/drivers/net/bnx2.c
@@ -58,8 +58,8 @@
#include "bnx2_fw.h"
#define DRV_MODULE_NAME "bnx2"
-#define DRV_MODULE_VERSION "2.0.8"
-#define DRV_MODULE_RELDATE "Feb 15, 2010"
+#define DRV_MODULE_VERSION "2.0.9"
+#define DRV_MODULE_RELDATE "April 27, 2010"
#define FW_MIPS_FILE_06 "bnx2/bnx2-mips-06-5.0.0.j6.fw"
#define FW_RV2P_FILE_06 "bnx2/bnx2-rv2p-06-5.0.0.j3.fw"
#define FW_MIPS_FILE_09 "bnx2/bnx2-mips-09-5.0.0.j9.fw"
--
1.6.4.GIT
^ permalink raw reply related
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox