Netdev List
 help / color / mirror / Atom feed
* [PATCH 24/27] orinoco_usb: Use setup_timer
From: Julia Lawall @ 2014-12-26 14:35 UTC (permalink / raw)
  To: Kalle Valo; +Cc: kernel-janitors, linux-wireless, netdev, linux-kernel
In-Reply-To: <1419604558-29743-1-git-send-email-Julia.Lawall@lip6.fr>

Convert a call to init_timer and accompanying intializations of
the timer's data and function fields to a call to setup_timer.

A simplified version of the semantic match that fixes this problem is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@@
expression t,f,d;
@@

-init_timer(&t);
+setup_timer(&t,f,d);
-t.function = f;
-t.data = d;
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>

---
 drivers/net/wireless/orinoco/orinoco_usb.c |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/net/wireless/orinoco/orinoco_usb.c b/drivers/net/wireless/orinoco/orinoco_usb.c
index 9958464..61612a6 100644
--- a/drivers/net/wireless/orinoco/orinoco_usb.c
+++ b/drivers/net/wireless/orinoco/orinoco_usb.c
@@ -364,9 +364,7 @@ static struct request_context *ezusb_alloc_ctx(struct ezusb_priv *upriv,
 	atomic_set(&ctx->refcount, 1);
 	init_completion(&ctx->done);
 
-	init_timer(&ctx->timer);
-	ctx->timer.function = ezusb_request_timerfn;
-	ctx->timer.data = (u_long) ctx;
+	setup_timer(&ctx->timer, ezusb_request_timerfn, (u_long)ctx);
 	return ctx;
 }
 

^ permalink raw reply related

* [PATCH 26/27] mwifiex: 11n_rxreorder: Use setup_timer
From: Julia Lawall @ 2014-12-26 14:35 UTC (permalink / raw)
  To: Amitkumar Karwar
  Cc: kernel-janitors, Avinash Patil, Kalle Valo, linux-wireless,
	netdev, linux-kernel
In-Reply-To: <1419604558-29743-1-git-send-email-Julia.Lawall@lip6.fr>

Convert a call to init_timer and accompanying intializations of
the timer's data and function fields to a call to setup_timer.

A simplified version of the semantic match that fixes this problem is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@@
expression t,f,d;
@@

-init_timer(&t);
+setup_timer(&t,f,d);
-t.function = f;
-t.data = d;
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>

---
 drivers/net/wireless/mwifiex/11n_rxreorder.c |    6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/net/wireless/mwifiex/11n_rxreorder.c b/drivers/net/wireless/mwifiex/11n_rxreorder.c
index d73fda3..f33dc81 100644
--- a/drivers/net/wireless/mwifiex/11n_rxreorder.c
+++ b/drivers/net/wireless/mwifiex/11n_rxreorder.c
@@ -391,10 +391,8 @@ mwifiex_11n_create_rx_reorder_tbl(struct mwifiex_private *priv, u8 *ta,
 	new_node->timer_context.priv = priv;
 	new_node->timer_context.timer_is_set = false;
 
-	init_timer(&new_node->timer_context.timer);
-	new_node->timer_context.timer.function = mwifiex_flush_data;
-	new_node->timer_context.timer.data =
-			(unsigned long) &new_node->timer_context;
+	setup_timer(&new_node->timer_context.timer, mwifiex_flush_data,
+		    (unsigned long)&new_node->timer_context);
 
 	for (i = 0; i < win_size; ++i)
 		new_node->rx_reorder_ptr[i] = NULL;


^ permalink raw reply related

* [PATCH 25/27] mwifiex: tdls: Use setup_timer
From: Julia Lawall @ 2014-12-26 14:35 UTC (permalink / raw)
  To: Amitkumar Karwar
  Cc: kernel-janitors, Avinash Patil, Kalle Valo, linux-wireless,
	netdev, linux-kernel
In-Reply-To: <1419604558-29743-1-git-send-email-Julia.Lawall@lip6.fr>

Convert a call to init_timer and accompanying intializations of
the timer's data and function fields to a call to setup_timer.

A simplified version of the semantic match that fixes this problem is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@@
expression t,f,d;
@@

-init_timer(&t);
+setup_timer(&t,f,d);
-t.function = f;
-t.data = d;
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>

---
 drivers/net/wireless/mwifiex/tdls.c |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/net/wireless/mwifiex/tdls.c b/drivers/net/wireless/mwifiex/tdls.c
index 22884b4..5a64681 100644
--- a/drivers/net/wireless/mwifiex/tdls.c
+++ b/drivers/net/wireless/mwifiex/tdls.c
@@ -1367,9 +1367,8 @@ void mwifiex_check_auto_tdls(unsigned long context)
 
 void mwifiex_setup_auto_tdls_timer(struct mwifiex_private *priv)
 {
-	init_timer(&priv->auto_tdls_timer);
-	priv->auto_tdls_timer.function = mwifiex_check_auto_tdls;
-	priv->auto_tdls_timer.data = (unsigned long)priv;
+	setup_timer(&priv->auto_tdls_timer, mwifiex_check_auto_tdls,
+		    (unsigned long)priv);
 	priv->auto_tdls_timer_active = true;
 	mod_timer(&priv->auto_tdls_timer,
 		  jiffies + msecs_to_jiffies(MWIFIEX_TIMER_10S));

^ permalink raw reply related

* [PATCH 4/27] atheros: atlx: Use setup_timer
From: Julia Lawall @ 2014-12-26 14:35 UTC (permalink / raw)
  To: Jay Cliburn; +Cc: kernel-janitors, Chris Snook, netdev, linux-kernel
In-Reply-To: <1419604558-29743-1-git-send-email-Julia.Lawall@lip6.fr>

Convert a call to init_timer and accompanying intializations of
the timer's data and function fields to a call to setup_timer.

A simplified version of the semantic match that fixes this problem is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@@
expression t,f,d;
@@

-init_timer(&t);
+setup_timer(&t,f,d);
-t.function = f;
-t.data = d;
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>

---
 drivers/net/ethernet/atheros/atlx/atl2.c |   10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/drivers/net/ethernet/atheros/atlx/atl2.c b/drivers/net/ethernet/atheros/atlx/atl2.c
index 84a09e8..482a7ca 100644
--- a/drivers/net/ethernet/atheros/atlx/atl2.c
+++ b/drivers/net/ethernet/atheros/atlx/atl2.c
@@ -1436,13 +1436,11 @@ static int atl2_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 
 	atl2_check_options(adapter);
 
-	init_timer(&adapter->watchdog_timer);
-	adapter->watchdog_timer.function = atl2_watchdog;
-	adapter->watchdog_timer.data = (unsigned long) adapter;
+	setup_timer(&adapter->watchdog_timer, atl2_watchdog,
+		    (unsigned long)adapter);
 
-	init_timer(&adapter->phy_config_timer);
-	adapter->phy_config_timer.function = atl2_phy_config;
-	adapter->phy_config_timer.data = (unsigned long) adapter;
+	setup_timer(&adapter->phy_config_timer, atl2_phy_config,
+		    (unsigned long)adapter);
 
 	INIT_WORK(&adapter->reset_task, atl2_reset_task);
 	INIT_WORK(&adapter->link_chg_task, atl2_link_chg_task);

^ permalink raw reply related

* [PATCH 27/27] mwifiex: main: Use setup_timer
From: Julia Lawall @ 2014-12-26 14:35 UTC (permalink / raw)
  To: Amitkumar Karwar
  Cc: kernel-janitors, Avinash Patil, Kalle Valo, linux-wireless,
	netdev, linux-kernel
In-Reply-To: <1419604558-29743-1-git-send-email-Julia.Lawall@lip6.fr>

Convert a call to init_timer and accompanying intializations of
the timer's data and function fields to a call to setup_timer.

A simplified version of the semantic match that fixes this problem is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@@
expression t,f,d;
@@

-init_timer(&t);
+setup_timer(&t,f,d);
-t.function = f;
-t.data = d;
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>

---
 drivers/net/wireless/mwifiex/main.c |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/net/wireless/mwifiex/main.c b/drivers/net/wireless/mwifiex/main.c
index d4d2223..53f4202 100644
--- a/drivers/net/wireless/mwifiex/main.c
+++ b/drivers/net/wireless/mwifiex/main.c
@@ -83,9 +83,8 @@ static int mwifiex_register(void *card, struct mwifiex_if_ops *if_ops,
 	}
 	mwifiex_init_lock_list(adapter);
 
-	init_timer(&adapter->cmd_timer);
-	adapter->cmd_timer.function = mwifiex_cmd_timeout_func;
-	adapter->cmd_timer.data = (unsigned long) adapter;
+	setup_timer(&adapter->cmd_timer, mwifiex_cmd_timeout_func,
+		    (unsigned long)adapter);
 
 	return 0;
 

^ permalink raw reply related

* [PATCH] ipnetns: fix exec for netns not in NETNS_RUN_DIR
From: Shahar Lev @ 2014-12-26 16:27 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: netdev, Shahar Lev

Enabling "ip netns exec" to be run with a net namespace
specified by a file path rather than a filename under /var/run/nets.

Signed-off-by: Shahar Lev <shahar@stratoscale.com>
---
 ip/ipnetns.c | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/ip/ipnetns.c b/ip/ipnetns.c
index 1c8aa02..5310d0c 100644
--- a/ip/ipnetns.c
+++ b/ip/ipnetns.c
@@ -66,7 +66,7 @@ static int usage(void)
 	exit(-1);
 }
 
-int get_netns_fd(const char *name)
+static int get_netns_fd_flags(const char *name, int flags)
 {
 	char pathbuf[MAXPATHLEN];
 	const char *path, *ptr;
@@ -78,7 +78,12 @@ int get_netns_fd(const char *name)
 			NETNS_RUN_DIR, name );
 		path = pathbuf;
 	}
-	return open(path, O_RDONLY);
+	return open(path, flags);
+}
+
+int get_netns_fd(const char *name)
+{
+	return get_netns_fd_flags(name, O_RDONLY);
 }
 
 static int netns_list(int argc, char **argv)
@@ -135,7 +140,6 @@ static int netns_exec(int argc, char **argv)
 	 * aware, and execute a program in that environment.
 	 */
 	const char *name, *cmd;
-	char net_path[MAXPATHLEN];
 	int netns;
 
 	if (argc < 1) {
@@ -149,8 +153,7 @@ static int netns_exec(int argc, char **argv)
 
 	name = argv[0];
 	cmd = argv[1];
-	snprintf(net_path, sizeof(net_path), "%s/%s", NETNS_RUN_DIR, name);
-	netns = open(net_path, O_RDONLY | O_CLOEXEC);
+	netns = get_netns_fd_flags(name, O_RDONLY | O_CLOEXEC);
 	if (netns < 0) {
 		fprintf(stderr, "Cannot open network namespace \"%s\": %s\n",
 			name, strerror(errno));
-- 
1.8.3.1

^ permalink raw reply related

* pull request: bluetooth 2014-12-26
From: Johan Hedberg @ 2014-12-26 18:15 UTC (permalink / raw)
  To: davem-fT/PcQaiUtIeIZ0/mPfg9Q
  Cc: netdev-u79uwXL29TY76Z2rM5mHXA,
	linux-bluetooth-u79uwXL29TY76Z2rM5mHXA

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

Hi Dave,

Here's one more bluetooth pull request for 3.19. We've got two fixes:

 - Fix for accepting connections with old user space versions of BlueZ
 - Fix for Bluetooth controllers that don't have a public address

Both of these are regressions that were introduced in 3.17, so the
appropriate Cc: stable annotations are provided.

Please let me know if there are any issues pulling. Thanks.

Johan

---
The following changes since commit 71bb99a02b32b4cc4265118e85f6035ca72923f0:

  Bluetooth: bnep: bnep_add_connection() should verify that it's dealing with l2cap socket (2014-12-19 13:48:27 +0100)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth.git for-upstream

for you to fetch changes up to 6a8fc95c87110a466ee81675b41170b963f82bdb:

  Bluetooth: Fix accepting connections when not using mgmt (2014-12-24 20:02:00 +0100)

----------------------------------------------------------------
Johan Hedberg (1):
      Bluetooth: Fix accepting connections when not using mgmt

Marcel Holtmann (1):
      Bluetooth: Fix controller configuration with HCI_QUIRK_INVALID_BDADDR

 net/bluetooth/hci_event.c | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)


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

^ permalink raw reply

* Re: [PATCH net-next 2/2] tun: enable socket system calls
From: Alex Gartrell @ 2014-12-26 19:16 UTC (permalink / raw)
  To: Jason Wang, davem, herbert; +Cc: netdev, linux-kernel, kernel-team
In-Reply-To: <549D2DBE.5040301@redhat.com>

Hello Jason,

Thanks for commenting.

On 12/26/14 4:43 AM, Jason Wang wrote:
>
> On 12/26/2014 02:50 PM, Alex Gartrell wrote:
>> By setting private_data to a socket and private_data_is_socket to true, we
>> can use the socket syscalls.  We also can't just blindly use private_data
>> anymore, so there's a __tun_file_get function that returns the container_of
>> private_data appropriately.
>
> So this in fact expose other socket syscalls to userspace. But some of
> proto_ops was not supported. E.g consider what happens if a bind() was
> called for tun socket?

Yeah, I erroneously assumed that NULL => sock_no_*, but a quick glance 
assures me that that's not the case.  In this case, I'd need to 
introduce another patch that sets all of the additional ops to sock_no_*.

>> +static struct tun_file *tun_file_from_file(struct file *file)
>> +{
>> +	struct socket *s = (struct socket *)file->private_data;
>> +
>> +	if (!s)
>
> Can s be NULL here? If yes, why tun_get() didn't check for NULL?

This check is just to ensure that tun_get_socket continues to work in 
the right way when passed a file with private_data set to NULL.

Thanks,
-- 
Alex Gartrell <agartrell@fb.com>

^ permalink raw reply

* Re: [PATCH net-next 1/2] socket: Allow external sockets to use socket syscalls
From: Alex Gartrell @ 2014-12-26 19:26 UTC (permalink / raw)
  To: Jason Wang, davem, herbert; +Cc: netdev, linux-kernel, kernel-team
In-Reply-To: <549D2E51.3040200@redhat.com>

Hello Jason,

Thanks again for your comments.

On 12/26/14 4:45 AM, Jason Wang wrote:
>> @@ -388,6 +388,7 @@ struct file *sock_alloc_file(struct socket *sock, int flags, const char *dname)
>>   	sock->file = file;
>>   	file->f_flags = O_RDWR | (flags & O_NONBLOCK);
>>   	file->private_data = sock;
>> +	file->private_data_is_socket = true;
>
> This is only safe if all user of sock_alloc_file() have full support for
> each method in proto_ops.

This doesn't change anything in the invocation of the syscalls, as every 
file allocated through this path already passes the "is_socket" test due 
to the (sadly missing here)
     file = alloc_file(..., &socket_file_ops)
above, so this makes things no less safe than they were.

Of course we also need to implement these proto_ops for the tun device 
in the subsequent patch to make it work.

>>   	return file;
>>   }
>>   EXPORT_SYMBOL(sock_alloc_file);
>> @@ -411,7 +412,7 @@ static int sock_map_fd(struct socket *sock, int flags)
>>
>>   struct socket *sock_from_file(struct file *file, int *err)
>>   {
>> -	if (file->f_op == &socket_file_ops)
>> +	if (file->private_data_is_socket)
>>   		return file->private_data;	/* set in sock_map_fd */
>>
>>   	*err = -ENOTSOCK;
>
> Not sure it's the best method, how about a dedicated f_op to do this?

So like a get_socket operation?  That would simplify this a lot, 
certainly (we wouldn't need to move private_data around in the tun driver).

Thanks,
-- 
Alex Gartrell <agartrell@fb.com>

^ permalink raw reply

* Re: [PATCH net-next 1/2] socket: Allow external sockets to use socket syscalls
From: Al Viro @ 2014-12-26 19:56 UTC (permalink / raw)
  To: Alex Gartrell; +Cc: davem, herbert, netdev, linux-kernel, kernel-team
In-Reply-To: <1419576624-8999-2-git-send-email-agartrell@fb.com>

On Thu, Dec 25, 2014 at 10:50:23PM -0800, Alex Gartrell wrote:
> Currently the "is-socket" test for a file compares the ops table pointer,
> which is static and local to the socket.c.  Instead, this adds a flag for
> private_data_is_socket.  This is an exceptionally long commit message for a
> two-line patch.

NAK.  Don't crap into struct file, please.

^ permalink raw reply

* Re: [PATCH net-next 1/2] socket: Allow external sockets to use socket syscalls
From: Alex Gartrell @ 2014-12-26 19:59 UTC (permalink / raw)
  To: Al Viro; +Cc: davem, herbert, netdev, linux-kernel, kernel-team
In-Reply-To: <20141226195650.GF22149@ZenIV.linux.org.uk>

Hello Al,

On 12/26/14 2:56 PM, Al Viro wrote:
> On Thu, Dec 25, 2014 at 10:50:23PM -0800, Alex Gartrell wrote:
>> Currently the "is-socket" test for a file compares the ops table pointer,
>> which is static and local to the socket.c.  Instead, this adds a flag for
>> private_data_is_socket.  This is an exceptionally long commit message for a
>> two-line patch.
>
> NAK.  Don't crap into struct file, please.
>

I don't disagree with your sentiment here.  Is the additional f_op 
approach less gross or do you have something else in mind?

Thanks,
-- 
Alex Gartrell <agartrell@fb.com>

^ permalink raw reply

* Re: [E1000-devel] [PATCH net v3 2/2] e100: Add netif_napi_del in the driver
From: Stephen Hemminger @ 2014-12-26 20:27 UTC (permalink / raw)
  To: Jia-Ju Bai
  Cc: jeffrey.t.kirsher, jesse.brandeburg, bruce.w.allan,
	carolyn.wyborny, donald.c.skidmore, gregory.v.rose, matthew.vick,
	john.ronciak, mitch.a.williams, e1000-devel, netdev, linux.nics
In-Reply-To: <1419472956-6270-2-git-send-email-baijiaju1990@163.com>

On Thu, 25 Dec 2014 10:02:36 +0800
Jia-Ju Bai <baijiaju1990@163.com> wrote:

> The driver lacks netif_napi_del in the normal path and error path to 
> match the call of netif_napi_add in e100_probe.
> This patch fixes this problem, and it has been tested on the hardware.
> 
> Signed-off-by: Jia-Ju Bai <baijiaju1990@163.com>
> ---
>  drivers/net/ethernet/intel/e100.c |    2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/net/ethernet/intel/e100.c b/drivers/net/ethernet/intel/e100.c
> index 781065e..21c4d0f 100644
> --- a/drivers/net/ethernet/intel/e100.c
> +++ b/drivers/net/ethernet/intel/e100.c
> @@ -2985,6 +2985,7 @@ err_out_free_res:
>  err_out_disable_pdev:
>  	pci_disable_device(pdev);
>  err_out_free_dev:
> +	netif_napi_del(&nic->napi);
>  	free_netdev(netdev);

This is unnecessary since already done in free_netdev()

void free_netdev(struct net_device *dev)
{
..	
	list_for_each_entry_safe(p, n, &dev->napi_list, dev_list)
		netif_napi_del(p);
.

^ permalink raw reply

* Re: [PATCH net] net/core: Handle csum for CHECKSUM_COMPLETE VXLAN forwarding
From: David Miller @ 2014-12-26 21:17 UTC (permalink / raw)
  To: jay.vosburgh; +Cc: netdev
In-Reply-To: <2983.1419031920@famine>

From: Jay Vosburgh <jay.vosburgh@canonical.com>
Date: Fri, 19 Dec 2014 15:32:00 -0800

> 
> 	When using VXLAN tunnels and a sky2 device, I have experienced
> checksum failures of the following type:
 ...
> 	These are reliably reproduced in a network topology of:
> 
> container:eth0 == host(OVS VXLAN on VLAN) == bond0 == eth0 (sky2) -> switch
> 
> 	When VXLAN encapsulated traffic is received from a similarly
> configured peer, the above warning is generated in the receive
> processing of the encapsulated packet.  Note that the warning is
> associated with the container eth0.
> 
>         The skbs from sky2 have ip_summed set to CHECKSUM_COMPLETE, and
> because the packet is an encapsulated Ethernet frame, the checksum
> generated by the hardware includes the inner protocol and Ethernet
> headers.
> 
> 	The receive code is careful to update the skb->csum, except in
> __dev_forward_skb, as called by dev_forward_skb.  __dev_forward_skb
> calls eth_type_trans, which in turn calls skb_pull_inline(skb, ETH_HLEN)
> to skip over the Ethernet header, but does not update skb->csum when
> doing so.
> 
> 	This patch resolves the problem by adding a call to
> skb_postpull_rcsum to update the skb->csum after the call to
> eth_type_trans.
> 
> Signed-off-by: Jay Vosburgh <jay.vosburgh@canonical.com>

Applied and queued up for -stable, thanks Jay.

^ permalink raw reply

* Re: [PATCH] net: phy: micrel: use generic config_init for KSZ8021/KSZ8031
From: David Miller @ 2014-12-26 21:24 UTC (permalink / raw)
  To: johan; +Cc: f.fainelli, netdev, linux-kernel, bth
In-Reply-To: <1419335957-18020-1-git-send-email-johan@kernel.org>

From: Johan Hovold <johan@kernel.org>
Date: Tue, 23 Dec 2014 12:59:17 +0100

> Use generic config_init callback also for KSZ8021 and KSZ8031.
> 
> This has been avoided this far due to commit b838b4aced99 ("phy/micrel:
> KSZ8031RNL RMII clock reconfiguration bug"), which claims that the PHY
> becomes unresponsive if the broadcast-disable flag is set before
> configuring the clock mode.
> 
> Turns out that the problem seemingly worked-around by the above
> mentioned commit was really due to a hardware-configuration issue, where
> the PHY was in fact strapped to address 3 rather than 0.
> 
> Tested-by: Bruno Thomsen <bth@kamstrup.dk>
> Signed-off-by: Johan Hovold <johan@kernel.org>

Applied, thank you.

^ permalink raw reply

* Re: [PATCH net v3] e1000: Add netif_napi_del in the driver
From: Stephen Hemminger @ 2014-12-26 21:39 UTC (permalink / raw)
  To: Jia-Ju Bai
  Cc: jeffrey.t.kirsher, jesse.brandeburg, bruce.w.allan,
	carolyn.wyborny, donald.c.skidmore, gregory.v.rose, matthew.vick,
	john.ronciak, mitch.a.williams, linux.nics, e1000-devel, netdev
In-Reply-To: <1419472827-6170-1-git-send-email-baijiaju1990@163.com>

On Thu, 25 Dec 2014 10:00:27 +0800
Jia-Ju Bai <baijiaju1990@163.com> wrote:

> The driver lacks netif_napi_del in the normal path 
> and error path to match the call of netif_napi_add in e1000_probe.
> This patch fixes this problem, and it has been tested on the hardware.
> 
> Signed-off-by: Jia-Ju Bai <baijiaju1990@163.com>

This is unnecessary patch.
netif_napi_del is already called by free_netdev in the error path.

^ permalink raw reply

* Re: [E1000-devel] [PATCH net v3 3/4] e1000e: Add netif_napi_del in the driver
From: Stephen Hemminger @ 2014-12-26 21:42 UTC (permalink / raw)
  To: Jia-Ju Bai
  Cc: jeffrey.t.kirsher, jesse.brandeburg, bruce.w.allan,
	carolyn.wyborny, donald.c.skidmore, gregory.v.rose, matthew.vick,
	john.ronciak, mitch.a.williams, e1000-devel, netdev, linux.nics
In-Reply-To: <1419472623-6060-3-git-send-email-baijiaju1990@163.com>

On Thu, 25 Dec 2014 09:57:02 +0800
Jia-Ju Bai <baijiaju1990@163.com> wrote:

> The driver lacks netif_napi_del in the normal path
> and error path to match the call of netif_napi_add in e1000_probe.
> This patch fixes this problem, and it has been tested on the hardware.
> 
> Signed-off-by: Jia-Ju Bai <baijiaju1990@163.com>

Another case where netif_napi_del is not needed since already
handled by free_netdev

^ permalink raw reply

* Re: [PATCH] net: xilinx: Remove unnecessary temac_property in the driver
From: David Miller @ 2014-12-26 22:06 UTC (permalink / raw)
  To: appana.durga.rao
  Cc: anirudh, John.Linn, michal.simek, soren.brinkmann, grant.likely,
	robh+dt, netdev, linux-arm-kernel, linux-kernel, devicetree,
	appanad
In-Reply-To: <072fa5b149374b09b3f6d5d767714d3e@BN1AFFO11FD010.protection.gbl>

From: Kedareswara rao Appana <appana.durga.rao@xilinx.com>
Date: Tue, 23 Dec 2014 18:07:55 +0530

> This property is no longer used in the code yet the code looks for it in the device tree.
> It does not cause an error if it's not in the tree.
> 
> Signed-off-by: Kedareswara rao Appana <appanad@xilinx.com>

Applied, thanks.

^ permalink raw reply

* Re: [PATCH net] neigh: remove next ptr from struct neigh_table
From: David Miller @ 2014-12-26 22:07 UTC (permalink / raw)
  To: nicolas.dichtel; +Cc: netdev, xiyou.wangcong
In-Reply-To: <1419353437-4213-1-git-send-email-nicolas.dichtel@6wind.com>

From: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Date: Tue, 23 Dec 2014 17:50:37 +0100

> After commit
> d7480fd3b173 ("neigh: remove dynamic neigh table registration support"),
> this field is not used anymore.
> 
> CC: Cong Wang <xiyou.wangcong@gmail.com>
> Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>

Applied, thank you.

^ permalink raw reply

* Re: [PATCH] net: incorrect use of init_completion fixup
From: David Miller @ 2014-12-26 22:08 UTC (permalink / raw)
  To: der.herr; +Cc: rasesh.mody, netdev, linux-kernel
In-Reply-To: <1419356870-22710-1-git-send-email-der.herr@hofr.at>

From: Nicholas Mc Guire <der.herr@hofr.at>
Date: Tue, 23 Dec 2014 18:47:50 +0100

> The second init_completion call should be a reinit_completion here.
> 
> patch is against 3.18.0 linux-next
> 
> Signed-off-by: Nicholas Mc Guire <der.herr@hofr.at>

Applied, thanks.

^ permalink raw reply

* Re: [PATCH net v2] net: Generalize ndo_gso_check to ndo_features_check
From: David Miller @ 2014-12-26 22:21 UTC (permalink / raw)
  To: jesse; +Cc: netdev, therbert, joestringer, edumazet, hayeswang
In-Reply-To: <1419403046-43165-1-git-send-email-jesse@nicira.com>

From: Jesse Gross <jesse@nicira.com>
Date: Tue, 23 Dec 2014 22:37:26 -0800

> GSO isn't the only offload feature with restrictions that
> potentially can't be expressed with the current features mechanism.
> Checksum is another although it's a general issue that could in
> theory apply to anything. Even if it may be possible to
> implement these restrictions in other ways, it can result in
> duplicate code or inefficient per-packet behavior.
> 
> This generalizes ndo_gso_check so that drivers can remove any
> features that don't make sense for a given packet, similar to
> netif_skb_features(). It also converts existing driver
> restrictions to the new format, completing the work that was
> done to support tunnel protocols since the issues apply to
> checksums as well.
> 
> By actually removing features from the set that are used to do
> offloading, it solves another problem with the existing
> interface. In these cases, GSO would run with the original set
> of features and not do anything because it appears that
> segmentation is not required.
> 
> CC: Tom Herbert <therbert@google.com>
> CC: Joe Stringer <joestringer@nicira.com>
> CC: Eric Dumazet <edumazet@google.com>
> CC: Hayes Wang <hayeswang@realtek.com>
> Signed-off-by: Jesse Gross <jesse@nicira.com>
> Acked-by:  Tom Herbert <therbert@google.com>
> Fixes: 04ffcb255f22 ("net: Add ndo_gso_check")

Applied and queued up for -stable, thanks.

^ permalink raw reply

* [PATCH] nftables: nft_flush_table: handle chain dependencies
From: Asbjoern Sloth Toennesen @ 2014-12-26 22:51 UTC (permalink / raw)
  To: Pablo Neira Ayuso
  Cc: David S. Miller, netfilter-devel, netdev, linux-kernel, stable

Jumping between chains doesn't mix well with flush ruleset,
since nft_flush_table doesn't handle chains referencing chains.

This way it will take one to two loops, to settle.
Alternatively it can be solved by always having two loops,

[  353.373791] ------------[ cut here ]------------
[  353.373845] kernel BUG at net/netfilter/nf_tables_api.c:1159!
[  353.373896] invalid opcode: 0000 [#1] SMP
[  353.373942] Modules linked in: intel_powerclamp uas iwldvm iwlwifi
[  353.374017] CPU: 0 PID: 6445 Comm: 31c3.nft Not tainted 3.18.0 #98
[  353.374069] Hardware name: LENOVO 5129CTO/5129CTO, BIOS 6QET47WW
(1.17 ) 07/14/2010
[  353.374132] task: ffff880230976300 ti: ffff8800a8444000 task.ti:
ffff8800a8444000
[  353.374192] RIP: 0010:[<ffffffff8195fef8>]  [<ffffffff8195fef8>]
nf_tables_chain_destroy+0x58/0x60
[  353.374275] RSP: 0018:ffff8800a8447a90  EFLAGS: 00010202
[  353.374320] RAX: 0000000000000001 RBX: ffff880231d92c00 RCX:
00000001802a0027
[  353.374379] RDX: 00000001802a0028 RSI: ffffea0008c537c0 RDI:
ffff8802314df4e0
[  353.374437] RBP: ffff8800a8447ad8 R08: 00000000314df201 R09:
00000001802a0027
[  353.374494] R10: ffffffff81964a32 R11: ffff8802314df2a0 R12:
ffffffff820c50a8
[  353.374552] R13: ffffffff820c46c0 R14: ffff8800ad706700 R15:
ffff8802314dfcc0
[  353.374611] FS:  00007f96eacb6700(0000) GS:ffff88023bc00000(0000)
knlGS:0000000000000000
[  353.374676] CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
[  353.374723] CR2: 00007f96eacc7002 CR3: 00000000a8418000 CR4:
00000000000007f0
[  353.374781] Stack:
[  353.374800]  ffffffff81964c31 0000000000000000 ffffc90024fecb30
ffffc90024fecb3c
[  353.374872]  ffffc90024fecb7c ffff8800ad706700 0000000000000001
0000000000000000
[  353.374944]  ffff8800ad706300 ffff8800a8447b68 ffffffff81949118
0000000000000000
[  353.375018] Call Trace:
[  353.375046]  [<ffffffff81964c31>] ? nf_tables_commit+0x381/0x540
[  353.375101]  [<ffffffff81949118>] nfnetlink_rcv+0x3d8/0x4b0
[  353.375150]  [<ffffffff81943fc5>] netlink_unicast+0x105/0x1a0
[  353.375200]  [<ffffffff8194438e>] netlink_sendmsg+0x32e/0x790
[  353.375253]  [<ffffffff818f398e>] sock_sendmsg+0x8e/0xc0
[  353.375300]  [<ffffffff818f36b9>] ?
move_addr_to_kernel.part.20+0x19/0x70
[  353.375357]  [<ffffffff818f44f9>] ? move_addr_to_kernel+0x19/0x30
[  353.375410]  [<ffffffff819016d2>] ? verify_iovec+0x42/0xd0
[  353.375459]  [<ffffffff818f3e10>] ___sys_sendmsg+0x3f0/0x400
[  353.375510]  [<ffffffff810615fa>] ? native_sched_clock+0x2a/0x90
[  353.375563]  [<ffffffff81176697>] ? acct_account_cputime+0x17/0x20
[  353.375616]  [<ffffffff8110dc78>] ? account_user_time+0x88/0xa0
[  353.375667]  [<ffffffff818f4bbd>] __sys_sendmsg+0x3d/0x80
[  353.375719]  [<ffffffff81b184f4>] ?
int_check_syscall_exit_work+0x34/0x3d
[  353.375776]  [<ffffffff818f4c0d>] SyS_sendmsg+0xd/0x20
[  353.375823]  [<ffffffff81b1826d>] system_call_fastpath+0x16/0x1b
[  353.375872] Code: 8b 78 10 e8 cb cd 7e ff 48 8b 7b f8 e8 f2 98 86 ff
48 8d bb 78 ff ff ff e8 56 b8 89 ff 48 83 c4 08 5b 5d c3 0f 1f 80 00 00
00 00 <0f> 0b 66 0f 1f 44 00 00 55 48 89 e5 41 57 41 56 41 55 41 54 53
[  353.376307] RIP  [<ffffffff8195fef8>]
nf_tables_chain_destroy+0x58/0x60
[  353.376368]  RSP <ffff8800a8447a90>
[  353.388988] ---[ end trace e51c442af1fdea42 ]---

Cc: stable@vger.kernel.org
Signed-off-by: Asbjoern Sloth Toennesen <asbjorn@asbjorn.biz>
---
 net/netfilter/nf_tables_api.c | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/net/netfilter/nf_tables_api.c b/net/netfilter/nf_tables_api.c
index 129a8da..6a10cbd 100644
--- a/net/netfilter/nf_tables_api.c
+++ b/net/netfilter/nf_tables_api.c
@@ -712,7 +712,11 @@ static int nft_flush_table(struct nft_ctx *ctx)
 	int err;
 	struct nft_chain *chain, *nc;
 	struct nft_set *set, *ns;
+	int skipped_chains, flushed_chains;
 
+flush_chains:
+	skipped_chains = 0;
+	flushed_chains = 0;
 	list_for_each_entry_safe(chain, nc, &ctx->table->chains, list) {
 		ctx->chain = chain;
 
@@ -720,9 +724,22 @@ static int nft_flush_table(struct nft_ctx *ctx)
 		if (err < 0)
 			goto out;
 
+		if (chain->use > 0) {
+			skipped_chains++;
+			continue
+		}
+
 		err = nft_delchain(ctx);
 		if (err < 0)
 			goto out;
+
+		flushed_chains++;
+	}
+	if (skipped_chains > 0) {
+		if (flushed_chains > 0)
+			goto flush_chains
+		else
+			BUG_ON(flushed_chains == 0);
 	}
 
 	list_for_each_entry_safe(set, ns, &ctx->table->sets, list) {
-- 
2.1.4

^ permalink raw reply related

* Re: pull-request: wireless-drivers 2014-12-26
From: David Miller @ 2014-12-26 23:09 UTC (permalink / raw)
  To: kvalo; +Cc: linux-wireless, netdev, linux-kernel
In-Reply-To: <87egrm7gu1.fsf@kamboji.qca.qualcomm.com>

From: Kalle Valo <kvalo@codeaurora.org>
Date: Fri, 26 Dec 2014 14:09:42 +0200

> here's my first wireless-drivers pull request after John's "retirement".
> I'll start this with few fixes for 3.19, changelog below.
> 
> I used a signed tag to create this pull request, I hope that's ok.
> Please let me know if there are any problems.

That's fine, as long as you put a good summary list into the tag's
commit log message, I'm happy with it.

Pulled, thanks.

^ permalink raw reply

* Re: pull request: bluetooth 2014-12-26
From: David Miller @ 2014-12-26 23:24 UTC (permalink / raw)
  To: johan.hedberg-Re5JQEeQqe8AvxtiuMwx3w
  Cc: netdev-u79uwXL29TY76Z2rM5mHXA,
	linux-bluetooth-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <20141226181539.GA27027-ae+CCJ+dGXjCW7GOcxkI+ioyn5ZhHHrn@public.gmane.org>

From: Johan Hedberg <johan.hedberg-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Date: Fri, 26 Dec 2014 20:15:39 +0200

> Here's one more bluetooth pull request for 3.19. We've got two fixes:
> 
>  - Fix for accepting connections with old user space versions of BlueZ
>  - Fix for Bluetooth controllers that don't have a public address
> 
> Both of these are regressions that were introduced in 3.17, so the
> appropriate Cc: stable annotations are provided.
> 
> Please let me know if there are any issues pulling. Thanks.


Pulled, thanks Johan.

^ permalink raw reply

* Re: [linux-nics] [PATCHv4 net] i40e: Implement ndo_gso_check()
From: Jesse Gross @ 2014-12-26 23:58 UTC (permalink / raw)
  To: Jeff Kirsher
  Cc: Joe Stringer, netdev, linux.nics, Linux Kernel Mailing List,
	Tom Herbert
In-Reply-To: <1417806738.2404.42.camel@jtkirshe-mobl>

On Fri, Dec 5, 2014 at 2:12 PM, Jeff Kirsher
<jeffrey.t.kirsher@intel.com> wrote:
> On Fri, 2014-12-05 at 10:41 -0800, Joe Stringer wrote:
>> ndo_gso_check() was recently introduced to allow NICs to report the
>> offloading support that they have on a per-skb basis. Add an
>> implementation for this driver which checks for IPIP, GRE, UDP
>> tunnels.
>>
>> Signed-off-by: Joe Stringer <joestringer@nicira.com>
>> ---
>> v4: Simplify the check to just do tunnel header length.
>>     Fix #define style issue.
>> v3: Drop IPIP and GRE (no driver support even though hw supports it).
>>     Check for UDP outer protocol for UDP tunnels.
>> v2: Expand to include IP in IP and IPv4/IPv6 inside GRE/UDP tunnels.
>>     Add MAX_INNER_LENGTH (as 80).
>> ---
>>  drivers/net/ethernet/intel/i40e/i40e_main.c |   12 ++++++++++++
>>  1 file changed, 12 insertions(+)
>
> Thanks Joe, I will update the patch in my queue with your latest
> version.

Jeff, as a heads-up, this patch and the corresponding one for fm10k
will no longer apply now that the ndo has changed. This was changed by
5f35227e ("net: Generalize ndo_gso_check to ndo_features_check"). The
update needed is trivial and is just due to the change in the function
signature but I'm not sure where you are in the testing process with
this.

^ permalink raw reply

* [PATCH v2] nftables: nft_flush_table: handle chain dependencies
From: Asbjoern Sloth Toennesen @ 2014-12-27  0:39 UTC (permalink / raw)
  To: Pablo Neira Ayuso
  Cc: David S. Miller, netfilter-devel, netdev, linux-kernel, stable
In-Reply-To: <1419634318-18303-1-git-send-email-asbjorn@asbjorn.biz>

Update: I errously assumed that git add, while writing the commit
message, would be added to the commit.
Based on net-next f96fe225. Compiles and checkpatch clean.

Jumping between chains doesn't mix well with flush ruleset,
since nft_flush_table doesn't handle chains referencing chains.

This way it will take one to two loops, to settle.
Alternatively it can be solved by always having two loops,

[  353.373791] ------------[ cut here ]------------
[  353.373845] kernel BUG at net/netfilter/nf_tables_api.c:1159!
[  353.373896] invalid opcode: 0000 [#1] SMP
[  353.373942] Modules linked in: intel_powerclamp uas iwldvm iwlwifi
[  353.374017] CPU: 0 PID: 6445 Comm: 31c3.nft Not tainted 3.18.0 #98
[  353.374069] Hardware name: LENOVO 5129CTO/5129CTO, BIOS 6QET47WW
(1.17 ) 07/14/2010
[  353.374132] task: ffff880230976300 ti: ffff8800a8444000 task.ti:
ffff8800a8444000
[  353.374192] RIP: 0010:[<ffffffff8195fef8>]  [<ffffffff8195fef8>]
nf_tables_chain_destroy+0x58/0x60
[  353.374275] RSP: 0018:ffff8800a8447a90  EFLAGS: 00010202
[  353.374320] RAX: 0000000000000001 RBX: ffff880231d92c00 RCX:
00000001802a0027
[  353.374379] RDX: 00000001802a0028 RSI: ffffea0008c537c0 RDI:
ffff8802314df4e0
[  353.374437] RBP: ffff8800a8447ad8 R08: 00000000314df201 R09:
00000001802a0027
[  353.374494] R10: ffffffff81964a32 R11: ffff8802314df2a0 R12:
ffffffff820c50a8
[  353.374552] R13: ffffffff820c46c0 R14: ffff8800ad706700 R15:
ffff8802314dfcc0
[  353.374611] FS:  00007f96eacb6700(0000) GS:ffff88023bc00000(0000)
knlGS:0000000000000000
[  353.374676] CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
[  353.374723] CR2: 00007f96eacc7002 CR3: 00000000a8418000 CR4:
00000000000007f0
[  353.374781] Stack:
[  353.374800]  ffffffff81964c31 0000000000000000 ffffc90024fecb30
ffffc90024fecb3c
[  353.374872]  ffffc90024fecb7c ffff8800ad706700 0000000000000001
0000000000000000
[  353.374944]  ffff8800ad706300 ffff8800a8447b68 ffffffff81949118
0000000000000000
[  353.375018] Call Trace:
[  353.375046]  [<ffffffff81964c31>] ? nf_tables_commit+0x381/0x540
[  353.375101]  [<ffffffff81949118>] nfnetlink_rcv+0x3d8/0x4b0
[  353.375150]  [<ffffffff81943fc5>] netlink_unicast+0x105/0x1a0
[  353.375200]  [<ffffffff8194438e>] netlink_sendmsg+0x32e/0x790
[  353.375253]  [<ffffffff818f398e>] sock_sendmsg+0x8e/0xc0
[  353.375300]  [<ffffffff818f36b9>] ?
move_addr_to_kernel.part.20+0x19/0x70
[  353.375357]  [<ffffffff818f44f9>] ? move_addr_to_kernel+0x19/0x30
[  353.375410]  [<ffffffff819016d2>] ? verify_iovec+0x42/0xd0
[  353.375459]  [<ffffffff818f3e10>] ___sys_sendmsg+0x3f0/0x400
[  353.375510]  [<ffffffff810615fa>] ? native_sched_clock+0x2a/0x90
[  353.375563]  [<ffffffff81176697>] ? acct_account_cputime+0x17/0x20
[  353.375616]  [<ffffffff8110dc78>] ? account_user_time+0x88/0xa0
[  353.375667]  [<ffffffff818f4bbd>] __sys_sendmsg+0x3d/0x80
[  353.375719]  [<ffffffff81b184f4>] ?
int_check_syscall_exit_work+0x34/0x3d
[  353.375776]  [<ffffffff818f4c0d>] SyS_sendmsg+0xd/0x20
[  353.375823]  [<ffffffff81b1826d>] system_call_fastpath+0x16/0x1b
[  353.375872] Code: 8b 78 10 e8 cb cd 7e ff 48 8b 7b f8 e8 f2 98 86 ff
48 8d bb 78 ff ff ff e8 56 b8 89 ff 48 83 c4 08 5b 5d c3 0f 1f 80 00 00
00 00 <0f> 0b 66 0f 1f 44 00 00 55 48 89 e5 41 57 41 56 41 55 41 54 53
[  353.376307] RIP  [<ffffffff8195fef8>]
nf_tables_chain_destroy+0x58/0x60
[  353.376368]  RSP <ffff8800a8447a90>
[  353.388988] ---[ end trace e51c442af1fdea42 ]---

Cc: stable@vger.kernel.org
Signed-off-by: Asbjoern Sloth Toennesen <asbjorn@asbjorn.biz>
---
 net/netfilter/nf_tables_api.c | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/net/netfilter/nf_tables_api.c b/net/netfilter/nf_tables_api.c
index 129a8da..761519b 100644
--- a/net/netfilter/nf_tables_api.c
+++ b/net/netfilter/nf_tables_api.c
@@ -712,7 +712,11 @@ static int nft_flush_table(struct nft_ctx *ctx)
 	int err;
 	struct nft_chain *chain, *nc;
 	struct nft_set *set, *ns;
+	int skipped_chains, flushed_chains;
 
+flush_chains:
+	skipped_chains = 0;
+	flushed_chains = 0;
 	list_for_each_entry_safe(chain, nc, &ctx->table->chains, list) {
 		ctx->chain = chain;
 
@@ -720,9 +724,20 @@ static int nft_flush_table(struct nft_ctx *ctx)
 		if (err < 0)
 			goto out;
 
+		if (chain->use > 0) {
+			skipped_chains++;
+			continue;
+		}
+
 		err = nft_delchain(ctx);
 		if (err < 0)
 			goto out;
+
+		flushed_chains++;
+	}
+	if (skipped_chains > 0) {
+		BUG_ON(flushed_chains == 0);
+		goto flush_chains;
 	}
 
 	list_for_each_entry_safe(set, ns, &ctx->table->sets, list) {
-- 
2.1.4

^ 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