Netdev List
 help / color / mirror / Atom feed
* Re: [PATCH net-next RESEND 0/2] fix rculist sparse errors
From: David Miller @ 2014-12-10 18:49 UTC (permalink / raw)
  To: ying.xue
  Cc: paulmck, eric.dumazet, jon.maloy, erik.hugne, netdev, kbuild-all,
	linux-kernel
In-Reply-To: <1418201167-9591-1-git-send-email-ying.xue@windriver.com>

From: Ying Xue <ying.xue@windriver.com>
Date: Wed, 10 Dec 2014 16:46:05 +0800

> When hlist_for_each_entry_continue_rcu_bh() gets "next" pointer of
> hlist_node structure through rcu_dereference_bh(), sparse warning
> appears as the "next" pointer is not annotated as __rcu. So if
> the "next" pointer is accessed with hlist_next_rcu() macro, the
> __rcu annotation will be added to the pointer. As a consequence,
> sparse warning is eliminated too.
> 
> The similar errors also appear in hlist_for_each_entry_continue_rcu()
> and hlist_for_each_entry_from_rcu().
> 
> In this version, CC more people like Paul E. McKenney and lkml mail
> list.

The rculist.h changes should go via Paul's tree, not mine.

^ permalink raw reply

* Re: [bisected] xfrm: TCP connection initiating PMTU discovery stalls on v3.
From: Eric Dumazet @ 2014-12-10 19:10 UTC (permalink / raw)
  To: Wolfgang Walter
  Cc: Thomas Jarosch, netdev, Eric Dumazet, Herbert Xu,
	Steffen Klassert
In-Reply-To: <6700748.kZ07xrNvHX@h2o.as.studentenwerk.mhn.de>

On Wed, 2014-12-10 at 19:34 +0100, Wolfgang Walter wrote:

> So gso is on. When the hang happens sk_setup_caps is called from		
> inet_sk_rebuild_header(). Now the path
> 
> 		sk->sk_route_caps &= ~NETIF_F_GSO_MASK;
> 
> is taken as dst->header_len is now non zero.
> 
> This is the reason why later calls of sk_can_gso() return false.
> 
> I'll try to change the above patch to
> 
> @@ -1585,6 +1585,8 @@ void sk_setup_caps(struct sock *sk, struct dst_entry
> *dst) sk->sk_gso_max_size = dst->dev->gso_max_size;
>  			sk->sk_gso_max_segs = dst->dev->gso_max_segs;
>  		}
> 	}
> +   if (sk_can_gso(sk)) {
> +		sk->sk_gso_max_segs = 1;
>  	}
>  }
>  EXPORT_SYMBOL_GPL(sk_setup_caps);
> 
> so that the case that GSO is disabled because of dst->header_len != 0 sets 
> sk_gso_max_segs, too.

Sounds good, or maybe simply :

diff --git a/net/core/sock.c b/net/core/sock.c
index 9a56b2000c3f374fb95aedada3327447816a9512..edca31319dfee57cabe5b376505324bea07f767a 100644
--- a/net/core/sock.c
+++ b/net/core/sock.c
@@ -1577,6 +1577,7 @@ void sk_setup_caps(struct sock *sk, struct dst_entry *dst)
 	if (sk->sk_route_caps & NETIF_F_GSO)
 		sk->sk_route_caps |= NETIF_F_GSO_SOFTWARE;
 	sk->sk_route_caps &= ~sk->sk_route_nocaps;
+	sk->sk_gso_max_segs = 1;
 	if (sk_can_gso(sk)) {
 		if (dst->header_len) {
 			sk->sk_route_caps &= ~NETIF_F_GSO_MASK;

^ permalink raw reply related

* Re: Multicast packets being lost (3.10 stable)
From: Linus Lüssing @ 2014-12-10 19:16 UTC (permalink / raw)
  To: David Miller
  Cc: Stephen Hemminger, netdev, bridge, Greg Kroah-Hartman,
	openwrt-devel, David Miller
In-Reply-To: <20140910133341.GI7058@odroid>

Hi David,

did you have a chance to look into backporting these fixes for
stable yet? (if I read the docs correctly, I should query you for
suggestions for stable kernels, right?)

Also, an eighth patch I'd suggest for stable now:

8) bridge: fix netfilter/NF_BR_LOCAL_OUT for own, locally generated queries
   -> f0b4eeced (since 3.18)


If there's anything unclear, just let me know. Thanks :)!

Cheers, Linus


On Wed, Sep 10, 2014 at 03:33:41PM +0200, Linus Lüssing wrote:
> I just got a complaint about bridges, multicast and a
> 3.10 kernel again. Seems like nobody had any objections about
> queueing these two patches for stable ( 2)+3) )?
> 
> Also I'm still missing some more fixes in the stable branches.
> Especially 5), 6) and 7) are of high priority (next to 2) and 3) )
> in my opinion as otherwise IPv6 in general could be broken for people
> using 3.12 or 3.13 (as 3.12 contains a patch which activates
> multicast snooping for link-local addresses, too: 3c3769e63).
> 
> Here is a more ordered list of patches I'd suggest to be queued for
> stable:
> 
> 1) bridge: fix switched interval for MLD Query types
>    -> 32de868cb (present since 3.10)
> 2) bridge: disable snooping if there is no querier
>    -> b00589af3 (present since 3.11)
> 3) bridge: don't try to update timers in case of broken MLD queries
>    -> 248ba8ec0 (present since 3.11)
> 4) Revert "bridge: only expire the mdb entry when query is received"
>    -> 454594f3b (present since 3.12)
> 5) bridge: multicast: add sanity check for query source addresses
>    -> 6565b9eee (present since 3.14)
> 6) bridge: multicast: add sanity check for general query destination
>    -> 9ed973cc4 (present since 3.14)
> 7) bridge: multicast: enable snooping on general queries only
>    -> 20a599bec (present since 3.14)
> 
> Let me know what you'd think about that or if there's any trouble
> applying them to older kernels.
> 
> Cheers, Linus
> 
> 
> On Tue, Mar 25, 2014 at 02:06:07PM +0100, Linus Lüssing wrote:
> > That commit is supposed to be a fix and seems to be a easily
> > cherry-pickable on top of 3.10. So I think it's suitable for
> > stable
> > 
> > There are two follow-up commit for this particular patch that I'm aware
> > of: "bridge: separate querier and query timer into IGMP/IPv4
> > and MLD/IPv6 ones" (cc0fdd80). That's just an optimization
> > and can be ignored for stable.
> > 
> > The second one is "bridge: don't try to update timers in case of
> > broken MLD queries" (248ba8ec0). Which is a direct fix for
> > b00589af3 and should therefore go into stable, too, if b00589af3
> > goes into stable.
> > 
> > Cheers, Linus
> > 
> > 
> > On Mon, Mar 24, 2014 at 09:41:07AM -0700, Stephen Hemminger wrote:
> > > We are seeing multicast snooping related issues.
> > > Is there some reason this commit never went into stable (3.10)
> > > 
> > > commit b00589af3b04736376f24625ab0b394642e89e29
> > > Author: Linus Lüssing <linus.luessing@web.de>
> > > Date:   Thu Aug 1 01:06:20 2013 +0200
> > > 
> > >     bridge: disable snooping if there is no querier
> > >     
> > >     If there is no querier on a link then we won't get periodic reports and
> > >     therefore won't be able to learn about multicast listeners behind ports,
> > >     potentially leading to lost multicast packets, especially for multicast
> > >     listeners that joined before the creation of the bridge.
> > >     
> > >     These lost multicast packets can appear since c5c23260594
> > >     ("bridge: Add multicast_querier toggle and disable queries by default")
> > >     in particular.
> > >     
> > >     With this patch we are flooding multicast packets if our querier is
> > >     disabled and if we didn't detect any other querier.
> > >     
> > >     A grace period of the Maximum Response Delay of the querier is added to
> > >     give multicast responses enough time to arrive and to be learned from
> > >     before disabling the flooding behaviour again.
> > >     
> > >     Signed-off-by: Linus Lüssing <linus.luessing@web.de>
> > >     Signed-off-by: David S. Miller <davem@davemloft.net>

