Netdev List
 help / color / mirror / Atom feed
* [PATCH net-next] tipc: spelling errors
From: Stephen Hemminger @ 2014-10-30  5:58 UTC (permalink / raw)
  To: Jon Maloy, Allan Stephens; +Cc: netdev


Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>

---
 net/tipc/msg.c    |    4 ++--
 net/tipc/socket.c |    2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

--- a/net/tipc/socket.c	2014-10-27 21:06:04.243288996 -0700
+++ b/net/tipc/socket.c	2014-10-27 21:06:04.239288981 -0700
@@ -1556,7 +1556,7 @@ static void tipc_data_ready(struct sock
  * @tsk: TIPC socket
  * @msg: message
  *
- * Returns 0 (TIPC_OK) if everyting ok, -TIPC_ERR_NO_PORT otherwise
+ * Returns 0 (TIPC_OK) if everything ok, -TIPC_ERR_NO_PORT otherwise
  */
 static int filter_connect(struct tipc_sock *tsk, struct sk_buff **buf)
 {
--- a/net/tipc/msg.c	2014-10-27 21:06:04.243288996 -0700
+++ b/net/tipc/msg.c	2014-10-27 21:06:04.239288981 -0700
@@ -91,7 +91,7 @@ struct sk_buff *tipc_msg_create(uint use
  * @*headbuf: in:  NULL for first frag, otherwise value returned from prev call
  *            out: set when successful non-complete reassembly, otherwise NULL
  * @*buf:     in:  the buffer to append. Always defined
- *            out: head buf after sucessful complete reassembly, otherwise NULL
+ *            out: head buf after successful complete reassembly, otherwise NULL
  * Returns 1 when reassembly complete, otherwise 0
  */
 int tipc_buf_append(struct sk_buff **headbuf, struct sk_buff **buf)
@@ -311,7 +311,7 @@ bool tipc_msg_bundle(struct sk_buff *bbu
  * @mtu:  max allowable size for the bundle buffer, inclusive header
  * @dnode: destination node for message. (Not always present in header)
  * Replaces buffer if successful
- * Returns true if sucess, otherwise false
+ * Returns true if success, otherwise false
  */
 bool tipc_msg_make_bundle(struct sk_buff **buf, u32 mtu, u32 dnode)
 {

^ permalink raw reply

* [PATCH v2] PPC: bpf_jit_comp: add SKF_AD_PKTTYPE instruction
From: Denis Kirjanov @ 2014-10-30  6:12 UTC (permalink / raw)
  To: netdev
  Cc: linuxppc-dev, Denis Kirjanov, Alexei Starovoitov,
	Michael Ellerman, Matt Evans

Add BPF extension SKF_AD_PKTTYPE to ppc JIT to load
skb->pkt_type field.

Before:
[   88.262622] test_bpf: #11 LD_IND_NET 86 97 99 PASS
[   88.265740] test_bpf: #12 LD_PKTTYPE 109 107 PASS

After:
[   80.605964] test_bpf: #11 LD_IND_NET 44 40 39 PASS
[   80.607370] test_bpf: #12 LD_PKTTYPE 9 9 PASS

CC: Alexei Starovoitov<alexei.starovoitov@gmail.com>
CC: Michael Ellerman<mpe@ellerman.id.au>
Cc: Matt Evans <matt@ozlabs.org>
Signed-off-by: Denis Kirjanov <kda@linux-powerpc.org>

v2: Added test rusults
---
 arch/powerpc/include/asm/ppc-opcode.h | 1 +
 arch/powerpc/net/bpf_jit.h            | 7 +++++++
 arch/powerpc/net/bpf_jit_comp.c       | 5 +++++
 3 files changed, 13 insertions(+)

diff --git a/arch/powerpc/include/asm/ppc-opcode.h b/arch/powerpc/include/asm/ppc-opcode.h
index 6f85362..1a52877 100644
--- a/arch/powerpc/include/asm/ppc-opcode.h
+++ b/arch/powerpc/include/asm/ppc-opcode.h
@@ -204,6 +204,7 @@
 #define PPC_INST_ERATSX_DOT		0x7c000127
 
 /* Misc instructions for BPF compiler */
+#define PPC_INST_LBZ			0x88000000
 #define PPC_INST_LD			0xe8000000
 #define PPC_INST_LHZ			0xa0000000
 #define PPC_INST_LHBRX			0x7c00062c
diff --git a/arch/powerpc/net/bpf_jit.h b/arch/powerpc/net/bpf_jit.h
index 9aee27c..c406aa9 100644
--- a/arch/powerpc/net/bpf_jit.h
+++ b/arch/powerpc/net/bpf_jit.h
@@ -87,6 +87,9 @@ DECLARE_LOAD_FUNC(sk_load_byte_msh);
 #define PPC_STD(r, base, i)	EMIT(PPC_INST_STD | ___PPC_RS(r) |	      \
 				     ___PPC_RA(base) | ((i) & 0xfffc))
 
+
+#define PPC_LBZ(r, base, i)	EMIT(PPC_INST_LBZ | ___PPC_RT(r) |	      \
+				     ___PPC_RA(base) | IMM_L(i))
 #define PPC_LD(r, base, i)	EMIT(PPC_INST_LD | ___PPC_RT(r) |	      \
 				     ___PPC_RA(base) | IMM_L(i))
 #define PPC_LWZ(r, base, i)	EMIT(PPC_INST_LWZ | ___PPC_RT(r) |	      \
@@ -96,6 +99,10 @@ DECLARE_LOAD_FUNC(sk_load_byte_msh);
 #define PPC_LHBRX(r, base, b)	EMIT(PPC_INST_LHBRX | ___PPC_RT(r) |	      \
 				     ___PPC_RA(base) | ___PPC_RB(b))
 /* Convenience helpers for the above with 'far' offsets: */
+#define PPC_LBZ_OFFS(r, base, i) do { if ((i) < 32768) PPC_LBZ(r, base, i);   \
+		else {	PPC_ADDIS(r, base, IMM_HA(i));			      \
+			PPC_LBZ(r, r, IMM_L(i)); } } while(0)
+
 #define PPC_LD_OFFS(r, base, i) do { if ((i) < 32768) PPC_LD(r, base, i);     \
 		else {	PPC_ADDIS(r, base, IMM_HA(i));			      \
 			PPC_LD(r, r, IMM_L(i)); } } while(0)
diff --git a/arch/powerpc/net/bpf_jit_comp.c b/arch/powerpc/net/bpf_jit_comp.c
index cbae2df..d110e28 100644
--- a/arch/powerpc/net/bpf_jit_comp.c
+++ b/arch/powerpc/net/bpf_jit_comp.c
@@ -407,6 +407,11 @@ static int bpf_jit_build_body(struct bpf_prog *fp, u32 *image,
 			PPC_LHZ_OFFS(r_A, r_skb, offsetof(struct sk_buff,
 							  queue_mapping));
 			break;
+		case BPF_ANC | SKF_AD_PKTTYPE:
+			PPC_LBZ_OFFS(r_A, r_skb, PKT_TYPE_OFFSET());
+			PPC_ANDI(r_A, r_A, PKT_TYPE_MAX);
+			PPC_SRWI(r_A, r_A, 5);
+			break;
 		case BPF_ANC | SKF_AD_CPU:
 #ifdef CONFIG_SMP
 			/*
-- 
2.1.0

^ permalink raw reply related

* Re: net: fec: fix regression on i.MX28 introduced by rx_copybreak support
From: Lothar Waßmann @ 2014-10-30  6:51 UTC (permalink / raw)
  To: David Miller
  Cc: netdev, rmk+kernel, Frank.Li, fabio.estevam, linux-kernel,
	linux-arm-kernel
In-Reply-To: <20141029.153430.1036004676442879956.davem@davemloft.net>

Hi,

David Miller wrote:
> From: Lothar Waßmann <LW@KARO-electronics.de>
> Date: Tue, 28 Oct 2014 14:22:55 +0100
> 
> > Changes wrt. v1:
> > - added some cleanup patches
> > - simplify handling of 'quirks' flags as suggested by Russell King.
> > - remove DIV_ROUND_UP() from byte swapping loop as suggested by
> >   Eric Dumazet
> > 
> > Changes wrt. v2:
> > - rebased against next-20141028
> > - added some more cleanups in fec.h
> > - removed unused return value from swap_buffer()
> > - fixed messed swab32s() call in swap_buffer2()
> > - fixed messed up setup of fep->quirks
> > 
> 
> It is not appropriate to mix cleanups and bonafide bug fixes.
> 
> I want to see only bug fixes targetted at 'net'.  You can later
> submit the cleanups to 'net-next'.
> 
OK.

> Also, I don't thnk your DIV_ROUND_UP() eliminate for the loop
> in swap_buffer() is valid.  The whole point is that the current
> code handles buffers which have a length which is not a multiple
> of 4 properly, after your change it will no longer do so.
>
Do you really think so?


Lothar Waßmann
-- 
___________________________________________________________

Ka-Ro electronics GmbH | Pascalstraße 22 | D - 52076 Aachen
Phone: +49 2408 1402-0 | Fax: +49 2408 1402-10
Geschäftsführer: Matthias Kaussen
Handelsregistereintrag: Amtsgericht Aachen, HRB 4996

www.karo-electronics.de | info@karo-electronics.de
___________________________________________________________

^ permalink raw reply

* Re: [PATCH net-next] mlx4: use napi_schedule_irqoff()
From: Amir Vadai @ 2014-10-30  7:30 UTC (permalink / raw)
  To: Eric Dumazet, David Miller; +Cc: netdev
In-Reply-To: <1414626885.631.102.camel@edumazet-glaptop2.roam.corp.google.com>

On 10/30/2014 1:54 AM, Eric Dumazet wrote:
> From: Eric Dumazet <edumazet@google.com>
> 
> mlx4_en_rx_irq() and mlx4_en_tx_irq() run from hard interrupt context.
> 
> They can use napi_schedule_irqoff() instead of napi_schedule()
> 
> Signed-off-by: Eric Dumazet <edumazet@google.com>
> ---
>  drivers/net/ethernet/mellanox/mlx4/en_rx.c |    4 ++--
>  drivers/net/ethernet/mellanox/mlx4/en_tx.c |    4 ++--
>  2 files changed, 4 insertions(+), 4 deletions(-)
> 

Acked-By: Amir Vadai <amirv@mellanox.com>

Thanks,
Amir

^ permalink raw reply

* Re: [patch] Bluetooth: 6lowpan: use after free in disconnect_devices()
From: Jukka Rissanen @ 2014-10-30  7:54 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Marcel Holtmann, Gustavo Padovan, Johan Hedberg, David S. Miller,
	linux-bluetooth, netdev, linux-kernel, kernel-janitors
In-Reply-To: <20141029161057.GF5290@mwanda>

Hi Dan,

On ke, 2014-10-29 at 19:10 +0300, Dan Carpenter wrote:
> This was accidentally changed from list_for_each_entry_safe() to
> list_for_each_entry() so now it has a use after free bug.  I've changed
> it back.

Good catch! Thanks for the patch.

Acked-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>

> 
> Fixes: 90305829635d ('Bluetooth: 6lowpan: Converting rwlocks to use RCU')
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> 
> diff --git a/net/bluetooth/6lowpan.c b/net/bluetooth/6lowpan.c
> index 7254bdd..eef298d 100644
> --- a/net/bluetooth/6lowpan.c
> +++ b/net/bluetooth/6lowpan.c
> @@ -1383,7 +1383,7 @@ static const struct file_operations lowpan_control_fops = {
>  
>  static void disconnect_devices(void)
>  {
> -	struct lowpan_dev *entry, *new_dev;
> +	struct lowpan_dev *entry, *tmp, *new_dev;
>  	struct list_head devices;
>  
>  	INIT_LIST_HEAD(&devices);
> @@ -1408,7 +1408,7 @@ static void disconnect_devices(void)
>  
>  	rcu_read_unlock();
>  
> -	list_for_each_entry(entry, &devices, list) {
> +	list_for_each_entry_safe(entry, tmp, &devices, list) {
>  		ifdown(entry->netdev);
>  		BT_DBG("Unregistering netdev %s %p",
>  		       entry->netdev->name, entry->netdev);
> --
> To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


Cheers,
Jukka

^ permalink raw reply

* Re: [PATCH 2/5] stmmac: pci: use managed resources
From: Andy Shevchenko @ 2014-10-30  8:05 UTC (permalink / raw)
  To: Giuseppe CAVALLARO
  Cc: Sergei Shtylyov, netdev, Kweh Hock Leong, David S. Miller,
	Vince Bridgers, Rayagond K
In-Reply-To: <544E6486.6040502@st.com>

On Mon, 2014-10-27 at 16:28 +0100, Giuseppe CAVALLARO wrote:
> On 10/22/2014 10:36 AM, Andy Shevchenko wrote:
> > So, I was trying to find any specification on public regarding to boards
> > that have this IP, no luck so far. I guess that that code was created
> > due to XILINX FPGA usage which probably can provide any BAR user wants
> > to. Thus, I imply that in real applications the BAR most probably will
> > be 0. However, I left variable which can be overridden in future
> > (regarding to PCI ID).
> >
> > It would be nice to hear someone from ST about this. Giuseppe?
> 
> Hello Andy
> 
> this chip is on ST SoCs since long time but embedded. I have no PCI
> card. Added Rayagond on copy too

Rayagond, what do you think about changing an approach that is used to
get resources from PCI?

-- 
Andy Shevchenko <andriy.shevchenko@intel.com>
Intel Finland Oy

^ permalink raw reply

* Re: [PATCH 0/5] stmmac: pci: various cleanups and fixes
From: Giuseppe CAVALLARO @ 2014-10-30  8:13 UTC (permalink / raw)
  To: Andy Shevchenko, netdev, Kweh Hock Leong, David S. Miller,
	Vince Bridgers
In-Reply-To: <1413909333-16380-1-git-send-email-andriy.shevchenko@linux.intel.com>

On 10/21/2014 6:35 PM, Andy Shevchenko wrote:
> There are few cleanups and fixes regarding to stmmac PCI driver.
> This has been tested on Intel Galileo board with 3.18-rc1 kernel.

Hello Andy,

for your next version I think that the patches should be for net-next
tree.
Maybe the following for net.git: "stmmac: pci: set default filter bins"

I kindly ask you to detail fix and cleanup.

peppe

>
> Andy Shevchenko (5):
>    stmmac: pci: convert to use dev_pm_ops
>    stmmac: pci: use managed resources
>    stmmac: pci: convert to use dev_* macros
>    stmmac: pci: set default filter bins
>    stmmac: pci: remove FSF address
>
>   drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c | 92 ++++++++----------------
>   1 file changed, 30 insertions(+), 62 deletions(-)
>

^ permalink raw reply

* [PATCH iproute2] man: update doc after support of ESN and anti-replay window
From: Nicolas Dichtel @ 2014-10-30  8:18 UTC (permalink / raw)
  To: shemminger; +Cc: netdev, Nicolas Dichtel

Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
---
 man/man8/ip-xfrm.8 | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/man/man8/ip-xfrm.8 b/man/man8/ip-xfrm.8
index 2d31b4d9c5a2..c9d2a2e17c35 100644
--- a/man/man8/ip-xfrm.8
+++ b/man/man8/ip-xfrm.8
@@ -43,6 +43,10 @@ ip-xfrm \- transform configuration
 .IR SEQ " ]"
 .RB "[ " replay-oseq
 .IR SEQ " ]"
+.RB "[ " replay-seq-hi
+.IR SEQ " ]"
+.RB "[ " replay-oseq-hi
+.IR SEQ " ]"
 .RB "[ " flag
 .IR FLAG-LIST " ]"
 .RB "[ " sel
@@ -138,7 +142,8 @@ ip-xfrm \- transform configuration
 
 .ti -8
 .IR FLAG " :="
-.BR noecn " | " decap-dscp " | " nopmtudisc " | " wildrecv " | " icmp " | " af-unspec " | " align4
+.BR noecn " | " decap-dscp " | " nopmtudisc " | " wildrecv " | " icmp " | "
+.BR af-unspec " | " align4 " | " esn
 
 .ti -8
 .IR SELECTOR " :="
@@ -470,7 +475,7 @@ and inbound trigger
 .I FLAG-LIST
 contains one or more of the following optional flags:
 .BR noecn ", " decap-dscp ", " nopmtudisc ", " wildrecv ", " icmp ", "
-.BR af-unspec ", or " align4 "."
+.BR af-unspec ", " align4 ", or " esn "."
 
 .TP
 .IR SELECTOR
-- 
2.1.0

^ permalink raw reply related

* [PATCH ipsec-next] xfrm: add XFRMA_REPLAY_VAL attribute to SA messages
From: Nicolas Dichtel @ 2014-10-30  8:39 UTC (permalink / raw)
  To: steffen.klassert
  Cc: davem, netdev, dingzhi, Adrien Mazarguil, Nicolas Dichtel

From: dingzhi <zhi.ding@6wind.com>

After this commit, the attribute XFRMA_REPLAY_VAL is added when no ESN replay
value is defined. Thus sequence number values are always notified to userspace.

Signed-off-by: dingzhi <zhi.ding@6wind.com>
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
---
 net/xfrm/xfrm_user.c | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/net/xfrm/xfrm_user.c b/net/xfrm/xfrm_user.c
index e812e988c111..8128594ab379 100644
--- a/net/xfrm/xfrm_user.c
+++ b/net/xfrm/xfrm_user.c
@@ -824,13 +824,15 @@ static int copy_to_user_state_extra(struct xfrm_state *x,
 	ret = xfrm_mark_put(skb, &x->mark);
 	if (ret)
 		goto out;
-	if (x->replay_esn) {
+	if (x->replay_esn)
 		ret = nla_put(skb, XFRMA_REPLAY_ESN_VAL,
 			      xfrm_replay_state_esn_len(x->replay_esn),
 			      x->replay_esn);
-		if (ret)
-			goto out;
-	}
+	else
+		ret = nla_put(skb, XFRMA_REPLAY_VAL, sizeof(x->replay),
+			      &x->replay);
+	if (ret)
+		goto out;
 	if (x->security)
 		ret = copy_sec_ctx(x->security, skb);
 out:
@@ -2569,6 +2571,8 @@ static inline size_t xfrm_sa_len(struct xfrm_state *x)
 		l += nla_total_size(sizeof(x->tfcpad));
 	if (x->replay_esn)
 		l += nla_total_size(xfrm_replay_state_esn_len(x->replay_esn));
+	else
+		l += nla_total_size(sizeof(struct xfrm_replay_state));
 	if (x->security)
 		l += nla_total_size(sizeof(struct xfrm_user_sec_ctx) +
 				    x->security->ctx_len);
-- 
2.1.0

^ permalink raw reply related

* Re: [PATCH iproute2] ip link: Allow to filter devices by master dev
From: vadim4j @ 2014-10-30  8:54 UTC (permalink / raw)
  To: netdev
In-Reply-To: <1413727488-18032-1-git-send-email-vadim4j@gmail.com>

On Sun, Oct 19, 2014 at 05:04:48PM +0300, Vadim Kochan wrote:
> Added 'master' option to 'ip link show' command
> to filter devices by master dev.
> 
> Signed-off-by: Vadim Kochan <vadim4j@gmail.com>
> ---
>  ip/ipaddress.c        | 16 ++++++++++++++++
>  ip/iplink.c           |  2 +-
>  man/man8/ip-link.8.in |  9 ++++++++-
>  3 files changed, 25 insertions(+), 2 deletions(-)
> 
> diff --git a/ip/ipaddress.c b/ip/ipaddress.c
> index 45729d8..8a0e2ab 100644
> --- a/ip/ipaddress.c
> +++ b/ip/ipaddress.c
> @@ -56,6 +56,7 @@ static struct
>  	int flushp;
>  	int flushe;
>  	int group;
> +	int master;
>  } filter;
>  
>  static int do_link;
> @@ -480,6 +481,14 @@ int print_linkinfo(const struct sockaddr_nl *who,
>  			return -1;
>  	}
>  
> +	if (tb[IFLA_MASTER]) {
> +		int master = *(int*)RTA_DATA(tb[IFLA_MASTER]);
> +		if (filter.master > 0 && master != filter.master)
> +			return -1;
> +	}
> +	else if (filter.master > 0)
> +		return -1;
> +
>  	if (n->nlmsg_type == RTM_DELLINK)
>  		fprintf(fp, "Deleted ");
>  
> @@ -1215,6 +1224,13 @@ static int ipaddr_list_flush_or_save(int argc, char **argv, int action)
>  			NEXT_ARG();
>  			if (rtnl_group_a2n(&filter.group, *argv))
>  				invarg("Invalid \"group\" value\n", *argv);
> +		} else if (strcmp(*argv, "master") == 0) {
> +			int ifindex;
> +			NEXT_ARG();
> +			ifindex = ll_name_to_index(*argv);
> +			if (!ifindex)
> +				invarg("Device does not exist\n", *argv);
> +			filter.master = ifindex;
>  		} else {
>  			if (strcmp(*argv, "dev") == 0) {
>  				NEXT_ARG();
> diff --git a/ip/iplink.c b/ip/iplink.c
> index 43b26f4..ce6eb3e 100644
> --- a/ip/iplink.c
> +++ b/ip/iplink.c
> @@ -82,7 +82,7 @@ void iplink_usage(void)
>  	fprintf(stderr, "			  [ master DEVICE ]\n");
>  	fprintf(stderr, "			  [ nomaster ]\n");
>  	fprintf(stderr, "			  [ addrgenmode { eui64 | none } ]\n");
> -	fprintf(stderr, "       ip link show [ DEVICE | group GROUP ] [up]\n");
> +	fprintf(stderr, "       ip link show [ DEVICE | group GROUP ] [up] [master DEV]\n");
>  
>  	if (iplink_have_newlink()) {
>  		fprintf(stderr, "       ip link help [ TYPE ]\n");
> diff --git a/man/man8/ip-link.8.in b/man/man8/ip-link.8.in
> index 383917a..279fe39 100644
> --- a/man/man8/ip-link.8.in
> +++ b/man/man8/ip-link.8.in
> @@ -144,7 +144,9 @@ ip-link \- network device configuration
>  .B ip link show
>  .RI "[ " DEVICE " | "
>  .B group
> -.IR GROUP " ]"
> +.IR GROUP " | "
> +.B master
> +.IR DEVICE " ]"
>  
>  .SH "DESCRIPTION"
>  .SS ip link add - add virtual link
> @@ -658,6 +660,11 @@ specifies what group of devices to show.
>  .B up
>  only display running interfaces.
>  
> +.TP
> +.BI master " DEVICE "
> +.I DEVICE
> +specifies the master device which enslaves devices to show.
> +
>  .SH "EXAMPLES"
>  .PP
>  ip link show
> -- 
> 2.1.0
> 

Please reject this patch, I will send v2 because of conflicts with
'master' branch.

Regards,

^ permalink raw reply

* [PATCH RESEND v2] ipv4: Do not cache routing failures due to disabled forwarding.
From: Nicolas Cavallari @ 2014-10-30  9:09 UTC (permalink / raw)
  To: David S. Miller, Alexey Kuznetsov, James Morris,
	Hideaki YOSHIFUJI, Patrick McHardy
  Cc: netdev, linux-kernel
In-Reply-To: <20141029.150328.530876391340346443.davem@davemloft.net>

If we cache them, the kernel will reuse them, independently of
whether forwarding is enabled or not.  Which means that if forwarding is
disabled on the input interface where the first routing request comes
from, then that unreachable result will be cached and reused for
other interfaces, even if forwarding is enabled on them.  The opposite
is also true.

This can be verified with two interfaces A and B and an output interface
C, where B has forwarding enabled, but not A and trying
ip route get $dst iif A from $src && ip route get $dst iif B from $src

Signed-off-by: Nicolas Cavallari <nicolas.cavallari@green-communications.fr>
Reviewed-by: Julian Anastasov <ja@ssi.bg>
---
> Sorry Nicolas, this seems to have fallen on the floor.  Could you please
> resubmit your most uptodate version of this patch so I can apply it?

Here you are.

diff --git a/net/ipv4/route.c b/net/ipv4/route.c
index 2d4ae46..6a2155b 100644
--- a/net/ipv4/route.c
+++ b/net/ipv4/route.c
@@ -1798,6 +1798,7 @@ local_input:
 no_route:
 	RT_CACHE_STAT_INC(in_no_route);
 	res.type = RTN_UNREACHABLE;
+	res.fi = NULL;
 	goto local_input;
 
 	/*
-- 
2.1.1

^ permalink raw reply related

* [PATCH iproute2 v2] ip link: Allow to filter devices by master dev
From: Vadim Kochan @ 2014-10-30  9:02 UTC (permalink / raw)
  To: netdev; +Cc: Vadim Kochan

Added 'master' option to 'ip link show' command
to filter devices by master dev.

Signed-off-by: Vadim Kochan <vadim4j@gmail.com>
---
 ip/ipaddress.c        | 16 ++++++++++++++++
 ip/iplink.c           |  2 +-
 man/man8/ip-link.8.in | 12 +++++++++---
 3 files changed, 26 insertions(+), 4 deletions(-)

diff --git a/ip/ipaddress.c b/ip/ipaddress.c
index 45729d8..8a0e2ab 100644
--- a/ip/ipaddress.c
+++ b/ip/ipaddress.c
@@ -56,6 +56,7 @@ static struct
 	int flushp;
 	int flushe;
 	int group;
+	int master;
 } filter;
 
 static int do_link;
@@ -480,6 +481,14 @@ int print_linkinfo(const struct sockaddr_nl *who,
 			return -1;
 	}
 
+	if (tb[IFLA_MASTER]) {
+		int master = *(int*)RTA_DATA(tb[IFLA_MASTER]);
+		if (filter.master > 0 && master != filter.master)
+			return -1;
+	}
+	else if (filter.master > 0)
+		return -1;
+
 	if (n->nlmsg_type == RTM_DELLINK)
 		fprintf(fp, "Deleted ");
 
@@ -1215,6 +1224,13 @@ static int ipaddr_list_flush_or_save(int argc, char **argv, int action)
 			NEXT_ARG();
 			if (rtnl_group_a2n(&filter.group, *argv))
 				invarg("Invalid \"group\" value\n", *argv);
+		} else if (strcmp(*argv, "master") == 0) {
+			int ifindex;
+			NEXT_ARG();
+			ifindex = ll_name_to_index(*argv);
+			if (!ifindex)
+				invarg("Device does not exist\n", *argv);
+			filter.master = ifindex;
 		} else {
 			if (strcmp(*argv, "dev") == 0) {
 				NEXT_ARG();
diff --git a/ip/iplink.c b/ip/iplink.c
index 43b26f4..ce6eb3e 100644
--- a/ip/iplink.c
+++ b/ip/iplink.c
@@ -82,7 +82,7 @@ void iplink_usage(void)
 	fprintf(stderr, "			  [ master DEVICE ]\n");
 	fprintf(stderr, "			  [ nomaster ]\n");
 	fprintf(stderr, "			  [ addrgenmode { eui64 | none } ]\n");
-	fprintf(stderr, "       ip link show [ DEVICE | group GROUP ] [up]\n");
+	fprintf(stderr, "       ip link show [ DEVICE | group GROUP ] [up] [master DEV]\n");
 
 	if (iplink_have_newlink()) {
 		fprintf(stderr, "       ip link help [ TYPE ]\n");
diff --git a/man/man8/ip-link.8.in b/man/man8/ip-link.8.in
index 464009d..ce00119 100644
--- a/man/man8/ip-link.8.in
+++ b/man/man8/ip-link.8.in
@@ -144,9 +144,10 @@ ip-link \- network device configuration
 .B ip link show
 .RI "[ " DEVICE " | "
 .B group
-.IR GROUP " |"
-.B up
-]
+.IR GROUP " | "
+.BR up " | "
+.B master
+.IR DEVICE " ]"
 
 .SH "DESCRIPTION"
 .SS ip link add - add virtual link
@@ -660,6 +661,11 @@ specifies what group of devices to show.
 .B up
 only display running interfaces.
 
+.TP
+.BI master " DEVICE "
+.I DEVICE
+specifies the master device which enslaves devices to show.
+
 .SH "EXAMPLES"
 .PP
 ip link show
-- 
2.1.0

^ permalink raw reply related

* [PATCH v3 1/1] ip-link: add switch to show human readable output
From: Christian Hesse @ 2014-10-30  9:16 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: netdev, Christian Hesse
In-Reply-To: <20141029224738.263e27bd@urahara>

Byte and packet count can increase to really big numbers. This adds a
switch to show human readable output.

% ip -s link ls en
3: en: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000
    link/ether 00:de:ad:be:ee:ef brd ff:ff:ff:ff:ff:ff
    RX: bytes  packets  errors  dropped overrun mcast
    48494310   141370   0       196     0       0
    TX: bytes  packets  errors  dropped carrier collsns
    153830639  180773   0       0       0       0
% ip -s -h link ls en
3: en: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000
    link/ether 00:de:ad:be:ee:ef brd ff:ff:ff:ff:ff:ff
    RX: bytes  packets  errors  dropped overrun mcast
    46.3M      138.8K   0       198     0       0
    TX: bytes  packets  errors  dropped carrier collsns
    148.1M     177.7K   0       0       0       0
---
 include/utils.h       |   1 +
 ip/ip.c               |   5 +
 ip/ipaddress.c        | 279 ++++++++++++++++++++++++++++++++++++++------------
 man/man8/ip-link.8.in |   1 +
 4 files changed, 220 insertions(+), 66 deletions(-)

diff --git a/include/utils.h b/include/utils.h
index 704dc51..7bb19e9 100644
--- a/include/utils.h
+++ b/include/utils.h
@@ -11,6 +11,7 @@
 #include "rtm_map.h"
 
 extern int preferred_family;
+extern int human_readable;
 extern int show_stats;
 extern int show_details;
 extern int show_raw;
diff --git a/ip/ip.c b/ip/ip.c
index 739b88d..6b352c8 100644
--- a/ip/ip.c
+++ b/ip/ip.c
@@ -24,6 +24,7 @@
 #include "ip_common.h"
 
 int preferred_family = AF_UNSPEC;
+int human_readable = 0;
 int show_stats = 0;
 int show_details = 0;
 int resolve_hosts = 0;
@@ -47,6 +48,7 @@ static void usage(void)
 "                   tunnel | tuntap | maddr | mroute | mrule | monitor | xfrm |\n"
 "                   netns | l2tp | tcp_metrics | token | netconf }\n"
 "       OPTIONS := { -V[ersion] | -s[tatistics] | -d[etails] | -r[esolve] |\n"
+"                    -h[uman-readable] |\n"
 "                    -f[amily] { inet | inet6 | ipx | dnet | bridge | link } |\n"
 "                    -4 | -6 | -I | -D | -B | -0 |\n"
 "                    -l[oops] { maximum-addr-flush-attempts } |\n"
@@ -212,6 +214,9 @@ int main(int argc, char **argv)
 			preferred_family = AF_DECnet;
 		} else if (strcmp(opt, "-B") == 0) {
 			preferred_family = AF_BRIDGE;
+		} else if (matches(opt, "-human") == 0 ||
+			   matches(opt, "-human-readable") == 0) {
+			++human_readable;
 		} else if (matches(opt, "-stats") == 0 ||
 			   matches(opt, "-statistics") == 0) {
 			++show_stats;
diff --git a/ip/ipaddress.c b/ip/ipaddress.c
index 45729d8..dcf31c0 100644
--- a/ip/ipaddress.c
+++ b/ip/ipaddress.c
@@ -319,107 +319,254 @@ static void print_vfinfo(FILE *fp, struct rtattr *vfinfo)
 	}
 }
 
+static void print_human64(FILE *fp, int length, uint64_t count)
+{
+	int written;
+
+	if (count > 1125899906842624) /* 2**50 */
+		written = fprintf(fp, "%"PRIu64".%"PRIu64"P",
+				count / 1125899906842624,
+				count * 10 / 1125899906842624 % 10);
+	else if (count > 1099511627776) /* 2**40 */
+		written = fprintf(fp, "%"PRIu64".%"PRIu64"T",
+				count / 1099511627776,
+				count * 10 / 1099511627776 % 10);
+	else if (count > 1073741824) /* 2**30 */
+		written = fprintf(fp, "%"PRIu64".%"PRIu64"G",
+				count / 1073741824, count * 10 / 1073741824 % 10);
+	else if (count > 1048576) /* 2**20 */
+		written = fprintf(fp, "%"PRIu64".%"PRIu64"M",
+				count / 1048576, count * 10 / 1048576 % 10);
+	else if (count > 1024) /* 2**10 */
+		written = fprintf(fp, "%"PRIu64".%"PRIu64"K",
+				count / 1024, count * 10 / 1024 % 10);
+	else
+		written = fprintf(fp, "%"PRIu64, count);
+
+	do {
+		fputc(' ', fp);
+	} while (written++ < length);
+}
+
+static void print_human32(FILE *fp, int length, uint32_t count)
+{
+	int written;
+
+	if (count > 1073741824) /* 2**30 */
+		written = fprintf(fp, "%u.%uG",
+				count / 1073741824, count * 10 / 1073741824 % 10);
+	else if (count > 1048576) /* 2**20 */
+		written = fprintf(fp, "%u.%uM",
+				count / 1048576, count * 10 / 1048576 % 10);
+	else if (count > 1024) /* 2**10 */
+		written = fprintf(fp, "%u.%uK",
+				count / 1024, count * 10 / 1024 % 10);
+	else
+		written = fprintf(fp, "%u", count);
+
+	do {
+		fputc(' ', fp);
+	} while (written++ < length);
+}
+
 static void print_link_stats64(FILE *fp, const struct rtnl_link_stats64 *s,
                                const struct rtattr *carrier_changes)
 {
+	/* RX stats */
 	fprintf(fp, "    RX: bytes  packets  errors  dropped overrun mcast   %s%s",
 		s->rx_compressed ? "compressed" : "", _SL_);
-	fprintf(fp, "    %-10"PRIu64" %-8"PRIu64" %-7"PRIu64" %-7"PRIu64" %-7"PRIu64" %-7"PRIu64"",
-		(uint64_t)s->rx_bytes,
-		(uint64_t)s->rx_packets,
-		(uint64_t)s->rx_errors,
-		(uint64_t)s->rx_dropped,
-		(uint64_t)s->rx_over_errors,
-		(uint64_t)s->multicast);
-	if (s->rx_compressed)
-		fprintf(fp, " %-7"PRIu64"",
-			(uint64_t)s->rx_compressed);
+	if (human_readable) {
+		fprintf(fp, "    ");
+		print_human64(fp, 10, (uint64_t)s->rx_bytes);
+		print_human64(fp, 8, (uint64_t)s->rx_packets);
+		print_human64(fp, 7, (uint64_t)s->rx_errors);
+		print_human64(fp, 7, (uint64_t)s->rx_dropped);
+		print_human64(fp, 7, (uint64_t)s->rx_over_errors);
+		print_human64(fp, 7, (uint64_t)s->multicast);
+		if (s->rx_compressed)
+			print_human64(fp, 7, (uint64_t)s->rx_compressed);
+	} else {
+		fprintf(fp, "    %-10"PRIu64" %-8"PRIu64" %-7"PRIu64" %-7"PRIu64" %-7"PRIu64" %-7"PRIu64"",
+			(uint64_t)s->rx_bytes,
+			(uint64_t)s->rx_packets,
+			(uint64_t)s->rx_errors,
+			(uint64_t)s->rx_dropped,
+			(uint64_t)s->rx_over_errors,
+			(uint64_t)s->multicast);
+		if (s->rx_compressed)
+			fprintf(fp, " %-7"PRIu64"",
+				(uint64_t)s->rx_compressed);
+	}
+
+	/* RX error stats */
 	if (show_stats > 1) {
 		fprintf(fp, "%s", _SL_);
-		fprintf(fp, "    RX errors: length  crc     frame   fifo    missed%s", _SL_);
-		fprintf(fp, "               %-7"PRIu64"  %-7"PRIu64" %-7"PRIu64" %-7"PRIu64" %-7"PRIu64"",
-			(uint64_t)s->rx_length_errors,
-			(uint64_t)s->rx_crc_errors,
-			(uint64_t)s->rx_frame_errors,
-			(uint64_t)s->rx_fifo_errors,
-			(uint64_t)s->rx_missed_errors);
+		fprintf(fp, "    RX errors: length   crc     frame   fifo    missed%s", _SL_);
+		if (human_readable) {
+			fprintf(fp, "               ");
+			print_human64(fp, 8, (uint64_t)s->rx_length_errors);
+			print_human64(fp, 7, (uint64_t)s->rx_crc_errors);
+			print_human64(fp, 7, (uint64_t)s->rx_frame_errors);
+			print_human64(fp, 7, (uint64_t)s->rx_fifo_errors);
+			print_human64(fp, 7, (uint64_t)s->rx_missed_errors);
+		} else {
+			fprintf(fp, "               %-8"PRIu64" %-7"PRIu64" %-7"PRIu64" %-7"PRIu64" %-7"PRIu64"",
+				(uint64_t)s->rx_length_errors,
+				(uint64_t)s->rx_crc_errors,
+				(uint64_t)s->rx_frame_errors,
+				(uint64_t)s->rx_fifo_errors,
+				(uint64_t)s->rx_missed_errors);
+		}
 	}
 	fprintf(fp, "%s", _SL_);
+
+	/* TX stats */
 	fprintf(fp, "    TX: bytes  packets  errors  dropped carrier collsns %s%s",
 		(uint64_t)s->tx_compressed ? "compressed" : "", _SL_);
-	fprintf(fp, "    %-10"PRIu64" %-8"PRIu64" %-7"PRIu64" %-7"PRIu64" %-7"PRIu64" %-7"PRIu64"",
-		(uint64_t)s->tx_bytes,
-		(uint64_t)s->tx_packets,
-		(uint64_t)s->tx_errors,
-		(uint64_t)s->tx_dropped,
-		(uint64_t)s->tx_carrier_errors,
-		(uint64_t)s->collisions);
-	if (s->tx_compressed)
-		fprintf(fp, " %-7"PRIu64"",
-			(uint64_t)s->tx_compressed);
+	if (human_readable) {
+		fprintf(fp, "    ");
+		print_human64(fp, 10, (uint64_t)s->tx_bytes);
+		print_human64(fp, 8, (uint64_t)s->tx_packets);
+		print_human64(fp, 7, (uint64_t)s->tx_errors);
+		print_human64(fp, 7, (uint64_t)s->tx_dropped);
+		print_human64(fp, 7, (uint64_t)s->tx_carrier_errors);
+		print_human64(fp, 7, (uint64_t)s->collisions);
+		if (s->tx_compressed)
+			print_human64(fp, 7, (uint64_t)s->tx_compressed);
+	} else {
+		fprintf(fp, "    %-10"PRIu64" %-8"PRIu64" %-7"PRIu64" %-7"PRIu64" %-7"PRIu64" %-7"PRIu64"",
+			(uint64_t)s->tx_bytes,
+			(uint64_t)s->tx_packets,
+			(uint64_t)s->tx_errors,
+			(uint64_t)s->tx_dropped,
+			(uint64_t)s->tx_carrier_errors,
+			(uint64_t)s->collisions);
+		if (s->tx_compressed)
+			fprintf(fp, " %-7"PRIu64"",
+				(uint64_t)s->tx_compressed);
+	}
+
+	/* TX error stats */
 	if (show_stats > 1) {
 		fprintf(fp, "%s", _SL_);
-		fprintf(fp, "    TX errors: aborted fifo    window  heartbeat");
+		fprintf(fp, "    TX errors: aborted  fifo   window heartbeat");
                 if (carrier_changes)
 			fprintf(fp, " transns");
 		fprintf(fp, "%s", _SL_);
-		fprintf(fp, "               %-7"PRIu64"  %-7"PRIu64" %-7"PRIu64" %-8"PRIu64"",
-			(uint64_t)s->tx_aborted_errors,
-			(uint64_t)s->tx_fifo_errors,
-			(uint64_t)s->tx_window_errors,
-			(uint64_t)s->tx_heartbeat_errors);
-		if (carrier_changes)
-			fprintf(fp, " %-7u",
-				*(uint32_t*)RTA_DATA(carrier_changes));
+		if (human_readable) {
+			fprintf(fp, "               ");
+			print_human64(fp, 8, (uint64_t)s->tx_aborted_errors);
+			print_human64(fp, 7, (uint64_t)s->tx_fifo_errors);
+			print_human64(fp, 7, (uint64_t)s->tx_window_errors);
+			print_human64(fp, 7, (uint64_t)s->tx_heartbeat_errors);
+			if (carrier_changes)
+				print_human64(fp, 7, (uint64_t)*(uint32_t*)RTA_DATA(carrier_changes));
+		} else {
+			fprintf(fp, "               %-8"PRIu64" %-7"PRIu64" %-7"PRIu64" %-7"PRIu64"",
+				(uint64_t)s->tx_aborted_errors,
+				(uint64_t)s->tx_fifo_errors,
+				(uint64_t)s->tx_window_errors,
+				(uint64_t)s->tx_heartbeat_errors);
+			if (carrier_changes)
+				fprintf(fp, " %-7u",
+					*(uint32_t*)RTA_DATA(carrier_changes));
+		}
 	}
 }
 
 static void print_link_stats32(FILE *fp, const struct rtnl_link_stats *s,
 			       const struct rtattr *carrier_changes)
 {
+	/* RX stats */
 	fprintf(fp, "    RX: bytes  packets  errors  dropped overrun mcast   %s%s",
 		s->rx_compressed ? "compressed" : "", _SL_);
-	fprintf(fp, "    %-10u %-8u %-7u %-7u %-7u %-7u",
-		s->rx_bytes, s->rx_packets, s->rx_errors,
-		s->rx_dropped, s->rx_over_errors,
-		s->multicast
-		);
-	if (s->rx_compressed)
-		fprintf(fp, " %-7u", s->rx_compressed);
+	if (human_readable) {
+		fprintf(fp, "    ");
+		print_human32(fp, 10, s->rx_bytes);
+		print_human32(fp, 8, s->rx_packets);
+		print_human32(fp, 7, s->rx_errors);
+		print_human32(fp, 7, s->rx_dropped);
+		print_human32(fp, 7, s->rx_over_errors);
+		print_human32(fp, 7, s->multicast);
+		if (s->rx_compressed)
+			print_human32(fp, 7, s->rx_compressed);
+	} else {
+		fprintf(fp, "    %-10u %-8u %-7u %-7u %-7u %-7u",
+			s->rx_bytes, s->rx_packets, s->rx_errors,
+			s->rx_dropped, s->rx_over_errors,
+			s->multicast);
+		if (s->rx_compressed)
+			fprintf(fp, " %-7u", s->rx_compressed);
+	}
+
+	/* RX error stats */
 	if (show_stats > 1) {
 		fprintf(fp, "%s", _SL_);
-		fprintf(fp, "    RX errors: length  crc     frame   fifo    missed%s", _SL_);
-		fprintf(fp, "               %-7u  %-7u %-7u %-7u %-7u",
-			s->rx_length_errors,
-			s->rx_crc_errors,
-			s->rx_frame_errors,
-			s->rx_fifo_errors,
-			s->rx_missed_errors
-			);
+		fprintf(fp, "    RX errors: length   crc     frame   fifo    missed%s", _SL_);
+		if (human_readable) {
+			fprintf(fp, "               ");
+			print_human32(fp, 8, s->rx_length_errors);
+			print_human32(fp, 7, s->rx_crc_errors);
+			print_human32(fp, 7, s->rx_frame_errors);
+			print_human32(fp, 7, s->rx_fifo_errors);
+			print_human32(fp, 7, s->rx_missed_errors);
+		} else {
+			fprintf(fp, "               %-8u %-7u %-7u %-7u %-7u",
+				s->rx_length_errors,
+				s->rx_crc_errors,
+				s->rx_frame_errors,
+				s->rx_fifo_errors,
+				s->rx_missed_errors);
+		}
 	}
 	fprintf(fp, "%s", _SL_);
+
+	/* TX stats */
 	fprintf(fp, "    TX: bytes  packets  errors  dropped carrier collsns %s%s",
 		s->tx_compressed ? "compressed" : "", _SL_);
-	fprintf(fp, "    %-10u %-8u %-7u %-7u %-7u %-7u",
-		s->tx_bytes, s->tx_packets, s->tx_errors,
-		s->tx_dropped, s->tx_carrier_errors, s->collisions);
-	if (s->tx_compressed)
-		fprintf(fp, " %-7u", s->tx_compressed);
+	if (human_readable) {
+		fprintf(fp, "    ");
+		print_human32(fp, 10, s->tx_bytes);
+		print_human32(fp, 8, s->tx_packets);
+		print_human32(fp, 7, s->tx_errors);
+		print_human32(fp, 7, s->tx_dropped);
+		print_human32(fp, 7, s->tx_carrier_errors);
+		print_human32(fp, 7, s->collisions);
+		if (s->tx_compressed)
+			print_human32(fp, 7, s->tx_compressed);
+	} else {
+		fprintf(fp, "    %-10u %-8u %-7u %-7u %-7u %-7u",
+			s->tx_bytes, s->tx_packets, s->tx_errors,
+			s->tx_dropped, s->tx_carrier_errors, s->collisions);
+		if (s->tx_compressed)
+			fprintf(fp, " %-7u", s->tx_compressed);
+	}
+
+	/* TX error stats */
 	if (show_stats > 1) {
 		fprintf(fp, "%s", _SL_);
-		fprintf(fp, "    TX errors: aborted fifo    window  heartbeat");
+		fprintf(fp, "    TX errors: aborted  fifo   window heartbeat");
                 if (carrier_changes)
 			fprintf(fp, " transns");
 		fprintf(fp, "%s", _SL_);
-		fprintf(fp, "               %-7u  %-7u %-7u %-8u",
-			s->tx_aborted_errors,
-			s->tx_fifo_errors,
-			s->tx_window_errors,
-			s->tx_heartbeat_errors
-			);
-		if (carrier_changes)
-			fprintf(fp, " %-7u",
-				*(uint32_t*)RTA_DATA(carrier_changes));
+		if (human_readable) {
+			fprintf(fp, "               ");
+			print_human32(fp, 8, s->tx_aborted_errors);
+			print_human32(fp, 7, s->tx_fifo_errors);
+			print_human32(fp, 7, s->tx_window_errors);
+			print_human32(fp, 7, s->tx_heartbeat_errors);
+			if (carrier_changes)
+				print_human32(fp, 7, *(uint32_t*)RTA_DATA(carrier_changes));
+		} else {
+			fprintf(fp, "               %-8u %-7u %-7u %-7u",
+				s->tx_aborted_errors,
+				s->tx_fifo_errors,
+				s->tx_window_errors,
+				s->tx_heartbeat_errors);
+			if (carrier_changes)
+				fprintf(fp, " %-7u",
+					*(uint32_t*)RTA_DATA(carrier_changes));
+		}
 	}
 }
 
