Netdev List
 help / color / mirror / Atom feed
* Re: [PATCH] ipv6: fix incorrect ipsec transport mode fragment
From: David Miller @ 2012-05-14 22:41 UTC (permalink / raw)
  To: steffen.klassert; +Cc: gaofeng, netdev, lw
In-Reply-To: <20120514130528.GA24733@secunet.com>

From: Steffen Klassert <steffen.klassert@secunet.com>
Date: Mon, 14 May 2012 15:05:28 +0200

> There might be other opinions, but I don't like to see this IPsec mode
> dependent stuff hacked into the generic ipv6 output path.

Completely agreed.

^ permalink raw reply

* Re: [net-next 06/12] ixgbe: Hardware Timestamping + PTP Hardware Clock (PHC)
From: Jacob Keller @ 2012-05-14 22:42 UTC (permalink / raw)
  To: Richard Cochran
  Cc: Kirsher, Jeffrey T, davem@davemloft.net, netdev@vger.kernel.org,
	gospo@redhat.com, sassmann@redhat.com
In-Reply-To: <20120512053458.GC2190@netboy.at.omicron.at>

On 05/11/2012 10:34 PM, Richard Cochran wrote:
> On Fri, May 11, 2012 at 07:23:44PM +0000, Keller, Jacob E wrote:
>>
>>
>> I believe this very rare case might be possible, but I don't think
>> that checking the ptp seqid will fix anything. In normal cases,
>> hardware latches Rx packet timestamp, then the ptp packet goes into
>> the queue and we process it shortly after. Before we process that
>> packet there will never be another packet in the queue that needs a
>> timestamp. We know this because the hardware stops timestamping
>> until we unlatch the RX registers. This should mean we don't need to
>> check the sequence ID, and spending time doing it would never fix
>> the issue you are talking about.
>>
>> The issue is for when a packet is timestamped and then never reaches
>> the queue. Then the rx stamp registers are locked for good, because
>> we never clear them, and hardware would never timestamp another
>> receive packet. I don't know a good solution to this, except to
>> clear the registers periodically. Do you have any suggestions?
>
> Well, one solution would be to check every received packet with the
> BPF in ptp_classify.h (whenever Rx time stamping is enabled).
>
> When the driver finds an event packet in the Rx queue, and
> TSYNCRXCTL[RXTT] is set, it reads out the time stamp along with
> RXSATRL/H. If the fields match, then add the time stamp to the skb.
>
> [ Or perhaps instead of using RXSATRL/H, just use the descriptor bit.
>    If *not* set, then the time stamp does not belong to this packet. ]
>
> HTH,
> Richard

sk_run_filter is always returning PTP_CLASS_NONE (0), instead of the 
correct type. Do you know what I am doing wrong? I can send you the 
patch I am working with...

- Jake

^ permalink raw reply

* Re: [PATCH] dm9000: some coldfire boards need this
From: David Miller @ 2012-05-14 22:40 UTC (permalink / raw)
  To: sfking; +Cc: netdev
In-Reply-To: <201205110949.46767.sfking@fdwdc.com>

From: Steven King <sfking@fdwdc.com>
Date: Fri, 11 May 2012 09:49:46 -0700

> Some coldfire boards (ie m5253demo) have a dm9000 onboard.
> 
> Signed-off-by: Steven King <sfking@fdwdc.com>

Applied to net-next, thanks.

^ permalink raw reply

* Re: [PATCH v2] xfrm: take iphdr size into account for esp payload size calculation
From: David Miller @ 2012-05-14 22:39 UTC (permalink / raw)
  To: bpoirier; +Cc: netdev, kuznet, jmorris, yoshfuji, kaber, linux-kernel
In-Reply-To: <1336698442-25148-1-git-send-email-bpoirier@suse.de>

From: Benjamin Poirier <bpoirier@suse.de>
Date: Thu, 10 May 2012 21:07:22 -0400

> -	return mtu - 2;
> +	return ((mtu - x->props.header_len - crypto_aead_authsize(esp->aead) -
> +			l3_adj) & ~(align - 1)) + (l3_adj - 2);
>  }

The formatting of this expression is completely wrong, you need
to make the "l3_adj" in the second line be aligned with the openning
parenthesis on the previous line at a depth determined based upon
how deeply in the openning parenthesis context this expression sits.

Just using TABS is ugly, and not allowed.

Use something like emacs's "C mode" with Linux coding style enabled
to assist you if you can't figure it out yourself.

^ permalink raw reply

* Re: [PATCH] xfrm: make xfrm_algo.c a module
From: David Miller @ 2012-05-14 22:37 UTC (permalink / raw)
  To: JBeulich; +Cc: netdev, linux-kernel
In-Reply-To: <4FAA3EAF02000078000826E4@nat28.tlf.novell.com>

From: "Jan Beulich" <JBeulich@suse.com>
Date: Wed, 09 May 2012 08:53:51 +0100

> By making this a standalone config option (selected as needed),
> selecting CRYPTO from here rather than from XFRM (which is boolean)
> allows the core crypto code to become a module again even when XFRM=y.
> 
> Signed-off-by: Jan Beulich <jbeulich@suse.com>
 ...