^ permalink raw reply

* Re: [PATCH net-next] net: Do not call ndo_dflt_fdb_dump if ndo_fdb_dump is defined.
From: Sergei Shtylyov @ 2014-12-10 19:28 UTC (permalink / raw)
  To: Hubert Sokolowski, netdev
In-Reply-To: <55af638eadcc08cbaa78f82ff6a43cb3.squirrel@poczta.wsisiz.edu.pl>

Hello.

On 12/10/2014 08:20 PM, Hubert Sokolowski wrote:

> This change restores the semantic that was present
> before 5e6d243587990a588143b9da3974833649595587

    Please also specify that commit's  summary line in parens.

> on how ndo_dflt_fdb_dump is called.
> This semantic is still used for add and del operations
> so let's keep it consistent.
> Driver can still call ndo_dflt_fdb_dump from inside
> its own fdb_dump routine when needed.

    You didn't sign off on the patch, so it can't be applied.

[...]

WBR, Sergei

^ permalink raw reply

* Re: [PATCH] irda: Convert function pointer arrays and uses to const
From: Rustad, Mark D @ 2014-12-10 19:32 UTC (permalink / raw)
  To: Joe Perches; +Cc: Samuel Ortiz, David S. Miller, netdev, LKML
In-Reply-To: <1418236138.18092.13.camel@perches.com>

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

On Dec 10, 2014, at 10:28 AM, Joe Perches <joe@perches.com> wrote:

> Making things const is a good thing.
> 
> (x86-64 defconfig with all irda)
> $ size net/irda/built-in.o*
>   text	   data	    bss	    dec	    hex	filename
> 109276	   1868	    244	 111388	  1b31c	net/irda/built-in.o.new
> 108828	   2316	    244	 111388	  1b31c	net/irda/built-in.o.old
> 
> Signed-off-by: Joe Perches <joe@perches.com>
> ---
> include/net/irda/parameters.h  | 6 +++---
> net/irda/ircomm/ircomm_param.c | 8 ++++----
> net/irda/irttp.c               | 6 ++++--
> net/irda/parameters.c          | 8 ++++----
> net/irda/qos.c                 | 6 +++---
> 5 files changed, 18 insertions(+), 16 deletions(-)
> 
> diff --git a/include/net/irda/parameters.h b/include/net/irda/parameters.h
> index 42713c9..2d9cd00 100644
> --- a/include/net/irda/parameters.h
> +++ b/include/net/irda/parameters.h
> @@ -71,17 +71,17 @@ typedef int (*PV_HANDLER)(void *self, __u8 *buf, int len, __u8 pi,
> 			  PV_TYPE type, PI_HANDLER func);
> 
> typedef struct {
> -	PI_HANDLER func;  /* Handler for this parameter identifier */
> +	const PI_HANDLER func;  /* Handler for this parameter identifier */
> 	PV_TYPE    type;  /* Data type for this parameter */
> } pi_minor_info_t;
> 
> typedef struct {
> -	pi_minor_info_t *pi_minor_call_table;
> +	const pi_minor_info_t *pi_minor_call_table;

Might you want to go a little further and make it:
	const pi_minor_into_t * const pi_minor_call_table;
so that the pointer itself is also constant? That could apply to some others below as well.

> 	int len;
> } pi_major_info_t;
> 
> typedef struct {
> -	pi_major_info_t *tables;
> +	const pi_major_info_t *tables;
> 	int              len;
> 	__u8             pi_mask;
> 	int              pi_major_offset;
> diff --git a/net/irda/ircomm/ircomm_param.c b/net/irda/ircomm/ircomm_param.c
> index 27be782..3c4caa6 100644
> --- a/net/irda/ircomm/ircomm_param.c
> +++ b/net/irda/ircomm/ircomm_param.c
> @@ -61,12 +61,12 @@ static int ircomm_param_dte(void *instance, irda_param_t *param, int get);
> static int ircomm_param_dce(void *instance, irda_param_t *param, int get);
> static int ircomm_param_poll(void *instance, irda_param_t *param, int get);
> 
> -static pi_minor_info_t pi_minor_call_table_common[] = {
> +static const pi_minor_info_t pi_minor_call_table_common[] = {
> 	{ ircomm_param_service_type, PV_INT_8_BITS },
> 	{ ircomm_param_port_type,    PV_INT_8_BITS },
> 	{ ircomm_param_port_name,    PV_STRING }
> };
> -static pi_minor_info_t pi_minor_call_table_non_raw[] = {
> +static const pi_minor_info_t pi_minor_call_table_non_raw[] = {
> 	{ ircomm_param_data_rate,    PV_INT_32_BITS | PV_BIG_ENDIAN },
> 	{ ircomm_param_data_format,  PV_INT_8_BITS },
> 	{ ircomm_param_flow_control, PV_INT_8_BITS },
> @@ -74,13 +74,13 @@ static pi_minor_info_t pi_minor_call_table_non_raw[] = {
> 	{ ircomm_param_enq_ack,      PV_INT_16_BITS },
> 	{ ircomm_param_line_status,  PV_INT_8_BITS }
> };
> -static pi_minor_info_t pi_minor_call_table_9_wire[] = {
> +static const pi_minor_info_t pi_minor_call_table_9_wire[] = {
> 	{ ircomm_param_dte,          PV_INT_8_BITS },
> 	{ ircomm_param_dce,          PV_INT_8_BITS },
> 	{ ircomm_param_poll,         PV_NO_VALUE },
> };
> 
> -static pi_major_info_t pi_major_call_table[] = {
> +static const pi_major_info_t pi_major_call_table[] = {
> 	{ pi_minor_call_table_common,  3 },
> 	{ pi_minor_call_table_non_raw, 6 },
> 	{ pi_minor_call_table_9_wire,  3 }
> diff --git a/net/irda/irttp.c b/net/irda/irttp.c
> index 3ef0b08..b6ab41d 100644
> --- a/net/irda/irttp.c
> +++ b/net/irda/irttp.c
> @@ -71,11 +71,13 @@ static void irttp_status_indication(void *instance,
> 				    LINK_STATUS link, LOCK_STATUS lock);
> 
> /* Information for parsing parameters in IrTTP */
> -static pi_minor_info_t pi_minor_call_table[] = {
> +static const pi_minor_info_t pi_minor_call_table[] = {
> 	{ NULL, 0 },                                             /* 0x00 */
> 	{ irttp_param_max_sdu_size, PV_INTEGER | PV_BIG_ENDIAN } /* 0x01 */
> };
> -static pi_major_info_t pi_major_call_table[] = { { pi_minor_call_table, 2 } };
> +static const pi_major_info_t pi_major_call_table[] = {
> +	{ pi_minor_call_table, 2 }
> +};
> static pi_param_info_t param_info = { pi_major_call_table, 1, 0x0f, 4 };
> 
> /************************ GLOBAL PROCEDURES ************************/
> diff --git a/net/irda/parameters.c b/net/irda/parameters.c
> index 006786b..16ce32f 100644
> --- a/net/irda/parameters.c
> +++ b/net/irda/parameters.c
> @@ -52,7 +52,7 @@ static int irda_insert_no_value(void *self, __u8 *buf, int len, __u8 pi,
> static int irda_param_unpack(__u8 *buf, char *fmt, ...);
> 
> /* Parameter value call table. Must match PV_TYPE */
> -static PV_HANDLER pv_extract_table[] = {
> +static const PV_HANDLER pv_extract_table[] = {
> 	irda_extract_integer, /* Handler for any length integers */
> 	irda_extract_integer, /* Handler for 8  bits integers */
> 	irda_extract_integer, /* Handler for 16 bits integers */
> @@ -62,7 +62,7 @@ static PV_HANDLER pv_extract_table[] = {
> 	irda_extract_no_value /* Handler for no value parameters */
> };
> 
> -static PV_HANDLER pv_insert_table[] = {
> +static const PV_HANDLER pv_insert_table[] = {
> 	irda_insert_integer, /* Handler for any length integers */
> 	irda_insert_integer, /* Handler for 8  bits integers */
> 	irda_insert_integer, /* Handler for 16 bits integers */
> @@ -449,7 +449,7 @@ static int irda_param_unpack(__u8 *buf, char *fmt, ...)
> int irda_param_insert(void *self, __u8 pi, __u8 *buf, int len,
> 		      pi_param_info_t *info)
> {
> -	pi_minor_info_t *pi_minor_info;
> +	const pi_minor_info_t *pi_minor_info;
> 	__u8 pi_minor;
> 	__u8 pi_major;
> 	int type;
> @@ -504,7 +504,7 @@ EXPORT_SYMBOL(irda_param_insert);
> static int irda_param_extract(void *self, __u8 *buf, int len,
> 			      pi_param_info_t *info)
> {
> -	pi_minor_info_t *pi_minor_info;
> +	const pi_minor_info_t *pi_minor_info;
> 	__u8 pi_minor;
> 	__u8 pi_major;
> 	int type;
> diff --git a/net/irda/qos.c b/net/irda/qos.c
> index 5ed6c9a..25ba850 100644
> --- a/net/irda/qos.c
> +++ b/net/irda/qos.c
> @@ -122,7 +122,7 @@ static __u32 max_line_capacities[10][4] = {
> 	{ 800000, 400000, 160000, 80000 }, /* 16000000 bps */
> };
> 
> -static pi_minor_info_t pi_minor_call_table_type_0[] = {
> +static const pi_minor_info_t pi_minor_call_table_type_0[] = {
> 	{ NULL, 0 },
> /* 01 */{ irlap_param_baud_rate,       PV_INTEGER | PV_LITTLE_ENDIAN },
> 	{ NULL, 0 },
> @@ -134,7 +134,7 @@ static pi_minor_info_t pi_minor_call_table_type_0[] = {
> /* 08 */{ irlap_param_link_disconnect, PV_INT_8_BITS }
> };
> 
> -static pi_minor_info_t pi_minor_call_table_type_1[] = {
> +static const pi_minor_info_t pi_minor_call_table_type_1[] = {
> 	{ NULL, 0 },
> 	{ NULL, 0 },
> /* 82 */{ irlap_param_max_turn_time,   PV_INT_8_BITS },
> @@ -144,7 +144,7 @@ static pi_minor_info_t pi_minor_call_table_type_1[] = {
> /* 86 */{ irlap_param_min_turn_time,   PV_INT_8_BITS },
> };
> 
> -static pi_major_info_t pi_major_call_table[] = {
> +static const pi_major_info_t pi_major_call_table[] = {
> 	{ pi_minor_call_table_type_0, 9 },
> 	{ pi_minor_call_table_type_1, 7 },
> };
> 
> 
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

-- 
Mark Rustad, Networking Division, Intel Corporation


[-- Attachment #2: Message signed with OpenPGP using GPGMail --]
[-- Type: application/pgp-signature, Size: 841 bytes --]

^ permalink raw reply

* [PATCH net-next RESEND] net: Do not call ndo_dflt_fdb_dump if ndo_fdb_dump is defined.
From: Hubert Sokolowski @ 2014-12-10 19:37 UTC (permalink / raw)
  To: netdev

This change restores the semantic that was present
before 5e6d243587990a588143b9da3974833649595587
"bridge: netlink dump interface at par with brctl"
on how ndo_dflt_fdb_dump is called.
This semantic is still used for add and del operations
so let's keep it consistent.
Driver can still call ndo_dflt_fdb_dump from inside
its own fdb_dump routine when needed.

Signed-off-by: Hubert Sokolowski <h.sokolowski@wit.edu.pl>
---
 net/core/rtnetlink.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c
index eaa057f..a9e5c37 100644
--- a/net/core/rtnetlink.c
+++ b/net/core/rtnetlink.c
@@ -2692,10 +2692,11 @@ static int rtnl_fdb_dump(struct sk_buff *skb, struct netlink_callback *cb)
 							 idx);
 		}

-		idx = ndo_dflt_fdb_dump(skb, cb, dev, NULL, idx);
 		if (dev->netdev_ops->ndo_fdb_dump)
 			idx = dev->netdev_ops->ndo_fdb_dump(skb, cb, bdev, dev,
 							    idx);
+		else
+			idx = ndo_dflt_fdb_dump(skb, cb, dev, NULL, idx);

 		cops = NULL;
 	}
-- 
1.9.3

^ permalink raw reply related

* Re: [PATCH] irda: Convert function pointer arrays and uses to const
From: Joe Perches @ 2014-12-10 19:38 UTC (permalink / raw)
  To: Rustad, Mark D; +Cc: Samuel Ortiz, David S. Miller, netdev, LKML
In-Reply-To: <3333024A-D21C-41E2-80ED-7590CE6E9BD1@intel.com>

On Wed, 2014-12-10 at 19:32 +0000, Rustad, Mark D wrote:
> On Dec 10, 2014, at 10:28 AM, Joe Perches <joe@perches.com> wrote:
[]
> > diff --git a/include/net/irda/parameters.h b/include/net/irda/parameters.h
[]
> > typedef struct {
> > -	pi_minor_info_t *pi_minor_call_table;
> > +	const pi_minor_info_t *pi_minor_call_table;
> 
> Might you want to go a little further and make it:
> 	const pi_minor_into_t * const pi_minor_call_table;
> so that the pointer itself is also constant? That could apply to some others below as well.
> 
> > 	int len;
> > } pi_major_info_t;

I don't think that's necessary as all the pi_major_info_t uses
become const and this is a typedef, but if you want to, go ahead.

^ permalink raw reply

* Re: [PATCH net v6 7/7] libcxgbi: free skb after debug prints
From: Sergei Shtylyov @ 2014-12-10 19:38 UTC (permalink / raw)
  To: Karen Xie, linux-scsi, netdev
  Cc: hariprasad, anish, hch, James.Bottomley, michaelc, davem
In-Reply-To: <201412101625.sBAGPSXC011110@localhost6.localdomain6>

Hello.

On 12/10/2014 07:25 PM, Karen Xie wrote:

> [PATCH net v6 7/7] libcxgbi: free skb after debug prints

    Please, do not duplicate the subject in the changelog -- DaveM would have 
to edit it out by hand.

> From: Karen Xie <kxie@chelsio.com>

> The debug print was accessing the skb after it was freed.

> Signed-off-by: Karen Xie <kxie@chelsio.com>

WBR, Sergei

^ permalink raw reply

* Re: [PATCH v2] net: introduce helper macro for_each_cmsghdr
From: David Miller @ 2014-12-10 19:44 UTC (permalink / raw)
  To: guz.fnst; +Cc: netdev, linux-kernel, joe
In-Reply-To: <20141210.134804.1383875260695429574.davem@davemloft.net>

From: David Miller <davem@davemloft.net>
Date: Wed, 10 Dec 2014 13:48:04 -0500 (EST)

> From: Gu Zheng <guz.fnst@cn.fujitsu.com>
> Date: Wed, 10 Dec 2014 13:36:25 +0800
> 
>> Introduce helper macro for_each_cmsghdr as a wrapper of the enumerating
>> cmsghdr from msghdr, just cleanup. 
>> 
>> Signed-off-by: Gu Zheng <guz.fnst@cn.fujitsu.com>
> 
> Applied, thanks.

This breaks the build, I'm reverting.

You cannot use your new macros in
Documentation/networking/timestamping/txtimestamp.c, that is a
userland program and the header you are adding your helper to is not
available to userspace.

This also means you didn't sufficiently test the build of your
changes.

Documentation/networking/timestamping/timestamping.c: In function ‘printpacket’:
Documentation/networking/timestamping/timestamping.c:172:2: warning: implicit declaration of function ‘for_each_cmsghdr’ [-Wimplicit-function-declaration]
Documentation/networking/timestamping/timestamping.c:172:30: error: expected ‘;’ before ‘{’ token
Documentation/networking/timestamping/timestamping.c:161:18: warning: unused variable ‘ts’ [-Wunused-variable]
Documentation/networking/timestamping/timestamping.c:160:17: warning: unused variable ‘tv’ [-Wunused-variable]
make[3]: *** [Documentation/networking/timestamping/timestamping] Error 1
make[3]: *** Waiting for unfinished jobs....
Documentation/networking/timestamping/txtimestamp.c: In function ‘__recv_errmsg_cmsg’:
Documentation/networking/timestamping/txtimestamp.c:187:2: warning: implicit declaration of function ‘for_each_cmsghdr’ [-Wimplicit-function-declaration]
Documentation/networking/timestamping/txtimestamp.c:187:19: error: ‘cmsg’ undeclared (first use in this function)
Documentation/networking/timestamping/txtimestamp.c:187:19: note: each undeclared identifier is reported only once for each function it appears in
Documentation/networking/timestamping/txtimestamp.c:187:30: error: expected ‘;’ before ‘{’ token
Documentation/networking/timestamping/txtimestamp.c:185:18: warning: unused variable ‘cm’ [-Wunused-variable]
Documentation/networking/timestamping/txtimestamp.c:184:27: warning: unused variable ‘tss’ [-Wunused-variable]
Documentation/networking/timestamping/txtimestamp.c:183:28: warning: unused variable ‘serr’ [-Wunused-variable]
Documentation/networking/timestamping/txtimestamp.c: At top level:
Documentation/networking/timestamping/txtimestamp.c:123:13: warning: ‘print_timestamp’ defined but not used [-Wunused-function]
Documentation/networking/timestamping/txtimestamp.c:159:13: warning: ‘print_pktinfo’ defined but not used [-Wunused-function]


^ permalink raw reply

* Re: [PATCH net-next] tipc: fix broadcast wakeup contention after congestion
From: David Miller @ 2014-12-10 19:46 UTC (permalink / raw)
  To: richard.alpe; +Cc: netdev, tipc-discussion, erik.hugne
In-Reply-To: <1418201214-30767-1-git-send-email-richard.alpe@ericsson.com>

From: <richard.alpe@ericsson.com>
Date: Wed, 10 Dec 2014 09:46:54 +0100

> From: Richard Alpe <richard.alpe@ericsson.com>
> 
> commit 908344cdda80 ("tipc: fix bug in multicast congestion handling")
> introduced a race in the broadcast link wakeup functionality.
> 
> This patch eliminates this broadcast link wakeup race caused by
> operation on the wakeup list without proper locking. If this race
> hit and corrupted the list all subsequent wakeup messages would be
> lost, resulting in a considerable memory leak.
> 
> Signed-off-by: Richard Alpe <richard.alpe@ericsson.com>
> Signed-off-by: Erik Hugne <erik.hugne@ericsson.com>

Applied, thank you.

^ permalink raw reply

* Re: [PATCH] net: openvswitch: Support masked set actions.
From: David Miller @ 2014-12-10 19:48 UTC (permalink / raw)
  To: jrajahalme; +Cc: netdev, dev
In-Reply-To: <1418170225-9328-1-git-send-email-jrajahalme@nicira.com>

From: Jarno Rajahalme <jrajahalme@nicira.com>
Date: Tue,  9 Dec 2014 16:10:25 -0800

> OVS userspace already probes the openvswitch kernel module for
> OVS_ACTION_ATTR_SET_MASKED support.  This patch adds the kernel module
> implementation of masked set actions.
> 
> The existing set action sets many fields at once.  When only a subset
> of the IP header fields, for example, should be modified, all the IP
> fields need to be exact matched so that the other field values can be
> copied to the set action.  A masked set action allows modification of
> an arbitrary subset of the supported header bits without requiring the
> rest to be matched.
> 
> Masked set action is now supported for all writeable key types, except
> for the tunnel key.  The set tunnel action is an exception as any
> input tunnel info is cleared before action processing starts, so there
> is no tunnel info to mask.
> 
> The kernel module converts all (non-tunnel) set actions to masked set
> actions.  This makes action processing more uniform, and results in
> less branching and duplicating the action processing code.  When
> returning actions to userspace, the fully masked set actions are
> converted back to normal set actions.  We use a kernel internal action
> code to be able to tell the userspace provided and converted masked
> set actions apart.
> 
> Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com>

How does this work, should I be waiting for a signoff or ACK from
Pravin before applying this directly to my tree?

^ permalink raw reply

* Re: linux-next: manual merge of the net-next tree with the net tree
From: David Miller @ 2014-12-10 19:49 UTC (permalink / raw)
  To: sfr; +Cc: netdev, Thomas.Lendacky, linux-next, linux-kernel
In-Reply-To: <20141210122036.133457c9@canb.auug.org.au>

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Wed, 10 Dec 2014 12:20:36 +1100

> Today's linux-next merge of the net-next tree got a conflict in
> drivers/net/ethernet/amd/xgbe/xgbe-desc.c between commit 03ccc4c0a9da
> ("amd-xgbe: Do not clear interrupt indicator") from the net tree and
> commit c9f140ebb008 ("amd-xgbe: Separate Tx/Rx ring data fields into
> new structs") from the net-next tree.
> 
> I fixed it up (see below) and can carry the fix as necessary (no action
> is required).

As you have seen there are a lot of merge hassles to sort out between
the 'net' and 'net-next' tree right now, probably I just added a few
more :-)

I'll try to do the merge by the end of today so that these headaches
go away for you.

Thanks.

^ permalink raw reply

* Re: [PATCH net-next] bridge: Add ability to always enable TSO/UFO
From: David Miller @ 2014-12-10 19:50 UTC (permalink / raw)
  To: makita.toshiaki; +Cc: netdev, bridge
In-Reply-To: <1418179394-4470-2-git-send-email-makita.toshiaki@lab.ntt.co.jp>

From: Toshiaki Makita <makita.toshiaki@lab.ntt.co.jp>
Date: Wed, 10 Dec 2014 11:43:14 +0900

> -	features &= ~NETIF_F_ONE_FOR_ALL;
> +	features &= ~NETIF_F_ONE_FOR_ALL | NETIF_F_GSO_SOFTWARE;

I don't think this is the expression you intend to use.

I think you meant:

	features &= ~(NETIF_F_ONE_FOR_ALL | NETIF_F_GSO_SOFTWARE);

Or:

	features = ~NETIF_F_ONE_FOR_ALL;
	features |= NETIF_F_GSO_SOFTWARE;

^ permalink raw reply

* Re: [RFC PATCH 0/3] Faster than SLAB caching of SKBs with qmempool (backed by alf_queue)
From: Christoph Lameter @ 2014-12-10 19:51 UTC (permalink / raw)
  To: Jesper Dangaard Brouer
  Cc: netdev, linux-kernel, linux-mm, linux-api, Eric Dumazet,
	David S. Miller, Hannes Frederic Sowa, Alexander Duyck,
	Alexei Starovoitov, Paul E. McKenney, Mathieu Desnoyers,
	Steven Rostedt
In-Reply-To: <20141210141332.31779.56391.stgit@dragon>

On Wed, 10 Dec 2014, Jesper Dangaard Brouer wrote:

> One of the building blocks for achieving this speedup is a cmpxchg
> based Lock-Free queue that supports bulking, named alf_queue for
> Array-based Lock-Free queue.  By bulking elements (pointers) from the
> queue, the cost of the cmpxchg (approx 8 ns) is amortized over several
> elements.

This is a bit of an issue since the design of the SLUB allocator is such
that you should pick up an object, apply some processing and then take the
next one. The fetching of an object warms up the first cacheline and this
is tied into the way free objects are linked in SLUB.

So a bulk fetch from SLUB will not that effective and cause the touching
of many cachelines if we are dealing with just a few objects. If we are
looking at whole slab pages with all objects then SLUB can be effective
since we do not have to build up the linked pointer structure in each
page. SLAB has a different architecture there and a bulk fetch there is
possible without touching objects even for small sets since the freelist
management is separate from the objects.

If you do this bulking then you will later access cache cold objects?
Doesnt that negate the benefit that you gain? Or are these objects written
to by hardware and therefore by necessity cache cold?

We could provide a faster bulk alloc/free function.

	int kmem_cache_alloc_array(struct kmem_cache *s, gfp_t flags,
		size_t objects, void **array)

and this could be optimized by each slab allocator to provide fast
population of objects in that array. We then assume that the number of
objects is in the hundreds or so right?

The corresponding free function

	void kmem_cache_free_array(struct kmem_cache *s,
		size_t objects, void **array)


I think the queue management of the array can be improved by using a
similar technique as used the SLUB allocator using the cmpxchg_local.
cmpxchg_local is much faster than a full cmpxchg and we are operating on
per cpu structures anyways. So the overhead could still be reduced.


--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply

* Re: [PATCH net] be2net: Export tunnel offloads only when a VxLAN tunnel is created
From: David Miller @ 2014-12-10 19:53 UTC (permalink / raw)
  To: sathya.perla; +Cc: netdev
In-Reply-To: <1418205364-28979-1-git-send-email-sathya.perla@emulex.com>

From: Sathya Perla <sathya.perla@emulex.com>
Date: Wed, 10 Dec 2014 04:56:04 -0500

> +	netdev->hw_enc_features |= (NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM |
> +	    NETIF_F_TSO | NETIF_F_TSO6 | NETIF_F_GSO_UDP_TUNNEL);

Please indent this properly:

	netdev->hw_enc_features |= (NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM |
				    NETIF_F_TSO | NETIF_F_TSO6 | NETIF_F_GSO_UDP_TUNNEL);

^ permalink raw reply

* Re: [PATCH net-next 1/3] net: fec: reset fep link status in suspend function
From: David Miller @ 2014-12-10 19:54 UTC (permalink / raw)
  To: b38611; +Cc: netdev, bhutchings, stephen
In-Reply-To: <1418205289-7730-2-git-send-email-b38611@freescale.com>

From: Fugang Duan <b38611@freescale.com>
Date: Wed, 10 Dec 2014 17:54:47 +0800

> +	/*
> +	 * SOC supply clock to phy, when clock is disabled, phy link down
> +	 * SOC control phy regulator, when regulator is disabled, phy link down
> +	 */

Comments in the networking should be of the form:

	/* Like
	 * this.
	 */

Not:

	/*
	 * Like
	 * this.
	 */

^ permalink raw reply

* Re: [PATCH] net: openvswitch: Support masked set actions.
From: Jarno Rajahalme @ 2014-12-10 20:03 UTC (permalink / raw)
  To: David Miller; +Cc: netdev, dev
In-Reply-To: <20141210.144853.2074647545313560689.davem@davemloft.net>


On Dec 10, 2014, at 11:48 AM, David Miller <davem@davemloft.net> wrote:

> From: Jarno Rajahalme <jrajahalme@nicira.com>
> Date: Tue,  9 Dec 2014 16:10:25 -0800
> 
>> OVS userspace already probes the openvswitch kernel module for
>> OVS_ACTION_ATTR_SET_MASKED support.  This patch adds the kernel module
>> implementation of masked set actions.
>> 
>> The existing set action sets many fields at once.  When only a subset
>> of the IP header fields, for example, should be modified, all the IP
>> fields need to be exact matched so that the other field values can be
>> copied to the set action.  A masked set action allows modification of
>> an arbitrary subset of the supported header bits without requiring the
>> rest to be matched.
>> 
>> Masked set action is now supported for all writeable key types, except
>> for the tunnel key.  The set tunnel action is an exception as any
>> input tunnel info is cleared before action processing starts, so there
>> is no tunnel info to mask.
>> 
>> The kernel module converts all (non-tunnel) set actions to masked set
>> actions.  This makes action processing more uniform, and results in
>> less branching and duplicating the action processing code.  When
>> returning actions to userspace, the fully masked set actions are
>> converted back to normal set actions.  We use a kernel internal action
>> code to be able to tell the userspace provided and converted masked
>> set actions apart.
>> 
>> Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com>
> 
> How does this work, should I be waiting for a signoff or ACK from
> Pravin before applying this directly to my tree?

In this case you should wait for an Acked-by from Jesse, as he has
reviewed previous versions of this patch sent to dev@openvswitch.org
only. I should have included a note about that, sorry.

Thanks,

  Jarno

^ permalink raw reply

* Re: [PATCH 0/5] ISDN patches for net-next
From: David Miller @ 2014-12-10 20:06 UTC (permalink / raw)
  To: tilman; +Cc: netdev, hjlipp, isdn, isdn4linux
In-Reply-To: <cover.1418214588.git.tilman@imap.cc>

From: Tilman Schmidt <tilman@imap.cc>
Date: Wed, 10 Dec 2014 13:41:55 +0100 (CET)

> Here's a series of patches for the Gigaset ISDN driver and one for
> the ISDN CAPI subsystem.  Please merge as appropriate.

Series applied, thank you.

^ permalink raw reply

* Re: [PATCH] net/macb: add TX multiqueue support for gem
From: David Miller @ 2014-12-10 20:15 UTC (permalink / raw)
  To: cyrille.pitchen
  Cc: nicolas.ferre, linux-arm-kernel, netdev, soren.brinkmann,
	linux-kernel
In-Reply-To: <1418223831-30435-2-git-send-email-cyrille.pitchen@atmel.com>

From: Cyrille Pitchen <cyrille.pitchen@atmel.com>
Date: Wed, 10 Dec 2014 16:03:51 +0100

> +	netdev_vdbg(bp->dev, "macb_tx_error_task: q = %u, t = %u, h = %u\n",
> +		    queue - bp->queues, queue->tx_tail, queue->tx_head);

This and another change int his patch adds build warnings because
"ptr1 - ptr2" is a ptrdiff_t, which is a long int on some platforms:

drivers/net/ethernet/cadence/macb.c: In function ‘macb_tx_error_task’:
drivers/net/ethernet/cadence/macb.c:504:2: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 4 has type ‘long int’ [-Wformat]
drivers/net/ethernet/cadence/macb.c: In function ‘macb_interrupt’:
drivers/net/ethernet/cadence/macb.c:988:3: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 4 has type ‘long int’ [-Wformat]

^ permalink raw reply

* Re: [PATCH net-next 0/3] Kill arch_fast_hash
From: David Miller @ 2014-12-10 20:18 UTC (permalink / raw)
  To: dborkman; +Cc: netdev, tgraf, hannes
In-Reply-To: <1418225592-29322-1-git-send-email-dborkman@redhat.com>

From: Daniel Borkmann <dborkman@redhat.com>
Date: Wed, 10 Dec 2014 16:33:09 +0100

> Due to the size of changes I have based this against net-next,
> also given 3.18 is already out. I've split this into 3 parts,
> the first two to remove existing users (so they can optionally
> go to stable) and the last one to kill the remaining library bits.
> 
> Let me know if there are any issues.

Series applied, and I'll queue patch #1 to -stable, thanks.

^ permalink raw reply

* Re: [PATCH] llc: Make function pointer arrays const
From: David Miller @ 2014-12-10 20:21 UTC (permalink / raw)
  To: joe; +Cc: acme, netdev, linux-kernel
In-Reply-To: <1418228330.18092.3.camel@perches.com>

From: Joe Perches <joe@perches.com>
Date: Wed, 10 Dec 2014 08:18:50 -0800

> It's better when function pointer arrays aren't modifiable.
> 
> Signed-off-by: Joe Perches <joe@perches.com>

Applied.

^ permalink raw reply

* Re: [PATCH 2] llc: Make llc_conn_ev_qfyr_t function pointer arrays const
From: David Miller @ 2014-12-10 20:21 UTC (permalink / raw)
  To: joe; +Cc: acme, netdev, linux-kernel
In-Reply-To: <1418233437.18092.7.camel@perches.com>

From: Joe Perches <joe@perches.com>
Date: Wed, 10 Dec 2014 09:43:57 -0800

> It's better when function pointer arrays aren't modifiable.
> 
> Net change from original:
> 
> $ size net/llc/built-in.o.*
>    text	   data	    bss	    dec	    hex	filename
>   61065	  12886	   1344	  75295	  1261f	net/llc/built-in.o.new
>   47113	  27030	   1344	  75487	  126df	net/llc/built-in.o.old
> 
> Signed-off-by: Joe Perches <joe@perches.com>

Applied.

^ permalink raw reply

* Re: [PATCH 3] llc: Make llc_sap_action_t function pointer arrays const
From: David Miller @ 2014-12-10 20:22 UTC (permalink / raw)
  To: joe; +Cc: acme, netdev, linux-kernel
In-Reply-To: <1418234150.18092.9.camel@perches.com>

From: Joe Perches <joe@perches.com>
Date: Wed, 10 Dec 2014 09:55:50 -0800

> It's better when function pointer arrays aren't modifiable.
> 
> Net change:
> 
> $ size net/llc/built-in.o.*
>    text	   data	    bss	    dec	    hex	filename
>   61193	  12758	   1344	  75295	  1261f	net/llc/built-in.o.new
>   47113	  27030	   1344	  75487	  126df	net/llc/built-in.o.old
> 
> Signed-off-by: Joe Perches <joe@perches.com>

Applied.

^ permalink raw reply

* [PATCH net v7 1/7] cxgb4i: fix tx immediate data credit check
From: Karen Xie @ 2014-12-10 20:24 UTC (permalink / raw)
  To: linux-scsi, netdev
  Cc: kxie, hariprasad, anish, hch, James.Bottomley, michaelc, davem

[PATCH net v7 1/7] cxgb4i: fix tx immediate data credit check

From: Karen Xie <kxie@chelsio.com>

Only data skbs need the wr header added while control skbs do not. Make sure they are treated differently.

Signed-off-by: Karen Xie <kxie@chelsio.com>
---
 drivers/scsi/cxgbi/cxgb4i/cxgb4i.c |   22 +++++++++++++++-------
 drivers/scsi/cxgbi/libcxgbi.h      |    4 ++--
 2 files changed, 17 insertions(+), 9 deletions(-)

diff --git a/drivers/scsi/cxgbi/cxgb4i/cxgb4i.c b/drivers/scsi/cxgbi/cxgb4i/cxgb4i.c
index 1508125..f119a67 100644
--- a/drivers/scsi/cxgbi/cxgb4i/cxgb4i.c
+++ b/drivers/scsi/cxgbi/cxgb4i/cxgb4i.c
@@ -171,10 +171,14 @@ static int push_tx_frames(struct cxgbi_sock *, int);
  * Returns true if a packet can be sent as an offload WR with immediate
  * data.  We currently use the same limit as for Ethernet packets.
  */
-static inline int is_ofld_imm(const struct sk_buff *skb)
+static inline bool is_ofld_imm(const struct sk_buff *skb)
 {
-	return skb->len <= (MAX_IMM_TX_PKT_LEN -
-			sizeof(struct fw_ofld_tx_data_wr));
+	int len = skb->len;
+
+	if (likely(cxgbi_skcb_test_flag(skb, SKCBF_TX_NEED_HDR)))
+		len += sizeof(struct fw_ofld_tx_data_wr);
+
+	return len <= MAX_IMM_TX_PKT_LEN;
 }
 
 static void send_act_open_req(struct cxgbi_sock *csk, struct sk_buff *skb,
@@ -597,11 +601,15 @@ static int push_tx_frames(struct cxgbi_sock *csk, int req_completion)
 
 		skb_reset_transport_header(skb);
 		if (is_ofld_imm(skb))
-			credits_needed = DIV_ROUND_UP(dlen +
-					sizeof(struct fw_ofld_tx_data_wr), 16);
+			credits_needed = DIV_ROUND_UP(dlen, 16);
 		else
-			credits_needed = DIV_ROUND_UP(8*calc_tx_flits_ofld(skb)
-					+ sizeof(struct fw_ofld_tx_data_wr),
+			credits_needed = DIV_ROUND_UP(
+						8 * calc_tx_flits_ofld(skb),
+						16);
+
+		if (likely(cxgbi_skcb_test_flag(skb, SKCBF_TX_NEED_HDR)))
+			credits_needed += DIV_ROUND_UP(
+					sizeof(struct fw_ofld_tx_data_wr),
 					16);
 
 		if (csk->wr_cred < credits_needed) {
diff --git a/drivers/scsi/cxgbi/libcxgbi.h b/drivers/scsi/cxgbi/libcxgbi.h
index 2c7cb1c..aba1af7 100644
--- a/drivers/scsi/cxgbi/libcxgbi.h
+++ b/drivers/scsi/cxgbi/libcxgbi.h
@@ -317,8 +317,8 @@ static inline void cxgbi_skcb_clear_flag(struct sk_buff *skb,
 	__clear_bit(flag, &(cxgbi_skcb_flags(skb)));
 }
 
-static inline int cxgbi_skcb_test_flag(struct sk_buff *skb,
-					enum cxgbi_skcb_flags flag)
+static inline int cxgbi_skcb_test_flag(const struct sk_buff *skb,
+				       enum cxgbi_skcb_flags flag)
 {
 	return test_bit(flag, &(cxgbi_skcb_flags(skb)));
 }

^ permalink raw reply related

* [PATCH net v7 5/7] cxgb4i: handle non-pdu-aligned rx data
From: Karen Xie @ 2014-12-10 20:24 UTC (permalink / raw)
  To: linux-scsi, netdev
  Cc: kxie, hariprasad, anish, hch, James.Bottomley, michaelc, davem

[PATCH net v7 5/7] cxgb4i: handle non-pdu-aligned rx data

From: Karen Xie <kxie@chelsio.com>

Abort the connection upon receiving of cpl_rx_data, which means the pdu cannot be recovered from the tcp stream. This generally is due to pdu header corruption.

Signed-off-by: Karen Xie <kxie@chelsio.com>
---
 drivers/scsi/cxgbi/cxgb4i/cxgb4i.c |   22 ++++++++++++++++++++++
 1 files changed, 22 insertions(+), 0 deletions(-)

diff --git a/drivers/scsi/cxgbi/cxgb4i/cxgb4i.c b/drivers/scsi/cxgbi/cxgb4i/cxgb4i.c
index 2880f200..dff7345 100644
--- a/drivers/scsi/cxgbi/cxgb4i/cxgb4i.c
+++ b/drivers/scsi/cxgbi/cxgb4i/cxgb4i.c
@@ -1034,6 +1034,27 @@ rel_skb:
 	__kfree_skb(skb);
 }
 
+static void do_rx_data(struct cxgbi_device *cdev, struct sk_buff *skb)
+{
+	struct cxgbi_sock *csk;
+	struct cpl_rx_data *cpl = (struct cpl_rx_data *)skb->data;
+	unsigned int tid = GET_TID(cpl);
+	struct cxgb4_lld_info *lldi = cxgbi_cdev_priv(cdev);
+	struct tid_info *t = lldi->tids;
+
+	csk = lookup_tid(t, tid);
+	if (!csk) {
+		pr_err("can't find connection for tid %u.\n", tid);
+	} else {
+		/* not expecting this, reset the connection. */
+		pr_err("csk 0x%p, tid %u, rcv cpl_rx_data.\n", csk, tid);
+		spin_lock_bh(&csk->lock);
+		send_abort_req(csk);
+		spin_unlock_bh(&csk->lock);
+	}
+	__kfree_skb(skb);
+}
+
 static void do_rx_iscsi_hdr(struct cxgbi_device *cdev, struct sk_buff *skb)
 {
 	struct cxgbi_sock *csk;
@@ -1453,6 +1474,7 @@ cxgb4i_cplhandler_func cxgb4i_cplhandlers[NUM_CPL_CMDS] = {
 	[CPL_SET_TCB_RPL] = do_set_tcb_rpl,
 	[CPL_RX_DATA_DDP] = do_rx_data_ddp,
 	[CPL_RX_ISCSI_DDP] = do_rx_data_ddp,
+	[CPL_RX_DATA] = do_rx_data,
 };
 
 int cxgb4i_ofld_init(struct cxgbi_device *cdev)

^ 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