diff --git a/man/man8/ip-link.8.in b/man/man8/ip-link.8.in
index 464009d..b05c6d0 100644
--- a/man/man8/ip-link.8.in
+++ b/man/man8/ip-link.8.in
@@ -16,6 +16,7 @@ ip-link \- network device configuration
 .ti -8
 .IR OPTIONS " := { "
 \fB\-V\fR[\fIersion\fR] |
+\fB\-h\fR[\fIuman-readable\fR] |
 \fB\-s\fR[\fItatistics\fR] |
 \fB\-r\fR[\fIesolve\fR] |
 \fB\-f\fR[\fIamily\fR] {
-- 
2.1.3

^ permalink raw reply related

* [net-next 2/2] sctp: replace seq_printf with seq_puts
From: Michele Baldessari @ 2014-10-30  9:29 UTC (permalink / raw)
  To: Vlad Yasevich, Neil Horman
  Cc: linux-sctp, netdev, David S. Miller, Michele Baldessari
In-Reply-To: <1414661356-17255-1-git-send-email-michele@acksyn.org>

Fixes checkpatch warning:
"WARNING: Prefer seq_puts to seq_printf"

Signed-off-by: Michele Baldessari <michele@acksyn.org>
---
 net/sctp/proc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/net/sctp/proc.c b/net/sctp/proc.c
index bfb242af06ab..0697eda5aed8 100644
--- a/net/sctp/proc.c
+++ b/net/sctp/proc.c
@@ -490,14 +490,14 @@ static int sctp_remaddr_seq_show(struct seq_file *seq, void *v)
 			 * Note: We don't have a way to tally this at the moment
 			 * so lets just leave it as zero for the moment
 			 */
-			seq_printf(seq, "0 ");
+			seq_puts(seq, "0 ");
 
 			/*
 			 * remote address start time (START).  This is also not
 			 * currently implemented, but we can record it with a
 			 * jiffies marker in a subsequent patch
 			 */
-			seq_printf(seq, "0 ");
+			seq_puts(seq, "0 ");
 
 			/*
 			 * The current state of this destination. I.e.
-- 
2.1.0

^ permalink raw reply related

* [net-next 1/2] sctp: add transport state in /proc/net/sctp/remaddr
From: Michele Baldessari @ 2014-10-30  9:29 UTC (permalink / raw)
  To: Vlad Yasevich, Neil Horman
  Cc: linux-sctp, netdev, David S. Miller, Michele Baldessari

It is often quite helpful to be able to know the state of a transport
outside of the application itself (for troubleshooting purposes or for
monitoring purposes). Add it under /proc/net/sctp/remaddr.

Signed-off-by: Michele Baldessari <michele@acksyn.org>
---
 net/sctp/proc.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/net/sctp/proc.c b/net/sctp/proc.c
index 34229ee7f379..bfb242af06ab 100644
--- a/net/sctp/proc.c
+++ b/net/sctp/proc.c
@@ -417,7 +417,7 @@ static void *sctp_remaddr_seq_start(struct seq_file *seq, loff_t *pos)
 
 	if (*pos == 0)
 		seq_printf(seq, "ADDR ASSOC_ID HB_ACT RTO MAX_PATH_RTX "
-				"REM_ADDR_RTX  START\n");
+				"REM_ADDR_RTX START STATE\n");
 
 	return (void *)pos;
 }
@@ -497,7 +497,13 @@ static int sctp_remaddr_seq_show(struct seq_file *seq, void *v)
 			 * currently implemented, but we can record it with a
 			 * jiffies marker in a subsequent patch
 			 */
-			seq_printf(seq, "0");
+			seq_printf(seq, "0 ");
+
+			/*
+			 * The current state of this destination. I.e.
+			 * SCTP_ACTIVE, SCTP_INACTIVE, ...
+			 */
+			seq_printf(seq, "%d", tsp->state);
 
 			seq_printf(seq, "\n");
 		}
