* Re: AF_BUS socket address family
From: Vincent Sanders @ 2012-06-29 23:22 UTC (permalink / raw)
To: Casey Schaufler; +Cc: netdev, linux-kernel, David S. Miller
In-Reply-To: <4FEDF7B6.3020107@schaufler-ca.com>
On Fri, Jun 29, 2012 at 11:45:10AM -0700, Casey Schaufler wrote:
> On 6/29/2012 9:45 AM, Vincent Sanders wrote:
<snip>
> >
> > 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?
>
That would be ridiculously excessive. This work represents what we
feel is the minimum required functionlity for the underlying IPC
mechanism.
The minimal filtering performed by the netfilter module is what is
required to enforce security as used in existing deployments and no more.
<snip>
> >
> > 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?
we have not tested or built this with the Smack LSM, I would, of
course, be pleased to accept a patch to add this functionality if you
are knowladgeable in this area.
<snip>
^ permalink raw reply
* Re: AF_BUS socket address family
From: David Miller @ 2012-06-29 23:18 UTC (permalink / raw)
To: vincent.sanders; +Cc: netdev, linux-kernel
In-Reply-To: <20120629231236.GA28593@mail.collabora.co.uk>
From: Vincent Sanders <vincent.sanders@collabora.co.uk>
Date: Sat, 30 Jun 2012 00:12:37 +0100
> I had hoped you would have at least read the opening list where I
> outlined the underlying features which explain why none of the
> existing IPC match the requirements.
I had hoped that you had read the part we told you last time where
we explained why multicast and "reliable delivery" are fundamentally
incompatible attributes.
We are not creating a full address family in the kernel which exists
for one, and only one, specific and difficult user.
^ permalink raw reply
* Re: [PATCH net-next 2/6] qlge: Stand-up card should not report supporting wol.
From: Francois Romieu @ 2012-06-29 23:02 UTC (permalink / raw)
To: Jitendra Kalsaria; +Cc: David Miller, netdev, Dept-NX Linux NIC Driver
In-Reply-To: <5E4F49720D0BAD499EE1F01232234BA877435B23DA@AVEXMB1.qlogic.org>
(linux-zupk.site removed)
Jitendra Kalsaria <jitendra.kalsaria@qlogic.com> :
[...]
> - broken indent
> - netif_err(... "cleared successfully" ...)
> [JK] I don't think so, %s will be replace with "cleared successfully" or with "clear failed" depend upon status value.
I would not netif_err when everything is ok.
[...]
> If I read things correctly, WAKE_MAGIC can not be cleared and it makes no
> difference on the status code. It should be fixed.
>
> [JK] You right, here we are not clearing WAKE_MAGIC but we are making sure that wol is disable when no option is set.
Imho wol should be disabled as well when neither WAKE_MAGIC nor any option
is set at all.
--
Ueimor
^ permalink raw reply
* Re: AF_BUS socket address family
From: Vincent Sanders @ 2012-06-29 23:12 UTC (permalink / raw)
To: David Miller; +Cc: netdev, linux-kernel
In-Reply-To: <20120629.153656.1141845894730637434.davem@davemloft.net>
On Fri, Jun 29, 2012 at 03:36:56PM -0700, David Miller wrote:
>
> There is no extensive text describing why using IPv4 for this cannot
> be done. I can almost bet that nobody really, honestly, tried.
>
I can assure you that the team has tried no fewer than six differing
approaches, including using IP and attempting to bend several of the
existing address families.
> Basically this means all of our feedback from the last time we had
> discussions on kernel IPC for DBUS are being completely ignored.
Absolutely not, we listened hard and did extensive research, please do
not ascribe thoughtlessness to our actions. Certainly I would not
presume to waste your time and present something which has not been
thoroughly considered.
I had hoped you would have at least read the opening list where I
outlined the underlying features which explain why none of the
existing IPC match the requirements.
Firstly it is intended is an interprocess mechanism and not to rely on
a configured IP system, indeed one of its primary usages is to
provide mechanism for various tools to set up IP networking.
Leaving that aside the requirements for multicast, strict ordering, fd
passing and credential passing are simply not available in any other
single transport. It was made plain to us that AF_UNIX would not be
expanded to encompass multicast so we are left with adding AF_BUS.
If we are wrong I hope you will explain to me how we can achieve fd and
credential passing to multicast groups within existing protocols.
>
> Therefore, I will completely ignore this patch submission.
>
I do hope you will reconsider, or at least educate us appropriately.
I understand you are a busy maintainer and appreciate your time in this matter.
Best regards
--
Vincent Sanders <vincent.sanders@collabora.co.uk>
^ permalink raw reply
* Re: [PATCH] net: Update netdev_alloc_frag to work more efficiently with TCP and GRO
From: Alexander Duyck @ 2012-06-29 23:04 UTC (permalink / raw)
To: Eric Dumazet; +Cc: Alexander Duyck, netdev, davem, jeffrey.t.kirsher
In-Reply-To: <1340368430.4604.10280.camel@edumazet-glaptop>
On 06/22/2012 05:33 AM, Eric Dumazet wrote:
> Here is the patch I tested here.
>
> Using 32768 bytes allocations is actually nice for MTU=9000 traffic,
> since we can fit 3 frames per 32KB instead of only 2 frames (using
> kmalloc-16384 slab))
>
> Also, I prefill page->_count with a high bias value, to avoid the
> get_page() we did for each allocated frag.
>
> In my profiles, the get_page() cost was dominant, because of false
> sharing with skb consumers (as they might run on different cpus)
>
> This way, when 32768 bytes are filled, we perform a single
> atomic_sub_return() and can recycle the page if we find we are the last
> user (this is what you did in your patch, when testing page->_count
> being 1)
>
> Note : If I used max(PAGE_SIZE, 32678) for MAX_NETDEV_FRAGSIZE,
> gcc was not able to optimise get_order(MAX_NETDEV_FRAGSIZE), strange...
>
>
> diff --git a/net/core/skbuff.c b/net/core/skbuff.c
> index 5b21522..d31efa2 100644
> --- a/net/core/skbuff.c
> +++ b/net/core/skbuff.c
> @@ -296,9 +296,18 @@ EXPORT_SYMBOL(build_skb);
> struct netdev_alloc_cache {
> struct page *page;
> unsigned int offset;
> + unsigned int pagecnt_bias;
> };
> static DEFINE_PER_CPU(struct netdev_alloc_cache, netdev_alloc_cache);
>
> +#if PAGE_SIZE > 32768
> +#define MAX_NETDEV_FRAGSIZE PAGE_SIZE
> +#else
> +#define MAX_NETDEV_FRAGSIZE 32768
> +#endif
> +
> +#define NETDEV_PAGECNT_BIAS (MAX_NETDEV_FRAGSIZE / \
> + SKB_DATA_ALIGN(sizeof(struct skb_shared_info)))
> /**
> * netdev_alloc_frag - allocate a page fragment
> * @fragsz: fragment size
> @@ -316,18 +325,25 @@ void *netdev_alloc_frag(unsigned int fragsz)
> nc = &__get_cpu_var(netdev_alloc_cache);
> if (unlikely(!nc->page)) {
> refill:
> - nc->page = alloc_page(GFP_ATOMIC | __GFP_COLD);
> + nc->page = alloc_pages(GFP_ATOMIC | __GFP_COLD | __GFP_COMP,
> + get_order(MAX_NETDEV_FRAGSIZE));
> + if (unlikely(!nc->page))
> + goto end;
> +recycle:
> + atomic_set(&nc->page->_count, NETDEV_PAGECNT_BIAS);
> + nc->pagecnt_bias = NETDEV_PAGECNT_BIAS;
> nc->offset = 0;
> }
> - if (likely(nc->page)) {
> - if (nc->offset + fragsz > PAGE_SIZE) {
> - put_page(nc->page);
> - goto refill;
> - }
> - data = page_address(nc->page) + nc->offset;
> - nc->offset += fragsz;
> - get_page(nc->page);
> + if (nc->offset + fragsz > MAX_NETDEV_FRAGSIZE) {
> + if (!atomic_sub_return(nc->pagecnt_bias,
> + &nc->page->_count))
> + goto recycle;
> + goto refill;
> }
> + data = page_address(nc->page) + nc->offset;
> + nc->offset += fragsz;
> + nc->pagecnt_bias--; /* avoid get_page()/get_page() false sharing */
> +end:
> local_irq_restore(flags);
> return data;
> }
> @@ -353,7 +369,7 @@ struct sk_buff *__netdev_alloc_skb(struct net_device *dev,
> unsigned int fragsz = SKB_DATA_ALIGN(length + NET_SKB_PAD) +
> SKB_DATA_ALIGN(sizeof(struct skb_shared_info));
>
> - if (fragsz <= PAGE_SIZE && !(gfp_mask & __GFP_WAIT)) {
> + if (fragsz <= MAX_NETDEV_FRAGSIZE && !(gfp_mask & __GFP_WAIT)) {
> void *data = netdev_alloc_frag(fragsz);
>
> if (likely(data)) {
>
>
I was wondering if there were any plans to clean this patch up and
submit it to net-next? If not, I can probably work on that since this
addressed the concerns I had in my original patch.
Thanks,
Alex
^ permalink raw reply
* Source-specific multicast socket options documentation
From: Radek Pazdera @ 2012-06-29 22:52 UTC (permalink / raw)
To: mtk.manpages; +Cc: linux-man, netdev
Hi,
I found out, that some source-specific multicast socket options are
missing in the IPv4 manpage (man 7 ip) and I'm trying to write some
documentation for them.
This is what I have now (without the formatting). I'd like to ask,
if you could spare a minute and have just a quick look over it
to make sure there are not some errors (either technical or language -
I'm not native speaker), before I post the patch.
IP_ADD_SOURCE_MEMBERSHIP (since Linux 2.5.68)
Join a multicast group and allow receiving data only from a specific
source. Argument is an ip_mreq_source structure.
struct ip_mreq_source {
struct in_addr imr_multiaddr; /* IP multicast group
address */
struct in_addr imr_interface; /* IP address of local
interface */
struct in_addr imr_sourceaddr; /* IP address of
multicast source */
};
The ip_mreq_source structure is similar to ip_mreqn structure.
imr_multiaddr contains the address of the multicast group
the application wants to join or leave. imr_address is the
address of the local interface which the system will join
the multicast group with. imr_sourceaddr is the address of
multicast source the application wants to receive data
from.
Application can use this option multiple times to receive
data from more than one source.
IP_DROP_SOURCE_MEMBERHSIP (since Linux 2.5.68)
Leave a source-specific group, i.e. stop receiving data from
a given multicast group, coming from a given source.
If the application has subscribed to multiple sources within
the same group, data from the remaining sources will still
be delivered. To stop receiving data from all sources at once
use IP_LEAVE_GROUP.
Argument is an ip_mreq_source structure as described at
IP_ADD_SOURCE_MEMBERSHIP.
IP_BLOCK_SOURCE (since Linux 2.5.68)
Block receiving multicast data from a specific source in a given
group. This is valid only after the application have subscribed
to the multicast group using either IP_ADD_MEMBERSHIP or
IP_ADD_SOURCE_MEMBERSHIP.
Argument is an ip_mreq_source structure as described at
IP_ADD_SOURCE_MEMBERSHIP.
IP_UNBLOCK_SOURCE (since Linux 2.5.68)
Unblock previously blocked multicast source. Returns EADDRNOTAVAIL
when given source was not being blocked.
Argument is an ip_mreq_source structure as described at
IP_ADD_SOURCE_MEMBERSHIP.
IP_MSFILTER (since Linux 2.5.68)
This option provides access to the advanced full-state filtering API.
Argument is an ip_msfilter structure.
struct ip_msfilter {
struct in_addr imsf_multiaddr; /* IP multicast group
address */
struct in_addr imsf_interface; /* IP address of local
interface */
uint32_t imsf_fmode; /* Filter-mode */
uint32_t imsf_numsrc; /* Number of sources in
the following array */
struct in_addr imsf_slist[1]; /* Array of source
addresses */
};
There are two macros, MCAST_INCLUDE and MCAST_EXCLUDE, which can be
used to specify the filtering mode. Additionaly, IP_MSFILTER_SIZE(n)
macro exists to determine how much memory is needed to store
ip_msfilter structure with n sources in the source list.
For full description of multicast source filtering refer to RFC 3376.
My sources for these information were:
* http://tools.ietf.org/html/rfc3678
* http://tools.ietf.org/html/rfc3376
* code (http://lxr.free-electrons.com/source/net/ipv4/ip_sockglue.c)
Thank you!
Radek Pazdera :)
^ permalink raw reply
* RE: [PATCH net-next 4/6] qlge: Fixed double pci free upon tx_ring->q allocation failure.
From: Jitendra Kalsaria @ 2012-06-29 22:48 UTC (permalink / raw)
To: Francois Romieu
Cc: David Miller, netdev, Ron Mercer, Dept-NX Linux NIC Driver
In-Reply-To: <20120629213755.GC19152@electric-eye.fr.zoreil.com>
Francois,
See comments inline.
Jiten
-----Original Message-----
From: Francois Romieu [mailto:romieu@fr.zoreil.com]
Sent: Friday, June 29, 2012 2:38 PM
To: Jitendra Kalsaria
Cc: David Miller; netdev; Ron@linux-zupk.site; Dept-NX Linux NIC Driver
Subject: Re: [PATCH net-next 4/6] qlge: Fixed double pci free upon tx_ring->q allocation failure.
Jitendra Kalsaria <jitendra.kalsaria@qlogic.com> :
[...]
> 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;
> + }
You do not need a test: use a second label + goto.
Nit: You can replace 'if ((tx_ring->wq_base == NULL)' with
'if (!tx_ring->wq_base' and add a local variable for qdev->pdev.
You may consider replacing pci_alloc_consistent with dma_alloc_coherent
in a future patch.
[JK] Will, definitely take care of this in future patch.
--
Ueimor
^ permalink raw reply
* RE: [PATCH net-next 2/6] qlge: Stand-up card should not report supporting wol.
From: Jitendra Kalsaria @ 2012-06-29 22:40 UTC (permalink / raw)
To: Francois Romieu
Cc: David Miller, netdev, Ron@linux-zupk.site,
Dept-NX Linux NIC Driver
In-Reply-To: <20120629213747.GB19152@electric-eye.fr.zoreil.com>
Francois,
See comments inline.
Jiten
-----Original Message-----
From: Francois Romieu [mailto:romieu@fr.zoreil.com]
Sent: Friday, June 29, 2012 2:38 PM
To: Jitendra Kalsaria
Cc: David Miller; netdev; Ron@linux-zupk.site; Dept-NX Linux NIC Driver
Subject: Re: [PATCH net-next 2/6] qlge: Stand-up card should not report supporting wol.
Jitendra Kalsaria <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;
> + }
unsigned short ssys_dev = qdev->pdev->subsystem_device;
if (ssys_dev == 0x0068 || ssys_dev == 0x0180) {
wol->supported = WAKE_MAGIC;
wol->wolopts = qdev->wol;
}
[JK] Will do this.
> }
>
> 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) {
See above.
> + 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);
qdev->ndev == ndev, right ?
[JK] Yes
> + if (!qdev->wol) {
> + u32 wol = 0;
> + status = ql_mb_wol_mode(qdev, wol);
Missing empty line.
status should be declared here.
[JK] Will fix this
> + netif_err(qdev, drv, qdev->ndev,
> + "WOL %s (wol code 0x%x)\n",
> + status == 0 ? "cleared successfully" : "clear failed",
> + wol);
- broken indent
- netif_err(... "cleared successfully" ...)
[JK] I don't think so, %s will be replace with "cleared successfully" or with "clear failed" depend upon status value.
> + }
> + } else {
> + netif_info(qdev, drv, qdev->ndev,
> + "WOL is not supported on stand-up card\n");
> }
> -
> return 0;
If I read things correctly, WAKE_MAGIC can not be cleared and it makes no
difference on the status code. It should be fixed.
[JK] You right, here we are not clearing WAKE_MAGIC but we are making sure that wol is disable when no option is set.
--
Ueimor
^ permalink raw reply
* Re: AF_BUS socket address family
From: David Miller @ 2012-06-29 22:36 UTC (permalink / raw)
To: vincent.sanders; +Cc: netdev, linux-kernel
In-Reply-To: <1340988354-26981-1-git-send-email-vincent.sanders@collabora.co.uk>
There is no extensive text describing why using IPv4 for this cannot
be done. I can almost bet that nobody really, honestly, tried.
Basically this means all of our feedback from the last time we had
discussions on kernel IPC for DBUS are being completely ignored.
Therefore, I will completely ignore this patch submission.
^ permalink raw reply
* Re: [BUG, regression, bisected] Marvell 88E8055 NIC (sky2) fails to detect link after resume from S3
From: Michal Zatloukal @ 2012-06-29 22:36 UTC (permalink / raw)
To: Francois Romieu; +Cc: netdev, Mirko Lindner, Stephen Hemminger
In-Reply-To: <20120629215840.GA21533@electric-eye.fr.zoreil.com>
Sorry, not a developer, but I assume you mean something like:
if (!hw)
return 0;
+ mdelay(800);
/* Re-enable all clocks */
Right? In that case, I'm building the kernel now and should be able to
report by tomorrow.
MZ
On Fri, Jun 29, 2012 at 11:58 PM, Francois Romieu <romieu@fr.zoreil.com> wrote:
> (maintainers Cced)
>
> Michal Zatloukal <myxal.mxl@gmail.com> :
> [7afe1845dd1e7c90828c942daed7e57ffa7c38d6 induced regression]
>> 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.
>
> Can you workaround it by enforcing some mdelay() in sky2_resume before
> it does any real work ?
>
> --
> Ueimor
^ permalink raw reply
* Re: [PATCH net-next] cnic: Fix mmap regression.
From: David Miller @ 2012-06-29 22:34 UTC (permalink / raw)
To: mchan; +Cc: netdev
In-Reply-To: <1340998365-15753-1-git-send-email-mchan@broadcom.com>
From: "Michael Chan" <mchan@broadcom.com>
Date: Fri, 29 Jun 2012 12:32:45 -0700
> 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>
I really couldn't believe what you guys were doing in the original
commit, but I decided to let you do stupid things and find out the
hard way that removing any user visible interface is basically
impossible.
Applied, thanks.
^ permalink raw reply
* RE: [PATCH net-next 0/6] qlge: bug fix
From: Jitendra Kalsaria @ 2012-06-29 22:05 UTC (permalink / raw)
To: Francois Romieu; +Cc: David Miller, netdev, Dept-NX Linux NIC Driver
In-Reply-To: <20120629214015.GE19152@electric-eye.fr.zoreil.com>
Francois,
I have already fixed my cc list. Will resubmit to net as major of them where bug fixes and thanks for your suggestion.
Jiten
-----Original Message-----
From: Francois Romieu [mailto:romieu@fr.zoreil.com]
Sent: Friday, June 29, 2012 2:40 PM
To: Jitendra Kalsaria
Cc: David Miller; netdev; Dept-NX Linux NIC Driver
Subject: Re: [PATCH net-next 0/6] qlge: bug fix
Please fix your Cc:.
Ron@linux-zupk.site does not exist.
--
Ueimor
^ permalink raw reply
* Re: [BUG, regression, bisected] Marvell 88E8055 NIC (sky2) fails to detect link after resume from S3
From: Francois Romieu @ 2012-06-29 21:58 UTC (permalink / raw)
To: Michal Zatloukal; +Cc: netdev, Mirko Lindner, Stephen Hemminger
In-Reply-To: <op.wgon84tw16tawo@esprimo>
(maintainers Cced)
Michal Zatloukal <myxal.mxl@gmail.com> :
[7afe1845dd1e7c90828c942daed7e57ffa7c38d6 induced regression]
> 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.
Can you workaround it by enforcing some mdelay() in sky2_resume before
it does any real work ?
--
Ueimor
^ permalink raw reply
* Re: [PATCH net-next 0/6] qlge: bug fix
From: Francois Romieu @ 2012-06-29 21:40 UTC (permalink / raw)
To: Jitendra Kalsaria; +Cc: davem, netdev, Dept_NX_Linux_NIC_Driver
In-Reply-To: <1340994290-28832-1-git-send-email-jitendra.kalsaria@qlogic.com>
Please fix your Cc:.
Ron@linux-zupk.site does not exist.
--
Ueimor
^ permalink raw reply
* Re: [PATCH net-next 5/6] qlge: Categorize receive frame errors from firmware.
From: Francois Romieu @ 2012-06-29 21:38 UTC (permalink / raw)
To: Jitendra Kalsaria; +Cc: davem, netdev, Ron, Dept_NX_Linux_NIC_Driver
In-Reply-To: <1340994290-28832-6-git-send-email-jitendra.kalsaria@qlogic.com>
Jitendra Kalsaria <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;
The stats seem to be 64 bits integers only. Couldn't you use a plain loop
with ARRAY_SIZE(ql_stats_str_arr) ?
> 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++;
Use a local variable for &qdev->nic_stats ?
> +
> + 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;
> + }
I did not expect a put_page here from the commit description.
--
Ueimor
^ permalink raw reply
* Re: [PATCH net-next 4/6] qlge: Fixed double pci free upon tx_ring->q allocation failure.
From: Francois Romieu @ 2012-06-29 21:37 UTC (permalink / raw)
To: Jitendra Kalsaria; +Cc: davem, netdev, Ron, Dept_NX_Linux_NIC_Driver
In-Reply-To: <1340994290-28832-5-git-send-email-jitendra.kalsaria@qlogic.com>
Jitendra Kalsaria <jitendra.kalsaria@qlogic.com> :
[...]
> 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;
> + }
You do not need a test: use a second label + goto.
Nit: You can replace 'if ((tx_ring->wq_base == NULL)' with
'if (!tx_ring->wq_base' and add a local variable for qdev->pdev.
You may consider replacing pci_alloc_consistent with dma_alloc_coherent
in a future patch.
--
Ueimor
^ permalink raw reply
* Re: [PATCH net-next 2/6] qlge: Stand-up card should not report supporting wol.
From: Francois Romieu @ 2012-06-29 21:37 UTC (permalink / raw)
To: Jitendra Kalsaria; +Cc: davem, netdev, Ron, Dept_NX_Linux_NIC_Driver
In-Reply-To: <1340994290-28832-3-git-send-email-jitendra.kalsaria@qlogic.com>
Jitendra Kalsaria <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;
> + }
unsigned short ssys_dev = qdev->pdev->subsystem_device;
if (ssys_dev == 0x0068 || ssys_dev == 0x0180) {
wol->supported = WAKE_MAGIC;
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) {
See above.
> + 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);
qdev->ndev == ndev, right ?
> + if (!qdev->wol) {
> + u32 wol = 0;
> + status = ql_mb_wol_mode(qdev, wol);
Missing empty line.
status should be declared here.
> + netif_err(qdev, drv, qdev->ndev,
> + "WOL %s (wol code 0x%x)\n",
> + status == 0 ? "cleared successfully" : "clear failed",
> + wol);
- broken indent
- netif_err(... "cleared successfully" ...)
> + }
> + } else {
> + netif_info(qdev, drv, qdev->ndev,
> + "WOL is not supported on stand-up card\n");
> }
> -
> return 0;
If I read things correctly, WAKE_MAGIC can not be cleared and it makes no
difference on the status code. It should be fixed.
--
Ueimor
^ 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
* 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
* 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
* [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
* 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
* [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: 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 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
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox