* Re: [patch net-next-2.6 18/47] igbvf: do vlan cleanup
From: Jiri Pirko @ 2011-07-20 19:07 UTC (permalink / raw)
To: Jesse Gross
Cc: e1000-devel, netdev, bruce.w.allan, jesse.brandeburg, mirqus,
john.ronciak, shemminger, davem
In-Reply-To: <CAEP_g=9D5CEUG7AVxoyW6Q0NUEaQ+vE3g+SPdU677Y+s65JRiA@mail.gmail.com>
Wed, Jul 20, 2011 at 07:26:14PM CEST, jesse@nicira.com wrote:
>On Wed, Jul 20, 2011 at 7:54 AM, Jiri Pirko <jpirko@redhat.com> wrote:
>> @@ -1170,19 +1170,28 @@ static void igbvf_set_rlpml(struct igbvf_adapter *adapter)
>> int max_frame_size = adapter->max_frame_size;
>> struct e1000_hw *hw = &adapter->hw;
>>
>> - if (adapter->vlgrp)
>> + if (adapter->netdev->features & NETIF_F_HW_VLAN_RX)
>> max_frame_size += VLAN_TAG_SIZE;
>
>This is unconditionally true, right? NETIF_F_HW_VLAN_RX never gets
>toggled here. In any case, I think we should be able to handle vlan
>tagged packets even if stripping isn't enabled.
You are correct. This should be checked rather if any bit of
adapter->active_vlans is set. I'll repost soon.
>
>The Intel guys have expressed some concerns in the past about the MTU
>in relation to the igb driver (the PF version) with vlan tags. I'm
>not quite sure what about this NIC is different from others in the
>handling of MTU and vlans but here's one such thread:
>http://patchwork.ozlabs.org/patch/82675/
The intension is to make driver to bahave the same as before this patch.
------------------------------------------------------------------------------
10 Tips for Better Web Security
Learn 10 ways to better secure your business today. Topics covered include:
Web security, SSL, hacker attacks & Denial of Service (DoS), private keys,
security Microsoft Exchange, secure Instant Messaging, and much more.
http://www.accelacomm.com/jaw/sfnl/114/51426210/
_______________________________________________
E1000-devel mailing list
E1000-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/e1000-devel
To learn more about Intel® Ethernet, visit http://communities.intel.com/community/wired
^ permalink raw reply
* Re: [patch net-next-2.6 04/47] nes: do vlan cleanup
From: Jiri Pirko @ 2011-07-20 19:00 UTC (permalink / raw)
To: Michał Mirosław
Cc: netdev, davem, shemminger, eric.dumazet, greearb, faisal.latif
In-Reply-To: <CAHXqBFJ3ERvHTcJcJLOGSGeYGbnE9XaRu7Dm_dRjAmR4PYq+VA@mail.gmail.com>
Wed, Jul 20, 2011 at 06:01:09PM CEST, mirqus@gmail.com wrote:
>W dniu 20 lipca 2011 17:45 użytkownik Michał Mirosław
><mirqus@gmail.com> napisał:
>> 2011/7/20 Jiri Pirko <jpirko@redhat.com>:
>>> - unify vlan and nonvlan rx path
>>> - kill nesvnic->vlan_grp and nes_netdev_vlan_rx_register
>>> - allow to turn on/off rx/tx vlan accel via ethtool (set_features)
>> [...]
>>> /**
>>> @@ -1656,7 +1679,7 @@ struct net_device *nes_netdev_init(struct nes_device *nesdev,
>>> netdev->ethtool_ops = &nes_ethtool_ops;
>>> netif_napi_add(netdev, &nesvnic->napi, nes_netdev_poll, 128);
>>> nes_debug(NES_DBG_INIT, "Enabling VLAN Insert/Delete.\n");
>>> - netdev->features |= NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX;
>>> + netdev->features |= NETIF_F_HW_VLAN_TX;
>> Just remove this line - nes_fix_features() is controlling the flag anyway.
>
>Forget it - it's good.
>
>I need to think about calling ndo_set_features callback at end of
>register_netdev() so the drivers won't need to duplicate the
>call/configuration in their ndo_init.
Yep, this came up to my thinking as well.
>
>Best Regards,
>Michał Mirosław
^ permalink raw reply
* Re: [PATCH] vhost: clean up outstanding buffers before setting vring
From: Shirley Ma @ 2011-07-20 18:12 UTC (permalink / raw)
To: Michael S. Tsirkin; +Cc: David Miller, netdev, jasowang
In-Reply-To: <20110720104131.GB5164@redhat.com>
On Wed, 2011-07-20 at 13:41 +0300, Michael S. Tsirkin wrote:
> On Tue, Jul 19, 2011 at 01:50:53PM -0700, Shirley Ma wrote:
> > On Tue, 2011-07-19 at 22:49 +0300, Michael S. Tsirkin wrote:
> > > On Tue, Jul 19, 2011 at 11:02:26AM -0700, Shirley Ma wrote:
> > > > The outstanding DMA buffers need to be clean up before setting
> vring
> > > in
> > > > vhost. Otherwise the vring would be out of sync.
> > > >
> > > > Signed-off-by: Shirley Ma<xma@us.ibm.com>
> > >
> > > I suspect what is missing is calling
> > > vhost_zerocopy_signal_used then?
> > >
> > > If yes we probably should do it after
> > > changing the backend, not on vring set.
> >
> > I think vhost_zerocopy_signal_used might not be sufficient.
>
> If not, I'd like to understand what the root cause of
> the problem is.
>
> > But we can
> > test it out by remove/reloading the guest virtio_net module.
>
> Well, try out something like the below patch then.
>From the test results, below patch solves the problem. You can check in
this.
> >
> > The problem encounters when guest rmmod virtio_net module, then
> reload
> > the module, and configure the interface, it complains about some
> ring id
> > is not a head.
>
> OK, good, such a problem decription belongs in the patch commit log.
You can add this description in the change log. When removing and
reloading KVM guest virtio_net module, it complains vring data is NULL.
The vring is out of sync between vhost and virtio_net.
> > With this patch, the problem is solved.
>
> Additional info you want to put in the commit log is what in the code
> triggers the problem and how your patch fixes it.
>
> > >
> > > > +
> > > > + /* Signal guest as appropriate. */
> > > > + vhost_zerocopy_signal_used(vq);
> > > >
> > > > switch (ioctl) {
> > > > case VHOST_SET_VRING_NUM:
> > > > @@ -1592,7 +1600,6 @@ void vhost_ubuf_put_and_wait(struct
> > > vhost_ubuf_ref *ubufs)
> > > > {
> > > > kref_put(&ubufs->kref, vhost_zerocopy_done_signal);
> > > > wait_event(ubufs->wait, !
> atomic_read(&ubufs->kref.refcount));
> > > > - kfree(ubufs);
> > >
> > > Won't this leak memory when ubufs are switched in
> > > vhost_net_set_backend?
> >
> > Right, I forgot to check net.c, whenever it calls
> > vhot_ubuf_put_and_wait, it should call kfree(ubufs).
> >
>
> -->
>
> vhost-net: update used ring on backend change
>
> On backend change, we flushed out outstanding skbs
> but forgot to update the used ring. Do that to
> avoid losing heads.
>
> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
>
> --
>
> diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c
> index 70ac604..248b250 100644
> --- a/drivers/vhost/net.c
> +++ b/drivers/vhost/net.c
> @@ -711,8 +711,12 @@ static long vhost_net_set_backend(struct
> vhost_net *n, unsigned index, int fd)
>
> mutex_unlock(&vq->mutex);
>
> - if (oldubufs)
> + if (oldubufs) {
> vhost_ubuf_put_and_wait(oldubufs);
> + mutex_lock(&vq->mutex);
> + vhost_zerocopy_signal_used(vq);
> + mutex_unlock(&vq->mutex);
> + }
>
> if (oldsock) {
> vhost_net_flush_vq(n, index);
>
>
^ permalink raw reply
* Re: linux-next: Tree for July 20 (qlcnic)
From: Anirban Chakraborty @ 2011-07-20 18:10 UTC (permalink / raw)
To: Randy Dunlap
Cc: Stephen Rothwell, netdev, linux-next@vger.kernel.org,
linux-kernel, Linux Driver, David Lamparter
In-Reply-To: <20110720091945.39f0a8a5.rdunlap@xenotime.net>
On Jul 20, 2011, at 9:19 AM, Randy Dunlap wrote:
> On Wed, 20 Jul 2011 18:00:41 +1000 Stephen Rothwell wrote:
>
>> Hi all,
>
> When CONFIG_VLAN_8021Q is not enabled:
>
> drivers/net/qlcnic/qlcnic_main.c:4207: error: 'struct net_device' has no member named 'vlgrp'
This is caused by the following commit:
commit 69ecca86da4890c13a5e29c51b4ac76a1a8a62c9
Refs: v3.0-rc7-1265-g69ecca8
Author: David Lamparter <equinox@diac24.net>
AuthorDate: Sun Jul 17 08:53:12 2011 +0000
Commit: David S. Miller <davem@davemloft.net>
CommitDate: Sun Jul 17 12:33:22 2011 -0700
net: vlan, qlcnic: make vlan_find_dev private
there is only one user of vlan_find_dev outside of the actual vlan code:
qlcnic uses it to iterate over some VLANs it knows.
let's just make vlan_find_dev private to the VLAN code and have the
iteration in qlcnic be a bit more direct. (a few rcu dereferences less
too)
Signed-off-by: David Lamparter <equinox@diac24.net>
Cc: Patrick McHardy <kaber@trash.net>
Cc: Amit Kumar Salecha <amit.salecha@qlogic.com>
Cc: Anirban Chakraborty <anirban.chakraborty@qlogic.com>
Cc: linux-driver@qlogic.com
Signed-off-by: David S. Miller <davem@davemloft.net>
^ permalink raw reply
* Re: 3.0.0rc6: ethtool not working without a cable
From: Arkadiusz Miskiewicz @ 2011-07-20 17:57 UTC (permalink / raw)
To: Brandeburg, Jesse; +Cc: Ben Hutchings, netdev@vger.kernel.org
In-Reply-To: <alpine.WNT.2.00.1107201050450.1084@JBRANDEB-DESK2.amr.corp.intel.com>
On Wednesday 20 of July 2011, Brandeburg, Jesse wrote:
> On Wed, 6 Jul 2011, Arkadiusz Miskiewicz wrote:
> > On Wednesday 06 of July 2011, Ben Hutchings wrote:
> > > > If there is no cable then ethtool reports no device. It wasn't that
> > > > before AFAIK.
> > > >
> > > > ethtool version 2.6.36
> > > >
> > > >
> > > > cable disconnected:
> > > >
> > > > [root@t400 ~]# ethtool eth0
> > > > Settings for eth0:
> > > > Cannot get device settings: No such device
> > > > Cannot get wake-on-lan settings: No such device
> > > > Cannot get message level: No such device
> > > > Cannot get link status: No such device
> > > > No data available
> > > > zsh: exit 75 ethtool eth0
> > > > [root@t400 ~]# ethtool -i eth0
> > > > Cannot get driver information: No such device
> > > > zsh: exit 71 ethtool -i eth0
>
> please check lspci -vvv on your device when cable is unplugged. I'm
> wondering if OSPM (os power management) is kicking in (if enabled in your
> kernel) and somehow interacting badly with ethtool.
>
> if the device is in D3, then most ethtool stuff won't work, since all the
> registers in the device (except in config space) don't work when in D3.
00:19.0 Ethernet controller: Intel Corporation 82567LM Gigabit Network
Connection (rev 03)
Subsystem: Lenovo Device 20ee
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-
Interrupt: pin A routed to IRQ 20
Region 0: Memory at fc000000 (32-bit, non-prefetchable) [disabled]
[size=128K]
Region 1: Memory at fc025000 (32-bit, non-prefetchable) [disabled]
[size=4K]
Region 2: I/O ports at 1840 [disabled] [size=32]
Capabilities: [c8] Power Management version 2
Flags: PMEClk- DSI+ D1- D2- AuxCurrent=0mA
PME(D0+,D1-,D2-,D3hot+,D3cold+)
Status: D3 NoSoftRst- PME-Enable+ DSel=0 DScale=1 PME-
Capabilities: [d0] MSI: Enable- Count=1/1 Maskable- 64bit+
Address: 00000000fee0300c Data: 41c5
Capabilities: [e0] PCI Advanced Features
AFCap: TP+ FLR+
AFCtrl: FLR-
AFStatus: TP-
Kernel driver in use: e1000e
Kernel modules: e1000e
--
Arkadiusz Miśkiewicz PLD/Linux Team
arekm / maven.pl http://ftp.pld-linux.org/
^ permalink raw reply
* Re: 3.0.0rc6: ethtool not working without a cable
From: Brandeburg, Jesse @ 2011-07-20 17:53 UTC (permalink / raw)
To: Arkadiusz Miskiewicz; +Cc: Ben Hutchings, netdev@vger.kernel.org
In-Reply-To: <201107061653.04689.a.miskiewicz@gmail.com>
On Wed, 6 Jul 2011, Arkadiusz Miskiewicz wrote:
> On Wednesday 06 of July 2011, Ben Hutchings wrote:
> > > If there is no cable then ethtool reports no device. It wasn't that
> > > before AFAIK.
> > >
> > > ethtool version 2.6.36
> > >
> > >
> > > cable disconnected:
> > >
> > > [root@t400 ~]# ethtool eth0
> > > Settings for eth0:
> > > Cannot get device settings: No such device
> > > Cannot get wake-on-lan settings: No such device
> > > Cannot get message level: No such device
> > > Cannot get link status: No such device
> > > No data available
> > > zsh: exit 75 ethtool eth0
> > > [root@t400 ~]# ethtool -i eth0
> > > Cannot get driver information: No such device
> > > zsh: exit 71 ethtool -i eth0
please check lspci -vvv on your device when cable is unplugged. I'm
wondering if OSPM (os power management) is kicking in (if enabled in your
kernel) and somehow interacting badly with ethtool.
if the device is in D3, then most ethtool stuff won't work, since all the
registers in the device (except in config space) don't work when in D3.
^ permalink raw reply
* Re: [patch net-next-2.6 35/47] e1000: do vlan cleanup
From: Jesse Gross @ 2011-07-20 17:48 UTC (permalink / raw)
To: Jiri Pirko
Cc: netdev, davem, shemminger, eric.dumazet, greearb, mirqus,
jeffrey.t.kirsher, jesse.brandeburg, peter.p.waskiewicz.jr,
bruce.w.allan, carolyn.wyborny, donald.c.skidmore, gregory.v.rose,
alexander.h.duyck, john.ronciak, e1000-devel
In-Reply-To: <1311173689-17419-36-git-send-email-jpirko@redhat.com>
On Wed, Jul 20, 2011 at 7:54 AM, Jiri Pirko <jpirko@redhat.com> wrote:
> @@ -4532,9 +4539,8 @@ static void e1000_vlan_rx_register(struct net_device *netdev,
>
> if (!test_bit(__E1000_DOWN, &adapter->flags))
> e1000_irq_disable(adapter);
> - adapter->vlgrp = grp;
>
> - if (grp) {
> + if (vlan_on) {
> /* enable VLAN tag insert/strip */
> ctrl = er32(CTRL);
> ctrl |= E1000_CTRL_VME;
Same comment here as with the igb driver.
^ permalink raw reply
* Re: [patch net-next-2.6 37/47] igb: do vlan cleanup
From: Jesse Gross @ 2011-07-20 17:35 UTC (permalink / raw)
To: Jiri Pirko
Cc: netdev, davem, shemminger, eric.dumazet, greearb, mirqus,
jeffrey.t.kirsher, jesse.brandeburg, peter.p.waskiewicz.jr,
bruce.w.allan, carolyn.wyborny, donald.c.skidmore, gregory.v.rose,
alexander.h.duyck, john.ronciak, e1000-devel
In-Reply-To: <1311173689-17419-38-git-send-email-jpirko@redhat.com>
On Wed, Jul 20, 2011 at 7:54 AM, Jiri Pirko <jpirko@redhat.com> wrote:
> @@ -2943,7 +2944,7 @@ static void igb_rlpml_set(struct igb_adapter *adapter)
> struct e1000_hw *hw = &adapter->hw;
> u16 pf_id = adapter->vfs_allocated_count;
>
> - if (adapter->vlgrp)
> + if (igb_vlan_used(adapter))
> max_frame_size += VLAN_TAG_SIZE;
There are similar issues here as with the VF driver. I think you're
also confusing vlan acceleration with vlan filtering. If no vlan
filters are in use but the card is in promiscuous mode, the buffer
will be undersized and we lose tagged packets.
> +static void igb_vlan_mode(struct net_device *netdev, bool vlan_on)
> {
> struct igb_adapter *adapter = netdev_priv(netdev);
> struct e1000_hw *hw = &adapter->hw;
> u32 ctrl, rctl;
>
> igb_irq_disable(adapter);
> - adapter->vlgrp = grp;
>
> - if (grp) {
> + if (vlan_on) {
> /* enable VLAN tag insert/strip */
This should be controlled by ethtool, not by whether vlan filters are
enabled. Essentially, with this, you are recreating the logic of the
old vlan model in the new one.
^ permalink raw reply
* Re: [patch net-next-2.6 18/47] igbvf: do vlan cleanup
From: Jesse Gross @ 2011-07-20 17:26 UTC (permalink / raw)
To: Jiri Pirko
Cc: netdev, davem, shemminger, eric.dumazet, greearb, mirqus,
jeffrey.t.kirsher, jesse.brandeburg, peter.p.waskiewicz.jr,
bruce.w.allan, carolyn.wyborny, donald.c.skidmore, gregory.v.rose,
alexander.h.duyck, john.ronciak, e1000-devel
In-Reply-To: <1311173689-17419-19-git-send-email-jpirko@redhat.com>
On Wed, Jul 20, 2011 at 7:54 AM, Jiri Pirko <jpirko@redhat.com> wrote:
> @@ -1170,19 +1170,28 @@ static void igbvf_set_rlpml(struct igbvf_adapter *adapter)
> int max_frame_size = adapter->max_frame_size;
> struct e1000_hw *hw = &adapter->hw;
>
> - if (adapter->vlgrp)
> + if (adapter->netdev->features & NETIF_F_HW_VLAN_RX)
> max_frame_size += VLAN_TAG_SIZE;
This is unconditionally true, right? NETIF_F_HW_VLAN_RX never gets
toggled here. In any case, I think we should be able to handle vlan
tagged packets even if stripping isn't enabled.
The Intel guys have expressed some concerns in the past about the MTU
in relation to the igb driver (the PF version) with vlan tags. I'm
not quite sure what about this NIC is different from others in the
handling of MTU and vlans but here's one such thread:
http://patchwork.ozlabs.org/patch/82675/
^ permalink raw reply
* [PATCH V2] vhost: fix check for # of outstanding buffers
From: Shirley Ma @ 2011-07-20 17:23 UTC (permalink / raw)
To: mst; +Cc: David Miller, netdev, jasowang
Fix the check for number of outstanding buffers returns incorrect
results due to vq->pend_idx wrap around;
Signed-off-by: Shirley Ma <xma@us.ibm.com>
---
drivers/vhost/net.c | 12 +++++++++---
1 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c
index 70ac604..946a71e 100644
--- a/drivers/vhost/net.c
+++ b/drivers/vhost/net.c
@@ -182,15 +182,21 @@ static void handle_tx(struct vhost_net *net)
break;
/* Nothing new? Wait for eventfd to tell us they refilled. */
if (head == vq->num) {
+ int num_pends;
+
wmem = atomic_read(&sock->sk->sk_wmem_alloc);
if (wmem >= sock->sk->sk_sndbuf * 3 / 4) {
tx_poll_start(net, sock);
set_bit(SOCK_ASYNC_NOSPACE, &sock->flags);
break;
}
- /* If more outstanding DMAs, queue the work */
- if (unlikely(vq->upend_idx - vq->done_idx >
- VHOST_MAX_PEND)) {
+ /* If more outstanding DMAs, queue the work
+ * handle upend_idx wrap around
+ */
+ num_pends = (vq->upend_idx >= vq->done_idx) ?
+ (vq->upend_idx - vq->done_idx) :
+ (vq->upend_idx + UIO_MAXIOV - vq->done_idx);
+ if (unlikely(num_pends > VHOST_MAX_PEND)) {
tx_poll_start(net, sock);
set_bit(SOCK_ASYNC_NOSPACE, &sock->flags);
break;
^ permalink raw reply related
* Re: [PATCH net-next]vhost: fix condition check for # of outstanding dma buffers
From: Shirley Ma @ 2011-07-20 16:49 UTC (permalink / raw)
To: Michael S. Tsirkin; +Cc: David Miller, netdev, jasowang
In-Reply-To: <20110720161721.GD8077@redhat.com>
On Wed, 2011-07-20 at 19:17 +0300, Michael S. Tsirkin wrote:
> My point was that the logic isn't the same, even though
> you said 'it is equal to'.
> Same applies to upend_idx == 1, done_idx == 0.
:) not sure what I was thinking.
I will resubmit the patch.
Thanks
Shirley
^ permalink raw reply
* Re: [PATCH] rtlwifi: Convert printks to pr_<level>
From: Larry Finger @ 2011-07-20 16:38 UTC (permalink / raw)
To: Joe Perches
Cc: Chaoming Li, John W. Linville, linux-wireless, netdev,
linux-kernel
In-Reply-To: <b57f00fc1d0947443aa1830c11c288e78924af44.1311177059.git.joe@perches.com>
On 07/20/2011 10:51 AM, Joe Perches wrote:
> Use the current logging styles.
> Add pr_fmt where appropriate.
> Remove now unnecessary prefixes from printks.
> Convert hard coded prefix to __func__.
> Add a missing "\n" to a format.
>
> Signed-off-by: Joe Perches<joe@perches.com>
> ---
> drivers/net/wireless/rtlwifi/base.c | 9 ++-
> drivers/net/wireless/rtlwifi/cam.c | 4 +-
> drivers/net/wireless/rtlwifi/rtl8192c/fw_common.c | 5 +-
> drivers/net/wireless/rtlwifi/rtl8192cu/hw.c | 69 ++++++++------------
> drivers/net/wireless/rtlwifi/rtl8192cu/mac.c | 11 ++-
> drivers/net/wireless/rtlwifi/rtl8192de/sw.c | 8 +-
> drivers/net/wireless/rtlwifi/rtl8192se/hw.c | 10 ++--
> drivers/net/wireless/rtlwifi/rtl8192se/phy.c | 5 +-
> drivers/net/wireless/rtlwifi/rtl8192se/rf.c | 4 +-
> drivers/net/wireless/rtlwifi/rtl8192se/sw.c | 6 +-
> drivers/net/wireless/rtlwifi/usb.c | 12 ++--
> 11 files changed, 72 insertions(+), 71 deletions(-)
>
> diff --git a/drivers/net/wireless/rtlwifi/base.c b/drivers/net/wireless/rtlwifi/base.c
> index bc13533..d88e405 100644
> --- a/drivers/net/wireless/rtlwifi/base.c
> +++ b/drivers/net/wireless/rtlwifi/base.c
> @@ -27,6 +27,8 @@
> *
> *****************************************************************************/
>
> +#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
> +
> #include<linux/ip.h>
> #include "wifi.h"
> #include "rc.h"
> @@ -397,8 +399,8 @@ void rtl_init_rfkill(struct ieee80211_hw *hw)
> radio_state = rtlpriv->cfg->ops->radio_onoff_checking(hw,&valid);
>
> if (valid) {
> - printk(KERN_INFO "rtlwifi: wireless switch is %s\n",
> - rtlpriv->rfkill.rfkill_state ? "on" : "off");
> + pr_info("wireless switch is %s\n",
> + rtlpriv->rfkill.rfkill_state ? "on" : "off");
>
> rtlpriv->rfkill.rfkill_state = radio_state;
>
> @@ -1402,8 +1404,7 @@ MODULE_DESCRIPTION("Realtek 802.11n PCI wireless core");
> static int __init rtl_core_module_init(void)
> {
> if (rtl_rate_control_register())
> - printk(KERN_ERR "rtlwifi: Unable to register rtl_rc,"
> - "use default RC !!\n");
> + pr_err("Unable to register rtl_rc, use default RC !!\n");
>
> return 0;
> }
> diff --git a/drivers/net/wireless/rtlwifi/cam.c b/drivers/net/wireless/rtlwifi/cam.c
> index 7295af0..b12a668 100644
> --- a/drivers/net/wireless/rtlwifi/cam.c
> +++ b/drivers/net/wireless/rtlwifi/cam.c
> @@ -27,6 +27,8 @@
> *
> *****************************************************************************/
>
> +#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
> +
> #include "wifi.h"
> #include "cam.h"
>
> @@ -347,7 +349,7 @@ void rtl_cam_del_entry(struct ieee80211_hw *hw, u8 *sta_addr)
> /* Remove from HW Security CAM */
> memset(rtlpriv->sec.hwsec_cam_sta_addr[i], 0, ETH_ALEN);
> rtlpriv->sec.hwsec_cam_bitmap&= ~(BIT(0)<< i);
> - printk(KERN_INFO "&&&&&&&&&del entry %d\n", i);
> + pr_info("&&&&&&&&&del entry %d\n", i);
> }
> }
> return;
> diff --git a/drivers/net/wireless/rtlwifi/rtl8192c/fw_common.c b/drivers/net/wireless/rtlwifi/rtl8192c/fw_common.c
> index f9f2370..49a064b 100644
> --- a/drivers/net/wireless/rtlwifi/rtl8192c/fw_common.c
> +++ b/drivers/net/wireless/rtlwifi/rtl8192c/fw_common.c
> @@ -27,6 +27,8 @@
> *
> *****************************************************************************/
>
> +#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
> +
> #include<linux/firmware.h>
> #include "../wifi.h"
> #include "../pci.h"
> @@ -224,8 +226,7 @@ int rtl92c_download_fw(struct ieee80211_hw *hw)
> u32 fwsize;
> enum version_8192c version = rtlhal->version;
>
> - printk(KERN_INFO "rtl8192c: Loading firmware file %s\n",
> - rtlpriv->cfg->fw_name);
> + pr_info("Loading firmware file %s\n", rtlpriv->cfg->fw_name);
> if (!rtlhal->pfirmware)
> return 1;
>
> diff --git a/drivers/net/wireless/rtlwifi/rtl8192cu/hw.c b/drivers/net/wireless/rtlwifi/rtl8192cu/hw.c
> index 2b34764..814c05d 100644
> --- a/drivers/net/wireless/rtlwifi/rtl8192cu/hw.c
> +++ b/drivers/net/wireless/rtlwifi/rtl8192cu/hw.c
> @@ -27,6 +27,8 @@
> *
> *****************************************************************************/
>
> +#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
> +
> #include "../wifi.h"
> #include "../efuse.h"
> #include "../base.h"
> @@ -337,7 +339,7 @@ static void _rtl92cu_read_board_type(struct ieee80211_hw *hw, u8 *contents)
> rtlefuse->board_type = boardType;
> if (IS_HIGHT_PA(rtlefuse->board_type))
> rtlefuse->external_pa = 1;
> - printk(KERN_INFO "rtl8192cu: Board Type %x\n", rtlefuse->board_type);
> + pr_info("Board Type %x\n", rtlefuse->board_type);
>
> #ifdef CONFIG_ANTENNA_DIVERSITY
> /* Antenna Diversity setting. */
> @@ -346,8 +348,7 @@ static void _rtl92cu_read_board_type(struct ieee80211_hw *hw, u8 *contents)
> else
> rtl_efuse->antenna_cfg = registry_par->antdiv_cfg; /* 0:OFF, */
>
> - printk(KERN_INFO "rtl8192cu: Antenna Config %x\n",
> - rtl_efuse->antenna_cfg);
> + pr_info("Antenna Config %x\n", rtl_efuse->antenna_cfg);
> #endif
> }
>
> @@ -384,71 +385,57 @@ static void _update_bt_param(_adapter *padapter)
> pbtpriv->bBTNonTrafficModeSet = _FALSE;
> pbtpriv->CurrentState = 0;
> pbtpriv->PreviousState = 0;
> - printk(KERN_INFO "rtl8192cu: BT Coexistance = %s\n",
> - (pbtpriv->BT_Coexist == _TRUE) ? "enable" : "disable");
> + pr_info("BT Coexistance = %s\n",
> + (pbtpriv->BT_Coexist == _TRUE) ? "enable" : "disable");
> if (pbtpriv->BT_Coexist) {
> if (pbtpriv->BT_Ant_Num == Ant_x2)
> - printk(KERN_INFO "rtl8192cu: BlueTooth BT_"
> - "Ant_Num = Antx2\n");
> + pr_info("BlueTooth BT_Ant_Num = Antx2\n");
> else if (pbtpriv->BT_Ant_Num == Ant_x1)
> - printk(KERN_INFO "rtl8192cu: BlueTooth BT_"
> - "Ant_Num = Antx1\n");
> + pr_info("BlueTooth BT_Ant_Num = Antx1\n");
> switch (pbtpriv->BT_CoexistType) {
> case BT_2Wire:
> - printk(KERN_INFO "rtl8192cu: BlueTooth BT_"
> - "CoexistType = BT_2Wire\n");
> + pr_info("BlueTooth BT_CoexistType = BT_2Wire\n");
> break;
> case BT_ISSC_3Wire:
> - printk(KERN_INFO "rtl8192cu: BlueTooth BT_"
> - "CoexistType = BT_ISSC_3Wire\n");
> + pr_info("BlueTooth BT_CoexistType = BT_ISSC_3Wire\n");
> break;
> case BT_Accel:
> - printk(KERN_INFO "rtl8192cu: BlueTooth BT_"
> - "CoexistType = BT_Accel\n");
> + pr_info("BlueTooth BT_CoexistType = BT_Accel\n");
> break;
> case BT_CSR_BC4:
> - printk(KERN_INFO "rtl8192cu: BlueTooth BT_"
> - "CoexistType = BT_CSR_BC4\n");
> + pr_info("BlueTooth BT_CoexistType = BT_CSR_BC4\n");
> break;
> case BT_CSR_BC8:
> - printk(KERN_INFO "rtl8192cu: BlueTooth BT_"
> - "CoexistType = BT_CSR_BC8\n");
> + pr_info("BlueTooth BT_CoexistType = BT_CSR_BC8\n");
> break;
> case BT_RTL8756:
> - printk(KERN_INFO "rtl8192cu: BlueTooth BT_"
> - "CoexistType = BT_RTL8756\n");
> + pr_info("BlueTooth BT_CoexistType = BT_RTL8756\n");
> break;
> default:
> - printk(KERN_INFO "rtl8192cu: BlueTooth BT_"
> - "CoexistType = Unknown\n");
> + pr_info("BlueTooth BT_CoexistType = Unknown\n");
> break;
> }
> - printk(KERN_INFO "rtl8192cu: BlueTooth BT_Ant_isolation = %d\n",
> - pbtpriv->BT_Ant_isolation);
> + pr_info("BlueTooth BT_Ant_isolation = %d\n",
> + pbtpriv->BT_Ant_isolation);
> switch (pbtpriv->BT_Service) {
> case BT_OtherAction:
> - printk(KERN_INFO "rtl8192cu: BlueTooth BT_Service = "
> - "BT_OtherAction\n");
> + pr_info("BlueTooth BT_Service = BT_OtherAction\n");
> break;
> case BT_SCO:
> - printk(KERN_INFO "rtl8192cu: BlueTooth BT_Service = "
> - "BT_SCO\n");
> + pr_info("BlueTooth BT_Service = BT_SCO\n");
> break;
> case BT_Busy:
> - printk(KERN_INFO "rtl8192cu: BlueTooth BT_Service = "
> - "BT_Busy\n");
> + pr_info("BlueTooth BT_Service = BT_Busy\n");
> break;
> case BT_OtherBusy:
> - printk(KERN_INFO "rtl8192cu: BlueTooth BT_Service = "
> - "BT_OtherBusy\n");
> + pr_info("BlueTooth BT_Service = BT_OtherBusy\n");
> break;
> default:
> - printk(KERN_INFO "rtl8192cu: BlueTooth BT_Service = "
> - "BT_Idle\n");
> + pr_info("BlueTooth BT_Service = BT_Idle\n");
> break;
> }
> - printk(KERN_INFO "rtl8192cu: BT_RadioSharedType = 0x%x\n",
> - pbtpriv->BT_RadioSharedType);
> + pr_info("BT_RadioSharedType = 0x%x\n",
> + pbtpriv->BT_RadioSharedType);
> }
> }
>
> @@ -526,7 +513,7 @@ static void _rtl92cu_read_adapter_info(struct ieee80211_hw *hw)
> usvalue = *(u16 *)&hwinfo[EEPROM_MAC_ADDR + i];
> *((u16 *) (&rtlefuse->dev_addr[i])) = usvalue;
> }
> - printk(KERN_INFO "rtl8192cu: MAC address: %pM\n", rtlefuse->dev_addr);
> + pr_info("MAC address: %pM\n", rtlefuse->dev_addr);
> _rtl92cu_read_txpower_info_from_hwpg(hw,
> rtlefuse->autoload_failflag, hwinfo);
> rtlefuse->eeprom_vid = *(u16 *)&hwinfo[EEPROM_VID];
> @@ -665,7 +652,7 @@ static int _rtl92cu_init_power_on(struct ieee80211_hw *hw)
> rtl_write_word(rtlpriv, REG_APS_FSMCO, value16);
> do {
> if (!(rtl_read_word(rtlpriv, REG_APS_FSMCO)& APFM_ONMAC)) {
> - printk(KERN_INFO "rtl8192cu: MAC auto ON okay!\n");
> + pr_info("MAC auto ON okay!\n");
> break;
> }
> if (pollingCount++> 100) {
> @@ -819,7 +806,7 @@ static void _rtl92cu_init_chipN_one_out_ep_priority(struct ieee80211_hw *hw,
> }
> _rtl92c_init_chipN_reg_priority(hw, value, value, value, value,
> value, value);
> - printk(KERN_INFO "rtl8192cu: Tx queue select: 0x%02x\n", queue_sel);
> + pr_info("Tx queue select: 0x%02x\n", queue_sel);
> }
>
> static void _rtl92cu_init_chipN_two_out_ep_priority(struct ieee80211_hw *hw,
> @@ -863,7 +850,7 @@ static void _rtl92cu_init_chipN_two_out_ep_priority(struct ieee80211_hw *hw,
> hiQ = valueHi;
> }
> _rtl92c_init_chipN_reg_priority(hw, beQ, bkQ, viQ, voQ, mgtQ, hiQ);
> - printk(KERN_INFO "rtl8192cu: Tx queue select: 0x%02x\n", queue_sel);
> + pr_info("Tx queue select: 0x%02x\n", queue_sel);
> }
>
> static void _rtl92cu_init_chipN_three_out_ep_priority(struct ieee80211_hw *hw,
> diff --git a/drivers/net/wireless/rtlwifi/rtl8192cu/mac.c b/drivers/net/wireless/rtlwifi/rtl8192cu/mac.c
> index a90c09b..194fc69 100644
> --- a/drivers/net/wireless/rtlwifi/rtl8192cu/mac.c
> +++ b/drivers/net/wireless/rtlwifi/rtl8192cu/mac.c
> @@ -26,6 +26,9 @@
> * Larry Finger<Larry.Finger@lwfinger.net>
> *
> ****************************************************************************/
> +
> +#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
> +
> #include<linux/module.h>
>
> #include "../wifi.h"
> @@ -213,14 +216,14 @@ bool rtl92c_init_llt_table(struct ieee80211_hw *hw, u32 boundary)
> for (i = 0; i< (boundary - 1); i++) {
> rst = rtl92c_llt_write(hw, i , i + 1);
> if (true != rst) {
> - printk(KERN_ERR "===> %s #1 fail\n", __func__);
> + pr_err("===> %s #1 fail\n", __func__);
> return rst;
> }
> }
> /* end of list */
> rst = rtl92c_llt_write(hw, (boundary - 1), 0xFF);
> if (true != rst) {
> - printk(KERN_ERR "===> %s #2 fail\n", __func__);
> + pr_err("===> %s #2 fail\n", __func__);
> return rst;
> }
> /* Make the other pages as ring buffer
> @@ -231,14 +234,14 @@ bool rtl92c_init_llt_table(struct ieee80211_hw *hw, u32 boundary)
> for (i = boundary; i< LLT_LAST_ENTRY_OF_TX_PKT_BUFFER; i++) {
> rst = rtl92c_llt_write(hw, i, (i + 1));
> if (true != rst) {
> - printk(KERN_ERR "===> %s #3 fail\n", __func__);
> + pr_err("===> %s #3 fail\n", __func__);
> return rst;
> }
> }
> /* Let last entry point to the start entry of ring buffer */
> rst = rtl92c_llt_write(hw, LLT_LAST_ENTRY_OF_TX_PKT_BUFFER, boundary);
> if (true != rst) {
> - printk(KERN_ERR "===> %s #4 fail\n", __func__);
> + pr_err("===> %s #4 fail\n", __func__);
> return rst;
> }
> return rst;
> diff --git a/drivers/net/wireless/rtlwifi/rtl8192de/sw.c b/drivers/net/wireless/rtlwifi/rtl8192de/sw.c
> index 0883774..351765d 100644
> --- a/drivers/net/wireless/rtlwifi/rtl8192de/sw.c
> +++ b/drivers/net/wireless/rtlwifi/rtl8192de/sw.c
> @@ -27,6 +27,8 @@
> *
> *****************************************************************************/
>
> +#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
> +
> #include<linux/vmalloc.h>
>
> #include "../wifi.h"
> @@ -170,10 +172,8 @@ static int rtl92d_init_sw_vars(struct ieee80211_hw *hw)
> }
>
> if (!header_print) {
> - printk(KERN_INFO "rtl8192de: Driver for Realtek RTL8192DE"
> - " WLAN interface");
> - printk(KERN_INFO "rtl8192de: Loading firmware file %s\n",
> - rtlpriv->cfg->fw_name);
> + pr_info("Driver for Realtek RTL8192DE WLAN interface\n");
> + pr_info("Loading firmware file %s\n", rtlpriv->cfg->fw_name);
> header_print++;
> }
> /* request fw */
> diff --git a/drivers/net/wireless/rtlwifi/rtl8192se/hw.c b/drivers/net/wireless/rtlwifi/rtl8192se/hw.c
> index b1d0213..73142a9 100644
> --- a/drivers/net/wireless/rtlwifi/rtl8192se/hw.c
> +++ b/drivers/net/wireless/rtlwifi/rtl8192se/hw.c
> @@ -27,6 +27,8 @@
> *
> *****************************************************************************/
>
> +#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
> +
> #include "../wifi.h"
> #include "../efuse.h"
> #include "../base.h"
> @@ -465,8 +467,7 @@ static u8 _rtl92ce_halset_sysclk(struct ieee80211_hw *hw, u8 data)
> if ((tmpvalue& BIT(6)))
> break;
>
> - printk(KERN_ERR "wait for BIT(6) return value %x\n",
> - tmpvalue);
> + pr_err("wait for BIT(6) return value %x\n", tmpvalue);
> if (waitcount == 0)
> break;
>
> @@ -1255,8 +1256,7 @@ static u8 _rtl92s_set_sysclk(struct ieee80211_hw *hw, u8 data)
> if ((tmp& BIT(6)))
> break;
>
> - printk(KERN_ERR "wait for BIT(6) return value %x\n",
> - tmp);
> + pr_err("wait for BIT(6) return value %x\n", tmp);
>
> if (waitcnt == 0)
> break;
> @@ -1315,7 +1315,7 @@ static void _rtl92s_phy_set_rfhalt(struct ieee80211_hw *hw)
> if (u1btmp& BIT(7)) {
> u1btmp&= ~(BIT(6) | BIT(7));
> if (!_rtl92s_set_sysclk(hw, u1btmp)) {
> - printk(KERN_ERR "Switch ctrl path fail\n");
> + pr_err("Switch ctrl path fail\n");
> return;
> }
> }
> diff --git a/drivers/net/wireless/rtlwifi/rtl8192se/phy.c b/drivers/net/wireless/rtlwifi/rtl8192se/phy.c
> index 81a5aa4..f27171a 100644
> --- a/drivers/net/wireless/rtlwifi/rtl8192se/phy.c
> +++ b/drivers/net/wireless/rtlwifi/rtl8192se/phy.c
> @@ -27,6 +27,8 @@
> *
> *****************************************************************************/
>
> +#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
> +
> #include "../wifi.h"
> #include "../pci.h"
> #include "../ps.h"
> @@ -1016,8 +1018,7 @@ static bool _rtl92s_phy_bb_config_parafile(struct ieee80211_hw *hw)
> rtstatus = _rtl92s_phy_config_bb(hw, BASEBAND_CONFIG_AGC_TAB);
>
> if (rtstatus != true) {
> - printk(KERN_ERR "_rtl92s_phy_bb_config_parafile(): "
> - "AGC Table Fail\n");
> + pr_err("%s(): AGC Table Fail\n", __func__);
> goto phy_BB8190_Config_ParaFile_Fail;
> }
>
> diff --git a/drivers/net/wireless/rtlwifi/rtl8192se/rf.c b/drivers/net/wireless/rtlwifi/rtl8192se/rf.c
> index c6e3a4c..0ad50fe 100644
> --- a/drivers/net/wireless/rtlwifi/rtl8192se/rf.c
> +++ b/drivers/net/wireless/rtlwifi/rtl8192se/rf.c
> @@ -27,6 +27,8 @@
> *
> *****************************************************************************/
>
> +#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
> +
> #include "../wifi.h"
> #include "reg.h"
> #include "def.h"
> @@ -507,7 +509,7 @@ bool rtl92s_phy_rf6052_config(struct ieee80211_hw *hw)
> }
>
> if (rtstatus != true) {
> - printk(KERN_ERR "Radio[%d] Fail!!", rfpath);
> + pr_err("Radio[%d] Fail!!\n", rfpath);
> goto fail;
> }
>
> diff --git a/drivers/net/wireless/rtlwifi/rtl8192se/sw.c b/drivers/net/wireless/rtlwifi/rtl8192se/sw.c
> index 1c6cb1d..3876078 100644
> --- a/drivers/net/wireless/rtlwifi/rtl8192se/sw.c
> +++ b/drivers/net/wireless/rtlwifi/rtl8192se/sw.c
> @@ -27,6 +27,8 @@
> *
> *****************************************************************************/
>
> +#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
> +
> #include<linux/vmalloc.h>
>
> #include "../wifi.h"
> @@ -183,8 +185,8 @@ static int rtl92s_init_sw_vars(struct ieee80211_hw *hw)
> return 1;
> }
>
> - printk(KERN_INFO "rtl8192se: Driver for Realtek RTL8192SE/RTL8191SE\n"
> - " Loading firmware %s\n", rtlpriv->cfg->fw_name);
> + pr_info("Driver for Realtek RTL8192SE/RTL8191SE\n"
> + "Loading firmware %s\n", rtlpriv->cfg->fw_name);
> /* request fw */
> err = request_firmware(&firmware, rtlpriv->cfg->fw_name,
> rtlpriv->io.dev);
> diff --git a/drivers/net/wireless/rtlwifi/usb.c b/drivers/net/wireless/rtlwifi/usb.c
> index a9367eb..8b1cef0 100644
> --- a/drivers/net/wireless/rtlwifi/usb.c
> +++ b/drivers/net/wireless/rtlwifi/usb.c
> @@ -24,6 +24,9 @@
> * Hsinchu 300, Taiwan.
> *
> *****************************************************************************/
> +
> +#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
> +
> #include<linux/usb.h>
> #include "core.h"
> #include "wifi.h"
> @@ -104,9 +107,8 @@ static int _usbctrl_vendorreq_sync_read(struct usb_device *udev, u8 request,
> pdata, len, 0); /* max. timeout */
>
> if (status< 0)
> - printk(KERN_ERR "reg 0x%x, usbctrl_vendorreq TimeOut! "
> - "status:0x%x value=0x%x\n", value, status,
> - *(u32 *)pdata);
> + pr_err("reg 0x%x, usbctrl_vendorreq TimeOut! status:0x%x value=0x%x\n",
> + value, status, *(u32 *)pdata);
> return status;
> }
>
> @@ -316,7 +318,7 @@ static int _rtl_usb_init_rx(struct ieee80211_hw *hw)
> rtlusb->usb_rx_segregate_hdl =
> rtlpriv->cfg->usb_interface_cfg->usb_rx_segregate_hdl;
>
> - printk(KERN_INFO "rtl8192cu: rx_max_size %d, rx_urb_num %d, in_ep %d\n",
> + pr_info("rx_max_size %d, rx_urb_num %d, in_ep %d\n",
> rtlusb->rx_max_size, rtlusb->rx_urb_num, rtlusb->in_ep);
> init_usb_anchor(&rtlusb->rx_submitted);
> return 0;
> @@ -580,7 +582,7 @@ static void _rtl_rx_completed(struct urb *_urb)
> } else{
> /* TO DO */
> _rtl_rx_pre_process(hw, skb);
> - printk(KERN_ERR "rtlwifi: rx agg not supported\n");
> + pr_err("rx agg not supported\n");
> }
> goto resubmit;
> }
Joe,
In general these look good, but why not define pr_fmt in rtlwifi/wifi.h. That
header is used by every source file, and you only need the define once.
Larry
^ permalink raw reply
* Re: sch_generic warn_on (timed out)
From: Brandeburg, Jesse @ 2011-07-20 16:38 UTC (permalink / raw)
To: Dave Jones; +Cc: netdev@vger.kernel.org
In-Reply-To: <20110711204834.GA4950@redhat.com>
On Mon, 11 Jul 2011, Dave Jones wrote:
> WARN_ONCE(1, KERN_INFO "NETDEV WATCHDOG: %s (%s): transmit queue %u timed out\n",
> dev->name, netdev_drivername(dev, drivername, 64), i);
>
> https://bugzilla.redhat.com/show_bug.cgi?id=702723 is our 'master bug' that we're
> duping all others against. It seems to be showing up on a variety of different
> hardware (r8169, atl1c, ipheth, e1000e, 8139too). Do all these drivers need
> fixing ? or is it just 'crap hardware' ?
neither, probably
> note that I've only been looking through fedora 15 bugs so far (which is still on 2.6.38),
> but looking at the commit log for sch_generic, it doesn't seem that there's anything
> obvious that needs backporting.
it used to just be a KERN_ERR printk, then it changed it to be a WARN_ONCE
in order to trigger kerneloops reports so we knew how many people were
getting tx hangs from their hardware.
The bad news is there is never anything useful in the backtrace, besides
what driver it is. Users have been trained to send backtrace for panic
messages, and in this case it doesn't help very much to identify what
the problem was.
If the reports within each driver were able to be traced back to a
specific *model* of hardware then that might be useful (particularly for
Intel hardware). Maybe the WARN_ONCE should print vendor/device pair so
we would at least know the hardware from the panic trace.
If this is happening more frequently on F15 than F14 across multiple
pieces of hardware, it may indicate that a kernel/stack change is starting
to (ab)use a changed working model that is causing an issue, or that there
is an actual kernel issue with locks or interrupts or tx completions that
is causing an excessive delay in completion of transmits.
Dave can you query for F14 reports and/or isolate what kernel this started
with?
^ permalink raw reply
* Re: [PATCH] pktgen: Clone skb to avoid corruption of skbs in ndo_start_xmit methods
From: Ben Greear @ 2011-07-20 16:37 UTC (permalink / raw)
To: Michał Mirosław
Cc: Neil Horman, Eric Dumazet, Jiri Pirko, netdev, Alexey Dobriyan,
David S. Miller, robert.olsson
In-Reply-To: <CAHXqBFKD1bD8uMYOwbhsutT0ZuEiw=7pUDM1hVGpCgrdnV6zAg@mail.gmail.com>
On 07/20/2011 08:35 AM, Michał Mirosław wrote:
> 2011/7/20 Neil Horman<nhorman@tuxdriver.com>:
>> On Wed, Jul 20, 2011 at 06:24:15AM +0200, Eric Dumazet wrote:
>>> Le mardi 19 juillet 2011 à 22:07 -0400, Neil Horman a écrit :
>>>>>
>>>> I think this is a good idea. It lets pktgen dynamically make the clone/share
>>>> decision dynamically and only impacts performance for those systems.
>>>>
>>>
>>> Just let pktgen refuse to use clone_skb command for these devices.
>>>
>> copy that, This is by no means final, but what do you think of this? If its
>> agreeable to you, Ben, et al. I can add this to my local tree and start auditing
>> all the drivers that may need to have the flag set.
>>
>> Regards
>> Neil
>>
>>
>> diff --git a/include/linux/if.h b/include/linux/if.h
>> index 3bc63e6..ae904fe 100644
>> --- a/include/linux/if.h
>> +++ b/include/linux/if.h
>> @@ -76,6 +76,7 @@
>> #define IFF_BRIDGE_PORT 0x4000 /* device used as bridge port */
>> #define IFF_OVS_DATAPATH 0x8000 /* device used as Open vSwitch
>> * datapath port */
>> +#define IFF_CANT_SHARE_SKB 0x10000 /* Device can't share skbs in tx path */
>>
>> #define IF_GET_IFACE 0x0001 /* for querying only */
>> #define IF_GET_PROTO 0x0002
>> diff --git a/net/core/pktgen.c b/net/core/pktgen.c
>> index f76079c..bf6d88d 100644
>> --- a/net/core/pktgen.c
>> +++ b/net/core/pktgen.c
>> @@ -1071,6 +1071,9 @@ static ssize_t pktgen_if_write(struct file *file,
>> if (len< 0)
>> return len;
>>
>> + if (pkt_dev->priv_flags& IFF_CANT_SHARE_SKB)
>> + return -EOPNOTSUPP;
>> +
>> i += len;
>> pkt_dev->clone_skb = value;
>>
>
> I would prefer that the flag be inclusive, i.e. it should mark drivers
> which can use shared skbs. And it might be better to clone the skb in
> case the flag is disabled to keep functionality working.
The whole point of clone-skb is for speedup due to not allocating
new memory..so if the netdev can't support it, lets just fail instead
of giving user false sense of it working...
User can just use clone-skb value of 0 in that case...
Thanks,
Ben
>
> Best Regards,
> Michał Mirosław
> --
> 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
--
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc http://www.candelatech.com
^ permalink raw reply
* Re: IPv6: autoconfiguration and suspend/resume or link down/up
From: Jiri Bohac @ 2011-07-20 16:36 UTC (permalink / raw)
To: Dan Williams
Cc: Jiri Bohac, netdev, Herbert Xu, David S. Miller,
stephen hemminger
In-Reply-To: <1311178905.21004.9.camel@dcbw.foobar.com>
On Wed, Jul 20, 2011 at 11:21:43AM -0500, Dan Williams wrote:
> ... and in the resume handler use that value to age anything
> that needs to know about time spent in suspend, and then do what needs
> to be done with that. So something like that may work for IPv6
> addrconf; on suspend save current time, and on resume check the current
> time, subtract the time you saved on suspend, and magically add that to
> the lifetime counts and then run any expiry stuff.
IPv6 (by specification) does not send any RS when an IP address
or route expires. So only subtracting the supend time from the
lifetimes and possibly expiring the routes/IP addresses won't fix
the problem.
When I move to a new network, I need to restart the
autoconfiguration. This does not currently happen - neither for
an alive system where the ethernet link goes down/up, nor for a
system that gets suspended, moved and then resumed.
--
Jiri Bohac <jbohac@suse.cz>
SUSE Labs, SUSE CZ
^ permalink raw reply
* Re: [PATCH] pktgen: Clone skb to avoid corruption of skbs in ndo_start_xmit methods
From: Neil Horman @ 2011-07-20 16:36 UTC (permalink / raw)
To: Ben Greear
Cc: Eric Dumazet, Jiri Pirko, netdev, Alexey Dobriyan,
David S. Miller, robert.olsson
In-Reply-To: <4E270350.7050904@candelatech.com>
On Wed, Jul 20, 2011 at 09:33:20AM -0700, Ben Greear wrote:
> On 07/20/2011 08:18 AM, Neil Horman wrote:
> >On Wed, Jul 20, 2011 at 06:24:15AM +0200, Eric Dumazet wrote:
> >>Le mardi 19 juillet 2011 à 22:07 -0400, Neil Horman a écrit :
> >>>>
> >>>I think this is a good idea. It lets pktgen dynamically make the clone/share
> >>>decision dynamically and only impacts performance for those systems.
> >>>
> >>
> >>Just let pktgen refuse to use clone_skb command for these devices.
> >>
> >copy that, This is by no means final, but what do you think of this? If its
> >agreeable to you, Ben, et al. I can add this to my local tree and start auditing
> >all the drivers that may need to have the flag set.
> >
> >Regards
> >Neil
> >
> >
> >diff --git a/include/linux/if.h b/include/linux/if.h
> >index 3bc63e6..ae904fe 100644
> >--- a/include/linux/if.h
> >+++ b/include/linux/if.h
> >@@ -76,6 +76,7 @@
> > #define IFF_BRIDGE_PORT 0x4000 /* device used as bridge port */
> > #define IFF_OVS_DATAPATH 0x8000 /* device used as Open vSwitch
> > * datapath port */
> >+#define IFF_CANT_SHARE_SKB 0x10000 /* Device can't share skbs in tx path */
> >
> > #define IF_GET_IFACE 0x0001 /* for querying only */
> > #define IF_GET_PROTO 0x0002
> >diff --git a/net/core/pktgen.c b/net/core/pktgen.c
> >index f76079c..bf6d88d 100644
> >--- a/net/core/pktgen.c
> >+++ b/net/core/pktgen.c
> >@@ -1071,6 +1071,9 @@ static ssize_t pktgen_if_write(struct file *file,
> > if (len< 0)
> > return len;
> >
> >+ if (pkt_dev->priv_flags& IFF_CANT_SHARE_SKB)
> >+ return -EOPNOTSUPP;
> >+
> > i += len;
> > pkt_dev->clone_skb = value;
> >
>
> Please only return an error if value > 1.
>
> Also, if there is any place where user can configure pkt_dev,
> you would want code there to check for the CANT_SHARE_SKB flag
> and force clone_skb to zero if user changes to a different
> device that cannot share skbs.
>
> Thanks,
> Ben
>
Understood, thank you Ben.
Neil
> --
> Ben Greear <greearb@candelatech.com>
> Candela Technologies Inc http://www.candelatech.com
>
>
^ permalink raw reply
* Re: [PATCH] pktgen: Clone skb to avoid corruption of skbs in ndo_start_xmit methods
From: Ben Greear @ 2011-07-20 16:33 UTC (permalink / raw)
To: Neil Horman
Cc: Eric Dumazet, Jiri Pirko, netdev, Alexey Dobriyan,
David S. Miller, robert.olsson
In-Reply-To: <20110720151827.GD12349@hmsreliant.think-freely.org>
On 07/20/2011 08:18 AM, Neil Horman wrote:
> On Wed, Jul 20, 2011 at 06:24:15AM +0200, Eric Dumazet wrote:
>> Le mardi 19 juillet 2011 à 22:07 -0400, Neil Horman a écrit :
>>>>
>>> I think this is a good idea. It lets pktgen dynamically make the clone/share
>>> decision dynamically and only impacts performance for those systems.
>>>
>>
>> Just let pktgen refuse to use clone_skb command for these devices.
>>
> copy that, This is by no means final, but what do you think of this? If its
> agreeable to you, Ben, et al. I can add this to my local tree and start auditing
> all the drivers that may need to have the flag set.
>
> Regards
> Neil
>
>
> diff --git a/include/linux/if.h b/include/linux/if.h
> index 3bc63e6..ae904fe 100644
> --- a/include/linux/if.h
> +++ b/include/linux/if.h
> @@ -76,6 +76,7 @@
> #define IFF_BRIDGE_PORT 0x4000 /* device used as bridge port */
> #define IFF_OVS_DATAPATH 0x8000 /* device used as Open vSwitch
> * datapath port */
> +#define IFF_CANT_SHARE_SKB 0x10000 /* Device can't share skbs in tx path */
>
> #define IF_GET_IFACE 0x0001 /* for querying only */
> #define IF_GET_PROTO 0x0002
> diff --git a/net/core/pktgen.c b/net/core/pktgen.c
> index f76079c..bf6d88d 100644
> --- a/net/core/pktgen.c
> +++ b/net/core/pktgen.c
> @@ -1071,6 +1071,9 @@ static ssize_t pktgen_if_write(struct file *file,
> if (len< 0)
> return len;
>
> + if (pkt_dev->priv_flags& IFF_CANT_SHARE_SKB)
> + return -EOPNOTSUPP;
> +
> i += len;
> pkt_dev->clone_skb = value;
>
Please only return an error if value > 1.
Also, if there is any place where user can configure pkt_dev,
you would want code there to check for the CANT_SHARE_SKB flag
and force clone_skb to zero if user changes to a different
device that cannot share skbs.
Thanks,
Ben
--
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc http://www.candelatech.com
^ permalink raw reply
* Re: [PATCH 1/3] wireless: rtlwifi: throw away MAC_FMT and use %pM instead
From: Larry Finger @ 2011-07-20 16:31 UTC (permalink / raw)
To: Joe Perches
Cc: Andy Shevchenko, linux-wireless, netdev, John W. Linville,
linux-kernel, 'Chaoming_Li'
In-Reply-To: <1311177762.1663.9.camel@Joe-Laptop>
On 07/20/2011 11:02 AM, Joe Perches wrote:
> On Wed, 2011-07-20 at 10:47 -0500, Larry Finger wrote:
>> Thanks for the patch.
>
> Hey Larry.
>
> rtlwifi has a CONFIG_BT_COEXIST which is currently
> unused/undefined by Kconfig.
>
> Are there plans to enable this or should the code
> just be removed?
>
> There may be a few dependencies in rtlwifi for
> variables set in this block so it seems from
> superficial reading that removal might be a bit
> involved. I didn't look much more than that,
> but struct btcoexist_priv doesn't seem to be
> specified by the code anywhere.
I don't know the answer to that, but I have added Chaoming Li to the Cc. He will
know if Realtek has any plans for BT coexistence.
Larry
^ permalink raw reply
* Re: IPv6: autoconfiguration and suspend/resume or link down/up
From: Jiri Bohac @ 2011-07-20 16:29 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: Jiri Bohac, netdev, Herbert Xu, David S. Miller
In-Reply-To: <20110720091556.619a0c14@nehalam.ftrdhcpuser.net>
On Wed, Jul 20, 2011 at 09:15:56AM -0700, Stephen Hemminger wrote:
> > When the cable is unplugged and plugged in again, we already get
> > notified through linkwatch -> netdev_state_change ->
> > -> call_netdevice_notifiers(NETDEV_CHANGE, ...)
> > However, if the device has already been autoconfigured,
> > addrconf_notify() only handles this event by printing a
> > message.
...
> If the driver drops the link during suspend then the necessary link
> events happen to keep bridging, ipv6, bonding and all the other possible
> network protocols happy.
OK, so maybe providing the link event on suspend/resume should be
left to the drivers.
The main problem persists: IPv6 currently does nothing when the link goes
down and returns. Shouldn't the kernel anticipate that the new
network could be different, forget all the autoconfigured
parameters and restart the autoconfiguration?
--
Jiri Bohac <jbohac@suse.cz>
SUSE Labs, SUSE CZ
^ permalink raw reply
* Re: linux-next: Tree for July 20 (qlcnic)
From: Randy Dunlap @ 2011-07-20 16:19 UTC (permalink / raw)
To: Stephen Rothwell, netdev; +Cc: linux-next, LKML, linux-driver
In-Reply-To: <20110720180041.5774ca335e6697c17374dca5@canb.auug.org.au>
On Wed, 20 Jul 2011 18:00:41 +1000 Stephen Rothwell wrote:
> Hi all,
When CONFIG_VLAN_8021Q is not enabled:
drivers/net/qlcnic/qlcnic_main.c:4207: error: 'struct net_device' has no member named 'vlgrp'
---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
^ permalink raw reply
* Re: [PATCH] pktgen: Clone skb to avoid corruption of skbs in ndo_start_xmit methods
From: Neil Horman @ 2011-07-20 16:19 UTC (permalink / raw)
To: Eric Dumazet
Cc: Ben Greear, Jiri Pirko, netdev, Alexey Dobriyan, David S. Miller,
robert.olsson
In-Reply-To: <1311176688.2338.49.camel@edumazet-HP-Compaq-6005-Pro-SFF-PC>
On Wed, Jul 20, 2011 at 05:44:48PM +0200, Eric Dumazet wrote:
> Le mercredi 20 juillet 2011 à 11:39 -0400, Neil Horman a écrit :
>
> > Isn't that exactly what this does? Disallows a user from issuing the cone_skb
> > command in a pktgen script if the underlying driver can't support the sharing of
> > skbs.
>
> My bad, I misread your patch. Seems fine to me ;)
>
Ok, thanks. I'll put this in a local tree and stat auditing drivers to see who
needs it set/cleared. I'll post a new series when I have it done.
Thanks!
Neil
^ permalink raw reply
* Re: [PATCH] pktgen: Clone skb to avoid corruption of skbs in ndo_start_xmit methods
From: Neil Horman @ 2011-07-20 16:18 UTC (permalink / raw)
To: Michał Mirosław
Cc: Eric Dumazet, Ben Greear, Jiri Pirko, netdev, Alexey Dobriyan,
David S. Miller, robert.olsson
In-Reply-To: <CAHXqBFJhChXOpDOON-bz-DAkFUaggTYjwe6qjggb07Pf9bF8Vw@mail.gmail.com>
On Wed, Jul 20, 2011 at 06:08:39PM +0200, Michał Mirosław wrote:
> W dniu 20 lipca 2011 17:40 użytkownik Neil Horman
> <nhorman@tuxdriver.com> napisał:
> > On Wed, Jul 20, 2011 at 05:35:47PM +0200, Michał Mirosław wrote:
> >> 2011/7/20 Neil Horman <nhorman@tuxdriver.com>:
> >> > On Wed, Jul 20, 2011 at 06:24:15AM +0200, Eric Dumazet wrote:
> >> >> Le mardi 19 juillet 2011 à 22:07 -0400, Neil Horman a écrit :
> >> >> > >
> >> >> > I think this is a good idea. It lets pktgen dynamically make the clone/share
> >> >> > decision dynamically and only impacts performance for those systems.
> >> >> >
> >> >>
> >> >> Just let pktgen refuse to use clone_skb command for these devices.
> >> >>
> >> > copy that, This is by no means final, but what do you think of this? If its
> >> > agreeable to you, Ben, et al. I can add this to my local tree and start auditing
> >> > all the drivers that may need to have the flag set.
> >> >
> >> > Regards
> >> > Neil
> >> >
> >> >
> >> > diff --git a/include/linux/if.h b/include/linux/if.h
> >> > index 3bc63e6..ae904fe 100644
> >> > --- a/include/linux/if.h
> >> > +++ b/include/linux/if.h
> >> > @@ -76,6 +76,7 @@
> >> > #define IFF_BRIDGE_PORT 0x4000 /* device used as bridge port */
> >> > #define IFF_OVS_DATAPATH 0x8000 /* device used as Open vSwitch
> >> > * datapath port */
> >> > +#define IFF_CANT_SHARE_SKB 0x10000 /* Device can't share skbs in tx path */
> >> >
> >> > #define IF_GET_IFACE 0x0001 /* for querying only */
> >> > #define IF_GET_PROTO 0x0002
> >> > diff --git a/net/core/pktgen.c b/net/core/pktgen.c
> >> > index f76079c..bf6d88d 100644
> >> > --- a/net/core/pktgen.c
> >> > +++ b/net/core/pktgen.c
> >> > @@ -1071,6 +1071,9 @@ static ssize_t pktgen_if_write(struct file *file,
> >> > if (len < 0)
> >> > return len;
> >> >
> >> > + if (pkt_dev->priv_flags & IFF_CANT_SHARE_SKB)
> >> > + return -EOPNOTSUPP;
> >> > +
> >> > i += len;
> >> > pkt_dev->clone_skb = value;
> >> >
> >>
> >> I would prefer that the flag be inclusive, i.e. it should mark drivers
> >> which can use shared skbs. And it might be better to clone the skb in
> >> case the flag is disabled to keep functionality working.
> > Ok, I can agree with that. But you're ok with the general approach?
>
> I assumed you wanted to use netdev->features and I noticed priv_flags
> just now. If the flag is supposed to be permanent then its fine by me.
> Actually this makes me wonder if NETIF_F_LLTX and similar should get
> moved to netdev->priv_flags.
>
Yeah, I expect it will be both permanent and invisible to user space.
Neil
> Best Regards,
> Michał Mirosław
>
^ permalink raw reply
* Re: IPv6: autoconfiguration and suspend/resume or link down/up
From: Dan Williams @ 2011-07-20 16:21 UTC (permalink / raw)
To: Jiri Bohac; +Cc: netdev, Herbert Xu, David S. Miller, stephen hemminger
In-Reply-To: <20110719180222.GA7509@midget.suse.cz>
On Tue, 2011-07-19 at 20:02 +0200, Jiri Bohac wrote:
> Hi,
>
> I came over a surprising behaviour with IPv6 autoconfiguration,
> which I think is a bug, but I would first like to hear other
> people's opinions before trying to fix this:
>
> Problem 1: all the address/route lifetimes are kept in jiffies
> and jiffies don't get incremented on resume. So when a
> route/address lifetime is 30 minutes and the system resumes after
> 1 hour, the route/address should be considered expired, but it is
> not.
>
> Problem 2: when a system is moved to a new network a RS is not
> sent. Thus, IPv6 does not autoconfigure until the router sends a
> periodic RA. This can occur both while the system is alive and
> while it is suspended. I think the autoconfigured state should be
> discarded when the kernel suspects the system could have been
> moved to a different network.
>
> When the cable is unplugged and plugged in again, we already get
> notified through linkwatch -> netdev_state_change ->
> -> call_netdevice_notifiers(NETDEV_CHANGE, ...)
> However, if the device has already been autoconfigured,
> addrconf_notify() only handles this event by printing a
> message.
>
> So my idea was to:
> - handle link up/down in addrconf_notify() similarly to
> NETDEV_UP/NETDEV_DOWN
>
> - on suspend, faking a link down event; on resume, faking a link up event
> (or better, having a special event type for suspend/resume)
>
> This would cause autoconfiguration to be restarted on resume as
> well as cable plug/unplug, solving both the above problems.
Faking a link event seems like a hack. We had this problem with the
wifi stack a while ago where the current AP list wasn't expired on
wakeup so it still looked like the APs that were there when you went to
sleep were there when you resumed even if you'd moved 100 miles. What
we did there was save the current time (using get_seconds()) when
suspending, and in the resume handler use that value to age anything
that needs to know about time spent in suspend, and then do what needs
to be done with that. So something like that may work for IPv6
addrconf; on suspend save current time, and on resume check the current
time, subtract the time you saved on suspend, and magically add that to
the lifetime counts and then run any expiry stuff.
Dan
^ permalink raw reply
* Re: [PATCH net-next]vhost: fix condition check for # of outstanding dma buffers
From: Michael S. Tsirkin @ 2011-07-20 16:17 UTC (permalink / raw)
To: Shirley Ma; +Cc: David Miller, netdev, jasowang
In-Reply-To: <1311176589.8573.33.camel@localhost.localdomain>
On Wed, Jul 20, 2011 at 08:43:09AM -0700, Shirley Ma wrote:
> On Wed, 2011-07-20 at 13:28 +0300, Michael S. Tsirkin wrote:
> > On Tue, Jul 19, 2011 at 01:56:25PM -0700, Shirley Ma wrote:
> > > On Tue, 2011-07-19 at 22:09 +0300, Michael S. Tsirkin wrote:
> > > > On Tue, Jul 19, 2011 at 11:37:58AM -0700, Shirley Ma wrote:
> > > > > Signed-off-by: Shirley Ma <xma@us.ibm.com>
> > > > > ---
> > > > >
> > > > > drivers/vhost/net.c | 6 ++++--
> > > > > 1 files changed, 4 insertions(+), 2 deletions(-)
> > > > >
> > > > > diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c
> > > > > index 70ac604..83cb738 100644
> > > > > --- a/drivers/vhost/net.c
> > > > > +++ b/drivers/vhost/net.c
> > > > > @@ -189,8 +189,10 @@ static void handle_tx(struct vhost_net
> > *net)
> > > > > break;
> > > > > }
> > > > > /* If more outstanding DMAs, queue the
> > work */
> > > > > - if (unlikely(vq->upend_idx - vq->done_idx
> > >
> > > > > - VHOST_MAX_PEND)) {
> > > > > + if (unlikely((vq->upend_idx - vq->done_idx
> > >
> > > > > + VHOST_MAX_PEND) ||
> > > > > + (vq->upend_idx - vq->done_idx
> > >
> > > > > + VHOST_MAX_PEND -
> > > > UIO_MAXIOV))) {
> > > >
> > > > Could you please explain why this makes sense please?
> > > > VHOST_MAX_PEND is 128 UIO_MAXIOV is 1024 so
> > > > the result is negative?
> > >
> > > I thought it is equal to:
> > >
> > > if (vq->upend_idx > vq->done_idx)
> > > check vq->upend_idx - vq->done_idx > VHOST_MAX_PEND
> > > if (vq->upend_idx < vq->done_idx)
> > > check vq->upend_idx + UIO_MAXIOV - vq->done_idx >
> > VHOST_MAX_PEND
> > >
> >
> > Check it out: upend_idx == done_idx == 0 does not satisfy the
> > above conditions but does trigger in your code, right?
>
> We don't hit upend_idx == done_idx == 0. Only upend_idx == done_idx ==
> UIO_MAXIOV could happen if the lower device has issue and never DMA any
> packets out.
My point was that the logic isn't the same, even though
you said 'it is equal to'.
Same applies to upend_idx == 1, done_idx == 0.
> > Better keep it simple. Maybe:
> >
> > if (unlikely(vq->upend_idx - vq->done_idx > VHOST_MAX_PEND) ||
> > (unlikely(vq->upend_idx < vq->done_idx) &&
> > unlikely(vq->upend_idx + UIO_MAXIOV - vq->done_idx >
> > VHOST_MAX_PEND)))
> >
> > ?
> >
> > Also, please add commit log documenting what does the patch
> > fix: something like:
> > 'the test for # of outstanding buffers returned
> > incorrect results when due to wrap around,
> > upend_idx < done_idx'?
>
> Sure, will modify it and resubmit.
>
> > > > I thought upend_idx - done_idx is exactly the number
> > > > of buffers, so once we get too many we stop until
> > > > one gets freed?
> > >
> > > They are index, so in vhost zerocopy callback, we can get the idx
> > right
> > > away.
> > >
> > > >
> > > > > tx_poll_start(net, sock);
> > > > > set_bit(SOCK_ASYNC_NOSPACE,
> > > > &sock->flags);
> > > > > break;
> > > > >
>
> Thanks
> Shirley
^ permalink raw reply
* Re: IPv6: autoconfiguration and suspend/resume or link down/up
From: Stephen Hemminger @ 2011-07-20 16:15 UTC (permalink / raw)
To: Jiri Bohac; +Cc: netdev, Herbert Xu, David S. Miller
In-Reply-To: <20110719180222.GA7509@midget.suse.cz>
On Tue, 19 Jul 2011 20:02:53 +0200
Jiri Bohac <jbohac@suse.cz> wrote:
> Hi,
>
> I came over a surprising behaviour with IPv6 autoconfiguration,
> which I think is a bug, but I would first like to hear other
> people's opinions before trying to fix this:
>
> Problem 1: all the address/route lifetimes are kept in jiffies
> and jiffies don't get incremented on resume. So when a
> route/address lifetime is 30 minutes and the system resumes after
> 1 hour, the route/address should be considered expired, but it is
> not.
>
> Problem 2: when a system is moved to a new network a RS is not
> sent. Thus, IPv6 does not autoconfigure until the router sends a
> periodic RA. This can occur both while the system is alive and
> while it is suspended. I think the autoconfigured state should be
> discarded when the kernel suspects the system could have been
> moved to a different network.
>
> When the cable is unplugged and plugged in again, we already get
> notified through linkwatch -> netdev_state_change ->
> -> call_netdevice_notifiers(NETDEV_CHANGE, ...)
> However, if the device has already been autoconfigured,
> addrconf_notify() only handles this event by printing a
> message.
>
> So my idea was to:
> - handle link up/down in addrconf_notify() similarly to
> NETDEV_UP/NETDEV_DOWN
>
> - on suspend, faking a link down event; on resume, faking a link up event
> (or better, having a special event type for suspend/resume)
>
> This would cause autoconfiguration to be restarted on resume as
> well as cable plug/unplug, solving both the above problems.
>
> Or do we want to completely rely on userspace tools
> (networkmanager/ifplug) and expect them to do NETDEV_DOWN on
> unplug/suspend and NETDEV_UP on plug/resume?
>
> Any thoughts?
What hardware?
I think the normal solution is to have the device drop the link
during it's suspend and then attempt to renegotiate it on resume.
This is needed for wired (autonegotiation) and wireless already.
There maybe old drivers that don't do this. That is probably why
Ubuntu and other distro's used to rmmod the drivers during suspend.
If the driver drops the link during suspend then the necessary link
events happen to keep bridging, ipv6, bonding and all the other possible
network protocols happy.
^ 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