Netdev List
 help / color / mirror / Atom feed
* Re: pull request: wireless 2013-01-09
From: Sedat Dilek @ 2013-01-10 10:14 UTC (permalink / raw)
  To: John W. Linville; +Cc: davem, linux-wireless, netdev, linux-kernel
In-Reply-To: <20130109191817.GA17321@tuxdriver.com>

On Wed, Jan 9, 2013 at 8:18 PM, John W. Linville <linville@tuxdriver.com> wrote:
> Dave,
>
> Please pull this batch of fixes (and a new driver) for the 3.8 stream...
>
> Included is a mac80211 pull, of which Johannes says the following:
>
> 'This includes a number of fixes for various pieces of mac80211. I've
> also included Thomas's memory RMC hash table optimisation since it
> saves so much memory.'
>
> Also from Johannes is an iwlwifi pull:
>
> 'I have two fixes for iwlwifi: one to fix a lost return value that was
> dropped in a previous patch and could cause "nobody cared" IRQ messages,
> and one to work around a firmware issue.'
>
> Amitkumar Karwar brings an mwifiex for a typo in an comparison.
>
> Bing Zhao gives us an mwifiex fix to properly check the return value
> from wait_event_interruptible and handle it properly.
>
> Chen Gang provides a fix to make iwlegacy use strlcpy instead of
> strncpy, avoiding a potential buffer underflow.
>
> Julian Wollrath fixes a typo in an error message in rtlwifi.
>
> Larry Finger brings a b43 fix for a firmware loading problem.
>
> Nickolai Zeldovich avoids a use-after-free in the mwl8k driver.
>
> Vladimir Kondratiev brings the last big piece, the new Qualcomm/Atheros
> wil6210 802.11ad driver.  Since it is for new hardware, I hope that
> taking it for 3.8 is not a problem.
>
> Please let me know if there are problems!
>
> Thanks,
>
> John
>
> ---
>
> The following changes since commit c9be4a5c49cf51cc70a993f004c5bb30067a65ce:
>
>   net: prevent setting ttl=0 via IP_TTL (2013-01-08 17:57:10 -0800)
>
> are available in the git repository at:
>
>   git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless.git for-davem
>
> for you to fetch changes up to a9b8a894ad7d0b90b0464c9ac7e8e5c1687edcae:
>
>   Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless into for-davem (2013-01-09 11:01:37 -0500)
>
> ----------------------------------------------------------------

Hi John,

if I look at for-davem GIT branch (online GitWeb interface) [1], this
has no tag "master-2013-01-09" like in master branch.
Comments?

Regards,
- Sedat -

[1] http://git.kernel.org/?p=linux/kernel/git/linville/wireless-next.git;a=shortlog;h=refs/heads/for-davem

^ permalink raw reply

* Re: [PATCH v2] net: set default_ethtool_ops in register_netdevice
From: David Miller @ 2013-01-10 10:12 UTC (permalink / raw)
  To: sgruszka-H+wXaHxf7aLQT0dZR+AlfA
  Cc: netdev-u79uwXL29TY76Z2rM5mHXA, edumazet-hpIqsD4AKlfQT0dZR+AlfA,
	greearb-my8/4N5VtI7c+919tysfdA, bjorn-yOkvZcmFvRU,
	linux-wireless-u79uwXL29TY76Z2rM5mHXA,
	bhutchings-s/n/eUQHGBpZroRs9YW3xA, mirqus-Re5JQEeQqe8AvxtiuMwx3w
In-Reply-To: <20130110.020729.1358020934840866117.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>

From: David Miller <davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
Date: Thu, 10 Jan 2013 02:07:29 -0800 (PST)

> From: Stanislaw Gruszka <sgruszka-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
> Date: Thu, 10 Jan 2013 09:36:42 +0100
> 
>> On Wed, Jan 09, 2013 at 11:57:38PM -0800, David Miller wrote:
>>> From: Stanislaw Gruszka <sgruszka-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
>>> Date: Tue, 8 Jan 2013 16:38:51 +0100
>>> 
>>> > Since:
>>> > 
>>> > commit 2c60db037034d27f8c636403355d52872da92f81
>>> > Author: Eric Dumazet <edumazet-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
>>> > Date:   Sun Sep 16 09:17:26 2012 +0000
>>> > 
>>> >     net: provide a default dev->ethtool_ops
>>> > 
>>> > wireless core does not correctly assign ethtool_ops. In order to fix
>>> > the problem, move assignement of default_ethtool_ops to
>>> > register_netdevice(). This is safe because both register_netdevice()
>>> > and dev_ethtool() are protected by RTNL lock.
>>> > 
>>> > Patch is besed on hint of Michał Mirosław.
>>> > 
>>> > Signed-off-by: Stanislaw Gruszka <sgruszka-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
>>> > Cc: stable-u79uwXL29TY76Z2rM5mHXA@public.gmane.org # 3.7+
>>> > ---
>>> > v1 -> v2: change order of default_ethtool_ops initialization to avoid
>>> > the problem. Change the subject accordingly.
>>> 
>>> I don't understand this.  Why is the assignment of default_ethtool_ops
>>> at netdev allocation time not working?  Is wireless really not using
>>> alloc_netdev*()?
>> 
>> It does. This is done on individual cfg80211 drivers , i.e. on mac80211
>> or full mac drivers. After alloc_netdev*() call, some cfg80211 drivers
>> provide they own ethtool_ops, but some do not. For them, wireless core
>> provide generic cfg80211_ethtool_ops, which is assigned in
>> NETDEV_REGISTER notify call: 
>> 
>> 	if (!dev->ethtool_ops)
>> 		dev->ethtool_ops = &cfg80211_ethtool_ops;
>> 
>> But after Eric's commit, dev->ethtool_ops is no longer NULL (on cfg80211
>> drivers without custom ethtool_ops), but points to &default_ethtool_ops.
> 
> The whole idea is to remove these kinds of NULL tests against
> dev->ethtool_ops, thus creating the invariant that given any netdev
> one must never be able to see a non-NULL value there.

