Netdev List
 help / color / mirror / Atom feed
* Reporting a Kernel Bug
From: Lucas Willian Bocchi @ 2012-06-29 17:49 UTC (permalink / raw)
  To: netdev

Dear Sir

Proceeding as oriented, I'm sending the link to these probable bug.


https://bugzilla.kernel.org/show_bug.cgi?id=43901

Thanks for advance.

^ permalink raw reply

* Re: AF_BUS socket address family
From: Chris Friesen @ 2012-06-29 18:16 UTC (permalink / raw)
  To: Vincent Sanders; +Cc: netdev, linux-kernel, David S. Miller
In-Reply-To: <1340988354-26981-1-git-send-email-vincent.sanders@collabora.co.uk>

On 06/29/2012 10:45 AM, Vincent Sanders wrote:
> This series adds the bus address family (AF_BUS) it is against
> net-next as of yesterday.
>
> AF_BUS is a message oriented inter process communication system.
>
> The principle features are:
>
>   - Reliable datagram based communication (all sockets are of type
>     SOCK_SEQPACKET)
>
>   - Multicast message delivery (one to many, unicast as a subset)
>
>   - Strict ordering (messages are delivered to every client in the same order)
>
>   - Ability to pass file descriptors
>
>   - Ability to pass credentials
>

I haven't had time to look at the code yet, but if you haven't already 
I'd like to propose adding the ability for someone with suitable 
privileges to eavesdrop on all communications.  We've been using 
something similar to this (essentially a simplified multicast unix 
datagram protocol) for many years now and having a tcpdump-like ability 
is very useful for debugging.

Chris

^ permalink raw reply

* Re[2]:  BUG: NULL pointer in ctnetlink_conntrack_event
From: Hans Schillstrom @ 2012-06-29 18:22 UTC (permalink / raw)
  To: Pablo Neira Ayuso; +Cc: netdev, netfilter-devel

>On Fri, Jun 29, 2012 at 02:29:37PM +0200, Hans Schillstrom wrote:
>> Hello,
>> 
>> There is a "hard to find" problem in ctnetlink_conntrack_event() when calling
>> netlink_has_listeners() net->nfnl is NULL.
>> 
>> The rcu stuff seems to be right at a first look but who knows...
>> 
>> The line below fix the problem, but that is not the root cause.
>> 
>>  int nfnetlink_has_listeners(struct net *net, unsigned int group)
>>  {
>> -       return netlink_has_listeners(net->nfnl, group);
>> +       return net->nfnl ? netlink_has_listeners(net->nfnl, group) : 0 ;
>>  }
>> 
>> Yes it is a 3.0.26 kernel but this patch is applied
>> netfilter: nf_conntrack: make event callback registration per-netns
>
>I think this patch above is missing some rcu_access_pointer usage.
>
>Please, see patch attached.

Thanks it looks like it's the missing patch.

/Hans

^ permalink raw reply

* Re: [PATCH 1/5] netfilter: ipset: fix interface comparision in hash-netiface sets
From: Florian Westphal @ 2012-06-29 18:24 UTC (permalink / raw)
  To: David Laight; +Cc: pablo, netfilter-devel, davem, netdev
In-Reply-To: <AE90C24D6B3A694183C094C60CF0A2F6026B6F6E@saturn3.aculab.com>

David Laight <David.Laight@ACULAB.COM> wrote:
> > From: Florian Westphal <fw@strlen.de>
> > 
> > ifname_compare() assumes that skb->dev is zero-padded,
> > e.g 'eth1\0\0\0\0\0...'. This isn't always the case. e1000 driver does
> > 
> > strncpy(netdev->name, pci_name(pdev), sizeof(netdev->name) - 1);
> > 
> > in e1000_probe(), so once device is registered dev->name memory
> contains
> > 'eth1\0:0:3\0\0\0' (or something like that), which makes eth1 compare
> fail.
> 
> strncpy() would normally zero-fill the destination buffer
> (at least the libc version does).
> 
> So something else must be wrong.

No. driver .probe() runs before the device name is filled in, and no
explict zeroing happens there.

^ permalink raw reply

* Re: [PATCH v3] sctp: be more restrictive in transport selection on bundled sacks
From: Vlad Yasevich @ 2012-06-29 18:29 UTC (permalink / raw)
  To: Neil Horman; +Cc: netdev, David S. Miller
In-Reply-To: <1340987696-19205-1-git-send-email-nhorman@tuxdriver.com>