> @@ -15,9 +15,6 @@
>  #include <linux/crypto.h>
>  #include <linux/scatterlist.h>
>  #include <net/xfrm.h>
> -#if defined(CONFIG_INET_AH) || defined(CONFIG_INET_AH_MODULE) || defined(CONFIG_INET6_AH) || defined(CONFIG_INET6_AH_MODULE)
> -#include <net/ah.h>
> -#endif

This is completely unrelated to the change you are trying to make in
this patch.

It belongs in a separate change.

^ permalink raw reply

* Re: [PATCH net-next] codel: use Newton method instead of sqrt() and divides
From: David Miller @ 2012-05-14 22:33 UTC (permalink / raw)
  To: eric.dumazet
  Cc: dave.taht, netdev, nichols, van, codel, ycheng, mattmathis,
	therbert, shemminger, nanditad
In-Reply-To: <1336893803.8512.43.camel@edumazet-glaptop>

From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Sun, 13 May 2012 09:23:23 +0200

> Fell free to add following cleanup patch, if you like it ;)
 ...
> [PATCH net-next] codel: use u16 field instead of 31bits for rec_inv_sqrt

I do, applied :-)

^ permalink raw reply

* Re: [PATCH 3/3] usbnet: fix skb traversing races during unlink(v1)
From: David Miller @ 2012-05-14 22:34 UTC (permalink / raw)
  To: tom.leiming-Re5JQEeQqe8AvxtiuMwx3w
  Cc: gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r,
	netdev-u79uwXL29TY76Z2rM5mHXA, linux-usb-u79uwXL29TY76Z2rM5mHXA,
	huajun.li.lee-Re5JQEeQqe8AvxtiuMwx3w, oneukum-l3A5Bk7waGM,
	stable-DgEjT+Ai2ygdnm+yROfE0A
In-Reply-To: <CACVXFVNYFSSP2+MFXAqT60E0qOp8+hjU3u0SbYoWHA_a5ouaxw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

From: Ming Lei <tom.leiming-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Date: Thu, 10 May 2012 07:47:47 +0800

> Considered that this one(v2) doesn't depend on usb tree any more and looks
> no one objects it, could you apply this one on your tree?

I will, thanks.
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" 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: [PATCH net-next v4 02/13] mac802154: allocation of ieee802154 device
From: David Miller @ 2012-05-14 22:28 UTC (permalink / raw)
  To: alex.bluesman.smirnov; +Cc: netdev, dbaryshkov
In-Reply-To: <1336831165-23944-3-git-send-email-alex.bluesman.smirnov@gmail.com>

From: Alexander Smirnov <alex.bluesman.smirnov@gmail.com>
Date: Sat, 12 May 2012 17:59:14 +0400

> Add interface for device drivers to allocate and register ieee802154
> compatible device.
> 
> This code is based on net/mac80211/main.c file
> 
> Signed-off-by: Alexander Smirnov <alex.bluesman.smirnov@gmail.com>

Sorry, this needs to be fixed up.

I can almost understand using a comment formatting style I
disagree with, if you do so consistently.

But formatting them in THREE completely different ways?  Give me a
break:

> +	/* As in mac80211 slaves list is modified:
> +	 * 1) under the RTNL
> +	 * 2) protected by slaves_mtx;
> +	 * 3) in an RCU manner
> +	 *
> +	 * So atomic readers can use any of this protection methods
> +	 */
 ...
> +	/* This one is used for scanning and other
> +	 * jobs not to be interfered with serial driver */
 ...
> +	/*
> +	 * The following flag is also modified under slaves_mtx and RTNL,
> +	 * so you can read them using any of protection methods.
> +	 */
> +	/*
> +	 * SoftMAC device is registered and running. One can add
> +	 * subinterfaces.
> +	 */

That's just beyond silly, and the last two comments are right next to
eachother just combine them to one.

Go over your entire patch set and make sure that all of your comments
are of the form:

	/* Like
	 * this.
	 */

^ permalink raw reply

* Re: pull request: batman-adv 2012-05-14
From: David Miller @ 2012-05-14 22:17 UTC (permalink / raw)
  To: ordex-GaUfNO9RBHfsrOwW+9ziJQ
  Cc: netdev-u79uwXL29TY76Z2rM5mHXA,
	b.a.t.m.a.n-ZwoEplunGu2X36UT3dwllkB+6BGkLq7r
In-Reply-To: <1336979858-13928-1-git-send-email-ordex-GaUfNO9RBHfsrOwW+9ziJQ@public.gmane.org>

From: Antonio Quartulli <ordex-GaUfNO9RBHfsrOwW+9ziJQ@public.gmane.org>
Date: Mon, 14 May 2012 09:17:30 +0200

> Hello David,
> 
> here is our last set of changes intended for net-next/linux-3.5.
> In this patchset there are:
> 
> 1) several minor cleanups and fixes
> 2) an optimisation that avoid to linearise the whole packet when not needed
> 3) an optimisation for client traffic rerouting after a roaming event.
> 
> Patches that modify the whole naming schema will be sent later for merging
> with linux-3.6.

Pulled, thanks.

^ permalink raw reply

* Re: pull request: wireless-next 2012-05-14
From: David Miller @ 2012-05-14 22:12 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless, netdev
In-Reply-To: <20120514195508.GC2428@tuxdriver.com>

From: "John W. Linville" <linville@tuxdriver.com>
Date: Mon, 14 May 2012 15:55:08 -0400

> This is essentially the same batch of updates for 3.5 that I originally
> offered ~1.5 weeks ago.  The difference is that I rebased the tree
> both to drop the offending bluetooth-next pull and to base on top of
> a more recent net-next in order to resolve the continuing NLA_PUT_*
> issues affecting linux-next.  I also took the opportunity to resolve
> a little merge damage resulting from a recent pull of the net tree
> into net-next.
> 
> Other highlights of this pull request include some HT enhancements
> for mac80211, an expansion of the ethtool support for cfg80211-
> and mac80211-based drivers, and some more iwlwifi refactoring.
> 
> Please let me know if there are problems!

Pulled, thanks John.

^ permalink raw reply

* Re: [PATCH v2] net: codel: fix build errors
From: Sasha Levin @ 2012-05-14 22:09 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: edumazet, dave.taht, davem, linux-kernel, netdev
In-Reply-To: <20120514150544.6b17d3c5@nehalam.linuxnetplumber.net>

On Tue, May 15, 2012 at 12:05 AM, Stephen Hemminger
<shemminger@vyatta.com> wrote:
> On Mon, 14 May 2012 23:57:06 +0200
> Sasha Levin <levinsasha928@gmail.com> wrote:
>
>> Fix the following build error:
>>
>> net/sched/sch_fq_codel.c: In function 'fq_codel_dump_stats':
>> net/sched/sch_fq_codel.c:464:3: error: unknown field 'qdisc_stats' specified in initializer
>> net/sched/sch_fq_codel.c:464:3: warning: missing braces around initializer
>> net/sched/sch_fq_codel.c:464:3: warning: (near initialization for 'st.<anonymous>')
>> net/sched/sch_fq_codel.c:465:3: error: unknown field 'qdisc_stats' specified in initializer
>> net/sched/sch_fq_codel.c:465:3: warning: excess elements in struct initializer
>> net/sched/sch_fq_codel.c:465:3: warning: (near initialization for 'st')
>> net/sched/sch_fq_codel.c:466:3: error: unknown field 'qdisc_stats' specified in initializer
>> net/sched/sch_fq_codel.c:466:3: warning: excess elements in struct initializer
>> net/sched/sch_fq_codel.c:466:3: warning: (near initialization for 'st')
>> net/sched/sch_fq_codel.c:467:3: error: unknown field 'qdisc_stats' specified in initializer
>> net/sched/sch_fq_codel.c:467:3: warning: excess elements in struct initializer
>> net/sched/sch_fq_codel.c:467:3: warning: (near initialization for 'st')
>> make[1]: *** [net/sched/sch_fq_codel.o] Error 1
>>
>> Signed-off-by: Sasha Levin <levinsasha928@gmail.com>
>> ---
>>  net/sched/sch_fq_codel.c |    9 +++++----
>>  1 files changed, 5 insertions(+), 4 deletions(-)
>>
>> diff --git a/net/sched/sch_fq_codel.c b/net/sched/sch_fq_codel.c
>> index a7b3754..337ff20 100644
>> --- a/net/sched/sch_fq_codel.c
>> +++ b/net/sched/sch_fq_codel.c
>> @@ -461,13 +461,14 @@ static int fq_codel_dump_stats(struct Qdisc *sch, struct gnet_dump *d)
>>       struct fq_codel_sched_data *q = qdisc_priv(sch);
>>       struct tc_fq_codel_xstats st = {
>>               .type                           = TCA_FQ_CODEL_XSTATS_QDISC,
>> -             .qdisc_stats.maxpacket          = q->cstats.maxpacket,
>> -             .qdisc_stats.drop_overlimit     = q->drop_overlimit,
>> -             .qdisc_stats.ecn_mark           = q->cstats.ecn_mark,
>> -             .qdisc_stats.new_flow_count     = q->new_flow_count,
>>       };
>>       struct list_head *pos;
>>
>> +     st.qdisc_stats.maxpacket = q->cstats.maxpacket;
>> +     st.qdisc_stats.drop_overlimit = q->drop_overlimit;
>> +     st.qdisc_stats.ecn_mark = q->cstats.ecn_mark;
>> +     st.qdisc_stats.new_flow_count = q->new_flow_count;
>> +
>>       list_for_each(pos, &q->new_flows)
>>               st.qdisc_stats.new_flows_len++;
>>
>
> Cleaner and simpler to just use nested initialization.
>        struct tc_fq_codel_xstats st = {
>                .type                           = TCA_FQ_CODEL_XSTATS_QDISC,
>                .qdisc_stats = {
>                        .maxpacket      = q->cstats.maxpacket,
>                        .drop_overlimit = q->drop_overlimit,
>                        .ecn_mark       = q->cstats.ecn_mark,
>                        .new_flow_count = q->new_flow_count,
>                },
>        };

