Netdev List
 help / color / mirror / Atom feed
* Re: [PATCH] bonding: in balance-rr mode, set curr_active_slave only if it is up
From: Jay Vosburgh @ 2012-11-26 18:36 UTC (permalink / raw)
  To: Michal Kubecek; +Cc: netdev, Andy Gospodarek, linux-kernel
In-Reply-To: <20121122125202.14252C35B8@unicorn.suse.cz>

Michal Kubecek <mkubecek@suse.cz> wrote:

>If all slaves of a balance-rr bond with ARP monitor are enslaved
>with down link state, bond keeps down state even after slaves
>go up.
>
>This is caused by bond_enslave() setting curr_active_slave to
>first slave not taking into account its link state. As
>bond_loadbalance_arp_mon() uses curr_active_slave to identify
>whether slave's down->up transition should update bond's link
>state, bond stays down even if slaves are up (until first slave
>goes from up to down at least once).

	The bond_loadbalance_arp_mon function actually uses
curr_active_slave to determine whether or not to do a "failover" (select
a new active slave), which in turn will call bond_set_carrier() from
within bond_select_active_slave().

	Other than that nitpick about the description, I see how setting
curr_active_slave to a down slave would cause loadbalance_arp_mon to
skip the "failover" step (because it presumes that an active slave is
always up, and therefore no new one needs to be selected), and thus skip
setting the master's carrier state.

	-J

>Before commit f31c7937 "bonding: start slaves with link down for
>ARP monitor", this was masked by slaves always starting in UP
>state with ARP monitor (and MII monitor not relying on
>curr_active_slave being NULL if there is no slave up).
>
>Signed-off-by: Michal Kubecek <mkubecek@suse.cz>

Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>


> drivers/net/bonding/bond_main.c |    2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
>index 5f5b69f..c8bff3e 100644
>--- a/drivers/net/bonding/bond_main.c
>+++ b/drivers/net/bonding/bond_main.c
>@@ -1838,7 +1838,7 @@ int bond_enslave(struct net_device *bond_dev, struct net_device *slave_dev)
> 		 * anyway (it holds no special properties of the bond device),
> 		 * so we can change it without calling change_active_interface()
> 		 */
>-		if (!bond->curr_active_slave)
>+		if (!bond->curr_active_slave && new_slave->link == BOND_LINK_UP)
> 			bond->curr_active_slave = new_slave;
>
> 		break;
>-- 
>1.7.10.4
>

---
	-Jay Vosburgh, IBM Linux Technology Center, fubar@us.ibm.com

^ permalink raw reply

* [PATCH net-next:master 20/25] net/dsa: make DSA tagging depend on NETDEVICES and !S390
From: Randy Dunlap @ 2012-11-26 18:50 UTC (permalink / raw)
  To: Viresh Kumar; +Cc: kbuild test robot, Ben Hutchings, davem, netdev
In-Reply-To: <CAKohpo=r2ZTp5uSp_5duc+zwWvkkwr8dMbz+Yn=WC+ngFy3-0g@mail.gmail.com>

From: Randy Dunlap <rdunlap@infradead.org>

Fix kconfig dependency warning by making DSA support depend on the
same kconfig symbols that NET_DSA depend on.

warning: (NET_DSA_TAG_DSA && NET_DSA_TAG_EDSA && NET_DSA_TAG_TRAILER) selects NET_DSA which has unmet direct dependencies (NET && NETDEVICES && !S390)

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
---
 net/dsa/Kconfig |    1 +
 1 file changed, 1 insertion(+)

--- linux-next-20121126.orig/net/dsa/Kconfig
+++ linux-next-20121126/net/dsa/Kconfig
@@ -9,6 +9,7 @@ config NET_DSA
 
 
 menu "Distributed Switch Architecture support"
+	depends on NETDEVICES && !S390
 
 # tagging formats
 config NET_DSA_TAG_DSA

^ permalink raw reply

* Re: [PATCH net-next:master 20/25] net/dsa: make DSA tagging depend on NETDEVICES and !S390
From: Ben Hutchings @ 2012-11-26 18:57 UTC (permalink / raw)
  To: Randy Dunlap; +Cc: Viresh Kumar, kbuild test robot, davem, netdev
In-Reply-To: <50B3B9F6.5060509@infradead.org>

On Mon, 2012-11-26 at 10:50 -0800, Randy Dunlap wrote:
> From: Randy Dunlap <rdunlap@infradead.org>
> 
> Fix kconfig dependency warning by making DSA support depend on the
> same kconfig symbols that NET_DSA depend on.
> 
> warning: (NET_DSA_TAG_DSA && NET_DSA_TAG_EDSA && NET_DSA_TAG_TRAILER) selects NET_DSA which has unmet direct dependencies (NET && NETDEVICES && !S390)

This perhaps ought to be abstracted into a HAVE_NET_DSA rather than
reepated here.  Also, in net-next NET_DSA still depends on EXPERIMENTAL,
which should be removed.

Ben.

> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> ---
>  net/dsa/Kconfig |    1 +
>  1 file changed, 1 insertion(+)
> 
> --- linux-next-20121126.orig/net/dsa/Kconfig
> +++ linux-next-20121126/net/dsa/Kconfig
> @@ -9,6 +9,7 @@ config NET_DSA
>  
> 
>  menu "Distributed Switch Architecture support"
> +	depends on NETDEVICES && !S390
>  
>  # tagging formats
>  config NET_DSA_TAG_DSA

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

^ permalink raw reply

* [PATCH net-next] dsa: Hide core config options; make drivers select what they need
From: Ben Hutchings @ 2012-11-26 19:16 UTC (permalink / raw)
  To: David Miller; +Cc: netdev, Viresh Kumar, Randy Dunlap

Commit 82167cb8c6b2f8166d5c7532e5ef4b5e0cc46a72 ('net: dsa/slave: Fix
compilation warnings') fixed one possible invalid configuration
(NET_DSA enabled with no trailer formats) but added others: drivers
can select NET_DSA without its dependencies being met.

It's not very useful to make either the DSA core or the tagging
formats manually selectable without a driver to use them, so:

1. Define a hidden HAVE_NET_DSA option and move the dependencies of
   NET_DSA to that.  While we're at it, drop the deprecated
   EXPERIMENTAL dependency.
2. Make NET_DSA and the drivers dependent on HAVE_NET_DSA.
3. Hide the tagging format options again.
4. Make drivers select both NET_DSA and the appropriate tagging format
   option.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
---
 drivers/net/dsa/Kconfig |    4 ++++
 net/dsa/Kconfig         |   30 +++++++++++++-----------------
 2 files changed, 17 insertions(+), 17 deletions(-)

diff --git a/drivers/net/dsa/Kconfig b/drivers/net/dsa/Kconfig
index 96eae22..b8fe808 100644
--- a/drivers/net/dsa/Kconfig
+++ b/drivers/net/dsa/Kconfig
@@ -1,4 +1,5 @@
 menu "Distributed Switch Architecture drivers"
+	depends on HAVE_NET_DSA
 
 config NET_DSA_MV88E6XXX
 	tristate
@@ -6,6 +7,7 @@ config NET_DSA_MV88E6XXX
 
 config NET_DSA_MV88E6060
 	tristate "Marvell 88E6060 ethernet switch chip support"
+	select NET_DSA
 	select NET_DSA_TAG_TRAILER
 	---help---
 	  This enables support for the Marvell 88E6060 ethernet switch
@@ -17,6 +19,7 @@ config NET_DSA_MV88E6XXX_NEED_PPU
 
 config NET_DSA_MV88E6131
 	tristate "Marvell 88E6085/6095/6095F/6131 ethernet switch chip support"
+	select NET_DSA
 	select NET_DSA_MV88E6XXX
 	select NET_DSA_MV88E6XXX_NEED_PPU
 	select NET_DSA_TAG_DSA
@@ -26,6 +29,7 @@ config NET_DSA_MV88E6131
 
 config NET_DSA_MV88E6123_61_65
 	tristate "Marvell 88E6123/6161/6165 ethernet switch chip support"
+	select NET_DSA
 	select NET_DSA_MV88E6XXX
 	select NET_DSA_TAG_EDSA
 	---help---
diff --git a/net/dsa/Kconfig b/net/dsa/Kconfig
index 0f5dc34..f5eede1 100644
--- a/net/dsa/Kconfig
+++ b/net/dsa/Kconfig
@@ -1,28 +1,24 @@
+config HAVE_NET_DSA
+	def_bool y
+	depends on NETDEVICES && !S390
+
+# Drivers must select NET_DSA and the appropriate tagging format
+
 config NET_DSA
 	tristate
-	default n
-	depends on EXPERIMENTAL && NETDEVICES && !S390
+	depends on HAVE_NET_DSA
 	select PHYLIB
-	---help---
-	  This allows you to use hardware switch chips that use
-	  the Distributed Switch Architecture.
 
-
-menu "Distributed Switch Architecture support"
+if NET_DSA
 
 # tagging formats
 config NET_DSA_TAG_DSA
-	bool "Original DSA packet tagging format"
-	select NET_DSA
-	default n
+	bool
 
 config NET_DSA_TAG_EDSA
-	bool "Ethertype DSA packet tagging format"
-	select NET_DSA
-	default n
+	bool
 
 config NET_DSA_TAG_TRAILER
-	bool "Trailer DSA packet tagging format"
-	select NET_DSA
-	default n
-endmenu
+	bool
+
+endif
-- 
1.7.7.6


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

^ permalink raw reply related

* Re: [PATCH net-next] dsa: Hide core config options; make drivers select what they need
From: Randy Dunlap @ 2012-11-26 19:53 UTC (permalink / raw)
  To: Ben Hutchings; +Cc: David Miller, netdev, Viresh Kumar
In-Reply-To: <1353957370.2717.3.camel@bwh-desktop.uk.solarflarecom.com>

On 11/26/2012 11:16 AM, Ben Hutchings wrote:

> Commit 82167cb8c6b2f8166d5c7532e5ef4b5e0cc46a72 ('net: dsa/slave: Fix
> compilation warnings') fixed one possible invalid configuration
> (NET_DSA enabled with no trailer formats) but added others: drivers
> can select NET_DSA without its dependencies being met.
> 
> It's not very useful to make either the DSA core or the tagging
> formats manually selectable without a driver to use them, so:
> 
> 1. Define a hidden HAVE_NET_DSA option and move the dependencies of
>    NET_DSA to that.  While we're at it, drop the deprecated
>    EXPERIMENTAL dependency.
> 2. Make NET_DSA and the drivers dependent on HAVE_NET_DSA.
> 3. Hide the tagging format options again.
> 4. Make drivers select both NET_DSA and the appropriate tagging format
>    option.
> 
> Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>


Acked-by: Randy Dunlap <rdunlap@infradead.org>

Thanks.

> ---
>  drivers/net/dsa/Kconfig |    4 ++++
>  net/dsa/Kconfig         |   30 +++++++++++++-----------------
>  2 files changed, 17 insertions(+), 17 deletions(-)
> 
> diff --git a/drivers/net/dsa/Kconfig b/drivers/net/dsa/Kconfig
> index 96eae22..b8fe808 100644
> --- a/drivers/net/dsa/Kconfig
> +++ b/drivers/net/dsa/Kconfig
> @@ -1,4 +1,5 @@
>  menu "Distributed Switch Architecture drivers"
> +	depends on HAVE_NET_DSA
>  
>  config NET_DSA_MV88E6XXX
>  	tristate
> @@ -6,6 +7,7 @@ config NET_DSA_MV88E6XXX
>  
>  config NET_DSA_MV88E6060
>  	tristate "Marvell 88E6060 ethernet switch chip support"
> +	select NET_DSA
>  	select NET_DSA_TAG_TRAILER
>  	---help---
>  	  This enables support for the Marvell 88E6060 ethernet switch
> @@ -17,6 +19,7 @@ config NET_DSA_MV88E6XXX_NEED_PPU
>  
>  config NET_DSA_MV88E6131
>  	tristate "Marvell 88E6085/6095/6095F/6131 ethernet switch chip support"
> +	select NET_DSA
>  	select NET_DSA_MV88E6XXX
>  	select NET_DSA_MV88E6XXX_NEED_PPU
>  	select NET_DSA_TAG_DSA
> @@ -26,6 +29,7 @@ config NET_DSA_MV88E6131
>  
>  config NET_DSA_MV88E6123_61_65
>  	tristate "Marvell 88E6123/6161/6165 ethernet switch chip support"
> +	select NET_DSA
>  	select NET_DSA_MV88E6XXX
>  	select NET_DSA_TAG_EDSA
>  	---help---
> diff --git a/net/dsa/Kconfig b/net/dsa/Kconfig
> index 0f5dc34..f5eede1 100644
> --- a/net/dsa/Kconfig
> +++ b/net/dsa/Kconfig
> @@ -1,28 +1,24 @@
> +config HAVE_NET_DSA
> +	def_bool y
> +	depends on NETDEVICES && !S390
> +
> +# Drivers must select NET_DSA and the appropriate tagging format
> +
>  config NET_DSA
>  	tristate
> -	default n
> -	depends on EXPERIMENTAL && NETDEVICES && !S390
> +	depends on HAVE_NET_DSA
>  	select PHYLIB
> -	---help---
> -	  This allows you to use hardware switch chips that use
> -	  the Distributed Switch Architecture.
>  
> -
> -menu "Distributed Switch Architecture support"
> +if NET_DSA
>  
>  # tagging formats
>  config NET_DSA_TAG_DSA
> -	bool "Original DSA packet tagging format"
> -	select NET_DSA
> -	default n
> +	bool
>  
>  config NET_DSA_TAG_EDSA
> -	bool "Ethertype DSA packet tagging format"
> -	select NET_DSA
> -	default n
> +	bool
>  
>  config NET_DSA_TAG_TRAILER
> -	bool "Trailer DSA packet tagging format"
> -	select NET_DSA
> -	default n
> -endmenu
> +	bool
> +
> +endif



-- 
~Randy

^ permalink raw reply

* Re: [PATCH RFC] [INET]: Get cirtical word in first 64bit of cache line
From: Ben Hutchings @ 2012-11-26 20:40 UTC (permalink / raw)
  To: Eric Dumazet; +Cc: ling.ma.program, linux-kernel, netdev
In-Reply-To: <1353912241.30446.1257.camel@edumazet-glaptop>

On Sun, 2012-11-25 at 22:44 -0800, Eric Dumazet wrote:
> On Mon, 2012-11-26 at 11:29 +0800, ling.ma.program@gmail.com wrote:
> > From: Ma Ling <ling.ma.program@gmail.com>
> > 
> > In order to reduce memory latency when last level cache miss occurs,
> > modern CPUs i.e. x86 and arm introduced Critical Word First(CWF) or
> > Early Restart(ER) to get data ASAP. For CWF if critical word is first member
> > in cache line, memory feed CPU with critical word, then fill others
> > data in cache line one by one, otherwise after critical word it must
> > cost more cycle to fill the remaining cache line. For Early First CPU will
> > restart until critical word in cache line reaches.
> > 
> > Hash value is critical word, so in this patch we place it as first member
> > in cache line(sock address is cache-line aligned), and it is also good for
> > Early Restart platform as well .
> > 
> > Thanks
> > Ling
> 
> networking patches should be sent to netdev.
> 
> (I understand this patch is more a generic one, but at least CC netdev)
> 
> You give no performance numbers for this change...
> 
> I never heard of this CWF/ER, where are the official Intel documents
> about this, and what models really benefit from it ?
[...]

CWF is a standard feature of SDRAM.  Ulrich Drepper's series of articles
on memory covers this in part 2 <http://lwn.net/Articles/252125/>
section 3.5.2.  As for whether it's slower to start fetching from the
middle, that may depend on the memory controller and memory type that
are used.  Drepper's benchmark showed only a small penalty (<1%) for
fetching from the middle, though he didn't say anything particular about
the hardware configuration.

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.

^ permalink raw reply

* re: smsc95xx: detect chip revision specific features
From: Dan Carpenter @ 2012-11-26 20:47 UTC (permalink / raw)
  To: steve.glendinning; +Cc: netdev

Hello Steve Glendinning,

The patch 9ebca5071c86: "smsc95xx: detect chip revision specific 
features" from Nov 22, 2012, leads to the following warning:
drivers/net/usb/smsc95xx.c:1349 smsc95xx_suspend()
	 error: buffer overflow 'filter_mask' 8 <= 31

drivers/net/usb/smsc95xx.c
  1283          if (pdata->wolopts & (WAKE_BCAST | WAKE_MCAST | WAKE_ARP | WAKE_UCAST)) {
  1284                  u32 *filter_mask = kzalloc(32, GFP_KERNEL);
                                                   ^^
We allocate 8 unsigned 32 bit values.  I think this is the mistake here
actually.  It is a typo and should say:

			u32 *filter_mask = kzalloc(sizeof(u32) * 32, GFP_KERNEL);

If 8 elements was the intent then that's nasty.

  1285                  u32 command[2];
  1286                  u32 offset[2];
  1287                  u32 crc[4];
  1288                  int wuff_filter_count =
  1289                          (pdata->features & FEATURE_8_WAKEUP_FILTERS) ?
  1290                          LAN9500A_WUFF_NUM : LAN9500_WUFF_NUM;

LAN9500A_WUFF_NUM is 8.  LAN9500_WUFF_NUM is 4.

  1291                  int i, filter = 0;
  1292  

[snip]

  1348                  for (i = 0; i < (wuff_filter_count * 4); i++) {
                                         ^^^^^^^^^^^^^^^^^^^^^

We are either counting to 15 or 31, and both are more that 8.

  1349                          ret = smsc95xx_write_reg_nopm(dev, WUFF, filter_mask[i]);
                                                                         ^^^^^^^^^^^^^^
So we're going past the end of the 8 element array.

  1350                          if (ret < 0)
  1351                                  kfree(filter_mask);
  1352                          check_warn_return(ret, "Error writing WUFF\n");
  1353                  }

regards,
dan carpenter

^ permalink raw reply

* pull-request: can 2012-11-26
From: Marc Kleine-Budde @ 2012-11-26 21:47 UTC (permalink / raw)
  To: netdev; +Cc: linux-can

Hello David,

two late fixes for v3.7 from Oliver Hartkopp, he found and fixed a problem in
the peak usb driver, a hardware timestamp is assigned wrong. In the second
patch he fixed a problem in the broadcast manager, in case of a timeout the
rx_ifindex is not set properly.

regards, Marc

---

The following changes since commit 194d9831f0419b5125dc94ec0ece4434d8ef74f0:

  Merge tag 'sound-3.7' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound (2012-11-24 08:32:11 -1000)

are available in the git repository at:


  git://gitorious.org/linux-can/linux-can.git fixes-for-3.7

for you to fetch changes up to 81b401100c01d2357031e874689f89bd788d13cd:

  can: bcm: initialize ifindex for timeouts without previous frame reception (2012-11-26 22:33:59 +0100)

----------------------------------------------------------------
Oliver Hartkopp (2):
      can: peak_usb: fix hwtstamp assignment
      can: bcm: initialize ifindex for timeouts without previous frame reception

 drivers/net/can/usb/peak_usb/pcan_usb.c     |    8 ++++++--
 drivers/net/can/usb/peak_usb/pcan_usb_pro.c |    8 ++++++--
 net/can/bcm.c                               |    3 +++
 3 files changed, 15 insertions(+), 4 deletions(-)



^ permalink raw reply

* [PATCH 2/2] can: bcm: initialize ifindex for timeouts without previous frame reception
From: Marc Kleine-Budde @ 2012-11-26 21:47 UTC (permalink / raw)
  To: netdev; +Cc: linux-can, Oliver Hartkopp, linux-stable, Marc Kleine-Budde
In-Reply-To: <1353966430-12601-1-git-send-email-mkl@pengutronix.de>

From: Oliver Hartkopp <socketcan@hartkopp.net>

Set in the rx_ifindex to pass the correct interface index in the case of a
message timeout detection. Usually the rx_ifindex value is set at receive
time. But when no CAN frame has been received the RX_TIMEOUT notification
did not contain a valid value.

Cc: linux-stable <stable@vger.kernel.org>
Reported-by: Andre Naujoks <nautsch2@googlemail.com>
Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
---
 net/can/bcm.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/net/can/bcm.c b/net/can/bcm.c
index 6f74758..969b7cd 100644
--- a/net/can/bcm.c
+++ b/net/can/bcm.c
@@ -1084,6 +1084,9 @@ static int bcm_rx_setup(struct bcm_msg_head *msg_head, struct msghdr *msg,
 		op->sk = sk;
 		op->ifindex = ifindex;
 
+		/* ifindex for timeout events w/o previous frame reception */
+		op->rx_ifindex = ifindex;
+
 		/* initialize uninitialized (kzalloc) structure */
 		hrtimer_init(&op->timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
 		op->timer.function = bcm_rx_timeout_handler;
-- 
1.7.10.4

^ permalink raw reply related

* [PATCH 1/2] can: peak_usb: fix hwtstamp assignment
From: Marc Kleine-Budde @ 2012-11-26 21:47 UTC (permalink / raw)
  To: netdev; +Cc: linux-can, Oliver Hartkopp, linux-stable, Marc Kleine-Budde
In-Reply-To: <1353966430-12601-1-git-send-email-mkl@pengutronix.de>

From: Oliver Hartkopp <socketcan@hartkopp.net>

The skb->tstamp is set to the hardware timestamp when available in the USB
urb message. This leads to user visible timestamps which contain the 'uptime'
of the USB adapter - and not the usual system generated timestamp.

Fix this wrong assignment by applying the available hardware timestamp to the
skb_shared_hwtstamps data structure - which is intended for this purpose.

Cc: linux-stable <stable@vger.kernel.org>
Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
---
 drivers/net/can/usb/peak_usb/pcan_usb.c     |    8 ++++++--
 drivers/net/can/usb/peak_usb/pcan_usb_pro.c |    8 ++++++--
 2 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/drivers/net/can/usb/peak_usb/pcan_usb.c b/drivers/net/can/usb/peak_usb/pcan_usb.c
index 86f26a1..25723d8 100644
--- a/drivers/net/can/usb/peak_usb/pcan_usb.c
+++ b/drivers/net/can/usb/peak_usb/pcan_usb.c
@@ -519,8 +519,10 @@ static int pcan_usb_decode_error(struct pcan_usb_msg_context *mc, u8 n,
 	mc->pdev->dev.can.state = new_state;
 
 	if (status_len & PCAN_USB_STATUSLEN_TIMESTAMP) {
+		struct skb_shared_hwtstamps *hwts = skb_hwtstamps(skb);
+
 		peak_usb_get_ts_tv(&mc->pdev->time_ref, mc->ts16, &tv);
-		skb->tstamp = timeval_to_ktime(tv);
+		hwts->hwtstamp = timeval_to_ktime(tv);
 	}
 
 	netif_rx(skb);
@@ -605,6 +607,7 @@ static int pcan_usb_decode_data(struct pcan_usb_msg_context *mc, u8 status_len)
 	struct sk_buff *skb;
 	struct can_frame *cf;
 	struct timeval tv;
+	struct skb_shared_hwtstamps *hwts;
 
 	skb = alloc_can_skb(mc->netdev, &cf);
 	if (!skb)
@@ -652,7 +655,8 @@ static int pcan_usb_decode_data(struct pcan_usb_msg_context *mc, u8 status_len)
 
 	/* convert timestamp into kernel time */
 	peak_usb_get_ts_tv(&mc->pdev->time_ref, mc->ts16, &tv);
-	skb->tstamp = timeval_to_ktime(tv);
+	hwts = skb_hwtstamps(skb);
+	hwts->hwtstamp = timeval_to_ktime(tv);
 
 	/* push the skb */
 	netif_rx(skb);
diff --git a/drivers/net/can/usb/peak_usb/pcan_usb_pro.c b/drivers/net/can/usb/peak_usb/pcan_usb_pro.c
index e1626d9..30d79bf 100644
--- a/drivers/net/can/usb/peak_usb/pcan_usb_pro.c
+++ b/drivers/net/can/usb/peak_usb/pcan_usb_pro.c
@@ -532,6 +532,7 @@ static int pcan_usb_pro_handle_canmsg(struct pcan_usb_pro_interface *usb_if,
 	struct can_frame *can_frame;
 	struct sk_buff *skb;
 	struct timeval tv;
+	struct skb_shared_hwtstamps *hwts;
 
 	skb = alloc_can_skb(netdev, &can_frame);
 	if (!skb)
@@ -549,7 +550,8 @@ static int pcan_usb_pro_handle_canmsg(struct pcan_usb_pro_interface *usb_if,
 		memcpy(can_frame->data, rx->data, can_frame->can_dlc);
 
 	peak_usb_get_ts_tv(&usb_if->time_ref, le32_to_cpu(rx->ts32), &tv);
-	skb->tstamp = timeval_to_ktime(tv);
+	hwts = skb_hwtstamps(skb);
+	hwts->hwtstamp = timeval_to_ktime(tv);
 
 	netif_rx(skb);
 	netdev->stats.rx_packets++;
@@ -570,6 +572,7 @@ static int pcan_usb_pro_handle_error(struct pcan_usb_pro_interface *usb_if,
 	u8 err_mask = 0;
 	struct sk_buff *skb;
 	struct timeval tv;
+	struct skb_shared_hwtstamps *hwts;
 
 	/* nothing should be sent while in BUS_OFF state */
 	if (dev->can.state == CAN_STATE_BUS_OFF)
@@ -664,7 +667,8 @@ static int pcan_usb_pro_handle_error(struct pcan_usb_pro_interface *usb_if,
 	dev->can.state = new_state;
 
 	peak_usb_get_ts_tv(&usb_if->time_ref, le32_to_cpu(er->ts32), &tv);
-	skb->tstamp = timeval_to_ktime(tv);
+	hwts = skb_hwtstamps(skb);
+	hwts->hwtstamp = timeval_to_ktime(tv);
 	netif_rx(skb);
 	netdev->stats.rx_packets++;
 	netdev->stats.rx_bytes += can_frame->can_dlc;
-- 
1.7.10.4

^ permalink raw reply related

* Re: [PATCH net-next] dsa: Hide core config options; make drivers select what they need
From: David Miller @ 2012-11-26 22:11 UTC (permalink / raw)
  To: rdunlap; +Cc: bhutchings, netdev, viresh.kumar
In-Reply-To: <50B3C8B0.5000308@infradead.org>

From: Randy Dunlap <rdunlap@infradead.org>
Date: Mon, 26 Nov 2012 11:53:20 -0800

> On 11/26/2012 11:16 AM, Ben Hutchings wrote:
> 
>> Commit 82167cb8c6b2f8166d5c7532e5ef4b5e0cc46a72 ('net: dsa/slave: Fix
>> compilation warnings') fixed one possible invalid configuration
>> (NET_DSA enabled with no trailer formats) but added others: drivers
>> can select NET_DSA without its dependencies being met.
>> 
>> It's not very useful to make either the DSA core or the tagging
>> formats manually selectable without a driver to use them, so:
>> 
>> 1. Define a hidden HAVE_NET_DSA option and move the dependencies of
>>    NET_DSA to that.  While we're at it, drop the deprecated
>>    EXPERIMENTAL dependency.
>> 2. Make NET_DSA and the drivers dependent on HAVE_NET_DSA.
>> 3. Hide the tagging format options again.
>> 4. Make drivers select both NET_DSA and the appropriate tagging format
>>    option.
>> 
>> Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
> 
> Acked-by: Randy Dunlap <rdunlap@infradead.org>

Applied, thanks everyone.

^ permalink raw reply

* Re: pull-request: can 2012-11-26
From: David Miller @ 2012-11-26 22:16 UTC (permalink / raw)
  To: mkl; +Cc: netdev, linux-can
In-Reply-To: <1353966430-12601-1-git-send-email-mkl@pengutronix.de>

From: Marc Kleine-Budde <mkl@pengutronix.de>
Date: Mon, 26 Nov 2012 22:47:08 +0100

> two late fixes for v3.7 from Oliver Hartkopp, he found and fixed a problem in
> the peak usb driver, a hardware timestamp is assigned wrong. In the second
> patch he fixed a problem in the broadcast manager, in case of a timeout the
> rx_ifindex is not set properly.

Pulled, but I cannot guarentee these will make it into 3.7 as
this is very late and I am also travelling.

Worst case is they end up in net-next and you can submit them
to -stable if you wish.

^ permalink raw reply

* Re: [PATCH v2] atm: br2684: Fix excessive queue bloat
From: David Miller @ 2012-11-26 22:16 UTC (permalink / raw)
  To: dwmw2; +Cc: netdev, blogic, dave.taht, chas
In-Reply-To: <1353881212.26346.303.camel@shinybook.infradead.org>


Applied, thanks a lot.

^ permalink raw reply

* Re: [PATCH net-next 0/2] tun: trivial fixes.
From: David Miller @ 2012-11-26 22:22 UTC (permalink / raw)
  To: ramirose; +Cc: maxk, netdev
In-Reply-To: <1353917261-2974-1-git-send-email-ramirose@gmail.com>

From: Rami Rosen <ramirose@gmail.com>
Date: Mon, 26 Nov 2012 10:07:39 +0200

> These two patches contain trivial fixes to the tun driver.
>   First patch fixes 4 typos.
>   Second patch puts the correct method name in a debug message in tun_do_read().
> 
> Rami Rosen (2):
>   [PATCH net-next 1/2] vtun: fix typos.
>   [PATCH net-next 2/2] tun: put correct method name in a debug message.

All applied to net-next

^ permalink raw reply

* Re: [net-next.git 0/6 (V5)] stmmac: remove dead code for STMMAC_TIMER and add new mitigation schema
From: David Miller @ 2012-11-26 22:23 UTC (permalink / raw)
  To: peppe.cavallaro; +Cc: netdev, bhutchings
In-Reply-To: <1353921046-5121-1-git-send-email-peppe.cavallaro@st.com>

From: Giuseppe CAVALLARO <peppe.cavallaro@st.com>
Date: Mon, 26 Nov 2012 10:10:40 +0100

> These patch series remove the STMMAC_TIMER option no longer updated
> and never used and add a new mitigation schema.
> Having removed the Timer opt, this has made the driver slim.
> On top of this work, it has been easier to introduce the new
> mitigation schema based on HW RX-watchdog (available in new cores).
> In fact, 3.50 and newer cores have an HW RX-Watchdog that can be used for 
> mitigating the Rx-interrupts and first results look promising.

All applied to net-next

^ permalink raw reply

* Re: [PATCH net-next 1/2] ptp: reduce stack usage when reading external time stamps
From: David Miller @ 2012-11-26 22:23 UTC (permalink / raw)
  To: richardcochran; +Cc: netdev
In-Reply-To: <1146e32bcb835ebf394bab91db3161600ab5213a.1353929829.git.richardcochran@gmail.com>

From: Richard Cochran <richardcochran@gmail.com>
Date: Mon, 26 Nov 2012 12:44:34 +0100

> This patch removes the large buffer from the stack of the read file
> operation and replaces it with a kmalloced buffer.
> 
> Signed-off-by: Richard Cochran <richardcochran@gmail.com>

Applied.

^ permalink raw reply

* Re: [PATCH net-next 2/2] ptp: reduce stack usage when measuring the system time offset
From: David Miller @ 2012-11-26 22:23 UTC (permalink / raw)
  To: richardcochran; +Cc: netdev
In-Reply-To: <6151dfc7e5bb80d73563502a2a14c9f2aad8bdb0.1353929830.git.richardcochran@gmail.com>

From: Richard Cochran <richardcochran@gmail.com>
Date: Mon, 26 Nov 2012 12:44:35 +0100

> This patch removes the large buffer from the stack of the system
> offset ioctl and replaces it with a kmalloced buffer.
> 
> Signed-off-by: Richard Cochran <richardcochran@gmail.com>

Applied.

^ permalink raw reply

* Re: [PATCH net-next] cpts: add missing kconfig dependency
From: David Miller @ 2012-11-26 22:23 UTC (permalink / raw)
  To: richardcochran; +Cc: netdev, linux-arm-kernel, cyril, mugunthanvnm
In-Reply-To: <1353931638-1023-1-git-send-email-richardcochran@gmail.com>

From: Richard Cochran <richardcochran@gmail.com>
Date: Mon, 26 Nov 2012 13:07:18 +0100

> The Common Platform Time Sync function of the CPSW does not depend the
> CPSW configuration option as it should. This patch fixes the issue by
> adding the dependency.
> 
> Signed-off-by: Richard Cochran <richardcochran@gmail.com>

Applied.

^ permalink raw reply

* Re: [PATCH net] ipv4: avoid passing NULL to inet_putpeer() in icmpv4_xrlim_allow()
From: David Miller @ 2012-11-26 22:25 UTC (permalink / raw)
  To: ncardwell; +Cc: netdev
In-Reply-To: <1353819277-2350-1-git-send-email-ncardwell@google.com>

From: Neal Cardwell <ncardwell@google.com>
Date: Sat, 24 Nov 2012 23:54:37 -0500

> inet_getpeer_v4() can return NULL under OOM conditions, and while
> inet_peer_xrlim_allow() is OK with a NULL peer, inet_putpeer() will
> crash.
> 
> This code path now uses the same idiom as the others from:
> 1d861aa4b3fb08822055345f480850205ffe6170 ("inet: Minimize use of
> cached route inetpeer.").
> 
> Signed-off-by: Neal Cardwell <ncardwell@google.com>

Applied, thanks a lot Neil.

^ permalink raw reply

* Re: private netdev flags into UAPI?
From: Or Gerlitz @ 2012-11-26 22:29 UTC (permalink / raw)
  To: David Howells; +Cc: Or Gerlitz, netdev
In-Reply-To: <10845.1353921761@warthog.procyon.org.uk>

On Mon, Nov 26, 2012 at 11:22 AM, David Howells <dhowells@redhat.com> wrote:
> They were exposed to userspace already

So the script carries the bug into a new directory... why? AFAIK,
intentionally there's no way to read private flags from user space, so
what's the point in defining them there?

Or.

^ permalink raw reply

* Re: [PATCH net-next 2/2] tun: put correct method name in a debug message.
From: Joe Perches @ 2012-11-26 22:31 UTC (permalink / raw)
  To: Rami Rosen; +Cc: davem, maxk, netdev
In-Reply-To: <1353917261-2974-3-git-send-email-ramirose@gmail.com>

On Mon, 2012-11-26 at 10:07 +0200, Rami Rosen wrote:
> This patch puts the correct method name, tun_do_read, in a debug message.
> 
> Signed-off-by: Rami Rosen <ramirose@gmail.com>
> ---
>  drivers/net/tun.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/tun.c b/drivers/net/tun.c
> index 1dfb135..607a3a5 100644
> --- a/drivers/net/tun.c
> +++ b/drivers/net/tun.c
> @@ -1296,7 +1296,7 @@ static ssize_t tun_do_read(struct tun_struct *tun, struct tun_file *tfile,
>  	struct sk_buff *skb;
>  	ssize_t ret = 0;
>  
> -	tun_debug(KERN_INFO, tun, "tun_chr_read\n");
> +	tun_debug(KERN_INFO, tun, "tun_do_read\n");

It's almost always better to use "%s\n", __func__

Of course for these sorts of trivial tracing functions,
it's better to use the function tracer instead.

http://lwn.net/Articles/370423/

^ permalink raw reply

* Re: [PATCH] sctp: fix memory leak in sctp_datamsg_from_user() when copy from user space fails
From: David Miller @ 2012-11-26 22:34 UTC (permalink / raw)
  To: vyasevich; +Cc: tt.rantala, linux-sctp, netdev, nhorman, sri, davej
In-Reply-To: <50B38235.6070908@gmail.com>

From: Vlad Yasevich <vyasevich@gmail.com>
Date: Mon, 26 Nov 2012 09:52:37 -0500

> Should be using sctp_chunk_free().  Good find.

Tommi, please respin your patch to use sctp_chunk_free() as
Vlad has asked.

Thanks.

^ permalink raw reply

* Re: [PATCH] sctp: fix -ENOMEM result with invalid user space pointer in sendto() syscall
From: David Miller @ 2012-11-26 22:34 UTC (permalink / raw)
  To: vyasevich; +Cc: tt.rantala, linux-sctp, netdev, nhorman, sri, davej
In-Reply-To: <50B38339.40105@gmail.com>

From: Vlad Yasevich <vyasevich@gmail.com>
Date: Mon, 26 Nov 2012 09:56:57 -0500

> On 11/22/2012 08:23 AM, Tommi Rantala wrote:
>> Consider the following program, that sets the second argument to the
>> sendto() syscall incorrectly:
 ...
>> Signed-off-by: Tommi Rantala <tt.rantala@gmail.com>
> 
> Looks good
> 
> Acked-by: Vlad Yasevich <vyasevich@gmail.com>

I'll apply this after the other SCTP fix is respun, because there
is a dependency.

^ permalink raw reply

* Please Open The Attach Letter And Get Back To Me.
From: From Mr Steven Edom @ 2012-11-26 22:29 UTC (permalink / raw)


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



[-- Attachment #2: MOST URGENT..docx --]
[-- Type: application/vnd.openxmlformats-officedocument.wordprocessingml.document, Size: 11898 bytes --]

^ permalink raw reply

* Re: [PATCH] ip6mr: Add sizeof verification to MRT6_ASSERT and MT6_PIM
From: David Miller @ 2012-11-26 22:36 UTC (permalink / raw)
  To: joe; +Cc: eric.dumazet, netdev
In-Reply-To: <1353903994.2493.2.camel@joe-AO722>

From: Joe Perches <joe@perches.com>
Date: Sun, 25 Nov 2012 20:26:34 -0800

> Verify the length of the user-space arguments.
> 
> Signed-off-by: Joe Perches <joe@perches.com>

Applied to net-next, thanks.

^ 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