Netdev List
 help / color / mirror / Atom feed
* Re: [PATCH 3/3] netfilter: xt_CT: remove a compile warning
From: David Miller @ 2012-04-03 23:17 UTC (permalink / raw)
  To: pablo; +Cc: penguin-kernel, netdev
In-Reply-To: <20120403103903.GA20689@1984>

From: Pablo Neira Ayuso <pablo@netfilter.org>
Date: Tue, 3 Apr 2012 12:39:03 +0200

>>From e21e9622a46a60bd2b8dfb9791bb63dfdd4940d7 Mon Sep 17 00:00:00 2001
> From: Pablo Neira Ayuso <pablo@netfilter.org>
> Date: Tue, 3 Apr 2012 12:32:15 +0200
> Subject: [PATCH] netfilter: xt_CT: allocation has to be GFP_ATOMIC under rcu_read_lock section
> 
> Reported-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>

Applied.

^ permalink raw reply

* Re: [PATCH] r8169: enable napi on resume.
From: David Miller @ 2012-04-03 23:09 UTC (permalink / raw)
  To: romieu; +Cc: artem.savkov, nic_swsd, netdev
In-Reply-To: <20120403230317.GA6165@electric-eye.fr.zoreil.com>

From: Francois Romieu <romieu@fr.zoreil.com>
Date: Wed, 4 Apr 2012 01:03:17 +0200

> Artem Savkov <artem.savkov@gmail.com> :
>> NAPI is disabled during suspend and needs to be enabled on resume. Without
>> this the driver locks up during resume in rtl_reset_work() trying to disable
>> NAPI again.
>> 
>> Signed-off-by: Artem Savkov <artem.savkov@gmail.com>
> 
> :o(
> 
> It fixes runtime_{suspend / resume} as well.
> 
> Acked-by: Francois Romieu <romieu@fr.zoreil.com>

Applied and queued up for -stable, thanks.

^ permalink raw reply

* Re: [PATCH] r8169: enable napi on resume.
From: Francois Romieu @ 2012-04-03 23:03 UTC (permalink / raw)
  To: Artem Savkov; +Cc: nic_swsd, netdev
In-Reply-To: <1333484951-5432-1-git-send-email-artem.savkov@gmail.com>

Artem Savkov <artem.savkov@gmail.com> :
> NAPI is disabled during suspend and needs to be enabled on resume. Without
> this the driver locks up during resume in rtl_reset_work() trying to disable
> NAPI again.
> 
> Signed-off-by: Artem Savkov <artem.savkov@gmail.com>

:o(

It fixes runtime_{suspend / resume} as well.

Acked-by: Francois Romieu <romieu@fr.zoreil.com>

-- 
Ueimor

^ permalink raw reply

* Re: [PATCH net] bnx2x: correction to firmware interface
From: David Miller @ 2012-04-03 23:04 UTC (permalink / raw)
  To: yuvalmin; +Cc: netdev, dmitry, eilong, mchan, bprakash
In-Reply-To: <1333447631-18536-1-git-send-email-yuvalmin@broadcom.com>

From: "Yuval Mintz" <yuvalmin@broadcom.com>
Date: Tue, 3 Apr 2012 13:07:11 +0300

> Commit 621b4d6 updated the bnx2x driver to a new FW version, but lacked
> a commit to a header file with changes to the firmware's interface. 
> The missing interface change causes iscsi and fcoe to misbehave with the 
> updated firmware.
> 
> Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
> Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
> Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
> CC: Michael Chan <mchan@broadcom.com>
> CC: Bhanu Prakash Gollapudi <bprakash@broadcom.com>

Applied, how far back do -stable releases need this fix?

^ permalink raw reply

* Re: [PATCH 3.3.0 1/3] net:phy:bcm63xx: remove unnecessary code
From: David Miller @ 2012-04-03 23:02 UTC (permalink / raw)
  To: srinivas.kandagatla; +Cc: joe, netdev
In-Reply-To: <4F7AC7B5.3040301@st.com>

From: Srinivas KANDAGATLA <srinivas.kandagatla@st.com>
Date: Tue, 03 Apr 2012 10:49:41 +0100

> Yes, I have audited all the drivers. none of them return positive values.
> In general, I think phy_write should return either 0 or an error code
> and *NOT* positive values.
> Any mdio bus driver returning positive values for phy_writes will break
> the phylib too.

I've applied all three patches to net-next, thanks.

^ permalink raw reply

* Re: [PATCH] tilepro ethernet driver: fix a few minor issues
From: Joe Perches @ 2012-04-03 23:01 UTC (permalink / raw)
  To: David Miller; +Cc: sfr, cmetcalf, netdev, linux-kernel
In-Reply-To: <20120403.184004.2056266545823149252.davem@davemloft.net>

On Tue, 2012-04-03 at 18:40 -0400, David Miller wrote:
> From: Stephen Rothwell <sfr@canb.auug.org.au>
> Date: Wed, 4 Apr 2012 08:37:38 +1000
> > On Tue, 03 Apr 2012 18:23:35 -0400 (EDT) David Miller <davem@davemloft.net> wrote:
> >> Format the comment:
> >> 	/* Like
> >> 	 * this.
> >> 	 */
> >> not:
> >> 	/*
> >> 	 * Like
> >> 	 * this.
> >> 	 */
> > People may be confused because Documentation/CodingStyle says to use the
> > latter ...
> I refuse to be dragged into this conversation, I'm completely aware
> of the exact situation and I've stated my peace on this time and time
> again.

I think you'd have less overall upset in yourself and in
other people if you would do more than repeat yourself
on patch submissions via mailing lists.

To my knowledge when the comment block style was added to
CodingStyle in 2006, you didn't mention anything about it.

https://lkml.org/lkml/2006/12/7/41

and I don't see any other mentions from you.

When I suggested adding something specifically for net
and drivers/net, you were at least dispraising.

http://lists.openwall.net/netdev/2012/02/04/59

I think it'd be useful to have this preference you have
for block comment style written out somewhere other than
the email archives.

cheers, Joe

^ permalink raw reply

* Re: [PATCH] net: lpc_eth: no need to reserve 8 extra bytes in rx skb
From: David Miller @ 2012-04-03 22:58 UTC (permalink / raw)
  To: stigge; +Cc: eric.dumazet, netdev
In-Reply-To: <4F7B7F9B.3050503@antcom.de>

From: Roland Stigge <stigge@antcom.de>
Date: Wed, 04 Apr 2012 00:54:19 +0200

> Why add curly braces around a single statement?

Because that's how we roll for else statements homie, see CodingStyle

^ permalink raw reply

* Re: [PATCH] net: lpc_eth: no need to reserve 8 extra bytes in rx skb
From: Roland Stigge @ 2012-04-03 22:54 UTC (permalink / raw)
  To: Eric Dumazet; +Cc: netdev, David Miller
In-Reply-To: <1333490531.18626.336.camel@edumazet-glaptop>

Hi Eric,

On 04/04/12 00:02, Eric Dumazet wrote:
> Probably a leftover from ancient code...

...

> --- a/drivers/net/ethernet/nxp/lpc_eth.c
> +++ b/drivers/net/ethernet/nxp/lpc_eth.c
> @@ -990,10 +990,10 @@ static int __lpc_handle_recv(struct net_device *ndev, int budget)
>  			ndev->stats.rx_errors++;
>  		} else {
>  			/* Packet is good */
> -			skb = dev_alloc_skb(len + 8);
> -			if (!skb)
> +			skb = dev_alloc_skb(len);

I remember this issue from the discussion, a note from Ben Hutchings
actually, where there was a further "skb_reserve(skb, 8);" in the "else"
case below. Looks like I only removed the skb_reserve().

Can't find this review from you - I hope there are no other issues left?
(Was I on CC?)

> +			if (!skb) {
>  				ndev->stats.rx_dropped++;
> -			else {
> +			} else {

Why add curly braces around a single statement?

Thanks,

Roland

^ permalink raw reply

* Re: [PATCH net 2/2] net/bonding: correctly proxy slave neigh param setup ndo function
From: Jay Vosburgh @ 2012-04-03 22:53 UTC (permalink / raw)
  To: Or Gerlitz; +Cc: davem, roland, netdev, Shlomo Pongratz
In-Reply-To: <1333383430-17456-3-git-send-email-ogerlitz@mellanox.com>

Or Gerlitz <ogerlitz@mellanox.com> wrote:

>From: Shlomo Pongratz <shlomop@mellanox.com>
>
>The current implemenation was buggy for slaves who use ndo_neigh_setup,
>since the networking stack invokes the bonding device ndo entry (from
>neigh_params_alloc) before any devices are enslaved, and the bonding
>driver can't further delegate the call at that point in time. As a
>result when bonding IPoIB devices, the neigh_cleanup hasn't been called.
>
>Fix that by deferring the actual call into the slave ndo_neigh_setup
>from the time the bonding neigh_setup is called.
>
>Signed-off-by: Shlomo Pongratz <shlomop@mellanox.com>
>---
> drivers/net/bonding/bond_main.c |   51 ++++++++++++++++++++++++++++++++------
> 1 files changed, 43 insertions(+), 8 deletions(-)
>
>diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
>index b0a278d..2eed155 100644
>--- a/drivers/net/bonding/bond_main.c
>+++ b/drivers/net/bonding/bond_main.c
>@@ -3707,17 +3707,52 @@ static void bond_set_multicast_list(struct net_device *bond_dev)
> 	read_unlock(&bond->lock);
> }
>
>-static int bond_neigh_setup(struct net_device *dev, struct neigh_parms *parms)
>+static int bond_neigh_init(struct neighbour *n)
> {
>-	struct bonding *bond = netdev_priv(dev);
>+	struct bonding *bond = netdev_priv(n->dev);
> 	struct slave *slave = bond->first_slave;
>+	const struct net_device_ops *slave_ops;
>+	struct neigh_parms parms;
>+	int ret;
>+
>+	if (!slave)
>+		return 0;
>+
>+	slave_ops = slave->dev->netdev_ops;
>+
>+	if (!slave_ops->ndo_neigh_setup)
>+		return 0;
>+
>+	parms.neigh_setup = NULL;
>+	parms.neigh_cleanup = NULL;
>+	ret = slave_ops->ndo_neigh_setup(slave->dev, &parms);
>+	if (ret)
>+		return ret;
>+
>+	/*
>+	 * must bind here to the slave clenaup. Since when last slave is removed
>+	 * there will be no slave device to dereference in a bonding
>+	 * neigh_cleanup function that we have could add.
>+	 */
>+	n->parms->neigh_cleanup = parms.neigh_cleanup;

	I'd write this comment as:

	/* Assign slave's neigh_cleanup to neighbour in case cleanup is
	 * called after bond has been destroyed.  Assumes that all slaves
	 * utilize the same neigh_cleanup (true at this writing as only user
	 * is ipoib).
	 */

	I.e., this logic works only because there cannot currently be a
situation wherein two slaves have different neigh_cleanup functions
(including one slave with a neigh_cleanup, and another without).

>+	/* Does slave implement neigh_setup ? */
>+	if (!parms.neigh_setup)
>+		return 0;

	I don't think this comment is necessary.

	-J

>+
>+	return parms.neigh_setup(n);
>+}
>+
>+/*
>+ * The bonding ndo_neigh_setup is called at init time beofre any
>+ * slave exists. So we must declare proxy setup function which will
>+ * be used at run time to resolve the actual slave neigh param setup.
>+ */
>+static int bond_neigh_setup(struct net_device *dev,
>+			    struct neigh_parms *parms)
>+{
>+	parms->neigh_setup   = bond_neigh_init;
>
>-	if (slave) {
>-		const struct net_device_ops *slave_ops
>-			= slave->dev->netdev_ops;
>-		if (slave_ops->ndo_neigh_setup)
>-			return slave_ops->ndo_neigh_setup(slave->dev, parms);
>-	}
> 	return 0;
> }

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

^ permalink raw reply

* Re: [PATCH] m68k/atari: EtherNEC - rewrite to use mainstream ne.c, take two
From: David Miller @ 2012-04-03 22:52 UTC (permalink / raw)
  To: schmitzmic; +Cc: paul.gortmaker, geert, linux-m68k, netdev
In-Reply-To: <4F7816B0.3090802@gmail.com>

From: Michael Schmitz <schmitzmic@googlemail.com>
Date: Sun, 01 Apr 2012 20:49:52 +1200

> Hi Paul, Geert,
>> And on re-reading the comments in the other part of the patch, i.e.
>> "...emulates the card interrupt via a timer"  --perhaps the driver
>> should be just fixed to support generic netpoll, instead of adding
>> an arch specific thing that amounts to netpoll.  Then anyone can
>> attempt to limp along and use one of these ancient relics w/o IRQ.
>>   
> Here's take two of my patch to convert the m68k Atari ROM port
> Ethernet driver to use mainstream ne.c, with minimal changes to the
> core NE2000 code.

Please fix your email client, it corrupts your outgoing patches
by breaking up long lines with newlines amongst other things.

^ permalink raw reply

* Re: [PATCH] tcp: allow splice() to build full TSO packets
From: David Miller @ 2012-04-03 22:50 UTC (permalink / raw)
  To: eric.dumazet
  Cc: netdev, ncardwell, therbert, ycheng, hkchu, maze, maheshb,
	ilpo.jarvinen, nanditad
In-Reply-To: <20120403.173614.962252876842659412.davem@davemloft.net>

From: David Miller <davem@davemloft.net>
Date: Tue, 03 Apr 2012 17:36:14 -0400 (EDT)

> From: Eric Dumazet <eric.dumazet@gmail.com>
> Date: Tue, 03 Apr 2012 23:31:29 +0200
> 
>> The code in tcp_sendmsg() and do_tcp_sendpages() is similar (actually
>> probably copy/pasted) but the thing is tcp_sendmsg() is called once per
>> sendmsg() call (and the push logic is OK at the end of it), while a
>> single splice() system call can call do_tcp_sendpages() 16 times (or
>> even more if pipe buffer was extended by fcntl(F_SETPIPE_SZ))
> 
> Ok, so this means that in essence the tcp_mark_push should also only
> be done in the final sendpage call.
> 
> And since I'm wholly convinced that the URG stuff is a complete
> "don't care" for this path, I'm convinced your patch is the right
> thing to do.
> 
> Applied to 'net' and queued up for -stable, thanks Eric.

Eric, sorry to be a pain, but to clear my conscience can you tell me
if the sendfile() path do the right thing with your change too?

I'm concerned about returning back into userspace without at least
one tcp_push() at the end.

^ permalink raw reply

* Re: [PATCH 3.3.0] phy:icplus:fix Auto Power Saving in ip101a_config_init.
From: David Miller @ 2012-04-03 22:49 UTC (permalink / raw)
  To: srinivas.kandagatla; +Cc: netdev, peppe.cavallaro
In-Reply-To: <1333360929-31506-1-git-send-email-srinivas.kandagatla@st.com>

From: Srinivas KANDAGATLA <srinivas.kandagatla@st.com>
Date: Mon,  2 Apr 2012 11:02:09 +0100

> From: Srinivas Kandagatla <srinivas.kandagatla@st.com>
> 
> This patch fixes Auto Power Saving configuration in ip101a_config_init
> which was broken as there is no phy register write followed after
> setting IP101A_APS_ON flag.
> 
> This patch also fixes the return value of ip101a_config_init.
> 
> Without this patch ip101a_config_init returns 2 which is not an error
> accroding to IS_ERR and the mac driver will continue accessing 2 as
> valid pointer to phy_dev resulting in memory fault.
> 
> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@st.com>

Applied and queued up for -stable, thanks.

^ permalink raw reply

* Re: [net 0/3][pull request] Intel Wired LAN Driver Updates
From: David Miller @ 2012-04-03 22:48 UTC (permalink / raw)
  To: jeffrey.t.kirsher; +Cc: netdev, gospo, sassmann
In-Reply-To: <1333492139-32697-1-git-send-email-jeffrey.t.kirsher@intel.com>

From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Date: Tue,  3 Apr 2012 15:28:56 -0700

> This series of patches contains fixes for ixgbe and e1000e.
> 
> The following are changes since commit 01627d968c8b5e2810fe8c417b406b968297c236:
>   Merge branch 'drm-fixes-intel' of git://people.freedesktop.org/~airlied/linux
> and are available in the git repository at:
>   git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net master

Pulled, thanks Jeff.

^ permalink raw reply

* Re: [PATCH wireless-next] wireless: Remove unnecessary ; from while (0) macros
From: Larry Finger @ 2012-04-03 22:42 UTC (permalink / raw)
  To: Joe Perches
  Cc: John W. Linville, Christian Lamparter, Brett Rudley,
	Roland Vossen, Arend van Spriel, Franky (Zhenhui) Lin, Kan Yan,
	Bing Zhao, Chaoming Li, linux-wireless-u79uwXL29TY76Z2rM5mHXA,
	netdev-u79uwXL29TY76Z2rM5mHXA, LKML
In-Reply-To: <1333489609.2695.14.camel@joe2Laptop>

On 04/03/2012 04:46 PM, Joe Perches wrote:
> Semicolons are not necessary after macros that end in while (0).
> Remove them.
>
> Simplify the macros with tests of
> do { if (foo>size) memset1; else memset2;} while (0);
> to a single line memset(,,min_t(size_t, foo, size))
>
> Signed-off-by: Joe Perches<joe-6d6DIl74uiNBDgjK7y7TUQ@public.gmane.org>

ACKed-by: Larry Finger <Larry.Finger-tQ5ms3gMjBLk1uMJSBkQmQ@public.gmane.org> (rtlwifi part)

> ---
>   drivers/net/wireless/ath/carl9170/cmd.h       |    6 +++---
>   drivers/net/wireless/brcm80211/brcmsmac/d11.h |    2 +-
>   drivers/net/wireless/mwifiex/sdio.h           |    8 ++++----
>   drivers/net/wireless/rtlwifi/rtl8192ce/trx.h  |    7 +------
>   drivers/net/wireless/rtlwifi/rtl8192de/trx.h  |    8 ++------
>   drivers/net/wireless/rtlwifi/rtl8192se/def.h  |    7 +------
>   drivers/net/wireless/rtlwifi/rtl8192se/fw.h   |    6 +++---
>   7 files changed, 15 insertions(+), 29 deletions(-)
>
> diff --git a/drivers/net/wireless/ath/carl9170/cmd.h b/drivers/net/wireless/ath/carl9170/cmd.h
> index 885c427..65919c9 100644
> --- a/drivers/net/wireless/ath/carl9170/cmd.h
> +++ b/drivers/net/wireless/ath/carl9170/cmd.h
> @@ -114,7 +114,7 @@ __regwrite_out :							\
>
>   #define carl9170_regwrite_result()					\
>   	__err;								\
> -} while (0);
> +} while (0)
>
>
>   #define carl9170_async_regwrite_get_buf()				\
> @@ -126,7 +126,7 @@ do {									\
>   		__err = -ENOMEM;					\
>   		goto __async_regwrite_out;				\
>   	}								\
> -} while (0);
> +} while (0)
>
>   #define carl9170_async_regwrite_begin(carl)				\
>   do {									\
> @@ -169,6 +169,6 @@ __async_regwrite_out:							\
>
>   #define carl9170_async_regwrite_result()				\
>   	__err;								\
> -} while (0);
> +} while (0)
>
>   #endif /* __CMD_H */
> diff --git a/drivers/net/wireless/brcm80211/brcmsmac/d11.h b/drivers/net/wireless/brcm80211/brcmsmac/d11.h
> index 1948cb2..3f659e0 100644
> --- a/drivers/net/wireless/brcm80211/brcmsmac/d11.h
> +++ b/drivers/net/wireless/brcm80211/brcmsmac/d11.h
> @@ -733,7 +733,7 @@ struct cck_phy_hdr {
>   	do { \
>   		plcp[1] = len&  0xff; \
>   		plcp[2] = ((len>>  8)&  0xff); \
> -	} while (0);
> +	} while (0)
>
>   #define BRCMS_SET_MIMO_PLCP_AMPDU(plcp) (plcp[3] |= MIMO_PLCP_AMPDU)
>   #define BRCMS_CLR_MIMO_PLCP_AMPDU(plcp) (plcp[3]&= ~MIMO_PLCP_AMPDU)
> diff --git a/drivers/net/wireless/mwifiex/sdio.h b/drivers/net/wireless/mwifiex/sdio.h
> index a3fb322..0ead152 100644
> --- a/drivers/net/wireless/mwifiex/sdio.h
> +++ b/drivers/net/wireless/mwifiex/sdio.h
> @@ -193,7 +193,7 @@
>   		a->mpa_tx.ports |= (1<<(a->mpa_tx.pkt_cnt+1+(MAX_PORT -	\
>   						a->mp_end_port)));	\
>   	a->mpa_tx.pkt_cnt++;						\
> -} while (0);
> +} while (0)
>
>   /* SDIO Tx aggregation limit ? */
>   #define MP_TX_AGGR_PKT_LIMIT_REACHED(a)					\
> @@ -211,7 +211,7 @@
>   	a->mpa_tx.buf_len = 0;						\
>   	a->mpa_tx.ports = 0;						\
>   	a->mpa_tx.start_port = 0;					\
> -} while (0);
> +} while (0)
>
>   /* SDIO Rx aggregation limit ? */
>   #define MP_RX_AGGR_PKT_LIMIT_REACHED(a)					\
> @@ -242,7 +242,7 @@
>   	a->mpa_rx.skb_arr[a->mpa_rx.pkt_cnt] = skb;			\
>   	a->mpa_rx.len_arr[a->mpa_rx.pkt_cnt] = skb->len;		\
>   	a->mpa_rx.pkt_cnt++;						\
> -} while (0);
> +} while (0)
>
>   /* Reset SDIO Rx aggregation buffer parameters */
>   #define MP_RX_AGGR_BUF_RESET(a) do {					\
> @@ -250,7 +250,7 @@
>   	a->mpa_rx.buf_len = 0;						\
>   	a->mpa_rx.ports = 0;						\
>   	a->mpa_rx.start_port = 0;					\
> -} while (0);
> +} while (0)
>
>
>   /* data structure for SDIO MPA TX */
> diff --git a/drivers/net/wireless/rtlwifi/rtl8192ce/trx.h b/drivers/net/wireless/rtlwifi/rtl8192ce/trx.h
> index efb9ab2..c4adb97 100644
> --- a/drivers/net/wireless/rtlwifi/rtl8192ce/trx.h
> +++ b/drivers/net/wireless/rtlwifi/rtl8192ce/trx.h
> @@ -530,12 +530,7 @@
>   	SET_BITS_OFFSET_LE(__pdesc+28, 0, 32, __val)
>
>   #define CLEAR_PCI_TX_DESC_CONTENT(__pdesc, _size)	\
> -do {							\
> -	if (_size>  TX_DESC_NEXT_DESC_OFFSET)		\
> -		memset(__pdesc, 0, TX_DESC_NEXT_DESC_OFFSET);	\
> -	else						\
> -		memset(__pdesc, 0, _size);	\
> -} while (0);
> +	memset(__pdesc, 0, min_t(size_t, _size, TX_DESC_NEXT_DESC_OFFSET))
>
>   struct rx_fwinfo_92c {
>   	u8 gain_trsw[4];
> diff --git a/drivers/net/wireless/rtlwifi/rtl8192de/trx.h b/drivers/net/wireless/rtlwifi/rtl8192de/trx.h
> index 0dc736c..057a524 100644
> --- a/drivers/net/wireless/rtlwifi/rtl8192de/trx.h
> +++ b/drivers/net/wireless/rtlwifi/rtl8192de/trx.h
> @@ -530,12 +530,8 @@
>   	SET_BITS_OFFSET_LE(__pdesc+28, 0, 32, __val)
>
>   #define CLEAR_PCI_TX_DESC_CONTENT(__pdesc, _size)	\
> -do {							\
> -	if (_size>  TX_DESC_NEXT_DESC_OFFSET)		\
> -		memset((void *)__pdesc, 0, TX_DESC_NEXT_DESC_OFFSET);	\
> -	else						\
> -		memset((void *)__pdesc, 0, _size);	\
> -} while (0);
> +	memset((void *)__pdesc, 0,			\
> +	       min_t(size_t, _size, TX_DESC_NEXT_DESC_OFFSET))
>
>   /* For 92D early mode */
>   #define SET_EARLYMODE_PKTNUM(__paddr, __value)		\
> diff --git a/drivers/net/wireless/rtlwifi/rtl8192se/def.h b/drivers/net/wireless/rtlwifi/rtl8192se/def.h
> index d1b0a1e..20afec6 100644
> --- a/drivers/net/wireless/rtlwifi/rtl8192se/def.h
> +++ b/drivers/net/wireless/rtlwifi/rtl8192se/def.h
> @@ -252,12 +252,7 @@
>    * the desc is cleared. */
>   #define	TX_DESC_NEXT_DESC_OFFSET			36
>   #define CLEAR_PCI_TX_DESC_CONTENT(__pdesc, _size)		\
> -do {								\
> -	if (_size>  TX_DESC_NEXT_DESC_OFFSET)			\
> -		memset(__pdesc, 0, TX_DESC_NEXT_DESC_OFFSET);	\
> -	else							\
> -		memset(__pdesc, 0, _size);			\
> -} while (0);
> +	memset(__pdesc, 0, min_t(size_t, _size, TX_DESC_NEXT_DESC_OFFSET))
>
>   /* Rx Desc */
>   #define RX_STATUS_DESC_SIZE				24
> diff --git a/drivers/net/wireless/rtlwifi/rtl8192se/fw.h b/drivers/net/wireless/rtlwifi/rtl8192se/fw.h
> index b4afff6..d53f433 100644
> --- a/drivers/net/wireless/rtlwifi/rtl8192se/fw.h
> +++ b/drivers/net/wireless/rtlwifi/rtl8192se/fw.h
> @@ -345,7 +345,7 @@ enum fw_h2c_cmd {
>   	do {							\
>   		udelay(1000);					\
>   		rtlpriv->rtlhal.fwcmd_iomap&= (~_Bit);		\
> -	} while (0);
> +	} while (0)
>
>   #define FW_CMD_IO_UPDATE(rtlpriv, _val)				\
>   	rtlpriv->rtlhal.fwcmd_iomap = _val;
> @@ -354,13 +354,13 @@ enum fw_h2c_cmd {
>   	do {							\
>   		rtl_write_word(rtlpriv, LBUS_MON_ADDR, (u16)_val);	\
>   		FW_CMD_IO_UPDATE(rtlpriv, _val);		\
> -	} while (0);
> +	} while (0)
>
>   #define FW_CMD_PARA_SET(rtlpriv, _val)				\
>   	do {							\
>   		rtl_write_dword(rtlpriv, LBUS_ADDR_MASK, _val);	\
>   		rtlpriv->rtlhal.fwcmd_ioparam = _val;		\
> -	} while (0);
> +	} while (0)
>
>   #define FW_CMD_IO_QUERY(rtlpriv)				\
>   	(u16)(rtlpriv->rtlhal.fwcmd_iomap)
>
>
>

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

^ permalink raw reply

* Re: [REGRESSION][PATCH V4 1/3] bpf jit: Make the filter.c::__load_pointer helper non-static for the jits
From: Jan Seiffert @ 2012-04-03 22:41 UTC (permalink / raw)
  To: David Miller; +Cc: netdev, linux-kernel
In-Reply-To: <20120403.182822.530336438141782843.davem@davemloft.net>

David Miller schrieb:
> From: Jan Seiffert <kaffeemonster@googlemail.com>
> Date: Wed, 4 Apr 2012 00:26:25 +0200
> 
>> Is that the preferred comment style in net/ ? Coding style says
>> first line empty. Or just to match the rest of the file?
> 
> I'm not getting into this discussion right now, sorry.
> 

Oh, sorry, i guess you misunderstood me.
I didn't want to discuss anything, I'm fine either way,
i just wanted to know what's the rule, so i can take notes and
prevent the same error in the future.

Greetings
	Jan

^ permalink raw reply

* Re: [PATCH] tilepro ethernet driver: fix a few minor issues
From: David Miller @ 2012-04-03 22:40 UTC (permalink / raw)
  To: sfr; +Cc: cmetcalf, netdev, linux-kernel
In-Reply-To: <20120404083738.0b0f09ffc1f8c5a105c240eb@canb.auug.org.au>

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Wed, 4 Apr 2012 08:37:38 +1000

> Hi Dave,
> 
> On Tue, 03 Apr 2012 18:23:35 -0400 (EDT) David Miller <davem@davemloft.net> wrote:
>>
>> Format the comment:
>> 
>> 	/* Like
>> 	 * this.
>> 	 */
>> 
>> not:
>> 
>> 	/*
>> 	 * Like
>> 	 * this.
>> 	 */
> 
> People may be confused because Documentation/CodingStyle says to use the
> latter ...

I refuse to be dragged into this conversation, I'm completely aware
of the exact situation and I've stated my peace on this time and time
again.

^ permalink raw reply

* Re: [patch net-next 4/4] team: add loadbalance mode
From: David Miller @ 2012-04-03 22:38 UTC (permalink / raw)
  To: jpirko
  Cc: netdev, eric.dumazet, bhutchings, shemminger, raise.sail,
	nuno.martins, matt
In-Reply-To: <1333227682-10235-5-git-send-email-jpirko@redhat.com>

From: Jiri Pirko <jpirko@redhat.com>
Date: Sat, 31 Mar 2012 23:01:22 +0200

> This patch introduces new team mode. It's TX port is selected by
> user-set BPF hash function.
> 
> Signed-off-by: Jiri Pirko <jpirko@redhat.com>

Please resubmit this once you've fixed up patch #3.

^ permalink raw reply

* Re: [patch net-next 3/4] team: add binary option type
From: David Miller @ 2012-04-03 22:38 UTC (permalink / raw)
  To: jpirko
  Cc: netdev, eric.dumazet, bhutchings, shemminger, raise.sail,
	nuno.martins, matt
In-Reply-To: <1333227682-10235-4-git-send-email-jpirko@redhat.com>

From: Jiri Pirko <jpirko@redhat.com>
Date: Sat, 31 Mar 2012 23:01:21 +0200

> For transfering generic binary data (e.g. BPF code), introduce new
> binary option type.
> 
> Signed-off-by: Jiri Pirko <jpirko@redhat.com>

Several issues:

> +		struct team_option_binary tbinary;

You put this into a netlink attribute, it has a non-fixed
type size because it uses pointer.  A compat task will do
the wrong thing and you won't interpret it's attribute
correctly.

> +			NLA_PUT_U8(skb, TEAM_ATTR_OPTION_TYPE, NLA_BINARY);

net-next no longer has NLA_PUT*(), so you'll need to adjust
this as well.

^ permalink raw reply

* Re: [patch net-next 2/4] filter: add XOR operation
From: David Miller @ 2012-04-03 22:36 UTC (permalink / raw)
  To: jpirko
  Cc: netdev, eric.dumazet, bhutchings, shemminger, raise.sail,
	nuno.martins, matt
In-Reply-To: <1333227682-10235-3-git-send-email-jpirko@redhat.com>

From: Jiri Pirko <jpirko@redhat.com>
Date: Sat, 31 Mar 2012 23:01:20 +0200

> Add XOR instruction fo BPF machine. Needed for computing packet hashes.
> 
> Signed-off-by: Jiri Pirko <jpirko@redhat.com>

Looks good, applied.

^ permalink raw reply

* Re: [patch net-next 1/4] filter: Allow to create sk-unattached filters
From: David Miller @ 2012-04-03 22:36 UTC (permalink / raw)
  To: jpirko
  Cc: netdev, eric.dumazet, bhutchings, shemminger, raise.sail,
	nuno.martins, matt
In-Reply-To: <1333227682-10235-2-git-send-email-jpirko@redhat.com>

From: Jiri Pirko <jpirko@redhat.com>
Date: Sat, 31 Mar 2012 23:01:19 +0200

> Today, BPF filters are bind to sockets. Since BPF machine becomes handy
> for other purposes, this patch allows to create unattached filter.
> 
> Signed-off-by: Jiri Pirko <jpirko@redhat.com>

Applied.

^ permalink raw reply

* Re: [PATCH] tilepro ethernet driver: fix a few minor issues
From: Stephen Rothwell @ 2012-04-03 22:37 UTC (permalink / raw)
  To: David Miller; +Cc: cmetcalf, netdev, linux-kernel
In-Reply-To: <20120403.182335.782073108961783777.davem@davemloft.net>

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

Hi Dave,

On Tue, 03 Apr 2012 18:23:35 -0400 (EDT) David Miller <davem@davemloft.net> wrote:
>
> Format the comment:
> 
> 	/* Like
> 	 * this.
> 	 */
> 
> not:
> 
> 	/*
> 	 * Like
> 	 * this.
> 	 */

People may be confused because Documentation/CodingStyle says to use the
latter ...

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

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

^ permalink raw reply

* Re: [REGRESSION][PATCH V4 3/3] bpf jit: Let the powerpc jit handle negative offsets
From: David Miller @ 2012-04-03 22:35 UTC (permalink / raw)
  To: kaffeemonster; +Cc: netdev, linux-kernel, eric.dumazet
In-Reply-To: <4F7B7A59.2090904@googlemail.com>

From: Jan Seiffert <kaffeemonster@googlemail.com>
Date: Wed, 4 Apr 2012 00:31:53 +0200

> David Miller schrieb:
> [snip - my patch description]
>> 
>> I'm not applying this until a powerpc person tests it.
>> 
> 
> As Benjamin already said, Matt is having a look, so i expected nothing else.
> 
>> Also, we have an ARM JIT in the tree which probably needs to
>> be fixed similarly.
>> 
> 
> ???
> Oh, in which tree is it?
> I was working against net-next.

It's been in Linus's tree for several days now.

net-next is stale during the merge window and doesn't get updated
until the merge window closes.

^ permalink raw reply

* Re: [BUGFIX][PATCH 3/3] memcg/tcp: ignore tcp usage before accounting started
From: Glauber Costa @ 2012-04-03 22:31 UTC (permalink / raw)
  To: David Miller; +Cc: kamezawa.hiroyu, netdev, akpm
In-Reply-To: <20120401.234113.1505269982606203786.davem@davemloft.net>

On 04/02/2012 07:41 AM, David Miller wrote:
> From: Glauber Costa<glommer@parallels.com>
> Date: Thu, 29 Mar 2012 11:21:07 +0200
>
>> On 03/29/2012 09:10 AM, KAMEZAWA Hiroyuki wrote:
>>> tcp memcontrol starts accouting after res->limit is set. So, if a sockets
>>> starts before setting res->limit, there are already used resource.
>>> After setting res->limit, the resource (already used) will be uncharged and
>>> make res_counter below 0 because they are not charged. This causes warning.
>>>
>>> This patch fixes that by adding res_counter_uncharge_nowarn().
>>> (*) We cannot avoid this while we have 'account start' switch.
>>>
>>> Signed-off-by: KAMEZAWA Hiroyuki<kamezawa.hiroyu@jp.fujitsu.com>
>>
>> Fine by me.
>>
>> Acked-by: Glauber Costa<glommer@parallels.com>
>
> I'm not applying patches that simply ignore accounting counter
> underflows.
>
> You must either:
>
> 1) Integrate the socket's existing usage when the limit is set.
>
> 2) Avoid accounting completely for a socket that started before
>     the limit was set.
>
> No half-way solutions, please.  Otherwise it is impossible to design
> validations of the resource usage for a particular socket or group of
> sockets, because they can always be potentially "wrong" and over the
> limit.  That's a design for a buggy system.
>
>
Kame,

I agree with Dave FWIW.

We should be able to do this by dropping the reference count when the 
cgroup is finally destroyed, instead of from the remove callback. At 
that point, no more pending sockets should be attached to it.

Prior to increasing the static key, they are all assigned to the global 
cgroup, so we shouldn't care about them.

^ permalink raw reply

* Re: [REGRESSION][PATCH V4 3/3] bpf jit: Let the powerpc jit handle negative offsets
From: Jan Seiffert @ 2012-04-03 22:31 UTC (permalink / raw)
  To: David Miller; +Cc: netdev, linux-kernel, eric.dumazet
In-Reply-To: <20120403.180302.342779808900865443.davem@davemloft.net>

David Miller schrieb:
[snip - my patch description]
> 
> I'm not applying this until a powerpc person tests it.
> 

As Benjamin already said, Matt is having a look, so i expected nothing else.

> Also, we have an ARM JIT in the tree which probably needs to
> be fixed similarly.
> 

???
Oh, in which tree is it?
I was working against net-next.

Greetings
	Jan


-- 
˙qɐɥ ʇɟnɐʞǝƃ ʎɐqǝ ıǝq ɹnʇɐʇsɐʇ ǝuıǝ ɹıɯ ɥɔı sɐp lɐɯ ǝʇzʇǝl sɐp ʇsı sɐp 
'ʇɯɯɐpɹǝʌ

^ permalink raw reply

* [net 3/3] e1000e: Guarantee descriptor writeback flush success.
From: Jeff Kirsher @ 2012-04-03 22:28 UTC (permalink / raw)
  To: davem; +Cc: Matthew Vick, netdev, gospo, sassmann, Jeff Kirsher
In-Reply-To: <1333492139-32697-1-git-send-email-jeffrey.t.kirsher@intel.com>

From: Matthew Vick <matthew.vick@intel.com>

In rare circumstances, a descriptor writeback flush may not work if it
arrives on a specific clock cycle as a writeback request is going out.

Signed-off-by: Matthew Vick <matthew.vick@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
 drivers/net/ethernet/intel/e1000e/netdev.c |   17 +++++++++++++++++
 1 files changed, 17 insertions(+), 0 deletions(-)

diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c b/drivers/net/ethernet/intel/e1000e/netdev.c
index 6878601..19ab215 100644
--- a/drivers/net/ethernet/intel/e1000e/netdev.c
+++ b/drivers/net/ethernet/intel/e1000e/netdev.c
@@ -1059,6 +1059,13 @@ static void e1000_print_hw_hang(struct work_struct *work)
 		ew32(TIDV, adapter->tx_int_delay | E1000_TIDV_FPD);
 		/* execute the writes immediately */
 		e1e_flush();
+		/*
+		 * Due to rare timing issues, write to TIDV again to ensure
+		 * the write is successful
+		 */
+		ew32(TIDV, adapter->tx_int_delay | E1000_TIDV_FPD);
+		/* execute the writes immediately */
+		e1e_flush();
 		adapter->tx_hang_recheck = true;
 		return;
 	}
@@ -3616,6 +3623,16 @@ static void e1000e_flush_descriptors(struct e1000_adapter *adapter)
 
 	/* execute the writes immediately */
 	e1e_flush();
+
+	/*
+	 * due to rare timing issues, write to TIDV/RDTR again to ensure the
+	 * write is successful
+	 */
+	ew32(TIDV, adapter->tx_int_delay | E1000_TIDV_FPD);
+	ew32(RDTR, adapter->rx_int_delay | E1000_RDTR_FPD);
+
+	/* execute the writes immediately */
+	e1e_flush();
 }
 
 static void e1000e_update_stats(struct e1000_adapter *adapter);
-- 
1.7.7.6

^ 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