You'll get the same errors. You can't directly initialize members that
are in an anonymous union.

^ permalink raw reply

* Re: [PATCH v2] net: codel: fix build errors
From: Stephen Hemminger @ 2012-05-14 22:05 UTC (permalink / raw)
  To: Sasha Levin; +Cc: edumazet, dave.taht, davem, linux-kernel, netdev
In-Reply-To: <1337032626-7104-1-git-send-email-levinsasha928@gmail.com>

On Mon, 14 May 2012 23:57:06 +0200
Sasha Levin <levinsasha928@gmail.com> wrote:

> Fix the following build error:
> 
> net/sched/sch_fq_codel.c: In function 'fq_codel_dump_stats':
> net/sched/sch_fq_codel.c:464:3: error: unknown field 'qdisc_stats' specified in initializer
> net/sched/sch_fq_codel.c:464:3: warning: missing braces around initializer
> net/sched/sch_fq_codel.c:464:3: warning: (near initialization for 'st.<anonymous>')
> net/sched/sch_fq_codel.c:465:3: error: unknown field 'qdisc_stats' specified in initializer
> net/sched/sch_fq_codel.c:465:3: warning: excess elements in struct initializer
> net/sched/sch_fq_codel.c:465:3: warning: (near initialization for 'st')
> net/sched/sch_fq_codel.c:466:3: error: unknown field 'qdisc_stats' specified in initializer
> net/sched/sch_fq_codel.c:466:3: warning: excess elements in struct initializer
> net/sched/sch_fq_codel.c:466:3: warning: (near initialization for 'st')
> net/sched/sch_fq_codel.c:467:3: error: unknown field 'qdisc_stats' specified in initializer
> net/sched/sch_fq_codel.c:467:3: warning: excess elements in struct initializer
> net/sched/sch_fq_codel.c:467:3: warning: (near initialization for 'st')
> make[1]: *** [net/sched/sch_fq_codel.o] Error 1
> 
> Signed-off-by: Sasha Levin <levinsasha928@gmail.com>
> ---
>  net/sched/sch_fq_codel.c |    9 +++++----
>  1 files changed, 5 insertions(+), 4 deletions(-)
> 
> diff --git a/net/sched/sch_fq_codel.c b/net/sched/sch_fq_codel.c
> index a7b3754..337ff20 100644
> --- a/net/sched/sch_fq_codel.c
> +++ b/net/sched/sch_fq_codel.c
> @@ -461,13 +461,14 @@ static int fq_codel_dump_stats(struct Qdisc *sch, struct gnet_dump *d)
>  	struct fq_codel_sched_data *q = qdisc_priv(sch);
>  	struct tc_fq_codel_xstats st = {
>  		.type				= TCA_FQ_CODEL_XSTATS_QDISC,
> -		.qdisc_stats.maxpacket		= q->cstats.maxpacket,
> -		.qdisc_stats.drop_overlimit	= q->drop_overlimit,
> -		.qdisc_stats.ecn_mark		= q->cstats.ecn_mark,
> -		.qdisc_stats.new_flow_count	= q->new_flow_count,
>  	};
>  	struct list_head *pos;
>  
> +	st.qdisc_stats.maxpacket = q->cstats.maxpacket;
> +	st.qdisc_stats.drop_overlimit = q->drop_overlimit;
> +	st.qdisc_stats.ecn_mark = q->cstats.ecn_mark;
> +	st.qdisc_stats.new_flow_count = q->new_flow_count;
> +
>  	list_for_each(pos, &q->new_flows)
>  		st.qdisc_stats.new_flows_len++;
>  

Cleaner and simpler to just use nested initialization.
 	struct tc_fq_codel_xstats st = {
		.type				= TCA_FQ_CODEL_XSTATS_QDISC,
		.qdisc_stats = {
			.maxpacket	= q->cstats.maxpacket,
			.drop_overlimit	= q->drop_overlimit,
			.ecn_mark	= q->cstats.ecn_mark,
			.new_flow_count	= q->new_flow_count,
		},
	};

^ permalink raw reply

* Re: [PATCH v2] net: codel: fix build errors
From: Eric Dumazet @ 2012-05-14 22:00 UTC (permalink / raw)
  To: Sasha Levin; +Cc: edumazet, dave.taht, davem, linux-kernel, netdev
In-Reply-To: <1337032626-7104-1-git-send-email-levinsasha928@gmail.com>

On Mon, 2012-05-14 at 23:57 +0200, Sasha Levin wrote:
> Fix the following build error:
> 
> net/sched/sch_fq_codel.c: In function 'fq_codel_dump_stats':
> net/sched/sch_fq_codel.c:464:3: error: unknown field 'qdisc_stats' specified in initializer
> net/sched/sch_fq_codel.c:464:3: warning: missing braces around initializer
> net/sched/sch_fq_codel.c:464:3: warning: (near initialization for 'st.<anonymous>')
> net/sched/sch_fq_codel.c:465:3: error: unknown field 'qdisc_stats' specified in initializer
> net/sched/sch_fq_codel.c:465:3: warning: excess elements in struct initializer
> net/sched/sch_fq_codel.c:465:3: warning: (near initialization for 'st')
> net/sched/sch_fq_codel.c:466:3: error: unknown field 'qdisc_stats' specified in initializer
> net/sched/sch_fq_codel.c:466:3: warning: excess elements in struct initializer
> net/sched/sch_fq_codel.c:466:3: warning: (near initialization for 'st')
> net/sched/sch_fq_codel.c:467:3: error: unknown field 'qdisc_stats' specified in initializer
> net/sched/sch_fq_codel.c:467:3: warning: excess elements in struct initializer
> net/sched/sch_fq_codel.c:467:3: warning: (near initialization for 'st')
> make[1]: *** [net/sched/sch_fq_codel.o] Error 1
> 
> Signed-off-by: Sasha Levin <levinsasha928@gmail.com>
> ---

Acked-by: Eric Dumazet <edumazet@google.com>

^ permalink raw reply

* Re: [PATCH v2] net: codel: fix build errors
From: David Miller @ 2012-05-14 21:59 UTC (permalink / raw)
  To: levinsasha928; +Cc: edumazet, dave.taht, linux-kernel, netdev
In-Reply-To: <1337032626-7104-1-git-send-email-levinsasha928@gmail.com>

From: Sasha Levin <levinsasha928@gmail.com>
Date: Mon, 14 May 2012 23:57:06 +0200

> Fix the following build error:
  ...
> Signed-off-by: Sasha Levin <levinsasha928@gmail.com>

Applied, but:

>  	struct tc_fq_codel_xstats st = {
>  		.type				= TCA_FQ_CODEL_XSTATS_QDISC,
> -		.qdisc_stats.maxpacket		= q->cstats.maxpacket,
> -		.qdisc_stats.drop_overlimit	= q->drop_overlimit,
> -		.qdisc_stats.ecn_mark		= q->cstats.ecn_mark,
> -		.qdisc_stats.new_flow_count	= q->new_flow_count,
>  	};
>  	struct list_head *pos;
>  
> +	st.qdisc_stats.maxpacket = q->cstats.maxpacket;
> +	st.qdisc_stats.drop_overlimit = q->drop_overlimit;
> +	st.qdisc_stats.ecn_mark = q->cstats.ecn_mark;
> +	st.qdisc_stats.new_flow_count = q->new_flow_count;
> +

This is now a very inefficient initialization of this structure.

GCC is going to fill all the non-explictly-initialized fields with
zero, then we'll write to the same fields again in the st.qdisc*
assignments.

Eric please resolve this, I hate knowing we have code like this :-)

^ permalink raw reply

* Re: [PATCH -next] net/codel: Add missing #include <linux/prefetch.h>
From: David Miller @ 2012-05-14 21:59 UTC (permalink / raw)
  To: eric.dumazet; +Cc: geert, edumazet, dave.taht, netdev, linux-kernel, linux-next
In-Reply-To: <1337029498.8512.624.camel@edumazet-glaptop>

From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Mon, 14 May 2012 23:04:58 +0200

> On Mon, 2012-05-14 at 21:47 +0200, Geert Uytterhoeven wrote:
>> m68k allmodconfig:
>> 
>> net/sched/sch_codel.c: In function ‘dequeue’:
>> net/sched/sch_codel.c:70: error: implicit declaration of function ‘prefetch’
>> make[1]: *** [net/sched/sch_codel.o] Error 1
>> 
>> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
>> ---
> 
> I plaid guilty
> 
> Acked-by: Eric Dumazet <edumazet@google.com>

Applied.

^ permalink raw reply

* [PATCH v2] net: codel: fix build errors
From: Sasha Levin @ 2012-05-14 21:57 UTC (permalink / raw)
  To: edumazet, dave.taht, davem; +Cc: linux-kernel, netdev, Sasha Levin

Fix the following build error:

net/sched/sch_fq_codel.c: In function 'fq_codel_dump_stats':
net/sched/sch_fq_codel.c:464:3: error: unknown field 'qdisc_stats' specified in initializer
net/sched/sch_fq_codel.c:464:3: warning: missing braces around initializer
net/sched/sch_fq_codel.c:464:3: warning: (near initialization for 'st.<anonymous>')
net/sched/sch_fq_codel.c:465:3: error: unknown field 'qdisc_stats' specified in initializer
net/sched/sch_fq_codel.c:465:3: warning: excess elements in struct initializer
net/sched/sch_fq_codel.c:465:3: warning: (near initialization for 'st')
net/sched/sch_fq_codel.c:466:3: error: unknown field 'qdisc_stats' specified in initializer
net/sched/sch_fq_codel.c:466:3: warning: excess elements in struct initializer
net/sched/sch_fq_codel.c:466:3: warning: (near initialization for 'st')
net/sched/sch_fq_codel.c:467:3: error: unknown field 'qdisc_stats' specified in initializer
net/sched/sch_fq_codel.c:467:3: warning: excess elements in struct initializer
net/sched/sch_fq_codel.c:467:3: warning: (near initialization for 'st')
make[1]: *** [net/sched/sch_fq_codel.o] Error 1