On 06/29/2012 12:34 PM, Neil Horman wrote:
> It was noticed recently that when we send data on a transport, its possible that
> we might bundle a sack that arrived on a different transport.  While this isn't
> a major problem, it does go against the SHOULD requirement in section 6.4 of RFC
> 2960:
>
>   An endpoint SHOULD transmit reply chunks (e.g., SACK, HEARTBEAT ACK,
>     etc.) to the same destination transport address from which it
>     received the DATA or control chunk to which it is replying.  This
>     rule should also be followed if the endpoint is bundling DATA chunks
>     together with the reply chunk.
>
> This patch seeks to correct that.  It restricts the bundling of sack operations
> to only those transports which have moved the ctsn of the association forward
> since the last sack.  By doing this we guarantee that we only bundle outbound
> saks on a transport that has received a chunk since the last sack.  This brings
> us into stricter compliance with the RFC.
>
> Vlad had initially suggested that we strictly allow only sack bundling on the
> transport that last moved the ctsn forward.  While this makes sense, I was
> concerned that doing so prevented us from bundling in the case where we had
> received chunks that moved the ctsn on multiple transports.  In those cases, the
> RFC allows us to select any of the transports having received chunks to bundle
> the sack on.  so I've modified the approach to allow for that, by adding a state
> variable to each transport that tracks weather it has moved the ctsn since the
> last sack.  This I think keeps our behavior (and performance), close enough to
> our current profile that I think we can do this without a sysctl knob to
> enable/disable it.
>
> Signed-off-by: Neil Horman<nhorman@tuxdriver.com>
> CC: Vlad Yaseivch<vyasevich@gmail.com>
> CC: David S. Miller<davem@davemloft.net>
> Reported-by: Michele Baldessari<michele@redhat.com>
> Reported-by: sorin serban<sserban@redhat.com>
>
> ---
> Change Notes:
> V2)
> 	* Removed unused variable as per Dave M. Request
> 	* Delayed rwnd adjustment until we are sure we will sack (Vlad Y.)
> V3)
> 	* Switched test to use pkt->transport rather than chunk->transport
> 	* Modified detection of sacka-able transport.  Instead of just setting
> 	  and clearning a flag, we now mark each transport and association with
> 	  a sack generation tag.  We increment the associations generation on
> 	  every sack, and assign that generation tag to every transport that
> 	  updates the ctsn.  This prevents us from having to iterate over a for
> 	  loop on every sack, which is much more scalable.
> ---
>   include/net/sctp/structs.h |    4 ++++
>   include/net/sctp/tsnmap.h  |    3 ++-
>   net/sctp/associola.c       |    1 +
>   net/sctp/output.c          |    9 +++++++--
>   net/sctp/sm_make_chunk.c   |   10 ++++++++++
>   net/sctp/sm_sideeffect.c   |    2 +-
>   net/sctp/transport.c       |    2 ++
>   net/sctp/tsnmap.c          |    6 +++++-
>   net/sctp/ulpevent.c        |    3 ++-
>   net/sctp/ulpqueue.c        |    2 +-
>   10 files changed, 35 insertions(+), 7 deletions(-)
>
> diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h
> index e4652fe..fecdf31 100644
> --- a/include/net/sctp/structs.h
> +++ b/include/net/sctp/structs.h
> @@ -912,6 +912,9 @@ struct sctp_transport {
>   		/* Is this structure kfree()able? */
>   		malloced:1;
>
> +	/* Has this transport moved the ctsn since we last sacked */
> +	__u32 sack_generation;
> +
>   	struct flowi fl;
>
>   	/* This is the peer's IP address and port. */
> @@ -1584,6 +1587,7 @@ struct sctp_association {
>   		 */
>   		__u8    sack_needed;     /* Do we need to sack the peer? */
>   		__u32	sack_cnt;
> +		__u32	sack_generation;
>
>   		/* These are capabilities which our peer advertised.  */
>   		__u8	ecn_capable:1,	    /* Can peer do ECN? */
> diff --git a/include/net/sctp/tsnmap.h b/include/net/sctp/tsnmap.h
> index e7728bc..2c5d2b4 100644
> --- a/include/net/sctp/tsnmap.h
> +++ b/include/net/sctp/tsnmap.h
> @@ -117,7 +117,8 @@ void sctp_tsnmap_free(struct sctp_tsnmap *map);
>   int sctp_tsnmap_check(const struct sctp_tsnmap *, __u32 tsn);
>
>   /* Mark this TSN as seen.  */
> -int sctp_tsnmap_mark(struct sctp_tsnmap *, __u32 tsn);
> +int sctp_tsnmap_mark(struct sctp_tsnmap *, __u32 tsn,
> +		     struct sctp_transport *trans);
>
>   /* Mark this TSN and all lower as seen. */
>   void sctp_tsnmap_skip(struct sctp_tsnmap *map, __u32 tsn);
> diff --git a/net/sctp/associola.c b/net/sctp/associola.c
> index 5bc9ab1..6c66adb 100644
> --- a/net/sctp/associola.c
> +++ b/net/sctp/associola.c
> @@ -271,6 +271,7 @@ static struct sctp_association *sctp_association_init(struct sctp_association *a
>   	 */
>   	asoc->peer.sack_needed = 1;
>   	asoc->peer.sack_cnt = 0;
> +	asoc->peer.sack_generation=0;
>
>   	/* Assume that the peer will tell us if he recognizes ASCONF
>   	 * as part of INIT exchange.
> diff --git a/net/sctp/output.c b/net/sctp/output.c
> index f1b7d4b..0de6cd5 100644
> --- a/net/sctp/output.c
> +++ b/net/sctp/output.c
> @@ -240,14 +240,19 @@ static sctp_xmit_t sctp_packet_bundle_sack(struct sctp_packet *pkt,
>   	 */
>   	if (sctp_chunk_is_data(chunk)&&  !pkt->has_sack&&
>   	!pkt->has_cookie_echo) {
> -		struct sctp_association *asoc;
>   		struct timer_list *timer;
> -		asoc = pkt->transport->asoc;
> +		struct sctp_association *asoc = pkt->transport->asoc;
> +
>   		timer =&asoc->timers[SCTP_EVENT_TIMEOUT_SACK];
>
>   		/* If the SACK timer is running, we have a pending SACK */
>   		if (timer_pending(timer)) {
>   			struct sctp_chunk *sack;
> +
> +			if (pkt->transport->sack_generation !=
> +			    pkt->transport->asoc->peer.sack_generation)
> +				return retval;
> +
>   			asoc->a_rwnd = asoc->rwnd;
>   			sack = sctp_make_sack(asoc);
>   			if (sack) {
> diff --git a/net/sctp/sm_make_chunk.c b/net/sctp/sm_make_chunk.c
> index a85eeeb..ffa2a8e 100644
> --- a/net/sctp/sm_make_chunk.c
> +++ b/net/sctp/sm_make_chunk.c
> @@ -736,6 +736,7 @@ struct sctp_chunk *sctp_make_sack(const struct sctp_association *asoc)
>   	__u16 num_gabs, num_dup_tsns;
>   	struct sctp_tsnmap *map = (struct sctp_tsnmap *)&asoc->peer.tsn_map;
>   	struct sctp_gap_ack_block gabs[SCTP_MAX_GABS];
> +	struct sctp_transport *trans;
>
>   	memset(gabs, 0, sizeof(gabs));
>   	ctsn = sctp_tsnmap_get_ctsn(map);
> @@ -805,6 +806,15 @@ struct sctp_chunk *sctp_make_sack(const struct sctp_association *asoc)
>   		sctp_addto_chunk(retval, sizeof(__u32) * num_dup_tsns,
>   				 sctp_tsnmap_get_dups(map));
>
> +	/*
> +	 * Once we have a sack generated, clear the moved_tsn information
> +	 * from all the transports
> +	 */
> +	if (!asoc->peer.sack_generation)
> +		list_for_each_entry(trans,&asoc->peer.transport_addr_list,
> +				    transports)
> +			trans->sack_generation = UINT_MAX;
> +	((struct sctp_association *)asoc)->peer.sack_generation++;

Two points here:
1) The commend no longer matches the code
2) Why special case the peer.sack_generations == 0 and set the transport 
to UNIT_MAX?

-vlad

>   nodata:
>   	return retval;
>   }
> diff --git a/net/sctp/sm_sideeffect.c b/net/sctp/sm_sideeffect.c
> index c96d1a8..8716da1 100644
> --- a/net/sctp/sm_sideeffect.c
> +++ b/net/sctp/sm_sideeffect.c
> @@ -1268,7 +1268,7 @@ static int sctp_cmd_interpreter(sctp_event_t event_type,
>   		case SCTP_CMD_REPORT_TSN:
>   			/* Record the arrival of a TSN.  */
>   			error = sctp_tsnmap_mark(&asoc->peer.tsn_map,
> -						 cmd->obj.u32);
> +						 cmd->obj.u32, NULL);
>   			break;
>
>   		case SCTP_CMD_REPORT_FWDTSN:
> diff --git a/net/sctp/transport.c b/net/sctp/transport.c
> index b026ba0..1dcceb6 100644
> --- a/net/sctp/transport.c
> +++ b/net/sctp/transport.c
> @@ -68,6 +68,8 @@ static struct sctp_transport *sctp_transport_init(struct sctp_transport *peer,
>   	peer->af_specific = sctp_get_af_specific(addr->sa.sa_family);
>   	memset(&peer->saddr, 0, sizeof(union sctp_addr));
>
> +	peer->sack_generation = 0;
> +
>   	/* From 6.3.1 RTO Calculation:
>   	 *
>   	 * C1) Until an RTT measurement has been made for a packet sent to the
> diff --git a/net/sctp/tsnmap.c b/net/sctp/tsnmap.c
> index f1e40ceb..b5fb7c4 100644
> --- a/net/sctp/tsnmap.c
> +++ b/net/sctp/tsnmap.c
> @@ -114,7 +114,8 @@ int sctp_tsnmap_check(const struct sctp_tsnmap *map, __u32 tsn)
>
>
>   /* Mark this TSN as seen.  */
> -int sctp_tsnmap_mark(struct sctp_tsnmap *map, __u32 tsn)
> +int sctp_tsnmap_mark(struct sctp_tsnmap *map, __u32 tsn,
> +		     struct sctp_transport *trans)
>   {
>   	u16 gap;
>
> @@ -133,6 +134,9 @@ int sctp_tsnmap_mark(struct sctp_tsnmap *map, __u32 tsn)
>   		 */
>   		map->max_tsn_seen++;
>   		map->cumulative_tsn_ack_point++;
> +		if (trans)
> +			trans->sack_generation =
> +				trans->asoc->peer.sack_generation;
>   		map->base_tsn++;
>   	} else {
>   		/* Either we already have a gap, or about to record a gap, so
> diff --git a/net/sctp/ulpevent.c b/net/sctp/ulpevent.c
> index 8a84017..33d8947 100644
> --- a/net/sctp/ulpevent.c
> +++ b/net/sctp/ulpevent.c
> @@ -715,7 +715,8 @@ struct sctp_ulpevent *sctp_ulpevent_make_rcvmsg(struct sctp_association *asoc,
>   	 * can mark it as received so the tsn_map is updated correctly.
>   	 */
>   	if (sctp_tsnmap_mark(&asoc->peer.tsn_map,
> -			     ntohl(chunk->subh.data_hdr->tsn)))
> +			     ntohl(chunk->subh.data_hdr->tsn),
> +			     chunk->transport))
>   		goto fail_mark;
>
>   	/* First calculate the padding, so we don't inadvertently
> diff --git a/net/sctp/ulpqueue.c b/net/sctp/ulpqueue.c
> index f2d1de7..f5a6a4f 100644
> --- a/net/sctp/ulpqueue.c
> +++ b/net/sctp/ulpqueue.c
> @@ -1051,7 +1051,7 @@ void sctp_ulpq_renege(struct sctp_ulpq *ulpq, struct sctp_chunk *chunk,
>   	if (chunk&&  (freed>= needed)) {
>   		__u32 tsn;
>   		tsn = ntohl(chunk->subh.data_hdr->tsn);
> -		sctp_tsnmap_mark(&asoc->peer.tsn_map, tsn);
> +		sctp_tsnmap_mark(&asoc->peer.tsn_map, tsn, chunk->transport);
>   		sctp_ulpq_tail_data(ulpq, chunk, gfp);
>
>   		sctp_ulpq_partial_delivery(ulpq, chunk, gfp);

^ permalink raw reply

* [PATCH net-next 2/6] qlge: Stand-up card should not report supporting wol.
From: Jitendra Kalsaria @ 2012-06-29 18:24 UTC (permalink / raw)
  To: davem
  Cc: netdev, Ron, "Mercer <ron.mercer",
	Dept_NX_Linux_NIC_Driver, Jitendra Kalsaria
In-Reply-To: <1340994290-28832-1-git-send-email-jitendra.kalsaria@qlogic.com>

From: Jitendra Kalsaria <jitendra.kalsaria@qlogic.com>

Signed-off-by: Jitendra Kalsaria <jitendra.kalsaria@qlogic.com>
---
 drivers/net/ethernet/qlogic/qlge/qlge_ethtool.c |   43 ++++++++++++++--------
 1 files changed, 27 insertions(+), 16 deletions(-)

diff --git a/drivers/net/ethernet/qlogic/qlge/qlge_ethtool.c b/drivers/net/ethernet/qlogic/qlge/qlge_ethtool.c
index 8e2c2a7..81672f5 100644
--- a/drivers/net/ethernet/qlogic/qlge/qlge_ethtool.c
+++ b/drivers/net/ethernet/qlogic/qlge/qlge_ethtool.c
@@ -388,10 +388,14 @@ static void ql_get_drvinfo(struct net_device *ndev,
 static void ql_get_wol(struct net_device *ndev, struct ethtool_wolinfo *wol)
 {
 	struct ql_adapter *qdev = netdev_priv(ndev);
-	/* What we support. */
-	wol->supported = WAKE_MAGIC;
-	/* What we've currently got set. */
-	wol->wolopts = qdev->wol;
+
+	if (qdev->pdev->subsystem_device == 0x0068 ||
+			qdev->pdev->subsystem_device == 0x0180) {
+		/* What we support. */
+		wol->supported = WAKE_MAGIC;
+		/* What we've currently got set. */
+		wol->wolopts = qdev->wol;
+	}
 }
 
 static int ql_set_wol(struct net_device *ndev, struct ethtool_wolinfo *wol)
@@ -399,19 +403,26 @@ static int ql_set_wol(struct net_device *ndev, struct ethtool_wolinfo *wol)
 	struct ql_adapter *qdev = netdev_priv(ndev);
 	int status;
 
-	if (wol->wolopts & ~WAKE_MAGIC)
-		return -EINVAL;
-	qdev->wol = wol->wolopts;
-
-	netif_info(qdev, drv, qdev->ndev, "Set wol option 0x%x\n", qdev->wol);
-	if (!qdev->wol) {
-		u32 wol = 0;
-		status = ql_mb_wol_mode(qdev, wol);
-		netif_err(qdev, drv, qdev->ndev, "WOL %s (wol code 0x%x)\n",
-			  status == 0 ? "cleared successfully" : "clear failed",
-			  wol);
+	if (qdev->pdev->subsystem_device == 0x0068 ||
+			qdev->pdev->subsystem_device == 0x0180) {
+		if (wol->wolopts & ~WAKE_MAGIC)
+			return -EINVAL;
+		qdev->wol = wol->wolopts;
+
+		netif_info(qdev, drv, qdev->ndev,
+				"Set wol option 0x%x\n", qdev->wol);
+		if (!qdev->wol) {
+			u32 wol = 0;
+			status = ql_mb_wol_mode(qdev, wol);
+			netif_err(qdev, drv, qdev->ndev,
+			"WOL %s (wol code 0x%x)\n",
+			status == 0 ? "cleared successfully" : "clear failed",
+			wol);
+		}
+	} else {
+		netif_info(qdev, drv, qdev->ndev,
+				"WOL is not supported on stand-up card\n");
 	}
-
 	return 0;
 }
 
-- 
1.7.1

^ permalink raw reply related

* [PATCH net-next 3/6] qlge: Garbage values shown in extra info during selftest.
From: Jitendra Kalsaria @ 2012-06-29 18:24 UTC (permalink / raw)
  To: davem
  Cc: netdev, Ron, "Mercer <ron.mercer",
	Dept_NX_Linux_NIC_Driver, Jitendra Kalsaria
In-Reply-To: <1340994290-28832-1-git-send-email-jitendra.kalsaria@qlogic.com>

From: Jitendra Kalsaria <jitendra.kalsaria@qlogic.com>

while running selftest 'ethtool -t' multiple times will get
different values in the 'extra info' section, which was garbage.

Signed-off-by: Jitendra Kalsaria <jitendra.kalsaria@qlogic.com>
---
 drivers/net/ethernet/qlogic/qlge/qlge_ethtool.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/drivers/net/ethernet/qlogic/qlge/qlge_ethtool.c b/drivers/net/ethernet/qlogic/qlge/qlge_ethtool.c
index 81672f5..966bd96 100644
--- a/drivers/net/ethernet/qlogic/qlge/qlge_ethtool.c
+++ b/drivers/net/ethernet/qlogic/qlge/qlge_ethtool.c
@@ -248,6 +248,9 @@ static char ql_stats_str_arr[][ETH_GSTRING_LEN] = {
 static void ql_get_strings(struct net_device *dev, u32 stringset, u8 *buf)
 {
 	switch (stringset) {
+	case ETH_SS_TEST:
+		memcpy(buf, *ql_gstrings_test, QLGE_TEST_LEN * ETH_GSTRING_LEN);
+		break;
 	case ETH_SS_STATS:
 		memcpy(buf, ql_stats_str_arr, sizeof(ql_stats_str_arr));
 		break;
@@ -539,6 +542,8 @@ static void ql_self_test(struct net_device *ndev,
 {
 	struct ql_adapter *qdev = netdev_priv(ndev);
 
+	memset(data, 0, sizeof(u64) * QLGE_TEST_LEN);
+
 	if (netif_running(ndev)) {
 		set_bit(QL_SELFTEST, &qdev->flags);
 		if (eth_test->flags == ETH_TEST_FL_OFFLINE) {
-- 
1.7.1

^ permalink raw reply related

* [PATCH net-next 4/6] qlge: Fixed double pci free upon tx_ring->q allocation failure.
From: Jitendra Kalsaria @ 2012-06-29 18:24 UTC (permalink / raw)
  To: davem
  Cc: netdev, Ron, "Mercer <ron.mercer",
	Dept_NX_Linux_NIC_Driver, Jitendra Kalsaria
In-Reply-To: <1340994290-28832-1-git-send-email-jitendra.kalsaria@qlogic.com>

From: Jitendra Kalsaria <jitendra.kalsaria@qlogic.com>

Signed-off-by: Jitendra Kalsaria <jitendra.kalsaria@qlogic.com>
---
 drivers/net/ethernet/qlogic/qlge/qlge_main.c |   14 ++++++++------
 1 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/drivers/net/ethernet/qlogic/qlge/qlge_main.c b/drivers/net/ethernet/qlogic/qlge/qlge_main.c
index cdbc860..aa514c5 100644
--- a/drivers/net/ethernet/qlogic/qlge/qlge_main.c
+++ b/drivers/net/ethernet/qlogic/qlge/qlge_main.c
@@ -2701,11 +2701,9 @@ static int ql_alloc_tx_resources(struct ql_adapter *qdev,
 	    pci_alloc_consistent(qdev->pdev, tx_ring->wq_size,
 				 &tx_ring->wq_base_dma);
 
-	if ((tx_ring->wq_base == NULL) ||
-	    tx_ring->wq_base_dma & WQ_ADDR_ALIGN) {
-		netif_err(qdev, ifup, qdev->ndev, "tx_ring alloc failed.\n");
-		return -ENOMEM;
-	}
+	if ((tx_ring->wq_base == NULL) || tx_ring->wq_base_dma & WQ_ADDR_ALIGN)
+		goto err;
+
 	tx_ring->q =
 	    kmalloc(tx_ring->wq_len * sizeof(struct tx_ring_desc), GFP_KERNEL);
 	if (tx_ring->q == NULL)
@@ -2713,8 +2711,12 @@ static int ql_alloc_tx_resources(struct ql_adapter *qdev,
 
 	return 0;
 err:
-	pci_free_consistent(qdev->pdev, tx_ring->wq_size,
+	if (tx_ring->wq_base) {
+		pci_free_consistent(qdev->pdev, tx_ring->wq_size,
 			    tx_ring->wq_base, tx_ring->wq_base_dma);
+		tx_ring->wq_base = NULL;
+	}
+	netif_err(qdev, ifup, qdev->ndev, "tx_ring alloc failed.\n");
 	return -ENOMEM;
 }
 
-- 
1.7.1

^ permalink raw reply related

* [PATCH net-next 6/6] qlge: Bumped driver version to 1.00.00.31
From: Jitendra Kalsaria @ 2012-06-29 18:24 UTC (permalink / raw)
  To: davem
  Cc: netdev, Ron, "Mercer <ron.mercer",
	Dept_NX_Linux_NIC_Driver, Jitendra Kalsaria
In-Reply-To: <1340994290-28832-1-git-send-email-jitendra.kalsaria@qlogic.com>

From: Jitendra Kalsaria <jitendra.kalsaria@qlogic.com>

Signed-off-by: Jitendra Kalsaria <jitendra.kalsaria@qlogic.com>
---
 drivers/net/ethernet/qlogic/qlge/qlge.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/ethernet/qlogic/qlge/qlge.h b/drivers/net/ethernet/qlogic/qlge/qlge.h
index e81bbb7..5a8c00c 100644
--- a/drivers/net/ethernet/qlogic/qlge/qlge.h
+++ b/drivers/net/ethernet/qlogic/qlge/qlge.h
@@ -18,7 +18,7 @@
  */
 #define DRV_NAME  	"qlge"
 #define DRV_STRING 	"QLogic 10 Gigabit PCI-E Ethernet Driver "
-#define DRV_VERSION	"v1.00.00.30.00.00-01"
+#define DRV_VERSION	"v1.00.00.31"
 
 #define WQ_ADDR_ALIGN	0x3	/* 4 byte alignment */
 
-- 
1.7.1

^ permalink raw reply related

* [PATCH net-next 5/6] qlge: Categorize receive frame errors from firmware.
From: Jitendra Kalsaria @ 2012-06-29 18:24 UTC (permalink / raw)
  To: davem
  Cc: netdev, Ron, "Mercer <ron.mercer",
	Dept_NX_Linux_NIC_Driver, Jitendra Kalsaria
In-Reply-To: <1340994290-28832-1-git-send-email-jitendra.kalsaria@qlogic.com>

From: Jitendra Kalsaria <jitendra.kalsaria@qlogic.com>

Signed-off-by: Sritej Velaga <sritej.velaga@qlogic.com>
Signed-off-by: Jitendra Kalsaria <jitendra.kalsaria@qlogic.com>
---
 drivers/net/ethernet/qlogic/qlge/qlge.h         |    8 ++++
 drivers/net/ethernet/qlogic/qlge/qlge_ethtool.c |   14 +++++++
 drivers/net/ethernet/qlogic/qlge/qlge_main.c    |   46 ++++++++++++++++++----
 3 files changed, 59 insertions(+), 9 deletions(-)

diff --git a/drivers/net/ethernet/qlogic/qlge/qlge.h b/drivers/net/ethernet/qlogic/qlge/qlge.h
index 5a639df..e81bbb7 100644
--- a/drivers/net/ethernet/qlogic/qlge/qlge.h
+++ b/drivers/net/ethernet/qlogic/qlge/qlge.h
@@ -1535,6 +1535,14 @@ struct nic_stats {
 	u64 rx_1024_to_1518_pkts;
 	u64 rx_1519_to_max_pkts;
 	u64 rx_len_err_pkts;
+	/* Receive Mac Err stats */
+	u64 rx_code_err;
+	u64 rx_oversize_err;
+	u64 rx_undersize_err;
+	u64 rx_preamble_err;
+	u64 rx_frame_len_err;
+	u64 rx_crc_err;
+	u64 rx_err_count;
 	/*
 	 * These stats come from offset 500h to 5C8h
 	 * in the XGMAC register.
diff --git a/drivers/net/ethernet/qlogic/qlge/qlge_ethtool.c b/drivers/net/ethernet/qlogic/qlge/qlge_ethtool.c
index 966bd96..bbc4136 100644
--- a/drivers/net/ethernet/qlogic/qlge/qlge_ethtool.c
+++ b/drivers/net/ethernet/qlogic/qlge/qlge_ethtool.c
@@ -226,6 +226,13 @@ static char ql_stats_str_arr[][ETH_GSTRING_LEN] = {
 	{"rx_1024_to_1518_pkts"},
 	{"rx_1519_to_max_pkts"},
 	{"rx_len_err_pkts"},
+	{"rx_code_err"},
+	{"rx_oversize_err"},
+	{"rx_undersize_err"},
+	{"rx_preamble_err"},
+	{"rx_frame_len_err"},
+	{"rx_crc_err"},
+	{"rx_err_count"},
 	{"tx_cbfc_pause_frames0"},
 	{"tx_cbfc_pause_frames1"},
 	{"tx_cbfc_pause_frames2"},
@@ -320,6 +327,13 @@ ql_get_ethtool_stats(struct net_device *ndev,
 	*data++ = s->rx_1024_to_1518_pkts;
 	*data++ = s->rx_1519_to_max_pkts;
 	*data++ = s->rx_len_err_pkts;
+	*data++ = s->rx_code_err;
+	*data++ = s->rx_oversize_err;
+	*data++ = s->rx_undersize_err;
+	*data++ = s->rx_preamble_err;
+	*data++ = s->rx_frame_len_err;
+	*data++ = s->rx_crc_err;
+	*data++ = s->rx_err_count;
 	*data++ = s->tx_cbfc_pause_frames0;
 	*data++ = s->tx_cbfc_pause_frames1;
 	*data++ = s->tx_cbfc_pause_frames2;
diff --git a/drivers/net/ethernet/qlogic/qlge/qlge_main.c b/drivers/net/ethernet/qlogic/qlge/qlge_main.c
index aa514c5..0f56148 100644
--- a/drivers/net/ethernet/qlogic/qlge/qlge_main.c
+++ b/drivers/net/ethernet/qlogic/qlge/qlge_main.c
@@ -1433,6 +1433,34 @@ map_error:
 	return NETDEV_TX_BUSY;
 }
 
+/* Categorizing receive firmware frame errors */
+static void ql_categorize_rx_err(struct ql_adapter *qdev, u8 rx_err)
+{
+	qdev->nic_stats.rx_err_count++;
+
+	switch (rx_err & IB_MAC_IOCB_RSP_ERR_MASK) {
+	case IB_MAC_IOCB_RSP_ERR_CODE_ERR:
+		qdev->nic_stats.rx_code_err++;
+		break;
+	case IB_MAC_IOCB_RSP_ERR_OVERSIZE:
+		qdev->nic_stats.rx_oversize_err++;
+		break;
+	case IB_MAC_IOCB_RSP_ERR_UNDERSIZE:
+		qdev->nic_stats.rx_undersize_err++;
+		break;
+	case IB_MAC_IOCB_RSP_ERR_PREAMBLE:
+		qdev->nic_stats.rx_preamble_err++;
+		break;
+	case IB_MAC_IOCB_RSP_ERR_FRAME_LEN:
+		qdev->nic_stats.rx_frame_len_err++;
+		break;
+	case IB_MAC_IOCB_RSP_ERR_CRC:
+		qdev->nic_stats.rx_crc_err++;
+	default:
+		break;
+	}
+}
+
 /* Process an inbound completion from an rx ring. */
 static void ql_process_mac_rx_gro_page(struct ql_adapter *qdev,
 					struct rx_ring *rx_ring,
@@ -1446,6 +1474,12 @@ static void ql_process_mac_rx_gro_page(struct ql_adapter *qdev,
 
 	napi->dev = qdev->ndev;
 
+	if (ib_mac_rsp->flags2 & IB_MAC_IOCB_RSP_ERR_MASK) {
+		ql_categorize_rx_err(qdev, ib_mac_rsp->flags2);
+		put_page(lbq_desc->p.pg_chunk.page);
+		return;
+	}
+
 	skb = napi_get_frags(napi);
 	if (!skb) {
 		netif_err(qdev, drv, qdev->ndev,
@@ -1502,9 +1536,7 @@ static void ql_process_mac_rx_page(struct ql_adapter *qdev,
 
 	/* Frame error, so drop the packet. */
 	if (ib_mac_rsp->flags2 & IB_MAC_IOCB_RSP_ERR_MASK) {
-		netif_info(qdev, drv, qdev->ndev,
-			  "Receive error, flags2 = 0x%x\n", ib_mac_rsp->flags2);
-		rx_ring->rx_errors++;
+		ql_categorize_rx_err(qdev, ib_mac_rsp->flags2);
 		goto err_out;
 	}
 
@@ -1595,10 +1627,8 @@ static void ql_process_mac_rx_skb(struct ql_adapter *qdev,
 
 	/* Frame error, so drop the packet. */
 	if (ib_mac_rsp->flags2 & IB_MAC_IOCB_RSP_ERR_MASK) {
-		netif_info(qdev, drv, qdev->ndev,
-			  "Receive error, flags2 = 0x%x\n", ib_mac_rsp->flags2);
+		ql_categorize_rx_err(qdev, ib_mac_rsp->flags2);
 		dev_kfree_skb_any(skb);
-		rx_ring->rx_errors++;
 		return;
 	}
 
@@ -1910,10 +1940,8 @@ static void ql_process_mac_split_rx_intr(struct ql_adapter *qdev,
 
 	/* Frame error, so drop the packet. */
 	if (ib_mac_rsp->flags2 & IB_MAC_IOCB_RSP_ERR_MASK) {
-		netif_info(qdev, drv, qdev->ndev,
-			  "Receive error, flags2 = 0x%x\n", ib_mac_rsp->flags2);
+		ql_categorize_rx_err(qdev, ib_mac_rsp->flags2);
 		dev_kfree_skb_any(skb);
-		rx_ring->rx_errors++;
 		return;
 	}
 
-- 
1.7.1

^ permalink raw reply related

* [PATCH net-next 0/6] qlge: bug fix
From: Jitendra Kalsaria @ 2012-06-29 18:24 UTC (permalink / raw)
  To: davem
  Cc: netdev, Ron, "Mercer <ron.mercer",
	Dept_NX_Linux_NIC_Driver, Jitendra Kalsaria

From: Jitendra Kalsaria <jitendra.kalsaria@qlogic.com>

Please apply it to net-next.

Thanks,
Jitendra

^ permalink raw reply

* [PATCH net-next 1/6] qlge: Fixed packet transmit errors due to potential driver errors.
From: Jitendra Kalsaria @ 2012-06-29 18:24 UTC (permalink / raw)
  To: davem
  Cc: netdev, Ron, "Mercer <ron.mercer",
	Dept_NX_Linux_NIC_Driver, Jitendra Kalsaria
In-Reply-To: <1340994290-28832-1-git-send-email-jitendra.kalsaria@qlogic.com>

From: Jitendra Kalsaria <jitendra.kalsaria@qlogic.com>

qlge driver was acting wrongly when considering TX ring full
as a TX error. TX ring full is expected behavior when NIC is
overwhelmed and is expected to happen, as far as packets are
not lost.

Signed-off-by: Jitendra Kalsaria <jitendra.kalsaria@qlogic.com>
---
 drivers/net/ethernet/qlogic/qlge/qlge_main.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/drivers/net/ethernet/qlogic/qlge/qlge_main.c b/drivers/net/ethernet/qlogic/qlge/qlge_main.c
index 09d8d33..cdbc860 100644
--- a/drivers/net/ethernet/qlogic/qlge/qlge_main.c
+++ b/drivers/net/ethernet/qlogic/qlge/qlge_main.c
@@ -2562,7 +2562,6 @@ static netdev_tx_t qlge_send(struct sk_buff *skb, struct net_device *ndev)
 			   __func__, tx_ring_idx);
 		netif_stop_subqueue(ndev, tx_ring->wq_id);
 		atomic_inc(&tx_ring->queue_stopped);
-		tx_ring->tx_errors++;
 		return NETDEV_TX_BUSY;
 	}
 	tx_ring_desc = &tx_ring->q[tx_ring->prod_idx];
-- 
1.7.1

^ permalink raw reply related

* Re: [PATCH v3] sctp: be more restrictive in transport selection on bundled sacks
From: Neil Horman @ 2012-06-29 18:43 UTC (permalink / raw)
  To: Vlad Yasevich; +Cc: netdev, David S. Miller
In-Reply-To: <4FEDF420.50507@gmail.com>

On Fri, Jun 29, 2012 at 02:29:52PM -0400, Vlad Yasevich wrote:
> On 06/29/2012 12:34 PM, Neil Horman wrote:
> >It was noticed recently that when we send data on a transport, its possible that
> >we might bundle a sack that arrived on a different transport.  While this isn't
> >a major problem, it does go against the SHOULD requirement in section 6.4 of RFC
> >2960:
> >
> >  An endpoint SHOULD transmit reply chunks (e.g., SACK, HEARTBEAT ACK,
> >    etc.) to the same destination transport address from which it
> >    received the DATA or control chunk to which it is replying.  This
> >    rule should also be followed if the endpoint is bundling DATA chunks
> >    together with the reply chunk.
> >
> >This patch seeks to correct that.  It restricts the bundling of sack operations
> >to only those transports which have moved the ctsn of the association forward
> >since the last sack.  By doing this we guarantee that we only bundle outbound
> >saks on a transport that has received a chunk since the last sack.  This brings
> >us into stricter compliance with the RFC.
> >
> >Vlad had initially suggested that we strictly allow only sack bundling on the
> >transport that last moved the ctsn forward.  While this makes sense, I was
> >concerned that doing so prevented us from bundling in the case where we had
> >received chunks that moved the ctsn on multiple transports.  In those cases, the
> >RFC allows us to select any of the transports having received chunks to bundle
> >the sack on.  so I've modified the approach to allow for that, by adding a state
> >variable to each transport that tracks weather it has moved the ctsn since the
> >last sack.  This I think keeps our behavior (and performance), close enough to
> >our current profile that I think we can do this without a sysctl knob to
> >enable/disable it.
> >
> >Signed-off-by: Neil Horman<nhorman@tuxdriver.com>
> >CC: Vlad Yaseivch<vyasevich@gmail.com>
> >CC: David S. Miller<davem@davemloft.net>
> >Reported-by: Michele Baldessari<michele@redhat.com>
> >Reported-by: sorin serban<sserban@redhat.com>
> >
> >---
> >Change Notes:
> >V2)
> >	* Removed unused variable as per Dave M. Request
> >	* Delayed rwnd adjustment until we are sure we will sack (Vlad Y.)
> >V3)
> >	* Switched test to use pkt->transport rather than chunk->transport
> >	* Modified detection of sacka-able transport.  Instead of just setting
> >	  and clearning a flag, we now mark each transport and association with
> >	  a sack generation tag.  We increment the associations generation on
> >	  every sack, and assign that generation tag to every transport that
> >	  updates the ctsn.  This prevents us from having to iterate over a for
> >	  loop on every sack, which is much more scalable.
> >---
> >  include/net/sctp/structs.h |    4 ++++
> >  include/net/sctp/tsnmap.h  |    3 ++-
> >  net/sctp/associola.c       |    1 +
> >  net/sctp/output.c          |    9 +++++++--
> >  net/sctp/sm_make_chunk.c   |   10 ++++++++++
> >  net/sctp/sm_sideeffect.c   |    2 +-
> >  net/sctp/transport.c       |    2 ++
> >  net/sctp/tsnmap.c          |    6 +++++-
> >  net/sctp/ulpevent.c        |    3 ++-
> >  net/sctp/ulpqueue.c        |    2 +-
> >  10 files changed, 35 insertions(+), 7 deletions(-)
> >
> >diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h
> >index e4652fe..fecdf31 100644
> >--- a/include/net/sctp/structs.h
> >+++ b/include/net/sctp/structs.h
> >@@ -912,6 +912,9 @@ struct sctp_transport {
> >  		/* Is this structure kfree()able? */
> >  		malloced:1;
> >
> >+	/* Has this transport moved the ctsn since we last sacked */
> >+	__u32 sack_generation;
> >+
> >  	struct flowi fl;
> >
> >  	/* This is the peer's IP address and port. */
> >@@ -1584,6 +1587,7 @@ struct sctp_association {
> >  		 */
> >  		__u8    sack_needed;     /* Do we need to sack the peer? */
> >  		__u32	sack_cnt;
> >+		__u32	sack_generation;
> >
> >  		/* These are capabilities which our peer advertised.  */
> >  		__u8	ecn_capable:1,	    /* Can peer do ECN? */
> >diff --git a/include/net/sctp/tsnmap.h b/include/net/sctp/tsnmap.h
> >index e7728bc..2c5d2b4 100644
> >--- a/include/net/sctp/tsnmap.h
> >+++ b/include/net/sctp/tsnmap.h
> >@@ -117,7 +117,8 @@ void sctp_tsnmap_free(struct sctp_tsnmap *map);
> >  int sctp_tsnmap_check(const struct sctp_tsnmap *, __u32 tsn);
> >
> >  /* Mark this TSN as seen.  */
> >-int sctp_tsnmap_mark(struct sctp_tsnmap *, __u32 tsn);
> >+int sctp_tsnmap_mark(struct sctp_tsnmap *, __u32 tsn,
> >+		     struct sctp_transport *trans);
> >
> >  /* Mark this TSN and all lower as seen. */
> >  void sctp_tsnmap_skip(struct sctp_tsnmap *map, __u32 tsn);
> >diff --git a/net/sctp/associola.c b/net/sctp/associola.c
> >index 5bc9ab1..6c66adb 100644
> >--- a/net/sctp/associola.c
> >+++ b/net/sctp/associola.c
> >@@ -271,6 +271,7 @@ static struct sctp_association *sctp_association_init(struct sctp_association *a
> >  	 */
> >  	asoc->peer.sack_needed = 1;
> >  	asoc->peer.sack_cnt = 0;
> >+	asoc->peer.sack_generation=0;
> >
> >  	/* Assume that the peer will tell us if he recognizes ASCONF
> >  	 * as part of INIT exchange.
> >diff --git a/net/sctp/output.c b/net/sctp/output.c
> >index f1b7d4b..0de6cd5 100644
> >--- a/net/sctp/output.c
> >+++ b/net/sctp/output.c
> >@@ -240,14 +240,19 @@ static sctp_xmit_t sctp_packet_bundle_sack(struct sctp_packet *pkt,
> >  	 */
> >  	if (sctp_chunk_is_data(chunk)&&  !pkt->has_sack&&
> >  	!pkt->has_cookie_echo) {
> >-		struct sctp_association *asoc;
> >  		struct timer_list *timer;
> >-		asoc = pkt->transport->asoc;
> >+		struct sctp_association *asoc = pkt->transport->asoc;
> >+
> >  		timer =&asoc->timers[SCTP_EVENT_TIMEOUT_SACK];
> >
> >  		/* If the SACK timer is running, we have a pending SACK */
> >  		if (timer_pending(timer)) {
> >  			struct sctp_chunk *sack;
> >+
> >+			if (pkt->transport->sack_generation !=
> >+			    pkt->transport->asoc->peer.sack_generation)
> >+				return retval;
> >+
> >  			asoc->a_rwnd = asoc->rwnd;
> >  			sack = sctp_make_sack(asoc);
> >  			if (sack) {
> >diff --git a/net/sctp/sm_make_chunk.c b/net/sctp/sm_make_chunk.c
> >index a85eeeb..ffa2a8e 100644
> >--- a/net/sctp/sm_make_chunk.c
> >+++ b/net/sctp/sm_make_chunk.c
> >@@ -736,6 +736,7 @@ struct sctp_chunk *sctp_make_sack(const struct sctp_association *asoc)
> >  	__u16 num_gabs, num_dup_tsns;
> >  	struct sctp_tsnmap *map = (struct sctp_tsnmap *)&asoc->peer.tsn_map;
> >  	struct sctp_gap_ack_block gabs[SCTP_MAX_GABS];
> >+	struct sctp_transport *trans;
> >
> >  	memset(gabs, 0, sizeof(gabs));
> >  	ctsn = sctp_tsnmap_get_ctsn(map);
> >@@ -805,6 +806,15 @@ struct sctp_chunk *sctp_make_sack(const struct sctp_association *asoc)
> >  		sctp_addto_chunk(retval, sizeof(__u32) * num_dup_tsns,
> >  				 sctp_tsnmap_get_dups(map));
> >
> >+	/*
> >+	 * Once we have a sack generated, clear the moved_tsn information
> >+	 * from all the transports
> >+	 */
> >+	if (!asoc->peer.sack_generation)
> >+		list_for_each_entry(trans,&asoc->peer.transport_addr_list,
> >+				    transports)
> >+			trans->sack_generation = UINT_MAX;
> >+	((struct sctp_association *)asoc)->peer.sack_generation++;
> 
> Two points here:
> 1) The commend no longer matches the code
Crud, missed that, I'll fix it.

> 2) Why special case the peer.sack_generations == 0 and set the
> transport to UNIT_MAX?
> 
To avoid wrapping problems leading to erroneous bundling errors.  Consider a
long lived connection with two trasports (A and B).

If all traffic is sent on A for a long time (generating UINT_MAX sacks), and the
peer chooses that moment to send data on transport B, its possible that we will
bundle a sack with that data chunk erroneously, because the associations
sack_generation has wrapped, and now matches with the transports, even though we
never received data on transport B.  The special casing ensures that we never
hit that problem.

Neil

^ permalink raw reply

* Re: AF_BUS socket address family
From: Casey Schaufler @ 2012-06-29 18:45 UTC (permalink / raw)
  To: Vincent Sanders; +Cc: netdev, linux-kernel, David S. Miller
In-Reply-To: <1340988354-26981-1-git-send-email-vincent.sanders@collabora.co.uk>

On 6/29/2012 9:45 AM, Vincent Sanders wrote:
> This series adds the bus address family (AF_BUS) it is against
> net-next as of yesterday.
>  
> AF_BUS is a message oriented inter process communication system. 
>
> The principle features are:
>
>  - Reliable datagram based communication (all sockets are of type
>    SOCK_SEQPACKET)
>
>  - Multicast message delivery (one to many, unicast as a subset)
>
>  - Strict ordering (messages are delivered to every client in the same order)
>
>  - Ability to pass file descriptors
>
>  - Ability to pass credentials
>
> The basic concept is to provide a virtual bus on which multiple
> processes can communicate and policy is imposed by a "bus master".
>
> Introduction
> ------------
>
> AF_BUS is based upon AF_UNIX but extended for multicast operation and
> removes stream operation, responding to extensive feedback on previous
> approaches we have made the implementation as isolated as
> possible. There are opportunities in the future to integrate the
> socket garbage collector with that of the unix socket implementation.
>
> The impetus for creating this IPC mechanism is to replace the
> underlying transport for D-Bus. The D-Bus system currently emulates this
> IPC mechanism using AF_UNIX sockets in userspace and has numerous
> undesirable behaviours. D-Bus is now widely deployed in many areas and
> has become a de-facto IPC standard. Using this IPC mechanism as a
> transport gives a significant (100% or more) improvement to throughput
> with comparable improvement to latency.
>
> This work was undertaken by Collabora for the GENIVI Alliance and we
> are committed to responding to feedback promptly and intend to continue
> to support this feature into the future.
>
> Operation
> ---------
>
> A bus is created by processes connecting on an AF_BUS socket. The
> "bus master" binds itself instead of connecting to the NULL address.
>
> The socket address is made up of a path component and a numeric
> component. The path component is either a pathname or an abstract
> socket similar to a unix socket. The numeric component is used to
> uniquely identify each connection to the bus. Thus the path identifies
> a specific bus and the numeric component the attachment to that bus.
>
> The numeric component of the address is divided into two fixed parts a
> prefix to identify multicast groups and a suffix which identifies the
> attachment. The kernel allocates a single address in prefix 0 to each
> socket upon connection.
>
> Connections are initially limited to communicating with address the
> bus master (address 0) . The bus master is responsible for making all
> policy decisions around manipulating other attachments including
> building multicast groups. 
>
> It is expected that connecting clients use protocol specific messages
> to communicate with the bus master to negotiate differing
> configurations although a bus master might implement a fixed
> behaviour.
>
> AF_BUS itself is protocol agnostic and implements the configured
> policy between attachments which allows for a bus master to leave a
> bus and communication between clients to continue.
>
> Some test code has been written [1] which demonstrates the usage of
> AF_BUS.
>
> Use with BUS_PROTO_DBUS
> -----------------------
>
> The initial aim of AF_BUS is to provide a IPC mechanism suitable for
> use to provide the underlying transport for D-Bus. 
>
> A socket created using BUS_PROTO_DBUS indicates that the messages
> passed will be in the D-Bus format. The userspace libraries have been
> updated to use this transport with an updated D-Bus daemon [2] as a bus
> master.

Why don't you go whole hog and put all of D-Bus into the kernel?

>
> The D-Bus protocol allows for multicast groups to be filtered depending
> on message contents. These filters are configured by the bus master
> but need to be enforced on message delivery. 
>
> We have simply used the standard kernel netfilter mechanism to achieve
> this. This is used to filter delivery to clients that may be part of a
> multicast group where they are not receiving all messages according to
> policy. If a client wishes to further filter its input provision has
> been made to allow them to use BPF.
>
> The kernel based IPC has several benefits for D-Bus over the userspace
> emulation:
>
>  - Context switching between userspace processes is reduced.
>  - Message data copying is reduced.
>  - System call overheads are reduced.
>  - The userspace D-Bus daemon was subject to resource starvation,
>    client contention and priority inversion.
>  - Latency is reduced
>  - Throughput is increased.
>
> The tools for testing these assertions are available [3] and
> consistently show a doubling in throughput and better than halving of
> latency.

Please cross-post Patches 04/15 and 05/15 to the linux-security-module list.
Please cross-post Patch 05/15 to the selinux list.

Where is the analogous patch for the Smack LSM?



>
> [1] http://cgit.collabora.com/git/user/javier/check-unix-multicast.git/log/?h=af-bus
> [2] http://cgit.collabora.com/git/user/rodrigo/dbus.git/
>
> [3] git://github.com/kanchev/dbus-ping.git
>     https://github.com/kanchev/dbus-ping/blob/master/dbus-genivi-benchmarking.sh
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
>

^ permalink raw reply

* Re: [PATCH v3] sctp: be more restrictive in transport selection on bundled sacks
From: Vlad Yasevich @ 2012-06-29 19:15 UTC (permalink / raw)
  To: Neil Horman; +Cc: netdev, David S. Miller
In-Reply-To: <20120629184310.GA24604@hmsreliant.think-freely.org>

On 06/29/2012 02:43 PM, Neil Horman wrote:
> On Fri, Jun 29, 2012 at 02:29:52PM -0400, Vlad Yasevich wrote:
>> On 06/29/2012 12:34 PM, Neil Horman wrote:
>>> It was noticed recently that when we send data on a transport, its possible that
>>> we might bundle a sack that arrived on a different transport.  While this isn't
>>> a major problem, it does go against the SHOULD requirement in section 6.4 of RFC
>>> 2960:
>>>
>>>   An endpoint SHOULD transmit reply chunks (e.g., SACK, HEARTBEAT ACK,
>>>     etc.) to the same destination transport address from which it
>>>     received the DATA or control chunk to which it is replying.  This
>>>     rule should also be followed if the endpoint is bundling DATA chunks
>>>     together with the reply chunk.
>>>
>>> This patch seeks to correct that.  It restricts the bundling of sack operations
>>> to only those transports which have moved the ctsn of the association forward
>>> since the last sack.  By doing this we guarantee that we only bundle outbound
>>> saks on a transport that has received a chunk since the last sack.  This brings
>>> us into stricter compliance with the RFC.
>>>
>>> Vlad had initially suggested that we strictly allow only sack bundling on the
>>> transport that last moved the ctsn forward.  While this makes sense, I was
>>> concerned that doing so prevented us from bundling in the case where we had
>>> received chunks that moved the ctsn on multiple transports.  In those cases, the
>>> RFC allows us to select any of the transports having received chunks to bundle
>>> the sack on.  so I've modified the approach to allow for that, by adding a state
>>> variable to each transport that tracks weather it has moved the ctsn since the
>>> last sack.  This I think keeps our behavior (and performance), close enough to
>>> our current profile that I think we can do this without a sysctl knob to
>>> enable/disable it.
>>>
>>> Signed-off-by: Neil Horman<nhorman@tuxdriver.com>
>>> CC: Vlad Yaseivch<vyasevich@gmail.com>
>>> CC: David S. Miller<davem@davemloft.net>
>>> Reported-by: Michele Baldessari<michele@redhat.com>
>>> Reported-by: sorin serban<sserban@redhat.com>
>>>
>>> ---
>>> Change Notes:
>>> V2)
>>> 	* Removed unused variable as per Dave M. Request
>>> 	* Delayed rwnd adjustment until we are sure we will sack (Vlad Y.)
>>> V3)
>>> 	* Switched test to use pkt->transport rather than chunk->transport
>>> 	* Modified detection of sacka-able transport.  Instead of just setting
>>> 	  and clearning a flag, we now mark each transport and association with
>>> 	  a sack generation tag.  We increment the associations generation on
>>> 	  every sack, and assign that generation tag to every transport that
>>> 	  updates the ctsn.  This prevents us from having to iterate over a for
>>> 	  loop on every sack, which is much more scalable.
>>> ---
>>>   include/net/sctp/structs.h |    4 ++++
>>>   include/net/sctp/tsnmap.h  |    3 ++-
>>>   net/sctp/associola.c       |    1 +
>>>   net/sctp/output.c          |    9 +++++++--
>>>   net/sctp/sm_make_chunk.c   |   10 ++++++++++
>>>   net/sctp/sm_sideeffect.c   |    2 +-
>>>   net/sctp/transport.c       |    2 ++
>>>   net/sctp/tsnmap.c          |    6 +++++-
>>>   net/sctp/ulpevent.c        |    3 ++-
>>>   net/sctp/ulpqueue.c        |    2 +-
>>>   10 files changed, 35 insertions(+), 7 deletions(-)
>>>
>>> diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h
>>> index e4652fe..fecdf31 100644
>>> --- a/include/net/sctp/structs.h
>>> +++ b/include/net/sctp/structs.h
>>> @@ -912,6 +912,9 @@ struct sctp_transport {
>>>   		/* Is this structure kfree()able? */
>>>   		malloced:1;
>>>
>>> +	/* Has this transport moved the ctsn since we last sacked */
>>> +	__u32 sack_generation;
>>> +
>>>   	struct flowi fl;
>>>
>>>   	/* This is the peer's IP address and port. */
>>> @@ -1584,6 +1587,7 @@ struct sctp_association {
>>>   		 */
>>>   		__u8    sack_needed;     /* Do we need to sack the peer? */
>>>   		__u32	sack_cnt;
>>> +		__u32	sack_generation;
>>>
>>>   		/* These are capabilities which our peer advertised.  */
>>>   		__u8	ecn_capable:1,	    /* Can peer do ECN? */
>>> diff --git a/include/net/sctp/tsnmap.h b/include/net/sctp/tsnmap.h
>>> index e7728bc..2c5d2b4 100644
>>> --- a/include/net/sctp/tsnmap.h
>>> +++ b/include/net/sctp/tsnmap.h
>>> @@ -117,7 +117,8 @@ void sctp_tsnmap_free(struct sctp_tsnmap *map);
>>>   int sctp_tsnmap_check(const struct sctp_tsnmap *, __u32 tsn);
>>>
>>>   /* Mark this TSN as seen.  */
>>> -int sctp_tsnmap_mark(struct sctp_tsnmap *, __u32 tsn);
>>> +int sctp_tsnmap_mark(struct sctp_tsnmap *, __u32 tsn,
>>> +		     struct sctp_transport *trans);
>>>
>>>   /* Mark this TSN and all lower as seen. */
>>>   void sctp_tsnmap_skip(struct sctp_tsnmap *map, __u32 tsn);
>>> diff --git a/net/sctp/associola.c b/net/sctp/associola.c
>>> index 5bc9ab1..6c66adb 100644
>>> --- a/net/sctp/associola.c
>>> +++ b/net/sctp/associola.c
>>> @@ -271,6 +271,7 @@ static struct sctp_association *sctp_association_init(struct sctp_association *a
>>>   	 */
>>>   	asoc->peer.sack_needed = 1;
>>>   	asoc->peer.sack_cnt = 0;
>>> +	asoc->peer.sack_generation=0;
>>>
>>>   	/* Assume that the peer will tell us if he recognizes ASCONF
>>>   	 * as part of INIT exchange.
>>> diff --git a/net/sctp/output.c b/net/sctp/output.c
>>> index f1b7d4b..0de6cd5 100644
>>> --- a/net/sctp/output.c
>>> +++ b/net/sctp/output.c
>>> @@ -240,14 +240,19 @@ static sctp_xmit_t sctp_packet_bundle_sack(struct sctp_packet *pkt,
>>>   	 */
>>>   	if (sctp_chunk_is_data(chunk)&&   !pkt->has_sack&&
>>>   	!pkt->has_cookie_echo) {
>>> -		struct sctp_association *asoc;
>>>   		struct timer_list *timer;
>>> -		asoc = pkt->transport->asoc;
>>> +		struct sctp_association *asoc = pkt->transport->asoc;
>>> +
>>>   		timer =&asoc->timers[SCTP_EVENT_TIMEOUT_SACK];
>>>
>>>   		/* If the SACK timer is running, we have a pending SACK */
>>>   		if (timer_pending(timer)) {
>>>   			struct sctp_chunk *sack;
>>> +
>>> +			if (pkt->transport->sack_generation !=
>>> +			    pkt->transport->asoc->peer.sack_generation)
>>> +				return retval;
>>> +
>>>   			asoc->a_rwnd = asoc->rwnd;
>>>   			sack = sctp_make_sack(asoc);
>>>   			if (sack) {
>>> diff --git a/net/sctp/sm_make_chunk.c b/net/sctp/sm_make_chunk.c
>>> index a85eeeb..ffa2a8e 100644
>>> --- a/net/sctp/sm_make_chunk.c
>>> +++ b/net/sctp/sm_make_chunk.c
>>> @@ -736,6 +736,7 @@ struct sctp_chunk *sctp_make_sack(const struct sctp_association *asoc)
>>>   	__u16 num_gabs, num_dup_tsns;
>>>   	struct sctp_tsnmap *map = (struct sctp_tsnmap *)&asoc->peer.tsn_map;
>>>   	struct sctp_gap_ack_block gabs[SCTP_MAX_GABS];
>>> +	struct sctp_transport *trans;
>>>
>>>   	memset(gabs, 0, sizeof(gabs));
>>>   	ctsn = sctp_tsnmap_get_ctsn(map);
>>> @@ -805,6 +806,15 @@ struct sctp_chunk *sctp_make_sack(const struct sctp_association *asoc)
>>>   		sctp_addto_chunk(retval, sizeof(__u32) * num_dup_tsns,
>>>   				 sctp_tsnmap_get_dups(map));
>>>
>>> +	/*
>>> +	 * Once we have a sack generated, clear the moved_tsn information
>>> +	 * from all the transports
>>> +	 */
>>> +	if (!asoc->peer.sack_generation)
>>> +		list_for_each_entry(trans,&asoc->peer.transport_addr_list,
>>> +				    transports)
>>> +			trans->sack_generation = UINT_MAX;
>>> +	((struct sctp_association *)asoc)->peer.sack_generation++;
>>
>> Two points here:
>> 1) The commend no longer matches the code
> Crud, missed that, I'll fix it.
>
>> 2) Why special case the peer.sack_generations == 0 and set the
>> transport to UNIT_MAX?
>>
> To avoid wrapping problems leading to erroneous bundling errors.  Consider a
> long lived connection with two trasports (A and B).
>
> If all traffic is sent on A for a long time (generating UINT_MAX sacks), and the
> peer chooses that moment to send data on transport B, its possible that we will
> bundle a sack with that data chunk erroneously, because the associations
> sack_generation has wrapped, and now matches with the transports, even though we
> never received data on transport B.  The special casing ensures that we never
> hit that problem.
>

But you just move this condition to the UINT_MAX value instead.  If we 
use the alternate transport at the time that sack_generation == 
UINT_MAX, we may pick the wrong transport.

You may want to consider value 0 reserved as UNUSED and make 
peer.sack_generation start at 1 and wrap to 1.

-vlad

^ permalink raw reply

* Re: [PATCH v3] sctp: be more restrictive in transport selection on bundled sacks
From: Neil Horman @ 2012-06-29 19:21 UTC (permalink / raw)
  To: Vlad Yasevich; +Cc: netdev, David S. Miller
In-Reply-To: <4FEDFEC0.2060405@gmail.com>

On Fri, Jun 29, 2012 at 03:15:12PM -0400, Vlad Yasevich wrote:
> On 06/29/2012 02:43 PM, Neil Horman wrote:
> >On Fri, Jun 29, 2012 at 02:29:52PM -0400, Vlad Yasevich wrote:
> >>On 06/29/2012 12:34 PM, Neil Horman wrote:
> >>>It was noticed recently that when we send data on a transport, its possible that
> >>>we might bundle a sack that arrived on a different transport.  While this isn't
> >>>a major problem, it does go against the SHOULD requirement in section 6.4 of RFC
> >>>2960:
> >>>
> >>>  An endpoint SHOULD transmit reply chunks (e.g., SACK, HEARTBEAT ACK,
> >>>    etc.) to the same destination transport address from which it
> >>>    received the DATA or control chunk to which it is replying.  This
> >>>    rule should also be followed if the endpoint is bundling DATA chunks
> >>>    together with the reply chunk.
> >>>
> >>>This patch seeks to correct that.  It restricts the bundling of sack operations
> >>>to only those transports which have moved the ctsn of the association forward
> >>>since the last sack.  By doing this we guarantee that we only bundle outbound
> >>>saks on a transport that has received a chunk since the last sack.  This brings
> >>>us into stricter compliance with the RFC.
> >>>
> >>>Vlad had initially suggested that we strictly allow only sack bundling on the
> >>>transport that last moved the ctsn forward.  While this makes sense, I was
> >>>concerned that doing so prevented us from bundling in the case where we had
> >>>received chunks that moved the ctsn on multiple transports.  In those cases, the
> >>>RFC allows us to select any of the transports having received chunks to bundle
> >>>the sack on.  so I've modified the approach to allow for that, by adding a state
> >>>variable to each transport that tracks weather it has moved the ctsn since the
> >>>last sack.  This I think keeps our behavior (and performance), close enough to
> >>>our current profile that I think we can do this without a sysctl knob to
> >>>enable/disable it.
> >>>
> >>>Signed-off-by: Neil Horman<nhorman@tuxdriver.com>
> >>>CC: Vlad Yaseivch<vyasevich@gmail.com>
> >>>CC: David S. Miller<davem@davemloft.net>
> >>>Reported-by: Michele Baldessari<michele@redhat.com>
> >>>Reported-by: sorin serban<sserban@redhat.com>
> >>>
> >>>---
> >>>Change Notes:
> >>>V2)
> >>>	* Removed unused variable as per Dave M. Request
> >>>	* Delayed rwnd adjustment until we are sure we will sack (Vlad Y.)
> >>>V3)
> >>>	* Switched test to use pkt->transport rather than chunk->transport
> >>>	* Modified detection of sacka-able transport.  Instead of just setting
> >>>	  and clearning a flag, we now mark each transport and association with
> >>>	  a sack generation tag.  We increment the associations generation on
> >>>	  every sack, and assign that generation tag to every transport that
> >>>	  updates the ctsn.  This prevents us from having to iterate over a for
> >>>	  loop on every sack, which is much more scalable.
> >>>---
> >>>  include/net/sctp/structs.h |    4 ++++
> >>>  include/net/sctp/tsnmap.h  |    3 ++-
> >>>  net/sctp/associola.c       |    1 +
> >>>  net/sctp/output.c          |    9 +++++++--
> >>>  net/sctp/sm_make_chunk.c   |   10 ++++++++++
> >>>  net/sctp/sm_sideeffect.c   |    2 +-
> >>>  net/sctp/transport.c       |    2 ++
> >>>  net/sctp/tsnmap.c          |    6 +++++-
> >>>  net/sctp/ulpevent.c        |    3 ++-
> >>>  net/sctp/ulpqueue.c        |    2 +-
> >>>  10 files changed, 35 insertions(+), 7 deletions(-)
> >>>
> >>>diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h
> >>>index e4652fe..fecdf31 100644
> >>>--- a/include/net/sctp/structs.h
> >>>+++ b/include/net/sctp/structs.h
> >>>@@ -912,6 +912,9 @@ struct sctp_transport {
> >>>  		/* Is this structure kfree()able? */
> >>>  		malloced:1;
> >>>
> >>>+	/* Has this transport moved the ctsn since we last sacked */
> >>>+	__u32 sack_generation;
> >>>+
> >>>  	struct flowi fl;
> >>>
> >>>  	/* This is the peer's IP address and port. */
> >>>@@ -1584,6 +1587,7 @@ struct sctp_association {
> >>>  		 */
> >>>  		__u8    sack_needed;     /* Do we need to sack the peer? */
> >>>  		__u32	sack_cnt;
> >>>+		__u32	sack_generation;
> >>>
> >>>  		/* These are capabilities which our peer advertised.  */
> >>>  		__u8	ecn_capable:1,	    /* Can peer do ECN? */
> >>>diff --git a/include/net/sctp/tsnmap.h b/include/net/sctp/tsnmap.h
> >>>index e7728bc..2c5d2b4 100644
> >>>--- a/include/net/sctp/tsnmap.h
> >>>+++ b/include/net/sctp/tsnmap.h
> >>>@@ -117,7 +117,8 @@ void sctp_tsnmap_free(struct sctp_tsnmap *map);
> >>>  int sctp_tsnmap_check(const struct sctp_tsnmap *, __u32 tsn);
> >>>
> >>>  /* Mark this TSN as seen.  */
> >>>-int sctp_tsnmap_mark(struct sctp_tsnmap *, __u32 tsn);
> >>>+int sctp_tsnmap_mark(struct sctp_tsnmap *, __u32 tsn,
> >>>+		     struct sctp_transport *trans);
> >>>
> >>>  /* Mark this TSN and all lower as seen. */
> >>>  void sctp_tsnmap_skip(struct sctp_tsnmap *map, __u32 tsn);
> >>>diff --git a/net/sctp/associola.c b/net/sctp/associola.c
> >>>index 5bc9ab1..6c66adb 100644
> >>>--- a/net/sctp/associola.c
> >>>+++ b/net/sctp/associola.c
> >>>@@ -271,6 +271,7 @@ static struct sctp_association *sctp_association_init(struct sctp_association *a
> >>>  	 */
> >>>  	asoc->peer.sack_needed = 1;
> >>>  	asoc->peer.sack_cnt = 0;
> >>>+	asoc->peer.sack_generation=0;
> >>>
> >>>  	/* Assume that the peer will tell us if he recognizes ASCONF
> >>>  	 * as part of INIT exchange.
> >>>diff --git a/net/sctp/output.c b/net/sctp/output.c
> >>>index f1b7d4b..0de6cd5 100644
> >>>--- a/net/sctp/output.c
> >>>+++ b/net/sctp/output.c
> >>>@@ -240,14 +240,19 @@ static sctp_xmit_t sctp_packet_bundle_sack(struct sctp_packet *pkt,
> >>>  	 */
> >>>  	if (sctp_chunk_is_data(chunk)&&   !pkt->has_sack&&
> >>>  	!pkt->has_cookie_echo) {
> >>>-		struct sctp_association *asoc;
> >>>  		struct timer_list *timer;
> >>>-		asoc = pkt->transport->asoc;
> >>>+		struct sctp_association *asoc = pkt->transport->asoc;
> >>>+
> >>>  		timer =&asoc->timers[SCTP_EVENT_TIMEOUT_SACK];
> >>>
> >>>  		/* If the SACK timer is running, we have a pending SACK */
> >>>  		if (timer_pending(timer)) {
> >>>  			struct sctp_chunk *sack;
> >>>+
> >>>+			if (pkt->transport->sack_generation !=
> >>>+			    pkt->transport->asoc->peer.sack_generation)
> >>>+				return retval;
> >>>+
> >>>  			asoc->a_rwnd = asoc->rwnd;
> >>>  			sack = sctp_make_sack(asoc);
> >>>  			if (sack) {
> >>>diff --git a/net/sctp/sm_make_chunk.c b/net/sctp/sm_make_chunk.c
> >>>index a85eeeb..ffa2a8e 100644
> >>>--- a/net/sctp/sm_make_chunk.c
> >>>+++ b/net/sctp/sm_make_chunk.c
> >>>@@ -736,6 +736,7 @@ struct sctp_chunk *sctp_make_sack(const struct sctp_association *asoc)
> >>>  	__u16 num_gabs, num_dup_tsns;
> >>>  	struct sctp_tsnmap *map = (struct sctp_tsnmap *)&asoc->peer.tsn_map;
> >>>  	struct sctp_gap_ack_block gabs[SCTP_MAX_GABS];
> >>>+	struct sctp_transport *trans;
> >>>
> >>>  	memset(gabs, 0, sizeof(gabs));
> >>>  	ctsn = sctp_tsnmap_get_ctsn(map);
> >>>@@ -805,6 +806,15 @@ struct sctp_chunk *sctp_make_sack(const struct sctp_association *asoc)
> >>>  		sctp_addto_chunk(retval, sizeof(__u32) * num_dup_tsns,
> >>>  				 sctp_tsnmap_get_dups(map));
> >>>
> >>>+	/*
> >>>+	 * Once we have a sack generated, clear the moved_tsn information
> >>>+	 * from all the transports
> >>>+	 */
> >>>+	if (!asoc->peer.sack_generation)
> >>>+		list_for_each_entry(trans,&asoc->peer.transport_addr_list,
> >>>+				    transports)
> >>>+			trans->sack_generation = UINT_MAX;
> >>>+	((struct sctp_association *)asoc)->peer.sack_generation++;
> >>
> >>Two points here:
> >>1) The commend no longer matches the code
> >Crud, missed that, I'll fix it.
> >
> >>2) Why special case the peer.sack_generations == 0 and set the
> >>transport to UNIT_MAX?
> >>
> >To avoid wrapping problems leading to erroneous bundling errors.  Consider a
> >long lived connection with two trasports (A and B).
> >
> >If all traffic is sent on A for a long time (generating UINT_MAX sacks), and the
> >peer chooses that moment to send data on transport B, its possible that we will
> >bundle a sack with that data chunk erroneously, because the associations
> >sack_generation has wrapped, and now matches with the transports, even though we
> >never received data on transport B.  The special casing ensures that we never
> >hit that problem.
> >
> 
> But you just move this condition to the UINT_MAX value instead.  If
> we use the alternate transport at the time that sack_generation ==
> UINT_MAX, we may pick the wrong transport.
> 
Yes, i noticed that as I was fixing the comment, thank you!

> You may want to consider value 0 reserved as UNUSED and make
> peer.sack_generation start at 1 and wrap to 1.
> 
Thats exactly what I just did :)
Neil

> -vlad
> 

^ permalink raw reply

* [PATCH net-next] cnic: Fix mmap regression.
From: Michael Chan @ 2012-06-29 19:32 UTC (permalink / raw)
  To: davem; +Cc: netdev

commit 1f85d58cdf15354a7120fc9ccc9bb9c45b53af88
    cnic: Remove uio mem[0].

introduced a regression as older versions of userspace app still rely
on this mmap.  Restore the mmap functionality and get the base address
from pci_resource_start() as the nedev->base_addr has been deprecated for
PCI devices.

Update version to 2.5.12.

Signed-off-by: Michael Chan <mchan@broadocm.com>
---
 drivers/net/ethernet/broadcom/cnic.c    |    8 +++++++-
 drivers/net/ethernet/broadcom/cnic_if.h |    4 ++--
 2 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ethernet/broadcom/cnic.c b/drivers/net/ethernet/broadcom/cnic.c
index f897306..22ad7b6 100644
--- a/drivers/net/ethernet/broadcom/cnic.c
+++ b/drivers/net/ethernet/broadcom/cnic.c
@@ -1063,9 +1063,13 @@ static int cnic_init_uio(struct cnic_dev *dev)
 
 	uinfo = &udev->cnic_uinfo;
 
-	uinfo->mem[0].memtype = UIO_MEM_NONE;
+	uinfo->mem[0].addr = pci_resource_start(dev->pcidev, 0);
+	uinfo->mem[0].internal_addr = dev->regview;
+	uinfo->mem[0].memtype = UIO_MEM_PHYS;
 
 	if (test_bit(CNIC_F_BNX2_CLASS, &dev->flags)) {
+		uinfo->mem[0].size = MB_GET_CID_ADDR(TX_TSS_CID +
+						     TX_MAX_TSS_RINGS + 1);
 		uinfo->mem[1].addr = (unsigned long) cp->status_blk.gen &
 					PAGE_MASK;
 		if (cp->ethdev->drv_state & CNIC_DRV_STATE_USING_MSIX)
@@ -1075,6 +1079,8 @@ static int cnic_init_uio(struct cnic_dev *dev)
 
 		uinfo->name = "bnx2_cnic";
 	} else if (test_bit(CNIC_F_BNX2X_CLASS, &dev->flags)) {
+		uinfo->mem[0].size = pci_resource_len(dev->pcidev, 0);
+
 		uinfo->mem[1].addr = (unsigned long) cp->bnx2x_def_status_blk &
 			PAGE_MASK;
 		uinfo->mem[1].size = sizeof(*cp->bnx2x_def_status_blk);
diff --git a/drivers/net/ethernet/broadcom/cnic_if.h b/drivers/net/ethernet/broadcom/cnic_if.h
index 54f68f0..5cb8888 100644
--- a/drivers/net/ethernet/broadcom/cnic_if.h
+++ b/drivers/net/ethernet/broadcom/cnic_if.h
@@ -14,8 +14,8 @@
 
 #include "bnx2x/bnx2x_mfw_req.h"
 
-#define CNIC_MODULE_VERSION	"2.5.11"
-#define CNIC_MODULE_RELDATE	"June 27, 2012"
+#define CNIC_MODULE_VERSION	"2.5.12"
+#define CNIC_MODULE_RELDATE	"June 29, 2012"
 
 #define CNIC_ULP_RDMA		0
 #define CNIC_ULP_ISCSI		1
-- 
1.7.1

^ permalink raw reply related

* [PATCH v4] sctp: be more restrictive in transport selection on bundled sacks
From: Neil Horman @ 2012-06-29 19:24 UTC (permalink / raw)
  To: netdev; +Cc: Neil Horman, Vlad Yaseivch, David S. Miller, linux-sctp
In-Reply-To: <1340742704-2192-1-git-send-email-nhorman@tuxdriver.com>

It was noticed recently that when we send data on a transport, its possible that
we might bundle a sack that arrived on a different transport.  While this isn't
a major problem, it does go against the SHOULD requirement in section 6.4 of RFC
2960:

 An endpoint SHOULD transmit reply chunks (e.g., SACK, HEARTBEAT ACK,
   etc.) to the same destination transport address from which it
   received the DATA or control chunk to which it is replying.  This
   rule should also be followed if the endpoint is bundling DATA chunks
   together with the reply chunk.

This patch seeks to correct that.  It restricts the bundling of sack operations
to only those transports which have moved the ctsn of the association forward
since the last sack.  By doing this we guarantee that we only bundle outbound
saks on a transport that has received a chunk since the last sack.  This brings
us into stricter compliance with the RFC.

Vlad had initially suggested that we strictly allow only sack bundling on the
transport that last moved the ctsn forward.  While this makes sense, I was
concerned that doing so prevented us from bundling in the case where we had
received chunks that moved the ctsn on multiple transports.  In those cases, the
RFC allows us to select any of the transports having received chunks to bundle
the sack on.  so I've modified the approach to allow for that, by adding a state
variable to each transport that tracks weather it has moved the ctsn since the
last sack.  This I think keeps our behavior (and performance), close enough to
our current profile that I think we can do this without a sysctl knob to
enable/disable it.

Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
CC: Vlad Yaseivch <vyasevich@gmail.com>
CC: David S. Miller <davem@davemloft.net>
CC: linux-sctp@vger.kernel.org
Reported-by: Michele Baldessari <michele@redhat.com>
Reported-by: sorin serban <sserban@redhat.com>

---
Change Notes:
V2)
	* Removed unused variable as per Dave M. Request
	* Delayed rwnd adjustment until we are sure we will sack (Vlad Y.)
V3)
	* Switched test to use pkt->transport rather than chunk->transport
	* Modified detection of sacka-able transport.  Instead of just setting
	  and clearning a flag, we now mark each transport and association with
	  a sack generation tag.  We increment the associations generation on
	  every sack, and assign that generation tag to every transport that
	  updates the ctsn.  This prevents us from having to iterate over a for
	  loop on every sack, which is much more scalable.
V4)
	* Fixed up wrapping comment and logic
---
 include/net/sctp/structs.h |    4 ++++
 include/net/sctp/tsnmap.h  |    3 ++-
 net/sctp/associola.c       |    1 +
 net/sctp/output.c          |    9 +++++++--
 net/sctp/sm_make_chunk.c   |   18 ++++++++++++++++++
 net/sctp/sm_sideeffect.c   |    2 +-
 net/sctp/transport.c       |    2 ++
 net/sctp/tsnmap.c          |    6 +++++-
 net/sctp/ulpevent.c        |    3 ++-
 net/sctp/ulpqueue.c        |    2 +-
 10 files changed, 43 insertions(+), 7 deletions(-)

diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h
index e4652fe..fecdf31 100644
--- a/include/net/sctp/structs.h
+++ b/include/net/sctp/structs.h
@@ -912,6 +912,9 @@ struct sctp_transport {
 		/* Is this structure kfree()able? */
 		malloced:1;
 
+	/* Has this transport moved the ctsn since we last sacked */
+	__u32 sack_generation;
+
 	struct flowi fl;
 
 	/* This is the peer's IP address and port. */
@@ -1584,6 +1587,7 @@ struct sctp_association {
 		 */
 		__u8    sack_needed;     /* Do we need to sack the peer? */
 		__u32	sack_cnt;
+		__u32	sack_generation;
 
 		/* These are capabilities which our peer advertised.  */
 		__u8	ecn_capable:1,	    /* Can peer do ECN? */
diff --git a/include/net/sctp/tsnmap.h b/include/net/sctp/tsnmap.h
index e7728bc..2c5d2b4 100644
--- a/include/net/sctp/tsnmap.h
+++ b/include/net/sctp/tsnmap.h
@@ -117,7 +117,8 @@ void sctp_tsnmap_free(struct sctp_tsnmap *map);
 int sctp_tsnmap_check(const struct sctp_tsnmap *, __u32 tsn);
 
 /* Mark this TSN as seen.  */
-int sctp_tsnmap_mark(struct sctp_tsnmap *, __u32 tsn);
+int sctp_tsnmap_mark(struct sctp_tsnmap *, __u32 tsn,
+		     struct sctp_transport *trans);
 
 /* Mark this TSN and all lower as seen. */
 void sctp_tsnmap_skip(struct sctp_tsnmap *map, __u32 tsn);
diff --git a/net/sctp/associola.c b/net/sctp/associola.c
index 5bc9ab1..b16517e 100644
--- a/net/sctp/associola.c
+++ b/net/sctp/associola.c
@@ -271,6 +271,7 @@ static struct sctp_association *sctp_association_init(struct sctp_association *a
 	 */
 	asoc->peer.sack_needed = 1;
 	asoc->peer.sack_cnt = 0;
+	asoc->peer.sack_generation = 1;
 
 	/* Assume that the peer will tell us if he recognizes ASCONF
 	 * as part of INIT exchange.
diff --git a/net/sctp/output.c b/net/sctp/output.c
index f1b7d4b..0de6cd5 100644
--- a/net/sctp/output.c
+++ b/net/sctp/output.c
@@ -240,14 +240,19 @@ static sctp_xmit_t sctp_packet_bundle_sack(struct sctp_packet *pkt,
 	 */
 	if (sctp_chunk_is_data(chunk) && !pkt->has_sack &&
 	    !pkt->has_cookie_echo) {
-		struct sctp_association *asoc;
 		struct timer_list *timer;
-		asoc = pkt->transport->asoc;
+		struct sctp_association *asoc = pkt->transport->asoc;
+
 		timer = &asoc->timers[SCTP_EVENT_TIMEOUT_SACK];
 
 		/* If the SACK timer is running, we have a pending SACK */
 		if (timer_pending(timer)) {
 			struct sctp_chunk *sack;
+
+			if (pkt->transport->sack_generation !=
+			    pkt->transport->asoc->peer.sack_generation)
+				return retval;
+
 			asoc->a_rwnd = asoc->rwnd;
 			sack = sctp_make_sack(asoc);
 			if (sack) {
diff --git a/net/sctp/sm_make_chunk.c b/net/sctp/sm_make_chunk.c
index a85eeeb..ae587d4 100644
--- a/net/sctp/sm_make_chunk.c
+++ b/net/sctp/sm_make_chunk.c
@@ -736,6 +736,7 @@ struct sctp_chunk *sctp_make_sack(const struct sctp_association *asoc)
 	__u16 num_gabs, num_dup_tsns;
 	struct sctp_tsnmap *map = (struct sctp_tsnmap *)&asoc->peer.tsn_map;
 	struct sctp_gap_ack_block gabs[SCTP_MAX_GABS];
+	struct sctp_transport *trans;
 
 	memset(gabs, 0, sizeof(gabs));
 	ctsn = sctp_tsnmap_get_ctsn(map);
@@ -805,6 +806,23 @@ struct sctp_chunk *sctp_make_sack(const struct sctp_association *asoc)
 		sctp_addto_chunk(retval, sizeof(__u32) * num_dup_tsns,
 				 sctp_tsnmap_get_dups(map));
 
+	/*
+	 * Once we have a sack generated:
+	 * 1) Check to see what our sack generation is, if its UINT_MAX, reset
+	 *    the transports to 1, and wrap the association generation back to
+	 *    zero
+	 * 2) Increment out sack_generation
+	 * The idea is that zero is never used as a valid generation for the
+	 * association so no transport will match after a wrap event like this,
+	 * Until the next sack
+	 */ 
+	if (asoc->peer.sack_generation == UINT_MAX) {
+		list_for_each_entry(trans, &asoc->peer.transport_addr_list,
+				    transports)
+			trans->sack_generation = 0;
+		((struct sctp_association *)asoc)->peer.sack_generation = 0;
+	}
+	((struct sctp_association *)asoc)->peer.sack_generation++;
 nodata:
 	return retval;
 }
diff --git a/net/sctp/sm_sideeffect.c b/net/sctp/sm_sideeffect.c
index c96d1a8..8716da1 100644
--- a/net/sctp/sm_sideeffect.c
+++ b/net/sctp/sm_sideeffect.c
@@ -1268,7 +1268,7 @@ static int sctp_cmd_interpreter(sctp_event_t event_type,
 		case SCTP_CMD_REPORT_TSN:
 			/* Record the arrival of a TSN.  */
 			error = sctp_tsnmap_mark(&asoc->peer.tsn_map,
-						 cmd->obj.u32);
+						 cmd->obj.u32, NULL);
 			break;
 
 		case SCTP_CMD_REPORT_FWDTSN:
diff --git a/net/sctp/transport.c b/net/sctp/transport.c
index b026ba0..1dcceb6 100644
--- a/net/sctp/transport.c
+++ b/net/sctp/transport.c
@@ -68,6 +68,8 @@ static struct sctp_transport *sctp_transport_init(struct sctp_transport *peer,
 	peer->af_specific = sctp_get_af_specific(addr->sa.sa_family);
 	memset(&peer->saddr, 0, sizeof(union sctp_addr));
 
+	peer->sack_generation = 0;
+
 	/* From 6.3.1 RTO Calculation:
 	 *
 	 * C1) Until an RTT measurement has been made for a packet sent to the
diff --git a/net/sctp/tsnmap.c b/net/sctp/tsnmap.c
index f1e40ceb..b5fb7c4 100644
--- a/net/sctp/tsnmap.c
+++ b/net/sctp/tsnmap.c
@@ -114,7 +114,8 @@ int sctp_tsnmap_check(const struct sctp_tsnmap *map, __u32 tsn)
 
 
 /* Mark this TSN as seen.  */
-int sctp_tsnmap_mark(struct sctp_tsnmap *map, __u32 tsn)
+int sctp_tsnmap_mark(struct sctp_tsnmap *map, __u32 tsn,
+		     struct sctp_transport *trans)
 {
 	u16 gap;
 
@@ -133,6 +134,9 @@ int sctp_tsnmap_mark(struct sctp_tsnmap *map, __u32 tsn)
 		 */
 		map->max_tsn_seen++;
 		map->cumulative_tsn_ack_point++;
+		if (trans)
+			trans->sack_generation =
+				trans->asoc->peer.sack_generation;
 		map->base_tsn++;
 	} else {
 		/* Either we already have a gap, or about to record a gap, so
diff --git a/net/sctp/ulpevent.c b/net/sctp/ulpevent.c
index 8a84017..33d8947 100644
--- a/net/sctp/ulpevent.c
+++ b/net/sctp/ulpevent.c
@@ -715,7 +715,8 @@ struct sctp_ulpevent *sctp_ulpevent_make_rcvmsg(struct sctp_association *asoc,
 	 * can mark it as received so the tsn_map is updated correctly.
 	 */
 	if (sctp_tsnmap_mark(&asoc->peer.tsn_map,
-			     ntohl(chunk->subh.data_hdr->tsn)))
+			     ntohl(chunk->subh.data_hdr->tsn),
+			     chunk->transport))
 		goto fail_mark;
 
 	/* First calculate the padding, so we don't inadvertently
diff --git a/net/sctp/ulpqueue.c b/net/sctp/ulpqueue.c
index f2d1de7..f5a6a4f 100644
--- a/net/sctp/ulpqueue.c
+++ b/net/sctp/ulpqueue.c
@@ -1051,7 +1051,7 @@ void sctp_ulpq_renege(struct sctp_ulpq *ulpq, struct sctp_chunk *chunk,
 	if (chunk && (freed >= needed)) {
 		__u32 tsn;
 		tsn = ntohl(chunk->subh.data_hdr->tsn);
-		sctp_tsnmap_mark(&asoc->peer.tsn_map, tsn);
+		sctp_tsnmap_mark(&asoc->peer.tsn_map, tsn, chunk->transport);
 		sctp_ulpq_tail_data(ulpq, chunk, gfp);
 
 		sctp_ulpq_partial_delivery(ulpq, chunk, gfp);
-- 
1.7.7.6

^ permalink raw reply related

* Re: AF_BUS socket address family
From: Ben Hutchings @ 2012-06-29 19:33 UTC (permalink / raw)
  To: Chris Friesen; +Cc: Vincent Sanders, netdev, linux-kernel, David S. Miller
In-Reply-To: <4FEDF107.8030700@genband.com>

On Fri, 2012-06-29 at 12:16 -0600, Chris Friesen wrote:
> On 06/29/2012 10:45 AM, Vincent Sanders wrote:
> > This series adds the bus address family (AF_BUS) it is against
> > net-next as of yesterday.
> >
> > AF_BUS is a message oriented inter process communication system.
> >
> > The principle features are:
> >
> >   - Reliable datagram based communication (all sockets are of type
> >     SOCK_SEQPACKET)
> >
> >   - Multicast message delivery (one to many, unicast as a subset)
> >
> >   - Strict ordering (messages are delivered to every client in the same order)
> >
> >   - Ability to pass file descriptors
> >
> >   - Ability to pass credentials
> >
> 
> I haven't had time to look at the code yet, but if you haven't already 
> I'd like to propose adding the ability for someone with suitable 
> privileges to eavesdrop on all communications.  We've been using 
> something similar to this (essentially a simplified multicast unix 
> datagram protocol) for many years now and having a tcpdump-like ability 
> is very useful for debugging.

It's in there (look for 'eavesdrop' in 08/15).

Ben.

-- 
Ben Hutchings, Staff Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.

^ permalink raw reply

* [PATCH v5] sctp: be more restrictive in transport selection on bundled sacks
From: Neil Horman @ 2012-06-29 20:15 UTC (permalink / raw)
  To: netdev; +Cc: Neil Horman, Vlad Yaseivch, David S. Miller, linux-sctp
In-Reply-To: <1340742704-2192-1-git-send-email-nhorman@tuxdriver.com>

It was noticed recently that when we send data on a transport, its possible that
we might bundle a sack that arrived on a different transport.  While this isn't
a major problem, it does go against the SHOULD requirement in section 6.4 of RFC
2960:

 An endpoint SHOULD transmit reply chunks (e.g., SACK, HEARTBEAT ACK,
   etc.) to the same destination transport address from which it
   received the DATA or control chunk to which it is replying.  This
   rule should also be followed if the endpoint is bundling DATA chunks
   together with the reply chunk.

This patch seeks to correct that.  It restricts the bundling of sack operations
to only those transports which have moved the ctsn of the association forward
since the last sack.  By doing this we guarantee that we only bundle outbound
saks on a transport that has received a chunk since the last sack.  This brings
us into stricter compliance with the RFC.

Vlad had initially suggested that we strictly allow only sack bundling on the
transport that last moved the ctsn forward.  While this makes sense, I was
concerned that doing so prevented us from bundling in the case where we had
received chunks that moved the ctsn on multiple transports.  In those cases, the
RFC allows us to select any of the transports having received chunks to bundle
the sack on.  so I've modified the approach to allow for that, by adding a state
variable to each transport that tracks weather it has moved the ctsn since the
last sack.  This I think keeps our behavior (and performance), close enough to
our current profile that I think we can do this without a sysctl knob to
enable/disable it.

Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
CC: Vlad Yaseivch <vyasevich@gmail.com>
CC: David S. Miller <davem@davemloft.net>
CC: linux-sctp@vger.kernel.org
Reported-by: Michele Baldessari <michele@redhat.com>
Reported-by: sorin serban <sserban@redhat.com>

---
Change Notes:
V2)
	* Removed unused variable as per Dave M. Request
	* Delayed rwnd adjustment until we are sure we will sack (Vlad Y.)
V3)
	* Switched test to use pkt->transport rather than chunk->transport
	* Modified detection of sacka-able transport.  Instead of just setting
	  and clearning a flag, we now mark each transport and association with
	  a sack generation tag.  We increment the associations generation on
	  every sack, and assign that generation tag to every transport that
	  updates the ctsn.  This prevents us from having to iterate over a for
	  loop on every sack, which is much more scalable.
V4)
	* Fixed up wrapping comment and logic
V5)
	* Simplified wrap logic further per request from vlad
---
 include/net/sctp/structs.h |    4 ++++
 include/net/sctp/tsnmap.h  |    3 ++-
 net/sctp/associola.c       |    1 +
 net/sctp/output.c          |    9 +++++++--
 net/sctp/sm_make_chunk.c   |   17 +++++++++++++++++
 net/sctp/sm_sideeffect.c   |    2 +-
 net/sctp/transport.c       |    2 ++
 net/sctp/tsnmap.c          |    6 +++++-
 net/sctp/ulpevent.c        |    3 ++-
 net/sctp/ulpqueue.c        |    2 +-
 10 files changed, 42 insertions(+), 7 deletions(-)

diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h
index e4652fe..fecdf31 100644
--- a/include/net/sctp/structs.h
+++ b/include/net/sctp/structs.h
@@ -912,6 +912,9 @@ struct sctp_transport {
 		/* Is this structure kfree()able? */
 		malloced:1;
 
+	/* Has this transport moved the ctsn since we last sacked */
+	__u32 sack_generation;
+
 	struct flowi fl;
 
 	/* This is the peer's IP address and port. */
@@ -1584,6 +1587,7 @@ struct sctp_association {
 		 */
 		__u8    sack_needed;     /* Do we need to sack the peer? */
 		__u32	sack_cnt;
+		__u32	sack_generation;
 
 		/* These are capabilities which our peer advertised.  */
 		__u8	ecn_capable:1,	    /* Can peer do ECN? */
diff --git a/include/net/sctp/tsnmap.h b/include/net/sctp/tsnmap.h
index e7728bc..2c5d2b4 100644
--- a/include/net/sctp/tsnmap.h
+++ b/include/net/sctp/tsnmap.h
@@ -117,7 +117,8 @@ void sctp_tsnmap_free(struct sctp_tsnmap *map);
 int sctp_tsnmap_check(const struct sctp_tsnmap *, __u32 tsn);
 
 /* Mark this TSN as seen.  */
-int sctp_tsnmap_mark(struct sctp_tsnmap *, __u32 tsn);
+int sctp_tsnmap_mark(struct sctp_tsnmap *, __u32 tsn,
+		     struct sctp_transport *trans);
 
 /* Mark this TSN and all lower as seen. */
 void sctp_tsnmap_skip(struct sctp_tsnmap *map, __u32 tsn);
diff --git a/net/sctp/associola.c b/net/sctp/associola.c
index 5bc9ab1..b16517e 100644
--- a/net/sctp/associola.c
+++ b/net/sctp/associola.c
@@ -271,6 +271,7 @@ static struct sctp_association *sctp_association_init(struct sctp_association *a
 	 */
 	asoc->peer.sack_needed = 1;
 	asoc->peer.sack_cnt = 0;
+	asoc->peer.sack_generation = 1;
 
 	/* Assume that the peer will tell us if he recognizes ASCONF
 	 * as part of INIT exchange.
diff --git a/net/sctp/output.c b/net/sctp/output.c
index f1b7d4b..0de6cd5 100644
--- a/net/sctp/output.c
+++ b/net/sctp/output.c
@@ -240,14 +240,19 @@ static sctp_xmit_t sctp_packet_bundle_sack(struct sctp_packet *pkt,
 	 */
 	if (sctp_chunk_is_data(chunk) && !pkt->has_sack &&
 	    !pkt->has_cookie_echo) {
-		struct sctp_association *asoc;
 		struct timer_list *timer;
-		asoc = pkt->transport->asoc;
+		struct sctp_association *asoc = pkt->transport->asoc;
+
 		timer = &asoc->timers[SCTP_EVENT_TIMEOUT_SACK];
 
 		/* If the SACK timer is running, we have a pending SACK */
 		if (timer_pending(timer)) {
 			struct sctp_chunk *sack;
+
+			if (pkt->transport->sack_generation !=
+			    pkt->transport->asoc->peer.sack_generation)
+				return retval;
+
 			asoc->a_rwnd = asoc->rwnd;
 			sack = sctp_make_sack(asoc);
 			if (sack) {
diff --git a/net/sctp/sm_make_chunk.c b/net/sctp/sm_make_chunk.c
index a85eeeb..6486cac 100644
--- a/net/sctp/sm_make_chunk.c
+++ b/net/sctp/sm_make_chunk.c
@@ -734,8 +734,10 @@ struct sctp_chunk *sctp_make_sack(const struct sctp_association *asoc)
 	int len;
 	__u32 ctsn;
 	__u16 num_gabs, num_dup_tsns;
+	struct sctp_association *aptr = (struct sctp_association *)asoc;
 	struct sctp_tsnmap *map = (struct sctp_tsnmap *)&asoc->peer.tsn_map;
 	struct sctp_gap_ack_block gabs[SCTP_MAX_GABS];
+	struct sctp_transport *trans;
 
 	memset(gabs, 0, sizeof(gabs));
 	ctsn = sctp_tsnmap_get_ctsn(map);
@@ -805,6 +807,21 @@ struct sctp_chunk *sctp_make_sack(const struct sctp_association *asoc)
 		sctp_addto_chunk(retval, sizeof(__u32) * num_dup_tsns,
 				 sctp_tsnmap_get_dups(map));
 
+	/*
+	 * Once we have a sack generated, check to see what our sack
+	 * generation is, if its 0, reset the transports to 0, and reset
+	 * the association generation to 1
+	 *
+	 * The idea is that zero is never used as a valid generation for the
+	 * association so no transport will match after a wrap event like this,
+	 * Until the next sack
+	 */ 
+	if (++aptr->peer.sack_generation == 0) {
+		list_for_each_entry(trans, &asoc->peer.transport_addr_list,
+				    transports)
+			trans->sack_generation = 0;
+		aptr->peer.sack_generation = 1;
+	}
 nodata:
 	return retval;
 }
diff --git a/net/sctp/sm_sideeffect.c b/net/sctp/sm_sideeffect.c
index c96d1a8..8716da1 100644
--- a/net/sctp/sm_sideeffect.c
+++ b/net/sctp/sm_sideeffect.c
@@ -1268,7 +1268,7 @@ static int sctp_cmd_interpreter(sctp_event_t event_type,
 		case SCTP_CMD_REPORT_TSN:
 			/* Record the arrival of a TSN.  */
 			error = sctp_tsnmap_mark(&asoc->peer.tsn_map,
-						 cmd->obj.u32);
+						 cmd->obj.u32, NULL);
 			break;
 
 		case SCTP_CMD_REPORT_FWDTSN:
diff --git a/net/sctp/transport.c b/net/sctp/transport.c
index b026ba0..1dcceb6 100644
--- a/net/sctp/transport.c
+++ b/net/sctp/transport.c
@@ -68,6 +68,8 @@ static struct sctp_transport *sctp_transport_init(struct sctp_transport *peer,
 	peer->af_specific = sctp_get_af_specific(addr->sa.sa_family);
 	memset(&peer->saddr, 0, sizeof(union sctp_addr));
 
+	peer->sack_generation = 0;
+
 	/* From 6.3.1 RTO Calculation:
 	 *
 	 * C1) Until an RTT measurement has been made for a packet sent to the
diff --git a/net/sctp/tsnmap.c b/net/sctp/tsnmap.c
index f1e40ceb..b5fb7c4 100644
--- a/net/sctp/tsnmap.c
+++ b/net/sctp/tsnmap.c
@@ -114,7 +114,8 @@ int sctp_tsnmap_check(const struct sctp_tsnmap *map, __u32 tsn)
 
 
 /* Mark this TSN as seen.  */
-int sctp_tsnmap_mark(struct sctp_tsnmap *map, __u32 tsn)
+int sctp_tsnmap_mark(struct sctp_tsnmap *map, __u32 tsn,
+		     struct sctp_transport *trans)
 {
 	u16 gap;
 
@@ -133,6 +134,9 @@ int sctp_tsnmap_mark(struct sctp_tsnmap *map, __u32 tsn)
 		 */
 		map->max_tsn_seen++;
 		map->cumulative_tsn_ack_point++;
+		if (trans)
+			trans->sack_generation =
+				trans->asoc->peer.sack_generation;
 		map->base_tsn++;
 	} else {
 		/* Either we already have a gap, or about to record a gap, so
diff --git a/net/sctp/ulpevent.c b/net/sctp/ulpevent.c
index 8a84017..33d8947 100644
--- a/net/sctp/ulpevent.c
+++ b/net/sctp/ulpevent.c
@@ -715,7 +715,8 @@ struct sctp_ulpevent *sctp_ulpevent_make_rcvmsg(struct sctp_association *asoc,
 	 * can mark it as received so the tsn_map is updated correctly.
 	 */
 	if (sctp_tsnmap_mark(&asoc->peer.tsn_map,
-			     ntohl(chunk->subh.data_hdr->tsn)))
+			     ntohl(chunk->subh.data_hdr->tsn),
+			     chunk->transport))
 		goto fail_mark;
 
 	/* First calculate the padding, so we don't inadvertently
diff --git a/net/sctp/ulpqueue.c b/net/sctp/ulpqueue.c
index f2d1de7..f5a6a4f 100644
--- a/net/sctp/ulpqueue.c
+++ b/net/sctp/ulpqueue.c
@@ -1051,7 +1051,7 @@ void sctp_ulpq_renege(struct sctp_ulpq *ulpq, struct sctp_chunk *chunk,
 	if (chunk && (freed >= needed)) {
 		__u32 tsn;
 		tsn = ntohl(chunk->subh.data_hdr->tsn);
-		sctp_tsnmap_mark(&asoc->peer.tsn_map, tsn);
+		sctp_tsnmap_mark(&asoc->peer.tsn_map, tsn, chunk->transport);
 		sctp_ulpq_tail_data(ulpq, chunk, gfp);
 
 		sctp_ulpq_partial_delivery(ulpq, chunk, gfp);
-- 
1.7.7.6

^ permalink raw reply related

* Re: [PATCH v5] sctp: be more restrictive in transport selection on bundled sacks
From: Vlad Yasevich @ 2012-06-29 20:19 UTC (permalink / raw)
  To: Neil Horman; +Cc: netdev, David S. Miller, linux-sctp
In-Reply-To: <1341000929-22933-1-git-send-email-nhorman@tuxdriver.com>

On 06/29/2012 04:15 PM, Neil Horman wrote:
> It was noticed recently that when we send data on a transport, its possible that
> we might bundle a sack that arrived on a different transport.  While this isn't
> a major problem, it does go against the SHOULD requirement in section 6.4 of RFC
> 2960:
>
>   An endpoint SHOULD transmit reply chunks (e.g., SACK, HEARTBEAT ACK,
>     etc.) to the same destination transport address from which it
>     received the DATA or control chunk to which it is replying.  This
>     rule should also be followed if the endpoint is bundling DATA chunks
>     together with the reply chunk.
>
> This patch seeks to correct that.  It restricts the bundling of sack operations
> to only those transports which have moved the ctsn of the association forward
> since the last sack.  By doing this we guarantee that we only bundle outbound
> saks on a transport that has received a chunk since the last sack.  This brings
> us into stricter compliance with the RFC.
>
> Vlad had initially suggested that we strictly allow only sack bundling on the
> transport that last moved the ctsn forward.  While this makes sense, I was
> concerned that doing so prevented us from bundling in the case where we had
> received chunks that moved the ctsn on multiple transports.  In those cases, the
> RFC allows us to select any of the transports having received chunks to bundle
> the sack on.  so I've modified the approach to allow for that, by adding a state
> variable to each transport that tracks weather it has moved the ctsn since the
> last sack.  This I think keeps our behavior (and performance), close enough to
> our current profile that I think we can do this without a sysctl knob to
> enable/disable it.
>
> Signed-off-by: Neil Horman<nhorman@tuxdriver.com>
> CC: Vlad Yaseivch<vyasevich@gmail.com>
> CC: David S. Miller<davem@davemloft.net>
> CC: linux-sctp@vger.kernel.org
> Reported-by: Michele Baldessari<michele@redhat.com>
> Reported-by: sorin serban<sserban@redhat.com>
>

Thanks Neil.  Looks good.

Acked-by: Vlad Yasevich <vyasevich@gmail.com>

-vlad

> ---
> Change Notes:
> V2)
> 	* Removed unused variable as per Dave M. Request
> 	* Delayed rwnd adjustment until we are sure we will sack (Vlad Y.)
> V3)
> 	* Switched test to use pkt->transport rather than chunk->transport
> 	* Modified detection of sacka-able transport.  Instead of just setting
> 	  and clearning a flag, we now mark each transport and association with
> 	  a sack generation tag.  We increment the associations generation on
> 	  every sack, and assign that generation tag to every transport that
> 	  updates the ctsn.  This prevents us from having to iterate over a for
> 	  loop on every sack, which is much more scalable.
> V4)
> 	* Fixed up wrapping comment and logic
> V5)
> 	* Simplified wrap logic further per request from vlad
> ---
>   include/net/sctp/structs.h |    4 ++++
>   include/net/sctp/tsnmap.h  |    3 ++-
>   net/sctp/associola.c       |    1 +
>   net/sctp/output.c          |    9 +++++++--
>   net/sctp/sm_make_chunk.c   |   17 +++++++++++++++++
>   net/sctp/sm_sideeffect.c   |    2 +-
>   net/sctp/transport.c       |    2 ++
>   net/sctp/tsnmap.c          |    6 +++++-
>   net/sctp/ulpevent.c        |    3 ++-
>   net/sctp/ulpqueue.c        |    2 +-
>   10 files changed, 42 insertions(+), 7 deletions(-)
>
> diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h
> index e4652fe..fecdf31 100644
> --- a/include/net/sctp/structs.h
> +++ b/include/net/sctp/structs.h
> @@ -912,6 +912,9 @@ struct sctp_transport {
>   		/* Is this structure kfree()able? */
>   		malloced:1;
>
> +	/* Has this transport moved the ctsn since we last sacked */
> +	__u32 sack_generation;
> +
>   	struct flowi fl;
>
>   	/* This is the peer's IP address and port. */
> @@ -1584,6 +1587,7 @@ struct sctp_association {
>   		 */
>   		__u8    sack_needed;     /* Do we need to sack the peer? */
>   		__u32	sack_cnt;
> +		__u32	sack_generation;
>
>   		/* These are capabilities which our peer advertised.  */
>   		__u8	ecn_capable:1,	    /* Can peer do ECN? */
> diff --git a/include/net/sctp/tsnmap.h b/include/net/sctp/tsnmap.h
> index e7728bc..2c5d2b4 100644
> --- a/include/net/sctp/tsnmap.h
> +++ b/include/net/sctp/tsnmap.h
> @@ -117,7 +117,8 @@ void sctp_tsnmap_free(struct sctp_tsnmap *map);
>   int sctp_tsnmap_check(const struct sctp_tsnmap *, __u32 tsn);
>
>   /* Mark this TSN as seen.  */
> -int sctp_tsnmap_mark(struct sctp_tsnmap *, __u32 tsn);
> +int sctp_tsnmap_mark(struct sctp_tsnmap *, __u32 tsn,
> +		     struct sctp_transport *trans);
>
>   /* Mark this TSN and all lower as seen. */
>   void sctp_tsnmap_skip(struct sctp_tsnmap *map, __u32 tsn);
> diff --git a/net/sctp/associola.c b/net/sctp/associola.c
> index 5bc9ab1..b16517e 100644
> --- a/net/sctp/associola.c
> +++ b/net/sctp/associola.c
> @@ -271,6 +271,7 @@ static struct sctp_association *sctp_association_init(struct sctp_association *a
>   	 */
>   	asoc->peer.sack_needed = 1;
>   	asoc->peer.sack_cnt = 0;
> +	asoc->peer.sack_generation = 1;
>
>   	/* Assume that the peer will tell us if he recognizes ASCONF
>   	 * as part of INIT exchange.
> diff --git a/net/sctp/output.c b/net/sctp/output.c
> index f1b7d4b..0de6cd5 100644
> --- a/net/sctp/output.c
> +++ b/net/sctp/output.c
> @@ -240,14 +240,19 @@ static sctp_xmit_t sctp_packet_bundle_sack(struct sctp_packet *pkt,
>   	 */
>   	if (sctp_chunk_is_data(chunk)&&  !pkt->has_sack&&
>   	!pkt->has_cookie_echo) {
> -		struct sctp_association *asoc;
>   		struct timer_list *timer;
> -		asoc = pkt->transport->asoc;
> +		struct sctp_association *asoc = pkt->transport->asoc;
> +
>   		timer =&asoc->timers[SCTP_EVENT_TIMEOUT_SACK];
>
>   		/* If the SACK timer is running, we have a pending SACK */
>   		if (timer_pending(timer)) {
>   			struct sctp_chunk *sack;
> +
> +			if (pkt->transport->sack_generation !=
> +			    pkt->transport->asoc->peer.sack_generation)
> +				return retval;
> +
>   			asoc->a_rwnd = asoc->rwnd;
>   			sack = sctp_make_sack(asoc);
>   			if (sack) {
> diff --git a/net/sctp/sm_make_chunk.c b/net/sctp/sm_make_chunk.c
> index a85eeeb..6486cac 100644
> --- a/net/sctp/sm_make_chunk.c
> +++ b/net/sctp/sm_make_chunk.c
> @@ -734,8 +734,10 @@ struct sctp_chunk *sctp_make_sack(const struct sctp_association *asoc)
>   	int len;
>   	__u32 ctsn;
>   	__u16 num_gabs, num_dup_tsns;
> +	struct sctp_association *aptr = (struct sctp_association *)asoc;
>   	struct sctp_tsnmap *map = (struct sctp_tsnmap *)&asoc->peer.tsn_map;
>   	struct sctp_gap_ack_block gabs[SCTP_MAX_GABS];
> +	struct sctp_transport *trans;
>
>   	memset(gabs, 0, sizeof(gabs));
>   	ctsn = sctp_tsnmap_get_ctsn(map);
> @@ -805,6 +807,21 @@ struct sctp_chunk *sctp_make_sack(const struct sctp_association *asoc)
>   		sctp_addto_chunk(retval, sizeof(__u32) * num_dup_tsns,
>   				 sctp_tsnmap_get_dups(map));
>
> +	/*
> +	 * Once we have a sack generated, check to see what our sack
> +	 * generation is, if its 0, reset the transports to 0, and reset
> +	 * the association generation to 1
> +	 *
> +	 * The idea is that zero is never used as a valid generation for the
> +	 * association so no transport will match after a wrap event like this,
> +	 * Until the next sack
> +	 */
> +	if (++aptr->peer.sack_generation == 0) {
> +		list_for_each_entry(trans,&asoc->peer.transport_addr_list,
> +				    transports)
> +			trans->sack_generation = 0;
> +		aptr->peer.sack_generation = 1;
> +	}
>   nodata:
>   	return retval;
>   }
> diff --git a/net/sctp/sm_sideeffect.c b/net/sctp/sm_sideeffect.c
> index c96d1a8..8716da1 100644
> --- a/net/sctp/sm_sideeffect.c
> +++ b/net/sctp/sm_sideeffect.c
> @@ -1268,7 +1268,7 @@ static int sctp_cmd_interpreter(sctp_event_t event_type,
>   		case SCTP_CMD_REPORT_TSN:
>   			/* Record the arrival of a TSN.  */
>   			error = sctp_tsnmap_mark(&asoc->peer.tsn_map,
> -						 cmd->obj.u32);
> +						 cmd->obj.u32, NULL);
>   			break;
>
>   		case SCTP_CMD_REPORT_FWDTSN:
> diff --git a/net/sctp/transport.c b/net/sctp/transport.c
> index b026ba0..1dcceb6 100644
> --- a/net/sctp/transport.c
> +++ b/net/sctp/transport.c
> @@ -68,6 +68,8 @@ static struct sctp_transport *sctp_transport_init(struct sctp_transport *peer,
>   	peer->af_specific = sctp_get_af_specific(addr->sa.sa_family);
>   	memset(&peer->saddr, 0, sizeof(union sctp_addr));
>
> +	peer->sack_generation = 0;
> +
>   	/* From 6.3.1 RTO Calculation:
>   	 *
>   	 * C1) Until an RTT measurement has been made for a packet sent to the
> diff --git a/net/sctp/tsnmap.c b/net/sctp/tsnmap.c
> index f1e40ceb..b5fb7c4 100644
> --- a/net/sctp/tsnmap.c
> +++ b/net/sctp/tsnmap.c
> @@ -114,7 +114,8 @@ int sctp_tsnmap_check(const struct sctp_tsnmap *map, __u32 tsn)
>
>
>   /* Mark this TSN as seen.  */
> -int sctp_tsnmap_mark(struct sctp_tsnmap *map, __u32 tsn)
> +int sctp_tsnmap_mark(struct sctp_tsnmap *map, __u32 tsn,
> +		     struct sctp_transport *trans)
>   {
>   	u16 gap;
>
> @@ -133,6 +134,9 @@ int sctp_tsnmap_mark(struct sctp_tsnmap *map, __u32 tsn)
>   		 */
>   		map->max_tsn_seen++;
>   		map->cumulative_tsn_ack_point++;
> +		if (trans)
> +			trans->sack_generation =
> +				trans->asoc->peer.sack_generation;
>   		map->base_tsn++;
>   	} else {
>   		/* Either we already have a gap, or about to record a gap, so
> diff --git a/net/sctp/ulpevent.c b/net/sctp/ulpevent.c
> index 8a84017..33d8947 100644
> --- a/net/sctp/ulpevent.c
> +++ b/net/sctp/ulpevent.c
> @@ -715,7 +715,8 @@ struct sctp_ulpevent *sctp_ulpevent_make_rcvmsg(struct sctp_association *asoc,
>   	 * can mark it as received so the tsn_map is updated correctly.
>   	 */
>   	if (sctp_tsnmap_mark(&asoc->peer.tsn_map,
> -			     ntohl(chunk->subh.data_hdr->tsn)))
> +			     ntohl(chunk->subh.data_hdr->tsn),
> +			     chunk->transport))
>   		goto fail_mark;
>
>   	/* First calculate the padding, so we don't inadvertently
> diff --git a/net/sctp/ulpqueue.c b/net/sctp/ulpqueue.c
> index f2d1de7..f5a6a4f 100644
> --- a/net/sctp/ulpqueue.c
> +++ b/net/sctp/ulpqueue.c
> @@ -1051,7 +1051,7 @@ void sctp_ulpq_renege(struct sctp_ulpq *ulpq, struct sctp_chunk *chunk,
>   	if (chunk&&  (freed>= needed)) {
>   		__u32 tsn;
>   		tsn = ntohl(chunk->subh.data_hdr->tsn);
> -		sctp_tsnmap_mark(&asoc->peer.tsn_map, tsn);
> +		sctp_tsnmap_mark(&asoc->peer.tsn_map, tsn, chunk->transport);
>   		sctp_ulpq_tail_data(ulpq, chunk, gfp);
>
>   		sctp_ulpq_partial_delivery(ulpq, chunk, gfp);

^ permalink raw reply

* [BUG, regression, bisected] Marvell 88E8055 NIC (sky2) fails to detect link after resume from S3
From: Michal Zatloukal @ 2012-06-29 21:20 UTC (permalink / raw)
  To: netdev

Hello.

I'm the reporter of Ubuntu bug 1007841
<https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1007841> and would
like to bring attention to it here, since it's in upstream kernel as well.

The gist of the problem is, since around 3.2 (I haven't kept up-to-date
and mostly used 2.6.35 on the machine), whenever I wake up the laptop from
S3 by opening the lid, the NIC loses link detection and it's reported as
always down. Relevant dmesg output (suspend-resume twice, then attempted
modprobe -r and modprobe, also twice):

[    3.351407] sky2: driver version 1.30
[    3.351460] sky2 0000:04:00.0: PCI INT A -> GSI 17 (level, low) -> IRQ  
17
[    3.351477] sky2 0000:04:00.0: setting latency timer to 64
[    3.351510] sky2 0000:04:00.0: Yukon-2 EC Ultra chip revision 3
[    3.351610] sky2 0000:04:00.0: irq 44 for MSI/MSI-X
[    3.360722] sky2 0000:04:00.0: eth0: addr 00:a0:d1:cd:97:e5
[   19.233940] sky2 0000:04:00.0: eth0: enabling interface
[   21.595880] sky2 0000:04:00.0: eth0: Link is up at 1000 Mbps, full  
duplex, flow control both
[ 2547.761596] sky2 0000:04:00.0: eth0: disabling interface
[ 2551.220040] PM: late suspend of drv:sky2 dev:0000:04:00.0 complete  
after 155.989 msecs
[ 2551.532056] sky2 0000:04:00.0: Refused to change power state, currently  
in D3
[ 2551.532070] sky2 0000:04:00.0: restoring config space at offset 0xf  
(was 0xffffffff, writing 0x10a)
[ 2551.532074] sky2 0000:04:00.0: restoring config space at offset 0xe  
(was 0xffffffff, writing 0x0)
[ 2551.532078] sky2 0000:04:00.0: restoring config space at offset 0xd  
(was 0xffffffff, writing 0x48)
[ 2551.532082] sky2 0000:04:00.0: restoring config space at offset 0xc  
(was 0xffffffff, writing 0x0)
[ 2551.532086] sky2 0000:04:00.0: restoring config space at offset 0xb  
(was 0xffffffff, writing 0x110f1734)
[ 2551.532090] sky2 0000:04:00.0: restoring config space at offset 0xa  
(was 0xffffffff, writing 0x0)
[ 2551.532094] sky2 0000:04:00.0: restoring config space at offset 0x9  
(was 0xffffffff, writing 0x0)
[ 2551.532099] sky2 0000:04:00.0: restoring config space at offset 0x8  
(was 0xffffffff, writing 0x0)
[ 2551.532103] sky2 0000:04:00.0: restoring config space at offset 0x7  
(was 0xffffffff, writing 0x0)
[ 2551.532107] sky2 0000:04:00.0: restoring config space at offset 0x6  
(was 0xffffffff, writing 0x3001)
[ 2551.532111] sky2 0000:04:00.0: restoring config space at offset 0x5  
(was 0xffffffff, writing 0x0)
[ 2551.532115] sky2 0000:04:00.0: restoring config space at offset 0x4  
(was 0xffffffff, writing 0xf8000004)
[ 2551.532119] sky2 0000:04:00.0: restoring config space at offset 0x3  
(was 0xffffffff, writing 0x10)
[ 2551.532123] sky2 0000:04:00.0: restoring config space at offset 0x2  
(was 0xffffffff, writing 0x2000014)
[ 2551.532127] sky2 0000:04:00.0: restoring config space at offset 0x1  
(was 0xffffffff, writing 0x100507)
[ 2551.532132] sky2 0000:04:00.0: restoring config space at offset 0x0  
(was 0xffffffff, writing 0x436311ab)
[ 2551.537226] sky2 0000:04:00.0: ignoring stuck error report bit
[ 2553.916819] sky2 0000:04:00.0: eth0: phy I/O error
[ 2553.916826] sky2 0000:04:00.0: eth0: phy I/O error
[ 2553.916830] sky2 0000:04:00.0: eth0: phy I/O error
[ 2553.916833] sky2 0000:04:00.0: eth0: phy I/O error
[ 2553.916836] sky2 0000:04:00.0: eth0: phy I/O error
[ 2553.916839] sky2 0000:04:00.0: eth0: phy I/O error
[ 2553.916843] sky2 0000:04:00.0: eth0: phy I/O error
[ 2553.916846] sky2 0000:04:00.0: eth0: phy I/O error
[ 2553.916849] sky2 0000:04:00.0: eth0: phy I/O error
[ 2553.916852] sky2 0000:04:00.0: eth0: phy I/O error
[ 2553.916855] sky2 0000:04:00.0: eth0: phy I/O error
[ 2553.916859] sky2 0000:04:00.0: eth0: phy I/O error
[ 2553.916862] sky2 0000:04:00.0: eth0: phy I/O error
[ 2553.916865] sky2 0000:04:00.0: eth0: phy I/O error
[ 2553.916868] sky2 0000:04:00.0: eth0: phy I/O error
[ 2553.916871] sky2 0000:04:00.0: eth0: phy I/O error
[ 2553.916875] sky2 0000:04:00.0: eth0: phy I/O error
[ 2553.917001] sky2 0000:04:00.0: eth0: enabling interface
[ 2601.941407] sky2 0000:04:00.0: eth0: disabling interface
[ 2601.941443] sky2 0000:04:00.0: eth0: phy I/O error
[ 2601.941452] sky2 0000:04:00.0: eth0: phy I/O error
[ 2601.941459] sky2 0000:04:00.0: eth0: phy I/O error
[ 2601.941466] sky2 0000:04:00.0: eth0: phy I/O error
[ 2601.941473] sky2 0000:04:00.0: eth0: phy I/O error
[ 2601.941480] sky2 0000:04:00.0: eth0: phy I/O error
[ 2601.941487] sky2 0000:04:00.0: eth0: phy I/O error
[ 2601.941494] sky2 0000:04:00.0: eth0: phy I/O error
[ 2601.941501] sky2 0000:04:00.0: eth0: phy I/O error
[ 2601.968125] sky2 0000:04:00.0: PCI INT A disabled
[ 2608.679627] sky2: driver version 1.30
[ 2608.679726] sky2 0000:04:00.0: enabling device (0000 -> 0003)
[ 2608.679746] sky2 0000:04:00.0: PCI INT A -> GSI 17 (level, low) -> IRQ  
17
[ 2608.679776] sky2 0000:04:00.0: setting latency timer to 64
[ 2608.679827] sky2 0000:04:00.0: unsupported chip type 0xff
[ 2608.679851] sky2 0000:04:00.0: PCI INT A disabled
[ 2608.679866] sky2: probe of 0000:04:00.0 failed with error -95
[26940.138170] sky2: driver version 1.30
[26940.138220] sky2 0000:04:00.0: PCI INT A -> GSI 17 (level, low) -> IRQ  
17
[26940.138236] sky2 0000:04:00.0: setting latency timer to 64
[26940.138258] sky2 0000:04:00.0: unsupported chip type 0xff
[26940.138268] sky2 0000:04:00.0: PCI INT A disabled
[26940.138273] sky2: probe of 0000:04:00.0 failed with error -95

I have done bisection and have found the offending commit to be:

commit 7afe1845dd1e7c90828c942daed7e57ffa7c38d6
Author: Sameer Nanda <snanda@chromium.org>
Date: Mon Jul 25 17:13:29 2011 -0700
init: skip calibration delay if previously done
For each CPU, do the calibration delay only once.  For subsequent calls,
use the cached per-CPU value of loops_per_jiffy.

This saves about 200ms of resume time on dual core Intel Atom N5xx based
systems.  This helps bring down the kernel resume time on such systems
   from about 500ms to about 300ms.
--- end commit info ---

My uneducated guess is that by making the resume from S3 shorter, the
driver catches the hardware with its pants down and freaks out.
You can find all details/files (dmesg, lspci, dmidecode, config...)
collected by apport in the ubuntu bug linked above. Let me know if I
should supply any more info.
Note: Please CC me into replies, I'm not subscribed. Thank you.

Best Regards,
Michal Zatloukal

^ permalink raw reply

* Kernel oops in at76c50x-usb
From: Larry Finger @ 2012-06-29 21:27 UTC (permalink / raw)
  To: Johannes Berg; +Cc: netdev, wireless, LKML

Johannes,

This particular oops is seen for at76c50x-usb on a PPC, but I have seen a 
similar oops for b43legacy, and i thought there was one earlier in the wireless 
ML, but I could not find it just now.

This particular oops does not always occur. Usually, the machine just freezes.

The dmesg dump is:

=============================================================

[  156.231550] Unable to handle kernel paging request for data at address 0x0000004c
[  156.231571] Faulting instruction address: 0xc0342e98
[  156.231594] Oops: Kernel access of bad area, sig: 11 [#1]
[  156.231599] PowerMac
[  156.231692] Modules linked in: at76c50x_usb nfs lockd fscache auth_rpcgss 
nfs_acl sunrpc uinput cpufreq_userspace cpufreq_conservative cpufreq_ondemand 
cpufreq_stats cpufreq_powersave bluetooth fuse loop firewire_sbp2 arc4 b43 
mac80211 cfg80211 rfkill rng_core ssb mmc_core pcmcia evdev yenta_socket 
pcmcia_rsrc pcmcia_core ext4 mbcache jbd2 crc16 ohci_hcd ehci_hcd usbcore 
firewire_ohci sungem firewire_core sungem_phy crc_itu_t sr_mod cdrom usb_common 
nls_base [last unloaded: scsi_wait_scan]
[  156.231703] NIP: c0342e98 LR: e25121ac CTR: c0342e80
[  156.231715] REGS: df869e00 TRAP: 0300   Not tainted  (3.5.0-rc4-wl+)
[  156.231732] MSR: 00001032 <ME,IR,DR,RI>  CR: 42000042  XER: 20000000
[  156.231738] DAR: 0000004c, DSISR: 40000000
[  156.231804] TASK = df859b00[5] 'kworker/u:0' THREAD: df868000
[  156.231804] GPR00: e25121ac df869eb0 df859b00 00000000 df858db0 df858db0 
1d0be361 00000000
[  156.231804] GPR08: 00000000 00000001 73635f72 0000004c c0342e80 00000000 
018bd137 0197dda0
[  156.231804] GPR16: 018bd55a 0196ecb8 018ee7d4 018bd538 ffbc1280 018bcd5b 
00000001 c05830d4
[  156.231804] GPR24: c05e46d8 00000000 00000001 00000001 de8cd460 debde9c8 
df869ec8 debde300
[  156.231840] NIP [c0342e98] __netif_schedule+0x18/0x78
[  156.231967] LR [e25121ac] ieee80211_propagate_queue_wake+0x100/0x14c [mac80211]
[  156.231972] Call Trace:
[  156.231986] [df869eb0] [c0342ee0] __netif_schedule+0x60/0x78 (unreliable)
[  156.232025] [df869ec0] [e25121ac] ieee80211_propagate_queue_wake+0x100/0x14c 
[mac80211]
[  156.232065] [df869f00] [e25123bc] ieee80211_wake_queues_by_reason+0x3c/0x7c 
[mac80211]
[  156.232096] [df869f20] [e29a2178] at76_dwork_hw_scan+0x184/0x1a8 [at76c50x_usb]
[  156.232123] [df869f50] [c0057d04] process_one_work+0x2a4/0x45c
[  156.232136] [df869f80] [c0058358] worker_thread+0x244/0x3d4
[  156.232153] [df869fb0] [c005d168] kthread+0x88/0x8c
[  156.232174] [df869ff0] [c000fa58] kernel_thread+0x4c/0x68
[  156.232180] Instruction dump:
[  156.232200] 83810010 83a10014 83c10018 83e1001c 38210020 4e800020 9421fff0 
7c0802a6
[  156.232219] 3963004c 39200001 90010014 93e1000c <7c005828> 7c0a4b78 7d40592d 
40a2fff4
[  156.232232] ---[ end trace 11d3cd4cb4a4faf3 ]---
[  156.232236]
[  156.232401] Unable to handle kernel paging request for data at address 0xfffffffc
[  156.232411] Faulting instruction address: 0xc005cb48

=============================================================
The objdump listing and the source for the routine in question follows:

=============================================================

00001600 <__netif_schedule>:
__netif_schedule():
     1600:       94 21 ff f0     stwu    r1,-16(r1)
     1604:       7c 08 02 a6     mflr    r0
     1608:       39 63 00 4c     addi    r11,r3,76
     160c:       39 20 00 01     li      r9,1
     1610:       90 01 00 14     stw     r0,20(r1)
     1614:       93 e1 00 0c     stw     r31,12(r1)
     1618:       7c 00 58 28     lwarx   r0,0,r11
     161c:       7c 0a 4b 78     or      r10,r0,r9
     1620:       7d 40 59 2d     stwcx.  r10,0,r11
     1624:       40 a2 ff f4     bne-    1618 <__netif_schedule+0x18>
     1628:       70 00 00 01     andi.   r0,r0,1
     162c:       40 a2 00 38     bne+    1664 <__netif_schedule+0x64>
     1630:       7f e0 00 a6     mfmsr   r31
     1634:       57 e9 04 5e     rlwinm  r9,r31,0,17,15
     1638:       7d 20 01 24     mtmsr   r9
     163c:       90 03 00 44     stw     r0,68(r3)
     1640:       3d 20 00 00     lis     r9,0
     1644:       38 03 00 44     addi    r0,r3,68
     1648:       39 29 00 00     addi    r9,r9,0
     164c:       81 69 00 04     lwz     r11,4(r9)
     1650:       90 6b 00 00     stw     r3,0(r11)
     1654:       38 60 00 02     li      r3,2
     1658:       90 09 00 04     stw     r0,4(r9)
     165c:       48 00 00 01     bl      165c <__netif_schedule+0x5c>
     1660:       7f e0 01 24     mtmsr   r31
     1664:       80 01 00 14     lwz     r0,20(r1)
     1668:       83 e1 00 0c     lwz     r31,12(r1)
     166c:       38 21 00 10     addi    r1,r1,16
     1670:       7c 08 03 a6     mtlr    r0
     1674:       4e 80 00 20     blr

static inline void __netif_reschedule(struct Qdisc *q)
{
         struct softnet_data *sd;
         unsigned long flags;

         local_irq_save(flags);
         sd = &__get_cpu_var(softnet_data);
         q->next_sched = NULL;
         *sd->output_queue_tailp = q;
         sd->output_queue_tailp = &q->next_sched;
         raise_softirq_irqoff(NET_TX_SOFTIRQ);
         local_irq_restore(flags);
}

void __netif_schedule(struct Qdisc *q)
{
         if (!test_and_set_bit(__QDISC_STATE_SCHED, &q->state))
                 __netif_reschedule(q);
}
EXPORT_SYMBOL(__netif_schedule);

===================================================


My PPC instruction decoding skills are poor, but I think the crash is happening 
at offset 1660. In addition, the routine is about to exit.

Thanks,

Larry

^ permalink raw reply

* pull request: wireless-next 2012-06-29
From: John W. Linville @ 2012-06-29 17:28 UTC (permalink / raw)
  To: davem; +Cc: linux-wireless, netdev

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

commit 8732baafc3f19e69df683c3f0f36c13cec746fb9

Dave,

Here is another batch of updates intended for 3.6.  This includes a
number of pulls, including ones from the mac80211, iwlwifi, ath6kl, and
wl12xx trees.  I also pulled from the wireless tree to avoid potential
build conflicts.  There are a number of other patches applied directly,
including a number for the Broadcom drivers and the mwifiex driver.

The updates cover the usual variety of new hardware support and feature
enhancements.  It's all good work, but there aren't any big headliners.
This does resolve a net-next/wireless-next merge conflict reported
by Stephen.

Please let me know if there are problems!

John

---

The following changes since commit 7a9bc9b81a5bc6e44ebc80ef781332e4385083f2:

  ipv4: Elide fib_validate_source() completely when possible. (2012-06-29 01:36:36 -0700)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next.git for-davem

for you to fetch changes up to 8732baafc3f19e69df683c3f0f36c13cec746fb9:

  Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next into for-davem (2012-06-29 12:42:14 -0400)

----------------------------------------------------------------

Amitkumar Karwar (6):
      mwifiex: wake up main thread to handle Tx traffic if scan is delayed/aborted
      mwifiex: enhance power save for USB and PCIe chipsets
      mwifiex: wakeup main thread to handle command queued
      mwifiex: use correct firmware command to get power limits
      mwifiex: do not advertise custom regulatory domain capability
      mwifiex: retrieve correct max_power information in reg_notifier handler

Arend van Spriel (6):
      brcmfmac: introduce checkdied debugfs functionality
      brcm80211: add mailing list address for brcm80211 drivers
      brcmfmac: make inclusion of vmalloc.h explicit fixing linux-next build
      brcmsmac: fix NULL pointer crash in brcms_c_regd_init()
      brcmfmac: reduce allocations needed during nvram data download
      brcmfmac: fix sparse warning introduced with checkdied patch

Arik Nemtsov (16):
      mac80211: stop Rx during HW reconfig
      mac80211: set only VO as a U-APSD enabled AC
      wlcore: suppress error message on Rx BA session removal
      wlcore: allow setting sleep_auth before interface init
      wlcore: reconfigure sleep_auth when removing interfaces
      wl18xx: increase Rx descriptors for PG2
      wl18xx: set Tx align quirk for PG2
      wl18xx: explicitly remove the 5Ghz MIMO HT cap
      wl18xx: sane defaults for HT capabilities
      wl18xx: split siso40 HT cap between 2Ghz and 5Ghz
      wlcore: cancel suspend when recovery is pending
      wlcore: don't allow SDIO read/writes after failure
      wlcore: force recovery on resume if suspended without recovering
      wlcore: check Rx-filter functions in the suspend path
      wlcore: refactor threaded IRQ routine
      wlcore: prevent recovery in the middle of resume

Arkady Miasnikov (1):
      wlcore: access the firmware memory via debugfs

Avinash Patil (7):
      ieee80211: definitions for Microsoft Vendor OUI and WPA OUI type
      mwifiex: set channel via start_ap handler for AP interface
      mwifiex: set HT capability based on cfg80211_ap_settings
      mwifiex: separate uAP WPA/WPA2 parsing from other BSS parameters
      mwifiex: support for WEP in AP mode
      ieee80211: more OUI type definitions for WLAN_OUI_MICROSOFT
      mwifiex: parse WPA IE and support WPA/WPA2 mixed mode for uAP

Bala Shanmugam (2):
      ath6kl: Add support for setting tx rateset.
      ath9k: fix incorrect profile type manupulation

Chun-Yeow Yeoh (9):
      cfg80211: add missing kernel-doc for mesh configuration structure
      {nl,cfg,mac}80211: fix the coding style related to mesh parameters
      {nl,cfg,mac}80211: implement dot11MeshHWMProotInterval and dot11MeshHWMPactivePathToRootTimeout
      mac80211: implement the proactive PREQ generation
      mac80211: implement the proactive PREP generation
      mac80211: invoke the timer only with correct dot11MeshHWMPRootMode value
      {nl,cfg,mac}80211: implement dot11MeshHWMPconfirmationInterval
      mac80211: fix the assignment of mesh element TTL
      mac80211: fix and improve mesh RANN processing

Eliad Peller (2):
      wlcore: update basic rates on channel switch
      wlcore: declare interface combinations

Emmanuel Grumbach (8):
      iwlwifi: check that we have enough bits to track the TX queues
      iwlwifi: print the scratch of all the buffers stuck in a queue
      iwlwifi: comment context requirements of the op_mode
      iwlwifi: disable BH before the call to iwl_op_mode_nic_error
      iwlwifi: don't disable interrupt in iwl_abort_notification_waits
      iwlwifi: don't disable interrupt while starting tx
      iwlwifi: protect use_ict with irq_lock
      iwlwifi: disable early power Off reset for all NICs

Etay Luz (1):
      ath6kl: support changing dtim period on AP mode

Eyal Shapira (6):
      wlcore: avoid using NET_IP_ALIGN for RX alignment
      wlcore: send EAPOLs with basic rate policy
      mac80211: fix cleanup if driver suspend callback fails
      wlcore: fix broken TX due to wrong queuing of recovery
      wlcore: queue recovery in case of bus errors during cmd_remove_peer
      wlcore: print stack trace in every recovery

Felix Fietkau (13):
      cfg80211: fix regression in multi-vif AP start
      ath9k_hw: remove aniState->noiseFloor
      ath9k_hw: fix OFDM weak signal detection handling
      ath9k_hw: remove confusing logic inversion in an ANI variable
      ath9k_hw: clean up / fix ANI mode checks related to beacon RSSI
      ath9k_hw: remove the old ANI implementation
      ath9k_hw: clean up defines and variables from the ANI implementation split
      ath9k: remove MIB interrupt support
      ath9k_hw: fix setting lower noise immunity values
      ath9k_hw: clean up ANI OFDM trigger handling
      ath9k: fix ANI operation in AP mode
      ath9k: update AR934x initvals to latest version
      ath9k: de-duplicate initvals

Franky Lin (5):
      brcmfmac: add support for bus specific data command
      brcmfmac: restrict dongle txglom disable to old SDIO core
      brcmfmac: move glom alignment setting to SDIO bus layer
      brcmfmac: use firmware data buffer directly for nvram
      brcmfmac: add BCM4334 support

Grazvydas Ignotas (3):
      wl1251: remove unused filter_work
      wl1251: fix filtering support
      wl1251: send filters to firmware as they are set

Ido Yariv (11):
      wlcore: Fix sdio out-of-sync power state
      wlcore: Disable interrupts while recovering
      wlcore: Change read/write ops to return errors
      wlcore: Change raw io functions to return errors
      wlcore: Propagate errors from wlcore_raw_*_data functions
      wlcore: Propagate errors from wl1271_read
      wlcore: Propagate errors from wl1271_write
      wlcore: Propagate errors from wl1271_raw_read32
      wlcore: Propagate errors from wl1271_raw_write32
      wlcore: Propagate errors from wl1271_read_hwaddr
      wlcore: Force checking of io functions' return values

Igal Chernobelsky (1):
      wlcore: read FW logs from FW memory on watchdog recovery

Javier Cardona (2):
      mac80211: Remove unused variable
      mac80211: Rename stainfo variable for the more common sta

Jeongdo Son (1):
      rt2x00: Add support for BUFFALO WLI-UC-GNM2 to rt2800usb.

Joe Perches (1):
      ath6kl: Add missing newline terminations

Johannes Berg (26):
      mac80211: remove unneeded ieee80211_run_deferred_scan()
      mac80211: allow cancelling dependent ROCs
      nl80211: fix sched scan match attribute name
      cfg80211/nl80211: fix kernel-doc
      iwlwifi: delay ROC if doing internal reset scan
      iwlwifi: fix 11n_disable EEPROM refactoring regression
      iwlwifi: use minimal time for radio reset scan
      iwlwifi: remove sku field from hw_params
      cfg80211: make some functions static
      nl80211: refactor __cfg80211_rdev_from_info
      nl80211: fix netns separation
      nl80211: change __cfg80211_rdev_from_info
      nl80211: use __cfg80211_rdev_from_attrs for testmode
      mac80211: fix double-start of remain-on-channel
      iwlwifi: fix radio reset scan dwell vs. quiet time
      iwlwifi: increase scan timeout
      iwlwifi: limit mac_change_interface to BSS context
      mac80211: remove TKIP debug
      mac80211: two small verbose debug cleanups
      mac80211: pass sdata to some RX functions
      mac80211: clean up debugging
      mac80211: rename driver-trace file
      mac80211: trace debug messages
      mac80211_hwsim: fix smatch/sparse complaints
      mac80211: remove unused function
      mac80211: make ieee80211_check_concurrent_iface netdev-independent

John W. Linville (8):
      Merge branch 'for-linville' of git://github.com/kvalo/ath6kl
      Merge branch 'for-john' of git://git.kernel.org/.../iwlwifi/iwlwifi-next
      Merge branch 'for-john' of git://git.sipsolutions.net/mac80211-next
      Merge branch 'for-john' of git://git.kernel.org/.../iwlwifi/iwlwifi-next
      Merge branch 'for-linville' of git://git.kernel.org/.../luca/wl12xx
      Merge branch 'for-john' of git://git.sipsolutions.net/mac80211-next
      Merge branch 'master' of git://git.kernel.org/.../linville/wireless
      Merge branch 'master' of git://git.kernel.org/.../linville/wireless-next into for-davem

Jouni Malinen (1):
      ath6kl: Use correct max-scan-SSIDs limit

Kalle Valo (1):
      Merge remote branch 'wireless-next/master' into ath6kl-next

Kiran Reddy (1):
      ath6kl: separate ht cap for each band

Larry Finger (4):
      rtlwifi: rtl8192se: Fix gcc 4.7.x warning
      rtlwifi: Change debug level for deletion of an entry in CAM
      rtlwifi: Fix IRQ disabled warning
      rtlwifi: rtl8192se: Fix double inclusion of header pci.h

Luciano Coelho (8):
      mac80211: initialize sta pointer to avoid false-positive warning
      mac80211: use the correct capability info in ieee80211_set_associated()
      wlcore: add a debugfs entry to allow changing the sleep mode by hand
      wl18xx: use %zu for size_t arguments in printk calls
      Merge branch 'wl12xx-next' into for-linville
      wl18xx: deprecate PG1 support
      wlcore: fix some failure cases in wlcore_probe()
      Merge branch 'wl12xx-next' into for-linville

Mohammed Shafi Shajakhan (2):
      ath9k_hw: make use of the wrapper to check for MCI init
      ath9k: Fix signedness in a MCI debug message

Naveen Gangadharan (1):
      ath6kl: Add wow multicast firmware capability support

Naveen Singh (2):
      ath6kl: Include match ssid list in scheduled scan
      ath6kl: use firmware version from FW IE

Paul Bolle (1):
      iwlegacy: print how long queue was actually stuck

Pontus Fuchs (1):
      mac80211: Disallow changing chan type on monitor when CHAN_MODE_FIXED

Rafał Miłecki (1):
      bcma: define some additional cores IDs

Raja Mani (2):
      ath6kl: Remove unneeded memset in roam related config func
      ath6kl: Fix typo in htc mbox debug print msg

Rajkumar Manoharan (8):
      mac80211: cleanup offchannel_ps_enable argument
      ath9k_hw: fix BT mute at hw init
      ath9k: fix mci_is_enabled utility
      ath9k_hw: update ar9462 dac_async_fifo initval
      ath9k_hw: fix LNA control on WLAN sleep
      ath9k: do not sampling on ani timer when chip is in sleep
      ath9k_hw: rename mrcCCKOff to fix smatch warning
      ath9k_hw: fix smatch warning in ar9003_hw_spur_mitigate_mrc_cck

Seth Forshee (9):
      brcm80211: smac: don't set up tx power limits during initialization
      brcm80211: smac: always set channel specified by mac80211
      brcm80211: smac: remove unused code for 40MHz channels
      brcm80211: smac: clean up channel.c
      brcm80211: smac: inform mac80211 of the X2 regulatory domain
      brcm80211: smac: enable/disable radio on regulatory updates
      brcm80211: smac: use mac80211 channel data for tx power limits
      brcm80211: smac: don't validate channels against internal regulatory data
      brcm80211: smac: use current regulatory domain when checking whether OFDM is allowed

Sujith Manoharan (5):
      ath9k: Fix lockdep splat
      ath9k_htc: Change default listen interval to 1
      ath9k_htc: Use atomic operations for op_flags
      ath9k_htc: Fix IDLE power save
      ath9k: Fix compilation breakage

Sven Eckelmann (1):
      ath9k: raise aggregation limit to 64k for HT IBSS

Thomas Pedersen (4):
      ath6kl: enable enhanced bmiss detection
      ath6kl: issue wmi disconnect after notifying cfg80211
      ath6kl: fix fw capability parsing
      nl80211: specify RSSI threshold in scheduled scan

Vasanthakumar Thiagarajan (3):
      ath6kl: Fix missing gpio pin 9 configuration
      ath6kl: Fix race in aggregation reorder logic
      ath6kl: Fix unstable downlink throughput

Victor Goldenshtein (1):
      mac80211: add command to get current rssi

Will Hawkins (3):
      mac80211: Track auth frame registrations on IBSS ifaces
      mac80211: send auth in IBSS only if userspace isn't handling it
      mac80211: Allow userspace to register for auth frames in IBSS

Woody Hung (1):
      rt2x00 : RT3290 chip support v4

Xose Vazquez Perez (1):
      wireless: rtl818x: rtl8180 add devices ids

Yair Shapira (2):
      wlcore/wl12xx: add support for HP and SKW FEM radio manufacturers
      wlcore: add print logs of radio_status in case of BIP calibration

Yoni Divinsky (2):
      mac80211: save wmm_acm per sdata
      wlcore: do not report noise level in get survey op

 MAINTAINERS                                        |    1 +
 drivers/bcma/scan.c                                |    6 +
 drivers/net/wireless/ath/ath6kl/cfg80211.c         |  208 ++-
 drivers/net/wireless/ath/ath6kl/cfg80211.h         |    2 +
 drivers/net/wireless/ath/ath6kl/core.h             |   38 +-
 drivers/net/wireless/ath/ath6kl/htc_mbox.c         |    2 +-
 drivers/net/wireless/ath/ath6kl/init.c             |   28 +-
 drivers/net/wireless/ath/ath6kl/main.c             |   27 +-
 drivers/net/wireless/ath/ath6kl/target.h           |    1 +
 drivers/net/wireless/ath/ath6kl/txrx.c             |   48 +-
 drivers/net/wireless/ath/ath6kl/wmi.c              |  148 +-
 drivers/net/wireless/ath/ath6kl/wmi.h              |   58 +-
 drivers/net/wireless/ath/ath9k/ani.c               |  489 +------
 drivers/net/wireless/ath/ath9k/ani.h               |   32 +-
 drivers/net/wireless/ath/ath9k/ar5008_phy.c        |  176 +--
 drivers/net/wireless/ath/ath9k/ar9002_hw.c         |    4 -
 .../net/wireless/ath/ath9k/ar9003_2p2_initvals.h   |    1 +
 drivers/net/wireless/ath/ath9k/ar9003_mci.c        |   21 +-
 drivers/net/wireless/ath/ath9k/ar9003_phy.c        |   44 +-
 .../net/wireless/ath/ath9k/ar9330_1p1_initvals.h   |   53 +-
 .../net/wireless/ath/ath9k/ar9330_1p2_initvals.h   |  882 +----------
 drivers/net/wireless/ath/ath9k/ar9340_initvals.h   |  755 ++++------
 .../net/wireless/ath/ath9k/ar9462_2p0_initvals.h   |    7 +-
 drivers/net/wireless/ath/ath9k/ar9485_initvals.h   | 1528 ++++++++------------
 .../net/wireless/ath/ath9k/ar9580_1p0_initvals.h   |  772 +---------
 drivers/net/wireless/ath/ath9k/ath9k.h             |    1 +
 drivers/net/wireless/ath/ath9k/debug.c             |    2 -
 drivers/net/wireless/ath/ath9k/gpio.c              |    2 +-
 drivers/net/wireless/ath/ath9k/htc.h               |    4 +-
 drivers/net/wireless/ath/ath9k/htc_drv_beacon.c    |   10 +-
 drivers/net/wireless/ath/ath9k/htc_drv_gpio.c      |  122 +-
 drivers/net/wireless/ath/ath9k/htc_drv_init.c      |    4 +-
 drivers/net/wireless/ath/ath9k/htc_drv_main.c      |   78 +-
 drivers/net/wireless/ath/ath9k/htc_drv_txrx.c      |    2 +-
 drivers/net/wireless/ath/ath9k/hw.h                |   13 +-
 drivers/net/wireless/ath/ath9k/link.c              |    2 +-
 drivers/net/wireless/ath/ath9k/main.c              |   36 +-
 drivers/net/wireless/ath/ath9k/mci.c               |   17 +-
 drivers/net/wireless/ath/ath9k/reg.h               |    4 -
 drivers/net/wireless/ath/ath9k/xmit.c              |   12 +
 .../net/wireless/brcm80211/brcmfmac/bcmsdh_sdmmc.c |    2 +
 drivers/net/wireless/brcm80211/brcmfmac/dhd_bus.h  |    8 +
 .../net/wireless/brcm80211/brcmfmac/dhd_common.c   |   29 +-
 .../net/wireless/brcm80211/brcmfmac/dhd_linux.c    |    2 +
 drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c |  500 +++++--
 .../net/wireless/brcm80211/brcmfmac/sdio_chip.c    |   17 +
 drivers/net/wireless/brcm80211/brcmsmac/channel.c  | 1226 ++++------------
 drivers/net/wireless/brcm80211/brcmsmac/channel.h  |    4 +-
 .../net/wireless/brcm80211/brcmsmac/mac80211_if.c  |    2 +
 drivers/net/wireless/brcm80211/brcmsmac/main.c     |   36 +-
 .../net/wireless/brcm80211/include/brcm_hw_ids.h   |    1 +
 drivers/net/wireless/iwlegacy/common.c             |    7 +-
 drivers/net/wireless/iwlwifi/dvm/agn.h             |    2 +-
 drivers/net/wireless/iwlwifi/dvm/dev.h             |    2 -
 drivers/net/wireless/iwlwifi/dvm/devices.c         |   13 -
 drivers/net/wireless/iwlwifi/dvm/lib.c             |    2 +-
 drivers/net/wireless/iwlwifi/dvm/mac80211.c        |   55 +-
 drivers/net/wireless/iwlwifi/dvm/main.c            |   29 +-
 drivers/net/wireless/iwlwifi/dvm/scan.c            |   47 +-
 drivers/net/wireless/iwlwifi/iwl-eeprom-parse.c    |    3 +
 drivers/net/wireless/iwlwifi/iwl-notif-wait.c      |    5 +-
 drivers/net/wireless/iwlwifi/iwl-op-mode.h         |   16 +-
 drivers/net/wireless/iwlwifi/pcie/rx.c             |   30 +-
 drivers/net/wireless/iwlwifi/pcie/trans.c          |   19 +-
 drivers/net/wireless/mac80211_hwsim.c              |   10 +-
 drivers/net/wireless/mwifiex/cfg80211.c            |   65 +-
 drivers/net/wireless/mwifiex/cmdevt.c              |    7 +-
 drivers/net/wireless/mwifiex/fw.h                  |   23 +
 drivers/net/wireless/mwifiex/ie.c                  |   55 +-
 drivers/net/wireless/mwifiex/init.c                |    1 +
 drivers/net/wireless/mwifiex/ioctl.h               |   10 +
 drivers/net/wireless/mwifiex/main.c                |    3 +-
 drivers/net/wireless/mwifiex/main.h                |    8 +-
 drivers/net/wireless/mwifiex/scan.c                |   25 +-
 drivers/net/wireless/mwifiex/sta_cmd.c             |   23 +-
 drivers/net/wireless/mwifiex/sta_cmdresp.c         |   27 +
 drivers/net/wireless/mwifiex/sta_ioctl.c           |    3 -
 drivers/net/wireless/mwifiex/uap_cmd.c             |  303 ++--
 drivers/net/wireless/rt2x00/Kconfig                |    8 +
 drivers/net/wireless/rt2x00/rt2800.h               |  173 ++-
 drivers/net/wireless/rt2x00/rt2800lib.c            |  350 ++++-
 drivers/net/wireless/rt2x00/rt2800pci.c            |   82 +-
 drivers/net/wireless/rt2x00/rt2800pci.h            |    1 +
 drivers/net/wireless/rt2x00/rt2800usb.c            |    1 +
 drivers/net/wireless/rt2x00/rt2x00.h               |    1 +
 drivers/net/wireless/rt2x00/rt2x00pci.c            |    9 +
 drivers/net/wireless/rtl818x/rtl8180/dev.c         |    2 +
 drivers/net/wireless/rtlwifi/cam.c                 |    5 +-
 drivers/net/wireless/rtlwifi/pci.c                 |   17 +-
 drivers/net/wireless/rtlwifi/rtl8192se/phy.c       |    3 +
 drivers/net/wireless/rtlwifi/rtl8192se/sw.c        |    1 -
 drivers/net/wireless/ti/wl1251/cmd.c               |    9 -
 drivers/net/wireless/ti/wl1251/main.c              |   67 +-
 drivers/net/wireless/ti/wl1251/wl1251.h            |    1 -
 drivers/net/wireless/ti/wl12xx/cmd.c               |   16 +-
 drivers/net/wireless/ti/wl12xx/main.c              |  350 +++--
 drivers/net/wireless/ti/wl18xx/acx.h               |   34 +-
 drivers/net/wireless/ti/wl18xx/io.c                |   39 +-
 drivers/net/wireless/ti/wl18xx/io.h                |    4 +-
 drivers/net/wireless/ti/wl18xx/main.c              |  365 +++--
 drivers/net/wireless/ti/wlcore/acx.c               |    8 +-
 drivers/net/wireless/ti/wlcore/acx.h               |    5 +
 drivers/net/wireless/ti/wlcore/boot.c              |   84 +-
 drivers/net/wireless/ti/wlcore/cmd.c               |   77 +-
 drivers/net/wireless/ti/wlcore/cmd.h               |   21 +
 drivers/net/wireless/ti/wlcore/conf.h              |    8 +-
 drivers/net/wireless/ti/wlcore/debugfs.c           |  255 ++++
 drivers/net/wireless/ti/wlcore/event.c             |   15 +-
 drivers/net/wireless/ti/wlcore/hw_ops.h            |   12 +-
 drivers/net/wireless/ti/wlcore/ini.h               |   22 +-
 drivers/net/wireless/ti/wlcore/init.c              |   43 +-
 drivers/net/wireless/ti/wlcore/io.c                |   55 +-
 drivers/net/wireless/ti/wlcore/io.h                |  144 +-
 drivers/net/wireless/ti/wlcore/main.c              |  348 +++--
 drivers/net/wireless/ti/wlcore/ps.c                |   16 +-
 drivers/net/wireless/ti/wlcore/rx.c                |   41 +-
 drivers/net/wireless/ti/wlcore/rx.h                |   10 +-
 drivers/net/wireless/ti/wlcore/sdio.c              |   50 +-
 drivers/net/wireless/ti/wlcore/spi.c               |   14 +-
 drivers/net/wireless/ti/wlcore/testmode.c          |   14 +
 drivers/net/wireless/ti/wlcore/tx.c                |   86 +-
 drivers/net/wireless/ti/wlcore/tx.h                |    4 +-
 drivers/net/wireless/ti/wlcore/wlcore.h            |   24 +-
 drivers/net/wireless/ti/wlcore/wlcore_i.h          |    9 +-
 include/linux/bcma/bcma.h                          |    7 +
 include/linux/ieee80211.h                          |   52 +-
 include/linux/nl80211.h                            |  156 +-
 include/net/cfg80211.h                             |   94 +-
 include/net/mac80211.h                             |   29 +-
 net/mac80211/Kconfig                               |   56 +-
 net/mac80211/Makefile                              |    6 +-
 net/mac80211/agg-rx.c                              |   34 +-
 net/mac80211/agg-tx.c                              |   72 +-
 net/mac80211/cfg.c                                 |  105 +-
 net/mac80211/debug.h                               |  170 +++
 net/mac80211/debugfs_netdev.c                      |   48 +-
 net/mac80211/driver-ops.h                          |   17 +-
 net/mac80211/driver-trace.c                        |    9 -
 net/mac80211/ht.c                                  |   10 +-
 net/mac80211/ibss.c                                |   91 +-
 net/mac80211/ieee80211_i.h                         |   20 +-
 net/mac80211/iface.c                               |   23 +-
 net/mac80211/key.c                                 |    4 +-
 net/mac80211/main.c                                |   11 +-
 net/mac80211/mesh.c                                |   16 +-
 net/mac80211/mesh.h                                |    4 +-
 net/mac80211/mesh_hwmp.c                           |  166 ++-
 net/mac80211/mesh_pathtbl.c                        |   30 +-
 net/mac80211/mesh_plink.c                          |   61 +-
 net/mac80211/mesh_sync.c                           |   47 +-
 net/mac80211/mlme.c                                |  219 ++-
 net/mac80211/offchannel.c                          |   21 +-
 net/mac80211/pm.c                                  |   10 +
 net/mac80211/rx.c                                  |   77 +-
 net/mac80211/sta_info.c                            |   44 +-
 net/mac80211/status.c                              |   11 +-
 net/mac80211/tkip.c                                |   43 +-
 net/mac80211/trace.c                               |   75 +
 net/mac80211/{driver-trace.h => trace.h}           |   67 +-
 net/mac80211/tx.c                                  |   49 +-
 net/mac80211/util.c                                |    3 +
 net/mac80211/wme.c                                 |   11 +-
 net/mac80211/wme.h                                 |    2 +-
 net/wireless/core.c                                |   63 -
 net/wireless/core.h                                |   26 -
 net/wireless/mesh.c                                |    6 +
 net/wireless/nl80211.c                             |  282 +++-
 167 files changed, 6540 insertions(+), 6970 deletions(-)
 create mode 100644 net/mac80211/debug.h
 delete mode 100644 net/mac80211/driver-trace.c
 create mode 100644 net/mac80211/trace.c
 rename net/mac80211/{driver-trace.h => trace.h} (96%)
-- 
John W. Linville		Someday the world will need a hero, and you
linville@tuxdriver.com			might be all we have.  Be ready.

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply

* Re: [PATCH net-next 0/6] qlge: bug fix
From: Francois Romieu @ 2012-06-29 21:36 UTC (permalink / raw)
  To: Jitendra Kalsaria; +Cc: davem, netdev, Ron, Dept_NX_Linux_NIC_Driver
In-Reply-To: <1340994290-28832-1-git-send-email-jitendra.kalsaria@qlogic.com>

Jitendra Kalsaria <jitendra.kalsaria@qlogic.com> :
> From: Jitendra Kalsaria <jitendra.kalsaria@qlogic.com>
> 
> Please apply it to net-next.

Bug fixes are supposed to be applied to current net, and fast-tracked
to stable.

Why net-next ?

-- 
Ueimor

^ 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