-- 
2.1.0

^ permalink raw reply related

* [PATCH] stmmac: pci: set default of the filter bins
From: Andy Shevchenko @ 2014-10-30  9:39 UTC (permalink / raw)
  To: Giuseppe Cavallaro, netdev, Kweh Hock Leong, David S . Miller,
	Vince Bridgers
  Cc: Andy Shevchenko

The commit 3b57de958e2a brought the support for a different amount of the
filter bins, but didn't update the PCI driver accordingly. This patch appends
the default values when the device is enumerated via PCI bus.

Fixes: 3b57de958e2a (net: stmmac: Support devicetree configs for mcast and ucast filter entries)
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c
index 655a23b..7fc1bbf 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c
@@ -32,7 +32,10 @@ static struct stmmac_dma_cfg dma_cfg;
 
 static void stmmac_default_data(void)
 {
+	struct plat_stmmacenet_data *plat = &plat_dat;
+
 	memset(&plat_dat, 0, sizeof(struct plat_stmmacenet_data));
+
 	plat_dat.bus_id = 1;
 	plat_dat.phy_addr = 0;
 	plat_dat.interface = PHY_INTERFACE_MODE_GMII;
@@ -47,6 +50,12 @@ static void stmmac_default_data(void)
 	dma_cfg.pbl = 32;
 	dma_cfg.burst_len = DMA_AXI_BLEN_256;
 	plat_dat.dma_cfg = &dma_cfg;
+
+	/* Set default value for multicast hash bins */
+	plat->multicast_filter_bins = HASH_TABLE_SIZE;
+
+	/* Set default value for unicast filter entries */
+	plat->unicast_filter_entries = 1;
 }
 
 /**
-- 
2.1.1

^ permalink raw reply related

* Re: [PATCH 0/5] stmmac: pci: various cleanups and fixes
From: Andy Shevchenko @ 2014-10-30  9:41 UTC (permalink / raw)
  To: Giuseppe CAVALLARO
  Cc: netdev, Kweh Hock Leong, David S. Miller, Vince Bridgers
In-Reply-To: <5451F32C.8060403@st.com>

On Thu, 2014-10-30 at 09:13 +0100, Giuseppe CAVALLARO wrote:
> On 10/21/2014 6:35 PM, Andy Shevchenko wrote:
> > There are few cleanups and fixes regarding to stmmac PCI driver.
> > This has been tested on Intel Galileo board with 3.18-rc1 kernel.
> 
> Hello Andy,
> 
> for your next version I think that the patches should be for net-next
> tree.
> Maybe the following for net.git: "stmmac: pci: set default filter bins"
> 
> I kindly ask you to detail fix and cleanup.

I just send the fix as a separate patch.

I'm going to reshuffle the others and maybe introduce few more. I would
like to get this soon since it would be a good base to go with Quark
support further.

> 
> peppe
> 
> >
> > Andy Shevchenko (5):
> >    stmmac: pci: convert to use dev_pm_ops
> >    stmmac: pci: use managed resources
> >    stmmac: pci: convert to use dev_* macros
> >    stmmac: pci: set default filter bins
> >    stmmac: pci: remove FSF address
> >
> >   drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c | 92 ++++++++----------------
> >   1 file changed, 30 insertions(+), 62 deletions(-)
> >
> 


-- 
Andy Shevchenko <andriy.shevchenko@intel.com>
Intel Finland Oy

^ permalink raw reply

* Re: [PATCH v1 1/2] dtb: xgene: fix: Disable 10GbE and SGMII based 1GbE by default
From: Arnd Bergmann @ 2014-10-30 10:13 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: Iyappan Subramanian, davem, netdev, devicetree, kchudgar, patches
In-Reply-To: <1414630580-24640-2-git-send-email-isubramanian@apm.com>

On Wednesday 29 October 2014 17:56:19 Iyappan Subramanian wrote:
> @@ -621,7 +621,7 @@
>                         };
>                 };
>  
> -               sgenet0: ethernet@1f210000 {
> +               sgenet0: sgenet@1f210000 {
>                         compatible = "apm,xgene-enet";
>                         status = "disabled";
>                         reg = <0x0 0x1f210000 0x0 0x10000>,
> 

This looks like you accidentally reverted a bug fix made earlier.
Network devices should always have the name 'ethernet@...'.

	Arnd

^ permalink raw reply

* Re: [net-next 1/2] sctp: add transport state in /proc/net/sctp/remaddr
From: Neil Horman @ 2014-10-30 10:24 UTC (permalink / raw)
  To: Michele Baldessari; +Cc: Vlad Yasevich, linux-sctp, netdev, David S. Miller
In-Reply-To: <1414661356-17255-1-git-send-email-michele@acksyn.org>

On Thu, Oct 30, 2014 at 10:29:15AM +0100, Michele Baldessari wrote:
> It is often quite helpful to be able to know the state of a transport
> outside of the application itself (for troubleshooting purposes or for
> monitoring purposes). Add it under /proc/net/sctp/remaddr.
> 
> Signed-off-by: Michele Baldessari <michele@acksyn.org>
> ---
>  net/sctp/proc.c | 10 ++++++++--
>  1 file changed, 8 insertions(+), 2 deletions(-)
> 
> diff --git a/net/sctp/proc.c b/net/sctp/proc.c
> index 34229ee7f379..bfb242af06ab 100644
> --- a/net/sctp/proc.c
> +++ b/net/sctp/proc.c
> @@ -417,7 +417,7 @@ static void *sctp_remaddr_seq_start(struct seq_file *seq, loff_t *pos)
>  
>  	if (*pos == 0)
>  		seq_printf(seq, "ADDR ASSOC_ID HB_ACT RTO MAX_PATH_RTX "
> -				"REM_ADDR_RTX  START\n");
> +				"REM_ADDR_RTX START STATE\n");
>  
>  	return (void *)pos;
>  }
> @@ -497,7 +497,13 @@ static int sctp_remaddr_seq_show(struct seq_file *seq, void *v)
>  			 * currently implemented, but we can record it with a
>  			 * jiffies marker in a subsequent patch
>  			 */
> -			seq_printf(seq, "0");
> +			seq_printf(seq, "0 ");
> +
> +			/*
> +			 * The current state of this destination. I.e.
> +			 * SCTP_ACTIVE, SCTP_INACTIVE, ...
> +			 */
> +			seq_printf(seq, "%d", tsp->state);
>  
>  			seq_printf(seq, "\n");
>  		}
> -- 
> 2.1.0
> 
> 
Acked-by: Neil Horman <nhorman@tuxdriver.com>

