* [PATCH 01/15] ehea: Remove NETIF_F_LLTX
From: Thadeu Lima de Souza Cascardo @ 2011-10-14 15:30 UTC (permalink / raw)
To: netdev; +Cc: Anton Blanchard, Thadeu Lima de Souza Cascardo
In-Reply-To: <1318606272-27647-1-git-send-email-cascardo@linux.vnet.ibm.com>
From: Anton Blanchard <anton@samba.org>
Remove the deprecated NETIF_F_LLTX feature. Since the network stack
now provides the locking we can remove the driver specific
pr->xmit_lock.
Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com>
---
drivers/net/ethernet/ibm/ehea/ehea.h | 1 -
drivers/net/ethernet/ibm/ehea/ehea_main.c | 12 ++----------
2 files changed, 2 insertions(+), 11 deletions(-)
diff --git a/drivers/net/ethernet/ibm/ehea/ehea.h b/drivers/net/ethernet/ibm/ehea/ehea.h
index 0b8e6a9..5b5c1b5 100644
--- a/drivers/net/ethernet/ibm/ehea/ehea.h
+++ b/drivers/net/ethernet/ibm/ehea/ehea.h
@@ -363,7 +363,6 @@ struct ehea_port_res {
struct port_stats p_stats;
struct ehea_mr send_mr; /* send memory region */
struct ehea_mr recv_mr; /* receive memory region */
- spinlock_t xmit_lock;
struct ehea_port *port;
char int_recv_name[EHEA_IRQ_NAME_SIZE];
char int_send_name[EHEA_IRQ_NAME_SIZE];
diff --git a/drivers/net/ethernet/ibm/ehea/ehea_main.c b/drivers/net/ethernet/ibm/ehea/ehea_main.c
index dfefe80..ce9a670 100644
--- a/drivers/net/ethernet/ibm/ehea/ehea_main.c
+++ b/drivers/net/ethernet/ibm/ehea/ehea_main.c
@@ -1534,7 +1534,6 @@ static int ehea_init_port_res(struct ehea_port *port, struct ehea_port_res *pr,
pr->rx_packets = rx_packets;
pr->port = port;
- spin_lock_init(&pr->xmit_lock);
spin_lock_init(&pr->netif_queue);
pr->eq = ehea_create_eq(adapter, eq_type, EHEA_MAX_ENTRIES_EQ, 0);
@@ -2254,14 +2253,9 @@ static int ehea_start_xmit(struct sk_buff *skb, struct net_device *dev)
pr = &port->port_res[ehea_hash_skb(skb, port->num_tx_qps)];
- if (!spin_trylock(&pr->xmit_lock))
+ if (pr->queue_stopped)
return NETDEV_TX_BUSY;
- if (pr->queue_stopped) {
- spin_unlock(&pr->xmit_lock);
- return NETDEV_TX_BUSY;
- }
-
swqe = ehea_get_swqe(pr->qp, &swqe_index);
memset(swqe, 0, SWQE_HEADER_SIZE);
atomic_dec(&pr->swqe_avail);
@@ -2325,8 +2319,6 @@ static int ehea_start_xmit(struct sk_buff *skb, struct net_device *dev)
}
spin_unlock_irqrestore(&pr->netif_queue, flags);
}
- dev->trans_start = jiffies; /* NETIF_F_LLTX driver :( */
- spin_unlock(&pr->xmit_lock);
return NETDEV_TX_OK;
}
@@ -3233,7 +3225,7 @@ struct ehea_port *ehea_setup_single_port(struct ehea_adapter *adapter,
dev->features = NETIF_F_SG | NETIF_F_FRAGLIST | NETIF_F_TSO
| NETIF_F_HIGHDMA | NETIF_F_IP_CSUM | NETIF_F_HW_VLAN_TX
| NETIF_F_HW_VLAN_RX | NETIF_F_HW_VLAN_FILTER
- | NETIF_F_LLTX | NETIF_F_RXCSUM;
+ | NETIF_F_RXCSUM;
dev->watchdog_timeo = EHEA_WATCH_DOG_TIMEOUT;
if (use_lro)
--
1.7.4.4
^ permalink raw reply related
* EHEA updates
From: Thadeu Lima de Souza Cascardo @ 2011-10-14 15:30 UTC (permalink / raw)
To: netdev; +Cc: Anton Blanchard
This is a rebase of Anton's patches on top of net-next HEAD, commit
7ae60b3. Besides the conflicts with the latest patches, some trivia were
fixed as suggested.
Ben Hutchings' suggestions about doing packet split and NAPI fixes were
taken into consideration, but not done on this round.
The result was tested between two LPARs and also using a switch, with
ICMP and TCP tests.
^ permalink raw reply
* iwlagn: WARN_ON() in iwl_get_idle_rx_chain_count()
From: Michał Mirosław @ 2011-10-14 15:02 UTC (permalink / raw)
To: Intel Linux Wireless; +Cc: linux-wireless, netdev
WARN_ON() in iwl_get_idle_rx_chain_count() gets triggered on system shutdown
when WiFi card is associated to an AP. This is on kernel built from
Linus' tree, commit 37cf95162af4036b4198756a590aab8126fa2ce4 (3.1.0-rc9+).
It looks HT-related, I can't reproduce this on 802.11g network.
Best Regards,
Michał Mirosław
09:00.0 Network controller: Intel Corporation Centrino Wireless-N 1030 (rev 34)
Subsystem: Intel Corporation Centrino Wireless-N 1030 BGN
Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
Latency: 0, Cache Line Size: 64 bytes
Interrupt: pin A routed to IRQ 52
Region 0: Memory at f7a00000 (64-bit, non-prefetchable) [size=8K]
Capabilities: <access denied>
Kernel driver in use: iwlagn
Oct 14 00:04:26 oko kernel: [ 2796.354030] ------------[ cut here ]------------
Oct 14 00:04:26 oko kernel: [ 2796.354996] WARNING: at /usr/src/linux-git/drivers/net/wireless/iwlwifi/iwl-agn-lib.c:1766 iwlagn_set_rxon_chain+0x107/0x1b2 [iwlagn]()
Oct 14 00:04:26 oko kernel: [ 2796.355955] Hardware name: Vostro 3350
Oct 14 00:04:26 oko kernel: [ 2796.356906] invalid SMPS mode 0
Oct 14 00:04:26 oko kernel: [ 2796.356920] Modules linked in: acpi_cpufreq mperf cpufreq_conservative autofs4 rfcomm cpufreq_stats bnep cpufreq_powersave cpufreq_userspace pci_stub binfmt_misc microcode uinput nfs lockd auth_rpcgss nfs_acl sunrpc ext2 coretemp loop kvm_intel kvm aesni_intel cryptd aes_x86_64 aes_generic ecb btusb radeon bluetooth uvcvideo usb_storage videodev arc4 media uas iwlagn v4l2_compat_ioctl32 i915 crc16 snd_hda_codec_idt ttm drm_kms_helper mac80211 drm snd_hda_intel snd_hda_codec ehci_hcd snd_hwdep xhci_hcd snd_pcm snd_seq usbcore joydev sg cfg80211 snd_timer sr_mod snd_seq_device snd r8169 psmouse dell_wmi cdrom dell_laptop soundcore i2c_algo_bit pcspkr evdev sparse_keymap processor snd_page_alloc video cfbcopyarea mii dcdbas button cfbimgblt cfbfillrect wmi ac battery ext3 jbd mbcache dm_mod sd_mod crc_t10dif ahci libahci libata scsi_mod thermal thermal_sys [last unloaded: vboxdrv]
Oct 14 00:04:26 oko kernel: [ 2796.365031] Pid: 3017, comm: wpa_supplicant Not tainted 3.1.0-rc9+ #12
Oct 14 00:04:26 oko kernel: [ 2796.366263] Call Trace:
Oct 14 00:04:26 oko kernel: [ 2796.367490] [<ffffffff8103437f>] ? warn_slowpath_common+0x78/0x8c
Oct 14 00:04:26 oko kernel: [ 2796.368673] [<ffffffff8103442b>] ? warn_slowpath_fmt+0x45/0x4a
Oct 14 00:04:26 oko kernel: [ 2796.369836] [<ffffffffa0310733>] ? __sta_info_destroy+0x267/0x2af [mac80211]
Oct 14 00:04:26 oko kernel: [ 2796.371046] [<ffffffffa03a93f1>] ? iwlagn_set_rxon_chain+0x107/0x1b2 [iwlagn]
Oct 14 00:04:26 oko kernel: [ 2796.372274] [<ffffffffa03b2f9e>] ? iwlagn_bss_info_changed+0x245/0x4b3 [iwlagn]
Oct 14 00:04:26 oko kernel: [ 2796.373753] [<ffffffff8102c1e5>] ? get_parent_ip+0x9/0x1b
Oct 14 00:04:26 oko kernel: [ 2796.374990] [<ffffffffa031c03a>] ? __ieee80211_recalc_idle+0xef/0x194 [mac80211]
Oct 14 00:04:26 oko kernel: [ 2796.376272] [<ffffffffa031cbee>] ? ieee80211_recalc_idle+0x1e/0x42 [mac80211]
Oct 14 00:04:26 oko kernel: [ 2796.377506] [<ffffffffa0319690>] ? ieee80211_mgd_deauth+0x19c/0x1c0 [mac80211]
Oct 14 00:04:26 oko kernel: [ 2796.378771] [<ffffffff812e96ed>] ? sub_preempt_count+0x83/0x94
Oct 14 00:04:26 oko kernel: [ 2796.380083] [<ffffffffa01ca76c>] ? __cfg80211_mlme_deauth+0x107/0x116 [cfg80211]
Oct 14 00:04:26 oko kernel: [ 2796.381293] [<ffffffff812e64d9>] ? schedule_hrtimeout_range_clock+0xc8/0x103
Oct 14 00:04:26 oko kernel: [ 2796.382550] [<ffffffff8102c1e5>] ? get_parent_ip+0x9/0x1b
Oct 14 00:04:26 oko kernel: [ 2796.383803] [<ffffffffa01ca7e4>] ? cfg80211_mlme_deauth+0x69/0x82 [cfg80211]
Oct 14 00:04:26 oko kernel: [ 2796.385039] [<ffffffff81023735>] ? __wake_up_common+0x40/0x77
Oct 14 00:04:26 oko kernel: [ 2796.386309] [<ffffffffa01c15ed>] ? nl80211_deauthenticate+0xbc/0xc7 [cfg80211]
Oct 14 00:04:26 oko kernel: [ 2796.387607] [<ffffffffa01c35cb>] ? nl80211_pre_doit+0x85/0xfb [cfg80211]
Oct 14 00:04:26 oko kernel: [ 2796.389171] [<ffffffff81250f71>] ? genl_rcv_msg+0x1cb/0x1f9
Oct 14 00:04:26 oko kernel: [ 2796.390753] [<ffffffff81250da6>] ? genl_rcv+0x28/0x28
Oct 14 00:04:26 oko kernel: [ 2796.392295] [<ffffffff81250a06>] ? netlink_rcv_skb+0x36/0x7a
Oct 14 00:04:26 oko kernel: [ 2796.393896] [<ffffffff81250d9d>] ? genl_rcv+0x1f/0x28
Oct 14 00:04:26 oko kernel: [ 2796.395521] [<ffffffff81250537>] ? netlink_unicast+0xe6/0x14e
Oct 14 00:04:26 oko kernel: [ 2796.397095] [<ffffffff81250819>] ? netlink_sendmsg+0x27a/0x2b2
Oct 14 00:04:26 oko kernel: [ 2796.398741] [<ffffffff810f45dc>] ? __pollwait+0xce/0xce
Oct 14 00:04:26 oko kernel: [ 2796.400378] [<ffffffff8122172d>] ? sock_sendmsg+0xc1/0xde
Oct 14 00:04:26 oko kernel: [ 2796.402042] [<ffffffff8122160e>] ? sock_recvmsg+0xcd/0xec
Oct 14 00:04:26 oko kernel: [ 2796.403645] [<ffffffff8102c1e5>] ? get_parent_ip+0x9/0x1b
Oct 14 00:04:26 oko kernel: [ 2796.405148] [<ffffffff8122160e>] ? sock_recvmsg+0xcd/0xec
Oct 14 00:04:26 oko kernel: [ 2796.406650] [<ffffffff812228d4>] ? move_addr_to_kernel+0x24/0x46
Oct 14 00:04:26 oko kernel: [ 2796.408098] [<ffffffff812219c5>] ? __sys_sendmsg+0x1e8/0x288
Oct 14 00:04:26 oko kernel: [ 2796.408102] [<ffffffff812e9798>] ? add_preempt_count+0x9a/0x9c
Oct 14 00:04:26 oko kernel: [ 2796.408107] [<ffffffff8102c1e5>] ? get_parent_ip+0x9/0x1b
Oct 14 00:04:26 oko kernel: [ 2796.408109] [<ffffffff812e96ed>] ? sub_preempt_count+0x83/0x94
Oct 14 00:04:26 oko kernel: [ 2796.408112] [<ffffffff812e6f14>] ? _raw_spin_unlock_irq+0x23/0x2f
Oct 14 00:04:26 oko kernel: [ 2796.408115] [<ffffffff810022e1>] ? do_signal+0x51d/0x5f3
Oct 14 00:04:26 oko kernel: [ 2796.408119] [<ffffffff81008f1b>] ? init_fpu+0x72/0x7f
Oct 14 00:04:26 oko kernel: [ 2796.408122] [<ffffffff8100969f>] ? check_for_xstate+0x1c/0x6f
Oct 14 00:04:26 oko kernel: [ 2796.408124] [<ffffffff81009966>] ? restore_i387_xstate+0x9e/0x17c
Oct 14 00:04:26 oko kernel: [ 2796.408128] [<ffffffff81044e92>] ? do_sigaltstack+0xaa/0x13e
Oct 14 00:04:26 oko kernel: [ 2796.408131] [<ffffffff812233c5>] ? sys_sendmsg+0x39/0x58
Oct 14 00:04:26 oko kernel: [ 2796.408134] [<ffffffff812ec17b>] ? system_call_fastpath+0x16/0x1b
Oct 14 00:04:26 oko kernel: [ 2796.408176] ---[ end trace 634279251cfb99d1 ]---
Oct 14 00:04:26 oko kernel: [ 2796.409026] ------------[ cut here ]------------
Oct 14 00:04:26 oko kernel: [ 2796.409046] WARNING: at /usr/src/linux-git/drivers/net/wireless/iwlwifi/iwl-agn-lib.c:1766 iwlagn_set_rxon_chain+0x107/0x1b2 [iwlagn]()
Oct 14 00:04:26 oko kernel: [ 2796.409048] Hardware name: Vostro 3350
Oct 14 00:04:26 oko kernel: [ 2796.409049] invalid SMPS mode 0
Oct 14 00:04:26 oko kernel: [ 2796.409050] Modules linked in: acpi_cpufreq mperf cpufreq_conservative autofs4 rfcomm cpufreq_stats bnep cpufreq_powersave cpufreq_userspace pci_stub binfmt_misc microcode uinput nfs lockd auth_rpcgss nfs_acl sunrpc ext2 coretemp loop kvm_intel kvm aesni_intel cryptd aes_x86_64 aes_generic ecb btusb radeon bluetooth uvcvideo usb_storage videodev arc4 media uas iwlagn v4l2_compat_ioctl32 i915 crc16 snd_hda_codec_idt ttm drm_kms_helper mac80211 drm snd_hda_intel snd_hda_codec ehci_hcd snd_hwdep xhci_hcd snd_pcm snd_seq usbcore joydev sg cfg80211 snd_timer sr_mod snd_seq_device snd r8169 psmouse dell_wmi cdrom dell_laptop soundcore i2c_algo_bit pcspkr evdev sparse_keymap processor snd_page_alloc video cfbcopyarea mii dcdbas button cfbimgblt cfbfillrect wmi ac battery ext3 jbd mbcache dm_mod sd_mod crc_t10dif ahci libahci libata scsi_mod thermal thermal_sys [last unloaded: vboxdrv]
Oct 14 00:04:26 oko kernel: [ 2796.409109] Pid: 3017, comm: wpa_supplicant Tainted: G W 3.1.0-rc9+ #12
Oct 14 00:04:26 oko kernel: [ 2796.409110] Call Trace:
Oct 14 00:04:26 oko kernel: [ 2796.409116] [<ffffffff8103437f>] ? warn_slowpath_common+0x78/0x8c
Oct 14 00:04:26 oko kernel: [ 2796.409119] [<ffffffff8103442b>] ? warn_slowpath_fmt+0x45/0x4a
Oct 14 00:04:26 oko kernel: [ 2796.409133] [<ffffffffa03b78e7>] ? iwl_send_cmd+0x1a4/0x303 [iwlagn]
Oct 14 00:04:26 oko kernel: [ 2796.409140] [<ffffffffa03a93f1>] ? iwlagn_set_rxon_chain+0x107/0x1b2 [iwlagn]
Oct 14 00:04:26 oko kernel: [ 2796.409145] [<ffffffffa03a276d>] ? iwl_update_chain_flags+0x32/0x58 [iwlagn]
Oct 14 00:04:26 oko kernel: [ 2796.409156] [<ffffffffa03af7cd>] ? iwl_power_set_mode+0xf4/0x157 [iwlagn]
Oct 14 00:04:26 oko kernel: [ 2796.409163] [<ffffffffa03af9e0>] ? iwl_power_update_mode+0x1b0/0x1b9 [iwlagn]
Oct 14 00:04:26 oko kernel: [ 2796.409170] [<ffffffffa03b2cd8>] ? iwlagn_mac_config+0x206/0x287 [iwlagn]
Oct 14 00:04:26 oko kernel: [ 2796.409185] [<ffffffffa0319690>] ? ieee80211_mgd_deauth+0x19c/0x1c0 [mac80211]
Oct 14 00:04:26 oko kernel: [ 2796.409188] [<ffffffff812e96ed>] ? sub_preempt_count+0x83/0x94
Oct 14 00:04:26 oko kernel: [ 2796.409201] [<ffffffffa01ca76c>] ? __cfg80211_mlme_deauth+0x107/0x116 [cfg80211]
Oct 14 00:04:26 oko kernel: [ 2796.409206] [<ffffffff812e64d9>] ? schedule_hrtimeout_range_clock+0xc8/0x103
Oct 14 00:04:26 oko kernel: [ 2796.409208] [<ffffffff8102c1e5>] ? get_parent_ip+0x9/0x1b
Oct 14 00:04:26 oko kernel: [ 2796.409216] [<ffffffffa01ca7e4>] ? cfg80211_mlme_deauth+0x69/0x82 [cfg80211]
Oct 14 00:04:26 oko kernel: [ 2796.409220] [<ffffffff81023735>] ? __wake_up_common+0x40/0x77
Oct 14 00:04:26 oko kernel: [ 2796.409228] [<ffffffffa01c15ed>] ? nl80211_deauthenticate+0xbc/0xc7 [cfg80211]
Oct 14 00:04:26 oko kernel: [ 2796.409238] [<ffffffffa01c35cb>] ? nl80211_pre_doit+0x85/0xfb [cfg80211]
Oct 14 00:04:26 oko kernel: [ 2796.409244] [<ffffffff81250f71>] ? genl_rcv_msg+0x1cb/0x1f9
Oct 14 00:04:26 oko kernel: [ 2796.409246] [<ffffffff81250da6>] ? genl_rcv+0x28/0x28
Oct 14 00:04:26 oko kernel: [ 2796.409249] [<ffffffff81250a06>] ? netlink_rcv_skb+0x36/0x7a
Oct 14 00:04:26 oko kernel: [ 2796.409251] [<ffffffff81250d9d>] ? genl_rcv+0x1f/0x28
Oct 14 00:04:26 oko kernel: [ 2796.409253] [<ffffffff81250537>] ? netlink_unicast+0xe6/0x14e
Oct 14 00:04:26 oko kernel: [ 2796.409256] [<ffffffff81250819>] ? netlink_sendmsg+0x27a/0x2b2
Oct 14 00:04:26 oko kernel: [ 2796.409262] [<ffffffff810f45dc>] ? __pollwait+0xce/0xce
Oct 14 00:04:26 oko kernel: [ 2796.409266] [<ffffffff8122172d>] ? sock_sendmsg+0xc1/0xde
Oct 14 00:04:26 oko kernel: [ 2796.409268] [<ffffffff8122160e>] ? sock_recvmsg+0xcd/0xec
Oct 14 00:04:26 oko kernel: [ 2796.409271] [<ffffffff8102c1e5>] ? get_parent_ip+0x9/0x1b
Oct 14 00:04:26 oko kernel: [ 2796.409273] [<ffffffff8122160e>] ? sock_recvmsg+0xcd/0xec
Oct 14 00:04:26 oko kernel: [ 2796.409276] [<ffffffff812228d4>] ? move_addr_to_kernel+0x24/0x46
Oct 14 00:04:26 oko kernel: [ 2796.409279] [<ffffffff812219c5>] ? __sys_sendmsg+0x1e8/0x288
Oct 14 00:04:26 oko kernel: [ 2796.409282] [<ffffffff812e9798>] ? add_preempt_count+0x9a/0x9c
Oct 14 00:04:26 oko kernel: [ 2796.409284] [<ffffffff8102c1e5>] ? get_parent_ip+0x9/0x1b
Oct 14 00:04:26 oko kernel: [ 2796.409286] [<ffffffff812e96ed>] ? sub_preempt_count+0x83/0x94
Oct 14 00:04:26 oko kernel: [ 2796.409289] [<ffffffff812e6f14>] ? _raw_spin_unlock_irq+0x23/0x2f
Oct 14 00:04:26 oko kernel: [ 2796.409294] [<ffffffff810022e1>] ? do_signal+0x51d/0x5f3
Oct 14 00:04:26 oko kernel: [ 2796.409297] [<ffffffff81008f1b>] ? init_fpu+0x72/0x7f
Oct 14 00:04:26 oko kernel: [ 2796.409300] [<ffffffff8100969f>] ? check_for_xstate+0x1c/0x6f
Oct 14 00:04:26 oko kernel: [ 2796.409303] [<ffffffff81009966>] ? restore_i387_xstate+0x9e/0x17c
Oct 14 00:04:26 oko kernel: [ 2796.409305] [<ffffffff81044e92>] ? do_sigaltstack+0xaa/0x13e
Oct 14 00:04:26 oko kernel: [ 2796.409308] [<ffffffff812233c5>] ? sys_sendmsg+0x39/0x58
Oct 14 00:04:26 oko kernel: [ 2796.409312] [<ffffffff812ec17b>] ? system_call_fastpath+0x16/0x1b
Oct 14 00:04:26 oko kernel: [ 2796.409314] ---[ end trace 634279251cfb99d2 ]---
Oct 14 00:04:26 oko kernel: [ 2796.409315] ------------[ cut here ]------------
Oct 14 00:04:26 oko kernel: [ 2796.409325] WARNING: at /usr/src/linux-git/drivers/net/wireless/iwlwifi/iwl-agn-lib.c:1766 iwlagn_set_rxon_chain+0x107/0x1b2 [iwlagn]()
Oct 14 00:04:26 oko kernel: [ 2796.409327] Hardware name: Vostro 3350
Oct 14 00:04:26 oko kernel: [ 2796.409328] invalid SMPS mode 0
Oct 14 00:04:26 oko kernel: [ 2796.409329] Modules linked in: acpi_cpufreq mperf cpufreq_conservative autofs4 rfcomm cpufreq_stats bnep cpufreq_powersave cpufreq_userspace pci_stub binfmt_misc microcode uinput nfs lockd auth_rpcgss nfs_acl sunrpc ext2 coretemp loop kvm_intel kvm aesni_intel cryptd aes_x86_64 aes_generic ecb btusb radeon bluetooth uvcvideo usb_storage videodev arc4 media uas iwlagn v4l2_compat_ioctl32 i915 crc16 snd_hda_codec_idt ttm drm_kms_helper mac80211 drm snd_hda_intel snd_hda_codec ehci_hcd snd_hwdep xhci_hcd snd_pcm snd_seq usbcore joydev sg cfg80211 snd_timer sr_mod snd_seq_device snd r8169 psmouse dell_wmi cdrom dell_laptop soundcore i2c_algo_bit pcspkr evdev sparse_keymap processor snd_page_alloc video cfbcopyarea mii dcdbas button cfbimgblt cfbfillrect wmi ac battery ext3 jbd mbcache dm_mod sd_mod crc_t10dif ahci libahci libata scsi_mod thermal thermal_sys [last unloaded: vboxdrv]
Oct 14 00:04:26 oko kernel: [ 2796.409371] Pid: 3017, comm: wpa_supplicant Tainted: G W 3.1.0-rc9+ #12
Oct 14 00:04:26 oko kernel: [ 2796.409372] Call Trace:
Oct 14 00:04:26 oko kernel: [ 2796.409381] [<ffffffff8103437f>] ? warn_slowpath_common+0x78/0x8c
Oct 14 00:04:26 oko kernel: [ 2796.409384] [<ffffffff8103442b>] ? warn_slowpath_fmt+0x45/0x4a
Oct 14 00:04:26 oko kernel: [ 2796.409392] [<ffffffffa03b78e7>] ? iwl_send_cmd+0x1a4/0x303 [iwlagn]
Oct 14 00:04:26 oko kernel: [ 2796.409399] [<ffffffffa03a93f1>] ? iwlagn_set_rxon_chain+0x107/0x1b2 [iwlagn]
Oct 14 00:04:26 oko kernel: [ 2796.409408] [<ffffffffa03a276d>] ? iwl_update_chain_flags+0x32/0x58 [iwlagn]
Oct 14 00:04:26 oko kernel: [ 2796.409415] [<ffffffffa03af7cd>] ? iwl_power_set_mode+0xf4/0x157 [iwlagn]
Oct 14 00:04:26 oko kernel: [ 2796.409421] [<ffffffffa03af9e0>] ? iwl_power_update_mode+0x1b0/0x1b9 [iwlagn]
Oct 14 00:04:26 oko kernel: [ 2796.409429] [<ffffffffa03b2cd8>] ? iwlagn_mac_config+0x206/0x287 [iwlagn]
Oct 14 00:04:26 oko kernel: [ 2796.409439] [<ffffffffa0319690>] ? ieee80211_mgd_deauth+0x19c/0x1c0 [mac80211]
Oct 14 00:04:26 oko kernel: [ 2796.409442] [<ffffffff812e96ed>] ? sub_preempt_count+0x83/0x94
Oct 14 00:04:26 oko kernel: [ 2796.409457] [<ffffffffa01ca76c>] ? __cfg80211_mlme_deauth+0x107/0x116 [cfg80211]
Oct 14 00:04:26 oko kernel: [ 2796.409460] [<ffffffff812e64d9>] ? schedule_hrtimeout_range_clock+0xc8/0x103
Oct 14 00:04:26 oko kernel: [ 2796.409463] [<ffffffff8102c1e5>] ? get_parent_ip+0x9/0x1b
Oct 14 00:04:26 oko kernel: [ 2796.409477] [<ffffffffa01ca7e4>] ? cfg80211_mlme_deauth+0x69/0x82 [cfg80211]
Oct 14 00:04:26 oko kernel: [ 2796.409479] [<ffffffff81023735>] ? __wake_up_common+0x40/0x77
Oct 14 00:04:26 oko kernel: [ 2796.409490] [<ffffffffa01c15ed>] ? nl80211_deauthenticate+0xbc/0xc7 [cfg80211]
Oct 14 00:04:26 oko kernel: [ 2796.409498] [<ffffffffa01c35cb>] ? nl80211_pre_doit+0x85/0xfb [cfg80211]
Oct 14 00:04:26 oko kernel: [ 2796.409502] [<ffffffff81250f71>] ? genl_rcv_msg+0x1cb/0x1f9
Oct 14 00:04:26 oko kernel: [ 2796.409505] [<ffffffff81250da6>] ? genl_rcv+0x28/0x28
Oct 14 00:04:26 oko kernel: [ 2796.409507] [<ffffffff81250a06>] ? netlink_rcv_skb+0x36/0x7a
Oct 14 00:04:26 oko kernel: [ 2796.409509] [<ffffffff81250d9d>] ? genl_rcv+0x1f/0x28
Oct 14 00:04:26 oko kernel: [ 2796.409511] [<ffffffff81250537>] ? netlink_unicast+0xe6/0x14e
Oct 14 00:04:26 oko kernel: [ 2796.409514] [<ffffffff81250819>] ? netlink_sendmsg+0x27a/0x2b2
Oct 14 00:04:26 oko kernel: [ 2796.409517] [<ffffffff810f45dc>] ? __pollwait+0xce/0xce
Oct 14 00:04:26 oko kernel: [ 2796.409519] [<ffffffff8122172d>] ? sock_sendmsg+0xc1/0xde
Oct 14 00:04:26 oko kernel: [ 2796.409521] [<ffffffff8122160e>] ? sock_recvmsg+0xcd/0xec
Oct 14 00:04:26 oko kernel: [ 2796.409526] [<ffffffff8102c1e5>] ? get_parent_ip+0x9/0x1b
Oct 14 00:04:26 oko kernel: [ 2796.409529] [<ffffffff8122160e>] ? sock_recvmsg+0xcd/0xec
Oct 14 00:04:26 oko kernel: [ 2796.409532] [<ffffffff812228d4>] ? move_addr_to_kernel+0x24/0x46
Oct 14 00:04:26 oko kernel: [ 2796.409534] [<ffffffff812219c5>] ? __sys_sendmsg+0x1e8/0x288
Oct 14 00:04:26 oko kernel: [ 2796.409537] [<ffffffff812e9798>] ? add_preempt_count+0x9a/0x9c
Oct 14 00:04:26 oko kernel: [ 2796.409539] [<ffffffff8102c1e5>] ? get_parent_ip+0x9/0x1b
Oct 14 00:04:26 oko kernel: [ 2796.409542] [<ffffffff812e96ed>] ? sub_preempt_count+0x83/0x94
Oct 14 00:04:26 oko kernel: [ 2796.409544] [<ffffffff812e6f14>] ? _raw_spin_unlock_irq+0x23/0x2f
Oct 14 00:04:26 oko kernel: [ 2796.409548] [<ffffffff810022e1>] ? do_signal+0x51d/0x5f3
Oct 14 00:04:26 oko kernel: [ 2796.409551] [<ffffffff81008f1b>] ? init_fpu+0x72/0x7f
Oct 14 00:04:26 oko kernel: [ 2796.409554] [<ffffffff8100969f>] ? check_for_xstate+0x1c/0x6f
Oct 14 00:04:26 oko kernel: [ 2796.409556] [<ffffffff81009966>] ? restore_i387_xstate+0x9e/0x17c
Oct 14 00:04:26 oko kernel: [ 2796.409559] [<ffffffff81044e92>] ? do_sigaltstack+0xaa/0x13e
Oct 14 00:04:26 oko kernel: [ 2796.409564] [<ffffffff812233c5>] ? sys_sendmsg+0x39/0x58
Oct 14 00:04:26 oko kernel: [ 2796.409568] [<ffffffff812ec17b>] ? system_call_fastpath+0x16/0x1b
Oct 14 00:04:26 oko kernel: [ 2796.409570] ---[ end trace 634279251cfb99d3 ]---
Oct 14 00:04:26 oko kernel: [ 2796.409586] cfg80211: Calling CRDA for country: PL
Oct 14 00:04:27 oko kernel: [ 2796.573759] ------------[ cut here ]------------
Oct 14 00:04:27 oko kernel: [ 2796.575276] WARNING: at /usr/src/linux-git/drivers/net/wireless/iwlwifi/iwl-agn-lib.c:1766 iwlagn_set_rxon_chain+0x107/0x1b2 [iwlagn]()
Oct 14 00:04:27 oko kernel: [ 2796.576866] Hardware name: Vostro 3350
Oct 14 00:04:27 oko kernel: [ 2796.578449] invalid SMPS mode 0
Oct 14 00:04:27 oko kernel: [ 2796.578488] Modules linked in: acpi_cpufreq mperf cpufreq_conservative autofs4 rfcomm cpufreq_stats bnep cpufreq_powersave cpufreq_userspace pci_stub binfmt_misc microcode uinput nfs lockd auth_rpcgss nfs_acl sunrpc ext2 coretemp loop kvm_intel kvm aesni_intel cryptd aes_x86_64 aes_generic ecb btusb radeon bluetooth uvcvideo usb_storage videodev arc4 media uas iwlagn v4l2_compat_ioctl32 i915 crc16 snd_hda_codec_idt ttm drm_kms_helper mac80211 drm snd_hda_intel snd_hda_codec ehci_hcd snd_hwdep xhci_hcd snd_pcm snd_seq usbcore joydev sg cfg80211 snd_timer sr_mod snd_seq_device snd r8169 psmouse dell_wmi cdrom dell_laptop soundcore i2c_algo_bit pcspkr evdev sparse_keymap processor snd_page_alloc video cfbcopyarea mii dcdbas button cfbimgblt cfbfillrect wmi ac battery ext3 jbd mbcache dm_mod sd_mod crc_t10dif ahci libahci libata scsi_mod thermal thermal_sys [last unloaded: vboxdrv]
Oct 14 00:04:27 oko kernel: [ 2796.591110] Pid: 2973, comm: NetworkManager Tainted: G W 3.1.0-rc9+ #12
Oct 14 00:04:27 oko kernel: [ 2796.592295] Call Trace:
Oct 14 00:04:27 oko kernel: [ 2796.593474] [<ffffffff8103437f>] ? warn_slowpath_common+0x78/0x8c
Oct 14 00:04:27 oko kernel: [ 2796.594693] [<ffffffff8103442b>] ? warn_slowpath_fmt+0x45/0x4a
Oct 14 00:04:27 oko kernel: [ 2796.595910] [<ffffffff812e96ed>] ? sub_preempt_count+0x83/0x94
Oct 14 00:04:27 oko kernel: [ 2796.597087] [<ffffffffa03a93f1>] ? iwlagn_set_rxon_chain+0x107/0x1b2 [iwlagn]
Oct 14 00:04:27 oko kernel: [ 2796.598296] [<ffffffff812e6f14>] ? _raw_spin_unlock_irq+0x23/0x2f
Oct 14 00:04:27 oko kernel: [ 2796.599507] [<ffffffffa03adc8c>] ? iwl_teardown_interface+0x4a/0x7e [iwlagn]
Oct 14 00:04:27 oko kernel: [ 2796.600697] [<ffffffffa03ae569>] ? iwl_mac_remove_interface+0x4e/0x5e [iwlagn]
Oct 14 00:04:27 oko kernel: [ 2796.601914] [<ffffffffa031c3f3>] ? ieee80211_do_stop+0x314/0x465 [mac80211]
Oct 14 00:04:27 oko kernel: [ 2796.603133] [<ffffffff81039618>] ? _local_bh_enable_ip.isra.12+0x94/0xa2
Oct 14 00:04:27 oko kernel: [ 2796.604328] [<ffffffffa031c557>] ? ieee80211_stop+0x13/0x17 [mac80211]
Oct 14 00:04:27 oko kernel: [ 2796.605523] [<ffffffff8122f754>] ? __dev_close_many+0x7f/0xab
Oct 14 00:04:27 oko kernel: [ 2796.606752] [<ffffffff8122f7b0>] ? __dev_close+0x30/0x47
Oct 14 00:04:27 oko kernel: [ 2796.607981] [<ffffffff812e96ed>] ? sub_preempt_count+0x83/0x94
Oct 14 00:04:27 oko kernel: [ 2796.609179] [<ffffffff81233e6a>] ? __dev_change_flags+0x9d/0x118
Oct 14 00:04:27 oko kernel: [ 2796.610406] [<ffffffff81233f4b>] ? dev_change_flags+0x12/0x42
Oct 14 00:04:27 oko kernel: [ 2796.611639] [<ffffffff8123da18>] ? do_setlink+0x287/0x6f8
Oct 14 00:04:27 oko kernel: [ 2796.612848] [<ffffffff810da6a2>] ? __kmalloc_node_track_caller+0xcb/0x105
Oct 14 00:04:27 oko kernel: [ 2796.614089] [<ffffffff812263ef>] ? sock_rmalloc+0x2b/0x4b
Oct 14 00:04:27 oko kernel: [ 2796.615338] [<ffffffff8123e20a>] ? __rtnl_unlock+0xc/0xc
Oct 14 00:04:27 oko kernel: [ 2796.616549] [<ffffffff8123e0d2>] ? rtnl_setlink+0xc4/0xe6
Oct 14 00:04:27 oko kernel: [ 2796.617799] [<ffffffff81250a06>] ? netlink_rcv_skb+0x36/0x7a
Oct 14 00:04:27 oko kernel: [ 2796.619042] [<ffffffff8123d64d>] ? rtnetlink_rcv+0x1f/0x28
Oct 14 00:04:27 oko kernel: [ 2796.620261] [<ffffffff81250537>] ? netlink_unicast+0xe6/0x14e
Oct 14 00:04:27 oko kernel: [ 2796.621476] [<ffffffff81250819>] ? netlink_sendmsg+0x27a/0x2b2
Oct 14 00:04:27 oko kernel: [ 2796.622718] [<ffffffff8122172d>] ? sock_sendmsg+0xc1/0xde
Oct 14 00:04:27 oko kernel: [ 2796.623961] [<ffffffff8122160e>] ? sock_recvmsg+0xcd/0xec
Oct 14 00:04:27 oko kernel: [ 2796.625173] [<ffffffff8122172d>] ? sock_sendmsg+0xc1/0xde
Oct 14 00:04:27 oko kernel: [ 2796.626407] [<ffffffff8116d88c>] ? cpumask_any_but+0x24/0x34
Oct 14 00:04:27 oko kernel: [ 2796.627641] [<ffffffff812228d4>] ? move_addr_to_kernel+0x24/0x46
Oct 14 00:04:27 oko kernel: [ 2796.628853] [<ffffffff812219c5>] ? __sys_sendmsg+0x1e8/0x288
Oct 14 00:04:27 oko kernel: [ 2796.630089] [<ffffffff812df81a>] ? __bad_area_nosemaphore+0x87/0x1f0
Oct 14 00:04:27 oko kernel: [ 2796.631335] [<ffffffff810e79c6>] ? fget_light+0x85/0x8d
Oct 14 00:04:27 oko kernel: [ 2796.632537] [<ffffffff812230a0>] ? sys_sendto+0x108/0x137
Oct 14 00:04:27 oko kernel: [ 2796.633768] [<ffffffff810f6c44>] ? dput+0xe6/0xf3
Oct 14 00:04:27 oko kernel: [ 2796.634992] [<ffffffff812233c5>] ? sys_sendmsg+0x39/0x58
Oct 14 00:04:27 oko kernel: [ 2796.636194] [<ffffffff812ec17b>] ? system_call_fastpath+0x16/0x1b
Oct 14 00:04:27 oko kernel: [ 2796.637398] ---[ end trace 634279251cfb99d4 ]---
^ permalink raw reply
* Re: PROBLEM: System call 'sendmsg' of process ospfd (quagga) causes kernel oops
From: Eric Dumazet @ 2011-10-14 14:57 UTC (permalink / raw)
To: Elmar Vonlanthen; +Cc: linux-kernel, netdev, Timo Teräs, Herbert Xu
In-Reply-To: <CA+0Zf5Be5JUSvssH9CrDQq=jtETZr=veAPC7jriM8B-FZKbbpg@mail.gmail.com>
Le vendredi 14 octobre 2011 à 10:08 +0200, Elmar Vonlanthen a écrit :
> Hello again
>
> Kernel 3.0.6 is affected as well.
>
> 2011-10-14 09:50:46 chgut11fw01 kernel: skb_over_panic: text:c13059c9
> len:64 put:64 head:c730c400 data:c730c450 tail:0xc730c490
> end:0xc730c480 dev:<NULL>
> 2011-10-14 09:50:46 chgut11fw01 kernel: ------------[ cut here ]------------
> 2011-10-14 09:50:46 chgut11fw01 kernel: kernel BUG at net/core/skbuff.c:128!
> 2011-10-14 09:50:46 chgut11fw01 kernel: invalid opcode: 0000 [#1] SMP
> 2011-10-14 09:50:46 chgut11fw01 kernel: Modules linked in: ip_gre gre
> authenc xfrm4_mode_transport deflate zlib_deflate ctr twofish_generic
> twofish_common serpent cryptd aes_i586 aes_generic blowfish cast5 cbc
> ecb rmd160 sha512_generic sha256_generic sha1_generic xfrm_user
> xfrm4_tunnel tunnel4 ipcomp xfrm_ipcomp esp4 ah4 af_key tun ipt_LOG
> xt_limit ipt_REJECT xt_state ipt_REDIRECT ipt_MASQUERADE xt_policy
> xt_TCPMSS xt_tcpmss xt_tcpudp xt_NOTRACK iptable_filter iptable_nat
> xt_mark xt_connmark iptable_mangle iptable_raw ip_tables x_tables
> nf_conntrack_tftp nf_nat_ftp nf_nat nf_conntrack_ipv4 nf_defrag_ipv4
> nf_conntrack_ftp nf_conntrack rtc ppdev parport_pc parport w83792d
> i2c_dev i2c_i801 i2c_core pl2303 usbserial coretemp hwmon usbhid
> ohci_hcd uhci_hcd ehci_hcd usbcore e1000 e1000e aufs ata_piix libata
> 2011-10-14 09:50:46 chgut11fw01 kernel:
> 2011-10-14 09:50:46 chgut11fw01 kernel: Pid: 6299, comm: ospfd Not
> tainted 3.0.6-SMP #1 /LakePort
> 2011-10-14 09:50:46 chgut11fw01 kernel: EIP: 0060:[<c12b6815>] EFLAGS:
> 00010292 CPU: 0
> 2011-10-14 09:50:46 chgut11fw01 kernel: EIP is at skb_put+0x85/0x90
> 2011-10-14 09:50:46 chgut11fw01 kernel: EAX: 00000078 EBX: c13059c9
> ECX: 00000096 EDX: ffffff8b
> 2011-10-14 09:50:46 chgut11fw01 kernel: ESI: deac4a80 EDI: 00000040
> EBP: d8979c80 ESP: d8979c58
> 2011-10-14 09:50:46 chgut11fw01 kernel: DS: 007b ES: 007b FS: 00d8 GS:
> 0033 SS: 0068
> 2011-10-14 09:50:46 chgut11fw01 kernel: Process ospfd (pid: 6299,
> ti=d8978000 task=de94ee80 task.ti=d8978000)
> 2011-10-14 09:50:46 chgut11fw01 kernel: Stack:
> 2011-10-14 09:50:46 chgut11fw01 kernel: c13fd194 c13059c9 00000040
> 00000040 c730c400 c730c450 c730c490 c730c480
> 2011-10-14 09:50:46 chgut11fw01 kernel: c13fb21c d897da40 d8979d38
> c13059c9 d8979d24 8db04700 00000001 00000001
> 2011-10-14 09:50:46 chgut11fw01 kernel: d8979ce4 d8979cc8 c121ce7d
> 00000000 000012b5 d8979ecc dbff0c00 c730c450
> 2011-10-14 09:50:46 chgut11fw01 kernel: Call Trace:
> 2011-10-14 09:50:46 chgut11fw01 kernel: [<c13059c9>] ? raw_sendmsg+0x5a9/0x850
> 2011-10-14 09:50:46 chgut11fw01 kernel: [<c13059c9>] raw_sendmsg+0x5a9/0x850
> 2011-10-14 09:50:46 chgut11fw01 kernel: [<c121ce7d>] ? extract_entropy+0x5d/0x70
> 2011-10-14 09:50:46 chgut11fw01 kernel: [<c1027f73>] ?
> try_to_wake_up+0x173/0x1f0
> 2011-10-14 09:50:46 chgut11fw01 kernel: [<c12b2700>] ? release_sock+0xb0/0xd0
> 2011-10-14 09:50:46 chgut11fw01 kernel: [<c130f222>] inet_sendmsg+0x42/0xa0
> 2011-10-14 09:50:46 chgut11fw01 kernel: [<c1021407>] ?
> __wake_up_sync_key+0x47/0x60
> 2011-10-14 09:50:46 chgut11fw01 kernel: [<c12afc07>] sock_sendmsg+0xa7/0xd0
> 2011-10-14 09:50:46 chgut11fw01 kernel: [<c12b29f3>] ?
> sock_def_readable+0x33/0x60
> 2011-10-14 09:50:46 chgut11fw01 kernel: [<c12afc07>] ? sock_sendmsg+0xa7/0xd0
> 2011-10-14 09:50:46 chgut11fw01 kernel: [<c12b8e83>] ? verify_iovec+0x53/0xb0
> 2011-10-14 09:50:46 chgut11fw01 kernel: [<c12b08e4>] __sys_sendmsg+0x2d4/0x2e0
> 2011-10-14 09:50:46 chgut11fw01 kernel: [<c12afc9e>] ?
> sockfd_lookup_light+0x1e/0x70
> 2011-10-14 09:50:46 chgut11fw01 kernel: [<c12b02fa>] ? sys_sendto+0xaa/0xe0
> 2011-10-14 09:50:46 chgut11fw01 kernel: [<c102f928>] ? nsecs_to_jiffies+0x8/0x10
> 2011-10-14 09:50:46 chgut11fw01 kernel: [<c12eaf11>] ? ip_setsockopt+0x41/0xa0
> 2011-10-14 09:50:46 chgut11fw01 kernel: [<c12b0a36>] sys_sendmsg+0x36/0x60
> 2011-10-14 09:50:46 chgut11fw01 kernel: [<c12b1669>] sys_socketcall+0xe9/0x280
> 2011-10-14 09:50:46 chgut11fw01 kernel: [<c133d8c5>] syscall_call+0x7/0xb
> 2011-10-14 09:50:46 chgut11fw01 kernel: [<c1330000>] ?
> packet_recvmsg+0x170/0x440
> 2011-10-14 09:50:46 chgut11fw01 kernel: Code: 00 00 89 4c 24 14 8b 88
> a4 00 00 00 89 54 24 0c 89 4c 24 10 8b 40 50 89 5c 24 04 c7 04 24 94
> d1 3f c1 89 44 24 08 e8 b4 4b 08 00 <0f> 0b eb fe b9 1c b2 3f c1 eb ae
> 55 89 e5 57 56 89 d6 53 89 c3
> 2011-10-14 09:50:46 chgut11fw01 kernel: EIP: [<c12b6815>]
> skb_put+0x85/0x90 SS:ESP 0068:d8979c58
> 2011-10-14 09:50:46 chgut11fw01 kernel: ---[ end trace ff341104610beeed ]---
> Could anyone give me a hint, how I can furher proceed to find the error?
> Thanks.
Please try following patch :
[PATCH] ip_gre: dont increase dev->needed_headroom on a live device
It seems ip_gre is able to change dev->needed_headroom on the fly.
Its is not legal unfortunately and triggers a BUG in raw_sendmsg()
skb = sock_alloc_send_skb(sk, ... + LL_ALLOCATED_SPACE(rt->dst.dev)
< another cpu change dev->needed_headromm (making it bigger)
...
skb_reserve(skb, LL_RESERVED_SPACE(rt->dst.dev));
We end with LL_RESERVED_SPACE() being bigger than LL_ALLOCATED_SPACE()
-> we crash later because skb head is exhausted.
Bug introduced in commit 243aad83 in 2.6.34 (ip_gre: include route
header_len in max_headroom calculation)
Reported-by: Elmar Vonlanthen <evonlanthen@gmail.com>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
CC: Timo Teräs <timo.teras@iki.fi>
CC: Herbert Xu <herbert@gondor.apana.org.au>
---
diff --git a/net/ipv4/ip_gre.c b/net/ipv4/ip_gre.c
index 8871067..1505dcf 100644
--- a/net/ipv4/ip_gre.c
+++ b/net/ipv4/ip_gre.c
@@ -835,8 +835,6 @@ static netdev_tx_t ipgre_tunnel_xmit(struct sk_buff *skb, struct net_device *dev
if (skb_headroom(skb) < max_headroom || skb_shared(skb)||
(skb_cloned(skb) && !skb_clone_writable(skb, 0))) {
struct sk_buff *new_skb = skb_realloc_headroom(skb, max_headroom);
- if (max_headroom > dev->needed_headroom)
- dev->needed_headroom = max_headroom;
if (!new_skb) {
ip_rt_put(rt);
dev->stats.tx_dropped++;
^ permalink raw reply related
* Re: __kfree_skb eventually calls kfree_skb violating dropwatch assumption
From: Neil Horman @ 2011-10-14 14:54 UTC (permalink / raw)
To: Suresh, Charles; +Cc: netdev@vger.kernel.org
In-Reply-To: <27F465BDABE6954AABB2A4E3599BDAC702AD1DC3A7@sausexmbp02.amd.com>
On Wed, Oct 12, 2011 at 09:17:56PM -0500, Suresh, Charles wrote:
> kfree_skb can be called from __kfree_skb through the following call chain :
>
> kfree_skb <- skb_drop_list <- skb_drop_fraglist <- skb_release_data <- skb_release_all <- __kfree_skb (on the 2.38.4 kernel).
>
> This violates the assumption in the dropwatch tool that discarded packets go through the kfree_skb path and all others must go through the consume_skb path (thus resulting in the over-counting of discarded packets in dropwatch).
>
> Neil Horman the author of dropwatch suggested that this could be fixed by skb_drop_list calling consume_skb instead of kfree_skb.
>
> Charles
>
Acutally, looking closer at this, I think we dont' even really need to change
anything, Once acme is done pushing the changes that enable easier user space
symbol matching, I can just modify the dropwatch perf script and user space tool
to filter traces of kfree_skb that occur from skb_drop_list. The only two
places that call is used is from pskb_trim and via a call to kfree_skb or
consume_skb. Neither call should be considered and independent drop event.
Neil
^ permalink raw reply
* Re: [PATCH 17/21] stmmac: drop unused Kconfig symbol
From: Giuseppe CAVALLARO @ 2011-10-14 13:25 UTC (permalink / raw)
To: Paul Bolle; +Cc: netdev, linux-kernel
In-Reply-To: <1318595432.6132.76.camel@x61.thuisdomein>
Hello Paul
IIRC, I had posted a patch to do this long time ago.
In any case, the dual mac Kconfig is not useful and it can be removed.
Acked-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
On 10/14/2011 2:30 PM, Paul Bolle wrote:
> Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
> ---
> drivers/net/stmmac/Kconfig | 9 ---------
> 1 files changed, 0 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/net/stmmac/Kconfig b/drivers/net/stmmac/Kconfig
> index 7df7df4..9e37a9a 100644
> --- a/drivers/net/stmmac/Kconfig
> +++ b/drivers/net/stmmac/Kconfig
> @@ -20,15 +20,6 @@ config STMMAC_DA
> By default, the DMA arbitration scheme is based on Round-robin
> (rx:tx priority is 1:1).
>
> -config STMMAC_DUAL_MAC
> - bool "STMMAC: dual mac support (EXPERIMENTAL)"
> - default n
> - depends on EXPERIMENTAL && STMMAC_ETH && !STMMAC_TIMER
> - help
> - Some ST SoCs (for example the stx7141 and stx7200c2) have two
> - Ethernet Controllers. This option turns on the second Ethernet
> - device on this kind of platforms.
> -
> config STMMAC_TIMER
> bool "STMMAC Timer optimisation"
> default n
^ permalink raw reply
* Re: [PATCH v7 0/8] Request for inclusion: tcp memory buffers
From: Glauber Costa @ 2011-10-14 12:56 UTC (permalink / raw)
To: David Miller
Cc: linux-kernel, akpm, lizf, kamezawa.hiroyu, ebiederm, paul,
gthelen, netdev, linux-mm, kirill, avagin, devel
In-Reply-To: <20111013.161819.264553121596077263.davem@davemloft.net>
[-- Attachment #1: Type: text/plain, Size: 1473 bytes --]
On 10/14/2011 12:18 AM, David Miller wrote:
> From: Glauber Costa<glommer@parallels.com>
> Date: Fri, 14 Oct 2011 00:14:40 +0400
>
>> Are you happy, or at least willing to accept, an approach that keep
>> things as they were with cgroups *compiled out*, or were you referring
>> to not in use == compiled in, but with no users?
>
> To me these are the same exact thing, because %99 of users will be running
> a kernel with every feature turned on in the Kconfig.
Ok.
Please let me know what do you think of the following patch. It is still
crude, and applies on top of what I had, for simplicity. I can of course
rework all the series for the next submission. The main idea is:
We basically don't care about accounting if all tasks are in the same,
root, cgroup. So I am using static_branch to enable this code path when
the first !root cgroup is created - a stronger statement than just
enabled/disabled by a runtime option. This should cover every single
user that is not *actively* using cgroups (I understand that most
distros will not only compile it in, but also leave it enabled...). When
this code path is disabled, we should be doing the same as before.
If you think this approach is valid, I am not left with the problem of
how to replace the fields when cgroups are enabled. But for that I guess
I can just copy the struct proto (probably only 2, or at most 3 protos
will need it anyway), and make the new sockets run on this new
structure.
Cheers
[-- Attachment #2: test.patch --]
[-- Type: text/plain, Size: 14381 bytes --]
diff --git a/include/net/sock.h b/include/net/sock.h
index efd7664..2270e50 100644
--- a/include/net/sock.h
+++ b/include/net/sock.h
@@ -807,19 +807,35 @@ struct proto {
* Add a value in pages to the current memory allocation,
* and return the current value.
*/
- long (*mem_allocated_add)(struct mem_cgroup *memcg,
- long val, int *parent_status);
- /* Pointer to the current number of sockets in this cgroup. */
- struct percpu_counter *(*sockets_allocated)(const struct mem_cgroup *memcg);
+ union {
+ long (*mem_allocated_add)(struct mem_cgroup *memcg,
+ long val, int *parent_status);
+ atomic_long_t *memory_allocated;
+ };
+
+ union {
+ /* Pointer to the current number of sockets in this cgroup. */
+ struct percpu_counter *(*sockets_allocated_cg)(const struct mem_cgroup *memcg);
+ struct percpu_counter *sockets_allocated;
+ };
+
+ union {
/*
* Per cgroup pointer to the pressure flag: try to collapse.
* Technical note: it is used by multiple contexts non atomically.
* All the __sk_mem_schedule() is of this nature: accounting
* is strict, actions are advisory and have some latency.
*/
- int *(*memory_pressure)(const struct mem_cgroup *memcg);
- /* Pointer to the per-cgroup version of the the sysctl_mem field */
- long *(*prot_mem)(const struct mem_cgroup *memcg);
+ int *(*memory_pressure_cg)(const struct mem_cgroup *memcg);
+ int *memory_pressure;
+
+ };
+
+ union {
+ /* Pointer to the per-cgroup version of the the sysctl_mem field */
+ long *(*prot_mem)(const struct mem_cgroup *memcg);
+ long *sysctl_mem;
+ };
/*
* cgroup specific init/deinit functions. Called once for all
@@ -891,85 +907,174 @@ static inline void sk_refcnt_debug_release(const struct sock *sk)
#define sk_refcnt_debug_release(sk) do { } while (0)
#endif /* SOCK_REFCNT_DEBUG */
+extern struct jump_label_key cgroup_crap_enabled;
#include <linux/memcontrol.h>
static inline int *sk_memory_pressure(struct sock *sk)
{
- int *ret = NULL;
- if (sk->sk_prot->memory_pressure)
- ret = sk->sk_prot->memory_pressure(sk->sk_cgrp);
- return ret;
+#ifdef CONFIG_CGROUP_MEM_RES_CTLR_KMEM
+ if (static_branch(&cgroup_crap_enabled)) {
+ int *ret = NULL;
+ if (!sk->sk_cgrp)
+ goto nocgroup;
+ if (sk->sk_prot->memory_pressure)
+ ret = sk->sk_prot->memory_pressure_cg(sk->sk_cgrp);
+ return ret;
+ }
+nocgroup:
+#endif
+ return sk->sk_prot->memory_pressure;
}
static inline long sk_prot_mem(struct sock *sk, int index)
{
- long *prot = sk->sk_prot->prot_mem(sk->sk_cgrp);
+ long *prot;
+ prot = sk->sk_prot->prot_mem(sk->sk_cgrp);
return prot[index];
+
+#if 0
+#ifdef CONFIG_CGROUP_MEM_RES_CTLR_KMEM
+ if (static_branch(&cgroup_crap_enabled)) {
+ long *prot;
+ if (!sk->sk_cgrp)
+ goto nocgroup;
+ prot = sk->sk_prot->prot_mem(sk->sk_cgrp);
+ return prot[index];
+ }
+nocgroup:
+#endif
+ return sk->sk_prot->sysctl_mem[index];
+#endif
}
static inline long
sk_memory_allocated(struct sock *sk)
{
struct proto *prot = sk->sk_prot;
- struct mem_cgroup *cg = sk->sk_cgrp;
-
- return prot->mem_allocated_add(cg, 0, NULL);
+#ifdef CONFIG_CGROUP_MEM_RES_CTLR_KMEM
+ if (static_branch(&cgroup_crap_enabled)) {
+ struct mem_cgroup *cg = sk->sk_cgrp;
+ if (!cg) /* this handles the case with existing sockets */
+ goto nocgroup;
+ return prot->mem_allocated_add(cg, 0, NULL);
+ }
+nocgroup:
+#endif
+ return atomic_long_read(prot->memory_allocated);
}
static inline long
sk_memory_allocated_add(struct sock *sk, int amt, int *parent_status)
{
struct proto *prot = sk->sk_prot;
- struct mem_cgroup *cg = sk->sk_cgrp;
- return prot->mem_allocated_add(cg, amt, parent_status);
+#ifdef CONFIG_CGROUP_MEM_RES_CTLR_KMEM
+ if (static_branch(&cgroup_crap_enabled)) {
+ struct mem_cgroup *cg = sk->sk_cgrp;
+ if (!cg)
+ goto nocgroup;
+ return prot->mem_allocated_add(cg, amt, parent_status);
+ }
+nocgroup:
+#endif
+ return atomic_long_add_return(amt, prot->memory_allocated);
}
static inline void
sk_memory_allocated_sub(struct sock *sk, int amt, int parent_status)
{
struct proto *prot = sk->sk_prot;
- struct mem_cgroup *cg = sk->sk_cgrp;
- prot->mem_allocated_add(cg, -amt, &parent_status);
+#ifdef CONFIG_CGROUP_MEM_RES_CTLR_KMEM
+ if (static_branch(&cgroup_crap_enabled)) {
+ struct mem_cgroup *cg = sk->sk_cgrp;
+
+ if (!cg)
+ goto nocgroup;
+
+ prot->mem_allocated_add(cg, -amt, &parent_status);
+ } else
+nocgroup:
+#endif
+ atomic_long_sub(amt, prot->memory_allocated);
}
static inline void sk_sockets_allocated_dec(struct sock *sk)
{
struct proto *prot = sk->sk_prot;
- struct mem_cgroup *cg = sk->sk_cgrp;
- percpu_counter_dec(prot->sockets_allocated(cg));
- memcg_sockets_allocated_dec(cg, prot);
+#ifdef CONFIG_CGROUP_MEM_RES_CTLR_KMEM
+ if (static_branch(&cgroup_crap_enabled)) {
+ struct mem_cgroup *cg = sk->sk_cgrp;
+ if (!cg)
+ goto nocgroup;
+ percpu_counter_dec(prot->sockets_allocated_cg(cg));
+ memcg_sockets_allocated_dec(cg, prot);
+ } else
+nocgroup:
+#endif
+ percpu_counter_dec(prot->sockets_allocated);
}
static inline void sk_sockets_allocated_inc(struct sock *sk)
{
struct proto *prot = sk->sk_prot;
- struct mem_cgroup *cg = sk->sk_cgrp;
-
- percpu_counter_inc(prot->sockets_allocated(cg));
- memcg_sockets_allocated_inc(cg, prot);
+#ifdef CONFIG_CGROUP_MEM_RES_CTLR_KMEM
+ if (static_branch(&cgroup_crap_enabled)) {
+ struct mem_cgroup *cg = sk->sk_cgrp;
+ if (!cg)
+ goto nocgroup;
+ percpu_counter_inc(prot->sockets_allocated_cg(cg));
+ memcg_sockets_allocated_inc(cg, prot);
+ } else
+nocgroup:
+#endif
+ percpu_counter_inc(prot->sockets_allocated);
}
static inline int
sk_sockets_allocated_read_positive(struct sock *sk)
{
struct proto *prot = sk->sk_prot;
- struct mem_cgroup *cg = sk->sk_cgrp;
-
- return percpu_counter_sum_positive(prot->sockets_allocated(cg));
+#ifdef CONFIG_CGROUP_MEM_RES_CTLR_KMEM
+ if (static_branch(&cgroup_crap_enabled)) {
+ struct mem_cgroup *cg = sk->sk_cgrp;
+ if (!cg)
+ goto nocgroup;
+ return percpu_counter_sum_positive(prot->sockets_allocated_cg(cg));
+ } else
+nocgroup:
+#endif
+ return percpu_counter_sum_positive(prot->sockets_allocated);
}
static inline int
kcg_sockets_allocated_sum_positive(struct proto *prot, struct mem_cgroup *cg)
{
- return percpu_counter_sum_positive(prot->sockets_allocated(cg));
+
+#ifdef CONFIG_CGROUP_MEM_RES_CTLR_KMEM
+ if (static_branch(&cgroup_crap_enabled)) {
+ if (!cg)
+ goto nocgroup;
+ return percpu_counter_sum_positive(prot->sockets_allocated_cg(cg));
+ } else
+nocgroup:
+#endif
+ return percpu_counter_sum_positive(prot->sockets_allocated);
}
static inline long
kcg_memory_allocated(struct proto *prot, struct mem_cgroup *cg)
{
- return prot->mem_allocated_add(cg, 0, NULL);
+
+#ifdef CONFIG_CGROUP_MEM_RES_CTLR_KMEM
+ if (static_branch(&cgroup_crap_enabled)) {
+ if (!cg)
+ goto nocgroup;
+ return prot->mem_allocated_add(cg, 0, NULL);
+ }
+nocgroup:
+#endif
+ return atomic_long_read(prot->memory_allocated);
}
diff --git a/include/net/tcp.h b/include/net/tcp.h
index 74296f4..76301a7 100644
--- a/include/net/tcp.h
+++ b/include/net/tcp.h
@@ -275,6 +275,10 @@ int *memory_pressure_tcp(const struct mem_cgroup *memcg);
long memory_allocated_tcp_add(struct mem_cgroup *memcg, long val,
int *parent_status);
+extern atomic_long_t tcp_memory_allocated;
+extern int tcp_memory_pressure __read_mostly;
+extern struct percpu_counter tcp_sockets_allocated;
+
/*
* The next routines deal with comparing 32 bit unsigned ints
* and worry about wraparound (automatic with unsigned arithmetic).
diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index febf50a..8b67528 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -400,15 +399,22 @@ static inline bool mem_cgroup_is_root(struct mem_cgroup *memcg)
void sock_update_memcg(struct sock *sk)
{
+ struct mem_cgroup *memcg;
+
/* right now a socket spends its whole life in the same cgroup */
if (sk->sk_cgrp) {
WARN_ON(1);
return;
}
- rcu_read_lock();
- sk->sk_cgrp = mem_cgroup_from_task(current);
- rcu_read_unlock();
+
+ if (static_branch(&cgroup_crap_enabled)) {
+ rcu_read_lock();
+ memcg = mem_cgroup_from_task(current);
+ if (!mem_cgroup_is_root(memcg))
+ sk->sk_cgrp = memcg;
+ rcu_read_unlock();
+ }
}
void sock_release_memcg(struct sock *sk)
@@ -419,7 +425,7 @@ void memcg_sockets_allocated_dec(struct mem_cgroup *memcg, struct proto *prot)
{
memcg = parent_mem_cgroup(memcg);
for (; memcg; memcg = parent_mem_cgroup(memcg))
- percpu_counter_dec(prot->sockets_allocated(memcg));
+ percpu_counter_dec(prot->sockets_allocated_cg(memcg));
}
EXPORT_SYMBOL(memcg_sockets_allocated_dec);
@@ -427,7 +433,7 @@ void memcg_sockets_allocated_inc(struct mem_cgroup *memcg, struct proto *prot)
{
memcg = parent_mem_cgroup(memcg);
for (; memcg; memcg = parent_mem_cgroup(memcg))
- percpu_counter_inc(prot->sockets_allocated(memcg));
+ percpu_counter_inc(prot->sockets_allocated_cg(memcg));
}
EXPORT_SYMBOL(memcg_sockets_allocated_inc);
@@ -5024,19 +5030,28 @@ static struct cftype kmem_cgroup_files[] = {
static int register_kmem_files(struct cgroup *cont, struct cgroup_subsys *ss)
{
int ret = 0;
+ struct mem_cgroup *memcg = mem_cgroup_from_cont(cont);
ret = cgroup_add_files(cont, ss, kmem_cgroup_files,
ARRAY_SIZE(kmem_cgroup_files));
if (!ret)
ret = sockets_populate(cont, ss);
+
+ if (!mem_cgroup_is_root(memcg))
+ jump_label_inc(&cgroup_crap_enabled);
+
return ret;
};
static void kmem_cgroup_destroy(struct cgroup_subsys *ss,
struct cgroup *cont)
{
+ struct mem_cgroup *memcg = mem_cgroup_from_cont(cont);
sockets_destroy(cont, ss);
+
+ if (!mem_cgroup_is_root(memcg))
+ jump_label_dec(&cgroup_crap_enabled);
}
#else
static int register_kmem_files(struct cgroup *cont, struct cgroup_subsys *ss)
diff --git a/net/core/sock.c b/net/core/sock.c
index 3fa3ccb..444a527 100644
--- a/net/core/sock.c
+++ b/net/core/sock.c
@@ -111,6 +111,7 @@
#include <linux/init.h>
#include <linux/highmem.h>
#include <linux/user_namespace.h>
+#include <linux/jump_label.h>
#include <asm/uaccess.h>
#include <asm/system.h>
@@ -178,6 +179,9 @@ void sockets_destroy(struct cgroup *cgrp, struct cgroup_subsys *ss)
static struct lock_class_key af_family_keys[AF_MAX];
static struct lock_class_key af_family_slock_keys[AF_MAX];
+struct jump_label_key cgroup_crap_enabled;
+EXPORT_SYMBOL(cgroup_crap_enabled);
+
/*
* Make lock validator output more readable. (we pre-construct these
* strings build-time, so that runtime initialization of socket
@@ -2525,8 +2529,11 @@ static void proto_seq_printf(struct seq_file *seq, struct proto *proto)
struct mem_cgroup *cg = mem_cgroup_from_task(current);
int *memory_pressure = NULL;
+#if 0
+ /* not important right now */
if (proto->memory_pressure)
memory_pressure = proto->memory_pressure(cg);
+#endif
seq_printf(seq, "%-9s %4u %6d %6ld %-3s %6u %-3s %-10s "
"%2c %2c %2c %2c %2c %2c %2c %2c %2c %2c %2c %2c %2c %2c %2c %2c %2c %2c %2c\n",
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
index b1abebd..c71cfa5 100644
--- a/net/ipv4/tcp.c
+++ b/net/ipv4/tcp.c
@@ -299,8 +299,11 @@ struct tcp_splice_state {
/* Current number of TCP sockets. */
struct percpu_counter tcp_sockets_allocated;
+EXPORT_SYMBOL(tcp_sockets_allocated);
atomic_long_t tcp_memory_allocated; /* Current allocated memory. */
+EXPORT_SYMBOL(tcp_memory_allocated);
int tcp_memory_pressure __read_mostly;
+EXPORT_SYMBOL(tcp_memory_pressure);
int *memory_pressure_tcp_nocg(const struct mem_cgroup *memcg)
{
diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c
index 378a31c..c9724a8 100644
--- a/net/ipv4/tcp_ipv4.c
+++ b/net/ipv4/tcp_ipv4.c
@@ -2608,19 +2608,15 @@ struct proto tcp_prot = {
#ifdef CONFIG_CGROUP_MEM_RES_CTLR_KMEM
.init_cgroup = tcp_init_cgroup,
.destroy_cgroup = tcp_destroy_cgroup,
- .enter_memory_pressure = tcp_enter_memory_pressure,
- .memory_pressure = memory_pressure_tcp,
- .sockets_allocated = sockets_allocated_tcp,
- .orphan_count = &tcp_orphan_count,
- .mem_allocated_add = memory_allocated_tcp_add,
- .prot_mem = tcp_sysctl_mem,
+ .prot_mem = tcp_sysctl_mem_nocg,
#else
- .enter_memory_pressure = tcp_enter_memory_pressure_nocg,
- .memory_pressure = memory_pressure_tcp_nocg,
- .sockets_allocated = sockets_allocated_tcp_nocg,
- .mem_allocated_nocg = memory_allocated_tcp_nocg,
.prot_mem = tcp_sysctl_mem_nocg,
#endif
+ .enter_memory_pressure = tcp_enter_memory_pressure,
+ .memory_pressure = &tcp_memory_pressure,
+ .sockets_allocated = &tcp_sockets_allocated,
+ .orphan_count = &tcp_orphan_count,
+ .memory_allocated = &tcp_memory_allocated,
.sysctl_wmem = sysctl_tcp_wmem,
.sysctl_rmem = sysctl_tcp_rmem,
.max_header = MAX_TCP_HEADER,
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c
index 21604b4..5fa9cf3 100644
--- a/net/ipv4/udp.c
+++ b/net/ipv4/udp.c
@@ -1947,7 +1947,7 @@ struct proto udp_prot = {
.unhash = udp_lib_unhash,
.rehash = udp_v4_rehash,
.get_port = udp_v4_get_port,
- .mem_allocated_add = &memory_allocated_udp_add,
+ .memory_allocated = &udp_memory_allocated,
.prot_mem = udp_sysctl_mem,
.sysctl_wmem = &sysctl_udp_wmem_min,
.sysctl_rmem = &sysctl_udp_rmem_min,
diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c
index f7f9bc2..5a976fa 100644
--- a/net/ipv6/tcp_ipv6.c
+++ b/net/ipv6/tcp_ipv6.c
@@ -2197,18 +2197,15 @@ struct proto tcpv6_prot = {
.get_port = inet_csk_get_port,
.orphan_count = &tcp_orphan_count,
#ifdef CONFIG_CGROUP_MEM_RES_CTLR_KMEM
- .enter_memory_pressure = tcp_enter_memory_pressure,
- .sockets_allocated = sockets_allocated_tcp,
- .mem_allocated_add = memory_allocated_tcp_add,
- .memory_pressure = memory_pressure_tcp,
.prot_mem = tcp_sysctl_mem,
#else
- .enter_memory_pressure = tcp_enter_memory_pressure_nocg,
- .sockets_allocated = sockets_allocated_tcp_nocg,
- .mem_allocated_add = memory_allocated_tcp_nocg,
- .memory_pressure = memory_pressure_tcp_nocg,
.prot_mem = tcp_sysctl_mem_nocg,
#endif
+ .enter_memory_pressure = tcp_enter_memory_pressure_nocg,
+ .sockets_allocated = &tcp_sockets_allocated,
+ .memory_allocated = &tcp_memory_allocated,
+ .memory_pressure = &tcp_memory_pressure,
+
.sysctl_wmem = sysctl_tcp_wmem,
.sysctl_rmem = sysctl_tcp_rmem,
.max_header = MAX_TCP_HEADER,
^ permalink raw reply related
* Re: [PATCH] dev: use ifindex hash for dev_seq_ops
From: Eric Dumazet @ 2011-10-14 12:53 UTC (permalink / raw)
To: Mihai Maruseac
Cc: davem, mirq-linux, therbert, jpirko, netdev, linux-kernel,
dbaluta, Mihai Maruseac
In-Reply-To: <1318586017-17207-1-git-send-email-mmaruseac@ixiacom.com>
Le vendredi 14 octobre 2011 à 12:53 +0300, Mihai Maruseac a écrit :
> Instead of using the dev->next chain and trying to resync at each call to
> dev_seq_start, use the ifindex, keeping the last index in seq->private field.
>
> Tests revealed the following results for ifconfig > /dev/null
> * 1000 interfaces:
> * 0.114s without patch
> * 0.089s with patch
> * 3000 interfaces:
> * 0.489s without patch
> * 0.110s with patch
> * 5000 interfaces:
> * 1.363s without patch
> * 0.250s with patch
> * 128000 interfaces (other setup):
> * ~100s without patch
> * ~30s with patch
>
> Signed-off-by: Mihai Maruseac <mmaruseac@ixiacom.com>
> ---
> net/core/dev.c | 55 ++++++++++++++++++++++++++++++++++---------------------
> 1 files changed, 34 insertions(+), 21 deletions(-)
>
> diff --git a/net/core/dev.c b/net/core/dev.c
> index 70ecb86..ea24445 100644
> --- a/net/core/dev.c
> +++ b/net/core/dev.c
> @@ -4041,6 +4041,37 @@ static int dev_ifconf(struct net *net, char __user *arg)
> }
>
> #ifdef CONFIG_PROC_FS
> +
> +struct dev_iter_state {
> + struct seq_net_private p;
> + int ifindex;
> +};
> +
> +static struct net_device *__dev_seq_next(struct seq_file *seq, loff_t *pos)
> +{
> + struct dev_iter_state *state = seq->private;
> + struct net *net = seq_file_net(seq);
> + struct net_device *dev;
> + loff_t off;
> +
> + dev = dev_get_by_index_rcu(net, state->ifindex);
> + if (likely(dev))
> + goto found;
> +
> + off = 0;
> + for_each_netdev_rcu(net, dev)
> + if (off++ == *pos) {
> + state->ifindex = dev->ifindex;
> + goto found;
> + }
> +
> + return NULL;
> +found:
> + state->ifindex++;
This assumes device ifindexes are contained in a small range
[N .. N + X]
I understand this can help some benchmarks, but in real world this wont
help that much once ifindexes are 'fragmented' (If really this multi
thousand devices stuff is for real)
Listen, we currently have 256 slots in the hash table.
Can we try to make 'offset' something like (slot_number<<24) +
(position in hash chain [slot_number]), instead of (position in devices
global list)
^ permalink raw reply
* [PATCH 17/21] stmmac: drop unused Kconfig symbol
From: Paul Bolle @ 2011-10-14 12:30 UTC (permalink / raw)
To: Giuseppe Cavallaro; +Cc: netdev, linux-kernel
Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
---
drivers/net/stmmac/Kconfig | 9 ---------
1 files changed, 0 insertions(+), 9 deletions(-)
diff --git a/drivers/net/stmmac/Kconfig b/drivers/net/stmmac/Kconfig
index 7df7df4..9e37a9a 100644
--- a/drivers/net/stmmac/Kconfig
+++ b/drivers/net/stmmac/Kconfig
@@ -20,15 +20,6 @@ config STMMAC_DA
By default, the DMA arbitration scheme is based on Round-robin
(rx:tx priority is 1:1).
-config STMMAC_DUAL_MAC
- bool "STMMAC: dual mac support (EXPERIMENTAL)"
- default n
- depends on EXPERIMENTAL && STMMAC_ETH && !STMMAC_TIMER
- help
- Some ST SoCs (for example the stx7141 and stx7200c2) have two
- Ethernet Controllers. This option turns on the second Ethernet
- device on this kind of platforms.
-
config STMMAC_TIMER
bool "STMMAC Timer optimisation"
default n
--
1.7.4.4
^ permalink raw reply related
* Re: [PATCH] dev: use ifindex hash for dev_seq_ops
From: Mihai Maruseac @ 2011-10-14 12:20 UTC (permalink / raw)
To: Stephen Hemminger
Cc: davem, eric.dumazet, mirq-linux, therbert, jpirko, netdev,
linux-kernel, dbaluta, Mihai Maruseac
In-Reply-To: <20111012085024.634281a2@nehalam.linuxnetplumber.net>
On Wed, Oct 12, 2011 at 6:50 PM, Stephen Hemminger
<shemminger@vyatta.com> wrote:
> On Wed, 12 Oct 2011 12:57:26 +0300
> Mihai Maruseac <mihai.maruseac@gmail.com> wrote:
>
> It looks like you lost the ability to seek back and read the header
> (start token). How is the header handled, is possible to rewind
> the file and read it over again?
We tested with a simple program reading a part of the /proc file and
then doing a seek to the start and rereading. It worked with latest
submitted patch.
>> +static inline struct net_device *next_dev(struct seq_file *seq, loff_t *pos)
>> +{
>> + struct dev_iter_state *state = seq->private;
>> + struct net *net = seq_file_net(seq);
>> + struct net_device *dev = NULL;
>> + loff_t off;
>> +
>> + ++*pos;
>> + dev = dev_get_by_index_rcu(net, state->ifindex);
>
> Looks good a couple of minor nits.
>
> 1. The function should not be inline, since it is in no way performance
> critical. The compiler will probably inline it anyway.
>
> 2. dev does not have to be initialized since it is assigned a few
> lines later. Most programmers are trained now to always initialize
> variables, but often it is unnecessary.
>
> 3. The name next_dev() is a little generic; maybe a better name.
>
Fixed all of them,
Thanks,
--
Mihai
^ permalink raw reply
* Re: [PATCH] r8169: fix driver shutdown WoL regression.
From: Marc Ballarin @ 2011-10-14 12:12 UTC (permalink / raw)
To: Francois Romieu; +Cc: netdev, David Miller, Hayes
In-Reply-To: <20111014105745.GA11204@electric-eye.fr.zoreil.com>
On Fri, 14 Oct 2011 12:57:45 +0200
Francois Romieu <romieu@fr.zoreil.com> wrote:
> ...
> Marc, can you add your Tested-by: to this patch ? It avoids the extra
> phy writes which were included in the previous revision of the patch.
> They did not happen before the regression so there is no reason to
> sneak them in -release. Works ok with RTL_GIGA_MAC_VER_34.
Works fine on RTL_GIGA_MAC_VER_33 as well.
Tested-by: Marc Ballarin <ballarin.marc@gmx.de>
^ permalink raw reply
* [PATCH] r8169: fix driver shutdown WoL regression.
From: Francois Romieu @ 2011-10-14 10:57 UTC (permalink / raw)
To: netdev; +Cc: Marc Ballarin, David Miller, Hayes
Due to commit 92fc43b4159b518f5baae57301f26d770b0834c9 ("r8169: modify the
flow of the hw reset."), rtl8169_hw_reset stomps during driver shutdown on
RxConfig bits which are needed for WOL on some versions of the hardware.
As these bits were formerly set from the r81{0x, 68}_pll_power_down methods,
factor them out for use in the driver shutdown (rtl_shutdown) handler.
I favored __rtl8169_get_wol() -hardware state indication- over
RTL_FEATURE_WOL as the latter has become a good candidate for removal.
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Hayes <hayeswang@realtek.com>
---
Marc, can you add your Tested-by: to this patch ? It avoids the extra
phy writes which were included in the previous revision of the patch.
They did not happen before the regression so there is no reason to
sneak them in -release. Works ok with RTL_GIGA_MAC_VER_34.
drivers/net/r8169.c | 88 ++++++++++++++++++++++++++++++++------------------
1 files changed, 56 insertions(+), 32 deletions(-)
diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c
index c236670..24219ec 100644
--- a/drivers/net/r8169.c
+++ b/drivers/net/r8169.c
@@ -3316,6 +3316,37 @@ static void __devinit rtl_init_mdio_ops(struct rtl8169_private *tp)
}
}
+static void rtl_wol_suspend_quirk(struct rtl8169_private *tp)
+{
+ void __iomem *ioaddr = tp->mmio_addr;
+
+ switch (tp->mac_version) {
+ case RTL_GIGA_MAC_VER_29:
+ case RTL_GIGA_MAC_VER_30:
+ case RTL_GIGA_MAC_VER_32:
+ case RTL_GIGA_MAC_VER_33:
+ case RTL_GIGA_MAC_VER_34:
+ RTL_W32(RxConfig, RTL_R32(RxConfig) |
+ AcceptBroadcast | AcceptMulticast | AcceptMyPhys);
+ break;
+ default:
+ break;
+ }
+}
+
+static bool rtl_wol_pll_power_down(struct rtl8169_private *tp)
+{
+ if (!(__rtl8169_get_wol(tp) & WAKE_ANY))
+ return false;
+
+ rtl_writephy(tp, 0x1f, 0x0000);
+ rtl_writephy(tp, MII_BMCR, 0x0000);
+
+ rtl_wol_suspend_quirk(tp);
+
+ return true;
+}
+
static void r810x_phy_power_down(struct rtl8169_private *tp)
{
rtl_writephy(tp, 0x1f, 0x0000);
@@ -3330,18 +3361,8 @@ static void r810x_phy_power_up(struct rtl8169_private *tp)
static void r810x_pll_power_down(struct rtl8169_private *tp)
{
- void __iomem *ioaddr = tp->mmio_addr;
-
- if (__rtl8169_get_wol(tp) & WAKE_ANY) {
- rtl_writephy(tp, 0x1f, 0x0000);
- rtl_writephy(tp, MII_BMCR, 0x0000);
-
- if (tp->mac_version == RTL_GIGA_MAC_VER_29 ||
- tp->mac_version == RTL_GIGA_MAC_VER_30)
- RTL_W32(RxConfig, RTL_R32(RxConfig) | AcceptBroadcast |
- AcceptMulticast | AcceptMyPhys);
+ if (rtl_wol_pll_power_down(tp))
return;
- }
r810x_phy_power_down(tp);
}
@@ -3430,17 +3451,8 @@ static void r8168_pll_power_down(struct rtl8169_private *tp)
tp->mac_version == RTL_GIGA_MAC_VER_33)
rtl_ephy_write(ioaddr, 0x19, 0xff64);
- if (__rtl8169_get_wol(tp) & WAKE_ANY) {
- rtl_writephy(tp, 0x1f, 0x0000);
- rtl_writephy(tp, MII_BMCR, 0x0000);
-
- if (tp->mac_version == RTL_GIGA_MAC_VER_32 ||
- tp->mac_version == RTL_GIGA_MAC_VER_33 ||
- tp->mac_version == RTL_GIGA_MAC_VER_34)
- RTL_W32(RxConfig, RTL_R32(RxConfig) | AcceptBroadcast |
- AcceptMulticast | AcceptMyPhys);
+ if (rtl_wol_pll_power_down(tp))
return;
- }
r8168_phy_power_down(tp);
@@ -5788,11 +5800,30 @@ static const struct dev_pm_ops rtl8169_pm_ops = {
#endif /* !CONFIG_PM */
+static void rtl_wol_shutdown_quirk(struct rtl8169_private *tp)
+{
+ void __iomem *ioaddr = tp->mmio_addr;
+
+ /* WoL fails with 8168b when the receiver is disabled. */
+ switch (tp->mac_version) {
+ case RTL_GIGA_MAC_VER_11:
+ case RTL_GIGA_MAC_VER_12:
+ case RTL_GIGA_MAC_VER_17:
+ pci_clear_master(tp->pci_dev);
+
+ RTL_W8(ChipCmd, CmdRxEnb);
+ /* PCI commit */
+ RTL_R8(ChipCmd);
+ break;
+ default:
+ break;
+ }
+}
+
static void rtl_shutdown(struct pci_dev *pdev)
{
struct net_device *dev = pci_get_drvdata(pdev);
struct rtl8169_private *tp = netdev_priv(dev);
- void __iomem *ioaddr = tp->mmio_addr;
rtl8169_net_suspend(dev);
@@ -5806,16 +5837,9 @@ static void rtl_shutdown(struct pci_dev *pdev)
spin_unlock_irq(&tp->lock);
if (system_state == SYSTEM_POWER_OFF) {
- /* WoL fails with 8168b when the receiver is disabled. */
- if ((tp->mac_version == RTL_GIGA_MAC_VER_11 ||
- tp->mac_version == RTL_GIGA_MAC_VER_12 ||
- tp->mac_version == RTL_GIGA_MAC_VER_17) &&
- (tp->features & RTL_FEATURE_WOL)) {
- pci_clear_master(pdev);
-
- RTL_W8(ChipCmd, CmdRxEnb);
- /* PCI commit */
- RTL_R8(ChipCmd);
+ if (__rtl8169_get_wol(tp) & WAKE_ANY) {
+ rtl_wol_suspend_quirk(tp);
+ rtl_wol_shutdown_quirk(tp);
}
pci_wake_from_d3(pdev, true);
--
1.7.6.4
^ permalink raw reply related
* Re:
From: Hamde Nazar @ 2011-10-14 9:54 UTC (permalink / raw)
Dear Friend,
I have an offer which I need your assistant, your share will be 50%;
please if you are interested do contact me for more details.my personal
email:vhong_p11@yahoo.com.hk
Email Address:vhong_p11@yahoo.com.hk
Mr Vincent Hong
^ permalink raw reply
* [PATCH] dev: use ifindex hash for dev_seq_ops
From: Mihai Maruseac @ 2011-10-14 9:53 UTC (permalink / raw)
To: davem
Cc: eric.dumazet, mirq-linux, therbert, jpirko, netdev, linux-kernel,
dbaluta, Mihai Maruseac
In-Reply-To: <1318413446-22258-1-git-send-email-mmaruseac@ixiacom.com>
Instead of using the dev->next chain and trying to resync at each call to
dev_seq_start, use the ifindex, keeping the last index in seq->private field.
Tests revealed the following results for ifconfig > /dev/null
* 1000 interfaces:
* 0.114s without patch
* 0.089s with patch
* 3000 interfaces:
* 0.489s without patch
* 0.110s with patch
* 5000 interfaces:
* 1.363s without patch
* 0.250s with patch
* 128000 interfaces (other setup):
* ~100s without patch
* ~30s with patch
Signed-off-by: Mihai Maruseac <mmaruseac@ixiacom.com>
---
net/core/dev.c | 55 ++++++++++++++++++++++++++++++++++---------------------
1 files changed, 34 insertions(+), 21 deletions(-)
diff --git a/net/core/dev.c b/net/core/dev.c
index 70ecb86..ea24445 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -4041,6 +4041,37 @@ static int dev_ifconf(struct net *net, char __user *arg)
}
#ifdef CONFIG_PROC_FS
+
+struct dev_iter_state {
+ struct seq_net_private p;
+ int ifindex;
+};
+
+static struct net_device *__dev_seq_next(struct seq_file *seq, loff_t *pos)
+{
+ struct dev_iter_state *state = seq->private;
+ struct net *net = seq_file_net(seq);
+ struct net_device *dev;
+ loff_t off;
+
+ dev = dev_get_by_index_rcu(net, state->ifindex);
+ if (likely(dev))
+ goto found;
+
+ off = 0;
+ for_each_netdev_rcu(net, dev)
+ if (off++ == *pos) {
+ state->ifindex = dev->ifindex;
+ goto found;
+ }
+
+ return NULL;
+found:
+ state->ifindex++;
+ ++*pos;
+ return dev;
+}
+
/*
* This is invoked by the /proc filesystem handler to display a device
* in detail.
@@ -4048,33 +4079,15 @@ static int dev_ifconf(struct net *net, char __user *arg)
void *dev_seq_start(struct seq_file *seq, loff_t *pos)
__acquires(RCU)
{
- struct net *net = seq_file_net(seq);
- loff_t off;
- struct net_device *dev;
-
rcu_read_lock();
if (!*pos)
return SEQ_START_TOKEN;
-
- off = 1;
- for_each_netdev_rcu(net, dev)
- if (off++ == *pos)
- return dev;
-
- return NULL;
+ return __dev_seq_next(seq, pos);
}
void *dev_seq_next(struct seq_file *seq, void *v, loff_t *pos)
{
- struct net_device *dev = v;
-
- if (v == SEQ_START_TOKEN)
- dev = first_net_device_rcu(seq_file_net(seq));
- else
- dev = next_net_device_rcu(dev);
-
- ++*pos;
- return dev;
+ return __dev_seq_next(seq, pos);
}
void dev_seq_stop(struct seq_file *seq, void *v)
@@ -4173,7 +4186,7 @@ static const struct seq_operations dev_seq_ops = {
static int dev_seq_open(struct inode *inode, struct file *file)
{
return seq_open_net(inode, file, &dev_seq_ops,
- sizeof(struct seq_net_private));
+ sizeof(struct dev_iter_state));
}
static const struct file_operations dev_seq_fops = {
--
1.7.4.1
^ permalink raw reply related
* [PATCH net-next 1/1] net: validate HWTSTAMP ioctl parameters
From: Richard Cochran @ 2011-10-14 9:37 UTC (permalink / raw)
To: netdev; +Cc: David Miller
In-Reply-To: <cover.1318584677.git.richard.cochran@omicron.at>
This patch adds a sanity check on the values provided by user space for
the hardware time stamping configuration. If the values lie outside of
the absolute limits, then the ioctl request will be denied.
Signed-off-by: Richard Cochran <richard.cochran@omicron.at>
---
include/linux/net_tstamp.h | 4 +-
net/core/dev.c | 58 ++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 60 insertions(+), 2 deletions(-)
diff --git a/include/linux/net_tstamp.h b/include/linux/net_tstamp.h
index 3df0984..ae5df12 100644
--- a/include/linux/net_tstamp.h
+++ b/include/linux/net_tstamp.h
@@ -45,7 +45,7 @@ struct hwtstamp_config {
};
/* possible values for hwtstamp_config->tx_type */
-enum {
+enum hwtstamp_tx_types {
/*
* No outgoing packet will need hardware time stamping;
* should a packet arrive which asks for it, no hardware
@@ -72,7 +72,7 @@ enum {
};
/* possible values for hwtstamp_config->rx_filter */
-enum {
+enum hwtstamp_rx_filters {
/* time stamp no incoming packet at all */
HWTSTAMP_FILTER_NONE,
diff --git a/net/core/dev.c b/net/core/dev.c
index 70ecb86..bc347e6 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -136,6 +136,7 @@
#include <linux/if_tunnel.h>
#include <linux/if_pppox.h>
#include <linux/ppp_defs.h>
+#include <linux/net_tstamp.h>
#include "net-sysfs.h"
@@ -1477,6 +1478,57 @@ static inline void net_timestamp_check(struct sk_buff *skb)
__net_timestamp(skb);
}
+static int net_hwtstamp_validate(struct ifreq *ifr)
+{
+ struct hwtstamp_config cfg;
+ enum hwtstamp_tx_types tx_type;
+ enum hwtstamp_rx_filters rx_filter;
+ int tx_type_valid = 0;
+ int rx_filter_valid = 0;
+
+ if (copy_from_user(&cfg, ifr->ifr_data, sizeof(cfg)))
+ return -EFAULT;
+
+ if (cfg.flags) /* reserved for future extensions */
+ return -EINVAL;
+
+ tx_type = cfg.tx_type;
+ rx_filter = cfg.rx_filter;
+
+ switch (tx_type) {
+ case HWTSTAMP_TX_OFF:
+ case HWTSTAMP_TX_ON:
+ case HWTSTAMP_TX_ONESTEP_SYNC:
+ tx_type_valid = 1;
+ break;
+ }
+
+ switch (rx_filter) {
+ case HWTSTAMP_FILTER_NONE:
+ case HWTSTAMP_FILTER_ALL:
+ case HWTSTAMP_FILTER_SOME:
+ case HWTSTAMP_FILTER_PTP_V1_L4_EVENT:
+ case HWTSTAMP_FILTER_PTP_V1_L4_SYNC:
+ case HWTSTAMP_FILTER_PTP_V1_L4_DELAY_REQ:
+ case HWTSTAMP_FILTER_PTP_V2_L4_EVENT:
+ case HWTSTAMP_FILTER_PTP_V2_L4_SYNC:
+ case HWTSTAMP_FILTER_PTP_V2_L4_DELAY_REQ:
+ case HWTSTAMP_FILTER_PTP_V2_L2_EVENT:
+ case HWTSTAMP_FILTER_PTP_V2_L2_SYNC:
+ case HWTSTAMP_FILTER_PTP_V2_L2_DELAY_REQ:
+ case HWTSTAMP_FILTER_PTP_V2_EVENT:
+ case HWTSTAMP_FILTER_PTP_V2_SYNC:
+ case HWTSTAMP_FILTER_PTP_V2_DELAY_REQ:
+ rx_filter_valid = 1;
+ break;
+ }
+
+ if (!tx_type_valid || !rx_filter_valid)
+ return -ERANGE;
+
+ return 0;
+}
+
static inline bool is_skb_forwardable(struct net_device *dev,
struct sk_buff *skb)
{
@@ -4921,6 +4973,12 @@ static int dev_ifsioc(struct net *net, struct ifreq *ifr, unsigned int cmd)
ifr->ifr_newname[IFNAMSIZ-1] = '\0';
return dev_change_name(dev, ifr->ifr_newname);
+ case SIOCSHWTSTAMP:
+ err = net_hwtstamp_validate(ifr);
+ if (err)
+ return err;
+ /* fall through */
+
/*
* Unknown or private ioctl
*/
--
1.7.2.5
^ permalink raw reply related
* [PATCH net-next 0/1] net: validate HWTSTAMP ioctl parameters
From: Richard Cochran @ 2011-10-14 9:37 UTC (permalink / raw)
To: netdev; +Cc: David Miller
In-Reply-To: <20110926.160443.1205173553442138535.davem@davemloft.net>
Okay, here is a patch to check the ioctl.
I took the liberty to check both the Rx and Tx fields. I coded the
check rather pedantically, using a switch/case over the enumerated
values. The advantage of this style is that the compiler will warn
if someone adds a new enum into net_tstamp.h without fixing the
checking function in dev.c.
Richard Cochran (1):
net: validate HWTSTAMP ioctl parameters
include/linux/net_tstamp.h | 4 +-
net/core/dev.c | 58 ++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 60 insertions(+), 2 deletions(-)
--
1.7.2.5
^ permalink raw reply
* Re: [net-next 5/6] igb: fix timecompare_upate race condition
From: Richard Cochran @ 2011-10-14 9:26 UTC (permalink / raw)
To: Jeff Kirsher; +Cc: davem, Jacob Keller, netdev, gospo, sassmann
In-Reply-To: <1318573288-18286-6-git-send-email-jeffrey.t.kirsher@intel.com>
On Thu, Oct 13, 2011 at 11:21:27PM -0700, Jeff Kirsher wrote:
> From: Jacob Keller <jacob.e.keller@intel.com>
>
> This patch closes a possible race condition when timestamping using
> the timecompare_update function as a method to detect clock skew of
> the internal cycle counter. Because timecompare_update usually allows
> skew detection no more than once a second, if ptpd or other software
> performs a clock offset (for example, using the "date" command), there
> is a small window of time where the clock skew will not match the
> current kernel wall time. This patch forces the timecompare_update to
> calculate skew every time we timestamp a packet, which removes the
> possibility of this race condition.
NAK.
What will happen when you use the card for the telecom profile?
In that case you can expect 32 sync packets per second (plus delay
requests times number of clients).
A better way is to remove the timecompare stuff and offer a PTP
Hardware Clock instead. That would make the race condition a non-issue
and also enable the nice hardware clock offered by the card(s).
Thanks,
Richard
^ permalink raw reply
* Re: [PATCH 0/4] can: the mailinglist moved to vger.kernel.org
From: Marc Kleine-Budde @ 2011-10-14 9:20 UTC (permalink / raw)
To: netdev; +Cc: linux-can
In-Reply-To: <1318581817-12352-1-git-send-email-mkl@pengutronix.de>
[-- Attachment #1: Type: text/plain, Size: 2087 bytes --]
On 10/14/2011 10:43 AM, Marc Kleine-Budde wrote:
> Hello,
>
> the BerliOS project will close with the end of the year, so we moved our
> mailinglist to vger.kernel.org, it's now linux-can@vger.kernel.org.
>
> This patch series changes every mail address accordingly.
The following changes since commit 7ae60b3f3b297b7f04025c93f1cb2275c3a1dfcd:
sky2: fix skb truesize underestimation (2011-10-13 17:12:46 -0400)
are available in the git repository at:
git.pengutronix.de:/git/mkl/linux-2.6.git can/mailinglist-for-net-next
Marc Kleine-Budde (4):
MAINTAINERS: can: the mailinglist moved to vger.kernel.org
drivers/net/can: the mailinglist moved to vger.kernel.org
net/can: the mailinglist moved to vger.kernel.org
include/linux/can: the mailinglist moved to vger.kernel.org
MAINTAINERS | 4 ++--
drivers/net/can/at91_can.c | 2 +-
drivers/net/can/sja1000/sja1000.c | 2 +-
drivers/net/can/sja1000/sja1000.h | 2 +-
drivers/net/can/slcan.c | 2 +-
drivers/net/can/vcan.c | 2 +-
include/linux/can.h | 2 +-
include/linux/can/bcm.h | 2 +-
include/linux/can/core.h | 2 +-
include/linux/can/dev.h | 2 +-
include/linux/can/error.h | 2 +-
include/linux/can/gw.h | 2 +-
include/linux/can/netlink.h | 2 +-
include/linux/can/raw.h | 2 +-
net/can/af_can.c | 2 +-
net/can/af_can.h | 2 +-
net/can/bcm.c | 2 +-
net/can/gw.c | 2 +-
net/can/proc.c | 2 +-
net/can/raw.c | 2 +-
20 files changed, 21 insertions(+), 21 deletions(-)
Marc
--
Pengutronix e.K. | Marc Kleine-Budde |
Industrial Linux Solutions | Phone: +49-231-2826-924 |
Vertretung West/Dortmund | Fax: +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686 | http://www.pengutronix.de |
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 262 bytes --]
^ permalink raw reply
* [PATCH 2/4] drivers/net/can: the mailinglist moved to vger.kernel.org
From: Marc Kleine-Budde @ 2011-10-14 8:43 UTC (permalink / raw)
To: netdev; +Cc: linux-can, Marc Kleine-Budde
In-Reply-To: <1318581817-12352-1-git-send-email-mkl@pengutronix.de>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
---
drivers/net/can/at91_can.c | 2 +-
drivers/net/can/sja1000/sja1000.c | 2 +-
drivers/net/can/sja1000/sja1000.h | 2 +-
drivers/net/can/slcan.c | 2 +-
drivers/net/can/vcan.c | 2 +-
5 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/net/can/at91_can.c b/drivers/net/can/at91_can.c
index 121ede6..63bfbd1 100644
--- a/drivers/net/can/at91_can.c
+++ b/drivers/net/can/at91_can.c
@@ -8,7 +8,7 @@
* Public License ("GPL") version 2 as distributed in the 'COPYING'
* file from the main directory of the linux kernel source.
*
- * Send feedback to <socketcan-users@lists.berlios.de>
+ * Send feedback to <linux-can@vger.kernel.org>
*
*
* Your platform definition file should specify something like:
diff --git a/drivers/net/can/sja1000/sja1000.c b/drivers/net/can/sja1000/sja1000.c
index f501bba..5eb4c95 100644
--- a/drivers/net/can/sja1000/sja1000.c
+++ b/drivers/net/can/sja1000/sja1000.c
@@ -40,7 +40,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
* DAMAGE.
*
- * Send feedback to <socketcan-users@lists.berlios.de>
+ * Send feedback to <linux-can@vger.kernel.org>
*
*/
diff --git a/drivers/net/can/sja1000/sja1000.h b/drivers/net/can/sja1000/sja1000.h
index 78bd4ec..a6c388b 100644
--- a/drivers/net/can/sja1000/sja1000.h
+++ b/drivers/net/can/sja1000/sja1000.h
@@ -40,7 +40,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
* DAMAGE.
*
- * Send feedback to <socketcan-users@lists.berlios.de>
+ * Send feedback to <linux-can@vger.kernel.org>
*
*/
diff --git a/drivers/net/can/slcan.c b/drivers/net/can/slcan.c
index 4b70b7e..727b686 100644
--- a/drivers/net/can/slcan.c
+++ b/drivers/net/can/slcan.c
@@ -35,7 +35,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
* DAMAGE.
*
- * Send feedback to <socketcan-users@lists.berlios.de>
+ * Send feedback to <linux-can@vger.kernel.org>
*
*/
diff --git a/drivers/net/can/vcan.c b/drivers/net/can/vcan.c
index a30b8f4..54cc62a 100644
--- a/drivers/net/can/vcan.c
+++ b/drivers/net/can/vcan.c
@@ -37,7 +37,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
* DAMAGE.
*
- * Send feedback to <socketcan-users@lists.berlios.de>
+ * Send feedback to <linux-can@vger.kernel.org>
*
*/
--
1.7.4.1
^ permalink raw reply related
* [PATCH 4/4] include/linux/can: the mailinglist moved to vger.kernel.org
From: Marc Kleine-Budde @ 2011-10-14 8:43 UTC (permalink / raw)
To: netdev; +Cc: linux-can, Marc Kleine-Budde
In-Reply-To: <1318581817-12352-1-git-send-email-mkl@pengutronix.de>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
---
include/linux/can.h | 2 +-
include/linux/can/bcm.h | 2 +-
include/linux/can/core.h | 2 +-
include/linux/can/dev.h | 2 +-
include/linux/can/error.h | 2 +-
include/linux/can/gw.h | 2 +-
include/linux/can/netlink.h | 2 +-
include/linux/can/raw.h | 2 +-
8 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/include/linux/can.h b/include/linux/can.h
index bb047dc..d0d7028 100644
--- a/include/linux/can.h
+++ b/include/linux/can.h
@@ -8,7 +8,7 @@
* Copyright (c) 2002-2007 Volkswagen Group Electronic Research
* All rights reserved.
*
- * Send feedback to <socketcan-users@lists.berlios.de>
+ * Send feedback to <linux-can@vger.kernel.org>
*
*/
diff --git a/include/linux/can/bcm.h b/include/linux/can/bcm.h
index e96154d..cc2f800 100644
--- a/include/linux/can/bcm.h
+++ b/include/linux/can/bcm.h
@@ -7,7 +7,7 @@
* Copyright (c) 2002-2007 Volkswagen Group Electronic Research
* All rights reserved.
*
- * Send feedback to <socketcan-users@lists.berlios.de>
+ * Send feedback to <linux-can@vger.kernel.org>
*
*/
diff --git a/include/linux/can/core.h b/include/linux/can/core.h
index 5ce6b5d..12b2878 100644
--- a/include/linux/can/core.h
+++ b/include/linux/can/core.h
@@ -8,7 +8,7 @@
* Copyright (c) 2002-2007 Volkswagen Group Electronic Research
* All rights reserved.
*
- * Send feedback to <socketcan-users@lists.berlios.de>
+ * Send feedback to <linux-can@vger.kernel.org>
*
*/
diff --git a/include/linux/can/dev.h b/include/linux/can/dev.h
index cc0bb49..bf5fa49 100644
--- a/include/linux/can/dev.h
+++ b/include/linux/can/dev.h
@@ -8,7 +8,7 @@
*
* Copyright (C) 2008 Wolfgang Grandegger <wg@grandegger.com>
*
- * Send feedback to <socketcan-users@lists.berlios.de>
+ * Send feedback to <linux-can@vger.kernel.org>
*/
#ifndef CAN_DEV_H
diff --git a/include/linux/can/error.h b/include/linux/can/error.h
index 5958074..9aa0dfb 100644
--- a/include/linux/can/error.h
+++ b/include/linux/can/error.h
@@ -7,7 +7,7 @@
* Copyright (c) 2002-2007 Volkswagen Group Electronic Research
* All rights reserved.
*
- * Send feedback to <socketcan-users@lists.berlios.de>
+ * Send feedback to <linux-can@vger.kernel.org>
*
*/
diff --git a/include/linux/can/gw.h b/include/linux/can/gw.h
index 5527b54..37cd710 100644
--- a/include/linux/can/gw.h
+++ b/include/linux/can/gw.h
@@ -7,7 +7,7 @@
* Copyright (c) 2011 Volkswagen Group Electronic Research
* All rights reserved.
*
- * Send feedback to <socketcan-users@lists.berlios.de>
+ * Send feedback to <linux-can@vger.kernel.org>
*
*/
diff --git a/include/linux/can/netlink.h b/include/linux/can/netlink.h
index 34542d3..e497cd8 100644
--- a/include/linux/can/netlink.h
+++ b/include/linux/can/netlink.h
@@ -5,7 +5,7 @@
*
* Copyright (c) 2009 Wolfgang Grandegger <wg@grandegger.com>
*
- * Send feedback to <socketcan-users@lists.berlios.de>
+ * Send feedback to <linux-can@vger.kernel.org>
*
*/
diff --git a/include/linux/can/raw.h b/include/linux/can/raw.h
index b2a0f87..f825c94 100644
--- a/include/linux/can/raw.h
+++ b/include/linux/can/raw.h
@@ -8,7 +8,7 @@
* Copyright (c) 2002-2007 Volkswagen Group Electronic Research
* All rights reserved.
*
- * Send feedback to <socketcan-users@lists.berlios.de>
+ * Send feedback to <linux-can@vger.kernel.org>
*
*/
--
1.7.4.1
^ permalink raw reply related
* [PATCH 1/4] MAINTAINERS: can: the mailinglist moved to vger.kernel.org
From: Marc Kleine-Budde @ 2011-10-14 8:43 UTC (permalink / raw)
To: netdev; +Cc: linux-can, Marc Kleine-Budde
In-Reply-To: <1318581817-12352-1-git-send-email-mkl@pengutronix.de>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Acked-by: Oliver Hartkopp <socketcan@hartkopp.net>
---
MAINTAINERS | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/MAINTAINERS b/MAINTAINERS
index aac56f9..5008b08 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -1671,7 +1671,7 @@ CAN NETWORK LAYER
M: Oliver Hartkopp <socketcan@hartkopp.net>
M: Oliver Hartkopp <oliver.hartkopp@volkswagen.de>
M: Urs Thuermann <urs.thuermann@volkswagen.de>
-L: socketcan-core@lists.berlios.de (subscribers-only)
+L: linux-can@vger.kernel.org
L: netdev@vger.kernel.org
W: http://developer.berlios.de/projects/socketcan/
S: Maintained
@@ -1683,7 +1683,7 @@ F: include/linux/can/raw.h
CAN NETWORK DRIVERS
M: Wolfgang Grandegger <wg@grandegger.com>
-L: socketcan-core@lists.berlios.de (subscribers-only)
+L: linux-can@vger.kernel.org
L: netdev@vger.kernel.org
W: http://developer.berlios.de/projects/socketcan/
S: Maintained
--
1.7.4.1
^ permalink raw reply related
* [PATCH 3/4] net/can: the mailinglist moved to vger.kernel.org
From: Marc Kleine-Budde @ 2011-10-14 8:43 UTC (permalink / raw)
To: netdev; +Cc: linux-can, Marc Kleine-Budde
In-Reply-To: <1318581817-12352-1-git-send-email-mkl@pengutronix.de>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
---
net/can/af_can.c | 2 +-
net/can/af_can.h | 2 +-
net/can/bcm.c | 2 +-
net/can/gw.c | 2 +-
net/can/proc.c | 2 +-
net/can/raw.c | 2 +-
6 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/net/can/af_can.c b/net/can/af_can.c
index d1ff515..4f299b1 100644
--- a/net/can/af_can.c
+++ b/net/can/af_can.c
@@ -38,7 +38,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
* DAMAGE.
*
- * Send feedback to <socketcan-users@lists.berlios.de>
+ * Send feedback to <linux-can@vger.kernel.org>
*
*/
diff --git a/net/can/af_can.h b/net/can/af_can.h
index 34253b8..bcfbc42 100644
--- a/net/can/af_can.h
+++ b/net/can/af_can.h
@@ -35,7 +35,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
* DAMAGE.
*
- * Send feedback to <socketcan-users@lists.berlios.de>
+ * Send feedback to <linux-can@vger.kernel.org>
*
*/
diff --git a/net/can/bcm.c b/net/can/bcm.c
index c84963d..5103cea 100644
--- a/net/can/bcm.c
+++ b/net/can/bcm.c
@@ -37,7 +37,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
* DAMAGE.
*
- * Send feedback to <socketcan-users@lists.berlios.de>
+ * Send feedback to <linux-can@vger.kernel.org>
*
*/
diff --git a/net/can/gw.c b/net/can/gw.c
index ac11407..9a21120 100644
--- a/net/can/gw.c
+++ b/net/can/gw.c
@@ -37,7 +37,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
* DAMAGE.
*
- * Send feedback to <socketcan-users@lists.berlios.de>
+ * Send feedback to <linux-can@vger.kernel.org>
*
*/
diff --git a/net/can/proc.c b/net/can/proc.c
index 0016f73..a5ee7d6 100644
--- a/net/can/proc.c
+++ b/net/can/proc.c
@@ -37,7 +37,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
* DAMAGE.
*
- * Send feedback to <socketcan-users@lists.berlios.de>
+ * Send feedback to <linux-can@vger.kernel.org>
*
*/
diff --git a/net/can/raw.c b/net/can/raw.c
index dea99a6..45bab31 100644
--- a/net/can/raw.c
+++ b/net/can/raw.c
@@ -37,7 +37,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
* DAMAGE.
*
- * Send feedback to <socketcan-users@lists.berlios.de>
+ * Send feedback to <linux-can@vger.kernel.org>
*
*/
--
1.7.4.1
^ permalink raw reply related
* [PATCH 0/4] can: the mailinglist moved to vger.kernel.org
From: Marc Kleine-Budde @ 2011-10-14 8:43 UTC (permalink / raw)
To: netdev; +Cc: linux-can
Hello,
the BerliOS project will close with the end of the year, so we moved our
mailinglist to vger.kernel.org, it's now linux-can@vger.kernel.org.
This patch series changes every mail address accordingly.
regards, Marc
^ permalink raw reply
* [PATCH] net: Move rcu_barrier from rollback_registered_many to netdev_run_todo.
From: Eric W. Biederman @ 2011-10-14 8:25 UTC (permalink / raw)
To: David Miller; +Cc: Eric Dumazet, netdev
This patch moves the rcu_barrier from rollback_registered_many
(inside the rtnl_lock) into netdev_run_todo (just outside the rtnl_lock).
This allows us to gain the full benefit of sychronize_net calling
synchronize_rcu_expedited when the rtnl_lock is held.
The rcu_barrier in rollback_registered_many was originally a synchronize_net
but was promoted to be a rcu_barrier() when it was found that people were
unnecessarily hitting the 250ms wait in netdev_wait_allrefs(). Changing
the rcu_barrier back to a synchronize_net is therefore safe.
Since we only care about waiting for the rcu callbacks before we get
to netdev_wait_allrefs() it is also safe to move the wait into
netdev_run_todo.
This was tested by creating and destroying 1000 tap devices and observing
/proc/lock_stat. /proc/lock_stat reports this change reduces the hold
times of the rtnl_lock by a factor of 10. There was no observable
difference in the amount of time it takes to destroy a network device.
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
---
net/core/dev.c | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/net/core/dev.c b/net/core/dev.c
index 70ecb86..44dcacf 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -5235,7 +5235,7 @@ static void rollback_registered_many(struct list_head *head)
dev = list_first_entry(head, struct net_device, unreg_list);
call_netdevice_notifiers(NETDEV_UNREGISTER_BATCH, dev);
- rcu_barrier();
+ synchronize_net();
list_for_each_entry(dev, head, unreg_list)
dev_put(dev);
@@ -5748,6 +5748,12 @@ void netdev_run_todo(void)
__rtnl_unlock();
+ /* Wait for rcu callbacks to finish before attempting to drain
+ * the device list. This usually avoids a 250ms wait.
+ */
+ if (!list_empty(&list))
+ rcu_barrier();
+
while (!list_empty(&list)) {
struct net_device *dev
= list_first_entry(&list, struct net_device, todo_list);
--
1.7.2.5
^ permalink raw reply related
* Re: [PATCH net-next] tcp: reduce memory needs of out of order queue
From: Eric Dumazet @ 2011-10-14 8:05 UTC (permalink / raw)
To: David Miller; +Cc: netdev
In-Reply-To: <20111014.034224.1197576516015404466.davem@davemloft.net>
Le vendredi 14 octobre 2011 à 03:42 -0400, David Miller a écrit :
> From: Eric Dumazet <eric.dumazet@gmail.com>
> Date: Fri, 14 Oct 2011 09:19:51 +0200
>
> > Many drivers allocates big skb to store a single TCP frame.
> > (WIFI drivers, or NIC using PAGE_SIZE fragments)
> >
> > Its now common to get skb->truesize bigger than 4096 to store a ~1500
> > bytes TCP frame.
> >
> > TCP sessions with large RTT and packet losses can fill their Out Of
> > Order queue with such oversized skbs, and hit their sk_rcvbuf limit,
> > starting a pruning of complete OFO queue, without giving chance to
> > receive the missing packet(s) and moving skbs from OFO to receive queue.
> >
> > This patch adds skb_reduce_truesize() helper, and uses it for all skbs
> > queued into OFO queue.
> >
> > Spending some time to perform a copy is worth the pain, since it permits
> > SACK processing to have a chance to complete over the RTT barrier.
> >
> > This greatly improves user experience, without added cost on fast path.
> >
> > Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
>
> No objection from me, although I wish wireless drivers were able to
> size their SKBs more appropriately. I wonder how many problems that
> look like "OMG we gotz da Buffer Bloat, arrr!" are actually due to
> this truesize issue.
>
> I think such large truesize SKBs will cause problems even in non loss
> situations, in that the receive buffer will hit it's limits more
> quickly. I not sure that the receive buffer autotuning is built to
> handle this sort of scenerio as a common occurance.
>
> You might want to check if this is the actual root cause of your
> problems. If the receive buffer autotuning doesn't expand the receive
> buffer enough to hold two windows worth of these large truesize SKBs,
> that's the real reason why we end up pruning.
>
> We have to decide if these kinds of SKBs are acceptable as a normal
> situation for MSS sized frames. And if they are then it's probably
> a good idea to adjust the receive buffer autotuning code too.
>
> Although I realize it might be difficult, getting rid of these weird
> SKBs in the first place would be ideal.
>
> It would also be a good idea to put the truesize inaccuracies into
> perspective when selecting how to fix this. It's trying to prevent
> 1 byte packets not accounting for the 256 byte SKB and metadata.
> That kind of case with such a high ratio of wastage is important.
>
> On the other hand, using 2048 bytes for a 1500 byte packet and claiming
> the truesize is 1500 + sizeof(metadata)... that might be an acceptable
> lie to tell :-) This is especially true if it allows an easy solution
> to this wireless problem.
>
> Just some thoughts... and I wonder if the wireless thing is due to
> some hardware limitation or similar.
>
This patch specifically addresses the OFO problem, trying to lower
memory usage for machines handling lot of sockets (proxies for example)
For the general case, I believe we have to tune/change
tcp_win_from_space() to take into account general tendancy to get fat
skbs.
sysctl_tcp_adv_win_scale is not fine enough today, and default value (2)
gives too much collapses. It's also a very complex setting, I am pretty
sure nobody knows how to use it.
tcp_win_from_space(int space) -> 75% of space [ default ]
Only current kernels choices are to set it to one/-1 :
tcp_win_from_space(int space) -> 50% of space
or -2 :
tcp_win_from_space(int space) -> 25% of space
^ 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