Netdev List
 help / color / mirror / Atom feed
* Re: [PATCH] skge: fix broken driver
From: Mikulas Patocka @ 2013-09-19 18:29 UTC (permalink / raw)
  To: Igor Gnatenko; +Cc: David Miller, stephen, netdev
In-Reply-To: <1379614608.2331.0.camel@ThinkPad-X230.localdomain>



On Thu, 19 Sep 2013, Igor Gnatenko wrote:

> On Thu, 2013-09-19 at 14:04 -0400, Mikulas Patocka wrote:
> > 
> > 
> > On Thu, 19 Sep 2013, David Miller wrote:
> > 
> > > From: Mikulas Patocka <mpatocka@redhat.com>
> > > Date: Thu, 19 Sep 2013 12:33:30 -0400 (EDT)
> > > 
> > > > Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
> > > > Cc: stable@kernel.org # 3.11
> > > 
> > > First, this is missing the reported-by and tested-by tags provided
> > > by people who tested this patch.
> > 
> > I noticed the problem and tested the patch on my own machine. So I added 
> > myself to these tags.
> > 
> > > Secondly, CC:'ing stable is not the correct way to submit networking
> > > patches for -stable inclusion.  You simply ask me to queue them up
> > > for -stable explicitly instead.
> > > 
> > > Please re-submit this with the currect signoffs, thank you.
> > 
> > Here I'm re-submitting it.
> > 
> > ---
> > 
> > skge: fix broken driver
> > 
> > The patch 136d8f377e1575463b47840bc5f1b22d94bf8f63 broke the skge driver.
> > Note this part of the patch:
> > +               if (skge_rx_setup(skge, e, nskb, skge->rx_buf_size) < 0) {
> > +                       dev_kfree_skb(nskb);
> > +                       goto resubmit;
> > +               }
> > +
> >                 pci_unmap_single(skge->hw->pdev,
> >                                  dma_unmap_addr(e, mapaddr),
> >                                  dma_unmap_len(e, maplen),
> >                                  PCI_DMA_FROMDEVICE);
> >                 skb = e->skb;
> >                 prefetch(skb->data);
> > -               skge_rx_setup(skge, e, nskb, skge->rx_buf_size);
> > 
> > The function skge_rx_setup modifies e->skb to point to the new skb. Thus,
> > after this change, the new buffer, not the old, is returned to the
> > networking stack.
> > 
> > This bug is present in kernels 3.11, 3.11.1 and 3.12-rc1. The patch should 
> > be queued for 3.11-stable.
> > 
> > Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
> > Reported-by: Mikulas Patocka <mpatocka@redhat.com>
> > Tested-by: Mikulas Patocka <mpatocka@redhat.com>
> > 
> > ---
> >  drivers/net/ethernet/marvell/skge.c |    5 +++--
> >  1 file changed, 3 insertions(+), 2 deletions(-)
> > 
> > Index: linux-3.11.1-fast/drivers/net/ethernet/marvell/skge.c
> > ===================================================================
> > --- linux-3.11.1-fast.orig/drivers/net/ethernet/marvell/skge.c  2013-09-10 19:46:58.000000000 +0200
> > +++ linux-3.11.1-fast/drivers/net/ethernet/marvell/skge.c       2013-09-19 18:20:43.000000000 +0200
> > @@ -3092,6 +3092,9 @@ static struct sk_buff *skge_rx_get(struc
> >                 if (!nskb)
> >                         goto resubmit;
> >  
> > +               skb = e->skb;
> > +               prefetch(skb->data);
> > +
> >                 if (skge_rx_setup(skge, e, nskb, skge->rx_buf_size) < 0) {
> >                         dev_kfree_skb(nskb);
> >                         goto resubmit;
> > @@ -3101,8 +3104,6 @@ static struct sk_buff *skge_rx_get(struc
> >                                  dma_unmap_addr(e, mapaddr),
> >                                  dma_unmap_len(e, maplen),
> >                                  PCI_DMA_FROMDEVICE);
> > -               skb = e->skb;
> > -               prefetch(skb->data);
> >         }
> >  
> >         skb_put(skb, len);
> > --
> > 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
> 
> Hey Mikulas! See https://lkml.org/lkml/2013/9/19/38 , plz.
> -- 
> Igor Gnatenko
> Fedora release 20 (Heisenbug)
> Linux 3.11.1-300.fc20.x86_64

I see. My patch is a bit simpler - it doesn't allocate the structure 
skge_element on the stack.

Mikulas

^ permalink raw reply

* Re: [PATCH -net v2 0/2] net: netpoll and netconsole fixes
From: David Miller @ 2013-09-19 18:16 UTC (permalink / raw)
  To: nikolay; +Cc: netdev
In-Reply-To: <1379595756-3527-1-git-send-email-nikolay@redhat.com>

From: Nikolay Aleksandrov <nikolay@redhat.com>
Date: Thu, 19 Sep 2013 15:02:34 +0200

> This small patchset fixes a possible race condition in netpoll_cleanup
> which can lead to a NULL pointer dereference because the check and
> manipulation of np->dev are done outside of the rtnl lock (patch 01).
> The second patch fixes a deadlock in netconsole and does a trivial comment
> style fix.

Both applied and queued up for -stable, thanks.

^ permalink raw reply

* Re: [PATCH] skge: fix broken driver
From: Igor Gnatenko @ 2013-09-19 18:16 UTC (permalink / raw)
  To: Mikulas Patocka; +Cc: David Miller, stephen, netdev
In-Reply-To: <alpine.LRH.2.02.1309191359300.12162@file01.intranet.prod.int.rdu2.redhat.com>

On Thu, 2013-09-19 at 14:04 -0400, Mikulas Patocka wrote:
> 
> 
> On Thu, 19 Sep 2013, David Miller wrote:
> 
> > From: Mikulas Patocka <mpatocka@redhat.com>
> > Date: Thu, 19 Sep 2013 12:33:30 -0400 (EDT)
> > 
> > > Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
> > > Cc: stable@kernel.org # 3.11
> > 
> > First, this is missing the reported-by and tested-by tags provided
> > by people who tested this patch.
> 
> I noticed the problem and tested the patch on my own machine. So I added 
> myself to these tags.
> 
> > Secondly, CC:'ing stable is not the correct way to submit networking
> > patches for -stable inclusion.  You simply ask me to queue them up
> > for -stable explicitly instead.
> > 
> > Please re-submit this with the currect signoffs, thank you.
> 
> Here I'm re-submitting it.
> 
> ---
> 
> skge: fix broken driver
> 
> The patch 136d8f377e1575463b47840bc5f1b22d94bf8f63 broke the skge driver.
> Note this part of the patch:
> +               if (skge_rx_setup(skge, e, nskb, skge->rx_buf_size) < 0) {
> +                       dev_kfree_skb(nskb);
> +                       goto resubmit;
> +               }
> +
>                 pci_unmap_single(skge->hw->pdev,
>                                  dma_unmap_addr(e, mapaddr),
>                                  dma_unmap_len(e, maplen),
>                                  PCI_DMA_FROMDEVICE);
>                 skb = e->skb;
>                 prefetch(skb->data);
> -               skge_rx_setup(skge, e, nskb, skge->rx_buf_size);
> 
> The function skge_rx_setup modifies e->skb to point to the new skb. Thus,
> after this change, the new buffer, not the old, is returned to the
> networking stack.
> 
> This bug is present in kernels 3.11, 3.11.1 and 3.12-rc1. The patch should 
> be queued for 3.11-stable.
> 
> Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
> Reported-by: Mikulas Patocka <mpatocka@redhat.com>
> Tested-by: Mikulas Patocka <mpatocka@redhat.com>
> 
> ---
>  drivers/net/ethernet/marvell/skge.c |    5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> Index: linux-3.11.1-fast/drivers/net/ethernet/marvell/skge.c
> ===================================================================
> --- linux-3.11.1-fast.orig/drivers/net/ethernet/marvell/skge.c  2013-09-10 19:46:58.000000000 +0200
> +++ linux-3.11.1-fast/drivers/net/ethernet/marvell/skge.c       2013-09-19 18:20:43.000000000 +0200
> @@ -3092,6 +3092,9 @@ static struct sk_buff *skge_rx_get(struc
>                 if (!nskb)
>                         goto resubmit;
>  
> +               skb = e->skb;
> +               prefetch(skb->data);
> +
>                 if (skge_rx_setup(skge, e, nskb, skge->rx_buf_size) < 0) {
>                         dev_kfree_skb(nskb);
>                         goto resubmit;
> @@ -3101,8 +3104,6 @@ static struct sk_buff *skge_rx_get(struc
>                                  dma_unmap_addr(e, mapaddr),
>                                  dma_unmap_len(e, maplen),
>                                  PCI_DMA_FROMDEVICE);
> -               skb = e->skb;
> -               prefetch(skb->data);
>         }
>  
>         skb_put(skb, len);
> --
> 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

Hey Mikulas! See https://lkml.org/lkml/2013/9/19/38 , plz.
-- 
Igor Gnatenko
Fedora release 20 (Heisenbug)
Linux 3.11.1-300.fc20.x86_64

^ permalink raw reply

* Re: [PATCH v2] skge: fix broken driver
From: David Miller @ 2013-09-19 18:15 UTC (permalink / raw)
  To: mpatocka; +Cc: stephen, netdev, vascom2
In-Reply-To: <alpine.LRH.2.02.1309191409301.12162@file01.intranet.prod.int.rdu2.redhat.com>

From: Mikulas Patocka <mpatocka@redhat.com>
Date: Thu, 19 Sep 2013 14:13:17 -0400 (EDT)

> The patch 136d8f377e1575463b47840bc5f1b22d94bf8f63 broke the skge driver.
> Note this part of the patch:
> +               if (skge_rx_setup(skge, e, nskb, skge->rx_buf_size) < 0) {
> +                       dev_kfree_skb(nskb);
> +                       goto resubmit;
> +               }
> +
>                 pci_unmap_single(skge->hw->pdev,
>                                  dma_unmap_addr(e, mapaddr),
>                                  dma_unmap_len(e, maplen),
>                                  PCI_DMA_FROMDEVICE);
>                 skb = e->skb;
>                 prefetch(skb->data);
> -               skge_rx_setup(skge, e, nskb, skge->rx_buf_size);
> 
> The function skge_rx_setup modifies e->skb to point to the new skb. Thus,
> after this change, the new buffer, not the old, is returned to the
> networking stack.
> 
> This bug is present in kernels 3.11, 3.11.1 and 3.12-rc1. The patch should 
> be queued for 3.11-stable.
> 
> Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
> Reported-by: Mikulas Patocka <mpatocka@redhat.com>
> Reported-by: Vasiliy Glazov <vascom2@gmail.com>
> Tested-by: Mikulas Patocka <mpatocka@redhat.com>

Applied and queued up for -stable, thanks.

^ permalink raw reply

* [PATCH v2] skge: fix broken driver
From: Mikulas Patocka @ 2013-09-19 18:13 UTC (permalink / raw)
  To: David Miller; +Cc: stephen, netdev, Vasiliy Glazov

The patch 136d8f377e1575463b47840bc5f1b22d94bf8f63 broke the skge driver.
Note this part of the patch:
+               if (skge_rx_setup(skge, e, nskb, skge->rx_buf_size) < 0) {
+                       dev_kfree_skb(nskb);
+                       goto resubmit;
+               }
+
                pci_unmap_single(skge->hw->pdev,
                                 dma_unmap_addr(e, mapaddr),
                                 dma_unmap_len(e, maplen),
                                 PCI_DMA_FROMDEVICE);
                skb = e->skb;
                prefetch(skb->data);
-               skge_rx_setup(skge, e, nskb, skge->rx_buf_size);

The function skge_rx_setup modifies e->skb to point to the new skb. Thus,
after this change, the new buffer, not the old, is returned to the
networking stack.

This bug is present in kernels 3.11, 3.11.1 and 3.12-rc1. The patch should 
be queued for 3.11-stable.

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Reported-by: Mikulas Patocka <mpatocka@redhat.com>
Reported-by: Vasiliy Glazov <vascom2@gmail.com>
Tested-by: Mikulas Patocka <mpatocka@redhat.com>

---
 drivers/net/ethernet/marvell/skge.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

Index: linux-3.11.1-fast/drivers/net/ethernet/marvell/skge.c
===================================================================
--- linux-3.11.1-fast.orig/drivers/net/ethernet/marvell/skge.c	2013-09-10 19:46:58.000000000 +0200
+++ linux-3.11.1-fast/drivers/net/ethernet/marvell/skge.c	2013-09-19 18:20:43.000000000 +0200
@@ -3092,6 +3092,9 @@ static struct sk_buff *skge_rx_get(struc
 		if (!nskb)
 			goto resubmit;
 
+		skb = e->skb;
+		prefetch(skb->data);
+
 		if (skge_rx_setup(skge, e, nskb, skge->rx_buf_size) < 0) {
 			dev_kfree_skb(nskb);
 			goto resubmit;
@@ -3101,8 +3104,6 @@ static struct sk_buff *skge_rx_get(struc
 				 dma_unmap_addr(e, mapaddr),
 				 dma_unmap_len(e, maplen),
 				 PCI_DMA_FROMDEVICE);
-		skb = e->skb;
-		prefetch(skb->data);
 	}
 
 	skb_put(skb, len);

^ permalink raw reply

* Re: [PATCH net v2 2/2] ip: generate unique IP identificator if local fragmentation is allowed
From: David Miller @ 2013-09-19 18:11 UTC (permalink / raw)
  To: aatteka; +Cc: netdev
In-Reply-To: <1379543393-7446-2-git-send-email-aatteka@nicira.com>

From: Ansis Atteka <aatteka@nicira.com>
Date: Wed, 18 Sep 2013 15:29:53 -0700

> If local fragmentation is allowed, then ip_select_ident() and
> ip_select_ident_more() need to generate unique IDs to ensure
> correct defragmentation on the peer.
> 
> For example, if IPsec (tunnel mode) has to encrypt large skbs
> that have local_df bit set, then all IP fragments that belonged
> to different ESP datagrams would have used the same identificator.
> If one of these IP fragments would get lost or reordered, then
> peer could possibly stitch together wrong IP fragments that did
> not belong to the same datagram. This would lead to a packet loss
> or data corruption.
> 
> Signed-off-by: Ansis Atteka <aatteka@nicira.com>

Applied.

^ permalink raw reply

* Re: [PATCH net v2 1/2] ip: use ip_hdr() in __ip_make_skb() to retrieve IP header
From: David Miller @ 2013-09-19 18:11 UTC (permalink / raw)
  To: aatteka; +Cc: netdev
In-Reply-To: <1379543393-7446-1-git-send-email-aatteka@nicira.com>

From: Ansis Atteka <aatteka@nicira.com>
Date: Wed, 18 Sep 2013 15:29:52 -0700

> skb->data already points to IP header, but for the sake of
> consistency we can also use ip_hdr() to retrieve it.
> 
> Signed-off-by: Ansis Atteka <aatteka@nicira.com>

Applied.

^ permalink raw reply

* Re: [PATCH] phy/micrel: Add suspend/resume support to Micrel PHYs
From: David Miller @ 2013-09-19 18:08 UTC (permalink / raw)
  To: nicolas.ferre
  Cc: netdev, b.brezillon, f.fainelli, linux-kernel, linux-arm-kernel,
	patrice.vilchez, david.choi
In-Reply-To: <1379612448-20805-1-git-send-email-nicolas.ferre@atmel.com>

From: Nicolas Ferre <nicolas.ferre@atmel.com>
Date: Thu, 19 Sep 2013 19:40:48 +0200

> From: Patrice Vilchez <patrice.vilchez@atmel.com>
> 
> All supported Micrel PHYs implement the standard "power down" bit 11 of BMCR,
> so this patch adds support using the generic genphy_{suspend,resume} functions.
> 
> Signed-off-by: Patrice Vilchez <patrice.vilchez@atmel.com>
> [b.brezillon@overkiz.com: adapt to newer kernel and generalize to other phys]
> Signed-off-by: Boris BREZILLON <b.brezillon@overkiz.com>
> [nicolas.ferre@atmel.com: commit message modification]
> Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
> Cc: David J. Choi <david.choi@micrel.com>

What's the difference between this patch and the one you sent 60
seconds beforehand?

^ permalink raw reply

* Re: [PATCH] skge: fix broken driver
From: David Miller @ 2013-09-19 18:07 UTC (permalink / raw)
  To: mpatocka; +Cc: stephen, netdev
In-Reply-To: <alpine.LRH.2.02.1309191359300.12162@file01.intranet.prod.int.rdu2.redhat.com>

From: Mikulas Patocka <mpatocka@redhat.com>
Date: Thu, 19 Sep 2013 14:04:38 -0400 (EDT)

> Here I'm re-submitting it.

Please do not hijack an existing discussions to resubmit the patch.

Instead, make a fresh, completely new, mailing list posting for the
patch submissions.

Thank you.

^ permalink raw reply

* Re: [PATCH net-next v4] Don't destroy the netdev until the vif is shut down
From: David Miller @ 2013-09-19 18:05 UTC (permalink / raw)
  To: paul.durrant; +Cc: xen-devel, netdev, david.vrabel, wei.liu2, ian.campbell
In-Reply-To: <1379436368-6882-1-git-send-email-paul.durrant@citrix.com>

From: Paul Durrant <paul.durrant@citrix.com>
Date: Tue, 17 Sep 2013 17:46:08 +0100

> Without this patch, if a frontend cycles through states Closing
> and Closed (which Windows frontends need to do) then the netdev
> will be destroyed and requires re-invocation of hotplug scripts
> to restore state before the frontend can move to Connected. Thus
> when udev is not in use the backend gets stuck in InitWait.
> 
> With this patch, the netdev is left alone whilst the backend is
> still online and is only de-registered and freed just prior to
> destroying the vif (which is also nicely symmetrical with the
> netdev allocation and registration being done during probe) so
> no re-invocation of hotplug scripts is required.
> 
> Signed-off-by: Paul Durrant <paul.durrant@citrix.com>

I think all of the testing requests have been satisfied so I have
applied this.

But _please_ write a more proper subject line in future patch
submissions.  You have to provide a subsystem prefix in the
subject line, here I added "xen-netback: ", otherwise someone
skimming the shortlog has no idea what area of code this change
touches.

Thanks.

^ permalink raw reply

* Re: [PATCH] skge: fix broken driver
From: Mikulas Patocka @ 2013-09-19 18:04 UTC (permalink / raw)
  To: David Miller; +Cc: stephen, netdev
In-Reply-To: <20130919.135628.1201613770803318193.davem@davemloft.net>



On Thu, 19 Sep 2013, David Miller wrote:

> From: Mikulas Patocka <mpatocka@redhat.com>
> Date: Thu, 19 Sep 2013 12:33:30 -0400 (EDT)
> 
> > Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
> > Cc: stable@kernel.org # 3.11
> 
> First, this is missing the reported-by and tested-by tags provided
> by people who tested this patch.

I noticed the problem and tested the patch on my own machine. So I added 
myself to these tags.

> Secondly, CC:'ing stable is not the correct way to submit networking
> patches for -stable inclusion.  You simply ask me to queue them up
> for -stable explicitly instead.
> 
> Please re-submit this with the currect signoffs, thank you.

Here I'm re-submitting it.

---

skge: fix broken driver

The patch 136d8f377e1575463b47840bc5f1b22d94bf8f63 broke the skge driver.
Note this part of the patch:
+               if (skge_rx_setup(skge, e, nskb, skge->rx_buf_size) < 0) {
+                       dev_kfree_skb(nskb);
+                       goto resubmit;
+               }
+
                pci_unmap_single(skge->hw->pdev,
                                 dma_unmap_addr(e, mapaddr),
                                 dma_unmap_len(e, maplen),
                                 PCI_DMA_FROMDEVICE);
                skb = e->skb;
                prefetch(skb->data);
-               skge_rx_setup(skge, e, nskb, skge->rx_buf_size);

The function skge_rx_setup modifies e->skb to point to the new skb. Thus,
after this change, the new buffer, not the old, is returned to the
networking stack.

This bug is present in kernels 3.11, 3.11.1 and 3.12-rc1. The patch should 
be queued for 3.11-stable.

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Reported-by: Mikulas Patocka <mpatocka@redhat.com>
Tested-by: Mikulas Patocka <mpatocka@redhat.com>

---
 drivers/net/ethernet/marvell/skge.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

Index: linux-3.11.1-fast/drivers/net/ethernet/marvell/skge.c
===================================================================
--- linux-3.11.1-fast.orig/drivers/net/ethernet/marvell/skge.c	2013-09-10 19:46:58.000000000 +0200
+++ linux-3.11.1-fast/drivers/net/ethernet/marvell/skge.c	2013-09-19 18:20:43.000000000 +0200
@@ -3092,6 +3092,9 @@ static struct sk_buff *skge_rx_get(struc
 		if (!nskb)
 			goto resubmit;
 
+		skb = e->skb;
+		prefetch(skb->data);
+
 		if (skge_rx_setup(skge, e, nskb, skge->rx_buf_size) < 0) {
 			dev_kfree_skb(nskb);
 			goto resubmit;
@@ -3101,8 +3104,6 @@ static struct sk_buff *skge_rx_get(struc
 				 dma_unmap_addr(e, mapaddr),
 				 dma_unmap_len(e, maplen),
 				 PCI_DMA_FROMDEVICE);
-		skb = e->skb;
-		prefetch(skb->data);
 	}
 
 	skb_put(skb, len);

^ permalink raw reply

* Re: [PATCH ] ipv6: handle the update of the NDISC_REDIRECT error code in icmpv6_err_convert
From: David Miller @ 2013-09-19 18:02 UTC (permalink / raw)
  To: djduanjiong; +Cc: duanj.fnst, netdev
In-Reply-To: <523A8A74.30005@gmail.com>

From: Duan Jiong <djduanjiong@gmail.com>
Date: Thu, 19 Sep 2013 13:24:04 +0800

> 于 2013/9/19 0:36, David Miller 写道:
>> From: Duan Jiong <duanj.fnst@cn.fujitsu.com>
>> Date: Wed, 18 Sep 2013 20:04:48 +0800
>>
>>> From: Duan Jiong <duanj.fnst@cn.fujitsu.com>
>>>
>>> when dealing with redirect message in udpv6_err() and
>>> rawv6_err() the err shoud be assigned to 0, not EPROTO.
>>>
>>> Signed-off-by: Duan Jiong <duanj.fnst@cn.fujitsu.com>
>> No, you should fix this the same way you handled DCCP, but skipping
>> the whole socket error setting path for NDISC_REDIRECT.
> 
> Your meaning is that we should return directly after calling
> ip6_sk_redirect(), is that it?

It depends upon whether udp/raw sockets are expected to receive redirect
notifications this way, are they?  You seem to believe so.

^ permalink raw reply

* Re: [PATCH v2] ip6tnl: do route updating for redirect in ip6_tnl_err()
From: David Miller @ 2013-09-19 18:02 UTC (permalink / raw)
  To: djduanjiong; +Cc: netdev, duanj.fnst
In-Reply-To: <1379474877-3097-1-git-send-email-duanj.fnst@cn.fujitsu.com>

From: Duan Jiong <djduanjiong@gmail.com>
Date: Tue, 17 Sep 2013 20:27:57 -0700

> After the ip6_tnl_err() is called, the rel_msg is assigned to
> 0, and the ip4ip6_err() will return directly, the instruction
> below will not be executed.
> 
> In rfc2473, we can know that the tunnel ICMP redirect message
> should not be reported to the source of the original packet,
> so we can handle it in ip6_tnl_err().
> 
> Signed-off-by: Duan Jiong <duanj.fnst@cn.fujitsu.com>

I do not think this change is correct.

> @@ -576,9 +579,6 @@ ip4ip6_err(struct sk_buff *skb, struct inet6_skb_parm *opt,
>  		rel_type = ICMP_DEST_UNREACH;
>  		rel_code = ICMP_FRAG_NEEDED;
>  		break;
> -	case NDISC_REDIRECT:
> -		rel_type = ICMP_REDIRECT;
> -		rel_code = ICMP_REDIR_HOST;
>  	default:
>  		return 0;
>  	}

The bug is a missing "break;" statement for this case, and:

> @@ -637,8 +637,6 @@ ip4ip6_err(struct sk_buff *skb, struct inet6_skb_parm *opt,
>  
>  		skb_dst(skb2)->ops->update_pmtu(skb_dst(skb2), NULL, skb2, rel_info);
>  	}
> -	if (rel_type == ICMP_REDIRECT)
> -		skb_dst(skb2)->ops->redirect(skb_dst(skb2), NULL, skb2);
>  

We absolutely must run the ipv4 dst_ops redirect handler here so you must
keep this code around as well.

The only change you need to make is to add the missing break;
statement to ip4ip6_err() and then also add appropriate NDISC_REDIRECT
handling to ip6ip6_err().

^ permalink raw reply

* Re: [PATCH] skge: fix broken driver
From: David Miller @ 2013-09-19 17:56 UTC (permalink / raw)
  To: mpatocka; +Cc: stephen, netdev
In-Reply-To: <alpine.LRH.2.02.1309191229480.32035@file01.intranet.prod.int.rdu2.redhat.com>

From: Mikulas Patocka <mpatocka@redhat.com>
Date: Thu, 19 Sep 2013 12:33:30 -0400 (EDT)

> Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
> Cc: stable@kernel.org # 3.11

First, this is missing the reported-by and tested-by tags provided
by people who tested this patch.

Secondly, CC:'ing stable is not the correct way to submit networking
patches for -stable inclusion.  You simply ask me to queue them up
for -stable explicitly instead.

Please re-submit this with the currect signoffs, thank you.

^ permalink raw reply

* Re: [PATCH] sfc: Fix efx_rx_buf_offset() for recycled pages
From: David Miller @ 2013-09-19 17:43 UTC (permalink / raw)
  To: bhutchings; +Cc: stable, netdev
In-Reply-To: <1379607231.1514.13.camel@bwh-desktop.uk.level5networks.com>

From: Ben Hutchings <bhutchings@solarflare.com>
Date: Thu, 19 Sep 2013 17:13:51 +0100

> This bug fix is only for stable branches older than 3.10.  The bug was
> fixed upstream by commit 2768935a4660 ('sfc: reuse pages to avoid DMA
> mapping/unmapping costs'), but that change is totally unsuitable for
> stable.
> 
> Commit b590ace09d51 ('sfc: Fix efx_rx_buf_offset() in the presence of
> swiotlb') added an explicit page_offset member to struct
> efx_rx_buffer, which must be set consistently with the u.page and
> dma_addr fields.  However, it failed to add the necessary assignment
> in efx_resurrect_rx_buffer().  It also did not correct the calculation
> of efx_rx_buffer::dma_addr in efx_resurrect_rx_buffer(), which assumes
> that DMA-mapping a page will result in a page-aligned DMA address
> (exactly what swiotlb violates).
> 
> Add the assignment of efx_rx_buffer::page_offset and change the
> calculation of dma_addr to make use of it.

No objections.

^ permalink raw reply

* [PATCH] phy/micrel: Add suspend/resume support to Micrel PHYs
From: Nicolas Ferre @ 2013-09-19 17:40 UTC (permalink / raw)
  To: davem, netdev
  Cc: b.brezillon, f.fainelli, linux-kernel, linux-arm-kernel,
	Patrice Vilchez, Nicolas Ferre, David J. Choi

From: Patrice Vilchez <patrice.vilchez@atmel.com>

All supported Micrel PHYs implement the standard "power down" bit 11 of BMCR,
so this patch adds support using the generic genphy_{suspend,resume} functions.

Signed-off-by: Patrice Vilchez <patrice.vilchez@atmel.com>
[b.brezillon@overkiz.com: adapt to newer kernel and generalize to other phys]
Signed-off-by: Boris BREZILLON <b.brezillon@overkiz.com>
[nicolas.ferre@atmel.com: commit message modification]
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Cc: David J. Choi <david.choi@micrel.com>
---
 drivers/net/phy/micrel.c | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/drivers/net/phy/micrel.c b/drivers/net/phy/micrel.c
index c31aad0..3ae28f4 100644
--- a/drivers/net/phy/micrel.c
+++ b/drivers/net/phy/micrel.c
@@ -287,6 +287,8 @@ static struct phy_driver ksphy_driver[] = {
 	.read_status	= genphy_read_status,
 	.ack_interrupt	= kszphy_ack_interrupt,
 	.config_intr	= ks8737_config_intr,
+	.suspend	= genphy_suspend,
+	.resume		= genphy_resume,
 	.driver		= { .owner = THIS_MODULE,},
 }, {
 	.phy_id		= PHY_ID_KSZ8021,
@@ -300,6 +302,8 @@ static struct phy_driver ksphy_driver[] = {
 	.read_status	= genphy_read_status,
 	.ack_interrupt	= kszphy_ack_interrupt,
 	.config_intr	= kszphy_config_intr,
+	.suspend	= genphy_suspend,
+	.resume		= genphy_resume,
 	.driver		= { .owner = THIS_MODULE,},
 }, {
 	.phy_id		= PHY_ID_KSZ8031,
@@ -313,6 +317,8 @@ static struct phy_driver ksphy_driver[] = {
 	.read_status	= genphy_read_status,
 	.ack_interrupt	= kszphy_ack_interrupt,
 	.config_intr	= kszphy_config_intr,
+	.suspend	= genphy_suspend,
+	.resume		= genphy_resume,
 	.driver		= { .owner = THIS_MODULE,},
 }, {
 	.phy_id		= PHY_ID_KSZ8041,
@@ -326,6 +332,8 @@ static struct phy_driver ksphy_driver[] = {
 	.read_status	= genphy_read_status,
 	.ack_interrupt	= kszphy_ack_interrupt,
 	.config_intr	= kszphy_config_intr,
+	.suspend	= genphy_suspend,
+	.resume		= genphy_resume,
 	.driver		= { .owner = THIS_MODULE,},
 }, {
 	.phy_id		= PHY_ID_KSZ8051,
@@ -339,6 +347,8 @@ static struct phy_driver ksphy_driver[] = {
 	.read_status	= genphy_read_status,
 	.ack_interrupt	= kszphy_ack_interrupt,
 	.config_intr	= kszphy_config_intr,
+	.suspend	= genphy_suspend,
+	.resume		= genphy_resume,
 	.driver		= { .owner = THIS_MODULE,},
 }, {
 	.phy_id		= PHY_ID_KSZ8001,
@@ -351,6 +361,8 @@ static struct phy_driver ksphy_driver[] = {
 	.read_status	= genphy_read_status,
 	.ack_interrupt	= kszphy_ack_interrupt,
 	.config_intr	= kszphy_config_intr,
+	.suspend	= genphy_suspend,
+	.resume		= genphy_resume,
 	.driver		= { .owner = THIS_MODULE,},
 }, {
 	.phy_id		= PHY_ID_KSZ8081,
@@ -363,6 +375,8 @@ static struct phy_driver ksphy_driver[] = {
 	.read_status	= genphy_read_status,
 	.ack_interrupt	= kszphy_ack_interrupt,
 	.config_intr	= kszphy_config_intr,
+	.suspend	= genphy_suspend,
+	.resume		= genphy_resume,
 	.driver		= { .owner = THIS_MODULE,},
 }, {
 	.phy_id		= PHY_ID_KSZ8061,
@@ -375,6 +389,8 @@ static struct phy_driver ksphy_driver[] = {
 	.read_status	= genphy_read_status,
 	.ack_interrupt	= kszphy_ack_interrupt,
 	.config_intr	= kszphy_config_intr,
+	.suspend	= genphy_suspend,
+	.resume		= genphy_resume,
 	.driver		= { .owner = THIS_MODULE,},
 }, {
 	.phy_id		= PHY_ID_KSZ9021,
@@ -387,6 +403,8 @@ static struct phy_driver ksphy_driver[] = {
 	.read_status	= genphy_read_status,
 	.ack_interrupt	= kszphy_ack_interrupt,
 	.config_intr	= ksz9021_config_intr,
+	.suspend	= genphy_suspend,
+	.resume		= genphy_resume,
 	.driver		= { .owner = THIS_MODULE, },
 }, {
 	.phy_id		= PHY_ID_KSZ9031,
@@ -400,6 +418,8 @@ static struct phy_driver ksphy_driver[] = {
 	.read_status	= genphy_read_status,
 	.ack_interrupt	= kszphy_ack_interrupt,
 	.config_intr	= ksz9021_config_intr,
+	.suspend	= genphy_suspend,
+	.resume		= genphy_resume,
 	.driver		= { .owner = THIS_MODULE, },
 }, {
 	.phy_id		= PHY_ID_KSZ8873MLL,
@@ -410,6 +430,8 @@ static struct phy_driver ksphy_driver[] = {
 	.config_init	= kszphy_config_init,
 	.config_aneg	= ksz8873mll_config_aneg,
 	.read_status	= ksz8873mll_read_status,
+	.suspend	= genphy_suspend,
+	.resume		= genphy_resume,
 	.driver		= { .owner = THIS_MODULE, },
 }, {
 	.phy_id		= PHY_ID_KSZ886X,
@@ -420,6 +442,8 @@ static struct phy_driver ksphy_driver[] = {
 	.config_init	= kszphy_config_init,
 	.config_aneg	= genphy_config_aneg,
 	.read_status	= genphy_read_status,
+	.suspend	= genphy_suspend,
+	.resume		= genphy_resume,
 	.driver		= { .owner = THIS_MODULE, },
 } };
 
-- 
1.8.2.2

^ permalink raw reply related

* [PATCH] phy/micrel: Add suspend/resume support to Micrel PHYs
From: Nicolas Ferre @ 2013-09-19 17:39 UTC (permalink / raw)
  To: davem, netdev
  Cc: f.fainelli, linux-kernel, linux-arm-kernel, Patrice Vilchez,
	Nicolas Ferre, David J. Choi

From: Patrice Vilchez <patrice.vilchez@atmel.com>

All supported Micrel PHYs implement the standard "power down" bit 11 of BMCR,
so this patch adds support using the generic genphy_{suspend,resume} functions.

Signed-off-by: Patrice Vilchez <patrice.vilchez@atmel.com>
[b.brezillon@overkiz.com: adapt to newer kernel and generalize to other phys]
Signed-off-by: Boris BREZILLON <b.brezillon@overkiz.com>
[nicolas.ferre@atmel.com: commit message modification]
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Cc: David J. Choi <david.choi@micrel.com>
---
 drivers/net/phy/micrel.c | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/drivers/net/phy/micrel.c b/drivers/net/phy/micrel.c
index c31aad0..3ae28f4 100644
--- a/drivers/net/phy/micrel.c
+++ b/drivers/net/phy/micrel.c
@@ -287,6 +287,8 @@ static struct phy_driver ksphy_driver[] = {
 	.read_status	= genphy_read_status,
 	.ack_interrupt	= kszphy_ack_interrupt,
 	.config_intr	= ks8737_config_intr,
+	.suspend	= genphy_suspend,
+	.resume		= genphy_resume,
 	.driver		= { .owner = THIS_MODULE,},
 }, {
 	.phy_id		= PHY_ID_KSZ8021,
@@ -300,6 +302,8 @@ static struct phy_driver ksphy_driver[] = {
 	.read_status	= genphy_read_status,
 	.ack_interrupt	= kszphy_ack_interrupt,
 	.config_intr	= kszphy_config_intr,
+	.suspend	= genphy_suspend,
+	.resume		= genphy_resume,
 	.driver		= { .owner = THIS_MODULE,},
 }, {
 	.phy_id		= PHY_ID_KSZ8031,
@@ -313,6 +317,8 @@ static struct phy_driver ksphy_driver[] = {
 	.read_status	= genphy_read_status,
 	.ack_interrupt	= kszphy_ack_interrupt,
 	.config_intr	= kszphy_config_intr,
+	.suspend	= genphy_suspend,
+	.resume		= genphy_resume,
 	.driver		= { .owner = THIS_MODULE,},
 }, {
 	.phy_id		= PHY_ID_KSZ8041,
@@ -326,6 +332,8 @@ static struct phy_driver ksphy_driver[] = {
 	.read_status	= genphy_read_status,
 	.ack_interrupt	= kszphy_ack_interrupt,
 	.config_intr	= kszphy_config_intr,
+	.suspend	= genphy_suspend,
+	.resume		= genphy_resume,
 	.driver		= { .owner = THIS_MODULE,},
 }, {
 	.phy_id		= PHY_ID_KSZ8051,
@@ -339,6 +347,8 @@ static struct phy_driver ksphy_driver[] = {
 	.read_status	= genphy_read_status,
 	.ack_interrupt	= kszphy_ack_interrupt,
 	.config_intr	= kszphy_config_intr,
+	.suspend	= genphy_suspend,
+	.resume		= genphy_resume,
 	.driver		= { .owner = THIS_MODULE,},
 }, {
 	.phy_id		= PHY_ID_KSZ8001,
@@ -351,6 +361,8 @@ static struct phy_driver ksphy_driver[] = {
 	.read_status	= genphy_read_status,
 	.ack_interrupt	= kszphy_ack_interrupt,
 	.config_intr	= kszphy_config_intr,
+	.suspend	= genphy_suspend,
+	.resume		= genphy_resume,
 	.driver		= { .owner = THIS_MODULE,},
 }, {
 	.phy_id		= PHY_ID_KSZ8081,
@@ -363,6 +375,8 @@ static struct phy_driver ksphy_driver[] = {
 	.read_status	= genphy_read_status,
 	.ack_interrupt	= kszphy_ack_interrupt,
 	.config_intr	= kszphy_config_intr,
+	.suspend	= genphy_suspend,
+	.resume		= genphy_resume,
 	.driver		= { .owner = THIS_MODULE,},
 }, {
 	.phy_id		= PHY_ID_KSZ8061,
@@ -375,6 +389,8 @@ static struct phy_driver ksphy_driver[] = {
 	.read_status	= genphy_read_status,
 	.ack_interrupt	= kszphy_ack_interrupt,
 	.config_intr	= kszphy_config_intr,
+	.suspend	= genphy_suspend,
+	.resume		= genphy_resume,
 	.driver		= { .owner = THIS_MODULE,},
 }, {
 	.phy_id		= PHY_ID_KSZ9021,
@@ -387,6 +403,8 @@ static struct phy_driver ksphy_driver[] = {
 	.read_status	= genphy_read_status,
 	.ack_interrupt	= kszphy_ack_interrupt,
 	.config_intr	= ksz9021_config_intr,
+	.suspend	= genphy_suspend,
+	.resume		= genphy_resume,
 	.driver		= { .owner = THIS_MODULE, },
 }, {
 	.phy_id		= PHY_ID_KSZ9031,
@@ -400,6 +418,8 @@ static struct phy_driver ksphy_driver[] = {
 	.read_status	= genphy_read_status,
 	.ack_interrupt	= kszphy_ack_interrupt,
 	.config_intr	= ksz9021_config_intr,
+	.suspend	= genphy_suspend,
+	.resume		= genphy_resume,
 	.driver		= { .owner = THIS_MODULE, },
 }, {
 	.phy_id		= PHY_ID_KSZ8873MLL,
@@ -410,6 +430,8 @@ static struct phy_driver ksphy_driver[] = {
 	.config_init	= kszphy_config_init,
 	.config_aneg	= ksz8873mll_config_aneg,
 	.read_status	= ksz8873mll_read_status,
+	.suspend	= genphy_suspend,
+	.resume		= genphy_resume,
 	.driver		= { .owner = THIS_MODULE, },
 }, {
 	.phy_id		= PHY_ID_KSZ886X,
@@ -420,6 +442,8 @@ static struct phy_driver ksphy_driver[] = {
 	.config_init	= kszphy_config_init,
 	.config_aneg	= genphy_config_aneg,
 	.read_status	= genphy_read_status,
+	.suspend	= genphy_suspend,
+	.resume		= genphy_resume,
 	.driver		= { .owner = THIS_MODULE, },
 } };
 
-- 
1.8.2.2

^ permalink raw reply related

* Re: [PATCH v2.39 7/7] datapath: Add basic MPLS support to kernel
From: Jesse Gross @ 2013-09-19 17:31 UTC (permalink / raw)
  To: Simon Horman
  Cc: Pravin Shelar, dev@openvswitch.org, netdev, Ravi K,
	Isaku Yamahata, Joe Stringer
In-Reply-To: <20130918220756.GA24919@verge.net.au>

On Wed, Sep 18, 2013 at 5:07 PM, Simon Horman <horms@verge.net.au> wrote:
> On Tue, Sep 17, 2013 at 11:38:18AM -0700, Pravin Shelar wrote:
>> On Mon, Sep 9, 2013 at 12:20 AM, Simon Horman <horms@verge.net.au> wrote:
>> > diff --git a/datapath/datapath.h b/datapath/datapath.h
>> > index 5d50dd4..babae3b 100644
>> > --- a/datapath/datapath.h
>> > +++ b/datapath/datapath.h
>> > @@ -36,6 +36,10 @@
>> >
>> >  #define SAMPLE_ACTION_DEPTH 3
>> >
>> > +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0)
>> > +#define HAVE_INNER_PROTOCOL
>> > +#endif
>> > +
>> >  /**
>> >   * struct dp_stats_percpu - per-cpu packet processing statistics for a given
>> >   * datapath.
>> > @@ -93,11 +97,16 @@ struct datapath {
>> >   * @pkt_key: The flow information extracted from the packet.  Must be nonnull.
>> >   * @tun_key: Key for the tunnel that encapsulated this packet. NULL if the
>> >   * packet is not being tunneled.
>> > + * @inner_protocol: Provides a substitute for the skb->inner_protocol field on
>> > + * kernels before 3.11.
>> >   */
>> >  struct ovs_skb_cb {
>> >         struct sw_flow          *flow;
>> >         struct sw_flow_key      *pkt_key;
>> >         struct ovs_key_ipv4_tunnel  *tun_key;
>> > +#ifndef HAVE_INNER_PROTOCOL
>> > +       __be16                  inner_protocol;
>> > +#endif
>> >  };
>> >  #define OVS_CB(skb) ((struct ovs_skb_cb *)(skb)->cb)
>> >
>> Can you move this to compat struct ovs_gso_cb {}
>
> I think that you are correct and inner_protocol needs
> to be in struct ovs_gso_cb so that it can
> be accessed via skb_network_protocol() from
> rpl___skb_gso_segment().
>
> However I think it may also need to be present in struct ovs_cb
> so that it can be set correctly.
>
> Currently it is set unconditionally
> in ovs_execute_actions() and Jesse has suggested setting
> it conditionally in pop_mpls() (which is called by do_execute_actions()).
> But regardless it seems to me that the field would need to be available
> in struct ovs_cb.

Since the helper functions are also in the compat code, I think they
should have access to ovs_gso_cb.

>> I think we can simplify code by pushing vlan and then segmenting skb,
>> the way we do it for MPLS.
>
> Are you thinking of something like the following which applies
> prior to the MPLS code.

This is basically what I was thinking about. We might actually be able
to move all of this to compat code by having a replacement for
dev_queue_xmit() similar to what we have for ip_local_out() in the
tunnel code.

^ permalink raw reply

* Re: [PATCH v2.39 7/7] datapath: Add basic MPLS support to kernel
From: Jesse Gross @ 2013-09-19 17:21 UTC (permalink / raw)
  To: Simon Horman
  Cc: Ben Pfaff, Pravin Shelar, dev@openvswitch.org, netdev, Ravi K,
	Isaku Yamahata, Joe Stringer
In-Reply-To: <20130919155732.GC24919@verge.net.au>

On Thu, Sep 19, 2013 at 10:57 AM, Simon Horman <horms@verge.net.au> wrote:
> On Mon, Sep 16, 2013 at 03:38:21PM -0500, Jesse Gross wrote:
>> On Mon, Sep 9, 2013 at 12:20 AM, Simon Horman <horms@verge.net.au> wrote:
>> > @@ -616,6 +736,13 @@ int ovs_execute_actions(struct datapath *dp, struct sk_buff *skb)
>> >                 goto out_loop;
>> >         }
>> >
>> > +       /* Needed to initialise inner protocol on kernels older
>> > +        * than v3.11 where skb->inner_protocol is not present
>> > +        * and compatibility code uses the OVS_CB(skb) to store
>> > +        * the inner protocol.
>> > +        */
>> > +       ovs_skb_set_inner_protocol(skb, skb->protocol);
>>
>> The comment makes it sound like this code should just be deleted when
>> upstreaming. However, I believe that we still need to initialize this
>> field, right? Is this the best place do it or should it be conditional
>> on adding a first MPLS header? (i.e. what happens if inner_protocol is
>> already set and the packet simply passes through OVS?)
>
> I believe there are several problems here.
>
> The first one, which my comment was written around is that I think that if
> inner_protocol is a field of struct sk_buff then we can rely on it already
> being initialised.  However, if we are using compatibility code, where
> inner_protcol is called in the callback field of struct sk_buff then I
> think that OVS needs to initialise it.

I'm not sure that it's true that inner_protocol is already initialized
- I grepped the tree and the only assignment that I found is in
skbuff.c in __copy_skb_header().

> A second problem is one that you raise which I had not considered
> which is how to handle things if inner_protocol is already set.
>
> I believe this should only occur in the case where inner_protocol
> is a field of struct sk_buff and I think it would be most convenient
> to set it conditionally in ovs_skb_reset_inner_protocol().
> I think that if it is not set it should be zero but it should be
> safe to check for values less than ETH_P_802_3_MIN.

It's probably OK to check for values less than ETH_P_802_3_MIN but I'm
not sure that it's the most correct thing to do since skb->protocol
could contain these values (such as ETH_P_802_2). It's unlikely that
they will be GSO packets but it seems better to use the more strict
check against zero.

One other consideration in the OVS case - with recirculation we may
hit this code multiple times and the difference in behavior could be
surprising. However, on the other hand, we need to be careful because
skb->cb is not guaranteed to be initialized to zero.

^ permalink raw reply

* Re: [PATCH] powerpc/83xx: gianfar_ptp: select 1588 clock source through dts file
From: Richard Cochran @ 2013-09-19 17:12 UTC (permalink / raw)
  To: Claudiu Manoil; +Cc: Aida Mynzhasova, netdev
In-Reply-To: <523B268A.2010805@freescale.com>

On Thu, Sep 19, 2013 at 07:30:02PM +0300, Claudiu Manoil wrote:
> 
> If you ask me, updates for the device trees of several powerpc
> boards, like the 83xx series (as this patch implies), should be
> discussed and agreed upon on the powerpc list (linuxppc-dev@lists.ozlabs.org),
> where these kind of changes are usually being discussed with people more
> knowledgeable in device tree bindings and the powerpc/83xx hardware.

Yes, and also CC the devicetree list. The original device tree
attributes for the gianfar eTSEC timer functions were reviewed on
all three lists.

Thanks,
Richard

^ permalink raw reply

* Re: add ip to interface as primary ip address, not secondary ip when there is alreadly primary ip?
From: Vincent Li @ 2013-09-19 16:54 UTC (permalink / raw)
  To: Cong Wang; +Cc: netdev@vger.kernel.org
In-Reply-To: <l1as5j$7cs$1@ger.gmane.org>

thanks for the pointer

'ip addr' indeed has flag IFA_F_SECONDARY for this, but it is not
available for 'ip addr add', so I made a simple patch for iproute2
ip/ipaddress.c as below:

diff --git a/ip/ipaddress.c b/ip/ipaddress.c
index 1c3e4da..b5aa96a 100644
--- a/ip/ipaddress.c
+++ b/ip/ipaddress.c
@@ -1307,6 +1307,11 @@ static int ipaddr_modify(int cmd, int flags,
int argc, char **argv)
                                invarg("invalid scope value.", *argv);
                        req.ifa.ifa_scope = scope;
                        scoped = 1;
+                } else if (strcmp(*argv, "secondary") == 0 ||
+                           strcmp(*argv, "temporary") == 0) {
+                        req.ifa.ifa_flags |= IFA_F_SECONDARY;
+                } else if (strcmp(*argv, "primary") == 0) {
+                        req.ifa.ifa_flags &= ~IFA_F_SECONDARY;
                } else if (strcmp(*argv, "dev") == 0) {
                        NEXT_ARG();
                        d = *argv;

I also found that I need to patch up the kernel and here is the kernel
patch, it might look silly, but it works as I tested

diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c
index a1b5bcb..2a1d61b 100644
--- a/net/ipv4/devinet.c
+++ b/net/ipv4/devinet.c
@@ -440,14 +440,18 @@ static int __inet_insert_ifa(struct in_ifaddr
*ifa, struct nlmsghdr *nlh,
                return 0;
        }

-       ifa->ifa_flags &= ~IFA_F_SECONDARY;
        last_primary = &in_dev->ifa_list;

        for (ifap = &in_dev->ifa_list; (ifa1 = *ifap) != NULL;
             ifap = &ifa1->ifa_next) {
                if (!(ifa1->ifa_flags & IFA_F_SECONDARY) &&
-                   ifa->ifa_scope <= ifa1->ifa_scope)
-                       last_primary = &ifa1->ifa_next;
+                   ifa->ifa_scope <= ifa1->ifa_scope) {
+                        if (ifa->ifa_flags & IFA_F_SECONDARY) {
+                                last_primary = &ifa1->ifa_next;
+                        } else {
+                                ifa1->ifa_flags |= IFA_F_SECONDARY;
+                        }
+                }
                if (ifa1->ifa_mask == ifa->ifa_mask &&
                    inet_ifa_match(ifa1->ifa_address, ifa)) {
                        if (ifa1->ifa_local == ifa->ifa_local) {
@@ -458,7 +462,11 @@ static int __inet_insert_ifa(struct in_ifaddr
*ifa, struct nlmsghdr *nlh,
                                inet_free_ifa(ifa);
                                return -EINVAL;
                        }
-                       ifa->ifa_flags |= IFA_F_SECONDARY;
+                        if (ifa->ifa_flags & IFA_F_SECONDARY) {
+                                ifa->ifa_flags |= IFA_F_SECONDARY;
+                        } else {
+                                ifa->ifa_flags &= ~IFA_F_SECONDARY;
+                        }
                }
        }

my test steps:

1
 ./ip/ip addr add 192.168.1.1/24 scope global secondary dev eth0
./ip/ip adrr show eth0 >> /tmp/ipaddr.txt

2
./ip/ip addr add 192.168.1.2/24 scope global primary dev eth0
./ip/ip addr show eth0 >> /tmp/ipaddr.txt

3
./ip/ip addr add 192.168.1.3/24 scope global primary dev eth0
./ip/ip addr show eth0 >> /tmp/ipaddr.txt

4
./ip/ip addr add 192.168.1.4/24 scope global secondary dev eth0
./ip/ip addr show eth0 >> /tmp/ipaddr.txt

5
./ip/ip addr add 192.168.1.5/24 scope global  dev eth0
./ip/ip addr show eth0 >> /tmp/ipaddr.txt

6
./ip/ip addr del 192.168.1.5/24  dev eth0
./ip/ip addr show eth0 >> /tmp/ipaddr.txt

test result for each step

result 1

2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast
state UP group default qlen 1000
    link/ether 52:54:00:e3:8f:33 brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.1/24 scope global secondary eth0
       valid_lft forever preferred_lft forever
    inet6 fe80::5054:ff:fee3:8f33/64 scope link
       valid_lft forever preferred_lft forever

result 2

2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast
state UP group default qlen 1000
    link/ether 52:54:00:e3:8f:33 brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.2/24 scope global eth0
       valid_lft forever preferred_lft forever
    inet 192.168.1.1/24 scope global secondary eth0
       valid_lft forever preferred_lft forever
    inet6 fe80::5054:ff:fee3:8f33/64 scope link
       valid_lft forever preferred_lft forever

result 3

2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast
state UP group default qlen 1000
    link/ether 52:54:00:e3:8f:33 brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.3/24 scope global eth0
       valid_lft forever preferred_lft forever
    inet 192.168.1.2/24 scope global secondary eth0
       valid_lft forever preferred_lft forever
    inet 192.168.1.1/24 scope global secondary eth0
       valid_lft forever preferred_lft forever
    inet6 fe80::5054:ff:fee3:8f33/64 scope link
       valid_lft forever preferred_lft forever

result 4

2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast
state UP group default qlen 1000
    link/ether 52:54:00:e3:8f:33 brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.3/24 scope global eth0
       valid_lft forever preferred_lft forever
    inet 192.168.1.2/24 scope global secondary eth0
       valid_lft forever preferred_lft forever
    inet 192.168.1.1/24 scope global secondary eth0
       valid_lft forever preferred_lft forever
    inet 192.168.1.4/24 scope global secondary eth0
       valid_lft forever preferred_lft forever
    inet6 fe80::5054:ff:fee3:8f33/64 scope link
       valid_lft forever preferred_lft forever

result 5

2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast
state UP group default qlen 1000
    link/ether 52:54:00:e3:8f:33 brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.5/24 scope global eth0
       valid_lft forever preferred_lft forever
    inet 192.168.1.3/24 scope global secondary eth0
       valid_lft forever preferred_lft forever
    inet 192.168.1.2/24 scope global secondary eth0
       valid_lft forever preferred_lft forever
    inet 192.168.1.1/24 scope global secondary eth0
       valid_lft forever preferred_lft forever
    inet 192.168.1.4/24 scope global secondary eth0
       valid_lft forever preferred_lft forever
    inet6 fe80::5054:ff:fee3:8f33/64 scope link
       valid_lft forever preferred_lft forever

result 6

2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast
state UP group default qlen 1000
    link/ether 52:54:00:e3:8f:33 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::5054:ff:fee3:8f33/64 scope link
       valid_lft forever preferred_lft forever

it does seems to achieve what I wanted, any comment on this?



On Tue, Sep 17, 2013 at 5:29 PM, Cong Wang <xiyou.wangcong@gmail.com> wrote:
> On Tue, 17 Sep 2013 at 22:31 GMT, Vincent Li <vincent.mc.li@gmail.com> wrote:
>>
>> ideally though, we would like to have the capability in
>> kernel/userspace  to specify a flag or something to add any ip as
>> primary even if there is already existing primary ip address (could
>> downgrade the existing primary to secondary ip). does this make sense
>> ?
>
> 'ip addr' already has flags for this.
>
> --
> 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 related

* [PATCH] skge: fix broken driver
From: Mikulas Patocka @ 2013-09-19 16:33 UTC (permalink / raw)
  To: David S. Miller, Stephen Hemminger, netdev

The patch 136d8f377e1575463b47840bc5f1b22d94bf8f63 broke the skge driver.

Note this part of the patch:
+               if (skge_rx_setup(skge, e, nskb, skge->rx_buf_size) < 0) {
+                       dev_kfree_skb(nskb);
+                       goto resubmit;
+               }
+
                pci_unmap_single(skge->hw->pdev,
                                 dma_unmap_addr(e, mapaddr),
                                 dma_unmap_len(e, maplen),
                                 PCI_DMA_FROMDEVICE);
                skb = e->skb;
                prefetch(skb->data);
-               skge_rx_setup(skge, e, nskb, skge->rx_buf_size);

The function skge_rx_setup modifies e->skb to point to the new skb. Thus,
after this change, the new buffer, not the old, is returned to the
networking stack.

This bug is present in kernels 3.11, 3.11.1 and 3.12-rc1.

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Cc: stable@kernel.org # 3.11

---
 drivers/net/ethernet/marvell/skge.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

Index: linux-3.11.1-fast/drivers/net/ethernet/marvell/skge.c
===================================================================
--- linux-3.11.1-fast.orig/drivers/net/ethernet/marvell/skge.c	2013-09-10 19:46:58.000000000 +0200
+++ linux-3.11.1-fast/drivers/net/ethernet/marvell/skge.c	2013-09-19 18:20:43.000000000 +0200
@@ -3092,6 +3092,9 @@ static struct sk_buff *skge_rx_get(struc
 		if (!nskb)
 			goto resubmit;
 
+		skb = e->skb;
+		prefetch(skb->data);
+
 		if (skge_rx_setup(skge, e, nskb, skge->rx_buf_size) < 0) {
 			dev_kfree_skb(nskb);
 			goto resubmit;
@@ -3101,8 +3104,6 @@ static struct sk_buff *skge_rx_get(struc
 				 dma_unmap_addr(e, mapaddr),
 				 dma_unmap_len(e, maplen),
 				 PCI_DMA_FROMDEVICE);
-		skb = e->skb;
-		prefetch(skb->data);
 	}
 
 	skb_put(skb, len);

^ permalink raw reply

* Re: [PATCH] powerpc/83xx: gianfar_ptp: select 1588 clock source through dts file
From: Claudiu Manoil @ 2013-09-19 16:30 UTC (permalink / raw)
  To: Aida Mynzhasova; +Cc: richardcochran, netdev
In-Reply-To: <5239D74F.5030801@skitlab.ru>



On 9/18/2013 7:39 PM, Aida Mynzhasova wrote:
> On 18.09.2013 19:44, Claudiu Manoil wrote:
>>
>> On 9/18/2013 4:21 PM, Aida Mynzhasova wrote:
>>> IEEE 1588 timer reference clock source is determined through hard-coded
>>> value in gianfar_ptp driver by default. This patch allows to select ptp
>>> clock source by means of device tree file node.
>>>
>>> For instance:
>>>
>>>     fsl,cksel = <0>;
>>>
>>
>> Has this device tree binding been defined? (Where?)
>> I don't see this property in the net-next.git tree at least.
>>
>> Claudiu
>>
>>
>
> Hi Claudiu,
>
> actually, I don't know where I should define this binding, my only idea
> is to add "cksel" property description in
> /Documentation/devicetree/bindings/net/fsl-tsec-phy.txt. Am I right or I
> need to do some additional changes?
>
> Thanks.
>
>


If you ask me, updates for the device trees of several powerpc boards, 
like the 83xx series (as this patch implies), should be discussed and 
agreed upon on the powerpc list (linuxppc-dev@lists.ozlabs.org),
where these kind of changes are usually being discussed with people more
knowledgeable in device tree bindings and the powerpc/83xx hardware.

Regards,
Claudiu

^ permalink raw reply

* [stable] [PATCH] sfc: Fix efx_rx_buf_offset() for recycled pages
From: Ben Hutchings @ 2013-09-19 16:13 UTC (permalink / raw)
  To: David Miller; +Cc: stable, netdev

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

[Re-sending with cc to the current stable address.  I still had the old
address in contacts, though I've definitely sent to the current address
previously...]

This bug fix is only for stable branches older than 3.10.  The bug was
fixed upstream by commit 2768935a4660 ('sfc: reuse pages to avoid DMA
mapping/unmapping costs'), but that change is totally unsuitable for
stable.

Commit b590ace09d51 ('sfc: Fix efx_rx_buf_offset() in the presence of
swiotlb') added an explicit page_offset member to struct
efx_rx_buffer, which must be set consistently with the u.page and
dma_addr fields.  However, it failed to add the necessary assignment
in efx_resurrect_rx_buffer().  It also did not correct the calculation
of efx_rx_buffer::dma_addr in efx_resurrect_rx_buffer(), which assumes
that DMA-mapping a page will result in a page-aligned DMA address
(exactly what swiotlb violates).

Add the assignment of efx_rx_buffer::page_offset and change the
calculation of dma_addr to make use of it.

I'm attaching the patches for 3.0.y, 3.2.y and 3.4.y (the last of which
should also be applicable to the later unofficial stable branches).

Ben.

-- 
Ben Hutchings, Staff Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.


[-- Attachment #2: sfc-Fix-efx_rx_buf_offset-for-recycled-pages-3.0.patch --]
[-- Type: text/x-patch, Size: 1833 bytes --]

>From d4e70d42eff6938c12d7d0b12f657b10d06a156d Mon Sep 17 00:00:00 2001
From: Ben Hutchings <bhutchings@solarflare.com>
Date: Fri, 6 Sep 2013 22:39:20 +0100
Subject: sfc: Fix efx_rx_buf_offset() for recycled pages

This bug fix is only for stable branches older than 3.10.  The bug was
fixed upstream by commit 2768935a4660 ('sfc: reuse pages to avoid DMA
mapping/unmapping costs'), but that change is totally unsuitable for
stable.

Commit b590ace09d51 ('sfc: Fix efx_rx_buf_offset() in the presence of
swiotlb') added an explicit page_offset member to struct
efx_rx_buffer, which must be set consistently with the u.page and
dma_addr fields.  However, it failed to add the necessary assignment
in efx_resurrect_rx_buffer().  It also did not correct the calculation
of efx_rx_buffer::dma_addr in efx_resurrect_rx_buffer(), which assumes
that DMA-mapping a page will result in a page-aligned DMA address
(exactly what swiotlb violates).

Add the assignment of efx_rx_buffer::page_offset and change the
calculation of dma_addr to make use of it.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
---
 drivers/net/sfc/rx.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/sfc/rx.c b/drivers/net/sfc/rx.c
index d429f0a..26e4cca 100644
--- a/drivers/net/sfc/rx.c
+++ b/drivers/net/sfc/rx.c
@@ -311,8 +311,9 @@ static void efx_resurrect_rx_buffer(struct efx_rx_queue *rx_queue,
 
 	index = rx_queue->added_count & rx_queue->ptr_mask;
 	new_buf = efx_rx_buffer(rx_queue, index);
-	new_buf->dma_addr = rx_buf->dma_addr ^ (PAGE_SIZE >> 1);
 	new_buf->u.page = rx_buf->u.page;
+	new_buf->page_offset = rx_buf->page_offset ^ (PAGE_SIZE >> 1);
+	new_buf->dma_addr = state->dma_addr + new_buf->page_offset;
 	new_buf->len = rx_buf->len;
 	new_buf->is_page = true;
 	++rx_queue->added_count;
-- 
1.8.1.4


[-- Attachment #3: sfc-Fix-efx_rx_buf_offset-for-recycled-pages-3.2.patch --]
[-- Type: text/x-patch, Size: 1878 bytes --]

>From 43587737635de32882d9f69df36562e0d5b0e0bd Mon Sep 17 00:00:00 2001
From: Ben Hutchings <bhutchings@solarflare.com>
Date: Fri, 6 Sep 2013 22:39:20 +0100
Subject: sfc: Fix efx_rx_buf_offset() for recycled pages

This bug fix is only for stable branches older than 3.10.  The bug was
fixed upstream by commit 2768935a4660 ('sfc: reuse pages to avoid DMA
mapping/unmapping costs'), but that change is totally unsuitable for
stable.

Commit b590ace09d51 ('sfc: Fix efx_rx_buf_offset() in the presence of
swiotlb') added an explicit page_offset member to struct
efx_rx_buffer, which must be set consistently with the u.page and
dma_addr fields.  However, it failed to add the necessary assignment
in efx_resurrect_rx_buffer().  It also did not correct the calculation
of efx_rx_buffer::dma_addr in efx_resurrect_rx_buffer(), which assumes
that DMA-mapping a page will result in a page-aligned DMA address
(exactly what swiotlb violates).

Add the assignment of efx_rx_buffer::page_offset and change the
calculation of dma_addr to make use of it.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
---
 drivers/net/ethernet/sfc/rx.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/sfc/rx.c b/drivers/net/ethernet/sfc/rx.c
index 9ce8665..c231b3f 100644
--- a/drivers/net/ethernet/sfc/rx.c
+++ b/drivers/net/ethernet/sfc/rx.c
@@ -312,8 +312,9 @@ static void efx_resurrect_rx_buffer(struct efx_rx_queue *rx_queue,
 
 	index = rx_queue->added_count & rx_queue->ptr_mask;
 	new_buf = efx_rx_buffer(rx_queue, index);
-	new_buf->dma_addr = rx_buf->dma_addr ^ (PAGE_SIZE >> 1);
 	new_buf->u.page = rx_buf->u.page;
+	new_buf->page_offset = rx_buf->page_offset ^ (PAGE_SIZE >> 1);
+	new_buf->dma_addr = state->dma_addr + new_buf->page_offset;
 	new_buf->len = rx_buf->len;
 	new_buf->is_page = true;
 	++rx_queue->added_count;
-- 
1.8.1.4


[-- Attachment #4: sfc-Fix-efx_rx_buf_offset-for-recycled-pages-3.4.patch --]
[-- Type: text/x-patch, Size: 1888 bytes --]

>From 55961f9a914e637f143da275da42154a49c9743a Mon Sep 17 00:00:00 2001
From: Ben Hutchings <bhutchings@solarflare.com>
Date: Fri, 6 Sep 2013 22:39:20 +0100
Subject: sfc: Fix efx_rx_buf_offset() for recycled pages

This bug fix is only for stable branches older than 3.10.  The bug was
fixed upstream by commit 2768935a4660 ('sfc: reuse pages to avoid DMA
mapping/unmapping costs'), but that change is totally unsuitable for
stable.

Commit b590ace09d51 ('sfc: Fix efx_rx_buf_offset() in the presence of
swiotlb') added an explicit page_offset member to struct
efx_rx_buffer, which must be set consistently with the u.page and
dma_addr fields.  However, it failed to add the necessary assignment
in efx_resurrect_rx_buffer().  It also did not correct the calculation
of efx_rx_buffer::dma_addr in efx_resurrect_rx_buffer(), which assumes
that DMA-mapping a page will result in a page-aligned DMA address
(exactly what swiotlb violates).

Add the assignment of efx_rx_buffer::page_offset and change the
calculation of dma_addr to make use of it.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
---
 drivers/net/ethernet/sfc/rx.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/sfc/rx.c b/drivers/net/ethernet/sfc/rx.c
index 7b3c068..62311ad3 100644
--- a/drivers/net/ethernet/sfc/rx.c
+++ b/drivers/net/ethernet/sfc/rx.c
@@ -311,8 +311,9 @@ static void efx_resurrect_rx_buffer(struct efx_rx_queue *rx_queue,
 
 	index = rx_queue->added_count & rx_queue->ptr_mask;
 	new_buf = efx_rx_buffer(rx_queue, index);
-	new_buf->dma_addr = rx_buf->dma_addr ^ (PAGE_SIZE >> 1);
 	new_buf->u.page = rx_buf->u.page;
+	new_buf->page_offset = rx_buf->page_offset ^ (PAGE_SIZE >> 1);
+	new_buf->dma_addr = state->dma_addr + new_buf->page_offset;
 	new_buf->len = rx_buf->len;
 	new_buf->flags = EFX_RX_BUF_PAGE;
 	++rx_queue->added_count;
-- 
1.8.1.4


^ permalink raw reply related

* [PATCH net-next 2/2] net_sched: htb: support of 64bit rates
From: Eric Dumazet @ 2013-09-19 16:10 UTC (permalink / raw)
  To: David Miller; +Cc: netdev

From: Eric Dumazet <edumazet@google.com>

HTB already can deal with 64bit rates, we only have to add two new
attributes so that tc can use them to break the current 32bit ABI
barrier.

TCA_HTB_RATE64 : class rate  (in bytes per second)
TCA_HTB_CEIL64 : class ceil  (in bytes per second)

This allows us to setup HTB on 40Gbps links, as 32bit limit is
actually ~34Gbps

Signed-off-by: Eric Dumazet <edumazet@google.com>
---
 include/uapi/linux/pkt_sched.h |    2 ++
 net/sched/sch_htb.c            |   17 +++++++++++++++--
 2 files changed, 17 insertions(+), 2 deletions(-)

diff --git a/include/uapi/linux/pkt_sched.h b/include/uapi/linux/pkt_sched.h
index 9b82913..f2624b5 100644
--- a/include/uapi/linux/pkt_sched.h
+++ b/include/uapi/linux/pkt_sched.h
@@ -357,6 +357,8 @@ enum {
 	TCA_HTB_CTAB,
 	TCA_HTB_RTAB,
 	TCA_HTB_DIRECT_QLEN,
+	TCA_HTB_RATE64,
+	TCA_HTB_CEIL64,
 	__TCA_HTB_MAX,
 };
 
diff --git a/net/sched/sch_htb.c b/net/sched/sch_htb.c
index 6b126f6..0e1e38b 100644
--- a/net/sched/sch_htb.c
+++ b/net/sched/sch_htb.c
@@ -997,6 +997,8 @@ static const struct nla_policy htb_policy[TCA_HTB_MAX + 1] = {
 	[TCA_HTB_CTAB]	= { .type = NLA_BINARY, .len = TC_RTAB_SIZE },
 	[TCA_HTB_RTAB]	= { .type = NLA_BINARY, .len = TC_RTAB_SIZE },
 	[TCA_HTB_DIRECT_QLEN] = { .type = NLA_U32 },
+	[TCA_HTB_RATE64] = { .type = NLA_U64 },
+	[TCA_HTB_CEIL64] = { .type = NLA_U64 },
 };
 
 static void htb_work_func(struct work_struct *work)
@@ -1114,6 +1116,12 @@ static int htb_dump_class(struct Qdisc *sch, unsigned long arg,
 	opt.level = cl->level;
 	if (nla_put(skb, TCA_HTB_PARMS, sizeof(opt), &opt))
 		goto nla_put_failure;
+	if ((cl->rate.rate_bytes_ps >= (1ULL << 32)) &&
+	    nla_put_u64(skb, TCA_HTB_RATE64, cl->rate.rate_bytes_ps))
+		goto nla_put_failure;
+	if ((cl->ceil.rate_bytes_ps >= (1ULL << 32)) &&
+	    nla_put_u64(skb, TCA_HTB_CEIL64, cl->ceil.rate_bytes_ps))
+		goto nla_put_failure;
 
 	nla_nest_end(skb, nest);
 	spin_unlock_bh(root_lock);
@@ -1332,6 +1340,7 @@ static int htb_change_class(struct Qdisc *sch, u32 classid,
 	struct qdisc_rate_table *rtab = NULL, *ctab = NULL;
 	struct nlattr *tb[TCA_HTB_MAX + 1];
 	struct tc_htb_opt *hopt;
+	u64 rate64, ceil64;
 
 	/* extract all subattrs from opt attr */
 	if (!opt)
@@ -1491,8 +1500,12 @@ static int htb_change_class(struct Qdisc *sch, u32 classid,
 			cl->prio = TC_HTB_NUMPRIO - 1;
 	}
 
-	psched_ratecfg_precompute(&cl->rate, &hopt->rate, 0);
-	psched_ratecfg_precompute(&cl->ceil, &hopt->ceil, 0);
+	rate64 = tb[TCA_HTB_RATE64] ? nla_get_u64(tb[TCA_HTB_RATE64]) : 0;
+
+	ceil64 = tb[TCA_HTB_CEIL64] ? nla_get_u64(tb[TCA_HTB_CEIL64]) : 0;
+
+	psched_ratecfg_precompute(&cl->rate, &hopt->rate, rate64);
+	psched_ratecfg_precompute(&cl->ceil, &hopt->ceil, ceil64);
 
 	cl->buffer = PSCHED_TICKS2NS(hopt->buffer);
 	cl->cbuffer = PSCHED_TICKS2NS(hopt->cbuffer);

^ permalink raw reply related


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