Of course I meant that we should never see a NULL value in
dev->ethtool_ops.

I would suggest fixing this by making the wireless core express it's
intentions, that it wants to use a different default ethtool ops, to
the netdev allocation layer.

You have two way to do this:

1) Add default_ethtool_ops argument to alloc_netdev*().

2) Add a "netdev_set_default_ethtool_ops(netdev, ops)"

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply

* [PATCH] Fix phy_init for Marvell network eth driver
From: Kosta Zertsekel @ 2013-01-10 10:04 UTC (permalink / raw)
  To: netdev; +Cc: benavi, alior, linux-arm-kernel, andrew, Kosta Zertsekel
In-Reply-To: <1357812298-26399-1-git-send-email-konszert@marvell.com>

At least it fixes DNS323_REV_C1 board case (mach-orion5x/dsn323-setup.c file).

Change-Id: I37d64795f79c358f66a211a150cec2263e40e295
---
 drivers/net/ethernet/marvell/mv643xx_eth.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/marvell/mv643xx_eth.c b/drivers/net/ethernet/marvell/mv643xx_eth.c
index 84c1326..7b8c1ac 100644
--- a/drivers/net/ethernet/marvell/mv643xx_eth.c
+++ b/drivers/net/ethernet/marvell/mv643xx_eth.c
@@ -2789,7 +2789,7 @@ static void phy_init(struct mv643xx_eth_private *mp, int speed, int duplex)
 
 	phy_reset(mp);
 
-	phy_attach(mp->dev, dev_name(&phy->dev), 0, PHY_INTERFACE_MODE_GMII);
+	phy_attach(mp->dev, dev_name(&phy->dev), phy->dev_flags, PHY_INTERFACE_MODE_GMII);
 
 	if (speed == 0) {
 		phy->autoneg = AUTONEG_ENABLE;
-- 
1.8.1

^ permalink raw reply related

* Fix phy_init for Marvell network eth driver
From: Kosta Zertsekel @ 2013-01-10 10:04 UTC (permalink / raw)
  To: netdev; +Cc: benavi, alior, linux-arm-kernel, andrew

Hi all,

Please review and incorporate (if looks ok) small fix for Marvell mv643xx driver.

Thanks,
--- KostaZ

^ permalink raw reply

* Re: [PATCH v2] net: set default_ethtool_ops in register_netdevice
From: David Miller @ 2013-01-10 10:07 UTC (permalink / raw)
  To: sgruszka
  Cc: netdev, edumazet, greearb, bjorn, linux-wireless, bhutchings,
	mirqus
In-Reply-To: <20130110083641.GA5637@redhat.com>

From: Stanislaw Gruszka <sgruszka@redhat.com>
Date: Thu, 10 Jan 2013 09:36:42 +0100

> On Wed, Jan 09, 2013 at 11:57:38PM -0800, David Miller wrote:
>> From: Stanislaw Gruszka <sgruszka@redhat.com>
>> Date: Tue, 8 Jan 2013 16:38:51 +0100
>> 
>> > Since:
>> > 
>> > commit 2c60db037034d27f8c636403355d52872da92f81
>> > Author: Eric Dumazet <edumazet@google.com>
>> > Date:   Sun Sep 16 09:17:26 2012 +0000
>> > 
>> >     net: provide a default dev->ethtool_ops
>> > 
>> > wireless core does not correctly assign ethtool_ops. In order to fix
>> > the problem, move assignement of default_ethtool_ops to
>> > register_netdevice(). This is safe because both register_netdevice()
>> > and dev_ethtool() are protected by RTNL lock.
>> > 
>> > Patch is besed on hint of Michał Mirosław.
>> > 
>> > Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
>> > Cc: stable@vger.kernel.org # 3.7+
>> > ---
>> > v1 -> v2: change order of default_ethtool_ops initialization to avoid
>> > the problem. Change the subject accordingly.
>> 
>> I don't understand this.  Why is the assignment of default_ethtool_ops
>> at netdev allocation time not working?  Is wireless really not using
>> alloc_netdev*()?
> 
> It does. This is done on individual cfg80211 drivers , i.e. on mac80211
> or full mac drivers. After alloc_netdev*() call, some cfg80211 drivers
> provide they own ethtool_ops, but some do not. For them, wireless core
> provide generic cfg80211_ethtool_ops, which is assigned in
> NETDEV_REGISTER notify call: 
> 
> 	if (!dev->ethtool_ops)
> 		dev->ethtool_ops = &cfg80211_ethtool_ops;
> 
> But after Eric's commit, dev->ethtool_ops is no longer NULL (on cfg80211
> drivers without custom ethtool_ops), but points to &default_ethtool_ops.

