* RE: [PATCH 0/4] net/mlx4: Fixes to mlx4 driver
From: Yevgeny Petrilin @ 2012-08-03 7:20 UTC (permalink / raw)
To: David Miller; +Cc: netdev@vger.kernel.org
In-Reply-To: <20120802.161251.331601378090436432.davem@davemloft.net>
> > Yevgeny Petrilin (3):
> > net/mlx4_en: Setting the NETIF_F_GRO flag back to dev->hw_features
>
> As pointed out, this isn't a bug.
>
> You just made this change purely via code inspection, and that's very
> disappointing because this would have been so simple to validate.
Hello Dave,
You are absolutely right,
I should have checked it better.
There are few more modules setting this flag during device initialization, I guess we need to clean all.
Can you please apply the other 3 or should I resubmit them?
Thanks,
Yevgeny
^ permalink raw reply
* [PATCH v2] isdnloop: fix and simplify isdnloop_init()
From: Fengguang Wu @ 2012-08-03 7:32 UTC (permalink / raw)
To: David Miller
Cc: devel, isdn, netdev, linux-kernel, gregkh, joe, dan.carpenter
In-Reply-To: <20120802.162156.1853851468137303302.davem@davemloft.net>
On Thu, Aug 02, 2012 at 04:21:56PM -0700, David Miller wrote:
> From: Fengguang Wu <fengguang.wu@intel.com>
> Date: Thu, 2 Aug 2012 19:05:43 +0800
>
> > Fix a buffer overflow bug by removing the revision transform code.
> >
> > [ 22.016214] isdnloop-ISDN-driver Rev 1.11.6.7
> > [ 22.097508] isdnloop: (loop0) virtual card added
> > [ 22.174400] Kernel panic - not syncing: stack-protector: Kernel stack is corrupted in: ffffffff83244972
> > [ 22.174400]
> > [ 22.436157] Pid: 1, comm: swapper Not tainted 3.5.0-bisect-00018-gfa8bbb1-dirty #129
> > [ 22.624071] Call Trace:
> > [ 22.720558] [<ffffffff832448c3>] ? CallcNew+0x56/0x56
> > [ 22.815248] [<ffffffff8222b623>] panic+0x110/0x329
> > [ 22.914330] [<ffffffff83244972>] ? isdnloop_init+0xaf/0xb1
> > [ 23.014800] [<ffffffff832448c3>] ? CallcNew+0x56/0x56
> > [ 23.090763] [<ffffffff8108e24b>] __stack_chk_fail+0x2b/0x30
> > [ 23.185748] [<ffffffff83244972>] isdnloop_init+0xaf/0xb1
> >
> > Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
>
> The reason the "$Revision ..." prefix is there is so that automated
> version control tools will change the string automatically when code
> is committed in CVS.
>
> In the GIT era this revision style is obsolete.
>
> Therefore you might as well just delete this crap altogether.
OK. The below updated version will simply print the hard coded
revision number as it's unlikely to change any more.
Thanks,
Fengguang
---
isdnloop: fix and simplify isdnloop_init
Fix a buffer overflow bug by hard coding the revision number.
[ 22.016214] isdnloop-ISDN-driver Rev 1.11.6.7
[ 22.097508] isdnloop: (loop0) virtual card added
[ 22.174400] Kernel panic - not syncing: stack-protector: Kernel stack is corrupted in: ffffffff83244972
[ 22.174400]
[ 22.436157] Pid: 1, comm: swapper Not tainted 3.5.0-bisect-00018-gfa8bbb1-dirty #129
[ 22.624071] Call Trace:
[ 22.720558] [<ffffffff832448c3>] ? CallcNew+0x56/0x56
[ 22.815248] [<ffffffff8222b623>] panic+0x110/0x329
[ 22.914330] [<ffffffff83244972>] ? isdnloop_init+0xaf/0xb1
[ 23.014800] [<ffffffff832448c3>] ? CallcNew+0x56/0x56
[ 23.090763] [<ffffffff8108e24b>] __stack_chk_fail+0x2b/0x30
[ 23.185748] [<ffffffff83244972>] isdnloop_init+0xaf/0xb1
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
---
drivers/isdn/isdnloop/isdnloop.c | 12 +-----------
1 file changed, 1 insertion(+), 11 deletions(-)
--- linux.orig/drivers/isdn/isdnloop/isdnloop.c 2012-08-03 15:24:49.047544323 +0800
+++ linux/drivers/isdn/isdnloop/isdnloop.c 2012-08-03 15:27:39.503548375 +0800
@@ -16,7 +16,6 @@
#include <linux/sched.h>
#include "isdnloop.h"
-static char *revision = "$Revision: 1.11.6.7 $";
static char *isdnloop_id = "loop0";
MODULE_DESCRIPTION("ISDN4Linux: Pseudo Driver that simulates an ISDN card");
@@ -1494,16 +1493,7 @@ isdnloop_addcard(char *id1)
static int __init
isdnloop_init(void)
{
- char *p;
- char rev[10];
-
- if ((p = strchr(revision, ':'))) {
- strcpy(rev, p + 1);
- p = strchr(rev, '$');
- *p = 0;
- } else
- strcpy(rev, " ??? ");
- printk(KERN_NOTICE "isdnloop-ISDN-driver Rev%s\n", rev);
+ printk(KERN_NOTICE "isdnloop-ISDN-driver Rev 1.11.6.7\n");
if (isdnloop_id)
return (isdnloop_addcard(isdnloop_id));
^ permalink raw reply
* RFC3484: default address selection malfunctioning
From: BALAKUMARAN KANNAN @ 2012-08-03 7:35 UTC (permalink / raw)
To: netdev@vger.kernel.org
Hi all,
In Default address selction, From DNS query, the destination addresses are both a site local and a link scope addresses. the source addresses a site local address and a global address. So while pinging to the host(with name) according to RFC3484, the kernel should select the link local destination address and link local source address right? But linux kernel-3.0.26 is using the global address as source address and site local as destination address.
Why? is it a bug? And the DNS server address is a site local address. Had a default router with link local address
Thank you.
^ permalink raw reply
* [PATCH] ipv4: remove parentheses in return statement
From: Jean Sacren @ 2012-08-03 7:43 UTC (permalink / raw)
To: netdev; +Cc: Jean Sacren
It is always wrong to write 'return (...)'.
After removal, realign the code where necessary.
Signed-off-by: Jean Sacren <sakiwit@gmail.com>
---
net/ipv4/devinet.c | 4 ++--
net/ipv4/inetpeer.c | 2 +-
net/ipv4/syncookies.c | 8 ++++----
net/ipv4/tcp_input.c | 16 ++++++++--------
net/ipv4/tcp_output.c | 2 +-
5 files changed, 16 insertions(+), 16 deletions(-)
diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c
index 44bf82e..72b16e4 100644
--- a/net/ipv4/devinet.c
+++ b/net/ipv4/devinet.c
@@ -106,8 +106,8 @@ static inline unsigned int inet_addr_hash(struct net *net, __be32 addr)
{
u32 val = (__force u32) addr ^ hash_ptr(net, 8);
- return ((val ^ (val >> 8) ^ (val >> 16) ^ (val >> 24)) &
- (IN4_ADDR_HSIZE - 1));
+ return (val ^ (val >> 8) ^ (val >> 16) ^ (val >> 24)) &
+ (IN4_ADDR_HSIZE - 1);
}
static void inet_hash_insert(struct net *net, struct in_ifaddr *ifa)
diff --git a/net/ipv4/inetpeer.c b/net/ipv4/inetpeer.c
index e1e0a4e..8049ce0 100644
--- a/net/ipv4/inetpeer.c
+++ b/net/ipv4/inetpeer.c
@@ -96,7 +96,7 @@ static atomic_t v6_seq = ATOMIC_INIT(0);
static atomic_t *inetpeer_seq_ptr(int family)
{
- return (family == AF_INET ? &v4_seq : &v6_seq);
+ return (family == AF_INET) ? &v4_seq : &v6_seq;
}
static inline void flush_check(struct inet_peer_base *base, int family)
diff --git a/net/ipv4/syncookies.c b/net/ipv4/syncookies.c
index 650e152..cb9c489 100644
--- a/net/ipv4/syncookies.c
+++ b/net/ipv4/syncookies.c
@@ -103,10 +103,10 @@ static __u32 secure_tcp_syn_cookie(__be32 saddr, __be32 daddr, __be16 sport,
* MSS into the second hash value.
*/
- return (cookie_hash(saddr, daddr, sport, dport, 0, 0) +
- sseq + (count << COOKIEBITS) +
- ((cookie_hash(saddr, daddr, sport, dport, count, 1) + data)
- & COOKIEMASK));
+ return cookie_hash(saddr, daddr, sport, dport, 0, 0) +
+ sseq + (count << COOKIEBITS) +
+ ((cookie_hash(saddr, daddr, sport, dport, count, 1) + data)
+ & COOKIEMASK);
}
/*
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
index 2fd2bc9..1d220f9 100644
--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
@@ -3993,17 +3993,17 @@ static int tcp_disordered_ack(const struct sock *sk, const struct sk_buff *skb)
u32 seq = TCP_SKB_CB(skb)->seq;
u32 ack = TCP_SKB_CB(skb)->ack_seq;
- return (/* 1. Pure ACK with correct sequence number. */
- (th->ack && seq == TCP_SKB_CB(skb)->end_seq && seq == tp->rcv_nxt) &&
+ return /* 1. Pure ACK with correct sequence number. */
+ (th->ack && seq == TCP_SKB_CB(skb)->end_seq && seq == tp->rcv_nxt) &&
- /* 2. ... and duplicate ACK. */
- ack == tp->snd_una &&
+ /* 2. ... and duplicate ACK. */
+ ack == tp->snd_una &&
- /* 3. ... and does not update window. */
- !tcp_may_update_window(tp, ack, seq, ntohs(th->window) << tp->rx_opt.snd_wscale) &&
+ /* 3. ... and does not update window. */
+ !tcp_may_update_window(tp, ack, seq, ntohs(th->window) << tp->rx_opt.snd_wscale) &&
- /* 4. ... and sits in replay window. */
- (s32)(tp->rx_opt.ts_recent - tp->rx_opt.rcv_tsval) <= (inet_csk(sk)->icsk_rto * 1024) / HZ);
+ /* 4. ... and sits in replay window. */
+ (s32)(tp->rx_opt.ts_recent - tp->rx_opt.rcv_tsval) <= (inet_csk(sk)->icsk_rto * 1024) / HZ;
}
static inline bool tcp_paws_discard(const struct sock *sk,
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c
index a7b3ec9..eac214c 100644
--- a/net/ipv4/tcp_output.c
+++ b/net/ipv4/tcp_output.c
@@ -1557,7 +1557,7 @@ static inline unsigned int tcp_cwnd_test(const struct tcp_sock *tp,
in_flight = tcp_packets_in_flight(tp);
cwnd = tp->snd_cwnd;
if (in_flight < cwnd)
- return (cwnd - in_flight);
+ return cwnd - in_flight;
return 0;
}
^ permalink raw reply related
* skb_warn_bad_offload with kernel 3.5 (maybe gso/bridge related ?)
From: Yann Dupont @ 2012-08-03 8:10 UTC (permalink / raw)
To: netdev@vger.kernel.org
Hello everybody,
I have a machine using ceph rbd volume, as a client (rbd module) to
backup data.
I was running kernel 3.2.22 ok. Tried 3.5.0 because some rbd fixes went in.
Now, shortly after the start, my logs are filled by that :
Jul 31 18:15:01 singleton.u06.univ-nantes.prive kernel: [ 1175.780860]
WARNING: at net/core/dev.c:1888 skb_warn_bad_offload+0xb6/0xc1()
Jul 31 18:15:01 singleton.u06.univ-nantes.prive kernel: [ 1175.780920]
Hardware name: PowerEdge M605
Jul 31 18:15:01 singleton.u06.univ-nantes.prive kernel: [ 1175.780990] :
caps=(0x0000000000005000, 0x0000000000000000) len=7292 data_len=5792
gso_size=1448 gso_type=1 ip_summed=1
Jul 31 18:15:01 singleton.u06.univ-nantes.prive kernel: [ 1175.781071]
Modules linked in: rbd libceph ipt_MASQUERADE iptable_nat nf_nat
ipt_REJECT veth fuse xt_physdev xt_iprange xt_multiport ip6table_filter
ip6_tables xt_LOG xt_limit xt_tcpudp xt_state iptable_filter ip_tables
x_tables nf_conntrack_tftp nf_conntrack_ftp nf_conntrack_ipv4
nf_defrag_ipv4 8021q bridge stp llc ext2 mbcache dm_round_robin
dm_multipath scsi_dh nf_conntrack_ipv6 nf_conntrack nf_defrag_ipv6 ipv6
powernow_k8 freq_table mperf kvm_amd snd_pcm kvm snd_timer snd soundcore
snd_page_alloc tpm_tis tpm tpm_bios pcspkr evdev psmouse microcode
joydev dcdbas shpchp i2c_nforce2 pci_hotplug serio_raw processor
i2c_core hid_generic thermal_sys hed button xfs exportfs dm_mod ses
enclosure usbhid hid sg sr_mod sd_mod cdrom usb_storage lpfc
scsi_transport_fc scsi_tgt ohci_hcd bnx2x mptsas mptscsih bnx2 mptbase
scsi_transport_sas crc32c scsi_mod libcrc32c mdio ehci_hcd [last
unloaded: scsi_wait_scan]
Jul 31 18:15:01 singleton.u06.univ-nantes.prive kernel: [ 1175.785995]
Pid: 0, comm: swapper/0 Not tainted 3.5.0-dsiun-120521 #5
Jul 31 18:15:01 singleton.u06.univ-nantes.prive kernel: [ 1175.786055]
Call Trace:
Jul 31 18:15:01 singleton.u06.univ-nantes.prive kernel: [ 1175.786108]
<IRQ> [<ffffffff813bde00>] ? skb_warn_bad_offload+0x6f/0xc1
Jul 31 18:15:01 singleton.u06.univ-nantes.prive kernel: [ 1175.786209]
[<ffffffff8103a109>] ? warn_slowpath_common+0x79/0xc0
Jul 31 18:15:01 singleton.u06.univ-nantes.prive kernel: [ 1175.786269]
[<ffffffff8103a205>] ? warn_slowpath_fmt+0x45/0x50
Jul 31 18:15:01 singleton.u06.univ-nantes.prive kernel: [ 1175.786330]
[<ffffffff81068647>] ? get_nohz_timer_target+0x57/0xd0
Jul 31 18:15:01 singleton.u06.univ-nantes.prive kernel: [ 1175.786390]
[<ffffffff813bde47>] ? skb_warn_bad_offload+0xb6/0xc1
Jul 31 18:15:01 singleton.u06.univ-nantes.prive kernel: [ 1175.786452]
[<ffffffff813110e7>] ? skb_gso_segment+0x207/0x280
Jul 31 18:15:01 singleton.u06.univ-nantes.prive kernel: [ 1175.786512]
[<ffffffff81313f26>] ? dev_hard_start_xmit+0x1f6/0x620
Jul 31 18:15:01 singleton.u06.univ-nantes.prive kernel: [ 1175.786574]
[<ffffffff8132f17d>] ? sch_direct_xmit+0xfd/0x1d0
Jul 31 18:15:01 singleton.u06.univ-nantes.prive kernel: [ 1175.786633]
[<ffffffff813147a4>] ? dev_queue_xmit+0x454/0x610
Jul 31 18:15:01 singleton.u06.univ-nantes.prive kernel: [ 1175.786697]
[<ffffffffa06f3c42>] ? br_dev_queue_push_xmit+0x72/0xc0 [bridge]
Jul 31 18:15:01 singleton.u06.univ-nantes.prive kernel: [ 1175.786762]
[<ffffffffa06fa673>] ? br_nf_post_routing+0x223/0x340 [bridge]
Jul 31 18:15:01 singleton.u06.univ-nantes.prive kernel: [ 1175.786825]
[<ffffffff8133c0c4>] ? nf_iterate+0x84/0xa0
Jul 31 18:15:01 singleton.u06.univ-nantes.prive kernel: [ 1175.786885]
[<ffffffffa06f3bd0>] ? deliver_clone+0x60/0x60 [bridge]
Jul 31 18:15:01 singleton.u06.univ-nantes.prive kernel: [ 1175.786945]
[<ffffffff8133c14e>] ? nf_hook_slow+0x6e/0x130
Jul 31 18:15:01 singleton.u06.univ-nantes.prive kernel: [ 1175.787005]
[<ffffffffa06f3bd0>] ? deliver_clone+0x60/0x60 [bridge]
Jul 31 18:15:01 singleton.u06.univ-nantes.prive kernel: [ 1175.787067]
[<ffffffffa06f3f00>] ? br_multicast_flood+0x170/0x170 [bridge]
Jul 31 18:15:01 singleton.u06.univ-nantes.prive kernel: [ 1175.787130]
[<ffffffffa06f3f42>] ? br_forward_finish+0x42/0x50 [bridge]
Jul 31 18:15:01 singleton.u06.univ-nantes.prive kernel: [ 1175.787193]
[<ffffffffa06f9f29>] ? br_nf_forward_finish+0xb9/0x180 [bridge]
Jul 31 18:15:01 singleton.u06.univ-nantes.prive kernel: [ 1175.787256]
[<ffffffffa06faa21>] ? br_nf_forward_ip+0x291/0x3d0 [bridge]
Jul 31 18:15:01 singleton.u06.univ-nantes.prive kernel: [ 1175.787318]
[<ffffffff8133c0c4>] ? nf_iterate+0x84/0xa0
Jul 31 18:15:01 singleton.u06.univ-nantes.prive kernel: [ 1175.787379]
[<ffffffffa06a301f>] ? tcp_packet+0x82f/0xf10 [nf_conntrack]
Jul 31 18:15:01 singleton.u06.univ-nantes.prive kernel: [ 1175.787442]
[<ffffffffa06f3f00>] ? br_multicast_flood+0x170/0x170 [bridge]
Jul 31 18:15:01 singleton.u06.univ-nantes.prive kernel: [ 1175.787503]
[<ffffffff8133c14e>] ? nf_hook_slow+0x6e/0x130
Jul 31 18:15:01 singleton.u06.univ-nantes.prive kernel: [ 1175.787563]
[<ffffffffa06f3f00>] ? br_multicast_flood+0x170/0x170 [bridge]
Jul 31 18:15:01 singleton.u06.univ-nantes.prive kernel: [ 1175.787626]
[<ffffffffa06f3fe0>] ? __br_forward+0x90/0xb0 [bridge]
Jul 31 18:15:01 singleton.u06.univ-nantes.prive kernel: [ 1175.787688]
[<ffffffffa06f4e34>] ? br_handle_frame_finish+0x214/0x2b0 [bridge]
Jul 31 18:15:01 singleton.u06.univ-nantes.prive kernel: [ 1175.787765]
[<ffffffffa06fa2ab>] ? br_nf_pre_routing_finish+0x19b/0x340 [bridge]
Jul 31 18:15:01 singleton.u06.univ-nantes.prive kernel: [ 1175.787842]
[<ffffffffa06fb0f2>] ? br_nf_pre_routing+0x3a2/0x650 [bridge]
Jul 31 18:15:01 singleton.u06.univ-nantes.prive kernel: [ 1175.787904]
[<ffffffff8108b184>] ? generic_exec_single+0xb4/0xc0
Jul 31 18:15:01 singleton.u06.univ-nantes.prive kernel: [ 1175.787964]
[<ffffffff8133c0c4>] ? nf_iterate+0x84/0xa0
Jul 31 18:15:01 singleton.u06.univ-nantes.prive kernel: [ 1175.788025]
[<ffffffffa06f4c20>] ? br_handle_local_finish+0x50/0x50 [bridge]
Jul 31 18:15:01 singleton.u06.univ-nantes.prive kernel: [ 1175.788087]
[<ffffffff8133c14e>] ? nf_hook_slow+0x6e/0x130
Jul 31 18:15:01 singleton.u06.univ-nantes.prive kernel: [ 1175.788147]
[<ffffffffa06f4c20>] ? br_handle_local_finish+0x50/0x50 [bridge]
Jul 31 18:15:01 singleton.u06.univ-nantes.prive kernel: [ 1175.788210]
[<ffffffffa06f5098>] ? br_handle_frame+0x1c8/0x260 [bridge]
Jul 31 18:15:01 singleton.u06.univ-nantes.prive kernel: [ 1175.788273]
[<ffffffffa06f4ed0>] ? br_handle_frame_finish+0x2b0/0x2b0 [bridge]
Jul 31 18:15:01 singleton.u06.univ-nantes.prive kernel: [ 1175.788348]
[<ffffffff813121b8>] ? __netif_receive_skb+0x418/0x5a0
Jul 31 18:15:01 singleton.u06.univ-nantes.prive kernel: [ 1175.788409]
[<ffffffffa0736954>] ? ipt_do_table+0x344/0x5e0 [ip_tables]
Jul 31 18:15:01 singleton.u06.univ-nantes.prive kernel: [ 1175.788470]
[<ffffffff813124ca>] ? netif_receive_skb+0x1a/0x80
Jul 31 18:15:01 singleton.u06.univ-nantes.prive kernel: [ 1175.788530]
[<ffffffff81312620>] ? napi_skb_finish+0x50/0x70
Jul 31 18:15:01 singleton.u06.univ-nantes.prive kernel: [ 1175.788599]
[<ffffffffa0126bc6>] ? bnx2x_rx_int+0x656/0x13d0 [bnx2x]
Jul 31 18:15:01 singleton.u06.univ-nantes.prive kernel: [ 1175.788671]
[<ffffffffa01994ae>] ? lpfc_sli_handle_fast_ring_event+0x26e/0x5d0 [lpfc]
Jul 31 18:15:01 singleton.u06.univ-nantes.prive kernel: [ 1175.788748]
[<ffffffffa071abf5>] ? ipv4_confirm+0x175/0x200 [nf_conntrack_ipv4]
Jul 31 18:15:01 singleton.u06.univ-nantes.prive kernel: [ 1175.788828]
[<ffffffffa0129073>] ? bnx2x_poll+0x93/0x2b0 [bnx2x]
Jul 31 18:15:01 singleton.u06.univ-nantes.prive kernel: [ 1175.788889]
[<ffffffff81312e98>] ? net_rx_action+0x138/0x220
Jul 31 18:15:01 singleton.u06.univ-nantes.prive kernel: [ 1175.788949]
[<ffffffff810424ae>] ? __do_softirq+0xae/0x1c0
Jul 31 18:15:01 singleton.u06.univ-nantes.prive kernel: [ 1175.789009]
[<ffffffff813c281c>] ? call_softirq+0x1c/0x30
Jul 31 18:15:01 singleton.u06.univ-nantes.prive kernel: [ 1175.789068]
[<ffffffff81004b95>] ? do_softirq+0x75/0xb0
Jul 31 18:15:01 singleton.u06.univ-nantes.prive kernel: [ 1175.789127]
[<ffffffff81042845>] ? irq_exit+0xa5/0xb0
Jul 31 18:15:01 singleton.u06.univ-nantes.prive kernel: [ 1175.789185]
[<ffffffff8100480b>] ? do_IRQ+0x5b/0xd0
Jul 31 18:15:01 singleton.u06.univ-nantes.prive kernel: [ 1175.789243]
[<ffffffff813c0aea>] ? common_interrupt+0x6a/0x6a
Jul 31 18:15:01 singleton.u06.univ-nantes.prive kernel: [ 1175.789301]
<EOI> [<ffffffff8104ac21>] ? get_next_timer_interrupt+0x1e1/0x280
Jul 31 18:15:01 singleton.u06.univ-nantes.prive kernel: [ 1175.789414]
[<ffffffff8102ab82>] ? native_safe_halt+0x2/0x10
Jul 31 18:15:01 singleton.u06.univ-nantes.prive kernel: [ 1175.789474]
[<ffffffff8100b847>] ? default_idle+0x47/0x190
Jul 31 18:15:01 singleton.u06.univ-nantes.prive kernel: [ 1175.789533]
[<ffffffff8100b9e0>] ? amd_e400_idle+0x50/0x110
Jul 31 18:15:01 singleton.u06.univ-nantes.prive kernel: [ 1175.789593]
[<ffffffff8100c466>] ? cpu_idle+0xb6/0xd0
Jul 31 18:15:01 singleton.u06.univ-nantes.prive kernel: [ 1175.789651]
[<ffffffff8157fb77>] ? start_kernel+0x366/0x371
Jul 31 18:15:01 singleton.u06.univ-nantes.prive kernel: [ 1175.789711]
[<ffffffff8157f627>] ? repair_env_string+0x5b/0x5b
Jul 31 18:15:01 singleton.u06.univ-nantes.prive kernel: [ 1175.789771]
[<ffffffff8157f436>] ? x86_64_start_kernel+0x105/0x114
Jul 31 18:15:01 singleton.u06.univ-nantes.prive kernel: [ 1175.789831]
---[ end trace ad41e3fec21667dd ]---
Shorter traces :
Aug 1 14:37:41 singleton.u06.univ-nantes.prive kernel: [74424.537129]
WARNING: at net/core/dev.c:1888 skb_warn_bad_offload+0xb6/0xc1()
Aug 1 14:37:41 singleton.u06.univ-nantes.prive kernel: [74424.537156]
Hardware name: PowerEdge M605
Aug 1 14:37:41 singleton.u06.univ-nantes.prive kernel: [74424.537178] :
caps=(0x0000000000005000, 0x0000000000000000) len=23220 data_len=21720
gso_size=1448 gso_type=1 ip_summed=1
Aug 1 14:37:41 singleton.u06.univ-nantes.prive kernel: [74424.537226]
Modules linked in: rbd libceph ipt_MASQUERADE iptable_nat nf_nat
ipt_REJECT veth fuse xt_physdev xt_iprange xt_multiport ip6table_filter
ip6_tables xt_LOG xt_limit xt_tcpudp xt_state iptable_filter ip_tables
x_tables nf_conntrack_tftp nf_conntrack_ftp nf_conntrack_ipv4
nf_defrag_ipv4 8021q bridge stp llc ext2 mbcache dm_round_robin
dm_multipath scsi_dh nf_conntrack_ipv6 nf_conntrack nf_defrag_ipv6 ipv6
powernow_k8 freq_table mperf kvm_amd snd_pcm kvm snd_timer snd soundcore
snd_page_alloc tpm_tis tpm tpm_bios pcspkr evdev psmouse microcode
joydev dcdbas shpchp i2c_nforce2 pci_hotplug serio_raw processor
i2c_core hid_generic thermal_sys hed button xfs exportfs dm_mod ses
enclosure usbhid hid sg sr_mod sd_mod cdrom usb_storage lpfc
scsi_transport_fc scsi_tgt ohci_hcd bnx2x mptsas mptscsih bnx2 mptbase
scsi_transport_sas crc32c scsi_mod libcrc32c mdio ehci_hcd [last
unloaded: scsi_wait_scan]
Aug 1 14:37:41 singleton.u06.univ-nantes.prive kernel: [74424.537632]
Pid: 22553, comm: smtp Tainted: G W 3.5.0-dsiun-120521 #5
Aug 1 14:37:41 singleton.u06.univ-nantes.prive kernel: [74424.537673]
Call Trace:
Aug 1 14:37:41 singleton.u06.univ-nantes.prive kernel: [74424.537691]
<IRQ> [<ffffffff813bde00>] ? skb_warn_bad_offload+0x6f/0xc1
Aug 1 14:37:41 singleton.u06.univ-nantes.prive kernel: [74424.537720]
[<ffffffff8103a109>] ? warn_slowpath_common+0x79/0xc0
Aug 1 14:37:41 singleton.u06.univ-nantes.prive kernel: [74424.537747]
[<ffffffff8103a205>] ? warn_slowpath_fmt+0x45/0x50
Aug 1 14:37:41 singleton.u06.univ-nantes.prive kernel: [74424.537773]
[<ffffffff813bde47>] ? skb_warn_bad_offload+0xb6/0xc1
Aug 1 14:37:41 singleton.u06.univ-nantes.prive kernel: [74424.537800]
[<ffffffff813110e7>] ? skb_gso_segment+0x207/0x280
Aug 1 14:37:41 singleton.u06.univ-nantes.prive kernel: [74424.537826]
[<ffffffff81313f26>] ? dev_hard_start_xmit+0x1f6/0x620
Aug 1 14:37:41 singleton.u06.univ-nantes.prive kernel: [74424.537853]
[<ffffffff8132f17d>] ? sch_direct_xmit+0xfd/0x1d0
Aug 1 14:37:41 singleton.u06.univ-nantes.prive kernel: [74424.537879]
[<ffffffff813147a4>] ? dev_queue_xmit+0x454/0x610
Aug 1 14:37:41 singleton.u06.univ-nantes.prive kernel: [74424.537907]
[<ffffffffa06f3c42>] ? br_dev_queue_push_xmit+0x72/0xc0 [bridge]
Aug 1 14:37:41 singleton.u06.univ-nantes.prive kernel: [74424.537937]
[<ffffffffa06fa673>] ? br_nf_post_routing+0x223/0x340 [bridge]
Aug 1 14:37:41 singleton.u06.univ-nantes.prive kernel: [74424.538103]
[<ffffffffa06f3f42>] ? br_forward_finish+0x42/0x50 [bridge]
Aug 1 14:37:41 singleton.u06.univ-nantes.prive kernel: [74424.538132]
[<ffffffffa06f9f29>] ? br_nf_forward_finish+0xb9/0x180 [bridge]
Aug 1 14:37:41 singleton.u06.univ-nantes.prive kernel: [74424.538704]
[<ffffffff813124ca>] ? netif_receive_skb+0x1a/0x80
Aug 1 14:37:41 singleton.u06.univ-nantes.prive kernel: [74424.539024]
<EOI>
Aug 1 14:37:41 singleton.u06.univ-nantes.prive kernel: [74424.539162] :
caps=(0x0000000000005000, 0x0000000000000000) len=6250 data_len=4750
gso_size=1448 gso_type=1 ip_summed=1
Aug 1 14:37:41 singleton.u06.univ-nantes.prive kernel: [74424.539209]
Modules linked in: rbd libceph ipt_MASQUERADE iptable_nat nf_nat
ipt_REJECT veth fuse xt_physdev xt_iprange xt_multiport ip6table_filter
ip6_tables xt_LOG xt_limit xt_tcpudp xt_state iptable_filter ip_tables
x_tables nf_conntrack_tftp nf_conntrack_ftp nf_conntrack_ipv4
nf_defrag_ipv4 8021q bridge stp llc ext2 mbcache dm_round_robin
dm_multipath scsi_dh nf_conntrack_ipv6 nf_conntrack nf_defrag_ipv6 ipv6
powernow_k8 freq_table mperf kvm_amd snd_pcm kvm snd_timer snd soundcore
snd_page_alloc tpm_tis tpm tpm_bios pcspkr evdev psmouse microcode
joydev dcdbas shpchp i2c_nforce2 pci_hotplug serio_raw processor
i2c_core hid_generic thermal_sys hed button xfs exportfs dm_mod ses
enclosure usbhid hid sg sr_mod sd_mod cdrom usb_storage lpfc
scsi_transport_fc scsi_tgt ohci_hcd bnx2x mptsas mptscsih bnx2 mptbase
scsi_transport_sas crc32c scsi_mod libcrc32c mdio ehci_hcd [last
unloaded: scsi_wait_scan]
Aug 1 14:37:41 singleton.u06.univ-nantes.prive kernel: [74424.539614]
Pid: 22553, comm: smtp Tainted: G W 3.5.0-dsiun-120521 #5
Aug 1 14:37:41 singleton.u06.univ-nantes.prive kernel: [74424.539654]
Call Trace:
Aug 1 14:37:41 singleton.u06.univ-nantes.prive kernel: [74424.539673]
<IRQ> [<ffffffff813bde00>] ? skb_warn_bad_offload+0x6f/0xc1
Aug 1 14:37:41 singleton.u06.univ-nantes.prive kernel: [74424.539702]
[<ffffffff8103a109>] ? warn_slowpath_common+0x79/0xc0
Aug 1 14:37:41 singleton.u06.univ-nantes.prive kernel: [74424.539728]
[<ffffffff8103a205>] ? warn_slowpath_fmt+0x45/0x50
Aug 1 14:37:41 singleton.u06.univ-nantes.prive kernel: [74424.539755]
[<ffffffff813bde47>] ? skb_warn_bad_offload+0xb6/0xc1
Aug 1 14:37:41 singleton.u06.univ-nantes.prive kernel: [74424.539782]
[<ffffffff813110e7>] ? skb_gso_segment+0x207/0x280
Aug 1 14:37:41 singleton.u06.univ-nantes.prive kernel: [74424.539808]
[<ffffffff81313f26>] ? dev_hard_start_xmit+0x1f6/0x620
Aug 1 14:37:41 singleton.u06.univ-nantes.prive kernel: [74424.540933]
[<ffffffff81042845>] ? irq_exit+0xa5/0xb0
Aug 1 14:37:41 singleton.u06.univ-nantes.prive kernel: [74424.543067]
[<ffffffff813147a4>] ? dev_queue_xmit+0x454/0x610
Aug 1 14:37:41 singleton.u06.univ-nantes.prive kernel: [74424.543095]
[<ffffffffa06f3c42>] ? br_dev_queue_push_xmit+0x72/0xc0 [bridge]
Aug 1 14:37:41 singleton.u06.univ-nantes.prive kernel: [74424.543125]
[<ffffffffa06fa673>] ? br_nf_post_routing+0x223/0x340 [bridge]
Aug 1 14:37:41 singleton.u06.univ-nantes.prive kernel: [74424.543514]
[<ffffffffa06f3fe0>] ? __br_forward+0x90/0xb0 [bridge]
Aug 1 14:37:41 singleton.u06.univ-nantes.prive kernel: [74424.543585]
[<ffffffffa06fa2ab>] ? br_nf_pre_routing_finish+0x19b/0x340 [bridge]
Aug 1 14:37:41 singleton.u06.univ-nantes.prive kernel: [74424.543629]
[<ffffffffa06fb0f2>] ? br_nf_pre_routing+0x3a2/0x650 [bridge]
Aug 1 14:37:41 singleton.u06.univ-nantes.prive kernel: [74424.543657]
[<ffffffff8133c0c4>] ? nf_iterate+0x84/0xa0
Aug 1 14:37:41 singleton.u06.univ-nantes.prive kernel: [74424.543684]
[<ffffffffa06f4c20>] ? br_handle_local_finish+0x50/0x50 [bridge]
Aug 1 14:37:41 singleton.u06.univ-nantes.prive kernel: [74424.543712]
[<ffffffff8133c14e>] ? nf_hook_slow+0x6e/0x130
Aug 1 14:37:41 singleton.u06.univ-nantes.prive kernel: [74424.543739]
[<ffffffffa06f4c20>] ? br_handle_local_finish+0x50/0x50 [bridge]
Aug 1 14:37:41 singleton.u06.univ-nantes.prive kernel: [74424.543767]
[<ffffffff8133c14e>] ? nf_hook_slow+0x6e/0x130
Aug 1 14:37:41 singleton.u06.univ-nantes.prive kernel: [74424.543795]
[<ffffffffa06f5098>] ? br_handle_frame+0x1c8/0x260 [bridge]
Despite thoses messages, the machine is still running OK. It runs lxc
instances (and so , bridge & tun/tap), only one of thoses instances uses
rbd.
I don't think the problem is ceph related.
This machine have bnx2 (Gb) & bnx2x (10Gb) - Lots of trafic is using
bnx2x-.
I'm running 3.5.0 on other hosts (bnx2/bnx2x or ixgbe drivers) without
problems. But it's not the same workload.
As the problem seems more or less gso related, I've deactivated gso two
days ago. This cure the symptom, running ok since.
Anyone here seeing this problem ?
Cheers,
--
Yann Dupont - Service IRTS, DSI Université de Nantes
Tel : 02.53.48.49.20 - Mail/Jabber : Yann.Dupont@univ-nantes.fr
^ permalink raw reply
* RE: [PATCH] mlx4_en: add UFO support
From: Yevgeny Petrilin @ 2012-08-03 8:29 UTC (permalink / raw)
To: Thadeu Lima de Souza Cascardo, David S. Miller
Cc: netdev@vger.kernel.org, Or Gerlitz
In-Reply-To: <1343940824-4720-1-git-send-email-cascardo@linux.vnet.ibm.com>
>
> Mellanox Ethernet adapters support Large Segmentation Offload for UDP
> packets. The only change needed is using the proper header size when the
> packet is UDP instead of TCP.
>
> This significantly increases performance for large UDP packets on platforms
> which have an expensive dma_map call, like pseries.
>
> On a simple test with 64000 payload size, throughput has increased from
> about 6Gbps to 9.5Gbps, while CPU use dropped from about 600% to about
> 80% or less, on a 8-core Power7 machine.
>
Hi Thadeu,
Can you please send the info regarding the adapter you are testing with? What test are you running?
I just tried this patch with netperf on my x86_64, and it doesn't work. Packets are not fragmented properly (fragment offsets are not calculated).
It is true that the TX side doesn't work as hard (OS doesn't need to do the fragmentation), but traffic is not sent properly on the wire.
I'll do further investigation and get back with more details.
Yevgeny
^ permalink raw reply
* Re: [PATCH v2] isdnloop: fix and simplify isdnloop_init()
From: Karsten Keil @ 2012-08-03 8:47 UTC (permalink / raw)
To: Fengguang Wu
Cc: devel, isdn, netdev, linux-kernel, gregkh, joe, David Miller,
dan.carpenter
In-Reply-To: <20120803073240.GA12723@localhost>
Am 03.08.2012 09:32, schrieb Fengguang Wu:
> On Thu, Aug 02, 2012 at 04:21:56PM -0700, David Miller wrote:
>> From: Fengguang Wu <fengguang.wu@intel.com>
>> Date: Thu, 2 Aug 2012 19:05:43 +0800
>>
>>> Fix a buffer overflow bug by removing the revision transform code.
>>>
>>> [ 22.016214] isdnloop-ISDN-driver Rev 1.11.6.7
>>> [ 22.097508] isdnloop: (loop0) virtual card added
>>> [ 22.174400] Kernel panic - not syncing: stack-protector: Kernel stack is corrupted in: ffffffff83244972
>>> [ 22.174400]
>>> [ 22.436157] Pid: 1, comm: swapper Not tainted 3.5.0-bisect-00018-gfa8bbb1-dirty #129
>>> [ 22.624071] Call Trace:
>>> [ 22.720558] [<ffffffff832448c3>] ? CallcNew+0x56/0x56
>>> [ 22.815248] [<ffffffff8222b623>] panic+0x110/0x329
>>> [ 22.914330] [<ffffffff83244972>] ? isdnloop_init+0xaf/0xb1
>>> [ 23.014800] [<ffffffff832448c3>] ? CallcNew+0x56/0x56
>>> [ 23.090763] [<ffffffff8108e24b>] __stack_chk_fail+0x2b/0x30
>>> [ 23.185748] [<ffffffff83244972>] isdnloop_init+0xaf/0xb1
>>>
>>> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
>>
>> The reason the "$Revision ..." prefix is there is so that automated
>> version control tools will change the string automatically when code
>> is committed in CVS.
>>
>> In the GIT era this revision style is obsolete.
>>
>> Therefore you might as well just delete this crap altogether.
>
> OK. The below updated version will simply print the hard coded
> revision number as it's unlikely to change any more.
>
> Thanks,
> Fengguang
> ---
> isdnloop: fix and simplify isdnloop_init
>
> Fix a buffer overflow bug by hard coding the revision number.
>
> [ 22.016214] isdnloop-ISDN-driver Rev 1.11.6.7
> [ 22.097508] isdnloop: (loop0) virtual card added
> [ 22.174400] Kernel panic - not syncing: stack-protector: Kernel stack is corrupted in: ffffffff83244972
> [ 22.174400]
> [ 22.436157] Pid: 1, comm: swapper Not tainted 3.5.0-bisect-00018-gfa8bbb1-dirty #129
> [ 22.624071] Call Trace:
> [ 22.720558] [<ffffffff832448c3>] ? CallcNew+0x56/0x56
> [ 22.815248] [<ffffffff8222b623>] panic+0x110/0x329
> [ 22.914330] [<ffffffff83244972>] ? isdnloop_init+0xaf/0xb1
> [ 23.014800] [<ffffffff832448c3>] ? CallcNew+0x56/0x56
> [ 23.090763] [<ffffffff8108e24b>] __stack_chk_fail+0x2b/0x30
> [ 23.185748] [<ffffffff83244972>] isdnloop_init+0xaf/0xb1
>
> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
> ---
> drivers/isdn/isdnloop/isdnloop.c | 12 +-----------
> 1 file changed, 1 insertion(+), 11 deletions(-)
>
> --- linux.orig/drivers/isdn/isdnloop/isdnloop.c 2012-08-03 15:24:49.047544323 +0800
> +++ linux/drivers/isdn/isdnloop/isdnloop.c 2012-08-03 15:27:39.503548375 +0800
> @@ -16,7 +16,6 @@
> #include <linux/sched.h>
> #include "isdnloop.h"
>
> -static char *revision = "$Revision: 1.11.6.7 $";
> static char *isdnloop_id = "loop0";
>
> MODULE_DESCRIPTION("ISDN4Linux: Pseudo Driver that simulates an ISDN card");
> @@ -1494,16 +1493,7 @@ isdnloop_addcard(char *id1)
> static int __init
> isdnloop_init(void)
> {
> - char *p;
> - char rev[10];
> -
> - if ((p = strchr(revision, ':'))) {
> - strcpy(rev, p + 1);
> - p = strchr(rev, '$');
> - *p = 0;
> - } else
> - strcpy(rev, " ??? ");
> - printk(KERN_NOTICE "isdnloop-ISDN-driver Rev%s\n", rev);
> + printk(KERN_NOTICE "isdnloop-ISDN-driver Rev 1.11.6.7\n");
>
> if (isdnloop_id)
> return (isdnloop_addcard(isdnloop_id));
>
>
You could remove the revision completely, even from the printk.
Maybe use pr_notice("isdnloop-ISDN driver loaded\n");
Best Regards
Karsten
^ permalink raw reply
* Re: [PATCH 0/4] net/mlx4: Fixes to mlx4 driver
From: David Miller @ 2012-08-03 8:50 UTC (permalink / raw)
To: yevgenyp; +Cc: netdev
In-Reply-To: <953B660C027164448AE903364AC447D2871F0C73@MTLDAG01.mtl.com>
From: Yevgeny Petrilin <yevgenyp@mellanox.com>
Date: Fri, 3 Aug 2012 07:20:50 +0000
> Can you please apply the other 3 or should I resubmit them?
You should always resubmit the entire series when one of your patches
needs changes or is rejected.
^ permalink raw reply
* Re: [PATCH v2] isdnloop: fix and simplify isdnloop_init()
From: David Miller @ 2012-08-03 8:51 UTC (permalink / raw)
To: fengguang.wu
Cc: netdev, dan.carpenter, gregkh, devel, joe, isdn, linux-kernel
In-Reply-To: <20120803073240.GA12723@localhost>
From: Fengguang Wu <fengguang.wu@intel.com>
Date: Fri, 3 Aug 2012 15:32:40 +0800
> On Thu, Aug 02, 2012 at 04:21:56PM -0700, David Miller wrote:
>> From: Fengguang Wu <fengguang.wu@intel.com>
>> Date: Thu, 2 Aug 2012 19:05:43 +0800
>>
>> > Fix a buffer overflow bug by removing the revision transform code.
>> >
>> > [ 22.016214] isdnloop-ISDN-driver Rev 1.11.6.7
>> > [ 22.097508] isdnloop: (loop0) virtual card added
>> > [ 22.174400] Kernel panic - not syncing: stack-protector: Kernel stack is corrupted in: ffffffff83244972
>> > [ 22.174400]
>> > [ 22.436157] Pid: 1, comm: swapper Not tainted 3.5.0-bisect-00018-gfa8bbb1-dirty #129
>> > [ 22.624071] Call Trace:
>> > [ 22.720558] [<ffffffff832448c3>] ? CallcNew+0x56/0x56
>> > [ 22.815248] [<ffffffff8222b623>] panic+0x110/0x329
>> > [ 22.914330] [<ffffffff83244972>] ? isdnloop_init+0xaf/0xb1
>> > [ 23.014800] [<ffffffff832448c3>] ? CallcNew+0x56/0x56
>> > [ 23.090763] [<ffffffff8108e24b>] __stack_chk_fail+0x2b/0x30
>> > [ 23.185748] [<ffffffff83244972>] isdnloop_init+0xaf/0xb1
>> >
>> > Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
>>
>> The reason the "$Revision ..." prefix is there is so that automated
>> version control tools will change the string automatically when code
>> is committed in CVS.
>>
>> In the GIT era this revision style is obsolete.
>>
>> Therefore you might as well just delete this crap altogether.
>
> OK. The below updated version will simply print the hard coded
> revision number as it's unlikely to change any more.
This is worse, I said delete this crap altogether.
^ permalink raw reply
* Re: skb_warn_bad_offload with kernel 3.5 (maybe gso/bridge related ?)
From: Eric Dumazet @ 2012-08-03 8:51 UTC (permalink / raw)
To: Yann Dupont; +Cc: netdev@vger.kernel.org, Ben Hutchings, Herbert Xu
In-Reply-To: <501B8792.6040605@univ-nantes.fr>
On Fri, 2012-08-03 at 10:10 +0200, Yann Dupont wrote:
> Hello everybody,
>
> I have a machine using ceph rbd volume, as a client (rbd module) to
> backup data.
>
> I was running kernel 3.2.22 ok. Tried 3.5.0 because some rbd fixes went in.
>
> Now, shortly after the start, my logs are filled by that :
>
> Jul 31 18:15:01 singleton.u06.univ-nantes.prive kernel: [ 1175.780860]
> WARNING: at net/core/dev.c:1888 skb_warn_bad_offload+0xb6/0xc1()
> Jul 31 18:15:01 singleton.u06.univ-nantes.prive kernel: [ 1175.780920]
> Hardware name: PowerEdge M605
> Jul 31 18:15:01 singleton.u06.univ-nantes.prive kernel: [ 1175.780990] :
> caps=(0x0000000000005000, 0x0000000000000000) len=7292 data_len=5792
> gso_size=1448 gso_type=1 ip_summed=1
> Jul 31 18:15:01 singleton.u06.univ-nantes.prive kernel: [ 1175.781071]
> Modules linked in: rbd libceph ipt_MASQUERADE iptable_nat nf_nat
> ipt_REJECT veth fuse xt_physdev xt_iprange xt_multiport ip6table_filter
> ip6_tables xt_LOG xt_limit xt_tcpudp xt_state iptable_filter ip_tables
> x_tables nf_conntrack_tftp nf_conntrack_ftp nf_conntrack_ipv4
> nf_defrag_ipv4 8021q bridge stp llc ext2 mbcache dm_round_robin
> dm_multipath scsi_dh nf_conntrack_ipv6 nf_conntrack nf_defrag_ipv6 ipv6
> powernow_k8 freq_table mperf kvm_amd snd_pcm kvm snd_timer snd soundcore
> snd_page_alloc tpm_tis tpm tpm_bios pcspkr evdev psmouse microcode
> joydev dcdbas shpchp i2c_nforce2 pci_hotplug serio_raw processor
> i2c_core hid_generic thermal_sys hed button xfs exportfs dm_mod ses
> enclosure usbhid hid sg sr_mod sd_mod cdrom usb_storage lpfc
> scsi_transport_fc scsi_tgt ohci_hcd bnx2x mptsas mptscsih bnx2 mptbase
> scsi_transport_sas crc32c scsi_mod libcrc32c mdio ehci_hcd [last
> unloaded: scsi_wait_scan]
> Jul 31 18:15:01 singleton.u06.univ-nantes.prive kernel: [ 1175.785995]
> Pid: 0, comm: swapper/0 Not tainted 3.5.0-dsiun-120521 #5
> Jul 31 18:15:01 singleton.u06.univ-nantes.prive kernel: [ 1175.786055]
> Call Trace:
> Jul 31 18:15:01 singleton.u06.univ-nantes.prive kernel: [ 1175.786108]
> <IRQ> [<ffffffff813bde00>] ? skb_warn_bad_offload+0x6f/0xc1
> Jul 31 18:15:01 singleton.u06.univ-nantes.prive kernel: [ 1175.786209]
> [<ffffffff8103a109>] ? warn_slowpath_common+0x79/0xc0
> Jul 31 18:15:01 singleton.u06.univ-nantes.prive kernel: [ 1175.786269]
> [<ffffffff8103a205>] ? warn_slowpath_fmt+0x45/0x50
> Jul 31 18:15:01 singleton.u06.univ-nantes.prive kernel: [ 1175.786330]
> [<ffffffff81068647>] ? get_nohz_timer_target+0x57/0xd0
> Jul 31 18:15:01 singleton.u06.univ-nantes.prive kernel: [ 1175.786390]
> [<ffffffff813bde47>] ? skb_warn_bad_offload+0xb6/0xc1
> Jul 31 18:15:01 singleton.u06.univ-nantes.prive kernel: [ 1175.786452]
> [<ffffffff813110e7>] ? skb_gso_segment+0x207/0x280
> Jul 31 18:15:01 singleton.u06.univ-nantes.prive kernel: [ 1175.786512]
> [<ffffffff81313f26>] ? dev_hard_start_xmit+0x1f6/0x620
> Jul 31 18:15:01 singleton.u06.univ-nantes.prive kernel: [ 1175.786574]
> [<ffffffff8132f17d>] ? sch_direct_xmit+0xfd/0x1d0
> Jul 31 18:15:01 singleton.u06.univ-nantes.prive kernel: [ 1175.786633]
> [<ffffffff813147a4>] ? dev_queue_xmit+0x454/0x610
> Jul 31 18:15:01 singleton.u06.univ-nantes.prive kernel: [ 1175.786697]
> [<ffffffffa06f3c42>] ? br_dev_queue_push_xmit+0x72/0xc0 [bridge]
> Jul 31 18:15:01 singleton.u06.univ-nantes.prive kernel: [ 1175.786762]
> [<ffffffffa06fa673>] ? br_nf_post_routing+0x223/0x340 [bridge]
> Jul 31 18:15:01 singleton.u06.univ-nantes.prive kernel: [ 1175.786825]
> [<ffffffff8133c0c4>] ? nf_iterate+0x84/0xa0
> Jul 31 18:15:01 singleton.u06.univ-nantes.prive kernel: [ 1175.786885]
> [<ffffffffa06f3bd0>] ? deliver_clone+0x60/0x60 [bridge]
> Jul 31 18:15:01 singleton.u06.univ-nantes.prive kernel: [ 1175.786945]
> [<ffffffff8133c14e>] ? nf_hook_slow+0x6e/0x130
> Jul 31 18:15:01 singleton.u06.univ-nantes.prive kernel: [ 1175.787005]
> [<ffffffffa06f3bd0>] ? deliver_clone+0x60/0x60 [bridge]
> Jul 31 18:15:01 singleton.u06.univ-nantes.prive kernel: [ 1175.787067]
> [<ffffffffa06f3f00>] ? br_multicast_flood+0x170/0x170 [bridge]
> Jul 31 18:15:01 singleton.u06.univ-nantes.prive kernel: [ 1175.787130]
> [<ffffffffa06f3f42>] ? br_forward_finish+0x42/0x50 [bridge]
> Jul 31 18:15:01 singleton.u06.univ-nantes.prive kernel: [ 1175.787193]
> [<ffffffffa06f9f29>] ? br_nf_forward_finish+0xb9/0x180 [bridge]
> Jul 31 18:15:01 singleton.u06.univ-nantes.prive kernel: [ 1175.787256]
> [<ffffffffa06faa21>] ? br_nf_forward_ip+0x291/0x3d0 [bridge]
> Jul 31 18:15:01 singleton.u06.univ-nantes.prive kernel: [ 1175.787318]
> [<ffffffff8133c0c4>] ? nf_iterate+0x84/0xa0
> Jul 31 18:15:01 singleton.u06.univ-nantes.prive kernel: [ 1175.787379]
> [<ffffffffa06a301f>] ? tcp_packet+0x82f/0xf10 [nf_conntrack]
> Jul 31 18:15:01 singleton.u06.univ-nantes.prive kernel: [ 1175.787442]
> [<ffffffffa06f3f00>] ? br_multicast_flood+0x170/0x170 [bridge]
> Jul 31 18:15:01 singleton.u06.univ-nantes.prive kernel: [ 1175.787503]
> [<ffffffff8133c14e>] ? nf_hook_slow+0x6e/0x130
> Jul 31 18:15:01 singleton.u06.univ-nantes.prive kernel: [ 1175.787563]
> [<ffffffffa06f3f00>] ? br_multicast_flood+0x170/0x170 [bridge]
> Jul 31 18:15:01 singleton.u06.univ-nantes.prive kernel: [ 1175.787626]
> [<ffffffffa06f3fe0>] ? __br_forward+0x90/0xb0 [bridge]
> Jul 31 18:15:01 singleton.u06.univ-nantes.prive kernel: [ 1175.787688]
> [<ffffffffa06f4e34>] ? br_handle_frame_finish+0x214/0x2b0 [bridge]
> Jul 31 18:15:01 singleton.u06.univ-nantes.prive kernel: [ 1175.787765]
> [<ffffffffa06fa2ab>] ? br_nf_pre_routing_finish+0x19b/0x340 [bridge]
> Jul 31 18:15:01 singleton.u06.univ-nantes.prive kernel: [ 1175.787842]
> [<ffffffffa06fb0f2>] ? br_nf_pre_routing+0x3a2/0x650 [bridge]
> Jul 31 18:15:01 singleton.u06.univ-nantes.prive kernel: [ 1175.787904]
> [<ffffffff8108b184>] ? generic_exec_single+0xb4/0xc0
> Jul 31 18:15:01 singleton.u06.univ-nantes.prive kernel: [ 1175.787964]
> [<ffffffff8133c0c4>] ? nf_iterate+0x84/0xa0
> Jul 31 18:15:01 singleton.u06.univ-nantes.prive kernel: [ 1175.788025]
> [<ffffffffa06f4c20>] ? br_handle_local_finish+0x50/0x50 [bridge]
> Jul 31 18:15:01 singleton.u06.univ-nantes.prive kernel: [ 1175.788087]
> [<ffffffff8133c14e>] ? nf_hook_slow+0x6e/0x130
> Jul 31 18:15:01 singleton.u06.univ-nantes.prive kernel: [ 1175.788147]
> [<ffffffffa06f4c20>] ? br_handle_local_finish+0x50/0x50 [bridge]
> Jul 31 18:15:01 singleton.u06.univ-nantes.prive kernel: [ 1175.788210]
> [<ffffffffa06f5098>] ? br_handle_frame+0x1c8/0x260 [bridge]
> Jul 31 18:15:01 singleton.u06.univ-nantes.prive kernel: [ 1175.788273]
> [<ffffffffa06f4ed0>] ? br_handle_frame_finish+0x2b0/0x2b0 [bridge]
> Jul 31 18:15:01 singleton.u06.univ-nantes.prive kernel: [ 1175.788348]
> [<ffffffff813121b8>] ? __netif_receive_skb+0x418/0x5a0
> Jul 31 18:15:01 singleton.u06.univ-nantes.prive kernel: [ 1175.788409]
> [<ffffffffa0736954>] ? ipt_do_table+0x344/0x5e0 [ip_tables]
> Jul 31 18:15:01 singleton.u06.univ-nantes.prive kernel: [ 1175.788470]
> [<ffffffff813124ca>] ? netif_receive_skb+0x1a/0x80
> Jul 31 18:15:01 singleton.u06.univ-nantes.prive kernel: [ 1175.788530]
> [<ffffffff81312620>] ? napi_skb_finish+0x50/0x70
> Jul 31 18:15:01 singleton.u06.univ-nantes.prive kernel: [ 1175.788599]
> [<ffffffffa0126bc6>] ? bnx2x_rx_int+0x656/0x13d0 [bnx2x]
> Jul 31 18:15:01 singleton.u06.univ-nantes.prive kernel: [ 1175.788671]
> [<ffffffffa01994ae>] ? lpfc_sli_handle_fast_ring_event+0x26e/0x5d0 [lpfc]
> Jul 31 18:15:01 singleton.u06.univ-nantes.prive kernel: [ 1175.788748]
> [<ffffffffa071abf5>] ? ipv4_confirm+0x175/0x200 [nf_conntrack_ipv4]
> Jul 31 18:15:01 singleton.u06.univ-nantes.prive kernel: [ 1175.788828]
> [<ffffffffa0129073>] ? bnx2x_poll+0x93/0x2b0 [bnx2x]
> Jul 31 18:15:01 singleton.u06.univ-nantes.prive kernel: [ 1175.788889]
> [<ffffffff81312e98>] ? net_rx_action+0x138/0x220
> Jul 31 18:15:01 singleton.u06.univ-nantes.prive kernel: [ 1175.788949]
> [<ffffffff810424ae>] ? __do_softirq+0xae/0x1c0
> Jul 31 18:15:01 singleton.u06.univ-nantes.prive kernel: [ 1175.789009]
> [<ffffffff813c281c>] ? call_softirq+0x1c/0x30
> Jul 31 18:15:01 singleton.u06.univ-nantes.prive kernel: [ 1175.789068]
> [<ffffffff81004b95>] ? do_softirq+0x75/0xb0
> Jul 31 18:15:01 singleton.u06.univ-nantes.prive kernel: [ 1175.789127]
> [<ffffffff81042845>] ? irq_exit+0xa5/0xb0
> Jul 31 18:15:01 singleton.u06.univ-nantes.prive kernel: [ 1175.789185]
> [<ffffffff8100480b>] ? do_IRQ+0x5b/0xd0
> Jul 31 18:15:01 singleton.u06.univ-nantes.prive kernel: [ 1175.789243]
> [<ffffffff813c0aea>] ? common_interrupt+0x6a/0x6a
> Jul 31 18:15:01 singleton.u06.univ-nantes.prive kernel: [ 1175.789301]
> <EOI> [<ffffffff8104ac21>] ? get_next_timer_interrupt+0x1e1/0x280
> Jul 31 18:15:01 singleton.u06.univ-nantes.prive kernel: [ 1175.789414]
> [<ffffffff8102ab82>] ? native_safe_halt+0x2/0x10
> Jul 31 18:15:01 singleton.u06.univ-nantes.prive kernel: [ 1175.789474]
> [<ffffffff8100b847>] ? default_idle+0x47/0x190
> Jul 31 18:15:01 singleton.u06.univ-nantes.prive kernel: [ 1175.789533]
> [<ffffffff8100b9e0>] ? amd_e400_idle+0x50/0x110
> Jul 31 18:15:01 singleton.u06.univ-nantes.prive kernel: [ 1175.789593]
> [<ffffffff8100c466>] ? cpu_idle+0xb6/0xd0
> Jul 31 18:15:01 singleton.u06.univ-nantes.prive kernel: [ 1175.789651]
> [<ffffffff8157fb77>] ? start_kernel+0x366/0x371
> Jul 31 18:15:01 singleton.u06.univ-nantes.prive kernel: [ 1175.789711]
> [<ffffffff8157f627>] ? repair_env_string+0x5b/0x5b
> Jul 31 18:15:01 singleton.u06.univ-nantes.prive kernel: [ 1175.789771]
> [<ffffffff8157f436>] ? x86_64_start_kernel+0x105/0x114
> Jul 31 18:15:01 singleton.u06.univ-nantes.prive kernel: [ 1175.789831]
> ---[ end trace ad41e3fec21667dd ]---
>
>
> Shorter traces :
> Aug 1 14:37:41 singleton.u06.univ-nantes.prive kernel: [74424.537129]
> WARNING: at net/core/dev.c:1888 skb_warn_bad_offload+0xb6/0xc1()
> Aug 1 14:37:41 singleton.u06.univ-nantes.prive kernel: [74424.537156]
> Hardware name: PowerEdge M605
> Aug 1 14:37:41 singleton.u06.univ-nantes.prive kernel: [74424.537178] :
> caps=(0x0000000000005000, 0x0000000000000000) len=23220 data_len=21720
> gso_size=1448 gso_type=1 ip_summed=1
> Aug 1 14:37:41 singleton.u06.univ-nantes.prive kernel: [74424.537226]
> Modules linked in: rbd libceph ipt_MASQUERADE iptable_nat nf_nat
> ipt_REJECT veth fuse xt_physdev xt_iprange xt_multiport ip6table_filter
> ip6_tables xt_LOG xt_limit xt_tcpudp xt_state iptable_filter ip_tables
> x_tables nf_conntrack_tftp nf_conntrack_ftp nf_conntrack_ipv4
> nf_defrag_ipv4 8021q bridge stp llc ext2 mbcache dm_round_robin
> dm_multipath scsi_dh nf_conntrack_ipv6 nf_conntrack nf_defrag_ipv6 ipv6
> powernow_k8 freq_table mperf kvm_amd snd_pcm kvm snd_timer snd soundcore
> snd_page_alloc tpm_tis tpm tpm_bios pcspkr evdev psmouse microcode
> joydev dcdbas shpchp i2c_nforce2 pci_hotplug serio_raw processor
> i2c_core hid_generic thermal_sys hed button xfs exportfs dm_mod ses
> enclosure usbhid hid sg sr_mod sd_mod cdrom usb_storage lpfc
> scsi_transport_fc scsi_tgt ohci_hcd bnx2x mptsas mptscsih bnx2 mptbase
> scsi_transport_sas crc32c scsi_mod libcrc32c mdio ehci_hcd [last
> unloaded: scsi_wait_scan]
> Aug 1 14:37:41 singleton.u06.univ-nantes.prive kernel: [74424.537632]
> Pid: 22553, comm: smtp Tainted: G W 3.5.0-dsiun-120521 #5
> Aug 1 14:37:41 singleton.u06.univ-nantes.prive kernel: [74424.537673]
> Call Trace:
> Aug 1 14:37:41 singleton.u06.univ-nantes.prive kernel: [74424.537691]
> <IRQ> [<ffffffff813bde00>] ? skb_warn_bad_offload+0x6f/0xc1
> Aug 1 14:37:41 singleton.u06.univ-nantes.prive kernel: [74424.537720]
> [<ffffffff8103a109>] ? warn_slowpath_common+0x79/0xc0
> Aug 1 14:37:41 singleton.u06.univ-nantes.prive kernel: [74424.537747]
> [<ffffffff8103a205>] ? warn_slowpath_fmt+0x45/0x50
> Aug 1 14:37:41 singleton.u06.univ-nantes.prive kernel: [74424.537773]
> [<ffffffff813bde47>] ? skb_warn_bad_offload+0xb6/0xc1
> Aug 1 14:37:41 singleton.u06.univ-nantes.prive kernel: [74424.537800]
> [<ffffffff813110e7>] ? skb_gso_segment+0x207/0x280
> Aug 1 14:37:41 singleton.u06.univ-nantes.prive kernel: [74424.537826]
> [<ffffffff81313f26>] ? dev_hard_start_xmit+0x1f6/0x620
> Aug 1 14:37:41 singleton.u06.univ-nantes.prive kernel: [74424.537853]
> [<ffffffff8132f17d>] ? sch_direct_xmit+0xfd/0x1d0
> Aug 1 14:37:41 singleton.u06.univ-nantes.prive kernel: [74424.537879]
> [<ffffffff813147a4>] ? dev_queue_xmit+0x454/0x610
> Aug 1 14:37:41 singleton.u06.univ-nantes.prive kernel: [74424.537907]
> [<ffffffffa06f3c42>] ? br_dev_queue_push_xmit+0x72/0xc0 [bridge]
> Aug 1 14:37:41 singleton.u06.univ-nantes.prive kernel: [74424.537937]
> [<ffffffffa06fa673>] ? br_nf_post_routing+0x223/0x340 [bridge]
> Aug 1 14:37:41 singleton.u06.univ-nantes.prive kernel: [74424.538103]
> [<ffffffffa06f3f42>] ? br_forward_finish+0x42/0x50 [bridge]
> Aug 1 14:37:41 singleton.u06.univ-nantes.prive kernel: [74424.538132]
> [<ffffffffa06f9f29>] ? br_nf_forward_finish+0xb9/0x180 [bridge]
> Aug 1 14:37:41 singleton.u06.univ-nantes.prive kernel: [74424.538704]
> [<ffffffff813124ca>] ? netif_receive_skb+0x1a/0x80
> Aug 1 14:37:41 singleton.u06.univ-nantes.prive kernel: [74424.539024]
> <EOI>
> Aug 1 14:37:41 singleton.u06.univ-nantes.prive kernel: [74424.539162] :
> caps=(0x0000000000005000, 0x0000000000000000) len=6250 data_len=4750
> gso_size=1448 gso_type=1 ip_summed=1
> Aug 1 14:37:41 singleton.u06.univ-nantes.prive kernel: [74424.539209]
> Modules linked in: rbd libceph ipt_MASQUERADE iptable_nat nf_nat
> ipt_REJECT veth fuse xt_physdev xt_iprange xt_multiport ip6table_filter
> ip6_tables xt_LOG xt_limit xt_tcpudp xt_state iptable_filter ip_tables
> x_tables nf_conntrack_tftp nf_conntrack_ftp nf_conntrack_ipv4
> nf_defrag_ipv4 8021q bridge stp llc ext2 mbcache dm_round_robin
> dm_multipath scsi_dh nf_conntrack_ipv6 nf_conntrack nf_defrag_ipv6 ipv6
> powernow_k8 freq_table mperf kvm_amd snd_pcm kvm snd_timer snd soundcore
> snd_page_alloc tpm_tis tpm tpm_bios pcspkr evdev psmouse microcode
> joydev dcdbas shpchp i2c_nforce2 pci_hotplug serio_raw processor
> i2c_core hid_generic thermal_sys hed button xfs exportfs dm_mod ses
> enclosure usbhid hid sg sr_mod sd_mod cdrom usb_storage lpfc
> scsi_transport_fc scsi_tgt ohci_hcd bnx2x mptsas mptscsih bnx2 mptbase
> scsi_transport_sas crc32c scsi_mod libcrc32c mdio ehci_hcd [last
> unloaded: scsi_wait_scan]
> Aug 1 14:37:41 singleton.u06.univ-nantes.prive kernel: [74424.539614]
> Pid: 22553, comm: smtp Tainted: G W 3.5.0-dsiun-120521 #5
> Aug 1 14:37:41 singleton.u06.univ-nantes.prive kernel: [74424.539654]
> Call Trace:
> Aug 1 14:37:41 singleton.u06.univ-nantes.prive kernel: [74424.539673]
> <IRQ> [<ffffffff813bde00>] ? skb_warn_bad_offload+0x6f/0xc1
> Aug 1 14:37:41 singleton.u06.univ-nantes.prive kernel: [74424.539702]
> [<ffffffff8103a109>] ? warn_slowpath_common+0x79/0xc0
> Aug 1 14:37:41 singleton.u06.univ-nantes.prive kernel: [74424.539728]
> [<ffffffff8103a205>] ? warn_slowpath_fmt+0x45/0x50
> Aug 1 14:37:41 singleton.u06.univ-nantes.prive kernel: [74424.539755]
> [<ffffffff813bde47>] ? skb_warn_bad_offload+0xb6/0xc1
> Aug 1 14:37:41 singleton.u06.univ-nantes.prive kernel: [74424.539782]
> [<ffffffff813110e7>] ? skb_gso_segment+0x207/0x280
> Aug 1 14:37:41 singleton.u06.univ-nantes.prive kernel: [74424.539808]
> [<ffffffff81313f26>] ? dev_hard_start_xmit+0x1f6/0x620
> Aug 1 14:37:41 singleton.u06.univ-nantes.prive kernel: [74424.540933]
> [<ffffffff81042845>] ? irq_exit+0xa5/0xb0
> Aug 1 14:37:41 singleton.u06.univ-nantes.prive kernel: [74424.543067]
> [<ffffffff813147a4>] ? dev_queue_xmit+0x454/0x610
> Aug 1 14:37:41 singleton.u06.univ-nantes.prive kernel: [74424.543095]
> [<ffffffffa06f3c42>] ? br_dev_queue_push_xmit+0x72/0xc0 [bridge]
> Aug 1 14:37:41 singleton.u06.univ-nantes.prive kernel: [74424.543125]
> [<ffffffffa06fa673>] ? br_nf_post_routing+0x223/0x340 [bridge]
> Aug 1 14:37:41 singleton.u06.univ-nantes.prive kernel: [74424.543514]
> [<ffffffffa06f3fe0>] ? __br_forward+0x90/0xb0 [bridge]
> Aug 1 14:37:41 singleton.u06.univ-nantes.prive kernel: [74424.543585]
> [<ffffffffa06fa2ab>] ? br_nf_pre_routing_finish+0x19b/0x340 [bridge]
> Aug 1 14:37:41 singleton.u06.univ-nantes.prive kernel: [74424.543629]
> [<ffffffffa06fb0f2>] ? br_nf_pre_routing+0x3a2/0x650 [bridge]
> Aug 1 14:37:41 singleton.u06.univ-nantes.prive kernel: [74424.543657]
> [<ffffffff8133c0c4>] ? nf_iterate+0x84/0xa0
> Aug 1 14:37:41 singleton.u06.univ-nantes.prive kernel: [74424.543684]
> [<ffffffffa06f4c20>] ? br_handle_local_finish+0x50/0x50 [bridge]
> Aug 1 14:37:41 singleton.u06.univ-nantes.prive kernel: [74424.543712]
> [<ffffffff8133c14e>] ? nf_hook_slow+0x6e/0x130
> Aug 1 14:37:41 singleton.u06.univ-nantes.prive kernel: [74424.543739]
> [<ffffffffa06f4c20>] ? br_handle_local_finish+0x50/0x50 [bridge]
> Aug 1 14:37:41 singleton.u06.univ-nantes.prive kernel: [74424.543767]
> [<ffffffff8133c14e>] ? nf_hook_slow+0x6e/0x130
> Aug 1 14:37:41 singleton.u06.univ-nantes.prive kernel: [74424.543795]
> [<ffffffffa06f5098>] ? br_handle_frame+0x1c8/0x260 [bridge]
>
> Despite thoses messages, the machine is still running OK. It runs lxc
> instances (and so , bridge & tun/tap), only one of thoses instances uses
> rbd.
>
> I don't think the problem is ceph related.
>
> This machine have bnx2 (Gb) & bnx2x (10Gb) - Lots of trafic is using
> bnx2x-.
>
> I'm running 3.5.0 on other hosts (bnx2/bnx2x or ixgbe drivers) without
> problems. But it's not the same workload.
>
> As the problem seems more or less gso related, I've deactivated gso two
> days ago. This cure the symptom, running ok since.
>
> Anyone here seeing this problem ?
>
> Cheers,
>
I dont know, maybe its more a GRO issue ?
When a NIC delivers skbs with ip_summed set to CHECKSUM_UNNECESSARY,
should resulting GRO packet have ip_summed set to CHECKSUM_PARTIAL ?
CC Ben and Herbert
^ permalink raw reply
* Re: [PATCH] ipv4: remove parentheses in return statement
From: David Miller @ 2012-08-03 8:52 UTC (permalink / raw)
To: sakiwit; +Cc: netdev
In-Reply-To: <1343979790-17408-1-git-send-email-sakiwit@gmail.com>
From: Jean Sacren <sakiwit@gmail.com>
Date: Fri, 3 Aug 2012 01:43:10 -0600
> It is always wrong to write 'return (...)'.
In your imagination.
> After removal, realign the code where necessary.
>
> Signed-off-by: Jean Sacren <sakiwit@gmail.com>
> - return ((val ^ (val >> 8) ^ (val >> 16) ^ (val >> 24)) &
> - (IN4_ADDR_HSIZE - 1));
> + return (val ^ (val >> 8) ^ (val >> 16) ^ (val >> 24)) &
> + (IN4_ADDR_HSIZE - 1);
Those parenthesis are there to make the evaluation order and
grouping explicit.
The other ones you changed are wrong for similar reasons.
I absolutely am not applying patches like this.
^ permalink raw reply
* Re: Premature timeout for MLDv1 Host compatibility mode?
From: Dragos Ilie @ 2012-08-03 8:54 UTC (permalink / raw)
To: David Stevens; +Cc: netdev, netdev-owner
In-Reply-To: <OFA8EDA0BC.A9D42E39-ON85257A4E.004ECE32-85257A4E.004F3FC7@us.ibm.com>
Hi David,
I have been thinking about how to address your concerns about the
MLDv1-mode timeout. Unfortunately, I think by doing that we would stop
being compliant with RFC 3810 on the following points:
a) Section 5.1.9 states that the QQIC field is meant for other
multicast routers that are not the current querier. I "grep-ed" after
mld2q_qqic in the entire kernel source tree and it is not being used
at all. I take this as a sign that the field is not to be interpreted
by listeners. Of course, that does not mean we cannot use it, but see
b) below
b) Section 8.3.1 says that "if an MLDv1 router is present on the link,
the Querier MUST use the lowest version of MLD present on the
network". Also, "if an MLDv1 router is present on the link, the system
administrator must explicitly configure all MLDv2 routers to act in
MLDv1 mode". It seems to me that these statements together preclude a
scenario with MLDv1 and MLDv2 routers mixed together on the same link,
unless all routers speak MLDv1.
The current implementation for MLDv1 compatibility mode works very
badly. The listeners fail most of the time to join the groups on the
MLDv1 server. I suggest that my patch sent earlier this week is
pushed upstream, unless there are concerns that it will make things
worse than they are today. This will improve the behavior of MLDv2
listeners with MLDv1 routers and keep us compliant with the RFC. What
do you think?
On Thu, Aug 2, 2012 at 4:25 PM, David Stevens <dlstevens@us.ibm.com> wrote:
> netdev-owner@vger.kernel.org wrote on 08/02/2012 10:03:24 AM:
>
>> > The QQIC would come from v2 queries prior to the v1 query that
>> > triggered us to switch to v1. But, see below.
>>
>> How about the scenario where you have only MLDv1 queriers? There will
>> be no prior v2 query
>
> Yes, this is why I suggested initializing it to the
> default of 125. If we actually saw v2 queries with different
> intervals, we'd adjust longer or shorter, but use the default
> only when we had no queries to update it.
>
> +-DLS
>
> --
> 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
* [PATCH v3] isdnloop: fix and simplify isdnloop_init()
From: Fengguang Wu @ 2012-08-03 9:10 UTC (permalink / raw)
To: David Miller
Cc: netdev, dan.carpenter, gregkh, devel, joe, isdn, linux-kernel
In-Reply-To: <20120803.015126.198679260163049459.davem@davemloft.net>
Fix a buffer overflow bug by removing the revision and printk.
[ 22.016214] isdnloop-ISDN-driver Rev 1.11.6.7
[ 22.097508] isdnloop: (loop0) virtual card added
[ 22.174400] Kernel panic - not syncing: stack-protector: Kernel stack is corrupted in: ffffffff83244972
[ 22.174400]
[ 22.436157] Pid: 1, comm: swapper Not tainted 3.5.0-bisect-00018-gfa8bbb1-dirty #129
[ 22.624071] Call Trace:
[ 22.720558] [<ffffffff832448c3>] ? CallcNew+0x56/0x56
[ 22.815248] [<ffffffff8222b623>] panic+0x110/0x329
[ 22.914330] [<ffffffff83244972>] ? isdnloop_init+0xaf/0xb1
[ 23.014800] [<ffffffff832448c3>] ? CallcNew+0x56/0x56
[ 23.090763] [<ffffffff8108e24b>] __stack_chk_fail+0x2b/0x30
[ 23.185748] [<ffffffff83244972>] isdnloop_init+0xaf/0xb1
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
---
drivers/isdn/isdnloop/isdnloop.c | 12 ------------
1 file changed, 12 deletions(-)
--- linux.orig/drivers/isdn/isdnloop/isdnloop.c 2012-08-03 16:39:08.543650310 +0800
+++ linux/drivers/isdn/isdnloop/isdnloop.c 2012-08-03 17:08:07.515691639 +0800
@@ -16,7 +16,6 @@
#include <linux/sched.h>
#include "isdnloop.h"
-static char *revision = "$Revision: 1.11.6.7 $";
static char *isdnloop_id = "loop0";
MODULE_DESCRIPTION("ISDN4Linux: Pseudo Driver that simulates an ISDN card");
@@ -1494,17 +1493,6 @@ isdnloop_addcard(char *id1)
static int __init
isdnloop_init(void)
{
- char *p;
- char rev[10];
-
- if ((p = strchr(revision, ':'))) {
- strcpy(rev, p + 1);
- p = strchr(rev, '$');
- *p = 0;
- } else
- strcpy(rev, " ??? ");
- printk(KERN_NOTICE "isdnloop-ISDN-driver Rev%s\n", rev);
-
if (isdnloop_id)
return (isdnloop_addcard(isdnloop_id));
^ permalink raw reply
* Re: [PATCH 1/7] netpoll: use GFP_ATOMIC in slave_enable_netpoll() and __netpoll_setup()
From: Eric Dumazet @ 2012-08-03 9:17 UTC (permalink / raw)
To: Cong Wang
Cc: netdev, David S. Miller, Jay Vosburgh, Andy Gospodarek,
Eric Dumazet, Cong Wang, Joe Perches, Neil Horman, linux-kernel
In-Reply-To: <1343403484-29347-2-git-send-email-amwang@redhat.com>
On Fri, 2012-07-27 at 23:37 +0800, Cong Wang wrote:
> slave_enable_netpoll() and __netpoll_setup() may be called
> with read_lock() held, so should use GFP_ATOMIC to allocate
> memory.
>
> Cc: "David S. Miller" <davem@davemloft.net>
> Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
> Signed-off-by: Cong Wang <amwang@redhat.com>
> ---
> drivers/net/bonding/bond_main.c | 2 +-
> net/core/netpoll.c | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
> index 6fae5f3..ab773d4 100644
> --- a/drivers/net/bonding/bond_main.c
> +++ b/drivers/net/bonding/bond_main.c
> @@ -1235,7 +1235,7 @@ static inline int slave_enable_netpoll(struct slave *slave)
> struct netpoll *np;
> int err = 0;
>
> - np = kzalloc(sizeof(*np), GFP_KERNEL);
> + np = kzalloc(sizeof(*np), GFP_ATOMIC);
> err = -ENOMEM;
> if (!np)
> goto out;
> diff --git a/net/core/netpoll.c b/net/core/netpoll.c
> index b4c90e4..c78a966 100644
> --- a/net/core/netpoll.c
> +++ b/net/core/netpoll.c
> @@ -734,7 +734,7 @@ int __netpoll_setup(struct netpoll *np, struct net_device *ndev)
> }
>
> if (!ndev->npinfo) {
> - npinfo = kmalloc(sizeof(*npinfo), GFP_KERNEL);
> + npinfo = kmalloc(sizeof(*npinfo), GFP_ATOMIC);
> if (!npinfo) {
> err = -ENOMEM;
> goto out;
Yes this works, but maybe you instead could pass/add a gfp_t flags
argument to __netpoll_setup() ?
Management tasks should allow GFP_KERNEL allocations to have less
failure risks.
Its sad bonding uses the rwlock here instead of a mutex
^ permalink raw reply
* Re: [PATCH] ipv4: remove parentheses in return statement
From: Eric Dumazet @ 2012-08-03 9:19 UTC (permalink / raw)
To: Jean Sacren; +Cc: netdev
In-Reply-To: <1343979790-17408-1-git-send-email-sakiwit@gmail.com>
On Fri, 2012-08-03 at 01:43 -0600, Jean Sacren wrote:
> @@ -106,8 +106,8 @@ static inline unsigned int inet_addr_hash(struct net *net, __be32 addr)
> {
> u32 val = (__force u32) addr ^ hash_ptr(net, 8);
>
> - return ((val ^ (val >> 8) ^ (val >> 16) ^ (val >> 24)) &
> - (IN4_ADDR_HSIZE - 1));
> + return (val ^ (val >> 8) ^ (val >> 16) ^ (val >> 24)) &
> + (IN4_ADDR_HSIZE - 1);
> }
BTW This should use a faster implementation, I'll send a patch when
net-next is opened.
^ permalink raw reply
* Re: [PATCH] ipv4: remove parentheses in return statement
From: David Miller @ 2012-08-03 9:22 UTC (permalink / raw)
To: eric.dumazet; +Cc: sakiwit, netdev
In-Reply-To: <1343985584.9299.873.camel@edumazet-glaptop>
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Fri, 03 Aug 2012 11:19:44 +0200
> On Fri, 2012-08-03 at 01:43 -0600, Jean Sacren wrote:
>
>> @@ -106,8 +106,8 @@ static inline unsigned int inet_addr_hash(struct net *net, __be32 addr)
>> {
>> u32 val = (__force u32) addr ^ hash_ptr(net, 8);
>>
>> - return ((val ^ (val >> 8) ^ (val >> 16) ^ (val >> 24)) &
>> - (IN4_ADDR_HSIZE - 1));
>> + return (val ^ (val >> 8) ^ (val >> 16) ^ (val >> 24)) &
>> + (IN4_ADDR_HSIZE - 1);
>> }
>
> BTW This should use a faster implementation, I'll send a patch when
> net-next is opened.
There seems to be a few spots where we want the pointer "as a 32-bit
integer" for hashing. We were discussing arp_hashfn() and ndisc_hashfn()
the other day.
It should basically do something like:
(u32) ((u64)ptr >> 32 | ((u32) ptr))
on 64-bit and simply (u32)(ptr) on 32-bit.
^ permalink raw reply
* [PATCH v2] ipv4/ipv6: multicast api unappropriate errno fix.
From: Li Wei @ 2012-08-03 9:29 UTC (permalink / raw)
To: davem; +Cc: Li Wei, netdev, dlstevens
In-Reply-To: <1343977605-14446-1-git-send-email-lw@cn.fujitsu.com>
commit 917f2f105([IPV4]: multicast API "join" issues) corrected
some errno values but also caused unappropriate errno returned.
With an unjoined group address, return -EADDRNOTAVAIL would be
much better than -EINVAL.
Also correct the errno when to join an source group which we have
already joined to -EADDRINUSE.
Signed-off-by: Li Wei <lw@cn.fujitsu.com>
--
V2: return -EADDRINUSE when join an already joined source group.
---
net/ipv4/igmp.c | 8 +++-----
net/ipv6/mcast.c | 12 ++++++------
2 files changed, 9 insertions(+), 11 deletions(-)
diff --git a/net/ipv4/igmp.c b/net/ipv4/igmp.c
index 6699f23..c45c092 100644
--- a/net/ipv4/igmp.c
+++ b/net/ipv4/igmp.c
@@ -1933,10 +1933,8 @@ int ip_mc_source(int add, int omode, struct sock *sk, struct
(pmc->multi.imr_ifindex == imr.imr_ifindex))
break;
}
- if (!pmc) { /* must have a prior join */
- err = -EINVAL;
- goto done;
- }
+ if (!pmc) /* must have a prior join */
+ goto done; /* err = -EADDRNOTAVAIL */
/* if a source filter was set, must be the same mode as before */
if (pmc->sflist) {
if (pmc->sfmode != omode) {
@@ -2076,7 +2074,7 @@ int ip_mc_msfilter(struct sock *sk, struct ip_msfilter *msf, int ifindex)
break;
}
if (!pmc) { /* must have a prior join */
- err = -EINVAL;
+ err = -EADDRNOTAVAIL;
goto done;
}
if (msf->imsf_numsrc) {
diff --git a/net/ipv6/mcast.c b/net/ipv6/mcast.c
index 92f8e48..dcd12c0 100644
--- a/net/ipv6/mcast.c
+++ b/net/ipv6/mcast.c
@@ -347,10 +347,8 @@ int ip6_mc_source(int add, int omode, struct sock *sk,
if (ipv6_addr_equal(&pmc->addr, group))
break;
}
- if (!pmc) { /* must have a prior join */
- err = -EINVAL;
- goto done;
- }
+ if (!pmc) /* must have a prior join */
+ goto done; /* err = -EADDRNOTAVAIL */
/* if a source filter was set, must be the same mode as before */
if (pmc->sflist) {
if (pmc->sfmode != omode) {
@@ -428,8 +426,10 @@ int ip6_mc_source(int add, int omode, struct sock *sk,
if (rv == 0)
break;
}
- if (rv == 0) /* address already there is an error */
+ if (rv == 0) { /* address already there is an error */
+ err = -EADDRINUSE;
goto done;
+ }
for (j=psl->sl_count-1; j>=i; j--)
psl->sl_addr[j+1] = psl->sl_addr[j];
psl->sl_addr[i] = *source;
@@ -488,7 +488,7 @@ int ip6_mc_msfilter(struct sock *sk, struct group_filter *gsf)
break;
}
if (!pmc) { /* must have a prior join */
- err = -EINVAL;
+ err = -EADDRNOTAVAIL;
goto done;
}
if (gsf->gf_numsrc) {
--
1.7.10.1
^ permalink raw reply related
* Re: [PATCH] ipv4/ipv6: multicast api unappropriate errno fix.
From: Li Wei @ 2012-08-03 9:31 UTC (permalink / raw)
To: davem; +Cc: netdev
In-Reply-To: <1343977605-14446-1-git-send-email-lw@cn.fujitsu.com>
Hi David,
I have sent a v2 of this patch, please consider to apply that one.
thanks
^ permalink raw reply
* Re: [PATCH 1/7] netpoll: use GFP_ATOMIC in slave_enable_netpoll() and __netpoll_setup()
From: Cong Wang @ 2012-08-03 9:34 UTC (permalink / raw)
To: Eric Dumazet
Cc: netdev, David S. Miller, Jay Vosburgh, Andy Gospodarek,
Eric Dumazet, Cong Wang, Joe Perches, Neil Horman, linux-kernel
In-Reply-To: <1343985428.9299.868.camel@edumazet-glaptop>
On Fri, 2012-08-03 at 11:17 +0200, Eric Dumazet wrote:
> On Fri, 2012-07-27 at 23:37 +0800, Cong Wang wrote:
> > slave_enable_netpoll() and __netpoll_setup() may be called
> > with read_lock() held, so should use GFP_ATOMIC to allocate
> > memory.
> >
> > Cc: "David S. Miller" <davem@davemloft.net>
> > Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
> > Signed-off-by: Cong Wang <amwang@redhat.com>
> > ---
> > drivers/net/bonding/bond_main.c | 2 +-
> > net/core/netpoll.c | 2 +-
> > 2 files changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
> > index 6fae5f3..ab773d4 100644
> > --- a/drivers/net/bonding/bond_main.c
> > +++ b/drivers/net/bonding/bond_main.c
> > @@ -1235,7 +1235,7 @@ static inline int slave_enable_netpoll(struct slave *slave)
> > struct netpoll *np;
> > int err = 0;
> >
> > - np = kzalloc(sizeof(*np), GFP_KERNEL);
> > + np = kzalloc(sizeof(*np), GFP_ATOMIC);
> > err = -ENOMEM;
> > if (!np)
> > goto out;
> > diff --git a/net/core/netpoll.c b/net/core/netpoll.c
> > index b4c90e4..c78a966 100644
> > --- a/net/core/netpoll.c
> > +++ b/net/core/netpoll.c
> > @@ -734,7 +734,7 @@ int __netpoll_setup(struct netpoll *np, struct net_device *ndev)
> > }
> >
> > if (!ndev->npinfo) {
> > - npinfo = kmalloc(sizeof(*npinfo), GFP_KERNEL);
> > + npinfo = kmalloc(sizeof(*npinfo), GFP_ATOMIC);
> > if (!npinfo) {
> > err = -ENOMEM;
> > goto out;
>
> Yes this works, but maybe you instead could pass/add a gfp_t flags
> argument to __netpoll_setup() ?
>
> Management tasks should allow GFP_KERNEL allocations to have less
> failure risks.
>
> Its sad bonding uses the rwlock here instead of a mutex
>
Yup, that is a good idea. I will update this patch.
Thanks!
^ permalink raw reply
* Re: [PATCH] ipv4: remove parentheses in return statement
From: Eric Dumazet @ 2012-08-03 9:53 UTC (permalink / raw)
To: David Miller; +Cc: sakiwit, netdev
In-Reply-To: <20120803.022240.1997423719431165575.davem@davemloft.net>
On Fri, 2012-08-03 at 02:22 -0700, David Miller wrote:
> From: Eric Dumazet <eric.dumazet@gmail.com>
> Date: Fri, 03 Aug 2012 11:19:44 +0200
>
> > On Fri, 2012-08-03 at 01:43 -0600, Jean Sacren wrote:
> >
> >> @@ -106,8 +106,8 @@ static inline unsigned int inet_addr_hash(struct net *net, __be32 addr)
> >> {
> >> u32 val = (__force u32) addr ^ hash_ptr(net, 8);
> >>
> >> - return ((val ^ (val >> 8) ^ (val >> 16) ^ (val >> 24)) &
> >> - (IN4_ADDR_HSIZE - 1));
> >> + return (val ^ (val >> 8) ^ (val >> 16) ^ (val >> 24)) &
> >> + (IN4_ADDR_HSIZE - 1);
> >> }
> >
> > BTW This should use a faster implementation, I'll send a patch when
> > net-next is opened.
>
> There seems to be a few spots where we want the pointer "as a 32-bit
> integer" for hashing. We were discussing arp_hashfn() and ndisc_hashfn()
> the other day.
>
> It should basically do something like:
>
> (u32) ((u64)ptr >> 32 | ((u32) ptr))
>
> on 64-bit and simply (u32)(ptr) on 32-bit.
We already have such thing in fact : net_hash_mix() which returns 0 if
NS are not configured.
(hash_ptr(net,8) is really overkill on 64bit arches)
High order bits on "struct net *" have absolutely no entropy, unless you
have a monster machine (more than 256 GB of ram)
This is the patch I prepared :
diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c
index 44bf82e..b9753ab 100644
--- a/net/ipv4/devinet.c
+++ b/net/ipv4/devinet.c
@@ -94,25 +94,22 @@ static const struct nla_policy ifa_ipv4_policy[IFA_MAX+1] = {
[IFA_LABEL] = { .type = NLA_STRING, .len = IFNAMSIZ - 1 },
};
-/* inet_addr_hash's shifting is dependent upon this IN4_ADDR_HSIZE
- * value. So if you change this define, make appropriate changes to
- * inet_addr_hash as well.
- */
-#define IN4_ADDR_HSIZE 256
+#define IN4_ADDR_HSIZE_SHIFT 8
+#define IN4_ADDR_HSIZE (1U << IN4_ADDR_HSIZE_SHIFT)
+
static struct hlist_head inet_addr_lst[IN4_ADDR_HSIZE];
static DEFINE_SPINLOCK(inet_addr_hash_lock);
-static inline unsigned int inet_addr_hash(struct net *net, __be32 addr)
+static u32 inet_addr_hash(struct net *net, __be32 addr)
{
- u32 val = (__force u32) addr ^ hash_ptr(net, 8);
+ u32 val = (__force u32) addr ^ net_hash_mix(net);
- return ((val ^ (val >> 8) ^ (val >> 16) ^ (val >> 24)) &
- (IN4_ADDR_HSIZE - 1));
+ return hash_32(val, IN4_ADDR_HSIZE_SHIFT);
}
static void inet_hash_insert(struct net *net, struct in_ifaddr *ifa)
{
- unsigned int hash = inet_addr_hash(net, ifa->ifa_local);
+ u32 hash = inet_addr_hash(net, ifa->ifa_local);
spin_lock(&inet_addr_hash_lock);
hlist_add_head_rcu(&ifa->hash, &inet_addr_lst[hash]);
@@ -136,18 +133,18 @@ static void inet_hash_remove(struct in_ifaddr *ifa)
*/
struct net_device *__ip_dev_find(struct net *net, __be32 addr, bool devref)
{
- unsigned int hash = inet_addr_hash(net, addr);
+ u32 hash = inet_addr_hash(net, addr);
struct net_device *result = NULL;
struct in_ifaddr *ifa;
struct hlist_node *node;
rcu_read_lock();
hlist_for_each_entry_rcu(ifa, node, &inet_addr_lst[hash], hash) {
- struct net_device *dev = ifa->ifa_dev->dev;
-
- if (!net_eq(dev_net(dev), net))
- continue;
if (ifa->ifa_local == addr) {
+ struct net_device *dev = ifa->ifa_dev->dev;
+
+ if (!net_eq(dev_net(dev), net)
+ continue;
result = dev;
break;
}
^ permalink raw reply related
* Re: [PATCH 1/7] netpoll: use GFP_ATOMIC in slave_enable_netpoll() and __netpoll_setup()
From: Eric Dumazet @ 2012-08-03 10:10 UTC (permalink / raw)
To: Cong Wang
Cc: netdev, David S. Miller, Jay Vosburgh, Andy Gospodarek,
Eric Dumazet, Cong Wang, Joe Perches, Neil Horman, linux-kernel
In-Reply-To: <1343986487.20871.2.camel@cr0>
On Fri, 2012-08-03 at 17:34 +0800, Cong Wang wrote:
> On Fri, 2012-08-03 at 11:17 +0200, Eric Dumazet wrote:
> > On Fri, 2012-07-27 at 23:37 +0800, Cong Wang wrote:
> > > slave_enable_netpoll() and __netpoll_setup() may be called
> > > with read_lock() held, so should use GFP_ATOMIC to allocate
> > > memory.
> > >
> > > Cc: "David S. Miller" <davem@davemloft.net>
> > > Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
> > > Signed-off-by: Cong Wang <amwang@redhat.com>
> > > ---
> > > drivers/net/bonding/bond_main.c | 2 +-
> > > net/core/netpoll.c | 2 +-
> > > 2 files changed, 2 insertions(+), 2 deletions(-)
> > >
> > > diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
> > > index 6fae5f3..ab773d4 100644
> > > --- a/drivers/net/bonding/bond_main.c
> > > +++ b/drivers/net/bonding/bond_main.c
> > > @@ -1235,7 +1235,7 @@ static inline int slave_enable_netpoll(struct slave *slave)
> > > struct netpoll *np;
> > > int err = 0;
> > >
> > > - np = kzalloc(sizeof(*np), GFP_KERNEL);
> > > + np = kzalloc(sizeof(*np), GFP_ATOMIC);
> > > err = -ENOMEM;
> > > if (!np)
> > > goto out;
> > > diff --git a/net/core/netpoll.c b/net/core/netpoll.c
> > > index b4c90e4..c78a966 100644
> > > --- a/net/core/netpoll.c
> > > +++ b/net/core/netpoll.c
> > > @@ -734,7 +734,7 @@ int __netpoll_setup(struct netpoll *np, struct net_device *ndev)
> > > }
> > >
> > > if (!ndev->npinfo) {
> > > - npinfo = kmalloc(sizeof(*npinfo), GFP_KERNEL);
> > > + npinfo = kmalloc(sizeof(*npinfo), GFP_ATOMIC);
> > > if (!npinfo) {
> > > err = -ENOMEM;
> > > goto out;
> >
> > Yes this works, but maybe you instead could pass/add a gfp_t flags
> > argument to __netpoll_setup() ?
> >
> > Management tasks should allow GFP_KERNEL allocations to have less
> > failure risks.
> >
> > Its sad bonding uses the rwlock here instead of a mutex
> >
>
> Yup, that is a good idea. I will update this patch.
>
> Thanks!
>
I did this , just take it ;)
drivers/net/bonding/bond_main.c | 6 +++---
drivers/net/team/team.c | 14 +++++++-------
include/linux/netdevice.h | 2 +-
include/linux/netpoll.h | 2 +-
net/8021q/vlan_dev.c | 6 +++---
net/bridge/br_device.c | 10 +++++-----
net/bridge/br_if.c | 2 +-
net/bridge/br_private.h | 4 ++--
net/core/netpoll.c | 8 ++++----
9 files changed, 27 insertions(+), 27 deletions(-)
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index 6fae5f3..ccff590 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -1235,12 +1235,12 @@ static inline int slave_enable_netpoll(struct slave *slave)
struct netpoll *np;
int err = 0;
- np = kzalloc(sizeof(*np), GFP_KERNEL);
+ np = kzalloc(sizeof(*np), GFP_ATOMIC);
err = -ENOMEM;
if (!np)
goto out;
- err = __netpoll_setup(np, slave->dev);
+ err = __netpoll_setup(np, slave->dev, GFP_ATOMIC);
if (err) {
kfree(np);
goto out;
@@ -1292,7 +1292,7 @@ static void bond_netpoll_cleanup(struct net_device *bond_dev)
read_unlock(&bond->lock);
}
-static int bond_netpoll_setup(struct net_device *dev, struct netpoll_info *ni)
+static int bond_netpoll_setup(struct net_device *dev, struct netpoll_info *ni, gfp_t flags)
{
struct bonding *bond = netdev_priv(dev);
struct slave *slave;
diff --git a/drivers/net/team/team.c b/drivers/net/team/team.c
index 87707ab..3177d6b 100644
--- a/drivers/net/team/team.c
+++ b/drivers/net/team/team.c
@@ -795,16 +795,16 @@ static void team_port_leave(struct team *team, struct team_port *port)
}
#ifdef CONFIG_NET_POLL_CONTROLLER
-static int team_port_enable_netpoll(struct team *team, struct team_port *port)
+static int team_port_enable_netpoll(struct team *team, struct team_port *port, gfp_t flags)
{
struct netpoll *np;
int err;
- np = kzalloc(sizeof(*np), GFP_KERNEL);
+ np = kzalloc(sizeof(*np), flags);
if (!np)
return -ENOMEM;
- err = __netpoll_setup(np, port->dev);
+ err = __netpoll_setup(np, port->dev, flags);
if (err) {
kfree(np);
return err;
@@ -833,7 +833,7 @@ static struct netpoll_info *team_netpoll_info(struct team *team)
}
#else
-static int team_port_enable_netpoll(struct team *team, struct team_port *port)
+static int team_port_enable_netpoll(struct team *team, struct team_port *port, gfp_t flags)
{
return 0;
}
@@ -913,7 +913,7 @@ static int team_port_add(struct team *team, struct net_device *port_dev)
}
if (team_netpoll_info(team)) {
- err = team_port_enable_netpoll(team, port);
+ err = team_port_enable_netpoll(team, port, GFP_KERNEL);
if (err) {
netdev_err(dev, "Failed to enable netpoll on device %s\n",
portname);
@@ -1443,7 +1443,7 @@ static void team_netpoll_cleanup(struct net_device *dev)
}
static int team_netpoll_setup(struct net_device *dev,
- struct netpoll_info *npifo)
+ struct netpoll_info *npifo, gfp_t flags)
{
struct team *team = netdev_priv(dev);
struct team_port *port;
@@ -1451,7 +1451,7 @@ static int team_netpoll_setup(struct net_device *dev,
mutex_lock(&team->lock);
list_for_each_entry(port, &team->port_list, list) {
- err = team_port_enable_netpoll(team, port);
+ err = team_port_enable_netpoll(team, port, flags);
if (err) {
__team_netpoll_cleanup(team);
break;
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index a9db4f3..2ad76e3 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -953,7 +953,7 @@ struct net_device_ops {
#ifdef CONFIG_NET_POLL_CONTROLLER
void (*ndo_poll_controller)(struct net_device *dev);
int (*ndo_netpoll_setup)(struct net_device *dev,
- struct netpoll_info *info);
+ struct netpoll_info *info, gfp_t flags);
void (*ndo_netpoll_cleanup)(struct net_device *dev);
#endif
int (*ndo_set_vf_mac)(struct net_device *dev,
diff --git a/include/linux/netpoll.h b/include/linux/netpoll.h
index 28f5389..d67d4be3 100644
--- a/include/linux/netpoll.h
+++ b/include/linux/netpoll.h
@@ -43,7 +43,7 @@ struct netpoll_info {
void netpoll_send_udp(struct netpoll *np, const char *msg, int len);
void netpoll_print_options(struct netpoll *np);
int netpoll_parse_options(struct netpoll *np, char *opt);
-int __netpoll_setup(struct netpoll *np, struct net_device *ndev);
+int __netpoll_setup(struct netpoll *np, struct net_device *ndev, gfp_t flags);
int netpoll_setup(struct netpoll *np);
int netpoll_trap(void);
void netpoll_set_trap(int trap);
diff --git a/net/8021q/vlan_dev.c b/net/8021q/vlan_dev.c
index 73a2a83..4ca0b39 100644
--- a/net/8021q/vlan_dev.c
+++ b/net/8021q/vlan_dev.c
@@ -669,19 +669,19 @@ static void vlan_dev_poll_controller(struct net_device *dev)
return;
}
-static int vlan_dev_netpoll_setup(struct net_device *dev, struct netpoll_info *npinfo)
+static int vlan_dev_netpoll_setup(struct net_device *dev, struct netpoll_info *npinfo, gfp_t flags)
{
struct vlan_dev_priv *info = vlan_dev_priv(dev);
struct net_device *real_dev = info->real_dev;
struct netpoll *netpoll;
int err = 0;
- netpoll = kzalloc(sizeof(*netpoll), GFP_KERNEL);
+ netpoll = kzalloc(sizeof(*netpoll), flags);
err = -ENOMEM;
if (!netpoll)
goto out;
- err = __netpoll_setup(netpoll, real_dev);
+ err = __netpoll_setup(netpoll, real_dev, flags);
if (err) {
kfree(netpoll);
goto out;
diff --git a/net/bridge/br_device.c b/net/bridge/br_device.c
index 3334845..efcd36c 100644
--- a/net/bridge/br_device.c
+++ b/net/bridge/br_device.c
@@ -213,7 +213,7 @@ static void br_netpoll_cleanup(struct net_device *dev)
}
}
-static int br_netpoll_setup(struct net_device *dev, struct netpoll_info *ni)
+static int br_netpoll_setup(struct net_device *dev, struct netpoll_info *ni, gfp_t flags)
{
struct net_bridge *br = netdev_priv(dev);
struct net_bridge_port *p, *n;
@@ -223,7 +223,7 @@ static int br_netpoll_setup(struct net_device *dev, struct netpoll_info *ni)
if (!p->dev)
continue;
- err = br_netpoll_enable(p);
+ err = br_netpoll_enable(p, flags);
if (err)
goto fail;
}
@@ -236,17 +236,17 @@ fail:
goto out;
}
-int br_netpoll_enable(struct net_bridge_port *p)
+int br_netpoll_enable(struct net_bridge_port *p, gfp_t flags)
{
struct netpoll *np;
int err = 0;
- np = kzalloc(sizeof(*p->np), GFP_KERNEL);
+ np = kzalloc(sizeof(*p->np), flags);
err = -ENOMEM;
if (!np)
goto out;
- err = __netpoll_setup(np, p->dev);
+ err = __netpoll_setup(np, p->dev, flags);
if (err) {
kfree(np);
goto out;
diff --git a/net/bridge/br_if.c b/net/bridge/br_if.c
index e1144e1..171fd6b 100644
--- a/net/bridge/br_if.c
+++ b/net/bridge/br_if.c
@@ -361,7 +361,7 @@ int br_add_if(struct net_bridge *br, struct net_device *dev)
if (err)
goto err2;
- if (br_netpoll_info(br) && ((err = br_netpoll_enable(p))))
+ if (br_netpoll_info(br) && ((err = br_netpoll_enable(p, GFP_KERNEL))))
goto err3;
err = netdev_set_master(dev, br->dev);
diff --git a/net/bridge/br_private.h b/net/bridge/br_private.h
index a768b24..bfdb5ab 100644
--- a/net/bridge/br_private.h
+++ b/net/bridge/br_private.h
@@ -316,7 +316,7 @@ static inline void br_netpoll_send_skb(const struct net_bridge_port *p,
netpoll_send_skb(np, skb);
}
-extern int br_netpoll_enable(struct net_bridge_port *p);
+extern int br_netpoll_enable(struct net_bridge_port *p, gfp_t flags);
extern void br_netpoll_disable(struct net_bridge_port *p);
#else
static inline struct netpoll_info *br_netpoll_info(struct net_bridge *br)
@@ -329,7 +329,7 @@ static inline void br_netpoll_send_skb(const struct net_bridge_port *p,
{
}
-static inline int br_netpoll_enable(struct net_bridge_port *p)
+static inline int br_netpoll_enable(struct net_bridge_port *p, gfp_t flags)
{
return 0;
}
diff --git a/net/core/netpoll.c b/net/core/netpoll.c
index b4c90e4..37cc854 100644
--- a/net/core/netpoll.c
+++ b/net/core/netpoll.c
@@ -715,7 +715,7 @@ int netpoll_parse_options(struct netpoll *np, char *opt)
}
EXPORT_SYMBOL(netpoll_parse_options);
-int __netpoll_setup(struct netpoll *np, struct net_device *ndev)
+int __netpoll_setup(struct netpoll *np, struct net_device *ndev, gfp_t gfp)
{
struct netpoll_info *npinfo;
const struct net_device_ops *ops;
@@ -734,7 +734,7 @@ int __netpoll_setup(struct netpoll *np, struct net_device *ndev)
}
if (!ndev->npinfo) {
- npinfo = kmalloc(sizeof(*npinfo), GFP_KERNEL);
+ npinfo = kmalloc(sizeof(*npinfo), gfp);
if (!npinfo) {
err = -ENOMEM;
goto out;
@@ -752,7 +752,7 @@ int __netpoll_setup(struct netpoll *np, struct net_device *ndev)
ops = np->dev->netdev_ops;
if (ops->ndo_netpoll_setup) {
- err = ops->ndo_netpoll_setup(ndev, npinfo);
+ err = ops->ndo_netpoll_setup(ndev, npinfo, gfp);
if (err)
goto free_npinfo;
}
@@ -857,7 +857,7 @@ int netpoll_setup(struct netpoll *np)
refill_skbs();
rtnl_lock();
- err = __netpoll_setup(np, ndev);
+ err = __netpoll_setup(np, ndev, GFP_KERNEL);
rtnl_unlock();
if (err)
^ permalink raw reply related
* [PATCH V1 3/3] net/mlx4_core: Remove port type restrictions
From: Yevgeny Petrilin @ 2012-08-03 10:38 UTC (permalink / raw)
To: davem; +Cc: netdev, Yevgeny Petrilin
In-Reply-To: <1343990318-10744-1-git-send-email-yevgenyp@mellanox.co.il>
Port1=Eth, Port2=IB restriction is no longer required.
Having RoCE, there will always rdma port initialized over ConnectX
physical port, no matter whether the link layer is IB or Ethernet.
So we always have dual port IB device.
Signed-off-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il>
---
drivers/net/ethernet/mellanox/mlx4/main.c | 3 ---
drivers/net/ethernet/mellanox/mlx4/sense.c | 14 --------------
2 files changed, 0 insertions(+), 17 deletions(-)
diff --git a/drivers/net/ethernet/mellanox/mlx4/main.c b/drivers/net/ethernet/mellanox/mlx4/main.c
index 48d0e90..827b72d 100644
--- a/drivers/net/ethernet/mellanox/mlx4/main.c
+++ b/drivers/net/ethernet/mellanox/mlx4/main.c
@@ -157,9 +157,6 @@ int mlx4_check_port_params(struct mlx4_dev *dev,
"on this HCA, aborting.\n");
return -EINVAL;
}
- if (port_type[i] == MLX4_PORT_TYPE_ETH &&
- port_type[i + 1] == MLX4_PORT_TYPE_IB)
- return -EINVAL;
}
}
diff --git a/drivers/net/ethernet/mellanox/mlx4/sense.c b/drivers/net/ethernet/mellanox/mlx4/sense.c
index 8024982..34ee09b 100644
--- a/drivers/net/ethernet/mellanox/mlx4/sense.c
+++ b/drivers/net/ethernet/mellanox/mlx4/sense.c
@@ -81,20 +81,6 @@ void mlx4_do_sense_ports(struct mlx4_dev *dev,
}
/*
- * Adjust port configuration:
- * If port 1 sensed nothing and port 2 is IB, set both as IB
- * If port 2 sensed nothing and port 1 is Eth, set both as Eth
- */
- if (stype[0] == MLX4_PORT_TYPE_ETH) {
- for (i = 1; i < dev->caps.num_ports; i++)
- stype[i] = stype[i] ? stype[i] : MLX4_PORT_TYPE_ETH;
- }
- if (stype[dev->caps.num_ports - 1] == MLX4_PORT_TYPE_IB) {
- for (i = 0; i < dev->caps.num_ports - 1; i++)
- stype[i] = stype[i] ? stype[i] : MLX4_PORT_TYPE_IB;
- }
-
- /*
* If sensed nothing, remain in current configuration.
*/
for (i = 0; i < dev->caps.num_ports; i++)
--
1.7.7
^ permalink raw reply related
* [PATCH V1 1/3] net/mlx4_en: loopbacked packets are dropped when SMAC=DMAC
From: Yevgeny Petrilin @ 2012-08-03 10:38 UTC (permalink / raw)
To: davem; +Cc: netdev, Amir Vadai
In-Reply-To: <1343990318-10744-1-git-send-email-yevgenyp@mellanox.co.il>
From: Amir Vadai <amirv@mellanox.com>
Should NOT check SMAC=DMAC when:
1. loopback is turned on
2. validate_loopback is true.
Fixed it accordingly.
Signed-off-by: Amir Vadai <amirv@mellanox.com>
---
drivers/net/ethernet/mellanox/mlx4/en_rx.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/mellanox/mlx4/en_rx.c b/drivers/net/ethernet/mellanox/mlx4/en_rx.c
index f32e703..5aba5ec 100644
--- a/drivers/net/ethernet/mellanox/mlx4/en_rx.c
+++ b/drivers/net/ethernet/mellanox/mlx4/en_rx.c
@@ -614,8 +614,8 @@ int mlx4_en_process_rx_cq(struct net_device *dev, struct mlx4_en_cq *cq, int bud
/* If source MAC is equal to our own MAC and not performing
* the selftest or flb disabled - drop the packet */
if (s_mac == priv->mac &&
- (!(dev->features & NETIF_F_LOOPBACK) ||
- !priv->validate_loopback))
+ !((dev->features & NETIF_F_LOOPBACK) ||
+ priv->validate_loopback))
goto next;
/*
--
1.7.7
^ permalink raw reply related
* [PATCH V1 2/3] net/mlx4_en: Fixing TX queue stop/wake flow
From: Yevgeny Petrilin @ 2012-08-03 10:38 UTC (permalink / raw)
To: davem; +Cc: netdev, Yevgeny Petrilin
In-Reply-To: <1343990318-10744-1-git-send-email-yevgenyp@mellanox.co.il>
Removing the ring->blocked flag, it is redundant and leads to a race:
We close the TX queue and then set the "blocked" flag.
Between those 2 operations the completion function can check the "blocked"
flag, sees that it is 0, and wouldn't open the TX queue.
Using netif_tx_queue_stopped to check the state of the queue to avoid this race.
Signed-off-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il>
---
drivers/net/ethernet/mellanox/mlx4/en_tx.c | 17 +++++++----------
drivers/net/ethernet/mellanox/mlx4/mlx4_en.h | 1 -
2 files changed, 7 insertions(+), 11 deletions(-)
diff --git a/drivers/net/ethernet/mellanox/mlx4/en_tx.c b/drivers/net/ethernet/mellanox/mlx4/en_tx.c
index 019d856..10bba09 100644
--- a/drivers/net/ethernet/mellanox/mlx4/en_tx.c
+++ b/drivers/net/ethernet/mellanox/mlx4/en_tx.c
@@ -164,7 +164,6 @@ int mlx4_en_activate_tx_ring(struct mlx4_en_priv *priv,
ring->cons = 0xffffffff;
ring->last_nr_txbb = 1;
ring->poll_cnt = 0;
- ring->blocked = 0;
memset(ring->tx_info, 0, ring->size * sizeof(struct mlx4_en_tx_info));
memset(ring->buf, 0, ring->buf_size);
@@ -365,14 +364,13 @@ static void mlx4_en_process_tx_cq(struct net_device *dev, struct mlx4_en_cq *cq)
ring->cons += txbbs_skipped;
netdev_tx_completed_queue(ring->tx_queue, packets, bytes);
- /* Wakeup Tx queue if this ring stopped it */
- if (unlikely(ring->blocked)) {
- if ((u32) (ring->prod - ring->cons) <=
- ring->size - HEADROOM - MAX_DESC_TXBBS) {
- ring->blocked = 0;
- netif_tx_wake_queue(ring->tx_queue);
- priv->port_stats.wake_queue++;
- }
+ /*
+ * Wakeup Tx queue if this stopped, and at least 1 packet
+ * was completed
+ */
+ if (netif_tx_queue_stopped(ring->tx_queue) && txbbs_skipped > 0) {
+ netif_tx_wake_queue(ring->tx_queue);
+ priv->port_stats.wake_queue++;
}
}
@@ -592,7 +590,6 @@ netdev_tx_t mlx4_en_xmit(struct sk_buff *skb, struct net_device *dev)
ring->size - HEADROOM - MAX_DESC_TXBBS)) {
/* every full Tx ring stops queue */
netif_tx_stop_queue(ring->tx_queue);
- ring->blocked = 1;
priv->port_stats.queue_stopped++;
return NETDEV_TX_BUSY;
diff --git a/drivers/net/ethernet/mellanox/mlx4/mlx4_en.h b/drivers/net/ethernet/mellanox/mlx4/mlx4_en.h
index 5f1ab10..9d27e42 100644
--- a/drivers/net/ethernet/mellanox/mlx4/mlx4_en.h
+++ b/drivers/net/ethernet/mellanox/mlx4/mlx4_en.h
@@ -248,7 +248,6 @@ struct mlx4_en_tx_ring {
u32 doorbell_qpn;
void *buf;
u16 poll_cnt;
- int blocked;
struct mlx4_en_tx_info *tx_info;
u8 *bounce_buf;
u32 last_nr_txbb;
--
1.7.7
^ permalink raw reply related
* [PATCH V1 0/4] net/mlx4: Fixes to mlx4 driver
From: Yevgeny Petrilin @ 2012-08-03 10:38 UTC (permalink / raw)
To: davem; +Cc: netdev, Yevgeny Petrilin
Hello Dave,
This is a patchset of 3 fixes and additional change that removes
a port Link layer type restriction that is no longer relevant.
Thanks,
Yevgeny
---
Diff from V0:
-Removed the NETIF_F_GRO patch
Yevgeny Petrilin (2):
net/mlx4_en: Fixing TX queue stop/wake flow
net/mlx4_core: Remove port type restrictions
Amir Vadai (1):
net/mlx4_en: loopbacked packets are dropped when SMAC=DMAC
drivers/net/ethernet/mellanox/mlx4/en_rx.c | 4 ++--
drivers/net/ethernet/mellanox/mlx4/en_tx.c | 17 +++++++----------
drivers/net/ethernet/mellanox/mlx4/main.c | 3 ---
drivers/net/ethernet/mellanox/mlx4/mlx4_en.h | 1 -
drivers/net/ethernet/mellanox/mlx4/sense.c | 14 --------------
5 files changed, 9 insertions(+), 30 deletions(-)
^ 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