Netdev List
 help / color / mirror / Atom feed
* Re: [net-next:master 122/152] drivers/ptp/ptp_chardev.c:36 ptp_ioctl() warn: 'sysoff' puts 832 bytes on stack
From: David Miller @ 2012-11-03  5:39 UTC (permalink / raw)
  To: richardcochran; +Cc: yuanhan.liu, changlongx.xie, fengguang.wu, netdev
In-Reply-To: <20121103045339.GA2277@netboy.at.omicron.at>

From: Richard Cochran <richardcochran@gmail.com>
Date: Sat, 3 Nov 2012 05:53:39 +0100

> Isn't it being nicer to the memory allocation code not to repeatedly
> request small chunks?

Don't use performance as an argument against writing this code
correctly.

^ permalink raw reply

* Re: [PATCH v2 9/9] net: batman-adv: use per_cpu_add helper
From: Shan Wei @ 2012-11-03  4:58 UTC (permalink / raw)
  To: Sven Eckelmann
  Cc: NetDev, b.a.t.m.a.n-ZwoEplunGu2X36UT3dwllkB+6BGkLq7r,
	Kernel-Maillist, siwu-MaAgPAbsBIVS8oHt8HbXEIQuADTiUCJX,
	Christoph Lameter, lindner_marek-LWAfsSFWpa4, David Miller
In-Reply-To: <5905519.yWN2Ke3YlE@bentobox>

Sven Eckelmann said, at 2012/11/3 1:55:
> On Saturday 03 November 2012 00:02:06 Shan Wei wrote:
>> From: Shan Wei <davidshan-1Nz4purKYjRBDgjK7y7TUQ@public.gmane.org>
>>
>> As Christoph Lameter said:
>>> In addition, following usage of per_cpu_ptr can be replaced by
>>> this_cpu_read.
>>>
>>> cpu=get_cpu()
>>> ....
>>> *per_cpu_ptr(p,cpu)
>>> ....
>>> ....
>>> put_cpu()
>>
>> Right.
>>
>> Signed-off-by: Shan Wei <davidshan-1Nz4purKYjRBDgjK7y7TUQ@public.gmane.org>
>> ---
> 
> Is this really supposed to be the commit message?

Maybe it's ok when Linus said this. :-)

Christoph is the maintainer of per-cpu.
So........

PER-CPU MEMORY ALLOCATOR
M:      Tejun Heo <tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
M:      Christoph Lameter <cl-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>
T:      git git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu.git
S:      Maintained
F:      include/linux/percpu*.h
F:      mm/percpu*.c
F:      arch/*/include/asm/percpu.h

> 
> Kind regards,
> 	Sven
> 

^ permalink raw reply

* Re: [net-next:master 122/152] drivers/ptp/ptp_chardev.c:36 ptp_ioctl() warn: 'sysoff' puts 832 bytes on stack
From: Richard Cochran @ 2012-11-03  4:53 UTC (permalink / raw)
  To: David Miller; +Cc: yuanhan.liu, changlongx.xie, fengguang.wu, netdev
In-Reply-To: <20121102.213928.934210347094361569.davem@davemloft.net>

On Fri, Nov 02, 2012 at 09:39:28PM -0400, David Miller wrote:
> > I am aware that these methods use large stack buffers, but I thought
> > it was okay seeing as they are both under the 1k limit.
> 
> I think you should avoid such a local stack variable here.
> 
> It's not that big of a deal to use kmalloc or whatever so just
> do that and add the necessary kfree cleanups et al.

The usage pattern will be that the user calls these again and
again. For the sysoff it will be at least once every second, and for
the events it could be ASAP in a tight loop.

Isn't it being nicer to the memory allocation code not to repeatedly
request small chunks?

Thanks,
Richard

^ permalink raw reply

* [GIT] Networking
From: David Miller @ 2012-11-03  3:46 UTC (permalink / raw)
  To: torvalds; +Cc: akpm, netdev, linux-kernel


First post-Sandy pull request, here goes:

1) Fix antenna gain handling and initialization of chan->max_reg_power
   in wireless, from Felix Fietkau.

2) Fix nexthop handling in H.232 conntrack helper, from Julian
   Anastasov.

3) Only process 80211 mesh config header in certain kinds of frames,
   from Javier Cardona.

4) 80211 management frame header length needs to be validated, from
   Johannes Berg.

5) Don't access free'd SKBs in ath9k driver, from Felix Fietkay.

6) Test for permanent state correctly in VXLAN driver, from Stephen
   Hemminger.

7) BNX2X bug fixes from Yaniv Rosner and Dmitry Kravkov.

8) Fix off by one errors in bonding, from Nikolay ALeksandrov.

9) Fix divide by zero in TCP-Illinois congestion control.  From
   Jesper Dangaard Brouer.

10) TCP metrics code says "Yo dawg, I heard you like sizeof, so I
    did a sizeof of a sizeof, so you can size your size" Fix from
    Julian Anastasov.

11) Several drivers do mdiobus_free without first doing an
    mdiobus_unregister leading to stray pointer references.
    Fix from Peter Senna Tschudin.

12) Fix OOPS in l2tp_eth_create() error path, it's another danling
    pointer kinda situation.  Fix from Tom Parkin.

13) Hardware driven by the vmxnet driver can't handle larger than 16K
    fragments, so split them up when necessary.  From Eric Dumazet.

14) Handle zero length data length in tcp_send_rcvq() properly.  Fix
    from Pavel Emelyanov.

Please pull, thanks a lot!

The following changes since commit e657e078d3dfa9f96976db7a2b5fd7d7c9f1f1a6:

  Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net (2012-10-26 15:00:48 -0700)

are available in the git repository at:


  git://git.kernel.org/pub/scm/linux/kernel/git/davem/net master

for you to fetch changes up to c454e6111d1ef4268fe98e87087216e51c2718c3:

  tcp-repair: Handle zero-length data put in rcv queue (2012-11-02 22:01:45 -0400)

----------------------------------------------------------------
Antonio Quartulli (1):
      mac80211: fix SSID copy on IBSS JOIN

David S. Miller (2):
      Merge branch 'master' of git://1984.lsi.us.es/nf
      Merge branch 'for-davem' of git://git.kernel.org/.../linville/wireless

Dmitry Kravkov (2):
      bnx2x: Disable FCoE for 57840 since not yet supported by FW
      bnx2x: fix HW initialization using fw 7.8.x

Eric Dumazet (1):
      vmxnet3: must split too big fragments

Felix Fietkau (3):
      cfg80211: fix antenna gain handling
      cfg80211: fix initialization of chan->max_reg_power
      ath9k: fix stale pointers potentially causing access to free'd skbs

Hein Tibosch (1):
      netfilter: nf_defrag_ipv6: solve section mismatch in nf_conntrack_reasm

Jacob Keller (1):
      ixgbe: PTP get_ts_info missing software support

Javier Cardona (3):
      mac80211: Only process mesh config header on frames that RA_MATCH
      mac80211: Don't drop frames received with mesh ttl == 1
      mac80211: don't inspect Sequence Control field on control frames

Jesper Dangaard Brouer (1):
      net: fix divide by zero in tcp algorithm illinois

Johannes Berg (5):
      mac80211: use blacklist for duplicate IE check
      wireless: drop invalid mesh address extension frames
      mac80211: check management frame header length
      mac80211: verify that skb data is present
      mac80211: make sure data is accessible in EAPOL check

John W. Linville (2):
      Merge branch 'for-john' of git://git.kernel.org/.../jberg/mac80211
      Merge branch 'master' of git://git.kernel.org/.../linville/wireless into for-davem

Julian Anastasov (2):
      netfilter: nf_conntrack: fix rt_gateway checks for H.323 helper
      tcp: Fix double sizeof in new tcp_metrics code

Masanari Iida (1):
      net: sctp: Fix typo in net/sctp

Pavel Emelyanov (1):
      tcp-repair: Handle zero-length data put in rcv queue

Peter Senna Tschudin (2):
      drivers/net/ethernet/nxp/lpc_eth.c: Call mdiobus_unregister before mdiobus_free
      drivers/net/phy/mdio-bitbang.c: Call mdiobus_unregister before mdiobus_free

Stanislaw Gruszka (1):
      rt2800: validate step value for temperature compensation

Sven Eckelmann (1):
      ath9k: Test for TID only in BlockAcks while checking tx status

Tom Parkin (1):
      l2tp: fix oops in l2tp_eth_create() error path

Ulrich Weber (1):
      netfilter: nf_nat: don't check for port change on ICMP tuples

Vipul Pandya (1):
      cxgb4: Fix unable to get UP event from the LLD

Yaniv Rosner (6):
      bnx2x: Fix 57810 1G-KR link against certain switches.
      bnx2x: Fix link down in 57712 following LFA
      bnx2x: Restore global registers back to default.
      bnx2x: Fix potential incorrect link speed provision
      bnx2x: Fix unrecognized SFP+ module after driver is loaded
      bnx2x: Fix no link on 577xx 10G-baseT

nikolay@redhat.com (2):
      bonding: fix off-by-one error
      bonding: fix second off-by-one error

stephen hemminger (1):
      vxlan: don't expire permanent entries

 drivers/net/bonding/bond_sysfs.c                 |   4 +-
 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c | 158 +++++++++++++++++++++++++++++++++++--------------
 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c |  13 +++-
 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c  |  10 ----
 drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c |   3 +
 drivers/net/ethernet/nxp/lpc_eth.c               |   1 +
 drivers/net/phy/mdio-bitbang.c                   |   1 +
 drivers/net/vmxnet3/vmxnet3_drv.c                |  65 +++++++++++++-------
 drivers/net/vxlan.c                              |   2 +-
 drivers/net/wireless/ath/ath9k/xmit.c            |  10 +++-
 drivers/net/wireless/rt2x00/rt2800lib.c          |   2 +-
 include/net/cfg80211.h                           |   9 +++
 net/ipv4/netfilter/iptable_nat.c                 |   4 +-
 net/ipv4/tcp_illinois.c                          |   8 ++-
 net/ipv4/tcp_input.c                             |   3 +
 net/ipv4/tcp_metrics.c                           |   2 +-
 net/ipv6/netfilter/ip6table_nat.c                |   4 +-
 net/ipv6/netfilter/nf_conntrack_reasm.c          |   4 +-
 net/l2tp/l2tp_eth.c                              |   1 +
 net/mac80211/ibss.c                              |   2 +-
 net/mac80211/rx.c                                |  74 +++++++++++++++++------
 net/mac80211/util.c                              |  42 ++++++++++---
 net/netfilter/nf_conntrack_h323_main.c           |   3 +-
 net/sctp/socket.c                                |   2 +-
 net/wireless/core.c                              |   3 +-
 net/wireless/reg.c                               |   5 +-
 net/wireless/util.c                              |  14 +++--
 27 files changed, 320 insertions(+), 129 deletions(-)

^ permalink raw reply

* [RFC PATCH v2] iproute2: bridge: add veb/vepa toggle
From: John Fastabend @ 2012-11-03  3:24 UTC (permalink / raw)
  To: bhutchings; +Cc: shemminger, netdev

Test bridge commands to set veb, vepa modes to iproute2.

[root@jf-dev1-dcblab iproute2]# ./bridge/bridge bridge show
eth2: mode VEB bridge_flags: self
eth3: mode VEPA bridge_flags: self
eth10: mode VEB bridge_flags: self
eth12: mode VEB bridge_flags: self

[root@jf-dev1-dcblab iproute2]# ./bridge/bridge bridge state mode veb dev eth3 self
bridge_mode_set eth3: type 19 family 7 mode VEB flags 0002

[root@jf-dev1-dcblab iproute2]# ./bridge/bridge bridge show
eth2: mode VEB bridge_flags: self
eth3: mode VEB bridge_flags: self
eth10: mode VEB bridge_flags: self
eth12: mode VEB bridge_flags: self

Maybe the final patch should separate protocol (STP) configuraiton
from the bridge setup (VEB.VEPA). But this is good for testing in
the meantime.

v2: remove a lot of the crazy cruft in the last patch

Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
---

 bridge/br_common.h      |    1 
 bridge/bridge.c         |    3 -
 bridge/fdb.c            |  244 +++++++++++++++++++++++++++++++++++++++++++++++
 include/linux/if_link.h |   16 +++
 4 files changed, 263 insertions(+), 1 deletions(-)

diff --git a/bridge/br_common.h b/bridge/br_common.h
index 718ecb9..3e5dcab 100644
--- a/bridge/br_common.h
+++ b/bridge/br_common.h
@@ -5,6 +5,7 @@ extern int print_fdb(const struct sockaddr_nl *who,
 		     struct nlmsghdr *n, void *arg);
 
 extern int do_fdb(int argc, char **argv);
+extern int do_bridge(int argc, char **argv);
 extern int do_monitor(int argc, char **argv);
 
 extern int preferred_family;
diff --git a/bridge/bridge.c b/bridge/bridge.c
index e2c33b0..b5145c1 100644
--- a/bridge/bridge.c
+++ b/bridge/bridge.c
@@ -27,7 +27,7 @@ static void usage(void)
 {
 	fprintf(stderr,
 "Usage: bridge [ OPTIONS ] OBJECT { COMMAND | help }\n"
-"where  OBJECT := { fdb |  monitor }\n"
+"where  OBJECT := { fdb |  monitor | bridge }\n"
 "       OPTIONS := { -V[ersion] | -s[tatistics] | -d[etails]\n" );
 	exit(-1);
 }
@@ -43,6 +43,7 @@ static const struct cmd {
 	int (*func)(int argc, char **argv);
 } cmds[] = {
 	{ "fdb", 	do_fdb },
+	{ "bridge",	do_bridge },
 	{ "monitor",	do_monitor },
 	{ "help",	do_help },
 	{ 0 }
diff --git a/bridge/fdb.c b/bridge/fdb.c
index 4ca4861..e1c138d 100644
--- a/bridge/fdb.c
+++ b/bridge/fdb.c
@@ -34,6 +34,13 @@ static void usage(void)
 	exit(-1);
 }
 
+static void bridge_usage(void)
+{
+	fprintf(stderr, "Usage: br bridge er mode {veb | vepa} dev DEV\n");
+	fprintf(stderr, "	br bridge {show} [ dev DEV] \n");
+	exit(-1);
+}
+
 static const char *state_n2a(unsigned s)
 {
 	static char buf[32];
@@ -269,3 +276,240 @@ int do_fdb(int argc, char **argv)
 	fprintf(stderr, "Command \"%s\" is unknown, try \"bridge fdb help\".\n", *argv);
 	exit(-1);
 }
+
+int print_bridge(const struct sockaddr_nl *who, struct nlmsghdr *n, void *arg)
+{
+	FILE *fp = arg;
+	struct ifinfomsg *ifm = NLMSG_DATA(n);
+	int len = n->nlmsg_len;
+	struct rtattr * tb[IFLA_MAX+1];
+       
+	len -= NLMSG_LENGTH(sizeof(*ifm));
+	if (len < 0) {
+		fprintf(stderr, "BUG: wrong nlmsg len %d\n", len);
+		return -1;
+	}
+
+	if (ifm->ifi_family != AF_BRIDGE) {
+		fprintf(stderr, "hmm: Not PF_BRIDGE is %i\n", ifm->ifi_family);
+	}
+
+	if (filter_index && filter_index != ifm->ifi_index)
+		return 0;
+
+	parse_rtattr(tb, IFLA_MAX, IFLA_RTA(ifm), len);
+
+	if (!tb[IFLA_IFNAME]) {
+		fprintf(stderr, "%s: missing ifname using ifi_index %u name %s\n",
+			__func__, ifm->ifi_index,
+			ll_index_to_name(ifm->ifi_index));
+	}
+	if (tb[IFLA_AF_SPEC]) {
+		struct rtattr *bridge[IFLA_BRIDGE_MAX+1];
+		__u16 mode = 0, flags = 0;
+
+		parse_rtattr_nested(bridge, IFLA_BRIDGE_MAX, tb[IFLA_AF_SPEC]);
+		if (bridge[IFLA_BRIDGE_MODE])
+			mode =*(__u16*)RTA_DATA(bridge[IFLA_BRIDGE_MODE]);
+		if (bridge[IFLA_BRIDGE_FLAGS])
+			flags =*(__u16*)RTA_DATA(bridge[IFLA_BRIDGE_FLAGS]);
+
+		fprintf(stderr, "%s: mode %s bridge_flags: %s %s\n",
+			ll_index_to_name(ifm->ifi_index),
+			mode ? "VEPA" : "VEB",
+			flags & BRIDGE_FLAGS_SELF ? "self" : "",
+			flags & BRIDGE_FLAGS_MASTER ? "master" : "");
+	}
+
+	if (tb[IFLA_PROTINFO]) {
+		__u8 state = *(__u8*)RTA_DATA(tb[IFLA_PROTINFO]);
+		char *sstate;
+
+		switch (state) {
+		case 0:
+			sstate = "DISABLED";
+			break;
+		case 1:
+			sstate = "LISTENING";
+			break;
+		case 2:
+			sstate = "LEARNING";
+			break;
+		case 3:
+			sstate = "FORWARDING";
+			break;
+		case 4:
+			sstate = "BLOCKING";
+			break;
+		default:
+			sstate = "UNKNOWN";
+			break;
+		}
+	
+
+		fprintf(stderr, "%s: %s: ifla_protinfo: %s\n",
+			ll_index_to_name(ifm->ifi_index),
+			__func__, sstate);
+	}
+
+	fflush(fp);
+	return 0;
+}
+
+static int bridge_show(int argc, char **argv)
+{
+	char *filter_dev = NULL;
+
+       
+	while (argc > 0) {
+		if (strcmp(*argv, "dev") == 0) {
+			NEXT_ARG();
+			if (filter_dev)
+				duparg("dev", *argv);
+                       
+			filter_dev = *argv;
+		}
+		argc--; argv++;
+	}
+
+	if (filter_dev) {
+		if ((filter_index = if_nametoindex(filter_dev)) == 0) {
+			fprintf(stderr, "Cannot find device \"%s\"\n", filter_dev);
+			return -1;
+		}
+	}
+
+	if (rtnl_wilddump_request(&rth, PF_BRIDGE, RTM_GETLINK) < 0) {
+		perror("Cannot send dump request");
+		exit(1);
+	}
+
+	if (rtnl_dump_filter(&rth, print_bridge, stdout) < 0) {
+		fprintf(stderr, "Dump terminated\n");
+		exit(1);
+	}
+
+	return 0;
+}
+
+static int bridge_state_set(int argc, char **argv)
+{
+	struct {
+		struct nlmsghdr		n;
+		struct ifinfomsg	ifm;
+		char			buf[1024];
+	} req;
+	struct {
+		struct nlmsghdr		hdr;
+		struct nlmsgerr		err;
+		struct nlmsghdr		rhdr;
+		struct ifinfomsg	ifm;
+		char			buf[1024];
+	} reply;
+	char *d = NULL;
+	__u8 state = 0;
+	__u16 mode = -1, flags = 0;
+	
+	memset(&req, 0, sizeof(req));
+	memset(&reply, 0, sizeof(reply));
+
+	req.n.nlmsg_len = NLMSG_LENGTH(sizeof(struct ifinfomsg));
+	req.n.nlmsg_flags = NLM_F_REQUEST | NLM_F_REPLACE | NLM_F_ACK;
+	req.n.nlmsg_type = RTM_SETLINK;
+	req.ifm.ifi_family = PF_BRIDGE;
+
+	while (argc > 0) {
+		if (strcmp(*argv, "dev") == 0) {
+			NEXT_ARG();
+			d = *argv;	
+		} else if (matches(*argv, "state") == 0) {
+			NEXT_ARG();
+			if (matches(*argv, "DISABLED") == 0)
+				state = 0;
+			else if (matches(*argv, "LISTENING") == 0)
+				 state = 1;
+			else if (matches(*argv, "LEARNING") == 0)
+				 state = 2;
+			else if (matches(*argv, "FORWARDING") == 0)
+				 state = 3;
+			else if (matches(*argv, "BLOCKING") == 0)
+				 state = 4;
+			else
+				invarg("Invalid state value\n", *argv);
+
+		} else if (matches(*argv, "mode") == 0) {
+			NEXT_ARG();
+			if (matches(*argv, "veb") == 0)
+				mode = BRIDGE_MODE_VEB;
+			else if (matches(*argv, "vepa") == 0)
+				 mode = BRIDGE_MODE_VEPA;
+			else
+				invarg("Invalid mode value\n", *argv);
+
+		} else if (matches(*argv, "master") == 0) {
+			flags |= BRIDGE_FLAGS_MASTER;
+		} else if (matches(*argv, "self") == 0) {
+			flags |= BRIDGE_FLAGS_SELF;
+		}
+
+		argc--; argv++;
+	}
+
+	if (!d) {
+		fprintf(stderr, "Device required.\n");
+		exit(-1);
+	}
+
+       req.ifm.ifi_index = ll_name_to_index(d);
+       if (req.ifm.ifi_index == 0) {
+               fprintf(stderr, "Cannot find device \"%s\"\n", d);
+               return -1;
+       }
+
+	if (state < 4)
+		addattr8(&req.n, sizeof(req.buf), IFLA_PROTINFO, state);
+       
+	printf("%s %s(%u): type %i family %i state 0x%x ", __func__, d, req.ifm.ifi_index,
+		req.n.nlmsg_type, req.ifm.ifi_family, state);
+
+	if (mode < 3 || flags) {
+		struct rtattr *binfo;
+		int err = 0;
+
+		binfo = addattr_nest(&req.n, sizeof(req), IFLA_AF_SPEC);
+		if (flags)
+			err = addattr16(&req.n, sizeof(req), IFLA_BRIDGE_FLAGS, flags);
+		if (mode < 3)
+			err = addattr16(&req.n, sizeof(req), IFLA_BRIDGE_MODE, mode);
+		if (err < 0)
+			fprintf(stderr, "addattr16 failes\n");
+		addattr_nest_end(&req.n, binfo);
+       
+		printf("mode %s\n", mode == BRIDGE_MODE_VEPA ? "VEPA" : "VEB");
+	}
+
+	printf("%s: %s(%u): rtnl_talk length %u\n", __func__, d, req.ifm.ifi_index, req.n.nlmsg_len);
+	if (rtnl_talk(&rth, &req.n, 0, 0, &reply.hdr) < 0) {
+		printf("\nREPLY: error %i\n", reply.err.error);
+		print_bridge(NULL, &reply.err.msg, stderr);
+		exit(2);
+	}
+
+	return 0;
+}
+
+int do_bridge(int argc, char **argv)
+{
+	ll_init_map(&rth);
+
+	if (argc > 0) {
+		if (matches(*argv, "show") == 0)
+			return bridge_show(argc-1, argv+1);
+		else if (matches(*argv, "state") == 0)
+			return bridge_state_set(argc-1, argv+1);
+		else if (matches(*argv, "help") == 0)
+			bridge_usage();
+	}
+
+	exit(0);
+}
diff --git a/include/linux/if_link.h b/include/linux/if_link.h
index 012d95a..1a6c2f1 100644
--- a/include/linux/if_link.h
+++ b/include/linux/if_link.h
@@ -142,6 +142,7 @@ enum {
 #define IFLA_PROMISCUITY IFLA_PROMISCUITY
 	IFLA_NUM_TX_QUEUES,
 	IFLA_NUM_RX_QUEUES,
+	IFLA_BRIDGE,
 	__IFLA_MAX
 };
 
@@ -375,6 +376,21 @@ enum {
 #define PORT_UUID_MAX		16
 #define PORT_SELF_VF		-1
 
+/* Bridge Flags */
+#define BRIDGE_FLAGS_MASTER	1	/* Bridge command to/from master */
+#define BRIDGE_FLAGS_SELF	2	/* Bridge command to/from lowerdev */
+
+#define BRIDGE_MODE_VEB		0	/* Default loopback mode */
+#define BRIDGE_MODE_VEPA	1	/* 802.1Qbg defined VEPA mode */
+
+/* Bridge management nested attributes */
+enum {
+	IFLA_BRIDGE_FLAGS,
+	IFLA_BRIDGE_MODE,
+	__IFLA_BRIDGE_MAX,
+};
+#define IFLA_BRIDGE_MAX (__IFLA_BRIDGE_MAX - 1)
+
 enum {
 	PORT_REQUEST_PREASSOCIATE = 0,
 	PORT_REQUEST_PREASSOCIATE_RR,

^ permalink raw reply related

* (unknown), 
From: Mr. Allen Large @ 2012-11-02  0:59 UTC (permalink / raw)





This Email is to bring to your notice that you have been personally
accredited sole beneficiary to Mr. Allen and Violet Large deposited sum of
4,543,728.00 US Dollars PLEASE CONTACT Mr. Allen Large at
(allenand_v0927@hotmail.co.uk) FOR MORE DETAILS. ONLINE CORDINATOR

^ permalink raw reply

* [net-next PATCH] net: fix bridge notify hook to manage flags correctly
From: John Fastabend @ 2012-11-03  2:32 UTC (permalink / raw)
  To: bhutchings, davem; +Cc: netdev

The bridge notify hook rtnl_bridge_notify() was not handling the
case where the master flags was set or with both flags set. First
flags are not being passed correctly and second the logic to parse
them is broken.

This patch passes the original flags value and fixes the
logic.

Reported-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
---

 net/core/rtnetlink.c |   26 ++++++++++++++++++--------
 1 files changed, 18 insertions(+), 8 deletions(-)

diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c
index 51dc58f..7eae53b 100644
--- a/net/core/rtnetlink.c
+++ b/net/core/rtnetlink.c
@@ -2373,13 +2373,19 @@ static int rtnl_bridge_notify(struct net_device *dev, u16 flags)
 		goto errout;
 	}
 
-	if (!flags && master && master->netdev_ops->ndo_bridge_getlink)
+	if ((!flags || (flags & BRIDGE_FLAGS_MASTER)) &&
+	    master && master->netdev_ops->ndo_bridge_getlink) {
 		err = master->netdev_ops->ndo_bridge_getlink(skb, 0, 0, dev);
-	else if (dev->netdev_ops->ndo_bridge_getlink)
-		err = dev->netdev_ops->ndo_bridge_getlink(skb, 0, 0, dev);
+		if (err < 0)
+			goto errout;
+	}
 
-	if (err < 0)
-		goto errout;
+	if ((flags & BRIDGE_FLAGS_SELF) &&
+	    dev->netdev_ops->ndo_bridge_getlink) {
+		err = dev->netdev_ops->ndo_bridge_getlink(skb, 0, 0, dev);
+		if (err < 0)
+			goto errout;
+	}
 
 	rtnl_notify(skb, net, 0, RTNLGRP_LINK, NULL, GFP_ATOMIC);
 	return 0;
@@ -2398,7 +2404,8 @@ static int rtnl_bridge_setlink(struct sk_buff *skb, struct nlmsghdr *nlh,
 	struct net_device *dev;
 	struct nlattr *br_spec, *attr = NULL;
 	int rem, err = -EOPNOTSUPP;
-	u16 flags = 0;
+	u16 oflags, flags = 0;
+	bool have_flags = false;
 
 	if (nlmsg_len(nlh) < sizeof(*ifm))
 		return -EINVAL;
@@ -2417,12 +2424,15 @@ static int rtnl_bridge_setlink(struct sk_buff *skb, struct nlmsghdr *nlh,
 	if (br_spec) {
 		nla_for_each_nested(attr, br_spec, rem) {
 			if (nla_type(attr) == IFLA_BRIDGE_FLAGS) {
+				have_flags = true;
 				flags = nla_get_u16(attr);
 				break;
 			}
 		}
 	}
 
+	oflags = flags;
+
 	if (!flags || (flags & BRIDGE_FLAGS_MASTER)) {
 		if (!dev->master ||
 		    !dev->master->netdev_ops->ndo_bridge_setlink) {
@@ -2447,11 +2457,11 @@ static int rtnl_bridge_setlink(struct sk_buff *skb, struct nlmsghdr *nlh,
 			flags &= ~BRIDGE_FLAGS_SELF;
 	}
 
-	if (attr && nla_type(attr) == IFLA_BRIDGE_FLAGS)
+	if (have_flags)
 		memcpy(nla_data(attr), &flags, sizeof(flags));
 	/* Generate event to notify upper layer of bridge change */
 	if (!err)
-		err = rtnl_bridge_notify(dev, flags);
+		err = rtnl_bridge_notify(dev, oflags);
 out:
 	return err;
 }

^ permalink raw reply related

* Re: [PATCH net] tcp-repair: Handle zero-length data put in rcv queue
From: David Miller @ 2012-11-03  2:02 UTC (permalink / raw)
  To: xemul; +Cc: netdev, gmavrikas
In-Reply-To: <508E9B3D.1050505@parallels.com>

From: Pavel Emelyanov <xemul@parallels.com>
Date: Mon, 29 Oct 2012 19:05:33 +0400

> When sending data into a tcp socket in repair state we should check
> for the amount of data being 0 explicitly. Otherwise we'll have an skb 
> with seq == end_seq in rcv queue, but tcp doesn't expect this to happen
> (in particular a warn_on in tcp_recvmsg shoots).
> 
> Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
> Reported-by: Giorgos Mavrikas <gmavrikas@gmail.com>

Applied, thanks.

> From 8f70f4ea4f509a3772ee7eb5d9d5c2571a86652a Mon Sep 17 00:00:00 2001
> From: Pavel Emelyanov <xemul@parallels.com>
> Date: Mon, 29 Oct 2012 18:12:41 +0400
> Subject: [PATCH] fix for repair queue getback
> 
> Signed-off-by: Pavel Emelyanov <xemul@parallels.com>

What is this?

^ permalink raw reply

* Re: [PATCH 10/16] ethernet: Convert dev_printk(KERN_<LEVEL> to dev_<level>(
From: David Miller @ 2012-11-03  2:00 UTC (permalink / raw)
  To: joe; +Cc: divy, netdev, linux-kernel
In-Reply-To: <78c3d489101b08588cb067181171eb070bdac756.1351411047.git.joe@perches.com>

From: Joe Perches <joe@perches.com>
Date: Sun, 28 Oct 2012 01:05:48 -0700

> dev_<level> calls take less code than dev_printk(KERN_<LEVEL>
> and reducing object size is good.
> Coalesce formats for easier grep.
> 
> Signed-off-by: Joe Perches <joe@perches.com>

I forgot the other day so indicate that I applied this to
net-next, thanks.

^ permalink raw reply

* Re: [PATCH] vmxnet3: must split too big fragments
From: David Miller @ 2012-11-03  1:58 UTC (permalink / raw)
  To: eric.dumazet; +Cc: sbhatewara, pv-drivers, netdev, linux-kernel, jongman.heo
In-Reply-To: <1351531849.12280.54.camel@edumazet-glaptop>

From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Mon, 29 Oct 2012 18:30:49 +0100

> From: Eric Dumazet <edumazet@google.com>
> 
> vmxnet3 has a 16Kbytes limit per tx descriptor, that happened to work
> as long as we provided PAGE_SIZE fragments.
> 
> Our stack can now build larger fragments, so we need to split them to
> the 16kbytes boundary.
> 
> Signed-off-by: Eric Dumazet <edumazet@google.com>
> Reported-by: jongman heo <jongman.heo@samsung.com>
> Tested-by: jongman heo <jongman.heo@samsung.com>
> Cc: Shreyas Bhatewara <sbhatewara@vmware.com>

Applied, thanks everyone.

^ permalink raw reply

* Re: [PATCH 1/1] l2tp: fix oops in l2tp_eth_create() error path
From: David Miller @ 2012-11-03  1:57 UTC (permalink / raw)
  To: tparkin; +Cc: netdev, jchapman
In-Reply-To: <1351590108-21067-1-git-send-email-tparkin@katalix.com>

From: Tom Parkin <tparkin@katalix.com>
Date: Tue, 30 Oct 2012 09:41:48 +0000

> When creating an L2TPv3 Ethernet session, if register_netdev() should fail for
> any reason (for example, automatic naming for "l2tpeth%d" interfaces hits the
> 32k-interface limit), the netdev is freed in the error path.  However, the
> l2tp_eth_sess structure's dev pointer is left uncleared, and this results in
> l2tp_eth_delete() then attempting to unregister the same netdev later in the
> session teardown.  This results in an oops.
> 
> To avoid this, clear the session dev pointer in the error path.
> 
> Signed-off-by: Tom Parkin <tparkin@katalix.com>

Applied, thanks.

^ permalink raw reply

* Re: [PATCH net-next] net: Fix continued iteration in rtnl_bridge_getlink()
From: David Miller @ 2012-11-03  1:54 UTC (permalink / raw)
  To: john.r.fastabend; +Cc: bhutchings, netdev, shemminger
In-Reply-To: <5094766B.1000407@intel.com>

From: John Fastabend <john.r.fastabend@intel.com>
Date: Fri, 02 Nov 2012 18:42:03 -0700

> On 11/2/2012 3:56 PM, Ben Hutchings wrote:
>> Commit e5a55a898720096f43bc24938f8875c0a1b34cd7 ('net: create generic
>> bridge ops') broke the handling of a non-zero starting index in
>> rtnl_bridge_getlink() (based on the old br_dump_ifinfo()).
>>
>> When the starting index is non-zero, we need to increment the current
>> index for each entry that we are skipping.  Also, we need to check the
>> index before both cases, since we may previously have stopped
>> iteration between getting information about a device from its master
>> and from itself.
>>
>> Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
>> ---
> 
> I needed to be testing with more interfaces. Its clearly broke
> with >41 veth devices. This patch fixes it thanks a lot Ben!
> 
> Tested-by: John Fastabend <john.r.fastabend@intel.com>

Applied, thanks everyone.

 

^ permalink raw reply

* Re: [PATCH net-next] net: Fix continued iteration in rtnl_bridge_getlink()
From: John Fastabend @ 2012-11-03  1:42 UTC (permalink / raw)
  To: Ben Hutchings; +Cc: David Miller, netdev, Stephen Hemminger
In-Reply-To: <1351897012.2703.17.camel@bwh-desktop.uk.solarflarecom.com>

On 11/2/2012 3:56 PM, Ben Hutchings wrote:
> Commit e5a55a898720096f43bc24938f8875c0a1b34cd7 ('net: create generic
> bridge ops') broke the handling of a non-zero starting index in
> rtnl_bridge_getlink() (based on the old br_dump_ifinfo()).
>
> When the starting index is non-zero, we need to increment the current
> index for each entry that we are skipping.  Also, we need to check the
> index before both cases, since we may previously have stopped
> iteration between getting information about a device from its master
> and from itself.
>
> Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
> ---

I needed to be testing with more interfaces. Its clearly broke
with >41 veth devices. This patch fixes it thanks a lot Ben!

Tested-by: John Fastabend <john.r.fastabend@intel.com>

^ permalink raw reply

* Re: [PATCH net] cxgb4: Fix unable to get UP event from the LLD
From: David Miller @ 2012-11-03  1:42 UTC (permalink / raw)
  To: vipul; +Cc: netdev, divy, dm, jay
In-Reply-To: <1351512156-11636-1-git-send-email-vipul@chelsio.com>

From: Vipul Pandya <vipul@chelsio.com>
Date: Mon, 29 Oct 2012 17:32:36 +0530

> If T4 configuration file gets loaded from the /lib/firmware/cxgb4/ directory
> then offload capabilities of the cards were getting disabled during
> initialization. Hence ULDs do not get an UP event from the LLD.
> 
> Signed-off-by: Jay Hernandez <jay@chelsio.com>
> Signed-off-by: Vipul Pandya <vipul@chelsio.com>

Applied, thanks.

^ permalink raw reply

* Re: [net-next:master 122/152] drivers/ptp/ptp_chardev.c:36 ptp_ioctl() warn: 'sysoff' puts 832 bytes on stack
From: David Miller @ 2012-11-03  1:39 UTC (permalink / raw)
  To: richardcochran; +Cc: yuanhan.liu, changlongx.xie, fengguang.wu, netdev
In-Reply-To: <20121102085915.GC2486@netboy.at.omicron.at>

From: Richard Cochran <richardcochran@gmail.com>
Date: Fri, 2 Nov 2012 09:59:15 +0100

> On Fri, Nov 02, 2012 at 10:06:31AM +0800, Yuanhan Liu wrote:
>> 
>> Hi Richard,
>> 
>> _just_ FYI and let you aware of it, there are new smatch warnings show up in
>> 
>> tree:   git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git master
>> head:   b77bc2069d1e437d5a1a71bb5cfcf4556ee40015
>> commit: 215b13dd288c2e1e4461c1530a801f5f83e8cd90 [122/152] ptp: add an ioctl to compare PHC time with system time
>> 
>> + drivers/ptp/ptp_chardev.c:36 ptp_ioctl() warn: 'sysoff' puts 832 bytes on stack
>>   drivers/ptp/ptp_chardev.c:144 ptp_read() warn: 'event' puts 960 bytes on stack
> 
> I am aware that these methods use large stack buffers, but I thought
> it was okay seeing as they are both under the 1k limit.

I think you should avoid such a local stack variable here.

It's not that big of a deal to use kmalloc or whatever so just
do that and add the necessary kfree cleanups et al.

^ permalink raw reply

* Re: [RESEND PATCH net-next] ipv6/multipath: remove flag NLM_F_EXCL after the first nexthop
From: David Miller @ 2012-11-03  1:38 UTC (permalink / raw)
  To: nicolas.dichtel; +Cc: shemminger, netdev, joe, bernat, eric.dumazet, yoshfuji
In-Reply-To: <1351846702-4982-1-git-send-email-nicolas.dichtel@6wind.com>

From: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Date: Fri,  2 Nov 2012 09:58:22 +0100

> fib6_add_rt2node() will reject the nexthop if this flag is set, so
> we perform the check only for the first nexthop.
> 
> Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>

It seems a bit hackish, but I don't have any better ideas, so
applied, thanks.

^ permalink raw reply

* Re: [PATCH 2/2] drivers/net/phy/mdio-bitbang.c: Call mdiobus_unregister before mdiobus_free
From: David Miller @ 2012-11-03  1:36 UTC (permalink / raw)
  To: peter.senna; +Cc: srinivas.kandagatla, netdev, linux-kernel, kernel-janitors
In-Reply-To: <1351440721-9121-2-git-send-email-peter.senna@gmail.com>

From: Peter Senna Tschudin <peter.senna@gmail.com>
Date: Sun, 28 Oct 2012 17:12:01 +0100

> Based on commit b27393aecf66199f5ddad37c302d3e0cfadbe6c0
> 
> Calling mdiobus_free without calling mdiobus_unregister causes
> BUG_ON(). This patch fixes the issue.
> 
> The semantic patch that found this issue(http://coccinelle.lip6.fr/):
> // <smpl>
> @@
> expression E;
> @@
>   ... when != mdiobus_unregister(E);
> 
> + mdiobus_unregister(E);
>   mdiobus_free(E);
> // </smpl>
> 
> Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>

Applied.

^ permalink raw reply

* Re: [PATCH 1/2] drivers/net/ethernet/nxp/lpc_eth.c: Call mdiobus_unregister before mdiobus_free
From: David Miller @ 2012-11-03  1:36 UTC (permalink / raw)
  To: peter.senna
  Cc: stigge, edumazet, djduanjiong, aletes.xgr, netdev, linux-kernel,
	kernel-janitors
In-Reply-To: <1351440721-9121-1-git-send-email-peter.senna@gmail.com>

From: Peter Senna Tschudin <peter.senna@gmail.com>
Date: Sun, 28 Oct 2012 17:12:00 +0100

> Based on commit b27393aecf66199f5ddad37c302d3e0cfadbe6c0
> 
> Calling mdiobus_free without calling mdiobus_unregister causes
> BUG_ON(). This patch fixes the issue.
> 
> The semantic patch that found this issue(http://coccinelle.lip6.fr/):
> // <smpl>
> @@
> expression E;
> @@
>   ... when != mdiobus_unregister(E);
> 
> + mdiobus_unregister(E);
>   mdiobus_free(E);
> // </smpl>
> 
> Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>

Applied.

^ permalink raw reply

* Re: [PATCH net-next 3/3] eth: Rename and properly align br_reserved_address array
From: David Miller @ 2012-11-03  1:34 UTC (permalink / raw)
  To: bhutchings; +Cc: netdev, linux-net-drivers, john.r.fastabend, shemminger
In-Reply-To: <1351797122.2883.14.camel@bwh-desktop.uk.solarflarecom.com>

From: Ben Hutchings <bhutchings@solarflare.com>
Date: Thu, 1 Nov 2012 19:12:02 +0000

> Since this array is no longer part of the bridge driver, it should
> have an 'eth' prefix not 'br'.
> 
> We also assume that either it's 16-bit-aligned or the architecture has
> efficient unaligned access.  Ensure the first of these is true by
> explicitly aligning it.
> 
> Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>

Applied.

^ permalink raw reply

* Re: [PATCH net-next 2/3] eth: Make is_link_local() consistent with other address tests
From: David Miller @ 2012-11-03  1:34 UTC (permalink / raw)
  To: bhutchings; +Cc: netdev, john.r.fastabend, shemminger
In-Reply-To: <1351797071.2883.13.camel@bwh-desktop.uk.solarflarecom.com>

From: Ben Hutchings <bhutchings@solarflare.com>
Date: Thu, 1 Nov 2012 19:11:11 +0000

> Function name should include '_ether_addr'.
> Return type should be bool.
> Parameter name should be 'addr' not 'dest' (also matching kernel-doc).
> 
> Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>

Applied.

^ permalink raw reply

* Re: [PATCH net-next 1/3] bridge: Use is_link_local() in store_group_addr()
From: David Miller @ 2012-11-03  1:34 UTC (permalink / raw)
  To: bhutchings; +Cc: netdev, shemminger
In-Reply-To: <1351797004.2883.12.camel@bwh-desktop.uk.solarflarecom.com>

From: Ben Hutchings <bhutchings@solarflare.com>
Date: Thu, 1 Nov 2012 19:10:04 +0000

> Parse the string into an array of bytes rather than ints, so we can
> use is_link_local() rather than reimplementing it.
> 
> Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>

Applied.

^ permalink raw reply

* Re: [PATCH net] bnx2x: fix HW initialization using fw 7.8.x
From: David Miller @ 2012-11-03  1:32 UTC (permalink / raw)
  To: dmitry; +Cc: netdev, ariele
In-Reply-To: <1351497544-13272-1-git-send-email-dmitry@broadcom.com>

From: "Dmitry Kravkov" <dmitry@broadcom.com>
Date: Mon, 29 Oct 2012 09:59:04 +0200

> Since commit 96bed4b9 (use FW 7.8.2) BRB HW block needs to be
> initialized using fw values for all devices.
> Otherwise ETS on 57712/578xx will not work.
> 
> Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
> Signed-off-by: Ariel Elior <ariele@broadcom.com>

Applied, thanks.

^ permalink raw reply

* Re: [PATCH net-next] sfc: Select PTP_1588_CLOCK
From: David Miller @ 2012-11-03  1:31 UTC (permalink / raw)
  To: bhutchings; +Cc: netdev, linux-net-drivers
In-Reply-To: <1351804942.2883.47.camel@bwh-desktop.uk.solarflarecom.com>

From: Ben Hutchings <bhutchings@solarflare.com>
Date: Thu, 1 Nov 2012 21:22:22 +0000

> This was missed in commit a24006ed12616bde1bbdb26868495906a212d8dc
> ('ptp: Enable clock drivers along with associated net/PHY drivers')
> which enabled sfc's clock driver unconditionally.
> 
> Reported-by: kbuild test robot <fengguang.wu@intel.com>
> Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>

Applied, thanks Ben.

^ permalink raw reply

* Re: [PATCHv3 net-next 0/8] enable/disable zero copy tx dynamically
From: David Miller @ 2012-11-03  1:31 UTC (permalink / raw)
  To: mst
  Cc: vyasevic, alexander.h.duyck, Ian.Campbell, kvm, netdev,
	linux-kernel, virtualization, edumazet, akpm
In-Reply-To: <cover.1351797353.git.mst@redhat.com>

From: "Michael S. Tsirkin" <mst@redhat.com>
Date: Thu, 1 Nov 2012 21:16:17 +0200

> 
> tun supports zero copy transmit since 0690899b4d4501b3505be069b9a687e68ccbe15b,
> however you can only enable this mode if you know your workload does not
> trigger heavy guest to host/host to guest traffic - otherwise you
> get a (minor) performance regression.
> This patchset addresses this problem by notifying the owner
> device when callback is invoked because of a data copy.
> This makes it possible to detect whether zero copy is appropriate
> dynamically: we start in zero copy mode, when we detect
> data copied we disable zero copy for a while.
> 
> With this patch applied, I get the same performance for
> guest to host and guest to guest both with and without zero copy tx.

Series applied, thanks Michael.

^ permalink raw reply

* Re: [PATCH V5 04/22] qlcnic: modify PCI and register access routines
From: David Miller @ 2012-11-03  1:27 UTC (permalink / raw)
  To: sony.chacko; +Cc: netdev, Dept_NX_Linux_NIC_Driver
In-Reply-To: <1351818414-25197-5-git-send-email-sony.chacko@qlogic.com>

From: Sony Chacko <sony.chacko@qlogic.com>
Date: Thu,  1 Nov 2012 21:06:36 -0400

> From: Sony Chacko <sony.chacko@qlogic.com>
> 
> Refactor 82xx driver to support new adapter - Qlogic 83XX CNA
> Update PCI and hardware access routines
> 
> Signed-off-by: Anirban Chakraborty <anirban.chakraborty@qlogic.com>
> Signed-off-by: Sony Chacko <sony.chacko@qlogic.com>

This removes the only user of qlcnic_check_vf() but leaves the
definition around, dangling, and creating a build warning:

drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c:454:1: warning: ‘qlcnic_check_vf’ defined but not used [-Wunused-function]

Before you even bother sending this series yet another time, I want
you to do what I'm going to do with your patches anyways, which is
apply them one by one and verify that at each and every patch there
are no build failures or new warnings introduced.

My patience with you guys is wearing thin, and after being without
power or heat for 5 days I'm really grumpy.  So you better take
your time and make sure this thing is perfect before you even
think about posting it again.

Thanks.

^ 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