The whole idea is to remove these kinds of NULL tests against
dev->ethtool_ops, thus creating the invariant that given any netdev
one must never be able to see a non-NULL value there.

^ permalink raw reply

* Re: recvmmsg() timeout behavior strangeness
From: Steven Whitehouse @ 2013-01-10 10:04 UTC (permalink / raw)
  To: Chris Friesen
  Cc: Michael Kerrisk, Arnaldo Carvalho de Melo, Caitlin Bestler,
	David Miller, netdev-u79uwXL29TY76Z2rM5mHXA, Chris Van Hoof,
	Clark Williams, Neil Horman, Arnaldo Carvalho de Melo,
	Andrew Grover, Elie De Brauwer, linux-man-u79uwXL29TY76Z2rM5mHXA,
	Rémi Denis-Courmont
In-Reply-To: <50EDF01E.10709-b7o/lNNmKxtBDgjK7y7TUQ@public.gmane.org>

Hi,

On Wed, 2013-01-09 at 16:33 -0600, Chris Friesen wrote:
> On 12/23/2012 02:50 PM, Michael Kerrisk wrote:
> 
> > If I understand correctly, the *intended* purpose of the timeout
> > argument is to set a limit on how long to wait for additional
> > datagrams after the arrival of an initial datagram. However, the
> > syscall behaves in quite a different way. Instead, it potentially
> > blocks forever, regardless of the timeout.
> 
> Looking at the code, I think you're correct.
> 
> The comments for a2e2725 say the timeout works like for ppoll(), where 
> it is "an upper limit on the time for which poll() will block, in 
> milliseconds."
> 
> I wonder if we could play some games with sk->sk_rcvtimeo to accomplish 
> this?
> 
> Chris

Which timeout are we talking about? I've been copied into the thread
without seeing the start of it.

If this is the rcvtimeo then afaik this is supposed to be the max time
that the call waits for data, but is overridden by MSG_DONTWAIT, for
example, on a per call basis. I'd assume that recvmmsg should work
exactly like recvmsg in this case unless there is a good reason for it
to differ,

Steve.


--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply

* Re: [PATCH 1/1] ipv6: fix the noflags test in addrconf_get_prefix_route
From: YOSHIFUJI Hideaki @ 2013-01-10 10:00 UTC (permalink / raw)
  To: Romain KUNTZ, davem@davemloft.net
  Cc: netdev@vger.kernel.org, linux-kernel, Andreas Hofmeister,
	YOSHIFUJI Hideaki
In-Reply-To: <470C14E4-2866-4C55-89A3-D6751E1587C4@ipflavors.com>

Romain KUNTZ wrote:
> From e7ece201c35615c44a3cfdc10ee28ad5a5878f41 Mon Sep 17 00:00:00 2001
> From: Romain Kuntz <r.kuntz@ipflavors.com>
> Date: Wed, 9 Jan 2013 15:02:26 +0100
> Subject: [PATCH 1/1] ipv6: fix the noflags test in addrconf_get_prefix_route
> 
> The tests on the flags in addrconf_get_prefix_route() does no make
> much sense: the 'noflags' parameter contains the set of flags that
> must not match with the route flags, so the test must be done
> against 'noflags', and not against 'flags'.
> 
> Signed-off-by: Romain Kuntz <r.kuntz@ipflavors.com>
> ---
>  net/ipv6/addrconf.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
> index 408cac4a..29ba4ff 100644
> --- a/net/ipv6/addrconf.c
> +++ b/net/ipv6/addrconf.c
> @@ -1877,7 +1877,7 @@ static struct rt6_info *addrconf_get_prefix_route(const struct in6_addr *pfx,
>  			continue;
>  		if ((rt->rt6i_flags & flags) != flags)
>  			continue;
> -		if ((noflags != 0) && ((rt->rt6i_flags & flags) != 0))
> +		if ((rt->rt6i_flags & noflags) != 0)
>  			continue;
>  		dst_hold(&rt->dst);
>  		break;
> 

Acked-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>

--yoshfuji

^ permalink raw reply

* RE: [patch] bnx2x: move debugging code before the return
From: Ariel Elior @ 2013-01-10  9:53 UTC (permalink / raw)
  To: Dan Carpenter, Eilon Greenstein
  Cc: netdev@vger.kernel.org, kernel-janitors@vger.kernel.org
In-Reply-To: <20130110085807.GB23063@elgon.mountain>

> -----Original Message-----
> From: netdev-owner@vger.kernel.org [mailto:netdev-
> owner@vger.kernel.org] On Behalf Of Dan Carpenter
> Sent: Thursday, January 10, 2013 10:58 AM
> To: Eilon Greenstein
> Cc: netdev@vger.kernel.org; kernel-janitors@vger.kernel.org
> Subject: [patch] bnx2x: move debugging code before the return
> 
> I move the return down a line after the debugging printk.
> 
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> 
> diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c
> b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c
> index 292634f..d7029c8 100644
> --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c
> +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c
> @@ -2768,10 +2768,10 @@ static int bnx2x_set_rss_flags(struct bnx2x *bp,
> struct ethtool_rxnfc *info)
>  		} else if ((info->flow_type == UDP_V6_FLOW) &&
>  			   (bp->rss_conf_obj.udp_rss_v6 !=
> udp_rss_requested)) {
>  			bp->rss_conf_obj.udp_rss_v6 = udp_rss_requested;
> -			return bnx2x_config_rss_pf(bp, &bp->rss_conf_obj,
> 0);
>  			DP(BNX2X_MSG_ETHTOOL,
>  			   "rss re-configured, UDP 4-tupple %s\n",
>  			   udp_rss_requested ? "enabled" : "disabled");
> +			return bnx2x_config_rss_pf(bp, &bp->rss_conf_obj,
> 0);
>  		} else {
>  			return 0;
>  		}
> --
> 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

