* RE: [PATCH NET-2.6 1/1] qlcnic: limit skb frags for non tso packet
From: Amit Salecha @ 2011-04-13 2:01 UTC (permalink / raw)
To: David Miller
Cc: netdev@vger.kernel.org, Ameen Rahman, Anirban Chakraborty,
stable@kernel.org
In-Reply-To: <20110412.135522.71113479.davem@davemloft.net>
> From: Amit Kumar Salecha <amit.salecha@qlogic.com>
> Date: Tue, 12 Apr 2011 00:19:41 -0700
>
> > <<< No Message Collected >>>
>
> Can you PLEASE fix your email.
>
> PLEASE?
>
> Yesterday you spammed us all, and today you've sent three postings
> with this subject line.
>
> 1) One with the patch, and the proper set of CC:'s (myself, other
> qlogic engineers, netdev, and stable)
>
> 2) One with the patch, and a too short CC: list (only netdev and
> stable)
>
> 3) And now this email with no actual content and a weird message.
>
> I really can't spend my afternoons sifting through the emails that
> spam from qlogic, trying to figure out which ones I should pay
> attention to for review, and which ones are spam.
>
> Please resend properly any patches you actually want me to pay
> attention to.
>
> If you cannot make sure at this time that the patches will be sent
> without incident, sit on them until you can.
>
> Thank you.
Sorry for all this. Yesterday, 1st patch got send to all other than netdev mailing list.
So I resend that to netdev mailing list. I didn't cc all other, as they will receive duplicate email.
In all these header patch got corrupted. Our IT is working on it and soon will resolve all these problem.
I will resend patch with version 2.
-Amit
This message and any attached documents contain information from QLogic Corporation or its wholly-owned subsidiaries that may be confidential. If you are not the intended recipient, you may not read, copy, distribute, or use this information. If you have received this transmission in error, please notify the sender immediately by reply e-mail and then delete this message.
^ permalink raw reply
* Re: [PATCH net-next-2.6 v3 2/3] sctp: Add ASCONF operation on the single-homed host
From: Michio Honda @ 2011-04-13 1:32 UTC (permalink / raw)
To: Wei Yongjun; +Cc: netdev, lksctp-developers
In-Reply-To: <4DA4F8F9.2030302@cn.fujitsu.com>
Hi,
>>
>>
>> if (t)
>> asoc->peer.retran_path = t;
>> + else if (unconfirmed)
>> + asoc->peer.retran_path = t = unconfirmed;
>>
>> SCTP_DEBUG_PRINTK_IPADDR("sctp_assoc_update_retran_path:association"
>> " %p addr: "
>
> since we can not select unconfirmed transports for retransmission,
> this part is not correct. the specification forbids this due to security
> issues.
> Not sure whether you hit this bug: remove transport and left only
> one unconfirmed transport, it may cause oops while retransmit.
> I will send other patch to fix it first.
Yes, I added these 2 lines to avoid panic, I'll remove after your patch.
Thanks,
- Michio
>
>
> ...snip...
>
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
* Re: [PATCH 2/4] [RFC rev2] virtio-net changes
From: Rusty Russell @ 2011-04-13 1:28 UTC (permalink / raw)
To: Krishna Kumar, davem, mst
Cc: eric.dumazet, arnd, netdev, horms, avi, anthony, kvm,
Krishna Kumar
In-Reply-To: <20110405150852.20501.10500.sendpatchset@krkumar2.in.ibm.com>
On Tue, 05 Apr 2011 20:38:52 +0530, Krishna Kumar <krkumar2@in.ibm.com> wrote:
> Implement mq virtio-net driver.
>
> Though struct virtio_net_config changes, it works with the old
> qemu since the last element is not accessed unless qemu sets
> VIRTIO_NET_F_MULTIQUEUE.
>
> Signed-off-by: Krishna Kumar <krkumar2@in.ibm.com>
Hi Krishna!
This change looks fairly solid, but I'd prefer it split into a few
stages for clarity.
The first patch should extract out the struct send_queue and struct
receive_queue, even though there's still only one. The second patch
can then introduce VIRTIO_NET_F_MULTIQUEUE.
You could split into more parts if that makes sense, but I'd prefer to
see the mechanical changes separate from the feature addition.
> -struct virtnet_info {
> - struct virtio_device *vdev;
> - struct virtqueue *rvq, *svq, *cvq;
> - struct net_device *dev;
> +/* Internal representation of a send virtqueue */
> +struct send_queue {
> + /* Virtqueue associated with this send _queue */
> + struct virtqueue *svq;
You can simply call this vq now it's inside 'send_queue'.
> +
> + /* TX: fragments + linear part + virtio header */
> + struct scatterlist tx_sg[MAX_SKB_FRAGS + 2];
Similarly, this can just be sg.
> +static void free_receive_bufs(struct virtnet_info *vi)
> +{
> + int i;
> +
> + for (i = 0; i < vi->numtxqs; i++) {
> + BUG_ON(vi->rq[i] == NULL);
> + while (vi->rq[i]->pages)
> + __free_pages(get_a_page(vi->rq[i], GFP_KERNEL), 0);
> + }
> +}
You can skip the BUG_ON(), since the next line will have the same effect.
> +/* Free memory allocated for send and receive queues */
> +static void free_rq_sq(struct virtnet_info *vi)
> +{
> + int i;
> +
> + if (vi->rq) {
> + for (i = 0; i < vi->numtxqs; i++)
> + kfree(vi->rq[i]);
> + kfree(vi->rq);
> + }
> +
> + if (vi->sq) {
> + for (i = 0; i < vi->numtxqs; i++)
> + kfree(vi->sq[i]);
> + kfree(vi->sq);
> + }
This looks weird, even though it's correct.
I think we need a better name than numtxqs and shorter than
num_queue_pairs. Let's just use num_queues; sure, there are both tx and
rq queues, but I still think it's pretty clear.
> + for (i = 0; i < vi->numtxqs; i++) {
> + struct virtqueue *svq = vi->sq[i]->svq;
> +
> + while (1) {
> + buf = virtqueue_detach_unused_buf(svq);
> + if (!buf)
> + break;
> + dev_kfree_skb(buf);
> + }
> + }
I know this isn't your code, but it's ugly :)
while ((buf = virtqueue_detach_unused_buf(svq)) != NULL)
dev_kfree_skb(buf);
> + for (i = 0; i < vi->numtxqs; i++) {
> + struct virtqueue *rvq = vi->rq[i]->rvq;
> +
> + while (1) {
> + buf = virtqueue_detach_unused_buf(rvq);
> + if (!buf)
> + break;
Here too...
> +#define MAX_DEVICE_NAME 16
This isn't a good idea, see below.
> +static int initialize_vqs(struct virtnet_info *vi, int numtxqs)
> +{
> + vq_callback_t **callbacks;
> + struct virtqueue **vqs;
> + int i, err = -ENOMEM;
> + int totalvqs;
> + char **names;
This whole routine is really messy. How about doing find_vqs first,
then have routines like setup_rxq(), setup_txq() and setup_controlq()
would make this neater:
static int setup_rxq(struct send_queue *sq, char *name);
Also, use kasprintf() instead of kmalloc & sprintf.
> +#if 1
> + /* Allocate/initialize parameters for recv/send virtqueues */
Why is this #if 1'd?
I do prefer the #else method of doing two loops, myself (but use
kasprintf).
Cheers,
Rusty.
^ permalink raw reply
* [PATCH] sctp: fix oops while removed transport still using as retran path
From: Wei Yongjun @ 2011-04-13 1:22 UTC (permalink / raw)
To: David Miller, netdev@vger.kernel.org; +Cc: lksctp
In-Reply-To: <4DA4FA70.50506@cn.fujitsu.com>
Since we can not update retran path to unconfirmed transports,
when we remove a peer, the retran path may not be update if the
other transports are all unconfirmed, and we will still using
the removed transport as the retran path. This may cause panic
if retrasnmit happen.
Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
---
net/sctp/associola.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/net/sctp/associola.c b/net/sctp/associola.c
index 922fdd7..1a21c57 100644
--- a/net/sctp/associola.c
+++ b/net/sctp/associola.c
@@ -569,6 +569,8 @@ void sctp_assoc_rm_peer(struct sctp_association *asoc,
sctp_assoc_set_primary(asoc, transport);
if (asoc->peer.active_path == peer)
asoc->peer.active_path = transport;
+ if (asoc->peer.retran_path == peer)
+ asoc->peer.retran_path = transport;
if (asoc->peer.last_data_from == peer)
asoc->peer.last_data_from = transport;
--
1.6.5.2
^ permalink raw reply related
* [PATCH] sctp: fix oops when updating retransmit path with DEBUG on
From: Wei Yongjun @ 2011-04-13 1:20 UTC (permalink / raw)
To: David Miller, netdev@vger.kernel.org; +Cc: lksctp
From: Vlad Yasevich <vladislav.yasevich@hp.com>
commit fbdf501c9374966a56829ecca3a7f25d2b49a305
sctp: Do no select unconfirmed transports for retransmissions
Introduced the initial falt.
commit d598b166ced20d9b9281ea3527c0e18405ddb803
sctp: Make sure we always return valid retransmit path
Solved the problem, but forgot to change the DEBUG statement.
Thus it was still possible to dereference a NULL pointer.
Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
---
net/sctp/associola.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/net/sctp/associola.c b/net/sctp/associola.c
index 0698cad..922fdd7 100644
--- a/net/sctp/associola.c
+++ b/net/sctp/associola.c
@@ -1323,6 +1323,8 @@ void sctp_assoc_update_retran_path(struct sctp_association *asoc)
if (t)
asoc->peer.retran_path = t;
+ else
+ t = asoc->peer.retran_path;
SCTP_DEBUG_PRINTK_IPADDR("sctp_assoc_update_retran_path:association"
" %p addr: ",
--
1.6.5.2
^ permalink raw reply related
* Re: [PATCH net-next-2.6 v3 2/3] sctp: Add ASCONF operation on the single-homed host
From: Wei Yongjun @ 2011-04-13 1:14 UTC (permalink / raw)
To: Michio Honda; +Cc: netdev, lksctp-developers
In-Reply-To: <02627A77-8793-4EEC-9540-F2DECBB8E23A@sfc.wide.ad.jp>
Hi, Michio Honda
> SCTP can change the IP address on the single-homed host.
> In this case, the SCTP association transmits an ASCONF packet including addition of the new IP address and deletion of the old address.
> This patch implements this functionality.
>
>
...snip...
>
> @@ -1277,7 +1284,7 @@ void sctp_assoc_update(struct sctp_association *asoc,
> */
> void sctp_assoc_update_retran_path(struct sctp_association *asoc)
> {
> - struct sctp_transport *t, *next;
> + struct sctp_transport *t, *next, *unconfirmed;
> struct list_head *head = &asoc->peer.transport_addr_list;
> struct list_head *pos;
>
> @@ -1287,7 +1294,7 @@ void sctp_assoc_update_retran_path(struct sctp_association *asoc)
> /* Find the next transport in a round-robin fashion. */
> t = asoc->peer.retran_path;
> pos = &t->transports;
> - next = NULL;
> + next = unconfirmed = NULL;
>
> while (1) {
> /* Skip the head. */
> @@ -1318,11 +1325,15 @@ void sctp_assoc_update_retran_path(struct sctp_association *asoc)
> */
> if (t->state != SCTP_UNCONFIRMED && !next)
> next = t;
> + else if (t->state == SCTP_UNCONFIRMED)
> + unconfirmed = t;
> }
> }
>
> if (t)
> asoc->peer.retran_path = t;
> + else if (unconfirmed)
> + asoc->peer.retran_path = t = unconfirmed;
>
> SCTP_DEBUG_PRINTK_IPADDR("sctp_assoc_update_retran_path:association"
> " %p addr: "
since we can not select unconfirmed transports for retransmission,
this part is not correct. the specification forbids this due to security
issues.
Not sure whether you hit this bug: remove transport and left only
one unconfirmed transport, it may cause oops while retransmit.
I will send other patch to fix it first.
...snip...
^ permalink raw reply
* [PATCH net-2.6 2/2] net: Disable NETIF_F_TSO_ECN when TSO is disabled
From: Ben Hutchings @ 2011-04-13 0:47 UTC (permalink / raw)
To: David Miller; +Cc: netdev, Michał Mirosław
In-Reply-To: <1302655117.2880.33.camel@bwh-desktop>
NETIF_F_TSO_ECN has no effect when TSO is disabled; this just means
that feature state will be accurately reported to user-space.
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
---
This one is silent; I'm not sure that it's worth mentioning as the
feature flag previously had no effect on its own anyway.
Ben.
net/core/dev.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/net/core/dev.c b/net/core/dev.c
index 6401fb5..c2ac599 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -5208,6 +5208,10 @@ u32 netdev_fix_features(struct net_device *dev, u32 features)
features &= ~NETIF_F_ALL_TSO;
}
+ /* TSO ECN requires that TSO is present as well. */
+ if ((features & NETIF_F_ALL_TSO) == NETIF_F_TSO_ECN)
+ features &= ~NETIF_F_TSO_ECN;
+
/* Software GSO depends on SG. */
if ((features & NETIF_F_GSO) && !(features & NETIF_F_SG)) {
netdev_info(dev, "Dropping NETIF_F_GSO since no SG feature.\n");
--
1.7.4
--
Ben Hutchings, Senior Software Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.
^ permalink raw reply related
* [PATCH net-2.6 1/2] net: Disable all TSO features when SG is disabled
From: Ben Hutchings @ 2011-04-13 0:38 UTC (permalink / raw)
To: David Miller; +Cc: netdev, Michał Mirosław
The feature flags NETIF_F_TSO and NETIF_F_TSO6 independently enable
TSO for IPv4 and IPv6 respectively. However, the test in
netdev_fix_features() and its predecessor functions was never updated
to check for NETIF_F_TSO6, possibly because it was originally proposed
that TSO for IPv6 would be dependent on both feature flags.
Now that these feature flags can be changed independently from
user-space and we depend on netdev_fix_features() to fix invalid
feature combinations, it's important to disable them both if
scatter-gather is disabled. Also disable NETIF_F_TSO_ECN so
user-space sees all TSO features as disabled.
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
---
net/core/dev.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/net/core/dev.c b/net/core/dev.c
index 956d3b0..6401fb5 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -5203,9 +5203,9 @@ u32 netdev_fix_features(struct net_device *dev, u32 features)
}
/* TSO requires that SG is present as well. */
- if ((features & NETIF_F_TSO) && !(features & NETIF_F_SG)) {
- netdev_info(dev, "Dropping NETIF_F_TSO since no SG feature.\n");
- features &= ~NETIF_F_TSO;
+ if ((features & NETIF_F_ALL_TSO) && !(features & NETIF_F_SG)) {
+ netdev_info(dev, "Dropping TSO features since no SG feature.\n");
+ features &= ~NETIF_F_ALL_TSO;
}
/* Software GSO depends on SG. */
--
1.7.4
--
Ben Hutchings, Senior Software Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.
^ permalink raw reply related
* Re: [PATCH] ixgbe: Remove not used blink_led_start/stop code
From: Jeff Kirsher @ 2011-04-13 0:29 UTC (permalink / raw)
To: Yinghai Lu; +Cc: Brandeburg, Jesse, e1000-devel@lists.sourceforge.net, NetDev
In-Reply-To: <4DA4E099.2080206@kernel.org>
[-- Attachment #1: Type: text/plain, Size: 589 bytes --]
On Tue, 2011-04-12 at 16:30 -0700, Yinghai Lu wrote:
> There is no user for those code.
>
> Signed-off-by: Yinghai Lu <yinghai@kernel.org>
>
> ---
> drivers/net/ixgbe/ixgbe_82598.c | 2 -
> drivers/net/ixgbe/ixgbe_82599.c | 2 -
> drivers/net/ixgbe/ixgbe_common.c | 56
> ---------------------------------------
> drivers/net/ixgbe/ixgbe_common.h | 2 -
> drivers/net/ixgbe/ixgbe_type.h | 2 -
> drivers/net/ixgbe/ixgbe_x540.c | 2 -
> 6 files changed, 66 deletions(-)
Thanks for the patch, I have added the patch to my queue of ixgbe
patches.
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 490 bytes --]
^ permalink raw reply
* Re: pull request: sfc-2.6 2011-04-13
From: David Miller @ 2011-04-13 0:12 UTC (permalink / raw)
To: bhutchings; +Cc: netdev, linux-net-drivers
In-Reply-To: <1302652065.2880.28.camel@bwh-desktop>
From: Ben Hutchings <bhutchings@solarflare.com>
Date: Wed, 13 Apr 2011 00:47:45 +0100
> The following changes since commit 4a9f65f6304a00f6473e83b19c1e83caa1e42530:
>
> caif: performance bugfix - allow radio stack to prioritize packets. (2011-04-11 13:15:58 -0700)
>
> are available in the git repository at:
> git://git.kernel.org/pub/scm/linux/kernel/git/bwh/sfc-2.6.git sfc-2.6.39
>
> These fix some bugs found in internal testing.
Pulled, thanks Ben.
^ permalink raw reply
* Re: [PATCH] bridge: reset IPCB in br_parse_ip_options
From: Scot Doyle @ 2011-04-12 23:55 UTC (permalink / raw)
To: Eric Dumazet
Cc: David Miller, Stephen Hemminger, Jan Lübbe, Hiroaki SHIMODA,
netdev, Bandan Das
In-Reply-To: <1302628720.3233.84.camel@edumazet-laptop>
On 04/12/2011 12:18 PM, Eric Dumazet wrote:
> Commit 462fb2af9788a82 (bridge : Sanitize skb before it enters the IP
> stack), missed one IPCB init before calling ip_options_compile()
>
> Thanks to Scot Doyle for his tests and bug reports.
>
> Reported-by: Scot Doyle<lkml@scotdoyle.com>
> Signed-off-by: Eric Dumazet<eric.dumazet@gmail.com>
> Cc: Hiroaki SHIMODA<shimoda.hiroaki@gmail.com>
> Acked-by: Bandan Das<bandan.das@stratus.com>
> Acked-by: Stephen Hemminger<shemminger@vyatta.com>
> Cc: Jan Lübbe<jluebbe@debian.org>
> ---
> net/bridge/br_netfilter.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/net/bridge/br_netfilter.c b/net/bridge/br_netfilter.c
> index 008ff6c..b353f7c 100644
> --- a/net/bridge/br_netfilter.c
> +++ b/net/bridge/br_netfilter.c
> @@ -249,11 +249,9 @@ static int br_parse_ip_options(struct sk_buff *skb)
> goto drop;
> }
>
> - /* Zero out the CB buffer if no options present */
> - if (iph->ihl == 5) {
> - memset(IPCB(skb), 0, sizeof(struct inet_skb_parm));
> + memset(IPCB(skb), 0, sizeof(struct inet_skb_parm));
> + if (iph->ihl == 5)
> return 0;
> - }
>
> opt->optlen = iph->ihl*4 - sizeof(struct iphdr);
> if (ip_options_compile(dev_net(dev), opt, skb))
>
>
Here's the output after pulling 2.6.39-rc3, applying the patches listed
below, doing a "make clean" and hitting the bridge's assigned ip address
with the IP Stack Checker tcpsic command. Maybe I should also be
applying the patch from yesterday too? I'll try that next.
diff --git a/net/bridge/br_netfilter.c b/net/bridge/br_netfilter.c
index 008ff6c..b9bdff9 100644
--- a/net/bridge/br_netfilter.c
+++ b/net/bridge/br_netfilter.c
@@ -249,11 +249,9 @@ static int br_parse_ip_options(struct sk_buff *skb)
goto drop;
}
- /* Zero out the CB buffer if no options present */
- if (iph->ihl == 5) {
- memset(IPCB(skb), 0, sizeof(struct inet_skb_parm));
- return 0;
- }
+ memset(IPCB(skb), 0, sizeof(struct inet_skb_parm));
+ if (iph->ihl == 5)
+ return 0;
opt->optlen = iph->ihl*4 - sizeof(struct iphdr);
if (ip_options_compile(dev_net(dev), opt, skb))
diff --git a/net/ipv4/inetpeer.c b/net/ipv4/inetpeer.c
index dd1b20e..9df4e63 100644
--- a/net/ipv4/inetpeer.c
+++ b/net/ipv4/inetpeer.c
@@ -354,7 +354,8 @@ static void inetpeer_free_rcu(struct rcu_head *head)
}
/* May be called with local BH enabled. */
-static void unlink_from_pool(struct inet_peer *p, struct inet_peer_base
*base)
+static void unlink_from_pool(struct inet_peer *p, struct inet_peer_base
*base,
+ struct inet_peer __rcu **stack[PEER_MAXDEPTH])
{
int do_free;
@@ -368,7 +369,6 @@ static void unlink_from_pool(struct inet_peer *p,
struct inet_peer_base *base)
* We use refcnt=-1 to alert lockless readers this entry is
deleted.
*/
if (atomic_cmpxchg(&p->refcnt, 1, -1) == 1) {
- struct inet_peer __rcu **stack[PEER_MAXDEPTH];
struct inet_peer __rcu ***stackptr, ***delp;
if (lookup(&p->daddr, stack, base) != p)
BUG();
@@ -422,7 +422,7 @@ static struct inet_peer_base *peer_to_base(struct
inet_peer *p)
}
/* May be called with local BH enabled. */
-static int cleanup_once(unsigned long ttl)
+static int cleanup_once(unsigned long ttl, struct inet_peer __rcu
**stack[PEER_MAXDEPTH])
{
struct inet_peer *p = NULL;
@@ -454,7 +454,7 @@ static int cleanup_once(unsigned long ttl)
* happen because of entry limits in route cache. */
return -1;
- unlink_from_pool(p, peer_to_base(p));
+ unlink_from_pool(p, peer_to_base(p), stack);
return 0;
}
@@ -524,7 +524,7 @@ struct inet_peer *inet_getpeer(struct inetpeer_addr
*daddr, int create)
if (base->total >= inet_peer_threshold)
/* Remove one less-recently-used entry. */
- cleanup_once(0);
+ cleanup_once(0, stack);
return p;
}
@@ -540,6 +540,7 @@ static void peer_check_expire(unsigned long dummy)
{
unsigned long now = jiffies;
int ttl, total;
+ struct inet_peer __rcu **stack[PEER_MAXDEPTH];
total = compute_total();
if (total >= inet_peer_threshold)
@@ -548,7 +549,7 @@ static void peer_check_expire(unsigned long dummy)
ttl = inet_peer_maxttl
- (inet_peer_maxttl - inet_peer_minttl)
/ HZ *
total / inet_peer_threshold * HZ;
- while (!cleanup_once(ttl)) {
+ while (!cleanup_once(ttl, stack)) {
if (jiffies != now)
break;
}
diff --git a/net/ipv4/ip_options.c b/net/ipv4/ip_options.c
index 28a736f..dea9947 100644
--- a/net/ipv4/ip_options.c
+++ b/net/ipv4/ip_options.c
@@ -200,6 +200,11 @@ int ip_options_echo(struct ip_options * dopt,
struct sk_buff * skb)
*dptr++ = IPOPT_END;
dopt->optlen++;
}
+ if (unlikely(dopt->optlen > 40)) {
+ pr_err("ip_options_echo() fatal error optlen=%u > 40\n",
dopt->optlen);
+ print_hex_dump(KERN_ERR, "ip options: ", DUMP_PREFIX_OFFSET,
+ 16, 1, dopt->__data, dopt->optlen, false);
+ }
return 0;
}
------------
[ 761.720393] BUG: unable to handle kernel NULL pointer dereference at
00000000000000d0
[ 761.728206] IP: [<ffffffff8129fbe9>] ip_options_compile+0x1c1/0x435
[ 761.734452] PGD 0
[ 761.736459] Oops: 0000 [#1] SMP
[ 761.739683] last sysfs file: /sys/devices/virtual/misc/kvm/uevent
[ 761.745744] CPU 0
[ 761.747570] Modules linked in: kvm_intel kvm bridge stp loop snd_pcm
snd_timer snd tpm_tis tpm tpm_bios soundcore psmouse snd_page_alloc
processor ghes thermal_sys
i7core_edac evdev pcspkr serio_raw edac_core dcdbas power_meter button
hed ext2 mbcache dm_mod raid1 md_mod sd_mod crc_t10dif usb_storage uas
uhci_hcd ehci_hcd mpt2sas
scsi_transport_sas raid_class igb scsi_mod usbcore bnx2 dca [last
unloaded: scsi_wait_scan]
[ 761.785171]
[ 761.786651] Pid: 0, comm: swapper Not tainted 2.6.39-rc3+ #14 Dell
Inc. PowerEdge R510/0DPRKF
[ 761.795157] RIP: 0010:[<ffffffff8129fbe9>] [<ffffffff8129fbe9>]
ip_options_compile+0x1c1/0x435
[ 761.803823] RSP: 0018:ffff88042f203af0 EFLAGS: 00010286
[ 761.809106] RAX: 0000000000000017 RBX: ffff8804027b3600 RCX:
ffff88040466a864
[ 761.816205] RDX: 000000000000001a RSI: 0000000000000000 RDI:
ffffffff817e6100
[ 761.823304] RBP: ffff88040466a862 R08: ffffffffa01d6e89 R09:
ffff88042f203c58
[ 761.830402] R10: 0000000000000000 R11: 0000000000000000 R12:
ffff8804027b3628
[ 761.837501] R13: 000000000000001d R14: ffff88040466a84e R15:
0000000000000024
[ 761.844601] FS: 0000000000000000(0000) GS:ffff88042f200000(0000)
knlGS:0000000000000000
[ 761.852650] CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b
[ 761.858365] CR2: 00000000000000d0 CR3: 0000000001603000 CR4:
00000000000006f0
[ 761.865463] DR0: 0000000000000000 DR1: 0000000000000000 DR2:
0000000000000000
[ 761.872562] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7:
0000000000000400
[ 761.879661] Process swapper (pid: 0, threadinfo ffffffff81600000,
task ffffffff8160b020)
[ 761.887710] Stack:
[ 761.889708] 0000000000000000 ffffffff81276928 0000000000000000
ffffffff817e6100
[ 761.897102] 000000000000004e ffff88040500e600 ffff88040500e600
ffff8804027b3600
[ 761.904496] ffff880404fc0000 ffff8804027b3628 0000000000000000
ffff880404fc0000
[ 761.911889] Call Trace:
[ 761.914319] <IRQ>
[ 761.916413] [<ffffffff81276928>] ? netif_receive_skb+0x52/0x58
[ 761.922306] [<ffffffffa01dae3b>] ? br_parse_ip_options+0x134/0x1a8
[bridge]
[ 761.929319] [<ffffffffa01dbbe0>] ? br_nf_pre_routing+0x348/0x3cb
[bridge]
[ 761.936160] [<ffffffff81298527>] ? nf_iterate+0x41/0x7e
[ 761.941444] [<ffffffff8104afaa>] ? irq_exit+0x58/0x8f
[ 761.946556] [<ffffffffa01d6e89>] ? NF_HOOK.clone.4+0x56/0x56 [bridge]
[ 761.953052] [<ffffffffa01d6e89>] ? NF_HOOK.clone.4+0x56/0x56 [bridge]
[ 761.959546] [<ffffffff812985d7>] ? nf_hook_slow+0x73/0x114
[ 761.965089] [<ffffffffa01d6e89>] ? NF_HOOK.clone.4+0x56/0x56 [bridge]
[ 761.971583] [<ffffffff8126d097>] ? __netdev_alloc_skb+0x15/0x2f
[ 761.977561] [<ffffffffa01d6e89>] ? NF_HOOK.clone.4+0x56/0x56 [bridge]
[ 761.984055] [<ffffffffa01d6e6f>] ? NF_HOOK.clone.4+0x3c/0x56 [bridge]
[ 761.990551] [<ffffffff812a7dde>] ? tcp_gro_receive+0xa1/0x204
[ 761.996355] [<ffffffffa01d71e5>] ? br_handle_frame+0x195/0x1ac [bridge]
[ 762.003022] [<ffffffffa01d7050>] ?
br_handle_frame_finish+0x1c7/0x1c7 [bridge]
[ 762.010294] [<ffffffff812764ef>] ? __netif_receive_skb+0x2a7/0x450
[ 762.016530] [<ffffffff81276928>] ? netif_receive_skb+0x52/0x58
[ 762.022420] [<ffffffff81276e2a>] ? napi_gro_receive+0x1f/0x2f
[ 762.028222] [<ffffffff812769ff>] ? napi_skb_finish+0x1c/0x31
[ 762.033941] [<ffffffffa024afcd>] ? igb_poll+0x6d9/0x9ee [igb]
[ 762.039744] [<ffffffff8109034f>] ? handle_irq_event+0x40/0x55
[ 762.045547] [<ffffffff8106fc3c>] ? arch_local_irq_save+0x14/0x1d
[ 762.051609] [<ffffffff81276f55>] ? net_rx_action+0xa4/0x1b1
[ 762.057239] [<ffffffff8104ad26>] ? __do_softirq+0xb8/0x176
[ 762.062783] [<ffffffff81333cdc>] ? call_softirq+0x1c/0x30
[ 762.068241] [<ffffffff8100aa57>] ? do_softirq+0x3f/0x84
[ 762.073524] [<ffffffff8104af91>] ? irq_exit+0x3f/0x8f
[ 762.078635] [<ffffffff8100a793>] ? do_IRQ+0x85/0x9e
[ 762.083575] [<ffffffff8132cc53>] ? common_interrupt+0x13/0x13
[ 762.089375] <EOI>
[ 762.091469] [<ffffffff81061348>] ? enqueue_hrtimer+0x3f/0x53
[ 762.097188] [<ffffffffa0430417>] ? arch_local_irq_enable+0x7/0x8
[processor]
[ 762.104288] [<ffffffffa0430dab>] ? acpi_idle_enter_c1+0x86/0xa2
[processor]
[ 762.111303] [<ffffffff8125d05d>] ? cpuidle_idle_call+0xf4/0x17e
[ 762.117277] [<ffffffff81008298>] ? cpu_idle+0xa2/0xc4
[ 762.122388] [<ffffffff8169db60>] ? start_kernel+0x3b9/0x3c4
[ 762.128018] [<ffffffff8169d3c6>] ? x86_64_start_kernel+0x102/0x10f
[ 762.134253] Code: 4d 02 3c 03 0f 86 59 02 00 00 0f b6 d0 44 39 ea 7f
32 83 c2 03 44 39 ea 0f 8f 45 02 00 00 48 85 db 74 18 48 8b 74 24 10 0f
b6 c0 <8b> 96 d0 00 00 00 89 54 05 ff 41 80 4c 24 08 04 80 01 04 41 80
[ 762.153593] RIP [<ffffffff8129fbe9>] ip_options_compile+0x1c1/0x435
[ 762.159923] RSP <ffff88042f203af0>
[ 762.163391] CR2: 00000000000000d0
[ 762.167017] ---[ end trace e15d7b082f680b62 ]---
^ permalink raw reply related
* Re: [PATCH 2/3] MIPS: lantiq: add ethernet driver
From: Stephen Hemminger @ 2011-04-12 23:54 UTC (permalink / raw)
To: John Crispin; +Cc: Ralf Baechle, Ralph Hempel, linux-mips, netdev
In-Reply-To: <1302624675-18652-3-git-send-email-blogic@openwrt.org>
On Tue, 12 Apr 2011 18:11:14 +0200
John Crispin <blogic@openwrt.org> wrote:
> +
> +struct ltq_mii_priv {
> + struct ltq_eth_data *pldata;
> + struct resource *res;
> + struct net_device_stats stats;
You don't need to have private stats structure it is part
of net_device in recent kernels. In fact, since you don't
set .ndo_get_stats, the driver is getting the default function
which prints the values from network_device, not your priv structure.
Also, please consider adding basic ethtool support to
show speed/duplex and driver information.
--
^ permalink raw reply
* [PATCH net-2.6 3/3] sfc: Use rmb() to ensure reads occur in order
From: Ben Hutchings @ 2011-04-12 23:50 UTC (permalink / raw)
To: David Miller; +Cc: netdev, linux-net-drivers
In-Reply-To: <1302652065.2880.28.camel@bwh-desktop>
From: Neil Turton <nturton@solarflare.com>
Enabling write-combining may also enable read reordering. The BIU is
only guaranteed to read from a 128-bit CSR or 64-bit SRAM word when
the host reads from its lowest address; otherwise the BIU may use the
latched value. Therefore we need to reinstate the read memory
barriers after the first read operation for each CSR or SRAM word.
Signed-off-by; Ben Hutchings <bhutchings@solarflare.com>
---
drivers/net/sfc/io.h | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/drivers/net/sfc/io.h b/drivers/net/sfc/io.h
index d9d8c2e..cc97880 100644
--- a/drivers/net/sfc/io.h
+++ b/drivers/net/sfc/io.h
@@ -152,6 +152,7 @@ static inline void efx_reado(struct efx_nic *efx, efx_oword_t *value,
spin_lock_irqsave(&efx->biu_lock, flags);
value->u32[0] = _efx_readd(efx, reg + 0);
+ rmb();
value->u32[1] = _efx_readd(efx, reg + 4);
value->u32[2] = _efx_readd(efx, reg + 8);
value->u32[3] = _efx_readd(efx, reg + 12);
@@ -174,6 +175,7 @@ static inline void efx_sram_readq(struct efx_nic *efx, void __iomem *membase,
value->u64[0] = (__force __le64)__raw_readq(membase + addr);
#else
value->u32[0] = (__force __le32)__raw_readl(membase + addr);
+ rmb();
value->u32[1] = (__force __le32)__raw_readl(membase + addr + 4);
#endif
spin_unlock_irqrestore(&efx->biu_lock, flags);
--
1.7.4
--
Ben Hutchings, Senior Software Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.
^ permalink raw reply related
* [PATCH net-2.6 2/3] sfc: Do not use efx_process_channel_now() in online self-test
From: Ben Hutchings @ 2011-04-12 23:50 UTC (permalink / raw)
To: David Miller; +Cc: netdev, linux-net-drivers
In-Reply-To: <1302652065.2880.28.camel@bwh-desktop>
During self-tests we use efx_process_channel_now() to handle
completion and other events synchronously. This disables interrupts
and NAPI processing for the channel in question, but it may still be
interrupted by another channel. A single socket may receive packets
from multiple net devices or even multiple channels of the same net
device, so this can result in deadlock on a socket lock.
Receiving packets in process context will also result in incorrect
classification by the network cgroup classifier.
Therefore, we must only use efx_process_channel_now() in the offline
loopback tests (which never deliver packets up the stack) and not for
the online interrupt and event tests.
For the interrupt test, there is no reason to process events. We
only care that an interrupt is raised.
For the event test, we want to know whether events have been received,
and there may be many events ahead of the one we inject. Therefore
remove efx_channel::magic_count and instead test whether
efx_channel::eventq_read_ptr advances. This is currently an event
queue index and might wrap around to exactly the same value, resulting
in a false negative. Therefore move the masking to efx_event() and
efx_nic_eventq_read_ack() so that it cannot wrap within the time of
the test.
The event test also tries to diagnose failures by checking whether an
event was delivered without causing an interrupt. Add and use a
helper function that only does this.
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
---
drivers/net/sfc/efx.c | 4 +++-
drivers/net/sfc/net_driver.h | 2 --
drivers/net/sfc/nic.c | 22 +++++++++++++++-------
drivers/net/sfc/nic.h | 1 +
drivers/net/sfc/selftest.c | 23 ++++-------------------
5 files changed, 23 insertions(+), 29 deletions(-)
diff --git a/drivers/net/sfc/efx.c b/drivers/net/sfc/efx.c
index 0dc800b..a3c2aab 100644
--- a/drivers/net/sfc/efx.c
+++ b/drivers/net/sfc/efx.c
@@ -328,7 +328,8 @@ static int efx_poll(struct napi_struct *napi, int budget)
* processing to finish, then directly poll (and ack ) the eventq.
* Finally reenable NAPI and interrupts.
*
- * Since we are touching interrupts the caller should hold the suspend lock
+ * This is for use only during a loopback self-test. It must not
+ * deliver any packets up the stack as this can result in deadlock.
*/
void efx_process_channel_now(struct efx_channel *channel)
{
@@ -336,6 +337,7 @@ void efx_process_channel_now(struct efx_channel *channel)
BUG_ON(channel->channel >= efx->n_channels);
BUG_ON(!channel->enabled);
+ BUG_ON(!efx->loopback_selftest);
/* Disable interrupts and wait for ISRs to complete */
efx_nic_disable_interrupts(efx);
diff --git a/drivers/net/sfc/net_driver.h b/drivers/net/sfc/net_driver.h
index 9ffa9a6..191a311 100644
--- a/drivers/net/sfc/net_driver.h
+++ b/drivers/net/sfc/net_driver.h
@@ -330,7 +330,6 @@ enum efx_rx_alloc_method {
* @eventq_mask: Event queue pointer mask
* @eventq_read_ptr: Event queue read pointer
* @last_eventq_read_ptr: Last event queue read pointer value.
- * @magic_count: Event queue test event count
* @irq_count: Number of IRQs since last adaptive moderation decision
* @irq_mod_score: IRQ moderation score
* @rx_alloc_level: Watermark based heuristic counter for pushing descriptors
@@ -360,7 +359,6 @@ struct efx_channel {
unsigned int eventq_mask;
unsigned int eventq_read_ptr;
unsigned int last_eventq_read_ptr;
- unsigned int magic_count;
unsigned int irq_count;
unsigned int irq_mod_score;
diff --git a/drivers/net/sfc/nic.c b/drivers/net/sfc/nic.c
index e839661..10f1cb7 100644
--- a/drivers/net/sfc/nic.c
+++ b/drivers/net/sfc/nic.c
@@ -84,7 +84,8 @@ static inline void efx_write_buf_tbl(struct efx_nic *efx, efx_qword_t *value,
static inline efx_qword_t *efx_event(struct efx_channel *channel,
unsigned int index)
{
- return ((efx_qword_t *) (channel->eventq.addr)) + index;
+ return ((efx_qword_t *) (channel->eventq.addr)) +
+ (index & channel->eventq_mask);
}
/* See if an event is present
@@ -673,7 +674,8 @@ void efx_nic_eventq_read_ack(struct efx_channel *channel)
efx_dword_t reg;
struct efx_nic *efx = channel->efx;
- EFX_POPULATE_DWORD_1(reg, FRF_AZ_EVQ_RPTR, channel->eventq_read_ptr);
+ EFX_POPULATE_DWORD_1(reg, FRF_AZ_EVQ_RPTR,
+ channel->eventq_read_ptr & channel->eventq_mask);
efx_writed_table(efx, ®, efx->type->evq_rptr_tbl_base,
channel->channel);
}
@@ -908,7 +910,7 @@ efx_handle_generated_event(struct efx_channel *channel, efx_qword_t *event)
code = EFX_QWORD_FIELD(*event, FSF_AZ_DRV_GEN_EV_MAGIC);
if (code == EFX_CHANNEL_MAGIC_TEST(channel))
- ++channel->magic_count;
+ ; /* ignore */
else if (code == EFX_CHANNEL_MAGIC_FILL(channel))
/* The queue must be empty, so we won't receive any rx
* events, so efx_process_channel() won't refill the
@@ -1015,8 +1017,7 @@ int efx_nic_process_eventq(struct efx_channel *channel, int budget)
/* Clear this event by marking it all ones */
EFX_SET_QWORD(*p_event);
- /* Increment read pointer */
- read_ptr = (read_ptr + 1) & channel->eventq_mask;
+ ++read_ptr;
ev_code = EFX_QWORD_FIELD(event, FSF_AZ_EV_CODE);
@@ -1060,6 +1061,13 @@ out:
return spent;
}
+/* Check whether an event is present in the eventq at the current
+ * read pointer. Only useful for self-test.
+ */
+bool efx_nic_event_present(struct efx_channel *channel)
+{
+ return efx_event_present(efx_event(channel, channel->eventq_read_ptr));
+}
/* Allocate buffer table entries for event queue */
int efx_nic_probe_eventq(struct efx_channel *channel)
@@ -1165,7 +1173,7 @@ static void efx_poll_flush_events(struct efx_nic *efx)
struct efx_tx_queue *tx_queue;
struct efx_rx_queue *rx_queue;
unsigned int read_ptr = channel->eventq_read_ptr;
- unsigned int end_ptr = (read_ptr - 1) & channel->eventq_mask;
+ unsigned int end_ptr = read_ptr + channel->eventq_mask - 1;
do {
efx_qword_t *event = efx_event(channel, read_ptr);
@@ -1205,7 +1213,7 @@ static void efx_poll_flush_events(struct efx_nic *efx)
* it's ok to throw away every non-flush event */
EFX_SET_QWORD(*event);
- read_ptr = (read_ptr + 1) & channel->eventq_mask;
+ ++read_ptr;
} while (read_ptr != end_ptr);
channel->eventq_read_ptr = read_ptr;
diff --git a/drivers/net/sfc/nic.h b/drivers/net/sfc/nic.h
index d9de1b6..a42db6e 100644
--- a/drivers/net/sfc/nic.h
+++ b/drivers/net/sfc/nic.h
@@ -184,6 +184,7 @@ extern void efx_nic_fini_eventq(struct efx_channel *channel);
extern void efx_nic_remove_eventq(struct efx_channel *channel);
extern int efx_nic_process_eventq(struct efx_channel *channel, int rx_quota);
extern void efx_nic_eventq_read_ack(struct efx_channel *channel);
+extern bool efx_nic_event_present(struct efx_channel *channel);
/* MAC/PHY */
extern void falcon_drain_tx_fifo(struct efx_nic *efx);
diff --git a/drivers/net/sfc/selftest.c b/drivers/net/sfc/selftest.c
index 8458084..50ad3bc 100644
--- a/drivers/net/sfc/selftest.c
+++ b/drivers/net/sfc/selftest.c
@@ -131,8 +131,6 @@ static int efx_test_chip(struct efx_nic *efx, struct efx_self_tests *tests)
static int efx_test_interrupts(struct efx_nic *efx,
struct efx_self_tests *tests)
{
- struct efx_channel *channel;
-
netif_dbg(efx, drv, efx->net_dev, "testing interrupts\n");
tests->interrupt = -1;
@@ -140,15 +138,6 @@ static int efx_test_interrupts(struct efx_nic *efx,
efx->last_irq_cpu = -1;
smp_wmb();
- /* ACK each interrupting event queue. Receiving an interrupt due to
- * traffic before a test event is raised is considered a pass */
- efx_for_each_channel(channel, efx) {
- if (channel->work_pending)
- efx_process_channel_now(channel);
- if (efx->last_irq_cpu >= 0)
- goto success;
- }
-
efx_nic_generate_interrupt(efx);
/* Wait for arrival of test interrupt. */
@@ -173,13 +162,13 @@ static int efx_test_eventq_irq(struct efx_channel *channel,
struct efx_self_tests *tests)
{
struct efx_nic *efx = channel->efx;
- unsigned int magic_count, count;
+ unsigned int read_ptr, count;
tests->eventq_dma[channel->channel] = -1;
tests->eventq_int[channel->channel] = -1;
tests->eventq_poll[channel->channel] = -1;
- magic_count = channel->magic_count;
+ read_ptr = channel->eventq_read_ptr;
channel->efx->last_irq_cpu = -1;
smp_wmb();
@@ -190,10 +179,7 @@ static int efx_test_eventq_irq(struct efx_channel *channel,
do {
schedule_timeout_uninterruptible(HZ / 100);
- if (channel->work_pending)
- efx_process_channel_now(channel);
-
- if (channel->magic_count != magic_count)
+ if (ACCESS_ONCE(channel->eventq_read_ptr) != read_ptr)
goto eventq_ok;
} while (++count < 2);
@@ -211,8 +197,7 @@ static int efx_test_eventq_irq(struct efx_channel *channel,
}
/* Check to see if event was received even if interrupt wasn't */
- efx_process_channel_now(channel);
- if (channel->magic_count != magic_count) {
+ if (efx_nic_event_present(channel)) {
netif_err(efx, drv, efx->net_dev,
"channel %d event was generated, but "
"failed to trigger an interrupt\n", channel->channel);
--
1.7.4
--
Ben Hutchings, Senior Software Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.
^ permalink raw reply related
* [PATCH net-2.6 1/3] sfc: Stop the TX queues during loopback self-tests
From: Ben Hutchings @ 2011-04-12 23:49 UTC (permalink / raw)
To: David Miller; +Cc: netdev, linux-net-drivers
In-Reply-To: <1302652065.2880.28.camel@bwh-desktop>
From: Neil Turton <nturton@solarflare.com>
If the TX queues are running during loopback self tests, host
traffic gets looped back which causes the test to fail. Avoid
restarting the TX queues after the port reset so that any packets
sent by the host get held back until after the tests have completed.
[bwh: Also wake all TX queues at the end of self-tests.]
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
---
drivers/net/sfc/efx.c | 2 +-
drivers/net/sfc/selftest.c | 2 ++
drivers/net/sfc/tx.c | 3 ++-
3 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/drivers/net/sfc/efx.c b/drivers/net/sfc/efx.c
index d890679..0dc800b 100644
--- a/drivers/net/sfc/efx.c
+++ b/drivers/net/sfc/efx.c
@@ -1436,7 +1436,7 @@ static void efx_start_all(struct efx_nic *efx)
* restart the transmit interface early so the watchdog timer stops */
efx_start_port(efx);
- if (efx_dev_registered(efx))
+ if (efx_dev_registered(efx) && !efx->port_inhibited)
netif_tx_wake_all_queues(efx->net_dev);
efx_for_each_channel(channel, efx)
diff --git a/drivers/net/sfc/selftest.c b/drivers/net/sfc/selftest.c
index a0f49b3..8458084 100644
--- a/drivers/net/sfc/selftest.c
+++ b/drivers/net/sfc/selftest.c
@@ -770,6 +770,8 @@ int efx_selftest(struct efx_nic *efx, struct efx_self_tests *tests,
__efx_reconfigure_port(efx);
mutex_unlock(&efx->mac_lock);
+ netif_tx_wake_all_queues(efx->net_dev);
+
return rc_test;
}
diff --git a/drivers/net/sfc/tx.c b/drivers/net/sfc/tx.c
index 1398019..d2c85df 100644
--- a/drivers/net/sfc/tx.c
+++ b/drivers/net/sfc/tx.c
@@ -435,7 +435,8 @@ void efx_xmit_done(struct efx_tx_queue *tx_queue, unsigned int index)
* queue state. */
smp_mb();
if (unlikely(netif_tx_queue_stopped(tx_queue->core_txq)) &&
- likely(efx->port_enabled)) {
+ likely(efx->port_enabled) &&
+ likely(!efx->port_inhibited)) {
fill_level = tx_queue->insert_count - tx_queue->read_count;
if (fill_level < EFX_TXQ_THRESHOLD(efx)) {
EFX_BUG_ON_PARANOID(!efx_dev_registered(efx));
--
1.7.4
--
Ben Hutchings, Senior Software Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.
^ permalink raw reply related
* pull request: sfc-2.6 2011-04-13
From: Ben Hutchings @ 2011-04-12 23:47 UTC (permalink / raw)
To: David Miller; +Cc: netdev, sf-linux-drivers
The following changes since commit 4a9f65f6304a00f6473e83b19c1e83caa1e42530:
caif: performance bugfix - allow radio stack to prioritize packets. (2011-04-11 13:15:58 -0700)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/bwh/sfc-2.6.git sfc-2.6.39
These fix some bugs found in internal testing.
Ben.
Ben Hutchings (1):
sfc: Do not use efx_process_channel_now() in online self-test
Neil Turton (2):
sfc: Stop the TX queues during loopback self-tests
sfc: Use rmb() to ensure reads occur in order
drivers/net/sfc/efx.c | 6 ++++--
drivers/net/sfc/io.h | 2 ++
drivers/net/sfc/net_driver.h | 2 --
drivers/net/sfc/nic.c | 22 +++++++++++++++-------
drivers/net/sfc/nic.h | 1 +
drivers/net/sfc/selftest.c | 25 ++++++-------------------
drivers/net/sfc/tx.c | 3 ++-
7 files changed, 30 insertions(+), 31 deletions(-)
--
Ben Hutchings, Senior Software Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.
^ permalink raw reply
* Re: [Bugme-new] [Bug 32832] New: shutdown(2) does not fully shut down socket any more
From: Andrew Morton @ 2011-04-12 23:41 UTC (permalink / raw)
To: David Miller
Cc: netdev, bugzilla-daemon, bugme-daemon, kees, Stephen Hemminger
In-Reply-To: <20110412.161744.27803776.davem@davemloft.net>
On Tue, 12 Apr 2011 16:17:44 -0700 (PDT)
David Miller <davem@davemloft.net> wrote:
> From: Andrew Morton <akpm@linux-foundation.org>
> Date: Tue, 12 Apr 2011 16:15:56 -0700
>
> >
> > (switched to email. Please respond via emailed reply-to-all, not via the
> > bugzilla web interface).
>
> Stephen Hemminger forwarded this to the list last week, and Eric
> Dumazet is actively working on a fix.
OK.
Please don't forward bugzilla reports! Instead do a reply-to-all and
add the cc's. That way, bugzilla will capture the email discussion and
you won't get akpmspammed.
Sigh, kernel bugzilla is a PITA. Some people do seem to like and
expect it though.
^ permalink raw reply
* [PATCH] ixgbe: Remove not used blink_led_start/stop code
From: Yinghai Lu @ 2011-04-12 23:30 UTC (permalink / raw)
To: Jeff Kirsher, Jesse Brandeburg; +Cc: e1000-devel, NetDev
In-Reply-To: <4DA4E016.1050800@kernel.org>
There is no user for those code.
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
---
drivers/net/ixgbe/ixgbe_82598.c | 2 -
drivers/net/ixgbe/ixgbe_82599.c | 2 -
drivers/net/ixgbe/ixgbe_common.c | 56 ---------------------------------------
drivers/net/ixgbe/ixgbe_common.h | 2 -
drivers/net/ixgbe/ixgbe_type.h | 2 -
drivers/net/ixgbe/ixgbe_x540.c | 2 -
6 files changed, 66 deletions(-)
Index: linux-2.6/drivers/net/ixgbe/ixgbe_82598.c
===================================================================
--- linux-2.6.orig/drivers/net/ixgbe/ixgbe_82598.c
+++ linux-2.6/drivers/net/ixgbe/ixgbe_82598.c
@@ -1207,8 +1207,6 @@ static struct ixgbe_mac_operations mac_o
.get_link_capabilities = &ixgbe_get_link_capabilities_82598,
.led_on = &ixgbe_led_on_generic,
.led_off = &ixgbe_led_off_generic,
- .blink_led_start = &ixgbe_blink_led_start_generic,
- .blink_led_stop = &ixgbe_blink_led_stop_generic,
.set_rar = &ixgbe_set_rar_generic,
.clear_rar = &ixgbe_clear_rar_generic,
.set_vmdq = &ixgbe_set_vmdq_82598,
Index: linux-2.6/drivers/net/ixgbe/ixgbe_82599.c
===================================================================
--- linux-2.6.orig/drivers/net/ixgbe/ixgbe_82599.c
+++ linux-2.6/drivers/net/ixgbe/ixgbe_82599.c
@@ -2052,8 +2052,6 @@ static struct ixgbe_mac_operations mac_o
.get_link_capabilities = &ixgbe_get_link_capabilities_82599,
.led_on = &ixgbe_led_on_generic,
.led_off = &ixgbe_led_off_generic,
- .blink_led_start = &ixgbe_blink_led_start_generic,
- .blink_led_stop = &ixgbe_blink_led_stop_generic,
.set_rar = &ixgbe_set_rar_generic,
.clear_rar = &ixgbe_clear_rar_generic,
.set_vmdq = &ixgbe_set_vmdq_generic,
Index: linux-2.6/drivers/net/ixgbe/ixgbe_common.c
===================================================================
--- linux-2.6.orig/drivers/net/ixgbe/ixgbe_common.c
+++ linux-2.6/drivers/net/ixgbe/ixgbe_common.c
@@ -2242,62 +2242,6 @@ s32 ixgbe_enable_rx_dma_generic(struct i
}
/**
- * ixgbe_blink_led_start_generic - Blink LED based on index.
- * @hw: pointer to hardware structure
- * @index: led number to blink
- **/
-s32 ixgbe_blink_led_start_generic(struct ixgbe_hw *hw, u32 index)
-{
- ixgbe_link_speed speed = 0;
- bool link_up = 0;
- u32 autoc_reg = IXGBE_READ_REG(hw, IXGBE_AUTOC);
- u32 led_reg = IXGBE_READ_REG(hw, IXGBE_LEDCTL);
-
- /*
- * Link must be up to auto-blink the LEDs;
- * Force it if link is down.
- */
- hw->mac.ops.check_link(hw, &speed, &link_up, false);
-
- if (!link_up) {
- autoc_reg |= IXGBE_AUTOC_AN_RESTART;
- autoc_reg |= IXGBE_AUTOC_FLU;
- IXGBE_WRITE_REG(hw, IXGBE_AUTOC, autoc_reg);
- msleep(10);
- }
-
- led_reg &= ~IXGBE_LED_MODE_MASK(index);
- led_reg |= IXGBE_LED_BLINK(index);
- IXGBE_WRITE_REG(hw, IXGBE_LEDCTL, led_reg);
- IXGBE_WRITE_FLUSH(hw);
-
- return 0;
-}
-
-/**
- * ixgbe_blink_led_stop_generic - Stop blinking LED based on index.
- * @hw: pointer to hardware structure
- * @index: led number to stop blinking
- **/
-s32 ixgbe_blink_led_stop_generic(struct ixgbe_hw *hw, u32 index)
-{
- u32 autoc_reg = IXGBE_READ_REG(hw, IXGBE_AUTOC);
- u32 led_reg = IXGBE_READ_REG(hw, IXGBE_LEDCTL);
-
- autoc_reg &= ~IXGBE_AUTOC_FLU;
- autoc_reg |= IXGBE_AUTOC_AN_RESTART;
- IXGBE_WRITE_REG(hw, IXGBE_AUTOC, autoc_reg);
-
- led_reg &= ~IXGBE_LED_MODE_MASK(index);
- led_reg &= ~IXGBE_LED_BLINK(index);
- led_reg |= IXGBE_LED_LINK_ACTIVE << IXGBE_LED_MODE_SHIFT(index);
- IXGBE_WRITE_REG(hw, IXGBE_LEDCTL, led_reg);
- IXGBE_WRITE_FLUSH(hw);
-
- return 0;
-}
-
-/**
* ixgbe_get_san_mac_addr_offset - Get SAN MAC address offset from the EEPROM
* @hw: pointer to hardware structure
* @san_mac_offset: SAN MAC address offset
Index: linux-2.6/drivers/net/ixgbe/ixgbe_common.h
===================================================================
--- linux-2.6.orig/drivers/net/ixgbe/ixgbe_common.h
+++ linux-2.6/drivers/net/ixgbe/ixgbe_common.h
@@ -85,8 +85,6 @@ s32 ixgbe_check_mac_link_generic(struct
bool *link_up, bool link_up_wait_to_complete);
s32 ixgbe_get_wwn_prefix_generic(struct ixgbe_hw *hw, u16 *wwnn_prefix,
u16 *wwpn_prefix);
-s32 ixgbe_blink_led_start_generic(struct ixgbe_hw *hw, u32 index);
-s32 ixgbe_blink_led_stop_generic(struct ixgbe_hw *hw, u32 index);
void ixgbe_set_mac_anti_spoofing(struct ixgbe_hw *hw, bool enable, int pf);
void ixgbe_set_vlan_anti_spoofing(struct ixgbe_hw *hw, bool enable, int vf);
Index: linux-2.6/drivers/net/ixgbe/ixgbe_type.h
===================================================================
--- linux-2.6.orig/drivers/net/ixgbe/ixgbe_type.h
+++ linux-2.6/drivers/net/ixgbe/ixgbe_type.h
@@ -2530,8 +2530,6 @@ struct ixgbe_mac_operations {
/* LED */
s32 (*led_on)(struct ixgbe_hw *, u32);
s32 (*led_off)(struct ixgbe_hw *, u32);
- s32 (*blink_led_start)(struct ixgbe_hw *, u32);
- s32 (*blink_led_stop)(struct ixgbe_hw *, u32);
/* RAR, Multicast, VLAN */
s32 (*set_rar)(struct ixgbe_hw *, u32, u8 *, u32, u32);
Index: linux-2.6/drivers/net/ixgbe/ixgbe_x540.c
===================================================================
--- linux-2.6.orig/drivers/net/ixgbe/ixgbe_x540.c
+++ linux-2.6/drivers/net/ixgbe/ixgbe_x540.c
@@ -681,8 +681,6 @@ static struct ixgbe_mac_operations mac_o
.get_link_capabilities = &ixgbe_get_copper_link_capabilities_generic,
.led_on = &ixgbe_led_on_generic,
.led_off = &ixgbe_led_off_generic,
- .blink_led_start = &ixgbe_blink_led_start_generic,
- .blink_led_stop = &ixgbe_blink_led_stop_generic,
.set_rar = &ixgbe_set_rar_generic,
.clear_rar = &ixgbe_clear_rar_generic,
.set_vmdq = &ixgbe_set_vmdq_generic,
------------------------------------------------------------------------------
Forrester Wave Report - Recovery time is now measured in hours and minutes
not days. Key insights are discussed in the 2010 Forrester Wave Report as
part of an in-depth evaluation of disaster recovery service providers.
Forrester found the best-in-class provider in terms of services and vision.
Read this report now! http://p.sf.net/sfu/ibm-webcastpromo
_______________________________________________
E1000-devel mailing list
E1000-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/e1000-devel
To learn more about Intel® Ethernet, visit http://communities.intel.com/community/wired
^ permalink raw reply
* [PATCH] e1000: Remove blink_led_start declaration
From: Yinghai Lu @ 2011-04-12 23:28 UTC (permalink / raw)
To: Jeff Kirsher, Jesse Brandeburg; +Cc: e1000-devel, NetDev
It is left over code.
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
---
drivers/net/e1000/e1000_hw.h | 1 -
1 file changed, 1 deletion(-)
Index: linux-2.6/drivers/net/e1000/e1000_hw.h
===================================================================
--- linux-2.6.orig/drivers/net/e1000/e1000_hw.h
+++ linux-2.6/drivers/net/e1000/e1000_hw.h
@@ -386,7 +386,6 @@ s32 e1000_setup_led(struct e1000_hw *hw)
s32 e1000_cleanup_led(struct e1000_hw *hw);
s32 e1000_led_on(struct e1000_hw *hw);
s32 e1000_led_off(struct e1000_hw *hw);
-s32 e1000_blink_led_start(struct e1000_hw *hw);
/* Adaptive IFS Functions */
^ permalink raw reply
* Re: [PATCH] r8169: Be verbose when unable to load fw patch
From: David Miller @ 2011-04-12 23:20 UTC (permalink / raw)
To: bp; +Cc: romieu, linux-kernel, borislav.petkov, netdev
In-Reply-To: <1302615172-1646-1-git-send-email-bp@amd64.org>
From: Borislav Petkov <bp@amd64.org>
Date: Tue, 12 Apr 2011 15:32:52 +0200
> From: Borislav Petkov <borislav.petkov@amd.com>
>
> When the driver fails loading the firmware, it doesn't say which patch
> exactly it is missing. We have three different firmware images depending
> on the hw revision, so mention the exact patch name it is unable to load
> in the warning message.
>
> Cc: Francois Romieu <romieu@fr.zoreil.com>
> Cc: netdev@vger.kernel.org
> Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
Seems reasonable, Francois?
^ permalink raw reply
* Re: pull request: wireless-next-2.6 2011-04-12
From: David Miller @ 2011-04-12 23:18 UTC (permalink / raw)
To: linville; +Cc: linux-wireless, netdev
In-Reply-To: <20110412211429.GE24309@tuxdriver.com>
From: "John W. Linville" <linville@tuxdriver.com>
Date: Tue, 12 Apr 2011 17:14:34 -0400
> Here is the first big wireless pull request for the 2.6.40 cycle...
>
> There is the usual contingent of patches from the iwlwifi team, the
> ath9k team, the rt2x00 team, the mwl8k guys and now the Bluetooth guys
> as well. Also of note are the addition of the mwifiex driver from
> Marvell and the removal of the ar9170usb driver which has been
> obsoleted by carl9170. There are a number of other smaller
> contributions too, of course.
>
> Please let me know if there are problems!
Pulled, thanks John.
^ permalink raw reply
* Re: [Bugme-new] [Bug 32832] New: shutdown(2) does not fully shut down socket any more
From: David Miller @ 2011-04-12 23:17 UTC (permalink / raw)
To: akpm; +Cc: netdev, bugzilla-daemon, bugme-daemon, kees
In-Reply-To: <20110412161556.0641bdae.akpm@linux-foundation.org>
From: Andrew Morton <akpm@linux-foundation.org>
Date: Tue, 12 Apr 2011 16:15:56 -0700
>
> (switched to email. Please respond via emailed reply-to-all, not via the
> bugzilla web interface).
Stephen Hemminger forwarded this to the list last week, and Eric
Dumazet is actively working on a fix.
^ permalink raw reply
* Re: [Bugme-new] [Bug 32832] New: shutdown(2) does not fully shut down socket any more
From: Andrew Morton @ 2011-04-12 23:15 UTC (permalink / raw)
To: netdev; +Cc: bugzilla-daemon, bugme-daemon, kees
In-Reply-To: <bug-32832-10286@https.bugzilla.kernel.org/>
(switched to email. Please respond via emailed reply-to-all, not via the
bugzilla web interface).
On Wed, 6 Apr 2011 22:42:38 GMT
bugzilla-daemon@bugzilla.kernel.org wrote:
> https://bugzilla.kernel.org/show_bug.cgi?id=32832
There is a tescase attached to this bugzilla report.
> Summary: shutdown(2) does not fully shut down socket any more
> Product: Networking
> Version: 2.5
> Kernel Version: 2.6.38
> Platform: All
> OS/Version: Linux
> Tree: Mainline
> Status: NEW
> Severity: normal
> Priority: P1
> Component: IPV4
> AssignedTo: shemminger@linux-foundation.org
> ReportedBy: kees@outflux.net
> Regression: Yes
>
>
> In 2.6.35 and earlier, shutdown(2) will fully remove a socket. This does not
> appear to be true any more and is causing software to misbehave.
>
> 2.6.35:
> $ ./testcase
> parent: 5957
> before:
> tcp 0 0 0.0.0.0:12345 0.0.0.0:* LISTEN
> after:
> child: 5961
> $ ./testcase
> parent: 6001
> before:
> tcp 0 0 0.0.0.0:12345 0.0.0.0:* LISTEN
> after:
> child: 6002
>
> 2.6.38:
> $ ./testcase
> parent: 1138
> before:
> tcp 0 0 0.0.0.0:12345 0.0.0.0:* LISTEN
> after:
> child: 1142
> $ ./testcase
> bind: Address already in use
>
> The listener doesn't show up in netstat any more, but as long as the child
> process is running, the socket is unavailable. It is as if the shutdown(2)
> behavior has partially reverted to close(2) behavior (but in the case of using
> close(2), the child's socket would remain visible in netstat).
>
^ permalink raw reply
* [PATCH v2] atm: iphase: Fix set-but-not-used warnings.
From: David Miller @ 2011-04-12 23:14 UTC (permalink / raw)
To: netdev
The "iavcc" and "iadev" cases are obvious.
The intr_status and frmr_intr cases are reading a register to clear
the chip status. This driver is pretty old and creaky, and uses
volatile pointer dereferences to do register I/O when it should be
using readl() and friends. However that it outside of the scope of
these changes.
Signed-off-by: David S. Miller <davem@davemloft.net>
---
drivers/atm/iphase.c | 14 +++-----------
1 files changed, 3 insertions(+), 11 deletions(-)
diff --git a/drivers/atm/iphase.c b/drivers/atm/iphase.c
index 1c674a9..dee4f01 100644
--- a/drivers/atm/iphase.c
+++ b/drivers/atm/iphase.c
@@ -613,7 +613,6 @@ static int ia_que_tx (IADEV *iadev) {
struct sk_buff *skb;
int num_desc;
struct atm_vcc *vcc;
- struct ia_vcc *iavcc;
num_desc = ia_avail_descs(iadev);
while (num_desc && (skb = skb_dequeue(&iadev->tx_backlog))) {
@@ -627,7 +626,6 @@ static int ia_que_tx (IADEV *iadev) {
printk("Free the SKB on closed vci %d \n", vcc->vci);
break;
}
- iavcc = INPH_IA_VCC(vcc);
if (ia_pkt_tx (vcc, skb)) {
skb_queue_head(&iadev->tx_backlog, skb);
}
@@ -823,8 +821,6 @@ static void IaFrontEndIntr(IADEV *iadev) {
volatile IA_SUNI *suni;
volatile ia_mb25_t *mb25;
volatile suni_pm7345_t *suni_pm7345;
- u32 intr_status;
- u_int frmr_intr;
if(iadev->phy_type & FE_25MBIT_PHY) {
mb25 = (ia_mb25_t*)iadev->phy;
@@ -832,18 +828,18 @@ static void IaFrontEndIntr(IADEV *iadev) {
} else if (iadev->phy_type & FE_DS3_PHY) {
suni_pm7345 = (suni_pm7345_t *)iadev->phy;
/* clear FRMR interrupts */
- frmr_intr = suni_pm7345->suni_ds3_frm_intr_stat;
+ (void) suni_pm7345->suni_ds3_frm_intr_stat;
iadev->carrier_detect =
Boolean(!(suni_pm7345->suni_ds3_frm_stat & SUNI_DS3_LOSV));
} else if (iadev->phy_type & FE_E3_PHY ) {
suni_pm7345 = (suni_pm7345_t *)iadev->phy;
- frmr_intr = suni_pm7345->suni_e3_frm_maint_intr_ind;
+ (void) suni_pm7345->suni_e3_frm_maint_intr_ind;
iadev->carrier_detect =
Boolean(!(suni_pm7345->suni_e3_frm_fram_intr_ind_stat&SUNI_E3_LOS));
}
else {
suni = (IA_SUNI *)iadev->phy;
- intr_status = suni->suni_rsop_status & 0xff;
+ (void) suni->suni_rsop_status;
iadev->carrier_detect = Boolean(!(suni->suni_rsop_status & SUNI_LOSV));
}
if (iadev->carrier_detect)
@@ -2660,7 +2656,6 @@ static void ia_close(struct atm_vcc *vcc)
static int ia_open(struct atm_vcc *vcc)
{
- IADEV *iadev;
struct ia_vcc *ia_vcc;
int error;
if (!test_bit(ATM_VF_PARTIAL,&vcc->flags))
@@ -2668,7 +2663,6 @@ static int ia_open(struct atm_vcc *vcc)
IF_EVENT(printk("ia: not partially allocated resources\n");)
vcc->dev_data = NULL;
}
- iadev = INPH_IA_DEV(vcc->dev);
if (vcc->vci != ATM_VPI_UNSPEC && vcc->vpi != ATM_VCI_UNSPEC)
{
IF_EVENT(printk("iphase open: unspec part\n");)
@@ -3052,11 +3046,9 @@ static int ia_pkt_tx (struct atm_vcc *vcc, struct sk_buff *skb) {
static int ia_send(struct atm_vcc *vcc, struct sk_buff *skb)
{
IADEV *iadev;
- struct ia_vcc *iavcc;
unsigned long flags;
iadev = INPH_IA_DEV(vcc->dev);
- iavcc = INPH_IA_VCC(vcc);
if ((!skb)||(skb->len>(iadev->tx_buf_sz-sizeof(struct cpcs_trailer))))
{
if (!skb)
--
1.7.4.3
^ permalink raw reply related
* Re: [PATCH] atm: iphase: Fix set-but-not-used warnings.
From: David Miller @ 2011-04-12 23:11 UTC (permalink / raw)
To: netdev
In-Reply-To: <20110412.161047.233699167.davem@davemloft.net>
From: David Miller <davem@davemloft.net>
Date: Tue, 12 Apr 2011 16:10:47 -0700 (PDT)
>
> The "iavcc" case is obvious.
>
> The intr_status and frmr_intr cases are reading a register to clear
> the chip status. This driver is pretty old and creaky, and uses
> volatile pointer dereferences to do register I/O when it should be
> using readl() and friends. However that it outside of the scope of
> these changes.
>
> Signed-off-by: David S. Miller <davem@davemloft.net>
Hmmm, I missed a few more cases, updated patch coming up.
^ permalink raw reply
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