Signed-off-by: Sasha Levin <levinsasha928@gmail.com>
---
 net/sched/sch_fq_codel.c |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/net/sched/sch_fq_codel.c b/net/sched/sch_fq_codel.c
index a7b3754..337ff20 100644
--- a/net/sched/sch_fq_codel.c
+++ b/net/sched/sch_fq_codel.c
@@ -461,13 +461,14 @@ static int fq_codel_dump_stats(struct Qdisc *sch, struct gnet_dump *d)
 	struct fq_codel_sched_data *q = qdisc_priv(sch);
 	struct tc_fq_codel_xstats st = {
 		.type				= TCA_FQ_CODEL_XSTATS_QDISC,
-		.qdisc_stats.maxpacket		= q->cstats.maxpacket,
-		.qdisc_stats.drop_overlimit	= q->drop_overlimit,
-		.qdisc_stats.ecn_mark		= q->cstats.ecn_mark,
-		.qdisc_stats.new_flow_count	= q->new_flow_count,
 	};
 	struct list_head *pos;
 
+	st.qdisc_stats.maxpacket = q->cstats.maxpacket;
+	st.qdisc_stats.drop_overlimit = q->drop_overlimit;
+	st.qdisc_stats.ecn_mark = q->cstats.ecn_mark;
+	st.qdisc_stats.new_flow_count = q->new_flow_count;
+
 	list_for_each(pos, &q->new_flows)
 		st.qdisc_stats.new_flows_len++;
 
-- 
1.7.8.6

^ permalink raw reply related

* Re: [PATCH] net: codel: fix build errors
From: Eric Dumazet @ 2012-05-14 21:49 UTC (permalink / raw)
  To: Sasha Levin; +Cc: edumazet, dave.taht, davem, linux-kernel, netdev
In-Reply-To: <CA+1xoqfWR+BA4xqqG+8SzVGYSH1z6nu_=iEFX7XoZzMhv_GvqA@mail.gmail.com>

On Mon, 2012-05-14 at 23:39 +0200, Sasha Levin wrote:
> On Mon, May 14, 2012 at 11:08 PM, Eric Dumazet <eric.dumazet@gmail.com> wrote:
> > Anonymous unions are fine, we use them a lot in kernel.
> 
> While we use them a lot, we don't try initializing them that often.
> 
> > Please fix the initializers instead in fq_codel_dump_stats(), because
> > these two #define are not very nice.
> 
> The only method I know of fixing that up is getting braces around them
> in the initializer, which is hacky and will break every time a new
> member is added to the struct before the anonymous union. Is there a
> different solution?


instead of 

	struct foo x = {
		.field = value;
		.sub.f2 = xxx;
		...
	};

use :

	struct foo x = {
		.field = value;
	};

	x.sub.f2 = xxx;
	...

^ permalink raw reply

* Re: [PATCH 1/4] netfilter: ipset: fix timeout value overflow bug
From: Jozsef Kadlecsik @ 2012-05-14 21:45 UTC (permalink / raw)
  To: Pablo Neira Ayuso
  Cc: Eric Dumazet, David Laight, netfilter-devel, davem, netdev
In-Reply-To: <20120514201043.GA15485@1984>

On Mon, 14 May 2012, Pablo Neira Ayuso wrote:

> On Mon, May 14, 2012 at 07:45:07PM +0200, Jozsef Kadlecsik wrote:
> > On Mon, 14 May 2012, Eric Dumazet wrote:
> > 
> > > On Mon, 2012-05-14 at 16:36 +0200, Pablo Neira Ayuso wrote:
> > > > On Mon, May 14, 2012 at 03:19:49PM +0100, David Laight wrote:
> > > > >  
> > > > > > --- a/include/linux/netfilter/ipset/ip_set_timeout.h
> > > > > > +++ b/include/linux/netfilter/ipset/ip_set_timeout.h
> > > > > > @@ -30,6 +30,10 @@ ip_set_timeout_uget(struct nlattr *tb)
> > > > > >  {
> > > > > >  	unsigned int timeout = ip_set_get_h32(tb);
> > > > > >  
> > > > > > +	/* Normalize to fit into jiffies */
> > > > > > +	if (timeout > UINT_MAX/1000)
> > > > > > +		timeout = UINT_MAX/1000;
> > > > > > +
> > > > > 
> > > > > Doesn't that rather assume that HZ is 1000 ?
> > > > 
> > > > Indeed. I overlooked that. Thanks David.
> > > 
> > > I dont think so.
> > > 
> > > 1000 here is really MSEC_PER_SEC
> > > 
> > > (All occurrences should be changed in this file)
> > 
> > Yes, exactly. Pablo, shall I produce a little patch or could you change 
> > 1000 to MSEC_PER_SEC?
> 
> New patch attached.
> 
> I have rebase my tree again.

Thanks Pablo, indeed!

Best regards,
Jozsef
-
E-mail  : kadlec@blackhole.kfki.hu, kadlecsik.jozsef@wigner.mta.hu
PGP key : http://www.kfki.hu/~kadlec/pgp_public_key.txt
Address : Wigner Research Centre for Physics, Hungarian Academy of Sciences
          H-1525 Budapest 114, POB. 49, Hungary

^ permalink raw reply

* Re: [PATCH] net: codel: fix build errors
From: Sasha Levin @ 2012-05-14 21:39 UTC (permalink / raw)
  To: Eric Dumazet; +Cc: edumazet, dave.taht, davem, linux-kernel, netdev
In-Reply-To: <1337029683.8512.626.camel@edumazet-glaptop>

On Mon, May 14, 2012 at 11:08 PM, Eric Dumazet <eric.dumazet@gmail.com> wrote:
> Anonymous unions are fine, we use them a lot in kernel.

While we use them a lot, we don't try initializing them that often.

> Please fix the initializers instead in fq_codel_dump_stats(), because
> these two #define are not very nice.

The only method I know of fixing that up is getting braces around them
in the initializer, which is hacky and will break every time a new
member is added to the struct before the anonymous union. Is there a
different solution?

^ permalink raw reply

* Question about be2net error field, rx_drops_no_pbuf
From: Marcelo Leitner @ 2012-05-14 21:25 UTC (permalink / raw)
  To: netdev

Hi,

What does 'rx_drops_no_pbuf' mean at be2net driver? I can see it is a 
hardware counter for some type of error, which I would like to know 
about. What causes it?

All documentation I could find about it is a comment referring firmware 
specification:

struct be_rxf_stats_v0 {
     struct be_port_rxf_stats_v0 port[2];
     u32 rx_drops_no_pbuf;   /* dword 132*/
     ...
}

struct be_rxf_stats_v1 {
     struct be_port_rxf_stats_v1 port[4];
     u32 rsvd0[2];
     u32 rx_drops_no_pbuf;
     ...
}

That, plus this:

be_get_stats64()
{
     ...
     /* receiver fifo overrun */
     /* drops_no_pbuf is no per i/f, it's per BE card */
     stats->rx_fifo_errors = drvs->rxpp_fifo_overflow_drop +
                 drvs->rx_input_fifo_overflow_drop +
                 drvs->rx_drops_no_pbuf;
     return stats;
}

Thanks,
Marcelo.

^ permalink raw reply

* Re: [PATCH] net: codel: fix build errors
From: David Miller @ 2012-05-14 21:20 UTC (permalink / raw)
  To: eric.dumazet; +Cc: levinsasha928, edumazet, dave.taht, linux-kernel, netdev
In-Reply-To: <1337029683.8512.626.camel@edumazet-glaptop>

From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Mon, 14 May 2012 23:08:03 +0200

> Anonymous unions are fine, we use them a lot in kernel.
> 
> Please fix the initializers instead in fq_codel_dump_stats(), because
> these two #define are not very nice.

Agreed.

^ permalink raw reply

* Re: [PATCH] net: codel: fix build errors
From: Eric Dumazet @ 2012-05-14 21:08 UTC (permalink / raw)
  To: Sasha Levin; +Cc: edumazet, dave.taht, davem, linux-kernel, netdev
In-Reply-To: <1337015687-17693-1-git-send-email-levinsasha928@gmail.com>

On Mon, 2012-05-14 at 19:14 +0200, Sasha Levin wrote:
> Fix the following build error:
> 
> net/sched/sch_fq_codel.c: In function 'fq_codel_dump_stats':
> net/sched/sch_fq_codel.c:464:3: error: unknown field 'qdisc_stats' specified in initializer
> net/sched/sch_fq_codel.c:464:3: warning: missing braces around initializer
> net/sched/sch_fq_codel.c:464:3: warning: (near initialization for 'st.<anonymous>')
> net/sched/sch_fq_codel.c:465:3: error: unknown field 'qdisc_stats' specified in initializer
> net/sched/sch_fq_codel.c:465:3: warning: excess elements in struct initializer
> net/sched/sch_fq_codel.c:465:3: warning: (near initialization for 'st')
> net/sched/sch_fq_codel.c:466:3: error: unknown field 'qdisc_stats' specified in initializer
> net/sched/sch_fq_codel.c:466:3: warning: excess elements in struct initializer
> net/sched/sch_fq_codel.c:466:3: warning: (near initialization for 'st')
> net/sched/sch_fq_codel.c:467:3: error: unknown field 'qdisc_stats' specified in initializer
> net/sched/sch_fq_codel.c:467:3: warning: excess elements in struct initializer
> net/sched/sch_fq_codel.c:467:3: warning: (near initialization for 'st')
> make[1]: *** [net/sched/sch_fq_codel.o] Error 1
> 
> Signed-off-by: Sasha Levin <levinsasha928@gmail.com>
> ---
>  include/linux/pkt_sched.h |    4 +++-
>  1 files changed, 3 insertions(+), 1 deletions(-)
> 
> diff --git a/include/linux/pkt_sched.h b/include/linux/pkt_sched.h
> index 32aef0a..c304eda 100644
> --- a/include/linux/pkt_sched.h
> +++ b/include/linux/pkt_sched.h
> @@ -732,7 +732,9 @@ struct tc_fq_codel_xstats {
>  	union {
>  		struct tc_fq_codel_qd_stats qdisc_stats;
>  		struct tc_fq_codel_cl_stats class_stats;
> -	};
> +	} u;
> +#define qdisc_stats u.qdisc_stats
> +#define class_stats u.class_stats
>  };
>  

