Netdev List
 help / color / mirror / Atom feed
* [PATCH] bonding: remove already created master sysfs link on failure
From: Veaceslav Falico @ 2013-03-26 16:43 UTC (permalink / raw)
  To: netdev; +Cc: vfalico, andy, fubar

If slave sysfs symlink failes to be created - we end up without removing
the master sysfs symlink. Remove it in case of failure.

Signed-off-by: Veaceslav Falico <vfalico@redhat.com>
---
 drivers/net/bonding/bond_sysfs.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/drivers/net/bonding/bond_sysfs.c b/drivers/net/bonding/bond_sysfs.c
index 1c9e09f..db103e0 100644
--- a/drivers/net/bonding/bond_sysfs.c
+++ b/drivers/net/bonding/bond_sysfs.c
@@ -183,6 +183,11 @@ int bond_create_slave_symlinks(struct net_device *master,
 	sprintf(linkname, "slave_%s", slave->name);
 	ret = sysfs_create_link(&(master->dev.kobj), &(slave->dev.kobj),
 				linkname);
+
+	/* free the master link created earlier in case of error */
+	if (ret)
+		sysfs_remove_link(&(slave->dev.kobj), "master");
+
 	return ret;
 
 }
-- 
1.7.1

^ permalink raw reply related

* Re: [net-next.git 0/8 (v2)] stmmac: update to March_2013 (ext desc, PTP, SGMII)
From: David Miller @ 2013-03-26 16:53 UTC (permalink / raw)
  To: peppe.cavallaro; +Cc: netdev, rayagond, richardcochran
In-Reply-To: <1364308992-27929-1-git-send-email-peppe.cavallaro@st.com>

From: Giuseppe CAVALLARO <peppe.cavallaro@st.com>
Date: Tue, 26 Mar 2013 15:43:04 +0100

> These patches enhance the driver adding the PTP support and the initial code
> for RGMII/SGMII/TBI/RTBI modes.
> Also this patches review the driver removing some Koption for selecting between
> chain and ring modes. REally useful to validate the driver also at build time.
> Before adding PTP, the extended descriptor support has been added because it
> is mandatory to save HW timestamp in new dedicated descriptors. Also in this
> case no Koption added.
> 
> Concerning the PTP, I have hacked/reviewed and tested many
> part of these patches also verifying the back compatibility on
> several HW and chips.
> 
> Concerning the SGMII/RGMII we have already discussed about the support
> in the net.dev Mailing list with Byungho where these patchs were partially
> analysed.
> So I have only ported them against the latest net-next (and on
> top of PTP). I have added some missing things: e.g. some parts of the
> ethtool for ANE. As we clarified with Byungho, we will add further
> enhancements on top of these patches if needed.
> 
> I have also built all against ARM/SH/X68 platforms and no issues on
> ST-Boxes.
> 
> Thx goes to Rayagond that wrote and tested the PTP and to Byungho for SGMII.
> 
> V2: This Version 2 has the fixes discussed in the ML, for example:
>     o completely remove the Koption... all the decisions are made at probe time
>     o review the PTP patches and better organize them just in two patches
>     o added all the fixes provided by Richard on PTP and CLK driver.

This looks a lot better, series applied, thanks.

^ permalink raw reply

* Re: [PATCH] bonding: cleanup unneeded rcu_read_lock()
From: David Miller @ 2013-03-26 16:50 UTC (permalink / raw)
  To: vfalico; +Cc: netdev, andy, fubar
In-Reply-To: <1364307002-11242-1-git-send-email-vfalico@redhat.com>

From: Veaceslav Falico <vfalico@redhat.com>
Date: Tue, 26 Mar 2013 15:10:02 +0100

> bond_resend_igmp_join_requests_delayed() calls _resend_igmp_join_requests()
> under rcu_read_lock(), while it gets its own rcu_read_lock() for the whole
> function. Remove the lock from the _delayed function.
> 
> Signed-off-by: Veaceslav Falico <vfalico@redhat.com>

Applied.

^ permalink raw reply

* Re: [PATCH net-next] MAINTAINERS: add netdev list for PTP (IEEE 1588)
From: David Miller @ 2013-03-26 16:50 UTC (permalink / raw)
  To: jbenc; +Cc: netdev, richardcochran
In-Reply-To: <4b0d96e199e0c4ff5efa90c14ea457067321125c.1364306426.git.jbenc@redhat.com>

From: Jiri Benc <jbenc@redhat.com>
Date: Tue, 26 Mar 2013 15:01:12 +0100

> Signed-off-by: Jiri Benc <jbenc@redhat.com>

Applied.

^ permalink raw reply

* Re: [PATCH net-next] ptp_pch: fix typo in module parameter description
From: David Miller @ 2013-03-26 16:49 UTC (permalink / raw)
  To: jbenc; +Cc: netdev, richardcochran, tshimizu818
In-Reply-To: <2eb67bf713f5c8fae6566b040690fa932087da5f.1364305861.git.jbenc@redhat.com>

From: Jiri Benc <jbenc@redhat.com>
Date: Tue, 26 Mar 2013 14:54:16 +0100

> Signed-off-by: Jiri Benc <jbenc@redhat.com>

Applied.

^ permalink raw reply

* [PATCH 2/2] iproute2: update ip-l2tp man page
From: James Chapman @ 2013-03-26 16:49 UTC (permalink / raw)
  To: netdev; +Cc: tlund, James Chapman
In-Reply-To: <1364316563-23303-1-git-send-email-jchapman@katalix.com>

Add documentation about the new l2spec_type parameter for "ip l2tp add
session".

Signed-off-by: James Chapman <jchapman@katalix.com>
---
:100644 100644 2df7ce2... 463878f... M	man/man8/ip-l2tp.8
 man/man8/ip-l2tp.8 |   14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/man/man8/ip-l2tp.8 b/man/man8/ip-l2tp.8
index 2df7ce2..463878f 100644
--- a/man/man8/ip-l2tp.8
+++ b/man/man8/ip-l2tp.8
@@ -52,6 +52,8 @@ ip-l2tp - L2TPv3 static unmanaged tunnel configuration
 .IR HEXSTR
 .RB " ]"
 .br
+.RB "[ " l2spec_type " { " none " | " default " } ]"
+.br
 .RB "[ " offset
 .IR OFFSET
 .RB " ] [ " peer_offset
@@ -239,6 +241,12 @@ e.g. 014d3636deadbeef. The value must match the cookie value set at
 the peer. It tells the local system what cookie value to expect to
 find in received L2TP packets. Default is to use no cookie.
 .TP
+.BI l2spec_type " L2SPECTYPE"
+set the layer2specific header type of the session.
+.br
+Valid values are:
+.BR none ", " udp "."
+.TP
 .BI offset " OFFSET"
 sets the byte offset from the L2TP header where user data starts in
 transmitted L2TP data packets. This is hardly ever used. If set, the
@@ -368,6 +376,12 @@ tunnels. Hello messages are used by L2TP clients and servers to detect
 link failures in order to automate tearing down and reestablishing
 dynamic tunnels. If a non-Linux peer supports Hello messages in
 unmanaged tunnels, it must be turned off to interoperate with Linux.
+.PP
+Linux defaults to use the Default Layer2SpecificHeader type as defined
+in the L2TPv3 protocol specification, RFC3931. This setting must be
+consistent with that configured at the peer. Some vendor
+implementations (e.g. Cisco) default to use a Layer2SpecificHeader
+type of None.
 .SH SEE ALSO
 .br
 .BR ip (8)
-- 
1.7.9.5

^ permalink raw reply related

* [PATCH 1/2] iproute2: add l2spec_type param to l2tp add session
From: James Chapman @ 2013-03-26 16:49 UTC (permalink / raw)
  To: netdev; +Cc: tlund, James Chapman

When unmanaged L2TP sessions are created using "ip l2tp add session",
there is no option to allow the session's Layer2SpecificHeader type to
be selected - the kernel's default setting is always used. For
interopability with some vendor equipment, it might be necessary to
use a different setting. So add a new l2spec_type parameter to the "ip
l2tp add session" parameter list, allowing operators to set a specific
Layer2SpecificHeader type. The kernel already exposes the setting as a
netlink attribute so it is straightforward to add support for it in
iproute2.

This change allows unmanaged L2TP sessions to be configured between
Linux and some Cisco equipment by specifying "l2spec_type none" in "ip
l2tp add session" command parameters.

Signed-off-by: James Chapman <jchapman@katalix.com>
---
:100644 100644 2d22317... 5cd8632... M	ip/ipl2tp.c
 ip/ipl2tp.c |   26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)

diff --git a/ip/ipl2tp.c b/ip/ipl2tp.c
index 2d22317..5cd8632 100644
--- a/ip/ipl2tp.c
+++ b/ip/ipl2tp.c
@@ -65,6 +65,8 @@ struct l2tp_parm {
 	int session:1;
 	int reorder_timeout;
 	const char *ifname;
+	uint8_t l2spec_type;
+	uint8_t l2spec_len;
 };
 
 struct l2tp_stats {
@@ -146,6 +148,8 @@ static int create_session(struct l2tp_parm *p)
 	addattr32(&req.n, 1024, L2TP_ATTR_SESSION_ID, p->session_id);
 	addattr32(&req.n, 1024, L2TP_ATTR_PEER_SESSION_ID, p->peer_session_id);
 	addattr16(&req.n, 1024, L2TP_ATTR_PW_TYPE, p->pw_type);
+	addattr8(&req.n, 1024, L2TP_ATTR_L2SPEC_TYPE, p->l2spec_type);
+	addattr8(&req.n, 1024, L2TP_ATTR_L2SPEC_LEN, p->l2spec_len);
 
 	if (p->mtu)		addattr16(&req.n, 1024, L2TP_ATTR_MTU, p->mtu);
 	if (p->recv_seq)	addattr(&req.n, 1024, L2TP_ATTR_RECV_SEQ);
@@ -271,6 +275,10 @@ static int get_response(struct nlmsghdr *n, void *arg)
 		p->session_id = rta_getattr_u32(attrs[L2TP_ATTR_SESSION_ID]);
 	if (attrs[L2TP_ATTR_PEER_SESSION_ID])
 		p->peer_session_id = rta_getattr_u32(attrs[L2TP_ATTR_PEER_SESSION_ID]);
+	if (attrs[L2TP_ATTR_L2SPEC_TYPE])
+		p->l2spec_type = rta_getattr_u8(attrs[L2TP_ATTR_L2SPEC_TYPE]);
+	if (attrs[L2TP_ATTR_L2SPEC_LEN])
+		p->l2spec_len = rta_getattr_u8(attrs[L2TP_ATTR_L2SPEC_LEN]);
 
 	p->udp_csum = !!attrs[L2TP_ATTR_UDP_CSUM];
 	if (attrs[L2TP_ATTR_COOKIE])
@@ -466,6 +474,7 @@ static void usage(void)
 	fprintf(stderr, "          session_id ID peer_session_id ID\n");
 	fprintf(stderr, "          [ cookie HEXSTR ] [ peer_cookie HEXSTR ]\n");
 	fprintf(stderr, "          [ offset OFFSET ] [ peer_offset OFFSET ]\n");
+	fprintf(stderr, "          [ l2spec_type L2SPEC ]\n");
 	fprintf(stderr, "       ip l2tp del tunnel tunnel_id ID\n");
 	fprintf(stderr, "       ip l2tp del session tunnel_id ID session_id ID\n");
 	fprintf(stderr, "       ip l2tp show tunnel [ tunnel_id ID ]\n");
@@ -476,6 +485,7 @@ static void usage(void)
 	fprintf(stderr, "       PORT   := { 0..65535 }\n");
 	fprintf(stderr, "       ID     := { 1..4294967295 }\n");
 	fprintf(stderr, "       HEXSTR := { 8 or 16 hex digits (4 / 8 bytes) }\n");
+	fprintf(stderr, "       L2SPEC := { none | default }\n");
 	exit(-1);
 }
 
@@ -486,6 +496,10 @@ static int parse_args(int argc, char **argv, int cmd, struct l2tp_parm *p)
 	if (argc == 0)
 		usage();
 
+	/* Defaults */
+	p->l2spec_type = L2TP_L2SPECTYPE_DEFAULT;
+	p->l2spec_len = 4;
+
 	while (argc > 0) {
 		if (strcmp(*argv, "encap") == 0) {
 			NEXT_ARG();
@@ -580,6 +594,18 @@ static int parse_args(int argc, char **argv, int cmd, struct l2tp_parm *p)
 			p->peer_cookie_len = slen / 2;
 			if (hex2mem(*argv, p->peer_cookie, p->peer_cookie_len) < 0)
 				invarg("cookie must be a hex string\n", *argv);
+		} else if (strcmp(*argv, "l2spec_type") == 0) {
+			NEXT_ARG();
+			if (strcasecmp(*argv, "default") == 0) {
+				p->l2spec_type = L2TP_L2SPECTYPE_DEFAULT;
+				p->l2spec_len = 4;
+			} else if (strcasecmp(*argv, "none") == 0) {
+				p->l2spec_type = L2TP_L2SPECTYPE_NONE;
+				p->l2spec_len = 0;
+			} else {
+				fprintf(stderr, "Unknown layer2specific header type \"%s\"\n", *argv);
+				exit(-1);
+			}
 		} else if (strcmp(*argv, "tunnel") == 0) {
 			p->tunnel = 1;
 		} else if (strcmp(*argv, "session") == 0) {
-- 
1.7.9.5

^ permalink raw reply related

* Re: [PATCH 3/3] net: wireless: iwlegacy: add CONFIG_PM_SLEEP to suspend/resume functions
From: David Miller @ 2013-03-26 16:47 UTC (permalink / raw)
  To: jg1.han; +Cc: netdev
In-Reply-To: <001d01ce29f0$1267de90$37379bb0$%han@samsung.com>

From: Jingoo Han <jg1.han@samsung.com>
Date: Tue, 26 Mar 2013 16:03:51 +0900

> Add CONFIG_PM_SLEEP to suspend/resume functions to fix the following
> build warning when CONFIG_PM_SLEEP is not selected. This is because
> sleep PM callbacks defined by SIMPLE_DEV_PM_OPS are only used when
> the CONFIG_PM_SLEEP is enabled.
> 
> drivers/net/wireless/iwlegacy/common.c:4894:1: warning: 'il_pci_suspend' defined but not used [-Wunused-function]
> drivers/net/wireless/iwlegacy/common.c:4912:1: warning: 'il_pci_resume' defined but not used [-Wunused-function]
> 
> Signed-off-by: Jingoo Han <jg1.han@samsung.com>

Applied to net-next

^ permalink raw reply

* Re: [PATCH 2/3] net: ethernet: atheros: add CONFIG_PM_SLEEP to suspend/resume functions
From: David Miller @ 2013-03-26 16:47 UTC (permalink / raw)
  To: jg1.han; +Cc: netdev
In-Reply-To: <001c01ce29f0$02ccd030$08667090$%han@samsung.com>

From: Jingoo Han <jg1.han@samsung.com>
Date: Tue, 26 Mar 2013 16:03:25 +0900

> Add CONFIG_PM_SLEEP to suspend/resume functions to fix the following
> build warning when CONFIG_PM_SLEEP is not selected. This is because
> sleep PM callbacks defined by SIMPLE_DEV_PM_OPS are only used when
> the CONFIG_PM_SLEEP is enabled.
> 
> drivers/net/ethernet/atheros/atlx/atl1.c:2861:12: warning: 'atl1_resume' defined but not used [-Wunused-function]
> 
> Signed-off-by: Jingoo Han <jg1.han@samsung.com>

Applied to net-next

^ permalink raw reply

* Re: [PATCH 1/3] net: ethernet: wiznet: add CONFIG_PM_SLEEP to suspend/resume functions
From: David Miller @ 2013-03-26 16:47 UTC (permalink / raw)
  To: jg1.han; +Cc: netdev
In-Reply-To: <001b01ce29ef$f09cbf10$d1d63d30$%han@samsung.com>

From: Jingoo Han <jg1.han@samsung.com>
Date: Tue, 26 Mar 2013 16:02:55 +0900

> Add CONFIG_PM_SLEEP to suspend/resume functions to fix the following
> build warning when CONFIG_PM_SLEEP is not selected. This is because
> sleep PM callbacks defined by SIMPLE_DEV_PM_OPS are only used when
> the CONFIG_PM_SLEEP is enabled.
> 
> drivers/net/ethernet/wiznet/w5100.c:758:12: warning: 'w5100_suspend' defined but not used [-Wunused-function]
> drivers/net/ethernet/wiznet/w5100.c:773:12: warning: 'w5100_resume' defined but not used [-Wunused-function]
> drivers/net/ethernet/wiznet/w5300.c:670:12: warning: 'w5300_suspend' defined but not used [-Wunused-function]
> drivers/net/ethernet/wiznet/w5300.c:685:12: warning: 'w5300_resume' defined but not used [-Wunused-function]
> 
> Signed-off-by: Jingoo Han <jg1.han@samsung.com>

Applied to net-next

^ permalink raw reply

* Re: [net-next 0/5] set transport header for untrusted packets
From: David Miller @ 2013-03-26 16:45 UTC (permalink / raw)
  To: jasowang; +Cc: netdev, linux-kernel, mst
In-Reply-To: <1364278799-37285-1-git-send-email-jasowang@redhat.com>

From: Jason Wang <jasowang@redhat.com>
Date: Tue, 26 Mar 2013 14:19:54 +0800

> We don't set transport header for untrusted packets in the past, but for the
> follwoing reasons, we need to do it now.
> 
> - Better packet length estimation (introduced in 1def9238) needs l4 header for
>   gso packets to compute the header length.
> - Some driver needs l4 header (e.g. ixgbe needs tcp header to do atr).
> 
> So this patches tries to set transport header for packets from untrusted source
> (netback, packet, tuntap, macvtap). Plus a fix for better estimation on packet
> length for DODGY packet.
> 
> Tested on tun/macvtap/packet, compile test on netback.

Looks good to me, series applied, thanks Jason.

^ permalink raw reply

* [PATCH 0/2] sky2: Bug fixes
From: Mirko Lindner @ 2013-03-26 16:38 UTC (permalink / raw)
  To: davem@davemloft.net; +Cc: netdev@vger.kernel.org, Stephen Hemminger

Please find here 2 bug fixes related to the sky2 driver

These are both patches against net-next but should be
applied to -stable as well.

Mirko Lindner (2):
  Receive Overflows not counted
  Threshold for Pause Packet is set wrong

 drivers/net/ethernet/marvell/sky2.c |    2 +-
 drivers/net/ethernet/marvell/sky2.h |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

-- 
1.7.10.4

^ permalink raw reply

* Re: [PATCH RFC] unix: account skb memory to receiving socket's sk_rmem_alloc on sending
From: Hannes Frederic Sowa @ 2013-03-26 16:42 UTC (permalink / raw)
  To: Eric Dumazet; +Cc: netdev, yannick, xiyou.wangcong, davem
In-Reply-To: <1364313218.1716.37.camel@edumazet-glaptop>

On Tue, Mar 26, 2013 at 08:53:38AM -0700, Eric Dumazet wrote:
> > This patch also changes the reporting of unix dgram rqueue size, as it
> > now reports not only the size of the first fragment but the amount of
> > readable memory for the socket.
> > 
> > Based on the patches from Yannick Koehler and Cong Wang.
> 
> This opens the possibility of a sender to flood a receiver, instead of
> being blocked by its own sndbuf.

Hm, the sender should get blocked by the receiver's rcvbuf. This opens the
possiblity to flood many receivers at once. But somehow this is the purpose of
this patch. Or am I missing something?

> Do we want such regression ? How many applications might rely on
> existing behavior ?

I tried to not break existing applications. The only way I can think about how
problems could arise would be by applications redoing the buffer calculations
in userspace?

I think it is a bug that a unix dgram socket can trick another dgram
socket into a situation where it cannot accept frames anymore (in case of a
ping-pong protocol).

^ permalink raw reply

* [PATCH 1/2] sky2: Receive Overflows not counted
From: Mirko Lindner @ 2013-03-26 16:38 UTC (permalink / raw)
  To: davem@davemloft.net; +Cc: netdev@vger.kernel.org, Stephen Hemminger

The sky2 driver doesn't count the Receive Overflows because the MAC 
interrupt for this event is not set in the MAC's interrupt mask.
The MAC's interrupt mask is set only for Transmit FIFO Underruns.

Fix: The correct setting should be (GM_IS_TX_FF_UR | GM_IS_RX_FF_OR)
Otherwise the Receive Overflow event will not generate any interrupt.
The  Receive Overflow interrupt is handled correctly

Signed-off-by: Mirko Lindner <mlindner@marvell.com>
---
 drivers/net/ethernet/marvell/sky2.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/marvell/sky2.h b/drivers/net/ethernet/marvell/sky2.h
index 615ac63..ec6dcd8 100644
--- a/drivers/net/ethernet/marvell/sky2.h
+++ b/drivers/net/ethernet/marvell/sky2.h
@@ -2074,7 +2074,7 @@ enum {
 	GM_IS_RX_FF_OR	= 1<<1,	/* Receive FIFO Overrun */
 	GM_IS_RX_COMPL	= 1<<0,	/* Frame Reception Complete */
 
-#define GMAC_DEF_MSK     GM_IS_TX_FF_UR
+#define GMAC_DEF_MSK     (GM_IS_TX_FF_UR | GM_IS_RX_FF_OR)
 };
 
 /*	GMAC_LINK_CTRL	16 bit	GMAC Link Control Reg (YUKON only) */
-- 
1.7.10.4

^ permalink raw reply related

* [PATCH 2/2] sky2: Threshold for Pause Packet is set wrong
From: Mirko Lindner @ 2013-03-26 16:38 UTC (permalink / raw)
  To: davem@davemloft.net; +Cc: netdev@vger.kernel.org, Stephen Hemminger

The sky2 driver sets the Rx Upper Threshold for Pause Packet generation to a
wrong value which leads to only 2kB of RAM remaining space. This can lead to
Rx overflow errors even with activated flow-control.

Fix: We should increase the value to 8192/8

Signed-off-by: Mirko Lindner <mlindner@marvell.com>
---
 drivers/net/ethernet/marvell/sky2.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/marvell/sky2.c b/drivers/net/ethernet/marvell/sky2.c
index fc07ca3..6a0e671 100644
--- a/drivers/net/ethernet/marvell/sky2.c
+++ b/drivers/net/ethernet/marvell/sky2.c
@@ -1067,7 +1067,7 @@ static void sky2_ramset(struct sky2_hw *hw, u16 q, u32 start, u32 space)
 		sky2_write32(hw, RB_ADDR(q, RB_RX_UTHP), tp);
 		sky2_write32(hw, RB_ADDR(q, RB_RX_LTHP), space/2);
 
-		tp = space - 2048/8;
+		tp = space - 8192/8;
 		sky2_write32(hw, RB_ADDR(q, RB_RX_UTPP), tp);
 		sky2_write32(hw, RB_ADDR(q, RB_RX_LTPP), space/4);
 	} else {
-- 
1.7.10.4

^ permalink raw reply related

* Re: [PATCH net-next] netlink: remove duplicated NLMSG_ALIGN
From: David Miller @ 2013-03-26 16:40 UTC (permalink / raw)
  To: tgraf; +Cc: honkiko, netdev, stephen, zhiguo.hong
In-Reply-To: <20130326111347.GA20395@casper.infradead.org>

From: Thomas Graf <tgraf@suug.ch>
Date: Tue, 26 Mar 2013 11:13:47 +0000

> On 03/26/13 at 01:04pm, Hong Zhiguo wrote:
>> NLMSG_HDRLEN is already aligned value. It's for directly reference
>> without extra alignment.
>> 
>> The redundant alignment here may confuse the API users.
>> 
>> Signed-off-by: Hong Zhiguo <honkiko@gmail.com>
> 
> Acked-by: Thomas Graf <tgraf@suug.ch>

Applied, thanks.

^ permalink raw reply

* Re: [PATCH v2 net-next 00/12] 6lowpan: Some more bug fixes
From: David Miller @ 2013-03-26 16:39 UTC (permalink / raw)
  To: tony.cheneau
  Cc: eric.dumazet, alan, alex.bluesman.smirnov, netdev,
	linux-zigbee-devel
In-Reply-To: <1364270372-19430-1-git-send-email-tony.cheneau@amnesiak.org>

From: Tony Cheneau <tony.cheneau@amnesiak.org>
Date: Mon, 25 Mar 2013 23:59:20 -0400

> This patchset fixes serious bugs within the 6LoWPAN modules. I wrote a script
> (available at [1]) to prove the issues are real.  One can try and see that
> without these patches, most of the test fail (e.g. packet dropped by the
> receiver or node crashing). With all patches applied, all tests succeed. The
> tests themselves are very basic: sending ICMP packets, sending UDP packets,
> sending TCP packets, varying size of the packets. This actually triggers some
> 6LoWPAN specific code, namely fragmentation, packet reassembly and header
> compression.
> 
> This code passed the checkpatch.pl tool with a few warnings, that I believe
> are OK. It should apply cleanly on the latest net-next.

Series applied, thanks.

^ permalink raw reply

* Re: [PATCH v2 net-next] netlink: have length check of rtnl msg before deref
From: David Miller @ 2013-03-26 16:36 UTC (permalink / raw)
  To: tgraf; +Cc: honkiko, netdev, stephen
In-Reply-To: <20130326085937.GE27194@casper.infradead.org>

From: Thomas Graf <tgraf@suug.ch>
Date: Tue, 26 Mar 2013 08:59:37 +0000

> On 03/26/13 at 11:36am, Hong Zhiguo wrote:
>> When the legacy array rtm_min still exists, the length check within
>> these functions is covered by rtm_min[RTM_NEWTFILTER],
>> rtm_min[RTM_NEWQDISC] and rtm_min[RTM_NEWTCLASS].
>> 
>> But after Thomas Graf removed rtm_min several days ago, these checks
>> are missing. Other doit functions should be OK.
>> 
>> Signed-off-by: Hong Zhiguo <honkiko@gmail.com>
> 
> Acked-by: Thomas Graf <tgraf@suug.ch>

Applied, thanks.

^ permalink raw reply

* Re: unmanaged L2TPv3 ethernet pseudowire Cisco <=> Linux
From: James Chapman @ 2013-03-26 16:26 UTC (permalink / raw)
  To: Tomas Agartz; +Cc: netdev
In-Reply-To: <Pine.LNX.4.61.1303241153000.20041@envy.nxs.se>

On Sun, Mar 24, 2013 at 11:05 AM, Tomas Agartz <tlund@nxs.se> wrote:
> I am trying to set up an unmanaged L2TPv3 ethernet pseudowire from a Cisco
> 7200 (running IOS 15.2M) and a Linux box with kernel 3.2 (Debian Wheezy).
>
> Using Wireshark I can see L2TPv3 packets arriving from the Cisco router, but
> they are not parsed correctly by the kernel and only a few (mangled) frames
> are showing up on the l2tpeth0 interface.
>
> The actualy tunnel packets that arrive from the cisco router looks like
> this: [IPv4][L2TPv3][payload]. The L2TPv3 header is only 4 bytes, the bytes
> 00 00 00 c8 (just the session id, 200) and the payload is an ethernet frame
> recived by the Cisco on the interface where the tunnel is configured. A
> quick glance at the RFC seem to indicate that this is correct.
>
> I am assuming that the kernel is trying to parse more data then just the 4
> bytes, for example expecting a cookie and/or sequence numbers. It is also
> possible it is expecting a L2 sublayer header after the L2TPv3 header. I had
> to tune wireshark and set cookie size to "0", L2-Specific sublayer to "none"
> and tell it to decode the packet contents as "ethernet". With these
> settings, it is showing me exactly what I am expecting.

The issue is that Linux and Cisco use a different default for the
L2SpecificSublayer header setting and neither implementation provides
a config option to change its setting. :-( The Linux default is to use
the Default L2SpecificSublayer as defined in the RFC. Unfortunately
the Cisco default is to use no L2SpecificSublayer.

The kernel already has an API to allow the L2SpecificSublayer setting
to be configured. The missing piece is an iproute2 l2tp config option
to configure it. I'll work on an iproute2 patch now to allow this
setting to be configured.

> To configure the tunnel in the linux end, I have done this:
>
> ip l2tp add tunnel remote 172.16.0.1 local 192.168.0.1 tunnel_id 200
> peer_tunnel_id 200 encap ip
> ip l2tp add session tunnel_id 200 session_id 200 peer_session_id 200
>
> The cisco has the following config:
> !
> interface GigabitEthernet0/0
>  no ip address
>  xconnect 192.168.0.1 200 encapsulation l2tpv3 manual pw-class tlund
>   l2tp id 200 200
> !
> pseudowire-class tlund
>  encapsulation l2tpv3
>  interworking ethernet
>  protocol none
>  ip local interface Loopback0
> !
>
> I can not understand how Linux could possibly auto-detect the cookie size
> and know what kind L2 sublayer header to expect, meaning it needs to be
> configured. Is there some other tool outside of iproute2 that can be used to
> configure these aspect of the L2TPv3 tunnel in the Linux side?

For unmanaged tunnels, these parameters must be manually configured
consistently at each side. Both Cisco and Linux default to use no
cookies and both already have config parameters to set cookie
parameters, if needed. However, for L2SpecificSublayer this isn't the
case. We need to add a config option on the Linux side to force the
same setting as Cisco is using.

For managed tunnels, the L2TP control protocol (implemented by a
userspace daemon on Linux) would take care of negotiating these
settings with the peer and configuring the kernel appropriately.

>
> Best regards,
> Tomas

James

^ permalink raw reply

* Re: [PATCH Resend] af_unix: dont send SCM_CREDENTIAL when dest socket is NULL
From: David Miller @ 2013-03-26 16:34 UTC (permalink / raw)
  To: eric.dumazet; +Cc: dingtianhong, edumazet, lizefan, huxinwei, netdev
In-Reply-To: <1364272687.1716.12.camel@edumazet-glaptop>

From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Mon, 25 Mar 2013 21:38:07 -0700

> On Tue, 2013-03-26 at 11:02 +0800, dingtianhong wrote:
>> SCM_SCREDENTIALS should apply to write() syscalls only either source or destination
>> socket asserted SOCK_PASSCRED. The original implememtation in maybe_add_creds is wrong,
>> and breaks several LSB testcases ( i.e. /tset/LSB.os/netowkr/recvfrom/T.recvfrom).
>> 
>> Origionally-authored-by: Karel Srot <ksrot@redhat.com>
>> Signed-off-by: Ding Tianhong <dingtianhong@huawei.com>
>> ---
>>  net/unix/af_unix.c | 4 ++--
>>  1 file changed, 2 insertions(+), 2 deletions(-)
>> 
>> diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c
>> index 51be64f..99189fd 100644
>> --- a/net/unix/af_unix.c
>> +++ b/net/unix/af_unix.c
>> @@ -1413,8 +1413,8 @@ static void maybe_add_creds(struct sk_buff *skb, const struct socket *sock,
>>  	if (UNIXCB(skb).cred)
>>  		return;
>>  	if (test_bit(SOCK_PASSCRED, &sock->flags) ||
>> -	    !other->sk_socket ||
>> -	    test_bit(SOCK_PASSCRED, &other->sk_socket->flags)) {
>> +	    (other->sk_socket &&
>> +	    test_bit(SOCK_PASSCRED, &other->sk_socket->flags))) {
>>  		UNIXCB(skb).pid  = get_pid(task_tgid(current));
>>  		UNIXCB(skb).cred = get_current_cred();
>>  	}
> 
> Acked-by: Eric Dumazet <edumazet@google.com>

Applied and queued up for -stable.

 

^ permalink raw reply

* Re: [PATCH net-next (TAKE 4) 0/6] IPv6 over Firewire
From: David Miller @ 2013-03-26 16:32 UTC (permalink / raw)
  To: yoshfuji; +Cc: stefanr, netdev, linux1394-devel, stephan.gatzka
In-Reply-To: <51509696.6060600@linux-ipv6.org>

From: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Date: Tue, 26 Mar 2013 03:25:26 +0900

> This is take 4 of supporting IPv6 over Firewire (IEEE 1394) based on
> RFC3146.
> 
> Take 3->4:
> - Fix receiving 1394 ARP, which comes without arp$tha.
> - Remove rfc3146 unit directory on module exit.
> - other minor clean-ups - minimize diffs.

Series applied, thanks.

^ permalink raw reply

* Re: defxx: skb_push() failing?
From: Eric Dumazet @ 2013-03-26 16:30 UTC (permalink / raw)
  To: David Oostdyk; +Cc: netdev@vger.kernel.org, macro@linux-mips.org
In-Reply-To: <5151C6C3.6090408@ll.mit.edu>

On Tue, 2013-03-26 at 12:03 -0400, David Oostdyk wrote:
> On 03/26/13 11:15, Eric Dumazet wrote:
> > On Tue, 2013-03-26 at 10:29 -0400, David Oostdyk wrote:
> >> Hello,
> >>
> >> In dfx_xmt_queue_pkt() in defxx.c, there is a skb_push(3) call which
> >> makes room for 3 packet request header bytes.  There is some discussion
> >> in the driver explaining why those three bytes will be available.  I
> >> have an old FDDI card that I'm trying to bring up:
> >>
> >> 05:05.0 FDDI network controller: Digital Equipment Corporation
> >> PCI-to-PDQ Interface Chip [PFI] (rev 02)
> >>
> >> Most skbuffs that come through dfx_xmit_queue_pkt() have 11 bytes
> >> between skb->head and skb->data.  On the other hand, at almost exactly
> >> 60-second intervals, an skb arrives that has zero bytes between
> >> skb->head and skb->data.  This normally causes a kernel panic, and for
> >> the time I just skip over such skb's.
> >>
> >> Does anyone have advice on where I should start digging to find the
> >> cause of this?
> >>
> > Have you read comments in defxx.c file around line 151 ?
> >
> > If one skb arrives with not enough headroom, you could add a
> >
> > WARN_ON_ONCE(skb_headroom(skb) < 3);
> >
> > and report stack trace so that we can identify and fix the caller.
> >
> >
> >
> 
> I have read the comments, and alloc_fddidev() seems to set the 
> hard_header_len as described.
> 
> As for the stack trace, thanks for the tip!  Here is the output 
> (including various defxx debug statements):
> 
> [  350.312482] defxx: v1.10 2006/12/14  Lawrence V. Stefani and others
> [  350.312582] In dfx_driver_init...
> [  350.312583] In dfx_bus_init...
> [  350.312585] In dfx_bus_config_check...
> [  351.699416] 0000:05:05.0: DEFPA at addr = 0xf9eeff80, IRQ = 26, 
> Hardware addr = 00-60-b0-58-48-53
> [  351.699425] 0000:05:05.0: Descriptor block virt = FFFF8800CB834000, 
> phys = CB834000
> [  351.699426] 0000:05:05.0: Command Request buffer virt = 
> FFFF8800CB835380, phys = CB835380
> [  351.699427] 0000:05:05.0: Command Response buffer virt = 
> FFFF8800CB835580, phys = CB835580
> [  351.699428] 0000:05:05.0: Receive buffer block virt = 
> FFFF8800CB835780, phys = CB835780
> [  351.699429] 0000:05:05.0: Consumer block virt = FFFF8800CB835780, 
> phys = CB835780
> [  351.700049] 0000:05:05.0: registered as fddi0
> [  351.756194] In dfx_open...
> [  351.756215] In dfx_adap_init...
> [  353.927747] fddi0: Multicast address table updated!  Added 1 addresses.
> [  353.930352] fddi0: Adapter filters updated!
> [  353.975887] fddi0: Multicast address table updated!  Added 1 addresses.
> [  353.978492] fddi0: Adapter filters updated!
> [  354.043455] fddi0: Multicast address table updated!  Added 2 addresses.
> [  354.046359] fddi0: Adapter filters updated!
> [  354.097315] fddi0: Multicast address table updated!  Added 3 addresses.
> [  354.099919] fddi0: Adapter filters updated!
> [  354.204301] fddi0: Multicast address table updated!  Added 3 addresses.
> [  354.207107] fddi0: Adapter filters updated!
> [  354.257972] fddi0: Multicast address table updated!  Added 3 addresses.
> [  354.261577] fddi0: Adapter filters updated!
> [  362.976038] ------------[ cut here ]------------
> [  362.976044] WARNING: at drivers/net/fddi/defxx.c:3202 
> dfx_xmt_queue_pkt+0xa2/0x2f2 [defxx]()
> [  362.976046] Hardware name: Precision WorkStation 490
> [  362.976047] Modules linked in: defxx snd_hda_codec_idt snd_hda_intel 
> snd_hda_codec snd_hwdep snd_pcm iTCO_wdt snd_page_alloc lpc_ich 
> snd_timer mfd_core i5000_edac rng_core i2c_i801 fddi rtc_cmos [last 
> unloaded: defxx]
> [  362.976066] Pid: 1773, comm: aoe_tx Tainted: G          I 
> 3.7.10-hippi+ #6
> [  362.976068] Call Trace:
> [  362.976076]  [<ffffffff810357e7>] warn_slowpath_common+0x7e/0x96
> [  362.976080]  [<ffffffff81035814>] warn_slowpath_null+0x15/0x17
> [  362.976083]  [<ffffffffa0063213>] dfx_xmt_queue_pkt+0xa2/0x2f2 [defxx]
> [  362.976088]  [<ffffffff813c3401>] ? map_single+0x45/0x45
> [  362.976093]  [<ffffffff819175a8>] dev_hard_start_xmit+0x288/0x398
> [  362.976097]  [<ffffffff81929d1c>] sch_direct_xmit+0x72/0x19b
> [  362.976100]  [<ffffffff819179ec>] dev_queue_xmit+0x145/0x339
> [  362.976105]  [<ffffffff8184ab20>] tx+0x1c/0x42
> [  362.976108]  [<ffffffff818489a2>] kthread+0x5e/0xbf
> [  362.976113]  [<ffffffff81056451>] ? try_to_wake_up+0x239/0x239
> [  362.976116]  [<ffffffff81848944>] ? rexmit_timer+0x349/0x349
> [  362.976119]  [<ffffffff8104c678>] kthread+0xb5/0xbd
> [  362.976122]  [<ffffffff8104c5c3>] ? __kthread_parkme+0x67/0x67
> [  362.976127]  [<ffffffff81a314ec>] ret_from_fork+0x7c/0xb0
> [  362.976129]  [<ffffffff8104c5c3>] ? __kthread_parkme+0x67/0x67
> [  362.976131] ---[ end trace ce553e95611628f3 ]---
> 
> 
> Thanks again for any help!

Are you really using AOE ?

drivers/block/aoe/aoenet.c can apparently call dev_queue_xmit() with non
compliant skbs.

Please try following patch :

diff --git a/drivers/block/aoe/aoecmd.c b/drivers/block/aoe/aoecmd.c
index 25ef5c0..92b6d7c 100644
--- a/drivers/block/aoe/aoecmd.c
+++ b/drivers/block/aoe/aoecmd.c
@@ -51,8 +51,9 @@ new_skb(ulong len)
 {
 	struct sk_buff *skb;
 
-	skb = alloc_skb(len, GFP_ATOMIC);
+	skb = alloc_skb(len + MAX_HEADER, GFP_ATOMIC);
 	if (skb) {
+		skb_reserve(skb, MAX_HEADER);
 		skb_reset_mac_header(skb);
 		skb_reset_network_header(skb);
 		skb->protocol = __constant_htons(ETH_P_AOE);

^ permalink raw reply related

* Re: [PATCH net-next 2/2] net/davinci_emac: use clk_{prepare|unprepare}
From: David Miller @ 2013-03-26 16:29 UTC (permalink / raw)
  To: nsekhar; +Cc: mturquette, netdev, davinci-linux-open-source, rjw
In-Reply-To: <515172F7.3050600@ti.com>

From: Sekhar Nori <nsekhar@ti.com>
Date: Tue, 26 Mar 2013 15:35:43 +0530

> This patch can then be dropped for now, but 1/2 can still be applied.
> That one is pretty harmless!

I've applied it.

^ permalink raw reply

* Re: [PATCH v4 net-next 0/5] Tunneling: Tunnel restructuring.
From: David Miller @ 2013-03-26 16:27 UTC (permalink / raw)
  To: pshelar; +Cc: netdev, jesse
In-Reply-To: <1364258969-3120-1-git-send-email-pshelar@nicira.com>

From: Pravin B Shelar <pshelar@nicira.com>
Date: Mon, 25 Mar 2013 17:49:29 -0700

> Following patch series restructure GRE and IPIP tunneling code
> to make it modular. It adds ip_tunnel module which acts as
> generic tunneling layer which has common code.
> 
> These patches do not change any functionality.
> v3:v4:
>  - Fixed compilation error in ipv6.
>  - Few coding style fixes.
> v2-v3:
>  - Use GPL exports for all export symbols.
>  - Set default config NET_IP_TUNNEL to m.
> v1-v2:
>  - Dropped patch to convert gre_proto_lock to rtnl lock.

Series applied, thanks.

^ permalink raw reply

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

From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Date: Tue, 26 Mar 2013 03:42:28 -0700

> This series contains updates to ixgbevf and igb.
> 
> The ixgbevf calls to pci_disable_msix() and to free the msix_entries
> memory should not occur if device open fails.  Instead they should be
> called during device driver removal to balance with the call to
> pci_enable_msix() and the call to allocate msix_entries memory
> during the device probe and driver load.
> 
> The remaining 4 of 5 igb patches are simple 1-3 line patches to fix
> several issues such as possible null pointer dereference, PHC stopping
> on max frequency, make sensor info static and SR-IOV initialization
> reordering.
> 
> The remaining igb patch to fix anti-spoofing config fixes a problem
> in i350 where anti spoofing configuration was written into a wrong
> register.
> 
> The following are changes since commit a79ca223e029aa4f09abb337accf1812c900a800:
>   ipv6: fix bad free of addrconf_init_net
> and are available in the git repository at:
>   git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net master

Pulled, thanks Jeff.

^ permalink raw reply


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