* [PATCH net-next 6/8] tg3: Fix int selftest for recent devices.
From: Matt Carlson @ 2011-07-20 20:20 UTC (permalink / raw)
To: davem; +Cc: netdev, mcarlson
This patch fixes interrupt selftest failures for recent devices (57765,
5717, 5718. 5719, 5720) by disabling MSI one-shot mode and applying the
status tag workaround to the selftest code.
Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
---
drivers/net/tg3.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c
index e5c1bc9..f2b0839 100644
--- a/drivers/net/tg3.c
+++ b/drivers/net/tg3.c
@@ -9183,7 +9183,7 @@ static int tg3_test_interrupt(struct tg3 *tp)
* Turn off MSI one shot mode. Otherwise this test has no
* observable way to know whether the interrupt was delivered.
*/
- if (tg3_flag(tp, 57765_PLUS) && tg3_flag(tp, USING_MSI)) {
+ if (tg3_flag(tp, 57765_PLUS)) {
val = tr32(MSGINT_MODE) | MSGINT_MODE_ONE_SHOT_DISABLE;
tw32(MSGINT_MODE, val);
}
@@ -9211,6 +9211,10 @@ static int tg3_test_interrupt(struct tg3 *tp)
break;
}
+ if (tg3_flag(tp, 57765_PLUS) &&
+ tnapi->hw_status->status_tag != tnapi->last_tag)
+ tw32_mailbox_f(tnapi->int_mbox, tnapi->last_tag << 24);
+
msleep(10);
}
@@ -9225,7 +9229,7 @@ static int tg3_test_interrupt(struct tg3 *tp)
if (intr_ok) {
/* Reenable MSI one shot mode. */
- if (tg3_flag(tp, 57765_PLUS) && tg3_flag(tp, USING_MSI)) {
+ if (tg3_flag(tp, 57765_PLUS)) {
val = tr32(MSGINT_MODE) & ~MSGINT_MODE_ONE_SHOT_DISABLE;
tw32(MSGINT_MODE, val);
}
--
1.7.3.4
^ permalink raw reply related
* [PATCH net-next 5/8] tg3: Fix RSS indirection table distribution
From: Matt Carlson @ 2011-07-20 20:20 UTC (permalink / raw)
To: davem; +Cc: netdev, mcarlson
The current RSS indirection table is populated such that more traffic
will hit the first RSS ring. This patch adjusts the indirection table
so that the load is more evenly distributed.
Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
---
drivers/net/tg3.c | 21 +++++++++++++++------
1 files changed, 15 insertions(+), 6 deletions(-)
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c
index 5110ea0..e5c1bc9 100644
--- a/drivers/net/tg3.c
+++ b/drivers/net/tg3.c
@@ -8723,15 +8723,24 @@ static int tg3_reset_hw(struct tg3 *tp, int reset_phy)
udelay(100);
if (tg3_flag(tp, ENABLE_RSS)) {
+ int i = 0;
u32 reg = MAC_RSS_INDIR_TBL_0;
- u8 *ent = (u8 *)&val;
- /* Setup the indirection table */
- for (i = 0; i < TG3_RSS_INDIR_TBL_SIZE; i++) {
- int idx = i % sizeof(val);
+ if (tp->irq_cnt == 2) {
+ for (i = 0; i < TG3_RSS_INDIR_TBL_SIZE; i += 8) {
+ tw32(reg, 0x0);
+ reg += 4;
+ }
+ } else {
+ u32 val;
- ent[idx] = i % (tp->irq_cnt - 1);
- if (idx == sizeof(val) - 1) {
+ while (i < TG3_RSS_INDIR_TBL_SIZE) {
+ val = i % (tp->irq_cnt - 1);
+ i++;
+ for (; i % 8; i++) {
+ val <<= 4;
+ val |= (i % (tp->irq_cnt - 1));
+ }
tw32(reg, val);
reg += 4;
}
--
1.7.3.4
^ permalink raw reply related
* [PATCH net-next 4/8] tg3: Add 5719 and 5720 to EEE_CAP list
From: Matt Carlson @ 2011-07-20 20:20 UTC (permalink / raw)
To: davem; +Cc: netdev, mcarlson
This patch adds the 5719 and the 5720 to the list of devices that are
EEE capable.
Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
---
drivers/net/tg3.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c
index e0413bc..5110ea0 100644
--- a/drivers/net/tg3.c
+++ b/drivers/net/tg3.c
@@ -13142,7 +13142,9 @@ static int __devinit tg3_phy_probe(struct tg3 *tp)
}
if (!(tp->phy_flags & TG3_PHYFLG_ANY_SERDES) &&
- ((tp->pdev->device == TG3PCI_DEVICE_TIGON3_5718 &&
+ (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5719 ||
+ GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5720 ||
+ (tp->pdev->device == TG3PCI_DEVICE_TIGON3_5718 &&
tp->pci_chip_rev_id != CHIPREV_ID_5717_A0) ||
(GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_57765 &&
tp->pci_chip_rev_id != CHIPREV_ID_57765_A0)))
--
1.7.3.4
^ permalink raw reply related
* [PATCH net-next 0/8] tg3: Misc bugfixes
From: Matt Carlson @ 2011-07-20 20:20 UTC (permalink / raw)
To: davem; +Cc: netdev, mcarlson
This patchset fixes a few random tg3 bugs.
^ permalink raw reply
* [PATCH] net: vlan: fix compile breakage from 69ecca8
From: David Lamparter @ 2011-07-20 19:43 UTC (permalink / raw)
Cc: Stephen Rothwell, netdev, linux-next, linux-kernel,
David Lamparter, linux-driver, Anirban Chakraborty,
David S. Miller, Randy Dunlap
In-Reply-To: <0E5EAE44-204C-4F4D-926C-F4D973B0CDB1@qlogic.com>
well, there was too much wood to see the tree and I messed up the
configuration dependencies. let's make it work with unset
CONFIG_VLAN_8021Q and remove the second definition of vlan_find_dev.
Signed-off-by: David Lamparter <equinox@diac24.net>
Cc: linux-driver@qlogic.com
Cc: Anirban Chakraborty <anirban.chakraborty@qlogic.com>
Cc: David S. Miller <davem@davemloft.net>
Cc: Randy Dunlap <rdunlap@xenotime.net>
---
sorry for the mess-up... compiled with CONFIG_VLAN_8021Q=n,m and y
this time; don't have qlcnic hw to test.
drivers/net/qlcnic/qlcnic_main.c | 4 +++-
include/linux/if_vlan.h | 5 -----
2 files changed, 3 insertions(+), 6 deletions(-)
diff --git a/drivers/net/qlcnic/qlcnic_main.c b/drivers/net/qlcnic/qlcnic_main.c
index 3579229..a2c39e9 100644
--- a/drivers/net/qlcnic/qlcnic_main.c
+++ b/drivers/net/qlcnic/qlcnic_main.c
@@ -4198,13 +4198,15 @@ static void
qlcnic_restore_indev_addr(struct net_device *netdev, unsigned long event)
{
struct qlcnic_adapter *adapter = netdev_priv(netdev);
- struct vlan_group *grp;
+ struct vlan_group *grp = NULL;
struct net_device *dev;
u16 vid;
qlcnic_config_indev_addr(adapter, netdev, event);
+#if defined(CONFIG_VLAN_8021Q) || defined(CONFIG_VLAN_8021Q_MODULE)
grp = rcu_dereference_rtnl(netdev->vlgrp);
+#endif
if (!grp)
return;
diff --git a/include/linux/if_vlan.h b/include/linux/if_vlan.h
index bc03e40..dbe41dc 100644
--- a/include/linux/if_vlan.h
+++ b/include/linux/if_vlan.h
@@ -135,11 +135,6 @@ vlan_gro_frags(struct napi_struct *napi, struct vlan_group *grp,
unsigned int vlan_tci);
#else
-static inline struct net_device *vlan_find_dev(struct net_device *real_dev,
- u16 vlan_id)
-{
- return NULL;
-}
static inline struct net_device *vlan_dev_real_dev(const struct net_device *dev)
{
--
1.7.5.3
^ permalink raw reply related
* icmp_route_lookup returns wrong source address information
From: Florian Westphal @ 2011-07-20 19:22 UTC (permalink / raw)
To: davem; +Cc: netdev
Hello David,
With linux-2.6 and net-next trees, whenever an icmp error message is
sent in response to a to-be-forwarded packet, the destination address
of the original packet is used as the IP header source address.
Example:
$ traceroute breakpoint.cc
traceroute to breakpoint.cc (85.10.199.196), 30 hops max, 40 byte packets
1 chamillionaire.breakpoint.cc (85.10.199.196) 0.476 ms 0.468 ms 0.793 ms
But the expected 1st hop is 192.168.20.7 in my setup.
I bisected this down to 77968b78242ee25e2a4d759f0fca8dd52df6d479
("ipv4: Pass flow keys down into datagram packet building engine.")
Specifically, it is caused by this hunk:
-static struct rtable *icmp_route_lookup(struct net *net, struct sk_buff *skb_in,
+static struct rtable *icmp_route_lookup(struct net *net,
+ struct flowi4 *fl4,
[..]
{
- struct flowi4 fl4 = {
- .daddr = (param->replyopts.opt.opt.srr ?
- param->replyopts.opt.opt.faddr : iph->saddr),
- .saddr = saddr,
- .flowi4_tos = RT_TOS(tos),
- .flowi4_proto = IPPROTO_ICMP,
- .fl4_icmp_type = type,
- .fl4_icmp_code = code,
- };
struct rtable *rt, *rt2;
int err;
[..]
- err = xfrm_decode_session_reverse(skb_in, flowi4_to_flowi(&fl4), AF_INET);
+ err = xfrm_decode_session_reverse(skb_in, flowi4_to_flowi(fl4), AF_INET);
if (err)
goto relookup_failed;
Problem is that xfrm_decode_session_reverse() may rebuild fl4 from scratch.
In my setup, "goto relookup_failed" will be hit a bit later on, and fl4->saddr will
be set to iph->daddr...
Thanks,
Florian
^ permalink raw reply
* Re: NIC driver r8168 with r8169 for RTL8111/8168B and DGE-528T together
From: Stephen Hemminger @ 2011-07-20 19:22 UTC (permalink / raw)
To: Danie Wessels; +Cc: netdev
In-Reply-To: <4E26B198.4020606@telkomsa.net>
On Wed, 20 Jul 2011 12:44:40 +0200
Danie Wessels <dawessels@telkomsa.net> wrote:
> I would like to use my onboard NIC (eth0) with its r8168 driver from
> RealTek together with my D-Link NIC (eth4=eth1) with its r8169 default
> driver from the install.
The kernel developers do not support the use of out of tree
vendor drivers. If there is some reason the default kernel driver does
not work for your hardware, that is a bug that should be reported and
it will get fixed.
^ permalink raw reply
* Re: [patch net-next-2.6 37/47] igb: do vlan cleanup
From: Jiri Pirko @ 2011-07-20 19:10 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=_0Ej09+KYbvEJz1+joYtms+S_67XSVVPMoG_hfJnmrBQ@mail.gmail.com>
Wed, Jul 20, 2011 at 07:35:33PM CEST, jesse@nicira.com wrote:
>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.
I'm certainly not confusing vlan accel and filtering. Here is the
intension is the behaviour remains intact as well. I believe it's true.
>
>> +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.
------------------------------------------------------------------------------
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 35/47] e1000: do vlan cleanup
From: Jiri Pirko @ 2011-07-20 19:08 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=-XJaq6KSwXXUzeFcqAo3WVWHCLyuqGYjcriRQiKO56bw@mail.gmail.com>
Wed, Jul 20, 2011 at 07:48:32PM CEST, jesse@nicira.com wrote:
>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.
The driver behaviour remains intact here.
------------------------------------------------------------------------------
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 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
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