Anonymous unions are fine, we use them a lot in kernel.

Please fix the initializers instead in fq_codel_dump_stats(), because
these two #define are not very nice.

^ permalink raw reply

* Re: [PATCH -next] net/codel: Add missing #include <linux/prefetch.h>
From: Eric Dumazet @ 2012-05-14 21:04 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Eric Dumazet, Dave Taht, David S. Miller, netdev, linux-kernel,
	linux-next
In-Reply-To: <1337024825-20130-1-git-send-email-geert@linux-m68k.org>

On Mon, 2012-05-14 at 21:47 +0200, Geert Uytterhoeven wrote:
> m68k allmodconfig:
> 
> net/sched/sch_codel.c: In function ‘dequeue’:
> net/sched/sch_codel.c:70: error: implicit declaration of function ‘prefetch’
> make[1]: *** [net/sched/sch_codel.o] Error 1
> 
> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
> ---

I plaid guilty

Acked-by: Eric Dumazet <edumazet@google.com>

Thanks

^ permalink raw reply

* inconsistent null checking in ipx_ioctl()
From: Dan Carpenter @ 2012-05-14 20:56 UTC (permalink / raw)
  To: netdev

Hi, I'm working on some new Smatch stuff and going through some warnings
in old code.

----
This is a semi-automatic email about new static checker warnings.

The patch b0d0d915d1d1: "ipx: remove the BKL" from Jan 25, 2011, 
leads to the following Smatch complaint:

net/ipx/af_ipx.c:1928 ipx_ioctl()
	 error: we previously assumed 'sk' could be null (see line 1913)

net/ipx/af_ipx.c
  1912			rc = -EINVAL;
  1913			if (sk)
                           ^^^^
Check.

  1914				rc = sock_get_timestamp(sk, argp);
  1915			break;
  1916		case SIOCGIFDSTADDR:
  1917		case SIOCSIFDSTADDR:
  1918		case SIOCGIFBRDADDR:
  1919		case SIOCSIFBRDADDR:
  1920		case SIOCGIFNETMASK:
  1921		case SIOCSIFNETMASK:
  1922			rc = -EINVAL;
  1923			break;
  1924		default:
  1925			rc = -ENOIOCTLCMD;
  1926			break;
  1927		}
  1928		release_sock(sk);
                ^^^^^^^^^^^^^^^^^
The lock and release functions dereference "sk".  Probably the check
can be removed.  The rest of the function dereferences "sk" without
checking.  A lot of this code goes back to 2.6.12.

  1929	
  1930		return rc;

regards,
dan carpenter

^ permalink raw reply

* Re: [PATCH 01/12] netvm: Prevent a stream-specific deadlock
From: David Miller @ 2012-05-14 20:26 UTC (permalink / raw)
  To: mgorman
  Cc: akpm, linux-mm, netdev, linux-nfs, linux-kernel, Trond.Myklebust,
	neilb, hch, a.p.zijlstra, michaelc, emunson
In-Reply-To: <20120514105604.GB29102@suse.de>

From: Mel Gorman <mgorman@suse.de>
Date: Mon, 14 May 2012 11:56:04 +0100

> On Fri, May 11, 2012 at 01:10:34AM -0400, David Miller wrote:
>> From: Mel Gorman <mgorman@suse.de>
>> Date: Thu, 10 May 2012 14:54:14 +0100
>> 
>> > It could happen that all !SOCK_MEMALLOC sockets have buffered so
>> > much data that we're over the global rmem limit. This will prevent
>> > SOCK_MEMALLOC buffers from receiving data, which will prevent userspace
>> > from running, which is needed to reduce the buffered data.
>> > 
>> > Fix this by exempting the SOCK_MEMALLOC sockets from the rmem limit.
>> > 
>> > Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
>> > Signed-off-by: Mel Gorman <mgorman@suse.de>
>> 
>> This introduces an invariant which I am not so sure is enforced.
>> 
>> With this change it is absolutely required that once a socket
>> becomes SOCK_MEMALLOC it must never _ever_ lose that attribute.
>> 
> 
> This is effectively true. In the NFS case, the flag is cleared on
> swapoff after all the entries have been paged in. In the NBD case,
> SOCK_MEMALLOC is left set until the socket is destroyed. I'll update the
> changelog.

Bugs happen, you need to find a way to assert that nobody every does
this.  Because if a bug is introduced which makes this happen, it will
otherwise be very difficult to debug.

--
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/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply


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