^ permalink raw reply

* [PATCH] net: gianfar: fix dma check map error when DMA_API_DEBUG is enabled
From: Kevin Hao @ 2014-10-30 10:25 UTC (permalink / raw)
  To: netdev; +Cc: David Miller, Claudiu Manoil

We need to use dma_mapping_error() to check the dma address returned
by dma_map_single/page(). Otherwise we would get warning like this:
  WARNING: at lib/dma-debug.c:1140
  Modules linked in:
  CPU: 0 PID: 0 Comm: swapper/0 Not tainted 3.18.0-rc2-next-20141029 #196
  task: c0834300 ti: effe6000 task.ti: c0874000
  NIP: c02b2c98 LR: c02b2c98 CTR: c030abc4
  REGS: effe7d70 TRAP: 0700   Not tainted  (3.18.0-rc2-next-20141029)
  MSR: 00021000 <CE,ME>  CR: 22044022  XER: 20000000

  GPR00: c02b2c98 effe7e20 c0834300 00000098 00021000 00000000 c030b898 00000003
  GPR08: 00000001 00000000 00000001 749eec9d 22044022 1001abe0 00000020 ef278678
  GPR16: ef278670 ef278668 ef278660 070a8040 c087f99c c08cdc60 00029000 c0840d44
  GPR24: c08be6e8 c0840000 effe7e78 ef041340 00000600 ef114e10 00000000 c08be6e0
  NIP [c02b2c98] check_unmap+0x51c/0x9e4
  LR [c02b2c98] check_unmap+0x51c/0x9e4
  Call Trace:
  [effe7e20] [c02b2c98] check_unmap+0x51c/0x9e4 (unreliable)
  [effe7e70] [c02b31d8] debug_dma_unmap_page+0x78/0x8c
  [effe7ed0] [c03d1640] gfar_clean_rx_ring+0x208/0x488
  [effe7f40] [c03d1a9c] gfar_poll_rx_sq+0x3c/0xa8
  [effe7f60] [c04f8714] net_rx_action+0xc0/0x178
  [effe7f90] [c00435a0] __do_softirq+0x100/0x1fc
  [effe7fe0] [c0043958] irq_exit+0xa4/0xc8
  [effe7ff0] [c000d14c] call_do_irq+0x24/0x3c
  [c0875e90] [c00048a0] do_IRQ+0x8c/0xf8
  [c0875eb0] [c000ed10] ret_from_except+0x0/0x18

For TX, we need to unmap the pages which has already been mapped and
free the skb before return. For RX, just let the rxbdp as unempty.
We can retry to initialize it to empty in next round.

Signed-off-by: Kevin Hao <haokexin@gmail.com>
---
 drivers/net/ethernet/freescale/gianfar.c | 58 ++++++++++++++++++++++++++------
 1 file changed, 47 insertions(+), 11 deletions(-)

diff --git a/drivers/net/ethernet/freescale/gianfar.c b/drivers/net/ethernet/freescale/gianfar.c
index 4fdf0aa16978..04b647c4cef6 100644
--- a/drivers/net/ethernet/freescale/gianfar.c
+++ b/drivers/net/ethernet/freescale/gianfar.c
@@ -117,8 +117,8 @@ static void gfar_reset_task(struct work_struct *work);
 static void gfar_timeout(struct net_device *dev);
 static int gfar_close(struct net_device *dev);
 struct sk_buff *gfar_new_skb(struct net_device *dev);
-static void gfar_new_rxbdp(struct gfar_priv_rx_q *rx_queue, struct rxbd8 *bdp,
-			   struct sk_buff *skb);
+static int gfar_new_rxbdp(struct gfar_priv_rx_q *rx_queue, struct rxbd8 *bdp,
+			  struct sk_buff *skb);
 static int gfar_set_mac_address(struct net_device *dev);
 static int gfar_change_mtu(struct net_device *dev, int new_mtu);
 static irqreturn_t gfar_error(int irq, void *dev_id);
@@ -219,9 +219,13 @@ static int gfar_init_bds(struct net_device *ndev)
 					netdev_err(ndev, "Can't allocate RX buffers\n");
 					return -ENOMEM;
 				}
-				rx_queue->rx_skbuff[j] = skb;
 
-				gfar_new_rxbdp(rx_queue, rxbdp, skb);
+				if (gfar_new_rxbdp(rx_queue, rxbdp, skb)) {
+					dev_kfree_skb_any(skb);
+					skb = NULL;
+				}
+
+				rx_queue->rx_skbuff[j] = skb;
 			}
 
 			rxbdp++;
@@ -2290,6 +2294,8 @@ static int gfar_start_xmit(struct sk_buff *skb, struct net_device *dev)
 						   0,
 						   frag_len,
 						   DMA_TO_DEVICE);
+			if (unlikely(dma_mapping_error(priv->dev, bufaddr)))
+				goto dma_map_err;
 
 			/* set the TxBD length and buffer pointer */
 			txbdp->bufPtr = bufaddr;
@@ -2339,8 +2345,12 @@ static int gfar_start_xmit(struct sk_buff *skb, struct net_device *dev)
 		fcb->ptp = 1;
 	}
 
-	txbdp_start->bufPtr = dma_map_single(priv->dev, skb->data,
-					     skb_headlen(skb), DMA_TO_DEVICE);
+	bufaddr = dma_map_single(priv->dev, skb->data, skb_headlen(skb),
+				 DMA_TO_DEVICE);
+	if (unlikely(dma_mapping_error(priv->dev, bufaddr)))
+		goto dma_map_err;
+
+	txbdp_start->bufPtr = bufaddr;
 
 	/* If time stamping is requested one additional TxBD must be set up. The
 	 * first TxBD points to the FCB and must have a data length of
@@ -2406,6 +2416,25 @@ static int gfar_start_xmit(struct sk_buff *skb, struct net_device *dev)
 	spin_unlock_irqrestore(&tx_queue->txlock, flags);
 
 	return NETDEV_TX_OK;
+
+dma_map_err:
+	txbdp = next_txbd(txbdp_start, base, tx_queue->tx_ring_size);
+	if (do_tstamp)
+		txbdp = next_txbd(txbdp, base, tx_queue->tx_ring_size);
+	for (i = 0; i < nr_frags; i++) {
+		lstatus = txbdp->lstatus;
+		if (!(lstatus & BD_LFLAG(TXBD_READY)))
+			break;
+
+		txbdp->lstatus = lstatus & ~BD_LFLAG(TXBD_READY);
+		bufaddr = txbdp->bufPtr;
+		dma_unmap_page(priv->dev, bufaddr, txbdp->length,
+			       DMA_TO_DEVICE);
+		txbdp = next_txbd(txbdp, base, tx_queue->tx_ring_size);
+	}
+	gfar_wmb();
+	dev_kfree_skb_any(skb);
+	return NETDEV_TX_OK;
 }
 
 /* Stops the kernel queue, and halts the controller */
@@ -2606,8 +2635,8 @@ static void gfar_clean_tx_ring(struct gfar_priv_tx_q *tx_queue)
 	netdev_tx_completed_queue(txq, howmany, bytes_sent);
 }
 
-static void gfar_new_rxbdp(struct gfar_priv_rx_q *rx_queue, struct rxbd8 *bdp,
-			   struct sk_buff *skb)
+static int gfar_new_rxbdp(struct gfar_priv_rx_q *rx_queue, struct rxbd8 *bdp,
+			  struct sk_buff *skb)
 {
 	struct net_device *dev = rx_queue->dev;
 	struct gfar_private *priv = netdev_priv(dev);
@@ -2615,7 +2644,11 @@ static void gfar_new_rxbdp(struct gfar_priv_rx_q *rx_queue, struct rxbd8 *bdp,
 
 	buf = dma_map_single(priv->dev, skb->data,
 			     priv->rx_buffer_size, DMA_FROM_DEVICE);
+	if (dma_mapping_error(priv->dev, buf))
+		return -1;
+
 	gfar_init_rxbdp(rx_queue, bdp, buf);
+	return 0;
 }
 
 static struct sk_buff *gfar_alloc_skb(struct net_device *dev)
@@ -2851,10 +2884,13 @@ int gfar_clean_rx_ring(struct gfar_priv_rx_q *rx_queue, int rx_work_limit)
 
 		}
 
-		rx_queue->rx_skbuff[rx_queue->skb_currx] = newskb;
-
 		/* Setup the new bdp */
-		gfar_new_rxbdp(rx_queue, bdp, newskb);
+		if (gfar_new_rxbdp(rx_queue, bdp, newskb)) {
+			dev_kfree_skb_any(newskb);
+			newskb = NULL;
+		}
+
+		rx_queue->rx_skbuff[rx_queue->skb_currx] = newskb;
 
 		/* Update to the next pointer */
 		bdp = next_bd(bdp, base, rx_queue->rx_ring_size);
-- 
1.9.3

^ permalink raw reply related

* Re: [net-next 2/2] sctp: replace seq_printf with seq_puts
From: Neil Horman @ 2014-10-30 10:26 UTC (permalink / raw)
  To: Michele Baldessari; +Cc: Vlad Yasevich, linux-sctp, netdev, David S. Miller
In-Reply-To: <1414661356-17255-2-git-send-email-michele@acksyn.org>

On Thu, Oct 30, 2014 at 10:29:16AM +0100, Michele Baldessari wrote:
> Fixes checkpatch warning:
> "WARNING: Prefer seq_puts to seq_printf"
> 
> Signed-off-by: Michele Baldessari <michele@acksyn.org>
> ---
>  net/sctp/proc.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/net/sctp/proc.c b/net/sctp/proc.c
> index bfb242af06ab..0697eda5aed8 100644
> --- a/net/sctp/proc.c
> +++ b/net/sctp/proc.c
> @@ -490,14 +490,14 @@ static int sctp_remaddr_seq_show(struct seq_file *seq, void *v)
>  			 * Note: We don't have a way to tally this at the moment
>  			 * so lets just leave it as zero for the moment
>  			 */
> -			seq_printf(seq, "0 ");
> +			seq_puts(seq, "0 ");
>  
>  			/*
>  			 * remote address start time (START).  This is also not
>  			 * currently implemented, but we can record it with a
>  			 * jiffies marker in a subsequent patch
>  			 */
> -			seq_printf(seq, "0 ");
> +			seq_puts(seq, "0 ");
>  
>  			/*
>  			 * The current state of this destination. I.e.
> -- 
> 2.1.0
> 
> 
Acked-by: Neil Horman <nhorman@tuxdriver.com>

^ permalink raw reply

* Re: [PATCH 0/6 3.18] Fixes for iwlwifi drivers
From: Luca Coelho @ 2014-10-30 11:08 UTC (permalink / raw)
  To: Larry Finger
  Cc: linville-2XuSBdqkA4R54TAoqtyWWQ,
	linux-wireless-u79uwXL29TY76Z2rM5mHXA,
	netdev-u79uwXL29TY76Z2rM5mHXA, Murilo Opsfelder Araujo
In-Reply-To: <1414642633-3700-1-git-send-email-Larry.Finger-tQ5ms3gMjBLk1uMJSBkQmQ@public.gmane.org>

The cover-letter subject is wrong. :) I guess you meant
s/iwlwifi/rtlwifi/ ;)

--
Luca.

On Wed, 2014-10-29 at 23:17 -0500, Larry Finger wrote:
> Some late changes to rtlwifi made some of the older drivers not start correctly.
> These patches should be applied to 3.18.
> 
> Signed-off-by: Larry Finger <Larry.Finger-tQ5ms3gMjBLk1uMJSBkQmQ@public.gmane.org>
> Cc: Murilo Opsfelder Araujo <mopsfelder-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> 
> Larry Finger (6):
>   rtlwifi: rtl8192ce: rtl8192de: rtl8192se: Fix handling for missing
>     get_btc_status
>   rtlwifi: rtl8192se: Fix duplicate calls to ieee80211_register_hw()
>   rtlwifi: rtl8192se: Add missing section to read descriptor setting
>   rtlwifi: rtl8192ce: Add missing section to read descriptor setting
>   rtlwifi: rtl8821ae: Remove extra semicolons
>   rtlwifi: rtl8192se: Fix firmware loading
> 
>  drivers/net/wireless/rtlwifi/core.c          |  6 ++++++
>  drivers/net/wireless/rtlwifi/core.h          |  1 +
>  drivers/net/wireless/rtlwifi/rtl8192ce/def.h |  2 ++
>  drivers/net/wireless/rtlwifi/rtl8192ce/sw.c  |  1 +
>  drivers/net/wireless/rtlwifi/rtl8192ce/trx.c |  3 +++
>  drivers/net/wireless/rtlwifi/rtl8192de/sw.c  |  1 +
>  drivers/net/wireless/rtlwifi/rtl8192se/def.h |  2 ++
>  drivers/net/wireless/rtlwifi/rtl8192se/sw.c  | 22 +++-------------------
>  drivers/net/wireless/rtlwifi/rtl8192se/trx.c |  3 +++
>  drivers/net/wireless/rtlwifi/rtl8821ae/phy.c | 12 ++++++------
>  10 files changed, 28 insertions(+), 25 deletions(-)
> 


--
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: TCP NewReno and single retransmit
From: Marcelo Ricardo Leitner @ 2014-10-30 11:24 UTC (permalink / raw)
  To: Neal Cardwell; +Cc: netdev, Yuchung Cheng, Eric Dumazet
In-Reply-To: <CADVnQynu7+wgkNTkdY=XDBeyWjFxpYYBjx=n98g1_awdG2OpnA@mail.gmail.com>

On 30-10-2014 00:03, Neal Cardwell wrote:
> On Mon, Oct 27, 2014 at 2:49 PM, Marcelo Ricardo Leitner
> <mleitner@redhat.com> wrote:
>> Hi,
>>
>> We have a report from a customer saying that on a very calm connection, like
>> having only a single data packet within some minutes, if this packet gets to
>> be re-transmitted, retrans_stamp is only cleared when the next acked packet
>> is received. But this may make we abort the connection too soon if this next
>> packet also gets lost, because the reference for the initial loss is still
>> for a big while ago..
> ...
>> @@ -2382,31 +2382,32 @@ static inline bool tcp_may_undo(const struct
>> tcp_sock *tp)
>>   static bool tcp_try_undo_recovery(struct sock *sk)
> ...
>>          if (tp->snd_una == tp->high_seq && tcp_is_reno(tp)) {
>>                  /* Hold old state until something *above* high_seq
>>                   * is ACKed. For Reno it is MUST to prevent false
>>                   * fast retransmits (RFC2582). SACK TCP is safe. */
>>                  tcp_moderate_cwnd(tp);
>> +               tp->retrans_stamp = 0;
>>                  return true;
>>          }
>>          tcp_set_ca_state(sk, TCP_CA_Open);
>>          return false;
>>   }
>>
>> We would still hold state, at least part of it.. WDYT?
>
> This approach sounds OK to me as long as we include a check of
> tcp_any_retrans_done(), as we do in the similar code paths (for
> motivation, see the comment above tcp_any_retrans_done()).

Yes, okay. I thought that this would be taken care of already by then but 
reading the code again now after your comment, I can see what you're saying. 
Thanks.

> So it sounds fine to me if you change that one new line to the following 2:
>
> +  if (!tcp_any_retrans_done(sk))
> +    tp->retrans_stamp = 0;

Will do.

> Nice catch!

A good part of it (including the diagram) was done by customer. :)
I'll post the patch as soon as we sync with them (credits).

Marcelo

^ permalink raw reply

* [net 0/4][pull request] Intel Wired LAN Driver Updates 2014-10-30
From: Jeff Kirsher @ 2014-10-30 12:33 UTC (permalink / raw)
  To: davem; +Cc: Jeff Kirsher, netdev, nhorman, sassmann, jogreene

This series contains updates to e1000, igb and ixgbe.

Francesco Ruggeri fixes an issue with e1000 where in a VM the driver did
not support unicast filtering.

Roman Gushchin fixes an issue with igb where the driver was re-using
mapped pages so that packets were still getting dropped even if all
the memory issues are gone and there is free memory.

Junwei Zhang found where in the ixgbe_clean_rx_ring() we were repeating
the assignment of NULL to the receive buffer skb and fixes it.

Emil fixes a race condition between setup_link and SFP detection routine
in the watchdog when setting the advertised speed.

The following are changes since commit d70127e8a942364de8dd140fe73893efda363293:
  inet: frags: remove the WARN_ON from inet_evict_bucket
and are available in the git repository at:
  git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net master

Emil Tantilov (1):
  ixgbe: fix race when setting advertised speed

Francesco Ruggeri (1):
  e1000: unset IFF_UNICAST_FLT on WMware 82545EM

Junwei Zhang (1):
  ixgbe: need not repeat init skb with NULL

Roman Gushchin (1):
  igb: don't reuse pages with pfmemalloc flag

 drivers/net/ethernet/intel/e1000/e1000_main.c    | 5 ++++-
 drivers/net/ethernet/intel/igb/igb_main.c        | 6 +++++-
 drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c | 4 ++++
 drivers/net/ethernet/intel/ixgbe/ixgbe_main.c    | 2 +-
 4 files changed, 14 insertions(+), 3 deletions(-)

-- 
1.9.3

^ permalink raw reply

* [net 1/4] e1000: unset IFF_UNICAST_FLT on WMware 82545EM
From: Jeff Kirsher @ 2014-10-30 12:33 UTC (permalink / raw)
  To: davem
  Cc: Francesco Ruggeri, netdev, nhorman, sassmann, jogreene,
	Francesco Ruggeri, Jeff Kirsher
In-Reply-To: <1414672436-20616-1-git-send-email-jeffrey.t.kirsher@intel.com>

From: Francesco Ruggeri <fruggeri@aristanetworks.com>

VMWare's e1000 implementation does not seem to support unicast filtering.
This can be observed by configuring a macvlan interface on eth0 in a VM in
VMWare Fusion 5.0.5, and trying to use that interface instead of eth0.
Tested on 3.16.

Signed-off-by: Francesco Ruggeri <fruggeri@arista.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
 drivers/net/ethernet/intel/e1000/e1000_main.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/intel/e1000/e1000_main.c b/drivers/net/ethernet/intel/e1000/e1000_main.c
index 5f6aded..24f3986 100644
--- a/drivers/net/ethernet/intel/e1000/e1000_main.c
+++ b/drivers/net/ethernet/intel/e1000/e1000_main.c
@@ -1075,7 +1075,10 @@ static int e1000_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 				  NETIF_F_HW_CSUM |
 				  NETIF_F_SG);
 
-	netdev->priv_flags |= IFF_UNICAST_FLT;
+	/* Do not set IFF_UNICAST_FLT for VMWare's 82545EM */
+	if (hw->device_id != E1000_DEV_ID_82545EM_COPPER ||
+	    hw->subsystem_vendor_id != PCI_VENDOR_ID_VMWARE)
+		netdev->priv_flags |= IFF_UNICAST_FLT;
 
 	adapter->en_mng_pt = e1000_enable_mng_pass_thru(hw);
 
-- 
1.9.3

^ 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