Thanks Dan.
Acked-by: Ariel Elior <ariele@broadcom.com>

^ permalink raw reply

* Your mailbox has exceeded the storage limit of 2.GB
From: sistema di posta elettronica Web Admin @ 2013-01-10  9:32 UTC (permalink / raw)


Your mailbox has exceeded the storage limit of 2.GB
Set the administrator is currently  2.30GB, can not send or receive new messages until you re-validate your e-mail
Click the link below to validate your e-mail

https://docs.google.com/spreadsheet/viewform?formkey=dDliaWtndjNLT0o0VHRrZXhicWFBelE6MQ

thank you
system administrator

^ permalink raw reply

* Re: [PATCH 1/1] ipv6: use addrconf_get_prefix_route for prefix route lookup [v2] (was [PATCH 1/2] ipv6: avoid blackhole and prohibited entries upon prefix purge [v3])
From: YOSHIFUJI Hideaki @ 2013-01-10  9:44 UTC (permalink / raw)
  To: Romain KUNTZ, davem
  Cc: nicolas.dichtel, netdev@vger.kernel.org, Eric Dumazet,
	YOSHIFUJI Hideaki
In-Reply-To: <683E9BA1-C85B-43E0-AF98-397D50E302F6@ipflavors.com>

Romain KUNTZ wrote:

> From 203474c87f45da40b5c9d9e629164561307b4199 Mon Sep 17 00:00:00 2001
> From: Romain Kuntz <r.kuntz@ipflavors.com>
> Date: Thu, 10 Jan 2013 07:41:36 +0100
> Subject: [PATCH 1/1] ipv6: use addrconf_get_prefix_route for prefix route lookup [v2]
> 
> Replace ip6_route_lookup() with addrconf_get_prefix_route() when
> looking up for a prefix route. This ensures that the connected prefix
> is looked up in the main table, and avoids the selection of other
> matching routes located in different tables as well as blackhole
> or prohibited entries.
> 
> In addition, this fixes an Opps introduced by commit 64c6d08e (ipv6:
> del unreachable route when an addr is deleted on lo), that would occur
> when a blackhole or prohibited entry is selected by ip6_route_lookup().
> Such entries have a NULL rt6i_table argument, which is accessed by
> __ip6_del_rt() when trying to lock rt6i_table->tb6_lock.
> 
> The function addrconf_is_prefix_route() is not used anymore and is
> removed.
> 
> [v2] Minor indentation cleanup and log updates.
> 
> Signed-off-by: Romain Kuntz <r.kuntz@ipflavors.com>
> Acked-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
> ---
>  net/ipv6/addrconf.c |   25 +++++++++++--------------
>  1 files changed, 11 insertions(+), 14 deletions(-)
> 
> diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
> index 29ba4ff..ec3e065 100644
> --- a/net/ipv6/addrconf.c
> +++ b/net/ipv6/addrconf.c
> @@ -154,6 +154,11 @@ static void addrconf_type_change(struct net_device *dev,
>  				 unsigned long event);
>  static int addrconf_ifdown(struct net_device *dev, int how);
>  
> +static struct rt6_info *addrconf_get_prefix_route(const struct in6_addr *pfx,
> +						  int plen,
> +						  const struct net_device *dev,
> +						  u32 flags, u32 noflags);
> +
>  static void addrconf_dad_start(struct inet6_ifaddr *ifp);
>  static void addrconf_dad_timer(unsigned long data);
>  static void addrconf_dad_completed(struct inet6_ifaddr *ifp);
> @@ -250,12 +255,6 @@ static inline bool addrconf_qdisc_ok(const struct net_device *dev)
>  	return !qdisc_tx_is_noop(dev);
>  }
>  
> -/* Check if a route is valid prefix route */
> -static inline int addrconf_is_prefix_route(const struct rt6_info *rt)
> -{
> -	return (rt->rt6i_flags & (RTF_GATEWAY | RTF_DEFAULT)) == 0;
> -}
> -
>  static void addrconf_del_timer(struct inet6_ifaddr *ifp)
>  {
>  	if (del_timer(&ifp->timer))
> @@ -941,17 +940,15 @@ static void ipv6_del_addr(struct inet6_ifaddr *ifp)
>  	if ((ifp->flags & IFA_F_PERMANENT) && onlink < 1) {
>  		struct in6_addr prefix;
>  		struct rt6_info *rt;
> -		struct net *net = dev_net(ifp->idev->dev);
> -		struct flowi6 fl6 = {};
>  
>  		ipv6_addr_prefix(&prefix, &ifp->addr, ifp->prefix_len);
> -		fl6.flowi6_oif = ifp->idev->dev->ifindex;
> -		fl6.daddr = prefix;
> -		rt = (struct rt6_info *)ip6_route_lookup(net, &fl6,
> -							 RT6_LOOKUP_F_IFACE);
>  
> -		if (rt != net->ipv6.ip6_null_entry &&
> -		    addrconf_is_prefix_route(rt)) {
> +		rt = addrconf_get_prefix_route(&prefix,
> +					       ifp->prefix_len,
> +					       ifp->idev->dev,
> +					       0, RTF_GATEWAY | RTF_DEFAULT);
> +
> +		if (rt) {
>  			if (onlink == 0) {
>  				ip6_del_rt(rt);
>  				rt = NULL;
> 

Acked-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>

--yoshfuji

^ permalink raw reply

* Re: [PATCH V3 1/2] virtio-net: fix the set affinity bug when CPU IDs are not consecutive
From: Wanlong Gao @ 2013-01-10  9:26 UTC (permalink / raw)
  To: Rusty Russell, Eric Dumazet
  Cc: Michael S. Tsirkin, netdev, linux-kernel, virtualization
In-Reply-To: <87a9sh3lru.fsf@rustcorp.com.au>

On 01/10/2013 08:49 AM, Rusty Russell wrote:
> Wanlong Gao <gaowanlong@cn.fujitsu.com> writes:
>> On 01/09/2013 07:31 AM, Rusty Russell wrote:
>>> Wanlong Gao <gaowanlong@cn.fujitsu.com> writes:
>>>>   */
>>>>  static u16 virtnet_select_queue(struct net_device *dev, struct sk_buff *skb)
>>>>  {
>>>> -	int txq = skb_rx_queue_recorded(skb) ? skb_get_rx_queue(skb) :
>>>> -		  smp_processor_id();
>>>> +	int txq = 0;
>>>> +
>>>> +	if (skb_rx_queue_recorded(skb))
>>>> +		txq = skb_get_rx_queue(skb);
>>>> +	else if ((txq = per_cpu(vq_index, smp_processor_id())) == -1)
>>>> +		txq = 0;
>>>
>>> You should use __get_cpu_var() instead of smp_processor_id() here, ie:
>>>
>>>         else if ((txq = __get_cpu_var(vq_index)) == -1)
>>>
>>> And AFAICT, no reason to initialize txq to 0 to start with.
>>>
>>> So:
>>>
>>>         int txq;
>>>
>>>         if (skb_rx_queue_recorded(skb))
>>> 		txq = skb_get_rx_queue(skb);
>>>         else {
>>>                 txq = __get_cpu_var(vq_index);
>>>                 if (txq == -1)
>>>                         txq = 0;
>>>         }
>>
>> Got it, thank you.
>>
>>>
>>> Now, just to confirm, I assume this can happen even if we use vq_index,
>>> right, because of races with virtnet_set_channels?
>>
>> I still can't understand this race, could you explain more? thank you.
> 
> I assume that someone can call virtnet_set_channels() while we are
> inside virtnet_select_queue(), so they reduce dev->real_num_tx_queues,
> causing virtnet_set_channels to do:
> 
> 	while (unlikely(txq >= dev->real_num_tx_queues))
> 		txq -= dev->real_num_tx_queues;
> 
> Otherwise, when is this loop called?

How about just remove this loop? 

Eric, can you give a help here?

Thanks,
Wanlong Gao

> 
> Thanks,
> Rusty.
> 

^ permalink raw reply

* Re: [PATCH 3.8-rc] tuntap: refuse to re-attach to different tun_struct
From: Jason Wang @ 2013-01-10  9:25 UTC (permalink / raw)
  To: Stefan Hajnoczi; +Cc: David S. Miller, Michael S. Tsirkin, netdev, linux-kernel
In-Reply-To: <1357804788-19976-1-git-send-email-stefanha@redhat.com>

On Thursday, January 10, 2013 08:59:48 AM Stefan Hajnoczi wrote:
> Multiqueue tun devices support detaching a tun_file from its tun_struct
> and re-attaching at a later point in time.  This allows users to disable
> a specific queue temporarily.
> 
> ioctl(TUNSETIFF) allows the user to specify the network interface to
> attach by name.  This means the user can attempt to attach to interface
> "B" after detaching from interface "A".
> 
> The driver is not designed to support this so check we are re-attaching
> to the right tun_struct.  Failure to do so may lead to oops.
> 
> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
> ---
> This fix is for 3.8-rc.
> 
>  drivers/net/tun.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/net/tun.c b/drivers/net/tun.c
> index fbd106e..cf6da6e 100644
> --- a/drivers/net/tun.c
> +++ b/drivers/net/tun.c
> @@ -491,6 +491,8 @@ static int tun_attach(struct tun_struct *tun, struct
> file *file) err = -EINVAL;
>  	if (rcu_dereference_protected(tfile->tun, lockdep_rtnl_is_held()))
>  		goto out;
> +	if (tfile->detached && tun != tfile->detached)
> +		goto out;
> 
>  	err = -EBUSY;
>  	if (!(tun->flags & TUN_TAP_MQ) && tun->numqueues == 1)

Thanks.

Acked-by: Jason Wang <jasowang@redhat.com>

^ permalink raw reply

* Re: ppoll() stuck on POLLIN while TCP peer is sending
From: Eric Wong @ 2013-01-10  9:25 UTC (permalink / raw)
  To: Mel Gorman
  Cc: linux-mm, netdev, linux-kernel, Rik van Riel, Minchan Kim,
	Eric Dumazet, Andrew Morton, Linus Torvalds
In-Reply-To: <20130109133746.GD13304@suse.de>

Mel Gorman <mgorman@suse.de> wrote:
> page->pfmemalloc can be left set for captured pages so try this but as
> capture is rarely used I'm strongly favouring a partial revert even if
> this works for you. I haven't reproduced this using your workload yet
> but I have found that high-order allocation stress tests for 3.8-rc2 are
> completely screwed. 71% success rates at rest in 3.7 and 6% in 3.8-rc2 so
> I have to chase that down too.
> 
> diff --git a/mm/page_alloc.c b/mm/page_alloc.c
> index 9d20c13..c242d21 100644
> --- a/mm/page_alloc.c
> +++ b/mm/page_alloc.c
> @@ -2180,8 +2180,10 @@ __alloc_pages_direct_compact(gfp_t gfp_mask, unsigned int order,
>  	current->flags &= ~PF_MEMALLOC;
>  
>  	/* If compaction captured a page, prep and use it */
> -	if (page && !prep_new_page(page, order, gfp_mask))
> +	if (page && !prep_new_page(page, order, gfp_mask)) {
> +		page->pfmemalloc = false;
>  		goto got_page;
> +	}
>  
>  	if (*did_some_progress != COMPACT_SKIPPED) {
>  		/* Page migration frees to the PCP lists but we want merging */

This (on top of your previous patch) seems to work great after several
hours of testing on both my VM and real machine.  I haven't tried your
partial revert, yet.  Will try that in a bit on the VM.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply

* [patch] bnx2x: move debugging code before the return
From: Dan Carpenter @ 2013-01-10  8:58 UTC (permalink / raw)
  To: Eilon Greenstein; +Cc: netdev, kernel-janitors

I move the return down a line after the debugging printk.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c
index 292634f..d7029c8 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c
@@ -2768,10 +2768,10 @@ static int bnx2x_set_rss_flags(struct bnx2x *bp, struct ethtool_rxnfc *info)
 		} else if ((info->flow_type == UDP_V6_FLOW) &&
 			   (bp->rss_conf_obj.udp_rss_v6 != udp_rss_requested)) {
 			bp->rss_conf_obj.udp_rss_v6 = udp_rss_requested;
-			return bnx2x_config_rss_pf(bp, &bp->rss_conf_obj, 0);
 			DP(BNX2X_MSG_ETHTOOL,
 			   "rss re-configured, UDP 4-tupple %s\n",
 			   udp_rss_requested ? "enabled" : "disabled");
+			return bnx2x_config_rss_pf(bp, &bp->rss_conf_obj, 0);
 		} else {
 			return 0;
 		}

^ permalink raw reply related

* Re: [PATCH] drivers/net/wireless/iwlegacy: use strlcpy instead of strncpy
From: Chen Gang F T @ 2013-01-10  8:48 UTC (permalink / raw)
  To: Stanislaw Gruszka; +Cc: Chen Gang, linville, linux-wireless, netdev
In-Reply-To: <20130107111752.GD6931@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 181 bytes --]

于 2013年01月07日 19:17, Stanislaw Gruszka 写道:
>> > Signed-off-by: Chen Gang <gang.chen@asianux.com>
> ACK

  thank you very much.

  :-)

-- 
Chen Gang

Flying Transformer

[-- Attachment #2: chen_gang_flying_transformer.vcf --]
[-- Type: text/x-vcard, Size: 67 bytes --]

begin:vcard
fn:Chen Gang
n:;Chen Gang
version:2.1
end:vcard


^ permalink raw reply

* Re: [PATCH v2] net: set default_ethtool_ops in register_netdevice
From: Stanislaw Gruszka @ 2013-01-10  8:36 UTC (permalink / raw)
  To: David Miller
  Cc: netdev, edumazet, greearb, bjorn, linux-wireless, bhutchings,
	mirqus
In-Reply-To: <20130109.235738.467651533138068641.davem@davemloft.net>

On Wed, Jan 09, 2013 at 11:57:38PM -0800, David Miller wrote:
> From: Stanislaw Gruszka <sgruszka@redhat.com>
> Date: Tue, 8 Jan 2013 16:38:51 +0100
> 
> > Since:
> > 
> > commit 2c60db037034d27f8c636403355d52872da92f81
> > Author: Eric Dumazet <edumazet@google.com>
> > Date:   Sun Sep 16 09:17:26 2012 +0000
> > 
> >     net: provide a default dev->ethtool_ops
> > 
> > wireless core does not correctly assign ethtool_ops. In order to fix
> > the problem, move assignement of default_ethtool_ops to
> > register_netdevice(). This is safe because both register_netdevice()
> > and dev_ethtool() are protected by RTNL lock.
> > 
> > Patch is besed on hint of Michał Mirosław.
> > 
> > Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
> > Cc: stable@vger.kernel.org # 3.7+
> > ---
> > v1 -> v2: change order of default_ethtool_ops initialization to avoid
> > the problem. Change the subject accordingly.
> 
> I don't understand this.  Why is the assignment of default_ethtool_ops
> at netdev allocation time not working?  Is wireless really not using
> alloc_netdev*()?

It does. This is done on individual cfg80211 drivers , i.e. on mac80211
or full mac drivers. After alloc_netdev*() call, some cfg80211 drivers
provide they own ethtool_ops, but some do not. For them, wireless core
provide generic cfg80211_ethtool_ops, which is assigned in
NETDEV_REGISTER notify call: 

	if (!dev->ethtool_ops)
		dev->ethtool_ops = &cfg80211_ethtool_ops;

But after Eric's commit, dev->ethtool_ops is no longer NULL (on cfg80211
drivers without custom ethtool_ops), but points to &default_ethtool_ops.

Stanislaw

^ permalink raw reply

* Re: pull request: wireless 2013-01-09
From: David Miller @ 2013-01-10  8:12 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless, netdev, linux-kernel
In-Reply-To: <20130109191817.GA17321@tuxdriver.com>

From: "John W. Linville" <linville@tuxdriver.com>
Date: Wed, 9 Jan 2013 14:18:18 -0500

> Included is a mac80211 pull, of which Johannes says the following:
> 
> 'This includes a number of fixes for various pieces of mac80211. I've
> also included Thomas's memory RMC hash table optimisation since it
> saves so much memory.'
> 
> Also from Johannes is an iwlwifi pull:
> 
> 'I have two fixes for iwlwifi: one to fix a lost return value that was
> dropped in a previous patch and could cause "nobody cared" IRQ messages,
> and one to work around a firmware issue.'
> 
> Amitkumar Karwar brings an mwifiex for a typo in an comparison.
> 
> Bing Zhao gives us an mwifiex fix to properly check the return value
> from wait_event_interruptible and handle it properly.
> 
> Chen Gang provides a fix to make iwlegacy use strlcpy instead of
> strncpy, avoiding a potential buffer underflow.
> 
> Julian Wollrath fixes a typo in an error message in rtlwifi.
> 
> Larry Finger brings a b43 fix for a firmware loading problem.
> 
> Nickolai Zeldovich avoids a use-after-free in the mwl8k driver.
> 
> Vladimir Kondratiev brings the last big piece, the new Qualcomm/Atheros
> wil6210 802.11ad driver.  Since it is for new hardware, I hope that
> taking it for 3.8 is not a problem.
> 
> Please let me know if there are problems!

Pulled, thanks John.

^ permalink raw reply

* Re: [PATCH net-next] cxgb4: Fix incorrect PFVF CMASK
From: David Miller @ 2013-01-10  8:06 UTC (permalink / raw)
  To: vipul; +Cc: netdev, divy, dm, abhishek, jay
In-Reply-To: <1357753369-26471-1-git-send-email-vipul@chelsio.com>

From: Vipul Pandya <vipul@chelsio.com>
Date: Wed,  9 Jan 2013 23:12:49 +0530

> With Hard-Wired firmware configuration it was incorrectly provisioning the VFs
> Channel Access Rights Mask.
> 
> Signed-off-by: Jay Hernandez <jay@chelsio.com>
> Signed-off-by: Vipul Pandya <vipul@chelsio.com>

Applied, thanks.

^ permalink raw reply

* Re: [PATCH V2 0/4] DSA: Fix checkpatch.pl output for DSA drivers
From: David Miller @ 2013-01-10  8:04 UTC (permalink / raw)
  To: barry; +Cc: netdev
In-Reply-To: <1357697156-5767-1-git-send-email-barry@grussling.com>

From: Barry Grussling <barry@grussling.com>
Date: Tue,  8 Jan 2013 18:05:52 -0800

> This set of patches performs routine maintenance on the DSA drivers
> by removing all checkpatch.pl errors.
> 
> These patches do the following things:
>  * Switch to network-style comments
>  * Convert msleep calls to timeout/usleep_range calls
>  * Convert printk calls to netdev_info calls
>  * Fix whitespace issues

All applied, thanks.

^ permalink raw reply

* Re: [PATCH v2 3/3] net: stmmac: add gmac autonego set for ethtool support
From: David Miller @ 2013-01-10  8:02 UTC (permalink / raw)
  To: bh74.an; +Cc: netdev, linux-kernel, peppe.cavallaro, jeffrey.t.kirsher,
	kgene.kim
In-Reply-To: <000601cdedf8$5d39bdf0$17ad39d0$@samsung.com>

From: Byungho An <bh74.an@samsung.com>
Date: Tue, 08 Jan 2013 15:32:02 -0800

> @@ -348,6 +349,10 @@ stmmac_set_pauseparam(struct net_device *netdev,
>  
>  	if (phy->autoneg) {
>  		if (netif_running(netdev))
> +			if((interface == PHY_INTERFACE_MODE_SGMII) ||
> +				(interface == PHY_INTERFACE_MODE_TBI) ||
> +				(interface == PHY_INTERFACE_MODE_RTBI)) 
> +				priv->hw->mac->set_autoneg(priv->ioaddr);

This is improperly indented and formatted, use this style:

	if (A ||
	    B ||
	    C)
		statement();

I can tell what you're trying to do, you are just trying to use TAB
characters exclusivly to indent because you are lazy.  But that's not
the objective here.

^ permalink raw reply

* [PATCH 3.8-rc] tuntap: refuse to re-attach to different tun_struct
From: Stefan Hajnoczi @ 2013-01-10  7:59 UTC (permalink / raw)
  To: David S. Miller
  Cc: Jason Wang, Michael S. Tsirkin, netdev, linux-kernel,
	Stefan Hajnoczi

Multiqueue tun devices support detaching a tun_file from its tun_struct
and re-attaching at a later point in time.  This allows users to disable
a specific queue temporarily.

ioctl(TUNSETIFF) allows the user to specify the network interface to
attach by name.  This means the user can attempt to attach to interface
"B" after detaching from interface "A".

The driver is not designed to support this so check we are re-attaching
to the right tun_struct.  Failure to do so may lead to oops.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
---
This fix is for 3.8-rc.

 drivers/net/tun.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/tun.c b/drivers/net/tun.c
index fbd106e..cf6da6e 100644
--- a/drivers/net/tun.c
+++ b/drivers/net/tun.c
@@ -491,6 +491,8 @@ static int tun_attach(struct tun_struct *tun, struct file *file)
 	err = -EINVAL;
 	if (rcu_dereference_protected(tfile->tun, lockdep_rtnl_is_held()))
 		goto out;
+	if (tfile->detached && tun != tfile->detached)
+		goto out;
 
 	err = -EBUSY;
 	if (!(tun->flags & TUN_TAP_MQ) && tun->numqueues == 1)
-- 
1.8.0.2

^ permalink raw reply related

* Re: [PATCH v2] net: set default_ethtool_ops in register_netdevice
From: David Miller @ 2013-01-10  7:57 UTC (permalink / raw)
  To: sgruszka
  Cc: netdev, edumazet, greearb, bjorn, linux-wireless, bhutchings,
	mirqus
In-Reply-To: <20130108153850.GA10464@redhat.com>

From: Stanislaw Gruszka <sgruszka@redhat.com>
Date: Tue, 8 Jan 2013 16:38:51 +0100

> Since:
> 
> commit 2c60db037034d27f8c636403355d52872da92f81
> Author: Eric Dumazet <edumazet@google.com>
> Date:   Sun Sep 16 09:17:26 2012 +0000
> 
>     net: provide a default dev->ethtool_ops
> 
> wireless core does not correctly assign ethtool_ops. In order to fix
> the problem, move assignement of default_ethtool_ops to
> register_netdevice(). This is safe because both register_netdevice()
> and dev_ethtool() are protected by RTNL lock.
> 
> Patch is besed on hint of Michał Mirosław.
> 
> Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
> Cc: stable@vger.kernel.org # 3.7+
> ---
> v1 -> v2: change order of default_ethtool_ops initialization to avoid
> the problem. Change the subject accordingly.

I don't understand this.  Why is the assignment of default_ethtool_ops
at netdev allocation time not working?  Is wireless really not using
alloc_netdev*()?

^ permalink raw reply

* Re: [patch] bnx2x: NULL dereference on error in debug code
From: David Miller @ 2013-01-10  7:53 UTC (permalink / raw)
  To: dan.carpenter; +Cc: eilong, netdev, linux-kernel, kernel-janitors
In-Reply-To: <20130108134213.GA23742@elgon.mountain>

From: Dan Carpenter <dan.carpenter@oracle.com>
Date: Tue, 8 Jan 2013 16:42:14 +0300

> "vfop" is NULL here.  I've changed the debugging to not use it.
> 
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Applied, thanks Dan.

^ permalink raw reply

* Re: [PATCH 0/5] ipv4_tunnels: Modularize ipv4 tunneling.
From: David Miller @ 2013-01-10  7:52 UTC (permalink / raw)
  To: pshelar; +Cc: dev, netdev, jesse
In-Reply-To: <1357612292-1682-1-git-send-email-pshelar@nicira.com>

From: Pravin B Shelar <pshelar@nicira.com>
Date: Mon,  7 Jan 2013 18:31:32 -0800

> Following patch series restructure GRE and IPIP tunneling code
> to make it modular. It adds ip_tunnel module which acts as
> generic tunneling layer which has common code. I have patch
> to do same for VXLAN too.
> 
> In Addidtion to restructuring it adds demultiplexer for ipgre
> protocol, so that linux kernel IPGRE module and OVS gre module
> can co-exist.
> Last patch adds linux state updates to tunnel device from
> lower device.

Please resubmit this when you can also submit the patches which
actually use this new modularity.

Otherwise the value proposition is impossible to analyze.

Thanks.

^ permalink raw reply

* Re: [PATCH V6] bgmac: driver for GBit MAC core on BCMA bus
From: Rafał Miłecki @ 2013-01-10  7:40 UTC (permalink / raw)
  To: David Miller; +Cc: netdev, romieu, joe
In-Reply-To: <20130109.233744.2066803110314306055.davem@davemloft.net>

2013/1/10 David Miller <davem@davemloft.net>:
> Applied, thanks.

Great! :)

I wish to say big "thank you" too all of you who helped me getting
this driver in shape and making it acceptable for net inclusion. I
really appreciate your help and as always, thanks to you, I've learned
new things. Sorry you had to repeat some of them multiple times ;)

I'm leaving for a week tomorrow and my Internet access will be very
limited. I plan to get back to the development when I'm back. Any help
is welcome of course :)

-- 
Rafał

^ permalink raw reply


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox