Netdev List
 help / color / mirror / Atom feed
* Re: [PATCH net-next-2.6] bonding: fix 802.3ad standards compliance error
From: David Miller @ 2009-11-16  6:22 UTC (permalink / raw)
  To: fubar; +Cc: netdev, martin
In-Reply-To: <3048.1258153981@death.nxdomain.ibm.com>

From: Jay Vosburgh <fubar@us.ibm.com>
Date: Fri, 13 Nov 2009 15:13:01 -0800

> 	The language of 802.3ad 43.4.9 requires the "recordPDU" function
> to, in part, compare the Partner parameter values in a received LACPDU
> to the stored Actor values.  If those match, then the Partner's
> synchronization state is set to true.
> 
> 	The current 802.3ad implementation is performing these steps out
> of order; first, the synchronization check is done, then the paramters are
> checked to see if they match (the synch check being done against a match
> check of a prior LACPDU).  This causes delays in establishing aggregators
> in some circumstances.
 ...
> Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>

Applied, thanks.

A patch that cleans up all of the non-standard stuff in these
sources, as pointed out by Stephen, would be most welcome.

^ permalink raw reply

* Re: [PATCH] smsc911x: Fix Console Hang when bringing the interface down.
From: David Miller @ 2009-11-16  6:18 UTC (permalink / raw)
  To: srk; +Cc: netdev
In-Reply-To: <1258028078-10933-1-git-send-email-srk@ti.com>

From: Sriramakrishnan <srk@ti.com>
Date: Thu, 12 Nov 2009 17:44:38 +0530

> In the NAPI poll function, check for netif_running() is unnecassary.
> In addition to associated runtime overhead, it also results in
> continuous softirq loop when the interface is brought down under heavy
> traffic(tested with Traffic Generator).Once the interface is disabled,
> the poll function always returns zero(with the check for netif_running)
> and napi_complete() would never get called resulting in softirq loop.
> 
> Signed-off-by: Sriramakrishnan <srk@ti.com>

Applied to net-2.6

^ permalink raw reply

* Re: [PATCH] TI Davinci EMAC : Fix Console Hang when bringing the interface down
From: David Miller @ 2009-11-16  6:17 UTC (permalink / raw)
  To: srk; +Cc: netdev
In-Reply-To: <1258026942-2947-1-git-send-email-srk@ti.com>

From: Sriramakrishnan <srk@ti.com>
Date: Thu, 12 Nov 2009 17:25:42 +0530

> In the NAPI poll function(emac_poll), check for netif_running()
> is unnecassary. In addition to associated runtime overhead, it
> also results in a continuous softirq loop when the interface is
> brought down under heavy traffic(tested wit Traffic Generator).
> Once the interface is disabled, the poll function always returns
> zero(with the check for netif_running) and napi_complete() would
> never get called resulting in softirq loop.
> 
> Signed-off-by: Sriramakrishnan <srk@ti.com>
> Acked-by: Chaithrika U S <chaithrika@ti.com>

Applied to net-2.6

^ permalink raw reply

* Re: [PATCH] ixgbe: Fixing EEH handler to handle more than one error
From: David Miller @ 2009-11-16  6:16 UTC (permalink / raw)
  To: leitao; +Cc: netdev, peter.p.waskiewicz.jr, jeffrey.t.kirsher
In-Reply-To: <1257878267-7489-1-git-send-email-leitao@linux.vnet.ibm.com>

From: leitao@linux.vnet.ibm.com
Date: Tue, 10 Nov 2009 13:37:47 -0500

> After commmit 4b77b0a2ba27d64f58f16d8d4d48d8319dda36ff EEH breaks
> after the second error, since it calls pci_restore_state()
> but it returns 0, since pci->state_saved is false.
> 
> So, this patch just call pci_save_state() after pci_restore_state().
> 
> Signed-off-by: Breno Leitao <leitao@linux.vnet.ibm.com>

Intel folks, are you integrating or looking at this patch?

Thanks.

^ permalink raw reply

* Re: [PATCH 00/20] tg3: 5717 updates
From: David Miller @ 2009-11-16  6:15 UTC (permalink / raw)
  To: mcarlson; +Cc: netdev, andy
In-Reply-To: <1258153432-7036-1-git-send-email-mcarlson@broadcom.com>

From: "Matt Carlson" <mcarlson@broadcom.com>
Date: Fri, 13 Nov 2009 15:03:32 -0800

> This patchset implements the final set of changes required for
> 5717 support.

Looks good, all applied, thanks!

^ permalink raw reply

* Re: [net-next 2/2] iwmc3200top: simplify the driver version
From: David Miller @ 2009-11-16  6:09 UTC (permalink / raw)
  To: tomas.winkler
  Cc: netdev, linux-mmc, yi.zhu, inaky.perez-gonzalez, guy.cohen,
	ron.rindjunsky
In-Reply-To: <1258223796-8486-2-git-send-email-tomas.winkler@intel.com>

From: Tomas Winkler <tomas.winkler@intel.com>
Date: Sat, 14 Nov 2009 20:36:36 +0200

> drop the version parts not needed for in-tree driver
> 
> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>

Applied.

^ permalink raw reply

* Re: [PATCH NEXT] netxen: update MAINTAINERS
From: David Miller @ 2009-11-16  6:09 UTC (permalink / raw)
  To: amit.salecha; +Cc: netdev, dhananjay
In-Reply-To: <1258166257-26286-1-git-send-email-amit.salecha@qlogic.com>

From: Amit Kumar Salecha <amit.salecha@qlogic.com>
Date: Fri, 13 Nov 2009 18:37:37 -0800

> Changing MAINTAINERS for netxen nic driver.
> 
> Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>

Applied.

^ permalink raw reply

* Re: [PATCH] check the return value of ndo_select_queue()
From: David Miller @ 2009-11-16  6:09 UTC (permalink / raw)
  To: eric.dumazet; +Cc: xiaosuo, netdev
In-Reply-To: <4AFEA486.1050106@gmail.com>

From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Sat, 14 Nov 2009 13:37:26 +0100

> Changli Gao a écrit :
>> 
>> It seems better than mime.
>> 
>> 
> 
> Well, it's still your patch :)

Applied, thanks everyone :-)

^ permalink raw reply

* Re: [net-next 1/2] iwmc3200top: use prefered style for the device table.
From: David Miller @ 2009-11-16  6:09 UTC (permalink / raw)
  To: tomas.winkler
  Cc: netdev, linux-mmc, yi.zhu, inaky.perez-gonzalez, guy.cohen,
	ron.rindjunsky
In-Reply-To: <1258223796-8486-1-git-send-email-tomas.winkler@intel.com>

From: Tomas Winkler <tomas.winkler@intel.com>
Date: Sat, 14 Nov 2009 20:36:35 +0200

> Use device id number directly accompany with
> comment rather then a #define
> 
> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>

Applied.

^ permalink raw reply

* Re: [PATCH net-next] net: Optimize hard_start_xmit() return checking
From: David Miller @ 2009-11-16  6:09 UTC (permalink / raw)
  To: jarkao2; +Cc: netdev, kaber
In-Reply-To: <20091115172012.GA2976@ami.dom.local>

From: Jarek Poplawski <jarkao2@gmail.com>
Date: Sun, 15 Nov 2009 18:20:12 +0100

> Recent changes in the TX error propagation require additional checking
> and masking of values returned from hard_start_xmit(), mainly to
> separate cases where skb was consumed. This aim can be simplified by
> changing the order of NETDEV_TX and NET_XMIT codes, because the latter
> are treated similarly to negative (ERRNO) values.
> 
> After this change much simpler dev_xmit_complete() is also used in
> sch_direct_xmit(), so it is moved to netdevice.h.
> 
> Additionally NET_RX definitions in netdevice.h are moved up from
> between TX codes to avoid confusion while reading the TX comment.
> 
> Signed-off-by: Jarek Poplawski <jarkao2@gmail.com>

Looks good, applied, thanks!

^ permalink raw reply

* Re: [patch 0/5] s390: qeth patches for 2.6.33
From: David Miller @ 2009-11-16  5:23 UTC (permalink / raw)
  To: frank.blaschka; +Cc: netdev, linux-s390
In-Reply-To: <20091112101140.882313000@de.ibm.com>


I'm still waiting for you to reimplement patch #4 with the
TSO sysfs bits removed...

^ permalink raw reply

* Re: [RFC] vlan: GRO rx statistics
From: David Miller @ 2009-11-16  5:21 UTC (permalink / raw)
  To: eric.dumazet; +Cc: herbert, netdev
In-Reply-To: <4B00581C.3060303@gmail.com>

From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Sun, 15 Nov 2009 20:35:56 +0100

> vlan_hwaccel_do_receive() has no napi context.

But this is a choice :-)  And being able to split up the RX
counters would be another reason to potentially change that
choice.

^ permalink raw reply

* Re: [PATCH] forcedeth: mac address fix
From: David Miller @ 2009-11-16  5:17 UTC (permalink / raw)
  To: stas; +Cc: aabdulla, yinghai, netdev, linux-kernel
In-Reply-To: <1258187485-11549-1-git-send-email-stas@lvk.cs.msu.su>

From: "Stanislav O\. Bezzubtsev" <stas@lvk.cs.msu.su>
Date: Sat, 14 Nov 2009 11:31:25 +0300

> Use the existing random_ether_addr() to generate random MAC
> instead of doing it by-hand.
> 
> Signed-off-by: Stanislav O. Bezzubtsev <stas@lvk.cs.msu.su>

Applied, thank you.

^ permalink raw reply

* Re: [PATCH] can: add the missing netlink get_xstats_size callback
From: David Miller @ 2009-11-16  5:16 UTC (permalink / raw)
  To: wg; +Cc: netdev, socketcan-core
In-Reply-To: <4AFFECCC.8000204@grandegger.com>

From: Wolfgang Grandegger <wg@grandegger.com>
Date: Sun, 15 Nov 2009 12:58:04 +0100

> David Miller wrote:
>> From: Wolfgang Grandegger <wg@grandegger.com>
>> Date: Thu, 12 Nov 2009 16:34:05 +0100
>> 
>>> This patch adds the missing "get_xstats_size" callback for the
>>> netlink interface, which is required if "fill_xstats" is used,
>>> as pointed out by Patrick McHardy.
>>>
>>> Signed-off-by: Wolfgang Grandegger <wg@grandegger.com>
>> 
>> Applied.
> 
> It would make sense to apply this patch to net-2.6 as well.

I only applied it to net-2.6

^ permalink raw reply

* Re: [PATCH net-next-2.6] r6040: fix version printing
From: David Miller @ 2009-11-16  5:15 UTC (permalink / raw)
  To: florian; +Cc: netdev
In-Reply-To: <200911151449.43750.florian@openwrt.org>

From: Florian Fainelli <florian@openwrt.org>
Date: Sun, 15 Nov 2009 14:49:43 +0100

> The version string already contains the printk level
> specifying it again results in the following message
> being printed:
> <6>r6040: RDC R6040 NAPI ...
> 
> Signed-off-by: Florian Fainelli <florian@openwrt.org>

Applied, thanks.

^ permalink raw reply

* Re: Pull request: bluetooth-2.6 2009-11-16
From: David Miller @ 2009-11-16  5:01 UTC (permalink / raw)
  To: marcel; +Cc: netdev
In-Reply-To: <cover.1258331614.git.marcel@holtmann.org>

From: Marcel Holtmann <marcel@holtmann.org>
Date: Mon, 16 Nov 2009 01:48:20 +0100

> Please pull from
> 
>     git://git.kernel.org/pub/scm/linux/kernel/git/holtmann/bluetooth-2.6.git master

Pulled, thanks a lot.

^ permalink raw reply

* Re: [PATCH v1 resent] net: TCP_MSS_DEFAULT, TCP_MSS_DESIRED
From: David Miller @ 2009-11-16  4:54 UTC (permalink / raw)
  To: william.allen.simpson; +Cc: netdev, linux-kernel
In-Reply-To: <4B00A858.8000705@gmail.com>


I already applied this patch to net-next-2.6, there is no need
to resend it.

^ permalink raw reply

* [PATCH v1 resent] net: TCP_MSS_DEFAULT, TCP_MSS_DESIRED
From: William Allen Simpson @ 2009-11-16  1:18 UTC (permalink / raw)
  To: Linux Kernel Network Developers; +Cc: Linux Kernel Developers, David Miller

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

Define two symbols needed in both kernel and user space.

Remove old (somewhat incorrect) kernel variant that wasn't used in
most cases.  Default should apply to both RMSS and SMSS (RFC2581).

Replace numeric constants with defined symbols.

Stand-alone patch, originally developed for TCPCT.

Signed-off-by: William.Allen.Simpson@gmail.com
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
---
    include/linux/tcp.h      |    6 ++++++
    include/net/tcp.h        |    3 ---
    net/ipv4/tcp_input.c     |    4 ++--
    net/ipv4/tcp_ipv4.c      |    6 +++---
    net/ipv4/tcp_minisocks.c |    2 +-
    net/ipv6/tcp_ipv6.c      |    2 +-
    6 files changed, 13 insertions(+), 10 deletions(-)


[-- Attachment #2: TCP_MSSv1.patch --]
[-- Type: text/plain, Size: 4018 bytes --]

diff --git a/include/linux/tcp.h b/include/linux/tcp.h
index eeecb85..32d7d77 100644
--- a/include/linux/tcp.h
+++ b/include/linux/tcp.h
@@ -81,6 +81,12 @@ enum {
 	TCP_DATA_OFFSET = __cpu_to_be32(0xF0000000)
 }; 
 
+/*
+ * TCP general constants
+ */
+#define TCP_MSS_DEFAULT		 536U	/* IPv4 (RFC1122, RFC2581) */
+#define TCP_MSS_DESIRED		1220U	/* IPv6 (tunneled), EDNS0 (RFC3226) */
+
 /* TCP socket options */
 #define TCP_NODELAY		1	/* Turn off Nagle's algorithm. */
 #define TCP_MAXSEG		2	/* Limit MSS */
diff --git a/include/net/tcp.h b/include/net/tcp.h
index 25bf3ba..a413e9f 100644
--- a/include/net/tcp.h
+++ b/include/net/tcp.h
@@ -62,9 +62,6 @@ extern void tcp_time_wait(struct sock *sk, int state, int timeo);
 /* Minimal accepted MSS. It is (60+60+8) - (20+20). */
 #define TCP_MIN_MSS		88U
 
-/* Minimal RCV_MSS. */
-#define TCP_MIN_RCVMSS		536U
-
 /* The least MTU to use for probing */
 #define TCP_BASE_MSS		512
 
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
index be0c5bf..cc306ac 100644
--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
@@ -140,7 +140,7 @@ static void tcp_measure_rcv_mss(struct sock *sk, const struct sk_buff *skb)
 		 * "len" is invariant segment length, including TCP header.
 		 */
 		len += skb->data - skb_transport_header(skb);
-		if (len >= TCP_MIN_RCVMSS + sizeof(struct tcphdr) ||
+		if (len >= TCP_MSS_DEFAULT + sizeof(struct tcphdr) ||
 		    /* If PSH is not set, packet should be
 		     * full sized, provided peer TCP is not badly broken.
 		     * This observation (if it is correct 8)) allows
@@ -411,7 +411,7 @@ void tcp_initialize_rcv_mss(struct sock *sk)
 	unsigned int hint = min_t(unsigned int, tp->advmss, tp->mss_cache);
 
 	hint = min(hint, tp->rcv_wnd / 2);
-	hint = min(hint, TCP_MIN_RCVMSS);
+	hint = min(hint, TCP_MSS_DEFAULT);
 	hint = max(hint, TCP_MIN_MSS);
 
 	inet_csk(sk)->icsk_ack.rcv_mss = hint;
diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c
index f83ac91..0718fde 100644
--- a/net/ipv4/tcp_ipv4.c
+++ b/net/ipv4/tcp_ipv4.c
@@ -217,7 +217,7 @@ int tcp_v4_connect(struct sock *sk, struct sockaddr *uaddr, int addr_len)
 	if (inet->opt)
 		inet_csk(sk)->icsk_ext_hdr_len = inet->opt->optlen;
 
-	tp->rx_opt.mss_clamp = 536;
+	tp->rx_opt.mss_clamp = TCP_MSS_DEFAULT;
 
 	/* Socket identity is still unknown (sport may be zero).
 	 * However we set state to SYN-SENT and not releasing socket
@@ -1270,7 +1270,7 @@ int tcp_v4_conn_request(struct sock *sk, struct sk_buff *skb)
 		goto drop_and_free;
 
 	tcp_clear_options(&tmp_opt);
-	tmp_opt.mss_clamp = 536;
+	tmp_opt.mss_clamp = TCP_MSS_DEFAULT;
 	tmp_opt.user_mss  = tcp_sk(sk)->rx_opt.user_mss;
 
 	tcp_parse_options(skb, &tmp_opt, 0, dst);
@@ -1818,7 +1818,7 @@ static int tcp_v4_init_sock(struct sock *sk)
 	 */
 	tp->snd_ssthresh = TCP_INFINITE_SSTHRESH;
 	tp->snd_cwnd_clamp = ~0;
-	tp->mss_cache = 536;
+	tp->mss_cache = TCP_MSS_DEFAULT;
 
 	tp->reordering = sysctl_tcp_reordering;
 	icsk->icsk_ca_ops = &tcp_init_congestion_ops;
diff --git a/net/ipv4/tcp_minisocks.c b/net/ipv4/tcp_minisocks.c
index fb68bab..7a42990 100644
--- a/net/ipv4/tcp_minisocks.c
+++ b/net/ipv4/tcp_minisocks.c
@@ -476,7 +476,7 @@ struct sock *tcp_create_openreq_child(struct sock *sk, struct request_sock *req,
 		if (newtp->af_specific->md5_lookup(sk, newsk))
 			newtp->tcp_header_len += TCPOLEN_MD5SIG_ALIGNED;
 #endif
-		if (skb->len >= TCP_MIN_RCVMSS+newtp->tcp_header_len)
+		if (skb->len >= TCP_MSS_DEFAULT + newtp->tcp_header_len)
 			newicsk->icsk_ack.last_seg_size = skb->len - newtp->tcp_header_len;
 		newtp->rx_opt.mss_clamp = req->mss;
 		TCP_ECN_openreq_child(newtp, req);
diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c
index 6951827..b528f75 100644
--- a/net/ipv6/tcp_ipv6.c
+++ b/net/ipv6/tcp_ipv6.c
@@ -1849,7 +1849,7 @@ static int tcp_v6_init_sock(struct sock *sk)
 	 */
 	tp->snd_ssthresh = TCP_INFINITE_SSTHRESH;
 	tp->snd_cwnd_clamp = ~0;
-	tp->mss_cache = 536;
+	tp->mss_cache = TCP_MSS_DEFAULT;
 
 	tp->reordering = sysctl_tcp_reordering;
 
-- 
1.6.3.3



^ permalink raw reply related

* Re: Problem with VLANs and via-velocity driver
From: Kevin Shanahan @ 2009-11-16  0:57 UTC (permalink / raw)
  To: Patrick McHardy; +Cc: netdev
In-Reply-To: <4AFCFF67.3060802@trash.net>

On Fri, Nov 13, 2009 at 07:40:39AM +0100, Patrick McHardy wrote:
> Kevin Shanahan wrote:
> > Hi,
> > 
> > I've had some problems with getting a fairly simple (I thought) VLAN
> > configuration working with the on board Via NICs on my Via M700
> > board. Looks like as soon as a tagged VLAN interface is added, the
> > underlying "raw" (untagged) interface stops responding.
> > 
> > ...
> > 
> > A bit of searching found a few references to similar problems going
> > back a few years (2005, 2007). Sounded like there were some driver
> > issues, but it wasn't clear from the messages I found whether they
> > were believed to be fixed or not. I tried the same test using a
> > differnt NIC with the tg3 driver and there were no problems, so it
> > looks to me like it's still a via-velocity issue. Unfortunately I
> > don't have room to add NICs to this machine and need to use the on
> > board Via hardware.
> 
> There's some special-casing for VID 0 in velocity_init_cam_filter().
> Does "ip link add link eth0 type vlan id 0" make any difference?

Thanks Patrick, this command got the untagged interface working again
(eth1 in my case). I can use this as a work around.

I didn't really understand if there was a good reason for the
special-casing in this driver, but from at least from my user
perspective I think it would be better if the drivers were consistent
in how they handle this.

Regards,
Kevin Shanahan.

^ permalink raw reply

* [PATCH 3/3] Bluetooth: Fix regression with L2CAP configuration in Basic Mode
From: Marcel Holtmann @ 2009-11-16  0:48 UTC (permalink / raw)
  To: David S. Miller; +Cc: netdev
In-Reply-To: <cover.1258331614.git.marcel@holtmann.org>

From: Gustavo F. Padovan <gustavo@las.ic.unicamp.br>

Basic Mode is the default mode of operation of a L2CAP entity. In
this case the RFC (Retransmission and Flow Control) configuration
option should not be used at all.

Normally remote L2CAP implementation should just ignore this option,
but it can cause various side effects with other Bluetooth stacks
that are not capable of handling unknown options.

Signed-off-by: Gustavo F. Padovan <gustavo@las.ic.unicamp.br>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
---
 net/bluetooth/l2cap.c |   11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/net/bluetooth/l2cap.c b/net/bluetooth/l2cap.c
index 076caa1..947f8bb 100644
--- a/net/bluetooth/l2cap.c
+++ b/net/bluetooth/l2cap.c
@@ -2394,6 +2394,10 @@ done:
 			rfc.monitor_timeout = L2CAP_DEFAULT_MONITOR_TO;
 
 			pi->conf_state |= L2CAP_CONF_MODE_DONE;
+
+			l2cap_add_conf_opt(&ptr, L2CAP_CONF_RFC,
+					sizeof(rfc), (unsigned long) &rfc);
+
 			break;
 
 		case L2CAP_MODE_STREAMING:
@@ -2401,6 +2405,10 @@ done:
 			pi->max_pdu_size = rfc.max_pdu_size;
 
 			pi->conf_state |= L2CAP_CONF_MODE_DONE;
+
+			l2cap_add_conf_opt(&ptr, L2CAP_CONF_RFC,
+					sizeof(rfc), (unsigned long) &rfc);
+
 			break;
 
 		default:
@@ -2410,9 +2418,6 @@ done:
 			rfc.mode = pi->mode;
 		}
 
-		l2cap_add_conf_opt(&ptr, L2CAP_CONF_RFC,
-					sizeof(rfc), (unsigned long) &rfc);
-
 		if (result == L2CAP_CONF_SUCCESS)
 			pi->conf_state |= L2CAP_CONF_OUTPUT_DONE;
 	}
-- 
1.6.2.5


^ permalink raw reply related

* [PATCH 2/3] Bluetooth: Select Basic Mode as default for SOCK_SEQPACKET
From: Marcel Holtmann @ 2009-11-16  0:48 UTC (permalink / raw)
  To: David S. Miller; +Cc: netdev
In-Reply-To: <cover.1258331614.git.marcel@holtmann.org>

From: Gustavo F. Padovan <gustavo@las.ic.unicamp.br>

The default mode for SOCK_SEQPACKET is Basic Mode. So when no
mode has been specified, Basic Mode shall be used.

This is important for current application to keep working as
expected and not cause a regression.

Signed-off-by: Gustavo F. Padovan <gustavo@las.ic.unicamp.br>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
---
 net/bluetooth/l2cap.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/net/bluetooth/l2cap.c b/net/bluetooth/l2cap.c
index 77e9fb1..076caa1 100644
--- a/net/bluetooth/l2cap.c
+++ b/net/bluetooth/l2cap.c
@@ -2205,7 +2205,7 @@ static int l2cap_build_conf_req(struct sock *sk, void *data)
 {
 	struct l2cap_pinfo *pi = l2cap_pi(sk);
 	struct l2cap_conf_req *req = data;
-	struct l2cap_conf_rfc rfc = { .mode = L2CAP_MODE_ERTM };
+	struct l2cap_conf_rfc rfc = { .mode = L2CAP_MODE_BASIC };
 	void *ptr = req->data;
 
 	BT_DBG("sk %p", sk);
-- 
1.6.2.5


^ permalink raw reply related

* [PATCH 1/3] Bluetooth: Set general bonding security for ACL by default
From: Marcel Holtmann @ 2009-11-16  0:48 UTC (permalink / raw)
  To: David S. Miller; +Cc: netdev
In-Reply-To: <cover.1258331614.git.marcel@holtmann.org>

From: Andrei Emeltchenko <andrei.emeltchenko@nokia.com>

This patch fixes double pairing issues with Secure Simple
Paring support. It was observed that when pairing with SSP
enabled, that the confirmation will be asked twice.

http://www.spinics.net/lists/linux-bluetooth/msg02473.html

This also causes bug when initiating SSP connection from
Windows Vista.

The reason is because bluetoothd does not store link keys
since HCIGETAUTHINFO returns 0. Setting default to general
bonding fixes these issues.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@nokia.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
---
 net/bluetooth/hci_conn.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/net/bluetooth/hci_conn.c b/net/bluetooth/hci_conn.c
index a975098..b7c4224 100644
--- a/net/bluetooth/hci_conn.c
+++ b/net/bluetooth/hci_conn.c
@@ -211,6 +211,7 @@ struct hci_conn *hci_conn_add(struct hci_dev *hdev, int type, bdaddr_t *dst)
 	conn->type  = type;
 	conn->mode  = HCI_CM_ACTIVE;
 	conn->state = BT_OPEN;
+	conn->auth_type = HCI_AT_GENERAL_BONDING;
 
 	conn->power_save = 1;
 	conn->disc_timeout = HCI_DISCONN_TIMEOUT;
-- 
1.6.2.5


^ permalink raw reply related

* Pull request: bluetooth-2.6 2009-11-16
From: Marcel Holtmann @ 2009-11-16  0:48 UTC (permalink / raw)
  To: David S. Miller; +Cc: netdev

Hi Dave,

here are three additional patches that should go into 2.6.32 before its
final release.

The first one fixes a regression with Secure Simple Pairing support. I
had that patch for a while, but it took some time to verify that it
doesn't break the Bluetooth qualification. The Bluetooth 2.1 GAP testing
is a major pain and always surprises you.

The second and third patches are fixing two regression from the L2CAP
ERTM support. When ERTM is not supported or not configured we have to
use Basic Mode and really stick to it. Other Bluetooth stacks are not
capable of handling unknown options properly.

Regards

Marcel


Please pull from

    git://git.kernel.org/pub/scm/linux/kernel/git/holtmann/bluetooth-2.6.git master

This will update the following files:

 net/bluetooth/hci_conn.c |    1 +
 net/bluetooth/l2cap.c    |   13 +++++++++----
 2 files changed, 10 insertions(+), 4 deletions(-)

through these ChangeSets:

Andrei Emeltchenko (1):
    Bluetooth: Set general bonding security for ACL by default

Gustavo F. Padovan (2):
    Bluetooth: Select Basic Mode as default for SOCK_SEQPACKET
    Bluetooth: Fix regression with L2CAP configuration in Basic Mode


^ permalink raw reply

* Re: [RFC] vlan: GRO rx statistics
From: Eric Dumazet @ 2009-11-15 19:35 UTC (permalink / raw)
  To: Herbert Xu; +Cc: David S. Miller, Linux Netdev List
In-Reply-To: <20091114012741.GA18764@gondor.apana.org.au>

Herbert Xu a écrit :
> On Fri, Nov 13, 2009 at 05:41:21PM +0100, Eric Dumazet wrote:
>> Still the race while updating dev->stats.tx_{bytes|packets} should be addressed eventually...
> 
> Well making it per-napi_struct should do the trick.

For normal devices, probably (but many of them use hardware counters anyway)
but not vlan :)

vlan_hwaccel_do_receive() has no napi context.


^ permalink raw reply

* [PATCH net-next] net: Optimize hard_start_xmit() return checking
From: Jarek Poplawski @ 2009-11-15 17:20 UTC (permalink / raw)
  To: David S. Miller; +Cc: Linux Netdev List, Patrick McHardy

Recent changes in the TX error propagation require additional checking
and masking of values returned from hard_start_xmit(), mainly to
separate cases where skb was consumed. This aim can be simplified by
changing the order of NETDEV_TX and NET_XMIT codes, because the latter
are treated similarly to negative (ERRNO) values.

After this change much simpler dev_xmit_complete() is also used in
sch_direct_xmit(), so it is moved to netdevice.h.

Additionally NET_RX definitions in netdevice.h are moved up from
between TX codes to avoid confusion while reading the TX comment.

Signed-off-by: Jarek Poplawski <jarkao2@gmail.com>
---

 include/linux/netdevice.h |   42 ++++++++++++++++++++++++++++++------------
 net/core/dev.c            |   17 -----------------
 net/sched/sch_generic.c   |   23 +++++------------------
 3 files changed, 35 insertions(+), 47 deletions(-)

diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 61425d0..7043f85 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -63,6 +63,10 @@ struct wireless_dev;
 #define HAVE_FREE_NETDEV		/* free_netdev() */
 #define HAVE_NETDEV_PRIV		/* netdev_priv() */
 
+/* Backlog congestion levels */
+#define NET_RX_SUCCESS		0	/* keep 'em coming, baby */
+#define NET_RX_DROP		1	/* packet dropped */
+
 /*
  * Transmit return codes: transmit return codes originate from three different
  * namespaces:
@@ -82,14 +86,10 @@ struct wireless_dev;
 
 /* qdisc ->enqueue() return codes. */
 #define NET_XMIT_SUCCESS	0x00
-#define NET_XMIT_DROP		0x10	/* skb dropped			*/
-#define NET_XMIT_CN		0x20	/* congestion notification	*/
-#define NET_XMIT_POLICED	0x30	/* skb is shot by police	*/
-#define NET_XMIT_MASK		0xf0	/* qdisc flags in net/sch_generic.h */
-
-/* Backlog congestion levels */
-#define NET_RX_SUCCESS		0	/* keep 'em coming, baby */
-#define NET_RX_DROP		1	/* packet dropped */
+#define NET_XMIT_DROP		0x01	/* skb dropped			*/
+#define NET_XMIT_CN		0x02	/* congestion notification	*/
+#define NET_XMIT_POLICED	0x03	/* skb is shot by police	*/
+#define NET_XMIT_MASK		0x0f	/* qdisc flags in net/sch_generic.h */
 
 /* NET_XMIT_CN is special. It does not guarantee that this packet is lost. It
  * indicates that the device will soon be dropping packets, or already drops
@@ -98,16 +98,34 @@ struct wireless_dev;
 #define net_xmit_errno(e)	((e) != NET_XMIT_CN ? -ENOBUFS : 0)
 
 /* Driver transmit return codes */
-#define NETDEV_TX_MASK		0xf
+#define NETDEV_TX_MASK		0xf0
 
 enum netdev_tx {
 	__NETDEV_TX_MIN	 = INT_MIN,	/* make sure enum is signed */
-	NETDEV_TX_OK	 = 0,		/* driver took care of packet */
-	NETDEV_TX_BUSY	 = 1,		/* driver tx path was busy*/
-	NETDEV_TX_LOCKED = 2,		/* driver tx lock was already taken */
+	NETDEV_TX_OK	 = 0x00,	/* driver took care of packet */
+	NETDEV_TX_BUSY	 = 0x10,	/* driver tx path was busy*/
+	NETDEV_TX_LOCKED = 0x20,	/* driver tx lock was already taken */
 };
 typedef enum netdev_tx netdev_tx_t;
 
+/*
+ * Current order: NETDEV_TX_MASK > NET_XMIT_MASK >= 0 is significant;
+ * hard_start_xmit() return < NET_XMIT_MASK means skb was consumed.
+ */
+static inline bool dev_xmit_complete(int rc)
+{
+	/*
+	 * Positive cases with an skb consumed by a driver:
+	 * - successful transmission (rc == NETDEV_TX_OK)
+	 * - error while transmitting (rc < 0)
+	 * - error while queueing to a different device (rc & NET_XMIT_MASK)
+	 */
+	if (likely(rc < NET_XMIT_MASK))
+		return true;
+
+	return false;
+}
+
 #endif
 
 #define MAX_ADDR_LEN	32		/* Largest hardware address length */
diff --git a/net/core/dev.c b/net/core/dev.c
index 548340b..67669c4 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -1909,23 +1909,6 @@ static inline int __dev_xmit_skb(struct sk_buff *skb, struct Qdisc *q,
 	return rc;
 }
 
-static inline bool dev_xmit_complete(int rc)
-{
-	/* successful transmission */
-	if (rc == NETDEV_TX_OK)
-		return true;
-
-	/* error while transmitting, driver consumed skb */
-	if (rc < 0)
-		return true;
-
-	/* error while queueing to a different device, driver consumed skb */
-	if (rc & NET_XMIT_MASK)
-		return true;
-
-	return false;
-}
-
 /**
  *	dev_queue_xmit - transmit a buffer
  *	@skb: buffer to transmit
diff --git a/net/sched/sch_generic.c b/net/sched/sch_generic.c
index b13821a..5173c1e 100644
--- a/net/sched/sch_generic.c
+++ b/net/sched/sch_generic.c
@@ -119,39 +119,26 @@ int sch_direct_xmit(struct sk_buff *skb, struct Qdisc *q,
 	spin_unlock(root_lock);
 
 	HARD_TX_LOCK(dev, txq, smp_processor_id());
-	if (!netif_tx_queue_stopped(txq) &&
-	    !netif_tx_queue_frozen(txq)) {
+	if (!netif_tx_queue_stopped(txq) && !netif_tx_queue_frozen(txq))
 		ret = dev_hard_start_xmit(skb, dev, txq);
 
-		/* an error implies that the skb was consumed */
-		if (ret < 0)
-			ret = NETDEV_TX_OK;
-		/* all NET_XMIT codes map to NETDEV_TX_OK */
-		ret &= ~NET_XMIT_MASK;
-	}
 	HARD_TX_UNLOCK(dev, txq);
 
 	spin_lock(root_lock);
 
-	switch (ret) {
-	case NETDEV_TX_OK:
-		/* Driver sent out skb successfully */
+	if (dev_xmit_complete(ret)) {
+		/* Driver sent out skb successfully or skb was consumed */
 		ret = qdisc_qlen(q);
-		break;
-
-	case NETDEV_TX_LOCKED:
+	} else if (ret == NETDEV_TX_LOCKED) {
 		/* Driver try lock failed */
 		ret = handle_dev_cpu_collision(skb, txq, q);
-		break;
-
-	default:
+	} else {
 		/* Driver returned NETDEV_TX_BUSY - requeue skb */
 		if (unlikely (ret != NETDEV_TX_BUSY && net_ratelimit()))
 			printk(KERN_WARNING "BUG %s code %d qlen %d\n",
 			       dev->name, ret, q->q.qlen);
 
 		ret = dev_requeue_skb(skb, q);
-		break;
 	}
 
 	if (ret && (netif_tx_queue_stopped(txq) ||

^ 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