Netdev List
 help / color / mirror / Atom feed
* Re: [PATCH] vxlan: Allow setting unicast address to the group address
From: Cong Wang @ 2013-04-11  4:05 UTC (permalink / raw)
  To: netdev
In-Reply-To: <87txnen4y4.wl%atzm@stratosphere.co.jp>

On Wed, 10 Apr 2013 at 08:52 GMT, Atzm Watanabe <atzm@stratosphere.co.jp> wrote:
> This patch allows setting unicast address to the VXLAN group address.
> It allows that VXLAN can be used as peer-to-peer tunnel without
> multicast.
>

Then GROUP is confusing, please pick another name and attribute.

Thanks.

^ permalink raw reply

* linux-next: manual merge of the tip tree with the net-next tree
From: Stephen Rothwell @ 2013-04-11  4:03 UTC (permalink / raw)
  To: Thomas Gleixner, Ingo Molnar, H. Peter Anvin, Peter Zijlstra
  Cc: linux-next, linux-kernel, Daniel Borkmann, David Miller, netdev,
	Borislav Petkov

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

Hi all,

Today's linux-next merge of the tip tree got a conflict in tools/Makefile
between commit e306e2c13b8c ("filter: add minimal BPF JIT image
disassembler") from the net-next tree and commit 85c66be101e1 ("perf
tools: Introduce tools/lib/lk library") from the tip tree.

I fixed it up (see below) and can carry the fix as necessary (no action
is required).

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

diff --cc tools/Makefile
index c73c635,6aaeb6c..0000000
--- a/tools/Makefile
+++ b/tools/Makefile
@@@ -35,7 -34,13 +35,13 @@@ help
  cpupower: FORCE
  	$(call descend,power/$@)
  
- cgroup firewire lguest perf usb virtio vm net: FORCE
 -cgroup firewire guest usb virtio vm: FORCE
++cgroup firewire guest usb virtio vm net: FORCE
+ 	$(call descend,$@)
+ 
+ liblk: FORCE
+ 	$(call descend,lib/lk)
+ 
+ perf: liblk FORCE
  	$(call descend,$@)
  
  selftests: FORCE
@@@ -63,7 -68,13 +69,13 @@@ install: cgroup_install cpupower_instal
  cpupower_clean:
  	$(call descend,power/cpupower,clean)
  
- cgroup_clean firewire_clean lguest_clean perf_clean usb_clean virtio_clean vm_clean net_clean:
 -cgroup_clean firewire_clean lguest_clean usb_clean virtio_clean vm_clean:
++cgroup_clean firewire_clean lguest_clean usb_clean virtio_clean vm_clean net_clean:
+ 	$(call descend,$(@:_clean=),clean)
+ 
+ liblk_clean:
+ 	$(call descend,lib/lk,clean)
+ 
+ perf_clean: liblk_clean
  	$(call descend,$(@:_clean=),clean)
  
  selftests_clean:

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply

* Re: [PATCH v2] net: mv643xx_eth: use managed devm_kzalloc
From: David Miller @ 2013-04-11  3:39 UTC (permalink / raw)
  To: sebastian.hesselbarth
  Cc: buytenh, andrew, jason, florian, sergei.shtylyov, netdev,
	linux-kernel
In-Reply-To: <1365626527-27233-1-git-send-email-sebastian.hesselbarth@gmail.com>

From: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Date: Wed, 10 Apr 2013 22:42:07 +0200

> This patch moves shared private data kzalloc to managed devm_kzalloc and
> cleans now unneccessary kfree and error handling.
> 
> Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>

This doesn't apply cleanly to the net-next tree.

^ permalink raw reply

* Re: [PATCH] net: mvmdio: add clocks property to binding documentation
From: David Miller @ 2013-04-11  3:27 UTC (permalink / raw)
  To: sebastian.hesselbarth
  Cc: grant.likely, rob.herring, rob, florian, thomas.petazzoni, gregkh,
	netdev, devicetree-discuss, linux-doc, linux-kernel
In-Reply-To: <1365615391-26244-1-git-send-email-sebastian.hesselbarth@gmail.com>

From: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Date: Wed, 10 Apr 2013 19:36:29 +0200

> Patch "net: mvmdio: get and enable optional clock" was missing an
> update of the corresponding device tree binding documentation. This
> patch adds the clocks property to mvmdio binding documentation.
> 
> Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>

Please reference commits by SHA1 ID as well as the commit log
message header line (the latter of which should be inside
of parenthesis and double quotes).

Thanks.

^ permalink raw reply

* Re: [PATCH] tcp: incoming connections might use wrong route under synflood
From: David Miller @ 2013-04-11  3:26 UTC (permalink / raw)
  To: dp; +Cc: kuznet, jmorris, yoshfuji, kaber, netdev, linux-kernel
In-Reply-To: <20130411000909.d90c6df468bf1830174e88e2@highloadlab.com>

From: Dmitry Popov <dp@highloadlab.com>
Date: Thu, 11 Apr 2013 00:09:09 +0400

> There is a bug in cookie_v4_check (net/ipv4/syncookies.c):
> 	flowi4_init_output(&fl4, 0, sk->sk_mark, RT_CONN_FLAGS(sk),
> 			   RT_SCOPE_UNIVERSE, IPPROTO_TCP,
> 			   inet_sk_flowi_flags(sk),
> 			   (opt && opt->srr) ? opt->faddr : ireq->rmt_addr,
> 			   ireq->loc_addr, th->source, th->dest);
> 
> Here we do not respect sk->sk_bound_dev_if, therefore wrong dst_entry may be taken. This dst_entry is used in new socket (get_cookie_sock -> tcp_v4_syn_recv_sock), so its packets may take wrong path. There is no such bug in ipv6 code and non-cookie code (usual case). Bugfix below.
> 
> Signed-off-by: Dmitry Popov <dp@highloadlab.com>

Please format your commit messages properly, by not allowing lines of
text longer than 80 columns.

Thank you.

^ permalink raw reply

* Re: [PATCH net-next] netprio_cgroup: make local table static
From: David Miller @ 2013-04-11  3:24 UTC (permalink / raw)
  To: stephen; +Cc: nhorman, netdev
In-Reply-To: <20130410135605.0431e7aa@nehalam.linuxnetplumber.net>

From: Stephen Hemminger <stephen@networkplumber.org>
Date: Wed, 10 Apr 2013 13:56:05 -0700

> Minor sparse warning
> 
> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>

Applied.

^ permalink raw reply

* Re: [PATCH net-next] xen-netback: fix sparse warning
From: David Miller @ 2013-04-11  3:24 UTC (permalink / raw)
  To: stephen; +Cc: ian.campbell, netdev
In-Reply-To: <20130410135446.3965872e@nehalam.linuxnetplumber.net>

From: Stephen Hemminger <stephen@networkplumber.org>
Date: Wed, 10 Apr 2013 13:54:46 -0700

> Fix warning about 0 used as NULL.
> 
> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>

Applied.

^ permalink raw reply

* Re: [PATCH net-next] bnx2: make cnic_probe static
From: David Miller @ 2013-04-11  3:24 UTC (permalink / raw)
  To: stephen; +Cc: mchan, netdev
In-Reply-To: <20130410135340.06f88645@nehalam.linuxnetplumber.net>

From: Stephen Hemminger <stephen@networkplumber.org>
Date: Wed, 10 Apr 2013 13:53:40 -0700

> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>

Applied.

^ permalink raw reply

* Re: [PATCH] net: usb: active URB submitted multiple times
From: David Miller @ 2013-04-11  3:22 UTC (permalink / raw)
  To: petkan; +Cc: netdev, linux-kernel, sarah.a.sharp
In-Reply-To: <alpine.DEB.2.02.1304102354010.9358@fry>


I think you need to read Documentation/SubmittingPatches, and
Documentation/email-clients.txt

Do not submit the diff for the individual files seperately,
provide all the changes together as a single patch.

Do not use an attachment, instead provide your patch inline
as plain ASCII, unformatted text.

^ permalink raw reply

* Re: [PATCH] ipconfig: stop ip-config if disabled method directed
From: David Miller @ 2013-04-11  3:19 UTC (permalink / raw)
  To: takashi.yoshii.zj; +Cc: netdev
In-Reply-To: <5165138A.7070006@renesas.com>

From: Takashi Yoshii <takashi.yoshii.zj@renesas.com>
Date: Wed, 10 Apr 2013 16:23:54 +0900

> Looks insignificant, but a misusage of kernel level auto configuration
> results in an invalid ipv4 address set.
> That is a kind of corner case, but I think it is be better sanitizing
>  the input a bit more for our simple in_aton().
> --
> 
> CONFIG_IP_PNP=y
> CONFIG_IP_PNP_DHCP=n
> Command line: ip=dhcp
> result in false ip address 62.0.0.0 set.
> 
> If directed autoconf method is not compiled into the kernel,
> ip-config should be terminated.
> 
> Signed-off-by: Takashi Yoshii <takashi.yoshii.zj@renesas.com>

This is a poor submission.

When you put _before_ the "--" is the commit message, and the
text afterwards will be removed and not considered as part of
the commit message.

Secondly, put this logic into ic_proto_name() so we don't duplicate
all of these string comparisons.

Thirdly, consider simply removing all of these silly Kconfig
options, they seem rediculous.

^ permalink raw reply

* Re: [PATCH] net: Fix tentative IPv6 address due to DAD looping back
From: David Miller @ 2013-04-11  3:16 UTC (permalink / raw)
  To: Jilin.Meng
  Cc: eric.dumazet, sergei.shtylyov, kuznet, jmorris, yoshfuji, kaber,
	yinglin.sun, lakshmanan.prithviraj, netdev
In-Reply-To: <027526AF93736D4380632CD4F3B42B8002FEBD@MX101CL02.corp.emc.com>

From: "Meng, Jilin" <Jilin.Meng@emc.com>
Date: Thu, 11 Apr 2013 03:13:42 +0000

> Thanks Sergei for introducing a fast function.

Do not top post.

Quote the email you are responding to, and then put your response
after the quoted content, not before.

^ permalink raw reply

* RE: [PATCH] net: Fix tentative IPv6 address due to DAD looping back
From: Meng, Jilin @ 2013-04-11  3:13 UTC (permalink / raw)
  To: Eric Dumazet, Sergei Shtylyov
  Cc: davem@davemloft.net, kuznet@ms2.inr.ac.ru, jmorris@namei.org,
	yoshfuji@linux-ipv6.org, kaber@trash.net, Sun, Yinglin,
	Prithviraj, Lakshmanan, netdev@vger.kernel.org
In-Reply-To: <1363963666.4431.61.camel@edumazet-glaptop>

Thanks Sergei for introducing a fast function.

-----Original Message-----
From: netdev-owner@vger.kernel.org [mailto:netdev-owner@vger.kernel.org] On Behalf Of Eric Dumazet
Sent: Friday, March 22, 2013 10:48 PM
To: Sergei Shtylyov
Cc: Meng, Jilin; davem@davemloft.net; kuznet@ms2.inr.ac.ru; jmorris@namei.org; yoshfuji@linux-ipv6.org; kaber@trash.net; Sun, Yinglin; Prithviraj, Lakshmanan; netdev@vger.kernel.org
Subject: Re: [PATCH] net: Fix tentative IPv6 address due to DAD looping back

On Fri, 2013-03-22 at 18:37 +0400, Sergei Shtylyov wrote:

>     Don't we have memcmp() in Linux?
> 

Dont use slow memcmp() in this context but fast
ether_addr_equal_64bits()



--
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


^ permalink raw reply

* Re: [PATCH] net: Fix tentative IPv6 address due to DAD looping back
From: David Miller @ 2013-04-11  3:14 UTC (permalink / raw)
  To: Jilin.Meng
  Cc: kuznet, jmorris, yoshfuji, kaber, yinglin.sun,
	lakshmanan.prithviraj, netdev
In-Reply-To: <027526AF93736D4380632CD4F3B42B8002FE9D@MX101CL02.corp.emc.com>

From: "Meng, Jilin" <Jilin.Meng@emc.com>
Date: Thu, 11 Apr 2013 03:06:23 +0000

> we should ignore the looped-back IPv6 DAD packet to avoid configuration failure.
> This occurs when a bonding interface with roundrobin mode is being configured an IPv6 address while the switch side isn't configured bonding/channel yet.

Please don't submit long lines in your commit message, place
a newline before the 80th column.

> +				if (dev->type == ARPHRD_ETHER) {
> +					const unsigned char *sadr;
> +					sadr = skb_mac_header(skb);

Add an empty line between the "sadr" variable declaration and the
assignment.

> +					if (ether_addr_equal_64bits(sadr + 6, dev->dev_addr))
> +					/*
> +					 * looped-back to us. This occurs when
> +					 * a bonding interface with roundrobin
> +					 * mode is being configured while the
> +					 * switch side isn't configured yet.
> +					 */
> +						goto out;

This had improper coding style in at least 2 different aspects.

First, either put the comment before the if() statement, or if you
absolutely must put it inside the basic block of the if() statement,
add braces.

Second, the comment is improperly formatted for the networking.  It
should be formatted:

	/* Like
	 * this.
	 */

Finally, what do you mean when you ask for your message to be
"recalled"?  That's awkward and doesn't mean anything to us.  Where
else have you seen people use that terminology on a mailing list?

Instead, just say "please ignore this patch, I have a new version coming".

Then, when you post the new patch, tell us what changed from the previous
submission.

Not a good patch submission at all, and I haven't even thought about
the logic of your change at all.

^ permalink raw reply

* RE: [PATCH] net: Fix tentative IPv6 address due to DAD looping back
From: Meng, Jilin @ 2013-04-11  3:11 UTC (permalink / raw)
  To: YOSHIFUJI Hideaki
  Cc: davem@davemloft.net, kuznet@ms2.inr.ac.ru, jmorris@namei.org,
	kaber@trash.net, Sun, Yinglin, Prithviraj, Lakshmanan,
	netdev@vger.kernel.org
In-Reply-To: <1363923575.16608.17.camel@cirrhata>

Yoshfuji,

Partially you are correct. 
But at least this fix removes the limitation that we must configure the switch for bonding first then host in this case.

-Jilin

-----Original Message-----
From: YOSHIFUJI Hideaki [mailto:yoshfuji@linux-ipv6.org] 
Sent: Friday, March 22, 2013 11:40 AM
To: Meng, Jilin
Cc: davem@davemloft.net; kuznet@ms2.inr.ac.ru; jmorris@namei.org; kaber@trash.net; Sun, Yinglin; Prithviraj, Lakshmanan; netdev@vger.kernel.org
Subject: Re: [PATCH] net: Fix tentative IPv6 address due to DAD looping back

Meng, Jilin wrote:
> we should ignore the looped-back IPv6 DAD packet to avoid configuration failure.
> This occurs when a bonding interface with roundrobin mode is being 
> configured an IPv6 address while the switch side isn't configured bonding/channel yet.
> 
> Signed-off-by: Jilin Meng <jilin.meng@emc.com>
> Signed-off-by: Yinglin Sun <yinglin.sun@emc.com>
> Signed-off-by: Lakshmanan Prithviraj <lakshmanan.prithviraj@emc.com>
> ---
> --- linux/net/ipv6/ndisc.c.orig	2013-03-12 17:16:18.000000000 +0800
> +++ linux/net/ipv6/ndisc.c	2013-03-21 10:37:06.000000000 +0800
> @@ -757,6 +757,24 @@ static void ndisc_recv_ns(struct sk_buff
>  
>  		if (ifp->flags & (IFA_F_TENTATIVE|IFA_F_OPTIMISTIC)) {
>  			if (dad) {
> +				if (dev->type == ARPHRD_ETHER) {
> +					const unsigned char *sadr;
> +					sadr = skb_mac_header(skb);
> +					if (sadr[6] == dev->dev_addr[0] &&
> +					    sadr[7] == dev->dev_addr[1] &&
> +					    sadr[8] == dev->dev_addr[2] &&
> +					    sadr[9] == dev->dev_addr[3] &&
> +					    sadr[10] == dev->dev_addr[4] &&
> +					    sadr[11] == dev->dev_addr[5]) {
> +					/*
> +					 * looped-back to us. This occurs when
> +					 * a bonding interface with roundrobin
> +					 * mode is being configured while the
> +					 * switch side isn't configured yet.
> +					 */
> +						goto out;
> +				}
> +
>  				/*
>  				 * We are colliding with another node
>  				 * who is doing DAD

I would say that it is a configuration error.

--yoshfuji

^ permalink raw reply

* [PATCH] net: Fix tentative IPv6 address due to DAD looping back
From: Meng, Jilin @ 2013-04-11  3:06 UTC (permalink / raw)
  To: davem@davemloft.net, kuznet@ms2.inr.ac.ru, jmorris@namei.org,
	yoshfuji@linux-ipv6.org, kaber@trash.net
  Cc: Sun, Yinglin, Prithviraj, Lakshmanan, netdev@vger.kernel.org,
	Meng, Jilin

we should ignore the looped-back IPv6 DAD packet to avoid configuration failure.
This occurs when a bonding interface with roundrobin mode is being configured an IPv6 address while the switch side isn't configured bonding/channel yet.

Signed-off-by: Jilin Meng <jilin.meng@emc.com>
Signed-off-by: Yinglin Sun <yinglin.sun@emc.com>
Signed-off-by: Lakshmanan Prithviraj <lakshmanan.prithviraj@emc.com>
---
--- linux/net/ipv6/ndisc.c.orig	2013-03-12 17:16:18.000000000 +0800
+++ linux/net/ipv6/ndisc.c	2013-04-11 09:00:45.000000000 +0800
@@ -71,6 +71,7 @@
 
 #include <linux/netfilter.h>
 #include <linux/netfilter_ipv6.h>
+#include <linux/etherdevice.h>
 
 /* Set to 3 to get tracing... */
 #define ND_DEBUG 1
@@ -757,6 +758,19 @@ static void ndisc_recv_ns(struct sk_buff
 
 		if (ifp->flags & (IFA_F_TENTATIVE|IFA_F_OPTIMISTIC)) {
 			if (dad) {
+				if (dev->type == ARPHRD_ETHER) {
+					const unsigned char *sadr;
+					sadr = skb_mac_header(skb);
+					if (ether_addr_equal_64bits(sadr + 6, dev->dev_addr))
+					/*
+					 * looped-back to us. This occurs when
+					 * a bonding interface with roundrobin
+					 * mode is being configured while the
+					 * switch side isn't configured yet.
+					 */
+						goto out;
+				}
+
 				/*
 				 * We are colliding with another node
 				 * who is doing DAD

^ permalink raw reply

* Re: [PATCH 1/2 v5] usbnet: allow status interrupt URB to always be active
From: Ming Lei @ 2013-04-11  2:31 UTC (permalink / raw)
  To: Dan Williams
  Cc: Oliver Neukum, Elina Pasheva, Network Development, linux-usb,
	Rory Filer, Phil Sutter
In-Reply-To: <1365625850.22411.1.camel-wKZy7rqYPVb5EHUCmHmTqw@public.gmane.org>

On Thu, Apr 11, 2013 at 4:30 AM, Dan Williams <dcbw-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> wrote:
> Some drivers (sierra_net) need the status interrupt URB
> active even when the device is closed, because they receive
> custom indications from firmware.  Add functions to refcount
> the status interrupt URB submit/kill operation so that
> sub-drivers and the generic driver don't fight over whether
> the status interrupt URB is active or not.
>
> A sub-driver can call usbnet_status_start() at any time, but
> the URB is only submitted the first time the function is
> called.  Likewise, when the sub-driver is done with the URB,
> it calls usbnet_status_stop() but the URB is only killed when
> all users have stopped it.  The URB is still killed and
> re-submitted for suspend/resume, as before, with the same
> refcount it had at suspend.
>
> Signed-off-by: Dan Williams <dcbw-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
> ---
>  drivers/net/usb/usbnet.c   | 79 ++++++++++++++++++++++++++++++++++++++++++----
>  include/linux/usb/usbnet.h |  5 +++
>  2 files changed, 77 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c
> index 51f3192..b71ce36 100644
> --- a/drivers/net/usb/usbnet.c
> +++ b/drivers/net/usb/usbnet.c
> @@ -252,6 +252,70 @@ static int init_status (struct usbnet *dev, struct usb_interface *intf)
>         return 0;
>  }
>
> +/* Submit the interrupt URB if not previously submitted, increasing refcount */
> +int usbnet_status_start(struct usbnet *dev, gfp_t mem_flags)

'mem_flags' isn't needed any more since we can apply allocation
of GFP_NOIO automatically in resume path now, and you can always
use GFP_KERNEL safely. Considered that it is a API, please don't
introduce it.

After removing it, you can add

          Acked-by: Ming Lei <ming.lei-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>

> +{
> +       int ret = 0;
> +
> +       WARN_ON_ONCE(dev->interrupt == NULL);
> +       if (dev->interrupt) {
> +               mutex_lock(&dev->interrupt_mutex);
> +
> +               if (++dev->interrupt_count == 1)
> +                       ret = usb_submit_urb(dev->interrupt, mem_flags);
> +
> +               dev_dbg(&dev->udev->dev, "incremented interrupt URB count to %d\n",
> +                       dev->interrupt_count);
> +               mutex_unlock(&dev->interrupt_mutex);
> +       }
> +       return ret;
> +}
> +EXPORT_SYMBOL_GPL(usbnet_status_start);
> +
> +/* For resume; submit interrupt URB if previously submitted */
> +static int __usbnet_status_start_force(struct usbnet *dev, gfp_t mem_flags)
> +{
> +       int ret = 0;
> +
> +       mutex_lock(&dev->interrupt_mutex);
> +       if (dev->interrupt_count) {
> +               ret = usb_submit_urb(dev->interrupt, mem_flags);
> +               dev_dbg(&dev->udev->dev,
> +                       "submitted interrupt URB for resume\n");
> +       }
> +       mutex_unlock(&dev->interrupt_mutex);
> +       return ret;
> +}
> +
> +/* Kill the interrupt URB if all submitters want it killed */
> +void usbnet_status_stop(struct usbnet *dev)
> +{
> +       if (dev->interrupt) {
> +               mutex_lock(&dev->interrupt_mutex);
> +               WARN_ON(dev->interrupt_count == 0);
> +
> +               if (dev->interrupt_count && --dev->interrupt_count == 0)
> +                       usb_kill_urb(dev->interrupt);
> +
> +               dev_dbg(&dev->udev->dev,
> +                       "decremented interrupt URB count to %d\n",
> +                       dev->interrupt_count);
> +               mutex_unlock(&dev->interrupt_mutex);
> +       }
> +}
> +EXPORT_SYMBOL_GPL(usbnet_status_stop);
> +
> +/* For suspend; always kill interrupt URB */
> +static void __usbnet_status_stop_force(struct usbnet *dev)
> +{
> +       if (dev->interrupt) {
> +               mutex_lock(&dev->interrupt_mutex);
> +               usb_kill_urb(dev->interrupt);
> +               dev_dbg(&dev->udev->dev, "killed interrupt URB for suspend\n");
> +               mutex_unlock(&dev->interrupt_mutex);
> +       }
> +}

Looks it isn't a good practice to duplicate code in above four functions, but
it should be OK to merge first.

> +
>  /* Passes this packet up the stack, updating its accounting.
>   * Some link protocols batch packets, so their rx_fixup paths
>   * can return clones as well as just modify the original skb.
> @@ -725,7 +789,7 @@ int usbnet_stop (struct net_device *net)
>         if (!(info->flags & FLAG_AVOID_UNLINK_URBS))
>                 usbnet_terminate_urbs(dev);
>
> -       usb_kill_urb(dev->interrupt);
> +       usbnet_status_stop(dev);
>
>         usbnet_purge_paused_rxq(dev);
>
> @@ -787,7 +851,7 @@ int usbnet_open (struct net_device *net)
>
>         /* start any status interrupt transfer */
>         if (dev->interrupt) {
> -               retval = usb_submit_urb (dev->interrupt, GFP_KERNEL);
> +               retval = usbnet_status_start(dev, GFP_KERNEL);
>                 if (retval < 0) {
>                         netif_err(dev, ifup, dev->net,
>                                   "intr submit %d\n", retval);
> @@ -1430,6 +1494,8 @@ usbnet_probe (struct usb_interface *udev, const struct usb_device_id *prod)
>         dev->delay.data = (unsigned long) dev;
>         init_timer (&dev->delay);
>         mutex_init (&dev->phy_mutex);
> +       mutex_init(&dev->interrupt_mutex);
> +       dev->interrupt_count = 0;
>
>         dev->net = net;
>         strcpy (net->name, "usb%d");
> @@ -1565,7 +1631,7 @@ int usbnet_suspend (struct usb_interface *intf, pm_message_t message)
>                  */
>                 netif_device_detach (dev->net);
>                 usbnet_terminate_urbs(dev);
> -               usb_kill_urb(dev->interrupt);
> +               __usbnet_status_stop_force(dev);
>
>                 /*
>                  * reattach so runtime management can use and
> @@ -1585,9 +1651,8 @@ int usbnet_resume (struct usb_interface *intf)
>         int                     retval;
>
>         if (!--dev->suspend_count) {
> -               /* resume interrupt URBs */
> -               if (dev->interrupt && test_bit(EVENT_DEV_OPEN, &dev->flags))
> -                       usb_submit_urb(dev->interrupt, GFP_NOIO);
> +               /* resume interrupt URB if it was previously submitted */
> +               __usbnet_status_start_force(dev, GFP_NOIO);
>
>                 spin_lock_irq(&dev->txq.lock);
>                 while ((res = usb_get_from_anchor(&dev->deferred))) {
> diff --git a/include/linux/usb/usbnet.h b/include/linux/usb/usbnet.h
> index 0e5ac93..d71f44c 100644
> --- a/include/linux/usb/usbnet.h
> +++ b/include/linux/usb/usbnet.h
> @@ -56,6 +56,8 @@ struct usbnet {
>         struct sk_buff_head     done;
>         struct sk_buff_head     rxq_pause;
>         struct urb              *interrupt;
> +       unsigned                interrupt_count;
> +       struct mutex            interrupt_mutex;
>         struct usb_anchor       deferred;
>         struct tasklet_struct   bh;
>
> @@ -246,4 +248,7 @@ extern int usbnet_nway_reset(struct net_device *net);
>
>  extern int usbnet_manage_power(struct usbnet *, int);
>
> +int usbnet_status_start(struct usbnet *dev, gfp_t mem_flags);
> +void usbnet_status_stop(struct usbnet *dev);
> +
>  #endif /* __LINUX_USB_USBNET_H */
> --
> 1.8.1.4
>
>


Thanks,
-- 
Ming Lei
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" 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 net-next] vxlan: revert "vxlan: Bypass encapsulation if the destination is local"
From: Cong Wang @ 2013-04-11  2:10 UTC (permalink / raw)
  To: Sridhar Samudrala; +Cc: netdev, David S. Miller
In-Reply-To: <1365530913.29336.50.camel@oc1677441337.ibm.com>

On Tue, 2013-04-09 at 11:08 -0700, Sridhar Samudrala wrote:
> On Tue, 2013-04-09 at 17:57 +0800, Cong Wang wrote:
> > From: Cong Wang <amwang@redhat.com>
> > 
> > This reverts commit 9dcc71e1fdbb7aa10d92a3d35e8a201adc84abd0.
> > It apparently breaks my vxlan tests between different namespaces.
> > 
> I haven't tried vxlan with network namespaces.
> This patch effects the following 2 code paths
> - when source and destination endpoints are on the same bridge and
>   route short-circuiting is enabled. I guess you are not hitting
>   this path as this is possible only if you specify 'rsc' flag when
>   creating vxlan device.

No, I didn't specify this flag.

> - when source and destination endpoints belonging to different vni's
>   are on 2 different bridges on the same host. encap bypass is done
>   in this scenario by checking if rt_flags has RTCF_LOCAL set. I think
>   you must be hitting this path and the following patch should fix
>   it by only doing bypass if the source and dest devices belong to 
>   the same net. Can you try it and see if it fixes your tests?

I just tested it, unfortunately it doesn't work, the bug still exists.

If you need any other info, please let me know.

Thanks.

^ permalink raw reply

* Recall: [PATCH] net: Fix tentative IPv6 address due to DAD looping back
From: Meng, Jilin @ 2013-04-11  1:36 UTC (permalink / raw)
  To: davem@davemloft.net, kuznet@ms2.inr.ac.ru, jmorris@namei.org,
	yoshfuji@linux-ipv6.org, kaber@trash.net
  Cc: Sun, Yinglin, Prithviraj, Lakshmanan, netdev@vger.kernel.org,
	Meng, Jilin

Meng, Jilin would like to recall the message, "[PATCH] net: Fix tentative IPv6 address due to DAD looping back".

^ permalink raw reply

* [PATCH] net: Fix tentative IPv6 address due to DAD looping back
From: Meng, Jilin @ 2013-04-11  1:31 UTC (permalink / raw)
  To: davem@davemloft.net, kuznet@ms2.inr.ac.ru, jmorris@namei.org,
	yoshfuji@linux-ipv6.org, kaber@trash.net
  Cc: Sun, Yinglin, Prithviraj, Lakshmanan, netdev@vger.kernel.org,
	Meng, Jilin

we should ignore the looped-back IPv6 DAD packet to avoid configuration failure.
This occurs when a bonding interface with roundrobin mode is being configured an IPv6 address while the switch side isn't configured bonding/channel yet.

Signed-off-by: Jilin Meng <jilin.meng@emc.com>
Signed-off-by: Yinglin Sun <yinglin.sun@emc.com>
Signed-off-by: Lakshmanan Prithviraj <lakshmanan.prithviraj@emc.com>
---
--- linux/net/ipv6/ndisc.c.orig	2013-03-12 17:16:18.000000000 +0800
+++ linux/net/ipv6/ndisc.c	2013-03-21 10:37:06.000000000 +0800
@@ -757,6 +757,24 @@ static void ndisc_recv_ns(struct sk_buff
 
 		if (ifp->flags & (IFA_F_TENTATIVE|IFA_F_OPTIMISTIC)) {
 			if (dad) {
+				if (dev->type == ARPHRD_ETHER) {
+					const unsigned char *sadr;
+					sadr = skb_mac_header(skb);
+					if (sadr[6] == dev->dev_addr[0] &&
+					    sadr[7] == dev->dev_addr[1] &&
+					    sadr[8] == dev->dev_addr[2] &&
+					    sadr[9] == dev->dev_addr[3] &&
+					    sadr[10] == dev->dev_addr[4] &&
+					    sadr[11] == dev->dev_addr[5]) {
+					/*
+					 * looped-back to us. This occurs when
+					 * a bonding interface with roundrobin
+					 * mode is being configured while the
+					 * switch side isn't configured yet.
+					 */
+						goto out;
+				}
+
 				/*
 				 * We are colliding with another node
 				 * who is doing DAD

^ permalink raw reply

* Re: [PATCH] kernel: audit: beautify code, for extern function, better to check its parameters by itself
From: Chen Gang @ 2013-04-11  1:03 UTC (permalink / raw)
  To: Eric Paris; +Cc: Al Viro, David Miller, linux-kernel, netdev
In-Reply-To: <1216477171.11118824.1365615063121.JavaMail.root@redhat.com>

On 2013年04月11日 01:31, Eric Paris wrote:
> ----- Original Message -----
>> > 
>> >   __audit_socketcall is an extern function.
>> >   better to check its parameters by itself.
>> > 
>> >     also can return error code, when fail (find invalid parameters).
>> >     also use macro instead of real hard code number
>> >     also give related comments for it.
>> > 
>> > Signed-off-by: Chen Gang <gang.chen@asianux.com>
>> > ---
>> >  include/linux/audit.h |   12 ++++++++----
>> >  kernel/auditsc.c      |    9 ++++++---
>> >  net/socket.c          |    6 ++++--
>> >  3 files changed, 18 insertions(+), 9 deletions(-)
>> > 
>> > diff --git a/include/linux/audit.h b/include/linux/audit.h
>> > @@ -354,7 +358,7 @@ static inline int audit_bprm(struct linux_binprm *bprm)
>> >  {
>> >  	return 0;
>> >  }
>> > -static inline void audit_socketcall(int nargs, unsigned long *args)
>> > +static inline int audit_socketcall(int nargs, unsigned long *args)
>> >  { }
>> >  static inline void audit_fd_pair(int fd1, int fd2)
>> >  { }
> This now returns a value but you forgot to return a value.  Thus this would not even build...   I fixed it up myself.

  thank you very much.


  :-)


-- 
Chen Gang

Asianux Corporation

^ permalink raw reply

* Re: oops in udpv6_sendmsg
From: Dave Jones @ 2013-04-11  0:29 UTC (permalink / raw)
  To: Eric Dumazet; +Cc: netdev
In-Reply-To: <1364865839.5113.165.camel@edumazet-glaptop>

On Mon, Apr 01, 2013 at 06:23:59PM -0700, Eric Dumazet wrote:
 > On Fri, 2013-03-29 at 11:49 -0700, Eric Dumazet wrote:
 > > On Fri, 2013-03-29 at 14:40 -0400, Dave Jones wrote:
 > > > Just hit this on Linus' current tree.
 > > > 
 > > > BUG: unable to handle kernel NULL pointer dereference at 0000000000000031
 > > > IP: [<ffffffff8166ca6b>] udpv6_sendmsg+0x34b/0xa90
 > > > 
 > > > Looks like the last line of an inlined __ip6_dst_store() call. So line 1243 of net/ipv6/udp.c
 > > > 
 > > > 	Dave
 > > 
 > > Yes, I had the same problem on my lab machine yesterday and was working
 > > on it (Using a linux-3.3.8 code base)
 > > 
 > > In my case, the invalid rt6i_node value was 0x66b579de
 > 
 > I am mystified by this problem, I could not reproduce it...

So right now, 3.9-rc6 is in good enough shape that this is the
only outstanding thing that I can pick up with trinity.
It still seems to take a long time to reproduce though
(Just hit it after 15 hours).

I've tried narrowing it down by reproducing with seed values
dumped shortly before the bug, but haven't had any luck,
so it must be reliant upon some earlier state.

I'm going to see if I can get it to happen faster by
restricting which syscalls get called.

Is there anything I can add to the ip6 code to print
out when it occurs that might aid in debugging ?

	Dave

^ permalink raw reply

* Re: [PATCH 1/4] Add packet recirculation
From: Simon Horman @ 2013-04-11  0:14 UTC (permalink / raw)
  To: Jesse Gross
  Cc: dev-yBygre7rU0TnMu66kgdUjQ@public.gmane.org, netdev, Ravi K,
	Isaku Yamahata
In-Reply-To: <CAEP_g=8vE9Ykdnro+Puw34ORRnPEMn1LMBxv+f7w_Dp-uty_iw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

On Wed, Apr 10, 2013 at 09:21:23AM -0700, Jesse Gross wrote:
> On Wed, Apr 10, 2013 at 2:16 AM, Simon Horman <horms-/R6kz+dDXgpPR4JQBCEnsQ@public.gmane.org> wrote:
> > On Tue, Apr 09, 2013 at 08:44:02AM -0700, Jesse Gross wrote:
> >> On Tue, Apr 9, 2013 at 12:50 AM, Simon Horman <horms-/R6kz+dDXgpPR4JQBCEnsQ@public.gmane.org> wrote:
> >> > On Mon, Apr 08, 2013 at 06:46:29PM -0700, Jesse Gross wrote:
> >> >> On Sun, Apr 7, 2013 at 11:43 PM, Simon Horman <horms-/R6kz+dDXgpPR4JQBCEnsQ@public.gmane.org> wrote:
> >> >> > diff --git a/ofproto/ofproto-dpif.c b/ofproto/ofproto-dpif.c
> >> >> > index 47830c1..5129da1 100644
> >> >> > --- a/ofproto/ofproto-dpif.c
> >> >> > +++ b/ofproto/ofproto-dpif.c
> >> >>
> >> >> I'm still working on more detailed comments for this.  However, I'm
> >> >> concerned about whether the behavior for revalidation and stats is
> >> >> correct.
> >> >
> >> > I am a little concerned about that too.
> >> > Perhaps Ben could look over it?
> >>
> >> To rephrase, there are problems in both of those areas. Validation in
> >> particular I don't think handles resubmitted facets and I believe that
> >> stats on rules will be the sum of all resubmitted passes.
> >
> > Some questions:
> > By resubmitted do you mean recirculated?
> 
> Yes.
> 
> > What is the stats behaviour that you would like?
> 
> A given rule should have byte and packet counts equal to the number of
> times it is matched (i.e. the first time) even if we have to decompose
> it into multiple passes internally.
> 
> > With regards to validation, I assume the area of concern
> > is around facet_revalidate(). I will look into that.
> 
> Yes.
> 
> >> Both of these will likely significantly affect the data structures, so
> >> please look into this before we go further.
> >
> > Sure. I was not planning to push (much) further until this series
> > is reviewed properly.
> 
> I'm planning on waiting on further reviews of this file until you've
> had a chance to look into validation and stats since I think that may
> change some of the data structures.

Sure, I assumed as much.

I'll try and prepare and post a version with those issues, and the other
ones you raised elsewhere in your review, in the not to distant future.

^ permalink raw reply

* [ 19/19] rt2x00: rt2x00pci_regbusy_read() - only print register access failure once
From: Greg Kroah-Hartman @ 2013-04-10 22:50 UTC (permalink / raw)
  To: linux-kernel-u79uwXL29TY76Z2rM5mHXA
  Cc: users-poMEt7QlJxcwIE2E9O76wjtx2kNaKg5H, Greg Kroah-Hartman,
	linux-wireless-u79uwXL29TY76Z2rM5mHXA,
	stable-u79uwXL29TY76Z2rM5mHXA, netdev-u79uwXL29TY76Z2rM5mHXA,
	Tim Gardner
In-Reply-To: <20130410225026.833809117-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org>

3.0-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Tim Gardner <tim.gardner-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>

commit 83589b30f1e1dc9898986293c9336b8ce1705dec upstream.

BugLink: http://bugs.launchpad.net/bugs/1128840

It appears that when this register read fails it never recovers, so
I think there is no need to repeat the same error message ad infinitum.

Signed-off-by: Tim Gardner <tim.gardner-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>
Cc: Ivo van Doorn <IvDoorn-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: Gertjan van Wingerde <gwingerde-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: Helmut Schaa <helmut.schaa-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>
Cc: "John W. Linville" <linville-2XuSBdqkA4R54TAoqtyWWQ@public.gmane.org>
Cc: linux-wireless-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Cc: users-poMEt7QlJxcwIE2E9O76wjtx2kNaKg5H@public.gmane.org
Cc: netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Cc: stable-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Signed-off-by: John W. Linville <linville-2XuSBdqkA4R54TAoqtyWWQ@public.gmane.org>
Signed-off-by: Greg Kroah-Hartman <gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org>

---
 drivers/net/wireless/rt2x00/rt2x00pci.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/drivers/net/wireless/rt2x00/rt2x00pci.c
+++ b/drivers/net/wireless/rt2x00/rt2x00pci.c
@@ -52,8 +52,8 @@ int rt2x00pci_regbusy_read(struct rt2x00
 		udelay(REGISTER_BUSY_DELAY);
 	}
 
-	ERROR(rt2x00dev, "Indirect register access failed: "
-	      "offset=0x%.08x, value=0x%.08x\n", offset, *reg);
+	printk_once(KERN_ERR "%s() Indirect register access failed: "
+	      "offset=0x%.08x, value=0x%.08x\n", __func__, offset, *reg);
 	*reg = ~0;
 
 	return 0;

^ permalink raw reply

* [ 29/29] rt2x00: rt2x00pci_regbusy_read() - only print register access failure once
From: Greg Kroah-Hartman @ 2013-04-10 22:49 UTC (permalink / raw)
  To: linux-kernel-u79uwXL29TY76Z2rM5mHXA
  Cc: users-poMEt7QlJxcwIE2E9O76wjtx2kNaKg5H, Greg Kroah-Hartman,
	linux-wireless-u79uwXL29TY76Z2rM5mHXA,
	stable-u79uwXL29TY76Z2rM5mHXA, netdev-u79uwXL29TY76Z2rM5mHXA,
	Tim Gardner
In-Reply-To: <20130410224804.061806042-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org>

3.4-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Tim Gardner <tim.gardner-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>

commit 83589b30f1e1dc9898986293c9336b8ce1705dec upstream.

BugLink: http://bugs.launchpad.net/bugs/1128840

It appears that when this register read fails it never recovers, so
I think there is no need to repeat the same error message ad infinitum.

Signed-off-by: Tim Gardner <tim.gardner-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>
Cc: Ivo van Doorn <IvDoorn-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: Gertjan van Wingerde <gwingerde-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: Helmut Schaa <helmut.schaa-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>
Cc: "John W. Linville" <linville-2XuSBdqkA4R54TAoqtyWWQ@public.gmane.org>
Cc: linux-wireless-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Cc: users-poMEt7QlJxcwIE2E9O76wjtx2kNaKg5H@public.gmane.org
Cc: netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Cc: stable-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Signed-off-by: John W. Linville <linville-2XuSBdqkA4R54TAoqtyWWQ@public.gmane.org>
Signed-off-by: Greg Kroah-Hartman <gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org>

---
 drivers/net/wireless/rt2x00/rt2x00pci.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/drivers/net/wireless/rt2x00/rt2x00pci.c
+++ b/drivers/net/wireless/rt2x00/rt2x00pci.c
@@ -52,8 +52,8 @@ int rt2x00pci_regbusy_read(struct rt2x00
 		udelay(REGISTER_BUSY_DELAY);
 	}
 
-	ERROR(rt2x00dev, "Indirect register access failed: "
-	      "offset=0x%.08x, value=0x%.08x\n", offset, *reg);
+	printk_once(KERN_ERR "%s() Indirect register access failed: "
+	      "offset=0x%.08x, value=0x%.08x\n", __func__, offset, *reg);
 	*reg = ~0;
 
 	return 0;

^ permalink raw reply

* [ 64/64] rt2x00: rt2x00pci_regbusy_read() - only print register access failure once
From: Greg Kroah-Hartman @ 2013-04-10 22:47 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Tim Gardner, Ivo van Doorn,
	Gertjan van Wingerde, Helmut Schaa, John W. Linville,
	linux-wireless, users, netdev
In-Reply-To: <20130410224333.114387235@linuxfoundation.org>

3.8-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Tim Gardner <tim.gardner@canonical.com>

commit 83589b30f1e1dc9898986293c9336b8ce1705dec upstream.

BugLink: http://bugs.launchpad.net/bugs/1128840

It appears that when this register read fails it never recovers, so
I think there is no need to repeat the same error message ad infinitum.

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Cc: Ivo van Doorn <IvDoorn@gmail.com>
Cc: Gertjan van Wingerde <gwingerde@gmail.com>
Cc: Helmut Schaa <helmut.schaa@googlemail.com>
Cc: "John W. Linville" <linville@tuxdriver.com>
Cc: linux-wireless@vger.kernel.org
Cc: users@rt2x00.serialmonkey.com
Cc: netdev@vger.kernel.org
Cc: stable@vger.kernel.org
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/net/wireless/rt2x00/rt2x00pci.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/drivers/net/wireless/rt2x00/rt2x00pci.c
+++ b/drivers/net/wireless/rt2x00/rt2x00pci.c
@@ -52,8 +52,8 @@ int rt2x00pci_regbusy_read(struct rt2x00
 		udelay(REGISTER_BUSY_DELAY);
 	}
 
-	ERROR(rt2x00dev, "Indirect register access failed: "
-	      "offset=0x%.08x, value=0x%.08x\n", offset, *reg);
+	printk_once(KERN_ERR "%s() Indirect register access failed: "
+	      "offset=0x%.08x, value=0x%.08x\n", __func__, offset, *reg);
 	*reg = ~0;
 
 	return 0;

^ 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