* Re: [PATCH 2/3] wireless: ath9k: use %pM to print MAC
From: Mohammed Shafi @ 2011-07-20 15:00 UTC (permalink / raw)
To: Andy Shevchenko
Cc: netdev, linux-wireless, John W. Linville, linux-kernel,
ath9k-devel
In-Reply-To: <e9d4e9e2edf4c51412c141140d51e9baf9ff13a3.1311162926.git.andriy.shevchenko@linux.intel.com>
On Wed, Jul 20, 2011 at 7:04 PM, Andy Shevchenko
<andriy.shevchenko@linux.intel.com> wrote:
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> Cc: "Luis R. Rodriguez" <lrodriguez@atheros.com>
> Cc: ath9k-devel@lists.ath9k.org
> ---
> drivers/net/wireless/ath/ath9k/htc_drv_debug.c | 7 ++-----
> 1 files changed, 2 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_debug.c b/drivers/net/wireless/ath/ath9k/htc_drv_debug.c
> index aa48b3a..d3ff33c 100644
> --- a/drivers/net/wireless/ath/ath9k/htc_drv_debug.c
> +++ b/drivers/net/wireless/ath/ath9k/htc_drv_debug.c
> @@ -623,11 +623,8 @@ static ssize_t read_file_base_eeprom(struct file *file, char __user *user_buf,
> pBase9287->openLoopPwrCntl);
> }
>
> - len += snprintf(buf + len, size - len,
> - "%20s : %02X:%02X:%02X:%02X:%02X:%02X\n",
> - "MacAddress",
> - pBase->macAddr[0], pBase->macAddr[1], pBase->macAddr[2],
> - pBase->macAddr[3], pBase->macAddr[4], pBase->macAddr[5]);
> + len += snprintf(buf + len, size - len, "%20s : %pM\n", "MacAddress",
> + pBase->macAddr);
> if (len > size)
> len = size;
thanks for the patch!
>
> --
> 1.7.5.4
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
--
shafi
^ permalink raw reply
* Re: [patch net-next-2.6 01/47] gianfar: rx parser
From: Jiri Pirko @ 2011-07-20 15:01 UTC (permalink / raw)
To: netdev; +Cc: davem
In-Reply-To: <1311173689-17419-2-git-send-email-jpirko@redhat.com>
Ugh this was already applied on net-2.6. Dave please sync and ignore
this. Sorry.
Thanks.
Jirka
Wed, Jul 20, 2011 at 04:54:03PM CEST, jpirko@redhat.com wrote:
>Only let the rx parser be enabled if it is necessary (if VLAN extraction,
>IP or TCP checksumming or the rx queue filer are enabled). Otherwise
>disable it.
>
>The new routine gfar_check_rx_parser_mode should be run after every
>change on this features and will enable/disable the parser as necessary.
>
>Signed-off-by: Jiri Pirko <jpirko@redhat.com>
>Signed-off-by: Sebastian Poehn <sebastian.poehn@belden.com>
>---
> drivers/net/gianfar.c | 24 +++++++++++++++++++-----
> drivers/net/gianfar.h | 3 ++-
> 2 files changed, 21 insertions(+), 6 deletions(-)
>
>diff --git a/drivers/net/gianfar.c b/drivers/net/gianfar.c
>index 3321d71..d265c6e 100644
>--- a/drivers/net/gianfar.c
>+++ b/drivers/net/gianfar.c
>@@ -2287,6 +2287,23 @@ static int gfar_set_mac_address(struct net_device *dev)
> return 0;
> }
>
>+/* Check if rx parser should be activated */
>+void gfar_check_rx_parser_mode(struct gfar_private *priv)
>+{
>+ struct gfar __iomem *regs;
>+ u32 tempval;
>+
>+ regs = priv->gfargrp[0].regs;
>+
>+ tempval = gfar_read(®s->rctrl);
>+ /* If parse is no longer required, then disable parser */
>+ if (tempval & RCTRL_REQ_PARSER)
>+ tempval |= RCTRL_PRSDEP_INIT;
>+ else
>+ tempval &= ~RCTRL_PRSDEP_INIT;
>+ gfar_write(®s->rctrl, tempval);
>+}
>+
>
> /* Enables and disables VLAN insertion/extraction */
> static void gfar_vlan_rx_register(struct net_device *dev,
>@@ -2323,12 +2340,9 @@ static void gfar_vlan_rx_register(struct net_device *dev,
> /* Disable VLAN tag extraction */
> tempval = gfar_read(®s->rctrl);
> tempval &= ~RCTRL_VLEX;
>- /* If parse is no longer required, then disable parser */
>- if (tempval & RCTRL_REQ_PARSER)
>- tempval |= RCTRL_PRSDEP_INIT;
>- else
>- tempval &= ~RCTRL_PRSDEP_INIT;
> gfar_write(®s->rctrl, tempval);
>+
>+ gfar_check_rx_parser_mode(priv);
> }
>
> gfar_change_mtu(dev, dev->mtu);
>diff --git a/drivers/net/gianfar.h b/drivers/net/gianfar.h
>index 27499c6..87c1d86 100644
>--- a/drivers/net/gianfar.h
>+++ b/drivers/net/gianfar.h
>@@ -286,7 +286,7 @@ extern const char gfar_driver_version[];
> #define RCTRL_PROM 0x00000008
> #define RCTRL_EMEN 0x00000002
> #define RCTRL_REQ_PARSER (RCTRL_VLEX | RCTRL_IPCSEN | \
>- RCTRL_TUCSEN)
>+ RCTRL_TUCSEN | RCTRL_FILREN)
> #define RCTRL_CHECKSUMMING (RCTRL_IPCSEN | RCTRL_TUCSEN | \
> RCTRL_PRSDEP_INIT)
> #define RCTRL_EXTHASH (RCTRL_GHTX)
>@@ -1182,6 +1182,7 @@ extern void gfar_configure_coalescing(struct gfar_private *priv,
> unsigned long tx_mask, unsigned long rx_mask);
> void gfar_init_sysfs(struct net_device *dev);
> int gfar_set_features(struct net_device *dev, u32 features);
>+extern void gfar_check_rx_parser_mode(struct gfar_private *priv);
>
> extern const struct ethtool_ops gfar_ethtool_ops;
>
>--
>1.7.6
>
^ permalink raw reply
* [PATCH] iproute2: Remove "monitor" from "ip route help" output
From: Andreas Henriksson @ 2011-07-20 15:08 UTC (permalink / raw)
To: shemminger; +Cc: netdev, martin f krafft, 537681
$ ip route help 2>&1 | grep monitor
ip route { add | del | change | append | replace | monitor } ROUTE
$ ip route monitor
Command "monitor" is unknown, try "ip route help".
(I guess what was really intended is "ip monitor route", so just remove
the argument from the help output.)
Originally reported by martin f krafft at http://bugs.debian.org/537681
While at it, also drop all non-existant (route,link,netns) monitor
arguments from the ip(8) man page.
Signed-off-by: Andreas Henriksson <andreas@fatal.se>
diff --git a/ip/iproute.c b/ip/iproute.c
index ca09029..21e1a4b 100644
--- a/ip/iproute.c
+++ b/ip/iproute.c
@@ -63,7 +63,7 @@ static void usage(void)
fprintf(stderr, " ip route get ADDRESS [ from ADDRESS iif STRING ]\n");
fprintf(stderr, " [ oif STRING ] [ tos TOS ]\n");
fprintf(stderr, " [ mark NUMBER ]\n");
- fprintf(stderr, " ip route { add | del | change | append | replace | monitor } ROUTE\n");
+ fprintf(stderr, " ip route { add | del | change | append | replace } ROUTE\n");
fprintf(stderr, "SELECTOR := [ root PREFIX ] [ match PREFIX ] [ exact PREFIX ]\n");
fprintf(stderr, " [ table TABLE_ID ] [ proto RTPROTO ]\n");
fprintf(stderr, " [ type TYPE ] [ scope SCOPE ]\n");
diff --git a/man/man8/ip.8 b/man/man8/ip.8
index 8d2ab87..26cb17f 100644
--- a/man/man8/ip.8
+++ b/man/man8/ip.8
@@ -14,7 +14,7 @@ ip \- show / manipulate routing, devices, policy routing and tunnels
.ti -8
.IR OBJECT " := { "
.BR link " | " addr " | " addrlabel " | " route " | " rule " | " neigh " | "\
- tunnel " | " maddr " | " mroute " | " monitor " }"
+ tunnel " | " maddr " | " mroute " }"
.sp
.ti -8
@@ -165,7 +165,7 @@ tentative " | " deprecated " | " dadfailed " | " temporary " ]"
.BR "ip addrlabel" " { " list " | " flush " }"
.ti -8
-.BR "ip netns" " { " list " | " monitor " } "
+.BR "ip netns" " { " list " } "
.ti -8
.BR "ip netns" " { " add " | " delete " } "
@@ -198,7 +198,7 @@ tentative " | " deprecated " | " dadfailed " | " temporary " ]"
.ti -8
.BR "ip route" " { " add " | " del " | " change " | " append " | "\
-replace " | " monitor " } "
+replace " } "
.I ROUTE
.ti -8
@@ -2547,7 +2547,6 @@ bind mounting all of the per network namespace configure files into
their traditional location in /etc.
.SS ip netns list - show all of the named network namespaces
-.SS ip netns monitor - report when network namespace names are created and destroyed
.SS ip netns add NAME - create a new named network namespace
.SS ip netns delete NAME - delete the name of a network namespace
.SS ip netns exec NAME cmd ... - Run cmd in the named network namespace
^ permalink raw reply related
* RE: [PATCH] pktgen: Clone skb to avoid corruption of skbs in ndo_start_xmit methods
From: Loke, Chetan @ 2011-07-20 15:17 UTC (permalink / raw)
To: Eric Dumazet, Neil Horman
Cc: Ben Greear, Jiri Pirko, netdev, Alexey Dobriyan, David S. Miller
In-Reply-To: <1311135855.3113.66.camel@edumazet-laptop>
> So when I said "remove pktgen" from distro it was not a joke.
> Maybe its time to admit pktgen has to be removed from kernel sources.
>
Please, let's not remove pktgen from kernel sources. We can add a CONFIG_PKTGEN as someone mentioned in the email thread.
> $ wc net/core/pktgen.c
> 3788 10881 92771 net/core/pktgen.c
>
> Hmmm, 3788 lines, patched 180 times for a thing that only sends UDP
> frames...
It really doesn't matter what traffic it sends. As long as I can get some high speed throughput I am good.
There are quite a few use-cases where one doesn't really need to know the traffic profile.
^ permalink raw reply
* Re: [PATCH] Fix panic in virtnet_remove
From: Stephen Hemminger @ 2011-07-20 15:17 UTC (permalink / raw)
To: Krishna Kumar; +Cc: mst, netdev, davem
In-Reply-To: <20110720074339.7842.72593.sendpatchset@krkumar2.in.ibm.com>
On Wed, 20 Jul 2011 13:13:39 +0530
Krishna Kumar <krkumar2@in.ibm.com> wrote:
> Fix a panic in virtnet_remove. unregister_netdev has already
> freed up the netdev (and virtnet_info) due to dev->destructor
> being set, while virtnet_info is still required. Remove
> virtnet_free altogether, and move the freeing of the per-cpu
> statistics from virtnet_free to virtnet_remove.
>
> Tested patch below.
>
> Signed-off-by: Krishna Kumar <krkumar2@in.ibm.com>
Need to check veth and xen for same problem.
Acked-by: Stephen Hemminger <shemminger@vyatta.com>
^ permalink raw reply
* Re: [PATCH] pktgen: Clone skb to avoid corruption of skbs in ndo_start_xmit methods
From: Neil Horman @ 2011-07-20 15:18 UTC (permalink / raw)
To: Eric Dumazet
Cc: Ben Greear, Jiri Pirko, netdev, Alexey Dobriyan, David S. Miller,
robert.olsson
In-Reply-To: <1311135855.3113.66.camel@edumazet-laptop>
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;
^ permalink raw reply related
* RE: [PATCH] pktgen: Clone skb to avoid corruption of skbs in ndo_start_xmit methods
From: Loke, Chetan @ 2011-07-20 15:23 UTC (permalink / raw)
To: Rick Jones, Neil Horman
Cc: Eric Dumazet, Jiri Pirko, netdev, Alexey Dobriyan,
David S. Miller
In-Reply-To: <4E26205C.1040106@hp.com>
> -----Original Message-----
> From: netdev-owner@vger.kernel.org [mailto:netdev-
> owner@vger.kernel.org] On Behalf Of Rick Jones
> Sent: July 19, 2011 8:25 PM
> To: Neil Horman
> Cc: Eric Dumazet; Jiri Pirko; netdev@vger.kernel.org; Alexey Dobriyan;
> David S. Miller
> Subject: Re: [PATCH] pktgen: Clone skb to avoid corruption of skbs in
> ndo_start_xmit methods
>
> How "everyday use" is pktgen considered? As "everyday use" as
> netperf/iperf/whatnot? Is it actually considered something one would
> run
> on production rather than test systems?
>
Totally agree. There are quite a few ways to send traffic from
user-space. Build a pcap file and then blast it from user-space. No sane
sysadmin would use pktgen on production systems to begin with.
^ permalink raw reply
* Re: [PATCH] pktgen: Clone skb to avoid corruption of skbs in ndo_start_xmit methods
From: Eric Dumazet @ 2011-07-20 15:30 UTC (permalink / raw)
To: Neil Horman
Cc: Ben Greear, Jiri Pirko, netdev, Alexey Dobriyan, David S. Miller,
robert.olsson
In-Reply-To: <20110720151827.GD12349@hmsreliant.think-freely.org>
Le mercredi 20 juillet 2011 à 11:18 -0400, Neil Horman a écrit :
> 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;
> +
Well, the general idea was to intercept the "clone_skb XXX" command and
cap XXX to 0 for said devices.
So some admin can still use pktgen without clone_skb stuff.
^ permalink raw reply
* Re: [PATCH] pktgen: Clone skb to avoid corruption of skbs in ndo_start_xmit methods
From: Michał Mirosław @ 2011-07-20 15:35 UTC (permalink / raw)
To: Neil Horman
Cc: Eric Dumazet, Ben Greear, Jiri Pirko, netdev, Alexey Dobriyan,
David S. Miller, robert.olsson
In-Reply-To: <20110720151827.GD12349@hmsreliant.think-freely.org>
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.
Best Regards,
Michał Mirosław
^ permalink raw reply
* Re: [RFC] iproute2, ifindex option
From: Stephen Hemminger @ 2011-07-20 15:37 UTC (permalink / raw)
To: Denys Fedoryshchenko; +Cc: netdev
In-Reply-To: <f91760b4ff170e4bdbd46f40822dd95e@visp.net.lb>
On Mon, 18 Jul 2011 11:38:33 +0300
Denys Fedoryshchenko <denys@visp.net.lb> wrote:
> After battling with iproute2 interface name caching, i decided to try
> to introduce ifindex option, where i can specify manually device index,
> and avoid expensive device index lookups, especially during massive
> changes for qdisc/class.
> In batch mode ll_map cache will cause problems on servers with ppp
> interfaces (same name after while can have another index), and also if i
> run command too often, each start it will retrieve list of all
> interfaces, on 3k+ interfaces it will be CPU hog.
>
> This is sample of patch, just for qdisc/class/filter modify and show
> operation.
>
> Here is some changes in logic, because before qdisc code during _list
> operation was not checking duplicate "dev" argument, as it done in
> _modify code and class/filter list code.
>
> Also maybe i need to change duparg to something else? Because:
> centaur iproute2-newifindex # tc/tc -s -d filter show ifindex 23 dev
> sdf
> Error: duplicate "ifindex": "sdf" is the second value.
> Or it is ok like this?
>
> I'm sorry that patch is not inline, seems my webmail can't do it now, i
> will try to install normal mail client.
If caching is a problem, I would rather just get rid of the cache altogether.
There are a number of other places where it is a problem as well.
^ permalink raw reply
* Re: [PATCH] pktgen: Clone skb to avoid corruption of skbs in ndo_start_xmit methods
From: Neil Horman @ 2011-07-20 15:39 UTC (permalink / raw)
To: Eric Dumazet
Cc: Ben Greear, Jiri Pirko, netdev, Alexey Dobriyan, David S. Miller,
robert.olsson
In-Reply-To: <1311175817.2338.44.camel@edumazet-HP-Compaq-6005-Pro-SFF-PC>
On Wed, Jul 20, 2011 at 05:30:17PM +0200, Eric Dumazet wrote:
> Le mercredi 20 juillet 2011 à 11:18 -0400, Neil Horman a écrit :
> > 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;
> > +
>
> Well, the general idea was to intercept the "clone_skb XXX" command and
> cap XXX to 0 for said devices.
>
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.
> So some admin can still use pktgen without clone_skb stuff.
>
Yes. this doesn't preclude that unless you see something I dont
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 15:40 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: <CAHXqBFKD1bD8uMYOwbhsutT0ZuEiw=7pUDM1hVGpCgrdnV6zAg@mail.gmail.com>
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?
Neil
> Best Regards,
> Michał Mirosław
>
^ permalink raw reply
* Re: [PATCH net-next]vhost: fix condition check for # of outstanding dma buffers
From: Shirley Ma @ 2011-07-20 15:43 UTC (permalink / raw)
To: Michael S. Tsirkin; +Cc: David Miller, netdev, jasowang
In-Reply-To: <20110720102831.GA5164@redhat.com>
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.
> 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: [PATCH] pktgen: Clone skb to avoid corruption of skbs in ndo_start_xmit methods
From: Eric Dumazet @ 2011-07-20 15:44 UTC (permalink / raw)
To: Neil Horman
Cc: Ben Greear, Jiri Pirko, netdev, Alexey Dobriyan, David S. Miller,
robert.olsson
In-Reply-To: <20110720153958.GE12349@hmsreliant.think-freely.org>
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 ;)
^ permalink raw reply
* Re: [patch net-next-2.6 04/47] nes: do vlan cleanup
From: Michał Mirosław @ 2011-07-20 15:45 UTC (permalink / raw)
To: Jiri Pirko; +Cc: netdev, davem, shemminger, eric.dumazet, greearb, faisal.latif
In-Reply-To: <1311173689-17419-5-git-send-email-jpirko@redhat.com>
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.
Best Regards,
Michał Mirosław
^ permalink raw reply
* Re: [PATCH 1/3] wireless: rtlwifi: throw away MAC_FMT and use %pM instead
From: Larry Finger @ 2011-07-20 15:47 UTC (permalink / raw)
To: Andy Shevchenko; +Cc: linux-wireless, netdev, John W. Linville, linux-kernel
In-Reply-To: <fddeabc04a1b81a5c1f51a4164d93366dccf5f8e.1311162926.git.andriy.shevchenko@linux.intel.com>
On 07/20/2011 08:34 AM, Andy Shevchenko wrote:
> Signed-off-by: Andy Shevchenko<andriy.shevchenko@linux.intel.com>
> Cc: Larry Finger<Larry.Finger@lwfinger.net>
> ---
> drivers/net/wireless/rtlwifi/base.c | 11 +++++------
> drivers/net/wireless/rtlwifi/cam.c | 4 ++--
> drivers/net/wireless/rtlwifi/core.c | 6 +++---
> drivers/net/wireless/rtlwifi/debug.h | 5 -----
> drivers/net/wireless/rtlwifi/rtl8192ce/hw.c | 2 +-
> drivers/net/wireless/rtlwifi/rtl8192de/hw.c | 2 +-
> drivers/net/wireless/rtlwifi/rtl8192se/hw.c | 2 +-
> 7 files changed, 13 insertions(+), 19 deletions(-)
ACK. Thanks for the patch.
Larry
^ permalink raw reply
* [PATCH] rtlwifi: Convert printks to pr_<level>
From: Joe Perches @ 2011-07-20 15:51 UTC (permalink / raw)
To: Larry Finger, Chaoming Li
Cc: John W. Linville, linux-wireless, netdev, linux-kernel
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;
}
--
1.7.6.131.g99019
^ permalink raw reply related
* Re: [RFC] iproute2, ifindex option
From: Denys Fedoryshchenko @ 2011-07-20 15:54 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: netdev
In-Reply-To: <20110720083753.2b8de970@nehalam.ftrdhcpuser.net>
On Wed, 20 Jul 2011 08:37:53 -0700, Stephen Hemminger wrote:
>
> If caching is a problem, I would rather just get rid of the cache
> altogether.
> There are a number of other places where it is a problem as well.
It is good, but it must be controlled. Also people put some efforts to
improve it...
Before i did custom patch to "trash" the cache, but after cache
improved i should rewrite it. If required, i can make cache behavior
changeable (on,off,flush ?).
Will it help for you too?
I think ifindex is good anyway, because sometimes it is better to refer
to specific ppp interface by ifindex.
---
System administrator
Denys Fedoryshchenko
Virtual ISP S.A.L.
^ permalink raw reply
* [PATCH] ASIX: Add AX88772B USB ID
From: Marek Vasut @ 2011-07-20 15:57 UTC (permalink / raw)
To: linux-kernel; +Cc: netdev, linux-usb, gregkh, Marek Vasut
This device can be found in Acer Iconia TAB W500 tablet dock.
Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
---
drivers/net/usb/asix.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/drivers/net/usb/asix.c b/drivers/net/usb/asix.c
index 6998aa6..5250288 100644
--- a/drivers/net/usb/asix.c
+++ b/drivers/net/usb/asix.c
@@ -1502,6 +1502,10 @@ static const struct usb_device_id products [] = {
USB_DEVICE (0x04f1, 0x3008),
.driver_info = (unsigned long) &ax8817x_info,
}, {
+ // ASIX AX88772B 10/100
+ USB_DEVICE (0x0b95, 0x772b),
+ .driver_info = (unsigned long) &ax88772_info,
+}, {
// ASIX AX88772 10/100
USB_DEVICE (0x0b95, 0x7720),
.driver_info = (unsigned long) &ax88772_info,
--
1.7.5.3
^ permalink raw reply related
* Re: [RFC] iproute2, ifindex option
From: Stephen Hemminger @ 2011-07-20 15:58 UTC (permalink / raw)
To: Denys Fedoryshchenko; +Cc: netdev
In-Reply-To: <8dcbf9cb55d19da1e7f849d11d8eb216@visp.net.lb>
On Wed, 20 Jul 2011 18:54:44 +0300
Denys Fedoryshchenko <denys@visp.net.lb> wrote:
> On Wed, 20 Jul 2011 08:37:53 -0700, Stephen Hemminger wrote:
> >
> > If caching is a problem, I would rather just get rid of the cache
> > altogether.
> > There are a number of other places where it is a problem as well.
> It is good, but it must be controlled. Also people put some efforts to
> improve it...
> Before i did custom patch to "trash" the cache, but after cache
> improved i should rewrite it. If required, i can make cache behavior
> changeable (on,off,flush ?).
> Will it help for you too?
>
> I think ifindex is good anyway, because sometimes it is better to refer
> to specific ppp interface by ifindex.
The problem is that it is not possible to make a "safe" cache since
it is possible for network device names to be changed at any time.
^ permalink raw reply
* Re: [patch net-next-2.6 04/47] nes: do vlan cleanup
From: Michał Mirosław @ 2011-07-20 16:01 UTC (permalink / raw)
To: Jiri Pirko; +Cc: netdev, davem, shemminger, eric.dumazet, greearb, faisal.latif
In-Reply-To: <CAHXqBFK6u1JqGjC3Wh8Bn7Y0VjsMOf8WL7eHadLRJafNLX0HXw@mail.gmail.com>
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.
Best Regards,
Michał Mirosław
^ permalink raw reply
* Re: [PATCH 1/3] wireless: rtlwifi: throw away MAC_FMT and use %pM instead
From: Joe Perches @ 2011-07-20 16:02 UTC (permalink / raw)
To: Larry Finger
Cc: Andy Shevchenko, linux-wireless, netdev, John W. Linville,
linux-kernel
In-Reply-To: <4E26F879.8010601@lwfinger.net>
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.
^ permalink raw reply
* Re: [PATCH] pktgen: Clone skb to avoid corruption of skbs in ndo_start_xmit methods
From: Michał Mirosław @ 2011-07-20 16:08 UTC (permalink / raw)
To: Neil Horman
Cc: Eric Dumazet, Ben Greear, Jiri Pirko, netdev, Alexey Dobriyan,
David S. Miller, robert.olsson
In-Reply-To: <20110720154057.GF12349@hmsreliant.think-freely.org>
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.
Best Regards,
Michał Mirosław
^ permalink raw reply
* Re: [RFC] iproute2, ifindex option
From: Denys Fedoryshchenko @ 2011-07-20 16:12 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: netdev
In-Reply-To: <20110720085842.03dd411c@nehalam.ftrdhcpuser.net>
On Wed, 20 Jul 2011 08:58:42 -0700, Stephen Hemminger wrote:
> On Wed, 20 Jul 2011 18:54:44 +0300
> Denys Fedoryshchenko <denys@visp.net.lb> wrote:
>
>> On Wed, 20 Jul 2011 08:37:53 -0700, Stephen Hemminger wrote:
>> >
>> > If caching is a problem, I would rather just get rid of the cache
>> > altogether.
>> > There are a number of other places where it is a problem as well.
>> It is good, but it must be controlled. Also people put some efforts
>> to
>> improve it...
>> Before i did custom patch to "trash" the cache, but after cache
>> improved i should rewrite it. If required, i can make cache
>> behavior
>> changeable (on,off,flush ?).
>> Will it help for you too?
>>
>> I think ifindex is good anyway, because sometimes it is better to
>> refer
>> to specific ppp interface by ifindex.
>
> The problem is that it is not possible to make a "safe" cache since
> it is possible for network device names to be changed at any time.
Maybe then by removing cache, but using ifindex option, and maybe even
adding in output additional ifindex field (for show commands), we can
leave user to implement his own caching?
Another thing, on tc -s -d qdisc show, if there is many interfaces,
without cache on each line ll_index_to_name() it will be CPU and netlink
hog to retrieve all interface names again and again, especially if there
is too many intefaces.
---
System administrator
Denys Fedoryshchenko
Virtual ISP S.A.L.
^ 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