* Re: bridge: HSR support
From: Arvid Brodin @ 2011-10-11 23:51 UTC (permalink / raw)
To: netdev; +Cc: Stephen Hemminger, Lennert Buytenhek
In-Reply-To: <20111011112821.28cd3e51@nehalam.linuxnetplumber.net>
Stephen Hemminger wrote:
> On Tue, 11 Oct 2011 20:25:08 +0200
> Arvid Brodin <arvid.brodin@enea.com> wrote:
>
>> Hi,
>>
>> I want to add support for HSR ("High-availability Seamless Redundancy",
>> IEC-62439-3) to the bridge code. With HSR, all connected units have two network
>> ports and are connected in a ring. All new Ethernet packets are sent on both
>> ports (or passed through if the current unit is not the originating unit). The
>> same packet is never passed twice. Non-HSR units are not allowed in the ring.
>>
>> This gives instant, reconfiguration-free failover.
>>
>> I'd like your input on how to design the user interface. To me it seems natural
>> to use bridge-utils, which of course today supports STP.
>>
>> One solution is to simply add an "hsr" command:
>>
>> # brctl hsr <bridge> on|off
>>
>> But HSR is mutually exclusive to other modes, and I think that STP and standard
>> bridge mode are mutually exclusive, too? Perhaps it would be better (more user-
>> friendly) to
>>
>> # brctl type <bridge> standard|stp|hsr
>>
>> ?
>>
>> 'brctl stp <bridge> on|off' would have to be kept for compatibility, but could
>> be a simple wrapper for 'brctl type <bridge> stp|standard'
>>
>> What do you think about this?
>>
>>
>
> Why is it a bridge thing and not a standalone or bonding (or the new team
> device feature? Wouldn't users want to use it without all the stuff
> related to bridging. The fact that it doesn't work with STP is a big
> red flag that it doesn't belong in the bridge.
Good question! I'm new to the more advanced networking possibilities in Linux, so
I really don't know where HSR fits best.
HSR is a layer 2 only protocol, with the host acting as bridge for packets not
destined for itself. It also sends all originating Ethernet packets on both ports,
adding a HSR sequence tag to the packet (using a dedicated EtherType of 0x88FB).
As described above, the HSR units are connected in a ring, in which only HSR units
are allowed.
Having looked now at bonding, it seems to act on several network layers, doing
multiple things mainly centered around 802.3ad (link aggregation). I'm not sure
how HSR would fit there.
If I understand correctly, team device is an emerging userspace implementation of
the bonding driver?
I guess my take was that HSR seems like a special bridging mode, much like STP.
> Please discuss this on netdev mailing list, others may have different
> opinions.
Done! :)
--
Arvid Brodin
Enea Services Stockholm AB
^ permalink raw reply
* Re: e100 + VLANs?
From: Jesse Brandeburg @ 2011-10-11 23:38 UTC (permalink / raw)
To: David Lamparter; +Cc: Michael Tokarev, Eric Dumazet, Kirsher, Jeffrey T, netdev
In-Reply-To: <20111011152917.GE2840382@jupiter.n2.diac24.net>
[-- Attachment #1: Type: text/plain, Size: 1820 bytes --]
On Tue, 11 Oct 2011 08:29:18 -0700
David Lamparter <equinox@diac24.net> wrote:
> On Tue, Oct 11, 2011 at 04:56:23PM +0400, Michael Tokarev wrote:
> > So it looks like the card merely ignores these packets.
> >
> > So little result for so much efforts... :(
> >
> > But it is not really that bad I think - it is an obsolete hardware.
>
> The knowledge and code for this is actually around line 1142 of e100.c:
> if (nic->mac >= mac_82558_D101_A4) {
> config->fc_disable = 0x1; /* 1=Tx fc off, 0=Tx fc on */
> config->mwi_enable = 0x1; /* 1=enable, 0=disable */
> config->standard_tcb = 0x0; /* 1=standard, 0=extended */
> config->rx_long_ok = 0x1; /* 1=VLANs ok, 0=standard */
>
> where rx_long_ok is the configuration bit to enable frame reception
> for >1514 byte frames. I guess your card is < mac_82558_D101_A4...
>
> (cf. "Intel 8255x 10/100 Mbps Ethernet Controller Family Open Source
> Software Developer Manual" page 78/86 - "Long Receive OK. This bit is
> reserved on the 82557 and should be set to 0. When this bit is set on
> the 82558 or 82559, the device considers received frames that have
> a data field longer than 1500 bytes as good frames.")
David, thank you for posting that, while you were typing I was
researching the same thing, so FWIW, I concur with your conclusion.
ouch, OP your hardware is really really old:
> 00:12.0 Ethernet controller: Intel Corporation 82557/8/9/0/1 Ethernet Pro 100 (rev 02)
> Subsystem: Intel Corporation EtherExpress PRO/100B (TX)
rev 2 is D100_C, which is 82557.
the hardware is NOT capable of long receives (i.e. vlan packets).
If it was then they should generally fit in the receive buffer and be
handled and not discarded.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 834 bytes --]
^ permalink raw reply
* Re: [patch] cipso: remove an unneeded NULL check in cipso_v4_doi_add()
From: David Miller @ 2011-10-11 22:42 UTC (permalink / raw)
To: dan.carpenter
Cc: paul, netdev, kuznet, jmorris, yoshfuji, kaber, kernel-janitors
In-Reply-To: <20111011215549.GC30887@longonot.mountain>
From: Dan Carpenter <dan.carpenter@oracle.com>
Date: Wed, 12 Oct 2011 00:55:49 +0300
> On Tue, Oct 11, 2011 at 05:20:11PM -0400, Paul Moore wrote:
>> > - if (doi_def == NULL || doi_def->doi == CIPSO_V4_DOI_UNKNOWN)
>> > + if (doi_def->doi == CIPSO_V4_DOI_UNKNOWN)
>> > goto doi_add_return;
>> > for (iter = 0; iter < CIPSO_V4_TAG_MAXCNT; iter++) {
>> > switch (doi_def->tags[iter]) {
>>
>> I'd prefer to keep the NULL check in there as it does afford a little
>> bit of extra safety and this is management code after all, not
>> per-packet processing code, so the extra check should have no
>> observable performance impact.
>
> The dereferences on the lines before mean we would Oops before
> reaching the check. But I guess I can move the check forward. The
> error handling at goto doi_add_return relies on a non-NULL value for
> doi_def but I could just put a return in front of the dereference.
>
> if (!doi_def)
> return -EINVAL;
>
> I'll send a patch to do this tomorrow.
I think your original patch is still the best one.
Saying the NULL check should stay to provide "extra safety" is
complete garbage. Especially since, as Dan shows, we dereference the
pointer before to damn check.
I'll therefore apply Dan's original patch.
^ permalink raw reply
* Re: [patch] cipso: remove an unneeded NULL check in cipso_v4_doi_add()
From: Dan Carpenter @ 2011-10-11 21:55 UTC (permalink / raw)
To: Paul Moore
Cc: netdev, David S. Miller, Alexey Kuznetsov, James Morris,
Hideaki YOSHIFUJI, Patrick McHardy, kernel-janitors
In-Reply-To: <CAHC9VhRMy-DbbkXSSWQPh8QgHAm5xzZ1qWJaYLiOERPagDfrbQ@mail.gmail.com>
On Tue, Oct 11, 2011 at 05:20:11PM -0400, Paul Moore wrote:
> > - if (doi_def == NULL || doi_def->doi == CIPSO_V4_DOI_UNKNOWN)
> > + if (doi_def->doi == CIPSO_V4_DOI_UNKNOWN)
> > goto doi_add_return;
> > for (iter = 0; iter < CIPSO_V4_TAG_MAXCNT; iter++) {
> > switch (doi_def->tags[iter]) {
>
> I'd prefer to keep the NULL check in there as it does afford a little
> bit of extra safety and this is management code after all, not
> per-packet processing code, so the extra check should have no
> observable performance impact.
The dereferences on the lines before mean we would Oops before
reaching the check. But I guess I can move the check forward. The
error handling at goto doi_add_return relies on a non-NULL value for
doi_def but I could just put a return in front of the dereference.
if (!doi_def)
return -EINVAL;
I'll send a patch to do this tomorrow.
regards,
dan carpenter
^ permalink raw reply
* Re: [patch] cipso: remove an unneeded NULL check in cipso_v4_doi_add()
From: Paul Moore @ 2011-10-11 21:20 UTC (permalink / raw)
To: Dan Carpenter, netdev
Cc: David S. Miller, Alexey Kuznetsov, James Morris,
Hideaki YOSHIFUJI, Patrick McHardy, kernel-janitors
In-Reply-To: <20111011132228.GA27127@elgon.mountain>
On Tue, Oct 11, 2011 at 9:22 AM, Dan Carpenter <dan.carpenter@oracle.com> wrote:
> We dereference doi_def on the line before the NULL check. It has
> been this way since 2008. I checked all the callers and doi_def is
> always non-NULL here.
>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>
> diff --git a/net/ipv4/cipso_ipv4.c b/net/ipv4/cipso_ipv4.c
> index 2c2a98e..86f3b88 100644
> --- a/net/ipv4/cipso_ipv4.c
> +++ b/net/ipv4/cipso_ipv4.c
> @@ -476,7 +476,7 @@ int cipso_v4_doi_add(struct cipso_v4_doi *doi_def,
> doi = doi_def->doi;
> doi_type = doi_def->type;
>
> - if (doi_def == NULL || doi_def->doi == CIPSO_V4_DOI_UNKNOWN)
> + if (doi_def->doi == CIPSO_V4_DOI_UNKNOWN)
> goto doi_add_return;
> for (iter = 0; iter < CIPSO_V4_TAG_MAXCNT; iter++) {
> switch (doi_def->tags[iter]) {
I'd prefer to keep the NULL check in there as it does afford a little
bit of extra safety and this is management code after all, not
per-packet processing code, so the extra check should have no
observable performance impact.
--
paul moore
www.paul-moore.com
^ permalink raw reply
* Re: [PATCH net 0/4] ipv4: various pmtu discovery fixes
From: David Miller @ 2011-10-11 19:54 UTC (permalink / raw)
To: steffen.klassert; +Cc: netdev
In-Reply-To: <20111011110842.GC1830@secunet.com>
From: Steffen Klassert <steffen.klassert@secunet.com>
Date: Tue, 11 Oct 2011 13:08:42 +0200
> This patchset addresses some issues I found during investigating
> pmtu discovery. These issues were introduced with
> git commit 2c8cec5 (ipv4: Cache learned PMTU information in inetpeer).
>
> The patchset is based on current net/master.
Thanks a lot for these bug fixes, Herbert Xu reported similar issues.
I'll review these patches tonight.
^ permalink raw reply
* [GIT] Networking
From: David Miller @ 2011-10-11 19:54 UTC (permalink / raw)
To: torvalds; +Cc: akpm, netdev, linux-kernel
Just a few driver bugs, and one missing state update during ipv6 GRO processing.
1) When iSCSI and FCOE are both in use, bnx2x allocated conflicting client IDs.
Fix from Dmitry Kravkov.
2) MSCAN CAN driver copies one byte to many on odd packet lengths, fix from
Wolfgang Grandegger.
3) Blue frame support in mlx4_en driver is busted on PowerPC due to endian
bugs, fix from Thadeu Lima de Souza Cascardo.
4) When GRO pulls ipv6 extension headers, the protocol value changes,
so it has to reload the protocol ops pointer. Fix from Zheng Yan.
Please pull, thanks a lot!
The following changes since commit 65112dccf8a113737684366349d7f9ec373ddc47:
Merge git://git.samba.org/sfrench/cifs-2.6 (2011-10-10 14:53:11 +1200)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/davem/net.git master
Dmitry Kravkov (1):
bnx2x: fix cl_id allocation for non-eth clients for NPAR mode
Thadeu Lima de Souza Cascardo (1):
mlx4_en: fix endianness with blue frame support
Wolfgang Grandegger (1):
mscan: too much data copied to CAN frame due to 16 bit accesses
Yan, Zheng (1):
gro: refetch inet6_protos[] after pulling ext headers
drivers/net/bnx2x/bnx2x.h | 20 +++++++++++++-------
drivers/net/bnx2x/bnx2x_cmn.h | 2 +-
drivers/net/can/mscan/mscan.c | 11 ++++++++---
drivers/net/mlx4/en_tx.c | 6 +++---
net/ipv6/af_inet6.c | 1 +
5 files changed, 26 insertions(+), 14 deletions(-)
^ permalink raw reply
* Re: pull request: wireless-next 2011-10-11
From: John W. Linville @ 2011-10-11 19:51 UTC (permalink / raw)
To: David Miller
Cc: linux-wireless-u79uwXL29TY76Z2rM5mHXA,
netdev-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <20111011.154526.442711861363485253.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
On Tue, Oct 11, 2011 at 03:45:26PM -0400, David Miller wrote:
> From: "John W. Linville" <linville-2XuSBdqkA4R54TAoqtyWWQ@public.gmane.org>
> Date: Tue, 11 Oct 2011 15:38:06 -0400
>
> > On Tue, Oct 11, 2011 at 03:16:16PM -0400, John W. Linville wrote:
> >> commit bfb3780bc9b622422c1f0d3e12371a70863000da
> >>
> >> Dave,
> >>
> >> Here is another wireless batch intended for 3.2... Highlights include a
> >> bluetooth pull with some refactoring, a big pull of ath6kl updates, a
> >> flurry of mac80211 patches from Johannes, and the usual strong ath9k
> >> showing.
> >>
> >> Please let me know if there are problems!
> >
> > There was a problem -- a warning in ath6kl. Sorry about that!
> >
> > commit 094daf7db7c47861009899ce23f9177d761e20b0
>
> I made sure I got the most recent changes.
Cool -- sorry for the confusion!
John
--
John W. Linville Someday the world will need a hero, and you
linville-2XuSBdqkA4R54TAoqtyWWQ@public.gmane.org might be all we have. Be ready.
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
* Re: pull request: wireless-next 2011-10-11
From: David Miller @ 2011-10-11 19:45 UTC (permalink / raw)
To: linville-2XuSBdqkA4R54TAoqtyWWQ
Cc: linux-wireless-u79uwXL29TY76Z2rM5mHXA,
netdev-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <20111011193806.GI6558-2XuSBdqkA4R54TAoqtyWWQ@public.gmane.org>
From: "John W. Linville" <linville-2XuSBdqkA4R54TAoqtyWWQ@public.gmane.org>
Date: Tue, 11 Oct 2011 15:38:06 -0400
> On Tue, Oct 11, 2011 at 03:16:16PM -0400, John W. Linville wrote:
>> commit bfb3780bc9b622422c1f0d3e12371a70863000da
>>
>> Dave,
>>
>> Here is another wireless batch intended for 3.2... Highlights include a
>> bluetooth pull with some refactoring, a big pull of ath6kl updates, a
>> flurry of mac80211 patches from Johannes, and the usual strong ath9k
>> showing.
>>
>> Please let me know if there are problems!
>
> There was a problem -- a warning in ath6kl. Sorry about that!
>
> commit 094daf7db7c47861009899ce23f9177d761e20b0
I made sure I got the most recent changes.
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
* Re: [net-next 1/5] stmmac: add CHAINED descriptor mode support
From: David Miller @ 2011-10-11 19:42 UTC (permalink / raw)
To: peppe.cavallaro; +Cc: netdev, rayagond
In-Reply-To: <1318318246-1326-2-git-send-email-peppe.cavallaro@st.com>
From: Giuseppe CAVALLARO <peppe.cavallaro@st.com>
Date: Tue, 11 Oct 2011 09:30:42 +0200
> From: Rayagond Kokatanur <rayagond@vayavyalabs.com>
>
> This patch enhances the STMMAC driver to support CHAINED mode of
> descriptor (useful also on validation side).
>
> STMMAC supports DMA descriptor to operate both in dual buffer(RING)
> and linked-list(CHAINED) mode. In RING mode (default) each descriptor
> points to two data buffer pointers whereas in CHAINED mode they point
> to only one data buffer pointer.
>
> In CHAINED mode each descriptor will have pointer to next descriptor in
> the list, hence creating the explicit chaining in the descriptor itself,
> whereas such explicit chaining is not possible in RING mode.
>
> Signed-off-by: Rayagond Kokatanur <rayagond@vayavyalabs.com>
> Hacked-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
These ifdefs added all over the place in the foo.c files are terrible.
Abstract out the differences between RING and CHAINED mode into helper
inline routines which live in some foo.h header file, that way you won't
need any ifdefs in the driver foo.c files.
^ permalink raw reply
* Re: pull request: wireless-next 2011-10-11
From: David Miller @ 2011-10-11 19:40 UTC (permalink / raw)
To: linville; +Cc: linux-wireless, netdev
In-Reply-To: <20111011191616.GF6558@tuxdriver.com>
From: "John W. Linville" <linville@tuxdriver.com>
Date: Tue, 11 Oct 2011 15:16:16 -0400
> Here is another wireless batch intended for 3.2... Highlights include a
> bluetooth pull with some refactoring, a big pull of ath6kl updates, a
> flurry of mac80211 patches from Johannes, and the usual strong ath9k
> showing.
>
> Please let me know if there are problems!
Pulled, thanks John.
^ permalink raw reply
* Re: pull request: wireless-next 2011-10-11
From: John W. Linville @ 2011-10-11 19:38 UTC (permalink / raw)
To: davem-fT/PcQaiUtIeIZ0/mPfg9Q
Cc: linux-wireless-u79uwXL29TY76Z2rM5mHXA,
netdev-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <20111011191616.GF6558-2XuSBdqkA4R54TAoqtyWWQ@public.gmane.org>
[-- Attachment #1: Type: text/plain, Size: 19505 bytes --]
On Tue, Oct 11, 2011 at 03:16:16PM -0400, John W. Linville wrote:
> commit bfb3780bc9b622422c1f0d3e12371a70863000da
>
> Dave,
>
> Here is another wireless batch intended for 3.2... Highlights include a
> bluetooth pull with some refactoring, a big pull of ath6kl updates, a
> flurry of mac80211 patches from Johannes, and the usual strong ath9k
> showing.
>
> Please let me know if there are problems!
There was a problem -- a warning in ath6kl. Sorry about that!
commit 094daf7db7c47861009899ce23f9177d761e20b0
Dave,
Here is another wireless batch intended for 3.2... Highlights include a
bluetooth pull with some refactoring, a big pull of ath6kl updates, a
flurry of mac80211 patches from Johannes, and the usual strong ath9k
showing.
Please let me know if there are problems!
Thanks,
John
P.S. This version correct a warning due to some merge damage in
ath6kl...
---
The following changes since commit 3ed6f6958c0ac21958285d8648f14d34da4bbcb3:
ll_temac: convert to SKB paged frag API. (2011-10-10 15:19:13 -0400)
are available in the git repository at:
git://git.infradead.org/users/linville/wireless-next.git for-davem
Amitkumar Karwar (5):
mwifiex: remove unnecessary mwifiex_dump_station_info() call
mwifiex: remove unreachable code
mwifiex: fix Tx data rate display issue
mwifiex: correct AMSDU aggregation check
mwifiex: handle an error path correctly
Anderson Lizardo (1):
Bluetooth: use recommended LE connection parameters
Andre Guedes (1):
Bluetooth: hci_le_adv_report_evt code refactoring
Andy Shevchenko (1):
wireless: at76c50x: use native hex_pack_byte() method
Arik Nemtsov (5):
nl80211: support sending TDLS commands/frames
mac80211: standardize adding supported rates IEs
mac80211: handle TDLS high-level commands and frames
nl80211/mac80211: allow adding TDLS peers as stations
mac80211: data path modification for TDLS peers
Daniel Drake (1):
libertas: detect TX lockups and reset hardware
Don Fry (1):
iwlagn: rename iwlagn module iwlwifi and alias to iwlagn.
Edward Lu (4):
ath6kl: Support channel set request for startscan command
ath6kl: Fix a typo in ath6k context
ath6kl: Fix default key installation in AP mode
ath6kl: Do not clear CONNECT bit setting in AP mode for STA disconnect
Eliad Peller (1):
mac80211: pass vif param to conf_tx() callback
Greg Dietsche (1):
iwlagn: iwl-agn-rs: remove unnecessary null check for sta and lq_sta
Helmut Schaa (1):
mac80211: Allow noack flag overwrite for injected frames
Johannes Berg (17):
cfg80211/mac80211: apply station uAPSD parameters selectively
mac80211: let drivers inform it about per TID buffered frames
mac80211: unify TIM bit handling
mac80211: also expire filtered frames
mac80211: split PS buffers into ACs
mac80211: remove return value from add_pending_skbs
mac80211: clear more-data bit on filtered frames
mac80211: allow releasing driver-buffered frames
mac80211: implement uAPSD
mac80211: send (QoS) Null if no buffered frames
mac80211: reply only once to each PS-poll
mac80211: optimise station flags
mac80211: add missing station flags to debugfs
mac80211: explicitly notify drivers of frame release
mac80211: allow out-of-band EOSP notification
mac80211: document client powersave
mac80211: dont assign seqno to or aggregate QoS Null frames
John W. Linville (3):
Merge branch 'for-linville' of git://github.com/kvalo/ath6kl
Merge branch 'master' of git://github.com/padovan/bluetooth-next
Merge branch 'master' of git://git.infradead.org/users/linville/wireless-next into for-davem
Jouni Malinen (37):
ath6kl: Use cfg80211_inform_bss instead of cfg80211_inform_bss_frame
ath6kl: Add functionality for starting AP mode
ath6kl: Fix AP mode (Re)AssocReq IE processing
ath6kl: Delay initial group key setup in AP mode
ath6kl: Use change_station() to authorize/unauthorize STAs
ath6kl: Add new WMI commands and events for P2P
ath6kl: Implement remain_on_channel and cancel_remain_on_channel
ath6kl: Implement mgmt_tx
ath6kl: Request P2P capabilities during target init
ath6kl: Add cfg80211 calls for remain-on-channel events
ath6kl: Use set_appie command to add Probe Request IEs
ath6kl: Report received Probe Request frames to cfg80211
ath6kl: Notify cfg80211 of TX status of mgmt_tx frames
ath6kl: Report received Action frames to cfg80211
ath6kl: Advertise supported mgmt_stypes
ath6kl: Add support for new P2P iftypes in mode changes
ath6kl: Include P2P IE(s) in GO Probe Response depending on request
ath6kl: Return error from wmi.c instead of -EIO in ath6kl_cfg80211_scan
ath6kl: Define __CHECK_ENDIAN__ for sparse
ath6kl: Do not enable Probe Request reporting by default
athk6l: Fix channel list processing in scan requests
ath6kl: Fix WMI message structure for AP_SET_PVB
ath6kl: Fix AP mode connect event parsing and TIM updates
ath6kl: Allow AP mode to be configured
ath6kl: Allow enabling of P2P support
ath6kl: Fix static WEP configuration in AP mode
ath6kl: Fix BSS update on roaming
ath6kl: Remove deprecated WMI_OPT_RX_FRAME_EVENTID processing
ath6kl: Remove RSSI update for internal node table
ath6kl: Remove unnecessary node table update on disconnect event
ath6kl: Replace internal node table with cfg80211 BSS table
ath6kl: Remove the unused node table implementation
ath6kl: Remove unnecessary bssinfo event header conversion
ath6kl: Update BSS information after connection
ath6kl: Export beacon interval and DTIM period through STA info
ath6kl: Report PMKSA candidate events through cfg80211
ath6kl: fix TCP corruption
Kalle Valo (28):
ath6kl: fix indentation in htc_issued_send()
ath6kl: implement suspend support
ath6kl: add testmode support
ath6kl: fix compilation when NL80211_TESTMODE is disabled
ath6kl: add firmware log support
ath6kl: implement support to set firmware log parameters
ath6kl: cleanup diagnose window read and write functions
ath6kl: read fwlog from firmware ring buffer
ath6kl: unify tx function names in htc.c
ath6kl: unify rx function naming in htc.c
ath6kl: separate firmware fetch from upload
ath6kl: fix busy loop in ath6kl_bmi_get_rx_lkahd()
ath6kl: add support for firmware API 2 format
ath6kl: refactor firmware load address code
ath6kl: refactor firmware ext data addr and reserved ram handling size
ath6kl: read firmware start address from hardware
ath6kl: read reserved ram size from firmware file
ath6kl: add firmware capabilities support
Merge remote branch 'wireless-next/master' into ath6kl-next
ath6kl: pass only unicast frames for aggregation
ath6kl: allow firmware to override firmware patch address
ath6kl: silence "invalid rate" warning
ath6kl: add prefix parameter to ath6kl_dbg_dump()
ath6kl: add sdio debug messages
ath6kl: add debug logs for booting
ath6kl: improve wmi debug messages
ath6kl: fix size_t related warnings
ath6kl: include vmalloc.h in debug.c
Kevin Fang (1):
ath6kl: Add beginning of AR6004 initialisation support
Larry Finger (2):
rtlwifi: Remove unused routine _usb_readN_sync
rtlwifi: Remove unused _usb_nbytes_read_write and _usb_writeN_sync
Lorenzo Bianconi (1):
mac80211: max_tp_rate2 management of minstrel_ht
Luis R. Rodriguez (1):
ath9k_htc: add AVM FRITZ!WLAN 11N v2 support
Mat Martineau (3):
Bluetooth: Linearize skbs for use in BNEP, CMTP, HIDP, and RFCOMM
Bluetooth: Handle fragmented skbs in bt_sock_stream_recvmsg()
Bluetooth: Perform L2CAP SDU reassembly without copying data
Mohammed Shafi Shajakhan (4):
ath9k/ath9k_htc: Fix PS wrappers for RF kill
ath9k_hw: extend GPIO pin select mask for rfkill
ath9k_hw: Fix number of GPIO pins for AR9287/9300
ath9k_hw: set pci_express capability true for AR9480
Oliver Neukum (1):
btusb: add device entry for Broadcom SoftSailing
Peter Hurley (1):
Bluetooth: Allow ACL packets over USB in HCI_RAW mode
Raja Mani (2):
ath6kl: Avoid finding bss presence in cfg80211 scan list
ath6kl: Check sme state before delivering disconnect event to cfg80211
Rajkumar Manoharan (4):
ath6kl: Fix compilation error while compiling w/o debug
ath9k: Remove unnecessary AMPDU check at tx status
ath9k: Remove redundant my beacon check at ath_rx_ps_beacon
mac80211: Send nullfunc frames at lower rate during connection monitor
Sam Leffler (1):
ath6kl: query device tree for firmware board-id
Sangwook Lee (1):
net:rfkill: add a gpio setup function into GPIO rfkill
Stephen Rothwell (1):
wireless/ath6kl: use of module_param requires the inclusion of moduleparam.h
Szymon Janc (1):
Bluetooth: Mark not declared l2cap_core functions as static
Vasanthakumar Thiagarajan (21):
ath6kl: Release ar->lock right afer updating net_stats in ath6kl_rx()
ath6kl: Minor cleanup in min_hdr_len computation
ath6kl: Cleanup ath6kl_wmi_data_hdr_remove()
ath6kl: Fix bug in computing AMSU subframe padding
ath6kl: Fix buffer alignment for scatter-gather I/O
ath6kl: Fix system freeze under heavy data load
ath6kl: Remove unused meta_v2 from ath6kl_data_tx()
ath6kl: Add wmi meta data information only it is available
ath6kl: Avoid rolling back of entire scatter setup in case of failure
ath6kl: Add initial debugfs changes
ath6kl: Add debugfs entry to dump target stats
ath6kl: Add debugfs file entry to dump credit distribution stats
ath6kl: Add debugfs interface to dump diagnostic registers from firmware
ath6kl: Fix endianness in requesting chip register read
ath6kl: Make ath6kl_diag_write32() non-static
ath6kl: Fix endianness in register write
ath6kl: Add debugfs support to write a chip register
ath6kl: Remove auth type fall back in auto authentication mode
ath6kl: Set the sme_state to disconnected in disconnect() callback
ath6kl: Fix disconnect event reporting
ath6kl: Remove unnecessary retrieval of first list entry in ath6kl_htc_tx_setup_scat_list()
Vivek Natarajan (4):
ath6kl: Add debugfs entry to modify roaming parameters.
ath6kl: Process regulatory requests from firmware.
ath6kl: deinitialise wiphy on error
ath6kl: Indicate the roaming capability of the firmware
Waldemar Rymarkiewicz (1):
Bluetooth: Fix possible NULL pointer dereference
Yogesh Ashok Powar (1):
mwifiex: add cfg80211 handlers add/del_virtual_intf
Documentation/DocBook/80211.tmpl | 11 +-
Documentation/feature-removal-schedule.txt | 9 +
drivers/bluetooth/btusb.c | 6 +-
drivers/net/wireless/Makefile | 2 +-
drivers/net/wireless/at76c50x-usb.c | 18 +-
drivers/net/wireless/ath/ath5k/mac80211-ops.c | 2 +-
drivers/net/wireless/ath/ath6kl/Makefile | 4 +-
drivers/net/wireless/ath/ath6kl/bmi.c | 23 +-
drivers/net/wireless/ath/ath6kl/bmi.h | 4 +-
drivers/net/wireless/ath/ath6kl/cfg80211.c | 894 ++++++++++++-----
drivers/net/wireless/ath/ath6kl/common.h | 83 --
drivers/net/wireless/ath/ath6kl/core.h | 145 +++-
drivers/net/wireless/ath/ath6kl/debug.c | 784 +++++++++++++++
drivers/net/wireless/ath/ath6kl/debug.h | 49 +-
drivers/net/wireless/ath/ath6kl/hif-ops.h | 5 +
drivers/net/wireless/ath/ath6kl/hif.h | 1 +
drivers/net/wireless/ath/ath6kl/htc.c | 271 +++---
drivers/net/wireless/ath/ath6kl/init.c | 794 ++++++++++++----
drivers/net/wireless/ath/ath6kl/main.c | 448 ++++++---
drivers/net/wireless/ath/ath6kl/node.c | 234 -----
drivers/net/wireless/ath/ath6kl/sdio.c | 79 ++-
drivers/net/wireless/ath/ath6kl/target.h | 41 +-
drivers/net/wireless/ath/ath6kl/testmode.c | 167 ++++
drivers/net/wireless/ath/ath6kl/testmode.h | 36 +
drivers/net/wireless/ath/ath6kl/txrx.c | 61 +-
drivers/net/wireless/ath/ath6kl/wmi.c | 1126 +++++++++++++++-------
drivers/net/wireless/ath/ath6kl/wmi.h | 350 ++++++-
drivers/net/wireless/ath/ath9k/ath9k.h | 3 +-
drivers/net/wireless/ath/ath9k/eeprom.h | 7 +-
drivers/net/wireless/ath/ath9k/gpio.c | 7 +-
drivers/net/wireless/ath/ath9k/hif_usb.c | 1 +
drivers/net/wireless/ath/ath9k/htc_drv_gpio.c | 10 +-
drivers/net/wireless/ath/ath9k/htc_drv_main.c | 3 +-
drivers/net/wireless/ath/ath9k/hw.c | 11 +-
drivers/net/wireless/ath/ath9k/main.c | 6 +-
drivers/net/wireless/ath/ath9k/rc.c | 6 -
drivers/net/wireless/ath/ath9k/recv.c | 23 +-
drivers/net/wireless/ath/ath9k/xmit.c | 19 +-
drivers/net/wireless/ath/carl9170/main.c | 3 +-
drivers/net/wireless/b43/main.c | 3 +-
drivers/net/wireless/b43legacy/main.c | 3 +-
drivers/net/wireless/iwlegacy/iwl-4965-tx.c | 2 +-
drivers/net/wireless/iwlegacy/iwl-core.c | 3 +-
drivers/net/wireless/iwlegacy/iwl-core.h | 3 +-
drivers/net/wireless/iwlwifi/Kconfig | 22 +-
drivers/net/wireless/iwlwifi/Makefile | 40 +-
drivers/net/wireless/iwlwifi/iwl-agn-rs.c | 3 -
drivers/net/wireless/iwlwifi/iwl-agn-tx.c | 2 +-
drivers/net/wireless/iwlwifi/iwl-agn.c | 1 +
drivers/net/wireless/iwlwifi/iwl-core.c | 5 +-
drivers/net/wireless/iwlwifi/iwl-core.h | 3 +-
drivers/net/wireless/iwlwifi/iwl-shared.h | 2 +-
drivers/net/wireless/libertas/dev.h | 1 +
drivers/net/wireless/libertas/main.c | 35 +
drivers/net/wireless/mac80211_hwsim.c | 3 +-
drivers/net/wireless/mwifiex/11n_aggr.c | 2 -
drivers/net/wireless/mwifiex/11n_aggr.h | 1 +
drivers/net/wireless/mwifiex/cfg80211.c | 176 +++-
drivers/net/wireless/mwifiex/cfg80211.h | 3 +-
drivers/net/wireless/mwifiex/decl.h | 8 -
drivers/net/wireless/mwifiex/init.c | 2 +-
drivers/net/wireless/mwifiex/main.c | 266 +----
drivers/net/wireless/mwifiex/main.h | 19 +-
drivers/net/wireless/mwifiex/sta_ioctl.c | 46 +-
drivers/net/wireless/mwifiex/wmm.c | 32 +-
drivers/net/wireless/mwl8k.c | 5 +-
drivers/net/wireless/p54/main.c | 3 +-
drivers/net/wireless/p54/txrx.c | 2 +-
drivers/net/wireless/rt2x00/rt2400pci.c | 5 +-
drivers/net/wireless/rt2x00/rt2800lib.c | 5 +-
drivers/net/wireless/rt2x00/rt2800lib.h | 3 +-
drivers/net/wireless/rt2x00/rt2x00.h | 3 +-
drivers/net/wireless/rt2x00/rt2x00mac.c | 3 +-
drivers/net/wireless/rt2x00/rt61pci.c | 5 +-
drivers/net/wireless/rt2x00/rt73usb.c | 5 +-
drivers/net/wireless/rtl818x/rtl8187/dev.c | 3 +-
drivers/net/wireless/rtlwifi/core.c | 3 +-
drivers/net/wireless/rtlwifi/usb.c | 40 -
drivers/net/wireless/rtlwifi/wifi.h | 8 +-
drivers/net/wireless/wl1251/main.c | 3 +-
drivers/net/wireless/wl12xx/main.c | 3 +-
drivers/staging/brcm80211/brcmsmac/mac80211_if.c | 7 +-
include/linux/ieee80211.h | 85 ++
include/linux/if_ether.h | 1 +
include/linux/nl80211.h | 44 +
include/linux/rfkill-gpio.h | 4 +
include/net/bluetooth/l2cap.h | 3 +-
include/net/cfg80211.h | 29 +
include/net/ieee80211_radiotap.h | 1 +
include/net/mac80211.h | 229 +++++-
net/bluetooth/af_bluetooth.c | 30 +-
net/bluetooth/bnep/core.c | 5 +-
net/bluetooth/cmtp/core.c | 5 +-
net/bluetooth/hci_conn.c | 14 +-
net/bluetooth/hci_event.c | 20 +-
net/bluetooth/hidp/core.c | 10 +-
net/bluetooth/l2cap_core.c | 255 ++----
net/bluetooth/rfcomm/core.c | 5 +-
net/mac80211/Kconfig | 12 +
net/mac80211/agg-rx.c | 2 +-
net/mac80211/agg-tx.c | 2 +-
net/mac80211/cfg.c | 380 +++++++-
net/mac80211/debugfs_sta.c | 37 +-
net/mac80211/driver-ops.h | 33 +-
net/mac80211/driver-trace.h | 77 ++
net/mac80211/ht.c | 2 +-
net/mac80211/ibss.c | 4 +-
net/mac80211/ieee80211_i.h | 16 +-
net/mac80211/iface.c | 4 +-
net/mac80211/key.c | 4 +-
net/mac80211/main.c | 18 +
net/mac80211/mesh.c | 58 --
net/mac80211/mesh.h | 4 -
net/mac80211/mesh_plink.c | 12 +-
net/mac80211/mlme.c | 34 +-
net/mac80211/pm.c | 2 +-
net/mac80211/rate.c | 8 +-
net/mac80211/rc80211_minstrel_ht.c | 2 +
net/mac80211/rx.c | 118 ++-
net/mac80211/sta_info.c | 636 ++++++++++---
net/mac80211/sta_info.h | 136 ++--
net/mac80211/status.c | 54 +-
net/mac80211/tx.c | 187 +++--
net/mac80211/util.c | 76 ++-
net/mac80211/wme.c | 4 +-
net/rfkill/rfkill-gpio.c | 11 +
net/wireless/nl80211.c | 109 ++-
net/wireless/util.c | 5 +-
128 files changed, 6629 insertions(+), 2696 deletions(-)
delete mode 100644 drivers/net/wireless/ath/ath6kl/node.c
create mode 100644 drivers/net/wireless/ath/ath6kl/testmode.c
create mode 100644 drivers/net/wireless/ath/ath6kl/testmode.h
--
John W. Linville Someday the world will need a hero, and you
linville-2XuSBdqkA4R54TAoqtyWWQ@public.gmane.org might be all we have. Be ready.
[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply
* pull request: wireless-next 2011-10-11
From: John W. Linville @ 2011-10-11 19:16 UTC (permalink / raw)
To: davem; +Cc: linux-wireless, netdev
[-- Attachment #1: Type: text/plain, Size: 18913 bytes --]
commit bfb3780bc9b622422c1f0d3e12371a70863000da
Dave,
Here is another wireless batch intended for 3.2... Highlights include a
bluetooth pull with some refactoring, a big pull of ath6kl updates, a
flurry of mac80211 patches from Johannes, and the usual strong ath9k
showing.
Please let me know if there are problems!
Thanks,
John
---
The following changes since commit 3ed6f6958c0ac21958285d8648f14d34da4bbcb3:
ll_temac: convert to SKB paged frag API. (2011-10-10 15:19:13 -0400)
are available in the git repository at:
git://git.infradead.org/users/linville/wireless-next.git for-davem
Amitkumar Karwar (5):
mwifiex: remove unnecessary mwifiex_dump_station_info() call
mwifiex: remove unreachable code
mwifiex: fix Tx data rate display issue
mwifiex: correct AMSDU aggregation check
mwifiex: handle an error path correctly
Anderson Lizardo (1):
Bluetooth: use recommended LE connection parameters
Andre Guedes (1):
Bluetooth: hci_le_adv_report_evt code refactoring
Andy Shevchenko (1):
wireless: at76c50x: use native hex_pack_byte() method
Arik Nemtsov (5):
nl80211: support sending TDLS commands/frames
mac80211: standardize adding supported rates IEs
mac80211: handle TDLS high-level commands and frames
nl80211/mac80211: allow adding TDLS peers as stations
mac80211: data path modification for TDLS peers
Daniel Drake (1):
libertas: detect TX lockups and reset hardware
Don Fry (1):
iwlagn: rename iwlagn module iwlwifi and alias to iwlagn.
Edward Lu (4):
ath6kl: Support channel set request for startscan command
ath6kl: Fix a typo in ath6k context
ath6kl: Fix default key installation in AP mode
ath6kl: Do not clear CONNECT bit setting in AP mode for STA disconnect
Eliad Peller (1):
mac80211: pass vif param to conf_tx() callback
Greg Dietsche (1):
iwlagn: iwl-agn-rs: remove unnecessary null check for sta and lq_sta
Helmut Schaa (1):
mac80211: Allow noack flag overwrite for injected frames
Johannes Berg (17):
cfg80211/mac80211: apply station uAPSD parameters selectively
mac80211: let drivers inform it about per TID buffered frames
mac80211: unify TIM bit handling
mac80211: also expire filtered frames
mac80211: split PS buffers into ACs
mac80211: remove return value from add_pending_skbs
mac80211: clear more-data bit on filtered frames
mac80211: allow releasing driver-buffered frames
mac80211: implement uAPSD
mac80211: send (QoS) Null if no buffered frames
mac80211: reply only once to each PS-poll
mac80211: optimise station flags
mac80211: add missing station flags to debugfs
mac80211: explicitly notify drivers of frame release
mac80211: allow out-of-band EOSP notification
mac80211: document client powersave
mac80211: dont assign seqno to or aggregate QoS Null frames
John W. Linville (3):
Merge branch 'for-linville' of git://github.com/kvalo/ath6kl
Merge branch 'master' of git://github.com/padovan/bluetooth-next
Merge branch 'master' of git://git.infradead.org/users/linville/wireless-next into for-davem
Jouni Malinen (37):
ath6kl: Use cfg80211_inform_bss instead of cfg80211_inform_bss_frame
ath6kl: Add functionality for starting AP mode
ath6kl: Fix AP mode (Re)AssocReq IE processing
ath6kl: Delay initial group key setup in AP mode
ath6kl: Use change_station() to authorize/unauthorize STAs
ath6kl: Add new WMI commands and events for P2P
ath6kl: Implement remain_on_channel and cancel_remain_on_channel
ath6kl: Implement mgmt_tx
ath6kl: Request P2P capabilities during target init
ath6kl: Add cfg80211 calls for remain-on-channel events
ath6kl: Use set_appie command to add Probe Request IEs
ath6kl: Report received Probe Request frames to cfg80211
ath6kl: Notify cfg80211 of TX status of mgmt_tx frames
ath6kl: Report received Action frames to cfg80211
ath6kl: Advertise supported mgmt_stypes
ath6kl: Add support for new P2P iftypes in mode changes
ath6kl: Include P2P IE(s) in GO Probe Response depending on request
ath6kl: Return error from wmi.c instead of -EIO in ath6kl_cfg80211_scan
ath6kl: Define __CHECK_ENDIAN__ for sparse
ath6kl: Do not enable Probe Request reporting by default
athk6l: Fix channel list processing in scan requests
ath6kl: Fix WMI message structure for AP_SET_PVB
ath6kl: Fix AP mode connect event parsing and TIM updates
ath6kl: Allow AP mode to be configured
ath6kl: Allow enabling of P2P support
ath6kl: Fix static WEP configuration in AP mode
ath6kl: Fix BSS update on roaming
ath6kl: Remove deprecated WMI_OPT_RX_FRAME_EVENTID processing
ath6kl: Remove RSSI update for internal node table
ath6kl: Remove unnecessary node table update on disconnect event
ath6kl: Replace internal node table with cfg80211 BSS table
ath6kl: Remove the unused node table implementation
ath6kl: Remove unnecessary bssinfo event header conversion
ath6kl: Update BSS information after connection
ath6kl: Export beacon interval and DTIM period through STA info
ath6kl: Report PMKSA candidate events through cfg80211
ath6kl: fix TCP corruption
Kalle Valo (28):
ath6kl: fix indentation in htc_issued_send()
ath6kl: implement suspend support
ath6kl: add testmode support
ath6kl: fix compilation when NL80211_TESTMODE is disabled
ath6kl: add firmware log support
ath6kl: implement support to set firmware log parameters
ath6kl: cleanup diagnose window read and write functions
ath6kl: read fwlog from firmware ring buffer
ath6kl: unify tx function names in htc.c
ath6kl: unify rx function naming in htc.c
ath6kl: separate firmware fetch from upload
ath6kl: fix busy loop in ath6kl_bmi_get_rx_lkahd()
ath6kl: add support for firmware API 2 format
ath6kl: refactor firmware load address code
ath6kl: refactor firmware ext data addr and reserved ram handling size
ath6kl: read firmware start address from hardware
ath6kl: read reserved ram size from firmware file
ath6kl: add firmware capabilities support
Merge remote branch 'wireless-next/master' into ath6kl-next
ath6kl: pass only unicast frames for aggregation
ath6kl: allow firmware to override firmware patch address
ath6kl: silence "invalid rate" warning
ath6kl: add prefix parameter to ath6kl_dbg_dump()
ath6kl: add sdio debug messages
ath6kl: add debug logs for booting
ath6kl: improve wmi debug messages
ath6kl: fix size_t related warnings
ath6kl: include vmalloc.h in debug.c
Kevin Fang (1):
ath6kl: Add beginning of AR6004 initialisation support
Larry Finger (2):
rtlwifi: Remove unused routine _usb_readN_sync
rtlwifi: Remove unused _usb_nbytes_read_write and _usb_writeN_sync
Lorenzo Bianconi (1):
mac80211: max_tp_rate2 management of minstrel_ht
Luis R. Rodriguez (1):
ath9k_htc: add AVM FRITZ!WLAN 11N v2 support
Mat Martineau (3):
Bluetooth: Linearize skbs for use in BNEP, CMTP, HIDP, and RFCOMM
Bluetooth: Handle fragmented skbs in bt_sock_stream_recvmsg()
Bluetooth: Perform L2CAP SDU reassembly without copying data
Mohammed Shafi Shajakhan (4):
ath9k/ath9k_htc: Fix PS wrappers for RF kill
ath9k_hw: extend GPIO pin select mask for rfkill
ath9k_hw: Fix number of GPIO pins for AR9287/9300
ath9k_hw: set pci_express capability true for AR9480
Oliver Neukum (1):
btusb: add device entry for Broadcom SoftSailing
Peter Hurley (1):
Bluetooth: Allow ACL packets over USB in HCI_RAW mode
Raja Mani (2):
ath6kl: Avoid finding bss presence in cfg80211 scan list
ath6kl: Check sme state before delivering disconnect event to cfg80211
Rajkumar Manoharan (4):
ath6kl: Fix compilation error while compiling w/o debug
ath9k: Remove unnecessary AMPDU check at tx status
ath9k: Remove redundant my beacon check at ath_rx_ps_beacon
mac80211: Send nullfunc frames at lower rate during connection monitor
Sam Leffler (1):
ath6kl: query device tree for firmware board-id
Sangwook Lee (1):
net:rfkill: add a gpio setup function into GPIO rfkill
Stephen Rothwell (1):
wireless/ath6kl: use of module_param requires the inclusion of moduleparam.h
Szymon Janc (1):
Bluetooth: Mark not declared l2cap_core functions as static
Vasanthakumar Thiagarajan (21):
ath6kl: Release ar->lock right afer updating net_stats in ath6kl_rx()
ath6kl: Minor cleanup in min_hdr_len computation
ath6kl: Cleanup ath6kl_wmi_data_hdr_remove()
ath6kl: Fix bug in computing AMSU subframe padding
ath6kl: Fix buffer alignment for scatter-gather I/O
ath6kl: Fix system freeze under heavy data load
ath6kl: Remove unused meta_v2 from ath6kl_data_tx()
ath6kl: Add wmi meta data information only it is available
ath6kl: Avoid rolling back of entire scatter setup in case of failure
ath6kl: Add initial debugfs changes
ath6kl: Add debugfs entry to dump target stats
ath6kl: Add debugfs file entry to dump credit distribution stats
ath6kl: Add debugfs interface to dump diagnostic registers from firmware
ath6kl: Fix endianness in requesting chip register read
ath6kl: Make ath6kl_diag_write32() non-static
ath6kl: Fix endianness in register write
ath6kl: Add debugfs support to write a chip register
ath6kl: Remove auth type fall back in auto authentication mode
ath6kl: Set the sme_state to disconnected in disconnect() callback
ath6kl: Fix disconnect event reporting
ath6kl: Remove unnecessary retrieval of first list entry in ath6kl_htc_tx_setup_scat_list()
Vivek Natarajan (4):
ath6kl: Add debugfs entry to modify roaming parameters.
ath6kl: Process regulatory requests from firmware.
ath6kl: deinitialise wiphy on error
ath6kl: Indicate the roaming capability of the firmware
Waldemar Rymarkiewicz (1):
Bluetooth: Fix possible NULL pointer dereference
Yogesh Ashok Powar (1):
mwifiex: add cfg80211 handlers add/del_virtual_intf
Documentation/DocBook/80211.tmpl | 11 +-
Documentation/feature-removal-schedule.txt | 9 +
drivers/bluetooth/btusb.c | 6 +-
drivers/net/wireless/Makefile | 2 +-
drivers/net/wireless/at76c50x-usb.c | 18 +-
drivers/net/wireless/ath/ath5k/mac80211-ops.c | 2 +-
drivers/net/wireless/ath/ath6kl/Makefile | 4 +-
drivers/net/wireless/ath/ath6kl/bmi.c | 23 +-
drivers/net/wireless/ath/ath6kl/bmi.h | 4 +-
drivers/net/wireless/ath/ath6kl/cfg80211.c | 894 ++++++++++++-----
drivers/net/wireless/ath/ath6kl/common.h | 83 --
drivers/net/wireless/ath/ath6kl/core.h | 145 +++-
drivers/net/wireless/ath/ath6kl/debug.c | 784 +++++++++++++++
drivers/net/wireless/ath/ath6kl/debug.h | 49 +-
drivers/net/wireless/ath/ath6kl/hif-ops.h | 5 +
drivers/net/wireless/ath/ath6kl/hif.h | 1 +
drivers/net/wireless/ath/ath6kl/htc.c | 271 +++---
drivers/net/wireless/ath/ath6kl/init.c | 794 ++++++++++++----
drivers/net/wireless/ath/ath6kl/main.c | 448 ++++++---
drivers/net/wireless/ath/ath6kl/node.c | 234 -----
drivers/net/wireless/ath/ath6kl/sdio.c | 79 ++-
drivers/net/wireless/ath/ath6kl/target.h | 41 +-
drivers/net/wireless/ath/ath6kl/testmode.c | 167 ++++
drivers/net/wireless/ath/ath6kl/testmode.h | 36 +
drivers/net/wireless/ath/ath6kl/txrx.c | 61 +-
drivers/net/wireless/ath/ath6kl/wmi.c | 1126 +++++++++++++++-------
drivers/net/wireless/ath/ath6kl/wmi.h | 350 ++++++-
drivers/net/wireless/ath/ath9k/ath9k.h | 3 +-
drivers/net/wireless/ath/ath9k/eeprom.h | 7 +-
drivers/net/wireless/ath/ath9k/gpio.c | 7 +-
drivers/net/wireless/ath/ath9k/hif_usb.c | 1 +
drivers/net/wireless/ath/ath9k/htc_drv_gpio.c | 10 +-
drivers/net/wireless/ath/ath9k/htc_drv_main.c | 3 +-
drivers/net/wireless/ath/ath9k/hw.c | 11 +-
drivers/net/wireless/ath/ath9k/main.c | 6 +-
drivers/net/wireless/ath/ath9k/rc.c | 6 -
drivers/net/wireless/ath/ath9k/recv.c | 23 +-
drivers/net/wireless/ath/ath9k/xmit.c | 19 +-
drivers/net/wireless/ath/carl9170/main.c | 3 +-
drivers/net/wireless/b43/main.c | 3 +-
drivers/net/wireless/b43legacy/main.c | 3 +-
drivers/net/wireless/iwlegacy/iwl-4965-tx.c | 2 +-
drivers/net/wireless/iwlegacy/iwl-core.c | 3 +-
drivers/net/wireless/iwlegacy/iwl-core.h | 3 +-
drivers/net/wireless/iwlwifi/Kconfig | 22 +-
drivers/net/wireless/iwlwifi/Makefile | 40 +-
drivers/net/wireless/iwlwifi/iwl-agn-rs.c | 3 -
drivers/net/wireless/iwlwifi/iwl-agn-tx.c | 2 +-
drivers/net/wireless/iwlwifi/iwl-agn.c | 1 +
drivers/net/wireless/iwlwifi/iwl-core.c | 5 +-
drivers/net/wireless/iwlwifi/iwl-core.h | 3 +-
drivers/net/wireless/iwlwifi/iwl-shared.h | 2 +-
drivers/net/wireless/libertas/dev.h | 1 +
drivers/net/wireless/libertas/main.c | 35 +
drivers/net/wireless/mac80211_hwsim.c | 3 +-
drivers/net/wireless/mwifiex/11n_aggr.c | 2 -
drivers/net/wireless/mwifiex/11n_aggr.h | 1 +
drivers/net/wireless/mwifiex/cfg80211.c | 176 +++-
drivers/net/wireless/mwifiex/cfg80211.h | 3 +-
drivers/net/wireless/mwifiex/decl.h | 8 -
drivers/net/wireless/mwifiex/init.c | 2 +-
drivers/net/wireless/mwifiex/main.c | 266 +----
drivers/net/wireless/mwifiex/main.h | 19 +-
drivers/net/wireless/mwifiex/sta_ioctl.c | 46 +-
drivers/net/wireless/mwifiex/wmm.c | 32 +-
drivers/net/wireless/mwl8k.c | 5 +-
drivers/net/wireless/p54/main.c | 3 +-
drivers/net/wireless/p54/txrx.c | 2 +-
drivers/net/wireless/rt2x00/rt2400pci.c | 5 +-
drivers/net/wireless/rt2x00/rt2800lib.c | 5 +-
drivers/net/wireless/rt2x00/rt2800lib.h | 3 +-
drivers/net/wireless/rt2x00/rt2x00.h | 3 +-
drivers/net/wireless/rt2x00/rt2x00mac.c | 3 +-
drivers/net/wireless/rt2x00/rt61pci.c | 5 +-
drivers/net/wireless/rt2x00/rt73usb.c | 5 +-
drivers/net/wireless/rtl818x/rtl8187/dev.c | 3 +-
drivers/net/wireless/rtlwifi/core.c | 3 +-
drivers/net/wireless/rtlwifi/usb.c | 40 -
drivers/net/wireless/rtlwifi/wifi.h | 8 +-
drivers/net/wireless/wl1251/main.c | 3 +-
drivers/net/wireless/wl12xx/main.c | 3 +-
drivers/staging/brcm80211/brcmsmac/mac80211_if.c | 7 +-
include/linux/ieee80211.h | 85 ++
include/linux/if_ether.h | 1 +
include/linux/nl80211.h | 44 +
include/linux/rfkill-gpio.h | 4 +
include/net/bluetooth/l2cap.h | 3 +-
include/net/cfg80211.h | 29 +
include/net/ieee80211_radiotap.h | 1 +
include/net/mac80211.h | 229 +++++-
net/bluetooth/af_bluetooth.c | 30 +-
net/bluetooth/bnep/core.c | 5 +-
net/bluetooth/cmtp/core.c | 5 +-
net/bluetooth/hci_conn.c | 14 +-
net/bluetooth/hci_event.c | 20 +-
net/bluetooth/hidp/core.c | 10 +-
net/bluetooth/l2cap_core.c | 255 ++----
net/bluetooth/rfcomm/core.c | 5 +-
net/mac80211/Kconfig | 12 +
net/mac80211/agg-rx.c | 2 +-
net/mac80211/agg-tx.c | 2 +-
net/mac80211/cfg.c | 380 +++++++-
net/mac80211/debugfs_sta.c | 37 +-
net/mac80211/driver-ops.h | 33 +-
net/mac80211/driver-trace.h | 77 ++
net/mac80211/ht.c | 2 +-
net/mac80211/ibss.c | 4 +-
net/mac80211/ieee80211_i.h | 16 +-
net/mac80211/iface.c | 4 +-
net/mac80211/key.c | 4 +-
net/mac80211/main.c | 18 +
net/mac80211/mesh.c | 58 --
net/mac80211/mesh.h | 4 -
net/mac80211/mesh_plink.c | 12 +-
net/mac80211/mlme.c | 34 +-
net/mac80211/pm.c | 2 +-
net/mac80211/rate.c | 8 +-
net/mac80211/rc80211_minstrel_ht.c | 2 +
net/mac80211/rx.c | 118 ++-
net/mac80211/sta_info.c | 636 ++++++++++---
net/mac80211/sta_info.h | 136 ++--
net/mac80211/status.c | 54 +-
net/mac80211/tx.c | 187 +++--
net/mac80211/util.c | 76 ++-
net/mac80211/wme.c | 4 +-
net/rfkill/rfkill-gpio.c | 11 +
net/wireless/nl80211.c | 109 ++-
net/wireless/util.c | 5 +-
128 files changed, 6629 insertions(+), 2696 deletions(-)
delete mode 100644 drivers/net/wireless/ath/ath6kl/node.c
create mode 100644 drivers/net/wireless/ath/ath6kl/testmode.c
create mode 100644 drivers/net/wireless/ath/ath6kl/testmode.h
--
John W. Linville Someday the world will need a hero, and you
linville@tuxdriver.com might be all we have. Be ready.
[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply
* Re: [net-next 00/11 v2][pull request] Intel Wired LAN Driver Updates
From: David Miller @ 2011-10-11 19:25 UTC (permalink / raw)
To: jeffrey.t.kirsher; +Cc: netdev, gospo, sassmann
In-Reply-To: <1318347952-25068-1-git-send-email-jeffrey.t.kirsher@intel.com>
From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Date: Tue, 11 Oct 2011 08:45:41 -0700
> The following series contains updates to e1000e and igb. This
> version of the series contains the following changes:
>
> - Added the e1000e bug fix patch
> - Dropped the igb patch "igb: Use node specific allocations for
> the q_vectors and rings" based on feedback
>
> Based on the feedback, I am working on re-working the igb patch that
> was dropped in this series and will re-submit it later on.
>
> The remain 10 igb patches are unchanged from the previous pull request
> and are the continuation of the cleanups and refactoring that Alex has done.
> After this series there are 4-5 more patches to complete the work
> that Alex has done on igb.
>
> The following are changes since commit 3ed6f6958c0ac21958285d8648f14d34da4bbcb3:
> ll_temac: convert to SKB paged frag API.
> and are available in the git repository at
> git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-next.git
Pulled, thanks Jeff.
^ permalink raw reply
* Re: big picture UDP/IP performance question re 2.6.18 -> 2.6.32
From: Chris Friesen @ 2011-10-11 16:24 UTC (permalink / raw)
To: Eric Dumazet
Cc: starlight, linux-kernel, netdev, Peter Zijlstra,
Christoph Lameter, Willy Tarreau, Ingo Molnar, Stephen Hemminger,
Benjamin LaHaise, Joe Perches, Chetan Loke, Con Kolivas,
Serge Belyshev
In-Reply-To: <1317966007.3457.47.camel@edumazet-laptop>
On 10/06/2011 11:40 PM, Eric Dumazet wrote:
> Le jeudi 06 octobre 2011 à 23:27 -0400, starlight@binnacle.cx a écrit :
>> If the older kernels are switching to NAPI
>> for much of surge and the switching out
>> once the pulse falls off, it might
>> conceivably result in much better latency
>> and overall performance.
> Thats exactly the opposite : Your old kernel is not fast enough to
> enter/exit NAPI on every incoming frame.
>
> Instead of one IRQ per incoming frame, you have less interrupts :
> A napi run processes more than 1 frame.
>
> Now increase your incoming rate, and you'll discover a new kernel will
> be able to process more frames without losses.
I wonder if it would make sense to adjust the interrupt mitigation
parameters in the NIC to allow it to accumulate a few packets before
interrupting the CPU. We had good luck using this to reduce interrupt
rate on a quasi-pathological case where we were bouncing in and out of
NAPI because we were *just* fast enough to keep up with incoming packets.
Chris
--
Chris Friesen
Software Developer
GENBAND
chris.friesen@genband.com
www.genband.com
^ permalink raw reply
* Re: [PATCH] bonding: L2L3 xmit doesn't support IPv6
From: Jay Vosburgh @ 2011-10-11 15:58 UTC (permalink / raw)
To: Andy Gospodarek; +Cc: Yinglin Sun, netdev
In-Reply-To: <20111011143348.GA20605@gospo.rdu.redhat.com>
Andy Gospodarek <andy@greyhouse.net> wrote:
>On Fri, Oct 07, 2011 at 10:36:45PM -0700, Yinglin Sun wrote:
>> Add IPv6 support in L2L3 xmit policy.
>> L3L4 doesn't support IPv6 either, and I'll try to fix that later.
>>
>> Signed-off-by: Yinglin Sun <Yinglin.Sun@emc.com>
>> ---
>> drivers/net/bonding/bond_main.c | 7 +++++++
>> 1 files changed, 7 insertions(+), 0 deletions(-)
>>
>> diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
>> index 6d79b78..d6fd282 100644
>> --- a/drivers/net/bonding/bond_main.c
>> +++ b/drivers/net/bonding/bond_main.c
>> @@ -41,8 +41,10 @@
>> #include <linux/ptrace.h>
>> #include <linux/ioport.h>
>> #include <linux/in.h>
>> +#include <linux/in6.h>
>> #include <net/ip.h>
>> #include <linux/ip.h>
>> +#include <linux/ipv6.h>
>> #include <linux/tcp.h>
>> #include <linux/udp.h>
>> #include <linux/slab.h>
>> @@ -3372,10 +3374,15 @@ static int bond_xmit_hash_policy_l23(struct sk_buff *skb, int count)
>> {
>> struct ethhdr *data = (struct ethhdr *)skb->data;
>> struct iphdr *iph = ip_hdr(skb);
>> + struct ipv6hdr *ipv6h = ipv6_hdr(skb);
>>
>> if (skb->protocol == htons(ETH_P_IP)) {
>> return ((ntohl(iph->saddr ^ iph->daddr) & 0xffff) ^
>> (data->h_dest[5] ^ data->h_source[5])) % count;
>> + } else if (skb->protocol == htons(ETH_P_IPV6)) {
>> + return ((ntohl(ipv6h->saddr.s6_addr32[3] ^
>> + ipv6h->daddr.s6_addr32[3]) & 0xffff) ^
>> + (data->h_dest[5] ^ data->h_source[5])) % count;
>> }
>>
>
>There have been some attempts to add support for ipv6 hashing this in
>the past, but none have been committed. The best one I had seen was one
>that did some extensive testing one a wide variety of ipv6 traffic and
>it showed nice traffic distribution. I'm not sure if it was ever posted
>upstream, so I will see if I can dig it up.
>
>Can you quantify how traffic was distributed with this algorithm?
As I recall, the IPv6 issues had to do with the "layer3+4" hash,
because the IPv6 TCP or UDP port numbers can be harder to get at than in
IPv4 (which typically has a fixed size header). The above is just for
layer 2, so it only hits the IPv6 addresses, which don't move around.
That said, I believe that many IPv6 addresses are derived from
the MAC address, the autoconf addresses in particular, so s6_addr32[3]
may not show a lot more variation than just the MAC address. I don't
know for sure though, since I haven't tested it.
I don't recall seeing the patch you mention, Andy, that checks
ipv6 traffic; can you post it?
-J
---
-Jay Vosburgh, IBM Linux Technology Center, fubar@us.ibm.com
^ permalink raw reply
* [net-next 10/11] igb: move TX hang check flag into ring->flags
From: Jeff Kirsher @ 2011-10-11 15:45 UTC (permalink / raw)
To: davem; +Cc: Alexander Duyck, netdev, gospo, sassmann, Jeff Kirsher
In-Reply-To: <1318347952-25068-1-git-send-email-jeffrey.t.kirsher@intel.com>
From: Alexander Duyck <alexander.h.duyck@intel.com>
This change moves the Tx hang check into the ring flags.
Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
drivers/net/ethernet/intel/igb/igb.h | 1 -
drivers/net/ethernet/intel/igb/igb_main.c | 6 +++---
2 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/net/ethernet/intel/igb/igb.h b/drivers/net/ethernet/intel/igb/igb.h
index 04dd6d7..5def94c 100644
--- a/drivers/net/ethernet/intel/igb/igb.h
+++ b/drivers/net/ethernet/intel/igb/igb.h
@@ -230,7 +230,6 @@ struct igb_ring {
struct igb_tx_queue_stats tx_stats;
struct u64_stats_sync tx_syncp;
struct u64_stats_sync tx_syncp2;
- bool detect_tx_hung;
};
/* RX */
struct {
diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c
index 689c2c2..c4c3acf 100644
--- a/drivers/net/ethernet/intel/igb/igb_main.c
+++ b/drivers/net/ethernet/intel/igb/igb_main.c
@@ -3684,7 +3684,7 @@ static void igb_watchdog_task(struct work_struct *work)
}
/* Force detection of hung controller every watchdog period */
- tx_ring->detect_tx_hung = true;
+ set_bit(IGB_RING_FLAG_TX_DETECT_HANG, &tx_ring->flags);
}
/* Cause software interrupt to ensure rx ring is cleaned */
@@ -5651,14 +5651,14 @@ static bool igb_clean_tx_irq(struct igb_q_vector *q_vector)
q_vector->tx.total_bytes += total_bytes;
q_vector->tx.total_packets += total_packets;
- if (tx_ring->detect_tx_hung) {
+ if (test_bit(IGB_RING_FLAG_TX_DETECT_HANG, &tx_ring->flags)) {
struct e1000_hw *hw = &adapter->hw;
eop_desc = tx_buffer->next_to_watch;
/* Detect a transmit hang in hardware, this serializes the
* check with the clearing of time_stamp and movement of i */
- tx_ring->detect_tx_hung = false;
+ clear_bit(IGB_RING_FLAG_TX_DETECT_HANG, &tx_ring->flags);
if (eop_desc &&
time_after(jiffies, tx_buffer->time_stamp +
(adapter->tx_timeout_factor * HZ)) &&
--
1.7.6.4
^ permalink raw reply related
* [net-next 11/11] igb: add support for NETIF_F_RXHASH
From: Jeff Kirsher @ 2011-10-11 15:45 UTC (permalink / raw)
To: davem; +Cc: Alexander Duyck, netdev, gospo, sassmann, Jeff Kirsher
In-Reply-To: <1318347952-25068-1-git-send-email-jeffrey.t.kirsher@intel.com>
From: Alexander Duyck <alexander.h.duyck@intel.com>
This patch adds support for Rx hashing.
Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
drivers/net/ethernet/intel/igb/igb_main.c | 52 +++++++++++++++++++---------
1 files changed, 35 insertions(+), 17 deletions(-)
diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c
index c4c3acf..b3a2e3d 100644
--- a/drivers/net/ethernet/intel/igb/igb_main.c
+++ b/drivers/net/ethernet/intel/igb/igb_main.c
@@ -1931,23 +1931,32 @@ static int __devinit igb_probe(struct pci_dev *pdev,
dev_info(&pdev->dev,
"PHY reset is blocked due to SOL/IDER session.\n");
- netdev->hw_features = NETIF_F_SG |
- NETIF_F_IP_CSUM |
- NETIF_F_IPV6_CSUM |
- NETIF_F_TSO |
- NETIF_F_TSO6 |
- NETIF_F_RXCSUM |
- NETIF_F_HW_VLAN_RX;
-
- netdev->features = netdev->hw_features |
- NETIF_F_HW_VLAN_TX |
- NETIF_F_HW_VLAN_FILTER;
-
- netdev->vlan_features |= NETIF_F_TSO;
- netdev->vlan_features |= NETIF_F_TSO6;
- netdev->vlan_features |= NETIF_F_IP_CSUM;
- netdev->vlan_features |= NETIF_F_IPV6_CSUM;
- netdev->vlan_features |= NETIF_F_SG;
+ /*
+ * features is initialized to 0 in allocation, it might have bits
+ * set by igb_sw_init so we should use an or instead of an
+ * assignment.
+ */
+ netdev->features |= NETIF_F_SG |
+ NETIF_F_IP_CSUM |
+ NETIF_F_IPV6_CSUM |
+ NETIF_F_TSO |
+ NETIF_F_TSO6 |
+ NETIF_F_RXHASH |
+ NETIF_F_RXCSUM |
+ NETIF_F_HW_VLAN_RX |
+ NETIF_F_HW_VLAN_TX;
+
+ /* copy netdev features into list of user selectable features */
+ netdev->hw_features |= netdev->features;
+
+ /* set this bit last since it cannot be part of hw_features */
+ netdev->features |= NETIF_F_HW_VLAN_FILTER;
+
+ netdev->vlan_features |= NETIF_F_TSO |
+ NETIF_F_TSO6 |
+ NETIF_F_IP_CSUM |
+ NETIF_F_IPV6_CSUM |
+ NETIF_F_SG;
if (pci_using_dac) {
netdev->features |= NETIF_F_HIGHDMA;
@@ -5757,6 +5766,14 @@ static inline void igb_rx_checksum(struct igb_ring *ring,
le32_to_cpu(rx_desc->wb.upper.status_error));
}
+static inline void igb_rx_hash(struct igb_ring *ring,
+ union e1000_adv_rx_desc *rx_desc,
+ struct sk_buff *skb)
+{
+ if (ring->netdev->features & NETIF_F_RXHASH)
+ skb->rxhash = le32_to_cpu(rx_desc->wb.lower.hi_dword.rss);
+}
+
static void igb_rx_hwtstamp(struct igb_q_vector *q_vector,
union e1000_adv_rx_desc *rx_desc,
struct sk_buff *skb)
@@ -5889,6 +5906,7 @@ static bool igb_clean_rx_irq(struct igb_q_vector *q_vector, int budget)
}
igb_rx_hwtstamp(q_vector, rx_desc, skb);
+ igb_rx_hash(rx_ring, rx_desc, skb);
igb_rx_checksum(rx_ring, rx_desc, skb);
if (igb_test_staterr(rx_desc, E1000_RXD_STAT_VP)) {
--
1.7.6.4
^ permalink raw reply related
* [net-next 08/11] igb: leave staterr in place and instead us a helper function to check bits
From: Jeff Kirsher @ 2011-10-11 15:45 UTC (permalink / raw)
To: davem; +Cc: Alexander Duyck, netdev, gospo, sassmann, Jeff Kirsher
In-Reply-To: <1318347952-25068-1-git-send-email-jeffrey.t.kirsher@intel.com>
From: Alexander Duyck <alexander.h.duyck@intel.com>
Instead of doing a byte swap on the staterr bits in the Rx descriptor we can
save ourselves a bit of space and some CPU time by instead just testing for
the various bits out of the RX descriptor directly.
Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
drivers/net/ethernet/intel/igb/igb.h | 7 +++
drivers/net/ethernet/intel/igb/igb_ethtool.c | 5 +--
drivers/net/ethernet/intel/igb/igb_main.c | 55 ++++++++++++++-----------
3 files changed, 39 insertions(+), 28 deletions(-)
diff --git a/drivers/net/ethernet/intel/igb/igb.h b/drivers/net/ethernet/intel/igb/igb.h
index 8a15d43..04dd6d7 100644
--- a/drivers/net/ethernet/intel/igb/igb.h
+++ b/drivers/net/ethernet/intel/igb/igb.h
@@ -257,6 +257,13 @@ enum e1000_ring_flags_t {
#define IGB_TX_CTXTDESC(R, i) \
(&(((struct e1000_adv_tx_context_desc *)((R)->desc))[i]))
+/* igb_test_staterr - tests bits within Rx descriptor status and error fields */
+static inline __le32 igb_test_staterr(union e1000_adv_rx_desc *rx_desc,
+ const u32 stat_err_bits)
+{
+ return rx_desc->wb.upper.status_error & cpu_to_le32(stat_err_bits);
+}
+
/* igb_desc_unused - calculate if we have unused descriptors */
static inline int igb_desc_unused(struct igb_ring *ring)
{
diff --git a/drivers/net/ethernet/intel/igb/igb_ethtool.c b/drivers/net/ethernet/intel/igb/igb_ethtool.c
index 0a9e309..43873eb 100644
--- a/drivers/net/ethernet/intel/igb/igb_ethtool.c
+++ b/drivers/net/ethernet/intel/igb/igb_ethtool.c
@@ -1577,16 +1577,14 @@ static int igb_clean_test_rings(struct igb_ring *rx_ring,
union e1000_adv_rx_desc *rx_desc;
struct igb_rx_buffer *rx_buffer_info;
struct igb_tx_buffer *tx_buffer_info;
- u32 staterr;
u16 rx_ntc, tx_ntc, count = 0;
/* initialize next to clean and descriptor values */
rx_ntc = rx_ring->next_to_clean;
tx_ntc = tx_ring->next_to_clean;
rx_desc = IGB_RX_DESC(rx_ring, rx_ntc);
- staterr = le32_to_cpu(rx_desc->wb.upper.status_error);
- while (staterr & E1000_RXD_STAT_DD) {
+ while (igb_test_staterr(rx_desc, E1000_RXD_STAT_DD)) {
/* check rx buffer */
rx_buffer_info = &rx_ring->rx_buffer_info[rx_ntc];
@@ -1615,7 +1613,6 @@ static int igb_clean_test_rings(struct igb_ring *rx_ring,
/* fetch next descriptor */
rx_desc = IGB_RX_DESC(rx_ring, rx_ntc);
- staterr = le32_to_cpu(rx_desc->wb.upper.status_error);
}
/* re-map buffers to ring, store next to clean values */
diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c
index 33b250f..6917c33 100644
--- a/drivers/net/ethernet/intel/igb/igb_main.c
+++ b/drivers/net/ethernet/intel/igb/igb_main.c
@@ -5720,12 +5720,13 @@ static bool igb_clean_tx_irq(struct igb_q_vector *q_vector)
}
static inline void igb_rx_checksum(struct igb_ring *ring,
- u32 status_err, struct sk_buff *skb)
+ union e1000_adv_rx_desc *rx_desc,
+ struct sk_buff *skb)
{
skb_checksum_none_assert(skb);
/* Ignore Checksum bit is set */
- if (status_err & E1000_RXD_STAT_IXSM)
+ if (igb_test_staterr(rx_desc, E1000_RXD_STAT_IXSM))
return;
/* Rx checksum disabled via ethtool */
@@ -5733,8 +5734,9 @@ static inline void igb_rx_checksum(struct igb_ring *ring,
return;
/* TCP/UDP checksum error bit is set */
- if (status_err &
- (E1000_RXDEXT_STATERR_TCPE | E1000_RXDEXT_STATERR_IPE)) {
+ if (igb_test_staterr(rx_desc,
+ E1000_RXDEXT_STATERR_TCPE |
+ E1000_RXDEXT_STATERR_IPE)) {
/*
* work around errata with sctp packets where the TCPE aka
* L4E bit is set incorrectly on 64 byte (60 byte w/o crc)
@@ -5750,19 +5752,26 @@ static inline void igb_rx_checksum(struct igb_ring *ring,
return;
}
/* It must be a TCP or UDP packet with a valid checksum */
- if (status_err & (E1000_RXD_STAT_TCPCS | E1000_RXD_STAT_UDPCS))
+ if (igb_test_staterr(rx_desc, E1000_RXD_STAT_TCPCS |
+ E1000_RXD_STAT_UDPCS))
skb->ip_summed = CHECKSUM_UNNECESSARY;
- dev_dbg(ring->dev, "cksum success: bits %08X\n", status_err);
+ dev_dbg(ring->dev, "cksum success: bits %08X\n",
+ le32_to_cpu(rx_desc->wb.upper.status_error));
}
-static void igb_rx_hwtstamp(struct igb_q_vector *q_vector, u32 staterr,
- struct sk_buff *skb)
+static void igb_rx_hwtstamp(struct igb_q_vector *q_vector,
+ union e1000_adv_rx_desc *rx_desc,
+ struct sk_buff *skb)
{
struct igb_adapter *adapter = q_vector->adapter;
struct e1000_hw *hw = &adapter->hw;
u64 regval;
+ if (!igb_test_staterr(rx_desc, E1000_RXDADV_STAT_TSIP |
+ E1000_RXDADV_STAT_TS))
+ return;
+
/*
* If this bit is set, then the RX registers contain the time stamp. No
* other packet will be time stamped until we read these registers, so
@@ -5774,7 +5783,7 @@ static void igb_rx_hwtstamp(struct igb_q_vector *q_vector, u32 staterr,
* If nothing went wrong, then it should have a shared tx_flags that we
* can turn into a skb_shared_hwtstamps.
*/
- if (staterr & E1000_RXDADV_STAT_TSIP) {
+ if (igb_test_staterr(rx_desc, E1000_RXDADV_STAT_TSIP)) {
u32 *stamp = (u32 *)skb->data;
regval = le32_to_cpu(*(stamp + 2));
regval |= (u64)le32_to_cpu(*(stamp + 3)) << 32;
@@ -5808,14 +5817,12 @@ static bool igb_clean_rx_irq(struct igb_q_vector *q_vector, int budget)
union e1000_adv_rx_desc *rx_desc;
const int current_node = numa_node_id();
unsigned int total_bytes = 0, total_packets = 0;
- u32 staterr;
u16 cleaned_count = igb_desc_unused(rx_ring);
u16 i = rx_ring->next_to_clean;
rx_desc = IGB_RX_DESC(rx_ring, i);
- staterr = le32_to_cpu(rx_desc->wb.upper.status_error);
- while (staterr & E1000_RXD_STAT_DD) {
+ while (igb_test_staterr(rx_desc, E1000_RXD_STAT_DD)) {
struct igb_rx_buffer *buffer_info = &rx_ring->rx_buffer_info[i];
struct sk_buff *skb = buffer_info->skb;
union e1000_adv_rx_desc *next_rxd;
@@ -5868,7 +5875,7 @@ static bool igb_clean_rx_irq(struct igb_q_vector *q_vector, int budget)
buffer_info->page_dma = 0;
}
- if (!(staterr & E1000_RXD_STAT_EOP)) {
+ if (!igb_test_staterr(rx_desc, E1000_RXD_STAT_EOP)) {
struct igb_rx_buffer *next_buffer;
next_buffer = &rx_ring->rx_buffer_info[i];
buffer_info->skb = next_buffer->skb;
@@ -5878,25 +5885,26 @@ static bool igb_clean_rx_irq(struct igb_q_vector *q_vector, int budget)
goto next_desc;
}
- if (staterr & E1000_RXDEXT_ERR_FRAME_ERR_MASK) {
+ if (igb_test_staterr(rx_desc,
+ E1000_RXDEXT_ERR_FRAME_ERR_MASK)) {
dev_kfree_skb_any(skb);
goto next_desc;
}
- if (staterr & (E1000_RXDADV_STAT_TSIP | E1000_RXDADV_STAT_TS))
- igb_rx_hwtstamp(q_vector, staterr, skb);
- total_bytes += skb->len;
- total_packets++;
-
- igb_rx_checksum(rx_ring, staterr, skb);
-
- skb->protocol = eth_type_trans(skb, rx_ring->netdev);
+ igb_rx_hwtstamp(q_vector, rx_desc, skb);
+ igb_rx_checksum(rx_ring, rx_desc, skb);
- if (staterr & E1000_RXD_STAT_VP) {
+ if (igb_test_staterr(rx_desc, E1000_RXD_STAT_VP)) {
u16 vid = le16_to_cpu(rx_desc->wb.upper.vlan);
__vlan_hwaccel_put_tag(skb, vid);
}
+
+ total_bytes += skb->len;
+ total_packets++;
+
+ skb->protocol = eth_type_trans(skb, rx_ring->netdev);
+
napi_gro_receive(&q_vector->napi, skb);
budget--;
@@ -5913,7 +5921,6 @@ next_desc:
/* use prefetched values */
rx_desc = next_rxd;
- staterr = le32_to_cpu(rx_desc->wb.upper.status_error);
}
rx_ring->next_to_clean = i;
--
1.7.6.4
^ permalink raw reply related
* [net-next 09/11] igb: fix recent VLAN changes that would leave VLANs disabled after reset
From: Jeff Kirsher @ 2011-10-11 15:45 UTC (permalink / raw)
To: davem; +Cc: Alexander Duyck, netdev, gospo, sassmann, Jeff Kirsher
In-Reply-To: <1318347952-25068-1-git-send-email-jeffrey.t.kirsher@intel.com>
From: Alexander Duyck <alexander.h.duyck@intel.com>
This patch cleans up several issues with VLANs on igb after the recent
changes that were meant to leave the VLANs enabled/disable via the
netdev->features flags.
Specifically the Rx VLAN settings were being dropped after reset due to the
fact that they were not being restored correctly. In addition I removed
the IRQ disable/enable since those were in place to protect the setting of
vlgrp.
Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
drivers/net/ethernet/intel/igb/igb_main.c | 18 ++++--------------
1 files changed, 4 insertions(+), 14 deletions(-)
diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c
index 6917c33..689c2c2 100644
--- a/drivers/net/ethernet/intel/igb/igb_main.c
+++ b/drivers/net/ethernet/intel/igb/igb_main.c
@@ -2065,8 +2065,6 @@ static int __devinit igb_probe(struct pci_dev *pdev,
if (err)
goto err_register;
- igb_vlan_mode(netdev, netdev->features);
-
/* carrier off reporting is important to ethtool even BEFORE open */
netif_carrier_off(netdev);
@@ -5050,7 +5048,6 @@ static s32 igb_vlvf_set(struct igb_adapter *adapter, u32 vid, bool add, u32 vf)
}
adapter->vf_data[vf].vlans_enabled++;
- return 0;
}
} else {
if (i < E1000_VLVF_ARRAY_SIZE) {
@@ -6315,10 +6312,9 @@ static void igb_vlan_mode(struct net_device *netdev, u32 features)
struct igb_adapter *adapter = netdev_priv(netdev);
struct e1000_hw *hw = &adapter->hw;
u32 ctrl, rctl;
+ bool enable = !!(features & NETIF_F_HW_VLAN_RX);
- igb_irq_disable(adapter);
-
- if (features & NETIF_F_HW_VLAN_RX) {
+ if (enable) {
/* enable VLAN tag insert/strip */
ctrl = rd32(E1000_CTRL);
ctrl |= E1000_CTRL_VME;
@@ -6336,9 +6332,6 @@ static void igb_vlan_mode(struct net_device *netdev, u32 features)
}
igb_rlpml_set(adapter);
-
- if (!test_bit(__IGB_DOWN, &adapter->state))
- igb_irq_enable(adapter);
}
static void igb_vlan_rx_add_vid(struct net_device *netdev, u16 vid)
@@ -6363,11 +6356,6 @@ static void igb_vlan_rx_kill_vid(struct net_device *netdev, u16 vid)
int pf_id = adapter->vfs_allocated_count;
s32 err;
- igb_irq_disable(adapter);
-
- if (!test_bit(__IGB_DOWN, &adapter->state))
- igb_irq_enable(adapter);
-
/* remove vlan from VLVF table array */
err = igb_vlvf_set(adapter, vid, false, pf_id);
@@ -6382,6 +6370,8 @@ static void igb_restore_vlan(struct igb_adapter *adapter)
{
u16 vid;
+ igb_vlan_mode(adapter->netdev, adapter->netdev->features);
+
for_each_set_bit(vid, adapter->active_vlans, VLAN_N_VID)
igb_vlan_rx_add_vid(adapter->netdev, vid);
}
--
1.7.6.4
^ permalink raw reply related
* [net-next 05/11] igb: Move ITR related data into work container within the q_vector
From: Jeff Kirsher @ 2011-10-11 15:45 UTC (permalink / raw)
To: davem; +Cc: Alexander Duyck, netdev, gospo, sassmann, Jeff Kirsher
In-Reply-To: <1318347952-25068-1-git-send-email-jeffrey.t.kirsher@intel.com>
From: Alexander Duyck <alexander.h.duyck@intel.com>
This change moves information related to interrupt throttle rate
configuration into a separate q_vector sub-structure called a work
container. A similar change has already been made for ixgbe and this work
is based off of that.
Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
drivers/net/ethernet/intel/igb/e1000_defines.h | 3 +
drivers/net/ethernet/intel/igb/igb.h | 32 +++--
drivers/net/ethernet/intel/igb/igb_ethtool.c | 4 +-
drivers/net/ethernet/intel/igb/igb_main.c | 203 +++++++++++-------------
4 files changed, 119 insertions(+), 123 deletions(-)
diff --git a/drivers/net/ethernet/intel/igb/e1000_defines.h b/drivers/net/ethernet/intel/igb/e1000_defines.h
index 7b8ddd8..68558be 100644
--- a/drivers/net/ethernet/intel/igb/e1000_defines.h
+++ b/drivers/net/ethernet/intel/igb/e1000_defines.h
@@ -409,6 +409,9 @@
#define E1000_ICS_DRSTA E1000_ICR_DRSTA /* Device Reset Aserted */
/* Extended Interrupt Cause Set */
+/* E1000_EITR_CNT_IGNR is only for 82576 and newer */
+#define E1000_EITR_CNT_IGNR 0x80000000 /* Don't reset counters on write */
+
/* Transmit Descriptor Control */
/* Enable the counting of descriptors still to be processed. */
diff --git a/drivers/net/ethernet/intel/igb/igb.h b/drivers/net/ethernet/intel/igb/igb.h
index 0cc4702..e0dea22 100644
--- a/drivers/net/ethernet/intel/igb/igb.h
+++ b/drivers/net/ethernet/intel/igb/igb.h
@@ -42,8 +42,11 @@
struct igb_adapter;
-/* ((1000000000ns / (6000ints/s * 1024ns)) << 2 = 648 */
-#define IGB_START_ITR 648
+/* Interrupt defines */
+#define IGB_START_ITR 648 /* ~6000 ints/sec */
+#define IGB_4K_ITR 980
+#define IGB_20K_ITR 196
+#define IGB_70K_ITR 56
/* TX/RX descriptor defines */
#define IGB_DEFAULT_TXD 256
@@ -175,15 +178,23 @@ struct igb_rx_queue_stats {
u64 alloc_failed;
};
+struct igb_ring_container {
+ struct igb_ring *ring; /* pointer to linked list of rings */
+ unsigned int total_bytes; /* total bytes processed this int */
+ unsigned int total_packets; /* total packets processed this int */
+ u16 work_limit; /* total work allowed per interrupt */
+ u8 count; /* total number of rings in vector */
+ u8 itr; /* current ITR setting for ring */
+};
+
struct igb_q_vector {
- struct igb_adapter *adapter; /* backlink */
- struct igb_ring *rx_ring;
- struct igb_ring *tx_ring;
- struct napi_struct napi;
+ struct igb_adapter *adapter; /* backlink */
+ int cpu; /* CPU for DCA */
+ u32 eims_value; /* EIMS mask value */
- u32 eims_value;
- u16 cpu;
- u16 tx_work_limit;
+ struct igb_ring_container rx, tx;
+
+ struct napi_struct napi;
u16 itr_val;
u8 set_itr;
@@ -213,9 +224,6 @@ struct igb_ring {
u16 next_to_clean ____cacheline_aligned_in_smp;
u16 next_to_use;
- unsigned int total_bytes;
- unsigned int total_packets;
-
union {
/* TX */
struct {
diff --git a/drivers/net/ethernet/intel/igb/igb_ethtool.c b/drivers/net/ethernet/intel/igb/igb_ethtool.c
index c364d84..0a9e309 100644
--- a/drivers/net/ethernet/intel/igb/igb_ethtool.c
+++ b/drivers/net/ethernet/intel/igb/igb_ethtool.c
@@ -2009,8 +2009,8 @@ static int igb_set_coalesce(struct net_device *netdev,
for (i = 0; i < adapter->num_q_vectors; i++) {
struct igb_q_vector *q_vector = adapter->q_vector[i];
- q_vector->tx_work_limit = adapter->tx_work_limit;
- if (q_vector->rx_ring)
+ q_vector->tx.work_limit = adapter->tx_work_limit;
+ if (q_vector->rx.ring)
q_vector->itr_val = adapter->rx_itr_setting;
else
q_vector->itr_val = adapter->tx_itr_setting;
diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c
index 91ae368..a5597de 100644
--- a/drivers/net/ethernet/intel/igb/igb_main.c
+++ b/drivers/net/ethernet/intel/igb/igb_main.c
@@ -737,10 +737,10 @@ static void igb_assign_vector(struct igb_q_vector *q_vector, int msix_vector)
int rx_queue = IGB_N0_QUEUE;
int tx_queue = IGB_N0_QUEUE;
- if (q_vector->rx_ring)
- rx_queue = q_vector->rx_ring->reg_idx;
- if (q_vector->tx_ring)
- tx_queue = q_vector->tx_ring->reg_idx;
+ if (q_vector->rx.ring)
+ rx_queue = q_vector->rx.ring->reg_idx;
+ if (q_vector->tx.ring)
+ tx_queue = q_vector->tx.ring->reg_idx;
switch (hw->mac.type) {
case e1000_82575:
@@ -923,15 +923,15 @@ static int igb_request_msix(struct igb_adapter *adapter)
q_vector->itr_register = hw->hw_addr + E1000_EITR(vector);
- if (q_vector->rx_ring && q_vector->tx_ring)
+ if (q_vector->rx.ring && q_vector->tx.ring)
sprintf(q_vector->name, "%s-TxRx-%u", netdev->name,
- q_vector->rx_ring->queue_index);
- else if (q_vector->tx_ring)
+ q_vector->rx.ring->queue_index);
+ else if (q_vector->tx.ring)
sprintf(q_vector->name, "%s-tx-%u", netdev->name,
- q_vector->tx_ring->queue_index);
- else if (q_vector->rx_ring)
+ q_vector->tx.ring->queue_index);
+ else if (q_vector->rx.ring)
sprintf(q_vector->name, "%s-rx-%u", netdev->name,
- q_vector->rx_ring->queue_index);
+ q_vector->rx.ring->queue_index);
else
sprintf(q_vector->name, "%s-unused", netdev->name);
@@ -1110,8 +1110,9 @@ static void igb_map_rx_ring_to_vector(struct igb_adapter *adapter,
{
struct igb_q_vector *q_vector = adapter->q_vector[v_idx];
- q_vector->rx_ring = adapter->rx_ring[ring_idx];
- q_vector->rx_ring->q_vector = q_vector;
+ q_vector->rx.ring = adapter->rx_ring[ring_idx];
+ q_vector->rx.ring->q_vector = q_vector;
+ q_vector->rx.count++;
q_vector->itr_val = adapter->rx_itr_setting;
if (q_vector->itr_val && q_vector->itr_val <= 3)
q_vector->itr_val = IGB_START_ITR;
@@ -1122,10 +1123,11 @@ static void igb_map_tx_ring_to_vector(struct igb_adapter *adapter,
{
struct igb_q_vector *q_vector = adapter->q_vector[v_idx];
- q_vector->tx_ring = adapter->tx_ring[ring_idx];
- q_vector->tx_ring->q_vector = q_vector;
+ q_vector->tx.ring = adapter->tx_ring[ring_idx];
+ q_vector->tx.ring->q_vector = q_vector;
+ q_vector->tx.count++;
q_vector->itr_val = adapter->tx_itr_setting;
- q_vector->tx_work_limit = adapter->tx_work_limit;
+ q_vector->tx.work_limit = adapter->tx_work_limit;
if (q_vector->itr_val && q_vector->itr_val <= 3)
q_vector->itr_val = IGB_START_ITR;
}
@@ -3756,33 +3758,24 @@ static void igb_update_ring_itr(struct igb_q_vector *q_vector)
int new_val = q_vector->itr_val;
int avg_wire_size = 0;
struct igb_adapter *adapter = q_vector->adapter;
- struct igb_ring *ring;
unsigned int packets;
/* For non-gigabit speeds, just fix the interrupt rate at 4000
* ints/sec - ITR timer value of 120 ticks.
*/
if (adapter->link_speed != SPEED_1000) {
- new_val = 976;
+ new_val = IGB_4K_ITR;
goto set_itr_val;
}
- ring = q_vector->rx_ring;
- if (ring) {
- packets = ACCESS_ONCE(ring->total_packets);
-
- if (packets)
- avg_wire_size = ring->total_bytes / packets;
- }
+ packets = q_vector->rx.total_packets;
+ if (packets)
+ avg_wire_size = q_vector->rx.total_bytes / packets;
- ring = q_vector->tx_ring;
- if (ring) {
- packets = ACCESS_ONCE(ring->total_packets);
-
- if (packets)
- avg_wire_size = max_t(u32, avg_wire_size,
- ring->total_bytes / packets);
- }
+ packets = q_vector->tx.total_packets;
+ if (packets)
+ avg_wire_size = max_t(u32, avg_wire_size,
+ q_vector->tx.total_bytes / packets);
/* if avg_wire_size isn't set no work was done */
if (!avg_wire_size)
@@ -3800,9 +3793,11 @@ static void igb_update_ring_itr(struct igb_q_vector *q_vector)
else
new_val = avg_wire_size / 2;
- /* when in itr mode 3 do not exceed 20K ints/sec */
- if (adapter->rx_itr_setting == 3 && new_val < 196)
- new_val = 196;
+ /* conservative mode (itr 3) eliminates the lowest_latency setting */
+ if (new_val < IGB_20K_ITR &&
+ ((q_vector->rx.ring && adapter->rx_itr_setting == 3) ||
+ (!q_vector->rx.ring && adapter->tx_itr_setting == 3)))
+ new_val = IGB_20K_ITR;
set_itr_val:
if (new_val != q_vector->itr_val) {
@@ -3810,14 +3805,10 @@ set_itr_val:
q_vector->set_itr = 1;
}
clear_counts:
- if (q_vector->rx_ring) {
- q_vector->rx_ring->total_bytes = 0;
- q_vector->rx_ring->total_packets = 0;
- }
- if (q_vector->tx_ring) {
- q_vector->tx_ring->total_bytes = 0;
- q_vector->tx_ring->total_packets = 0;
- }
+ q_vector->rx.total_bytes = 0;
+ q_vector->rx.total_packets = 0;
+ q_vector->tx.total_bytes = 0;
+ q_vector->tx.total_packets = 0;
}
/**
@@ -3833,106 +3824,102 @@ clear_counts:
* parameter (see igb_param.c)
* NOTE: These calculations are only valid when operating in a single-
* queue environment.
- * @adapter: pointer to adapter
- * @itr_setting: current q_vector->itr_val
- * @packets: the number of packets during this measurement interval
- * @bytes: the number of bytes during this measurement interval
+ * @q_vector: pointer to q_vector
+ * @ring_container: ring info to update the itr for
**/
-static unsigned int igb_update_itr(struct igb_adapter *adapter, u16 itr_setting,
- int packets, int bytes)
+static void igb_update_itr(struct igb_q_vector *q_vector,
+ struct igb_ring_container *ring_container)
{
- unsigned int retval = itr_setting;
+ unsigned int packets = ring_container->total_packets;
+ unsigned int bytes = ring_container->total_bytes;
+ u8 itrval = ring_container->itr;
+ /* no packets, exit with status unchanged */
if (packets == 0)
- goto update_itr_done;
+ return;
- switch (itr_setting) {
+ switch (itrval) {
case lowest_latency:
/* handle TSO and jumbo frames */
if (bytes/packets > 8000)
- retval = bulk_latency;
+ itrval = bulk_latency;
else if ((packets < 5) && (bytes > 512))
- retval = low_latency;
+ itrval = low_latency;
break;
case low_latency: /* 50 usec aka 20000 ints/s */
if (bytes > 10000) {
/* this if handles the TSO accounting */
if (bytes/packets > 8000) {
- retval = bulk_latency;
+ itrval = bulk_latency;
} else if ((packets < 10) || ((bytes/packets) > 1200)) {
- retval = bulk_latency;
+ itrval = bulk_latency;
} else if ((packets > 35)) {
- retval = lowest_latency;
+ itrval = lowest_latency;
}
} else if (bytes/packets > 2000) {
- retval = bulk_latency;
+ itrval = bulk_latency;
} else if (packets <= 2 && bytes < 512) {
- retval = lowest_latency;
+ itrval = lowest_latency;
}
break;
case bulk_latency: /* 250 usec aka 4000 ints/s */
if (bytes > 25000) {
if (packets > 35)
- retval = low_latency;
+ itrval = low_latency;
} else if (bytes < 1500) {
- retval = low_latency;
+ itrval = low_latency;
}
break;
}
-update_itr_done:
- return retval;
+ /* clear work counters since we have the values we need */
+ ring_container->total_bytes = 0;
+ ring_container->total_packets = 0;
+
+ /* write updated itr to ring container */
+ ring_container->itr = itrval;
}
-static void igb_set_itr(struct igb_adapter *adapter)
+static void igb_set_itr(struct igb_q_vector *q_vector)
{
- struct igb_q_vector *q_vector = adapter->q_vector[0];
- u16 current_itr;
+ struct igb_adapter *adapter = q_vector->adapter;
u32 new_itr = q_vector->itr_val;
+ u8 current_itr = 0;
/* for non-gigabit speeds, just fix the interrupt rate at 4000 */
if (adapter->link_speed != SPEED_1000) {
current_itr = 0;
- new_itr = 4000;
+ new_itr = IGB_4K_ITR;
goto set_itr_now;
}
- adapter->rx_itr = igb_update_itr(adapter,
- adapter->rx_itr,
- q_vector->rx_ring->total_packets,
- q_vector->rx_ring->total_bytes);
+ igb_update_itr(q_vector, &q_vector->tx);
+ igb_update_itr(q_vector, &q_vector->rx);
- adapter->tx_itr = igb_update_itr(adapter,
- adapter->tx_itr,
- q_vector->tx_ring->total_packets,
- q_vector->tx_ring->total_bytes);
- current_itr = max(adapter->rx_itr, adapter->tx_itr);
+ current_itr = max(q_vector->rx.itr, q_vector->tx.itr);
/* conservative mode (itr 3) eliminates the lowest_latency setting */
- if (adapter->rx_itr_setting == 3 && current_itr == lowest_latency)
+ if (current_itr == lowest_latency &&
+ ((q_vector->rx.ring && adapter->rx_itr_setting == 3) ||
+ (!q_vector->rx.ring && adapter->tx_itr_setting == 3)))
current_itr = low_latency;
switch (current_itr) {
/* counts and packets in update_itr are dependent on these numbers */
case lowest_latency:
- new_itr = 56; /* aka 70,000 ints/sec */
+ new_itr = IGB_70K_ITR; /* 70,000 ints/sec */
break;
case low_latency:
- new_itr = 196; /* aka 20,000 ints/sec */
+ new_itr = IGB_20K_ITR; /* 20,000 ints/sec */
break;
case bulk_latency:
- new_itr = 980; /* aka 4,000 ints/sec */
+ new_itr = IGB_4K_ITR; /* 4,000 ints/sec */
break;
default:
break;
}
set_itr_now:
- q_vector->rx_ring->total_bytes = 0;
- q_vector->rx_ring->total_packets = 0;
- q_vector->tx_ring->total_bytes = 0;
- q_vector->tx_ring->total_packets = 0;
-
if (new_itr != q_vector->itr_val) {
/* this attempts to bias the interrupt rate towards Bulk
* by adding intermediate steps when interrupt rate is
@@ -3940,7 +3927,7 @@ set_itr_now:
new_itr = new_itr > q_vector->itr_val ?
max((new_itr * q_vector->itr_val) /
(new_itr + (q_vector->itr_val >> 2)),
- new_itr) :
+ new_itr) :
new_itr;
/* Don't write the value here; it resets the adapter's
* internal timer, and causes us to delay far longer than
@@ -4760,7 +4747,7 @@ static void igb_write_itr(struct igb_q_vector *q_vector)
if (adapter->hw.mac.type == e1000_82575)
itr_val |= itr_val << 16;
else
- itr_val |= 0x8000000;
+ itr_val |= E1000_EITR_CNT_IGNR;
writel(itr_val, q_vector->itr_register);
q_vector->set_itr = 0;
@@ -4788,8 +4775,8 @@ static void igb_update_dca(struct igb_q_vector *q_vector)
if (q_vector->cpu == cpu)
goto out_no_update;
- if (q_vector->tx_ring) {
- int q = q_vector->tx_ring->reg_idx;
+ if (q_vector->tx.ring) {
+ int q = q_vector->tx.ring->reg_idx;
u32 dca_txctrl = rd32(E1000_DCA_TXCTRL(q));
if (hw->mac.type == e1000_82575) {
dca_txctrl &= ~E1000_DCA_TXCTRL_CPUID_MASK;
@@ -4802,8 +4789,8 @@ static void igb_update_dca(struct igb_q_vector *q_vector)
dca_txctrl |= E1000_DCA_TXCTRL_DESC_DCA_EN;
wr32(E1000_DCA_TXCTRL(q), dca_txctrl);
}
- if (q_vector->rx_ring) {
- int q = q_vector->rx_ring->reg_idx;
+ if (q_vector->rx.ring) {
+ int q = q_vector->rx.ring->reg_idx;
u32 dca_rxctrl = rd32(E1000_DCA_RXCTRL(q));
if (hw->mac.type == e1000_82575) {
dca_rxctrl &= ~E1000_DCA_RXCTRL_CPUID_MASK;
@@ -5447,16 +5434,14 @@ static irqreturn_t igb_intr(int irq, void *data)
/* Interrupt Auto-Mask...upon reading ICR, interrupts are masked. No
* need for the IMC write */
u32 icr = rd32(E1000_ICR);
- if (!icr)
- return IRQ_NONE; /* Not our interrupt */
-
- igb_write_itr(q_vector);
/* IMS will not auto-mask if INT_ASSERTED is not set, and if it is
* not set, then the adapter didn't send an interrupt */
if (!(icr & E1000_ICR_INT_ASSERTED))
return IRQ_NONE;
+ igb_write_itr(q_vector);
+
if (icr & E1000_ICR_DRSTA)
schedule_work(&adapter->reset_task);
@@ -5477,15 +5462,15 @@ static irqreturn_t igb_intr(int irq, void *data)
return IRQ_HANDLED;
}
-static inline void igb_ring_irq_enable(struct igb_q_vector *q_vector)
+void igb_ring_irq_enable(struct igb_q_vector *q_vector)
{
struct igb_adapter *adapter = q_vector->adapter;
struct e1000_hw *hw = &adapter->hw;
- if ((q_vector->rx_ring && (adapter->rx_itr_setting & 3)) ||
- (!q_vector->rx_ring && (adapter->tx_itr_setting & 3))) {
- if (!adapter->msix_entries)
- igb_set_itr(adapter);
+ if ((q_vector->rx.ring && (adapter->rx_itr_setting & 3)) ||
+ (!q_vector->rx.ring && (adapter->tx_itr_setting & 3))) {
+ if ((adapter->num_q_vectors == 1) && !adapter->vf_data)
+ igb_set_itr(q_vector);
else
igb_update_ring_itr(q_vector);
}
@@ -5514,10 +5499,10 @@ static int igb_poll(struct napi_struct *napi, int budget)
if (q_vector->adapter->flags & IGB_FLAG_DCA_ENABLED)
igb_update_dca(q_vector);
#endif
- if (q_vector->tx_ring)
+ if (q_vector->tx.ring)
clean_complete = igb_clean_tx_irq(q_vector);
- if (q_vector->rx_ring)
+ if (q_vector->rx.ring)
clean_complete &= igb_clean_rx_irq(q_vector, budget);
/* If all work not completed, return budget and keep polling */
@@ -5597,11 +5582,11 @@ static void igb_tx_hwtstamp(struct igb_q_vector *q_vector,
static bool igb_clean_tx_irq(struct igb_q_vector *q_vector)
{
struct igb_adapter *adapter = q_vector->adapter;
- struct igb_ring *tx_ring = q_vector->tx_ring;
+ struct igb_ring *tx_ring = q_vector->tx.ring;
struct igb_tx_buffer *tx_buffer;
union e1000_adv_tx_desc *tx_desc, *eop_desc;
unsigned int total_bytes = 0, total_packets = 0;
- unsigned int budget = q_vector->tx_work_limit;
+ unsigned int budget = q_vector->tx.work_limit;
unsigned int i = tx_ring->next_to_clean;
if (test_bit(__IGB_DOWN, &adapter->state))
@@ -5687,8 +5672,8 @@ static bool igb_clean_tx_irq(struct igb_q_vector *q_vector)
tx_ring->tx_stats.bytes += total_bytes;
tx_ring->tx_stats.packets += total_packets;
u64_stats_update_end(&tx_ring->tx_syncp);
- tx_ring->total_bytes += total_bytes;
- tx_ring->total_packets += total_packets;
+ q_vector->tx.total_bytes += total_bytes;
+ q_vector->tx.total_packets += total_packets;
if (tx_ring->detect_tx_hung) {
struct e1000_hw *hw = &adapter->hw;
@@ -5837,7 +5822,7 @@ static inline u16 igb_get_hlen(union e1000_adv_rx_desc *rx_desc)
static bool igb_clean_rx_irq(struct igb_q_vector *q_vector, int budget)
{
- struct igb_ring *rx_ring = q_vector->rx_ring;
+ struct igb_ring *rx_ring = q_vector->rx.ring;
union e1000_adv_rx_desc *rx_desc;
const int current_node = numa_node_id();
unsigned int total_bytes = 0, total_packets = 0;
@@ -5954,8 +5939,8 @@ next_desc:
rx_ring->rx_stats.packets += total_packets;
rx_ring->rx_stats.bytes += total_bytes;
u64_stats_update_end(&rx_ring->rx_syncp);
- rx_ring->total_packets += total_packets;
- rx_ring->total_bytes += total_bytes;
+ q_vector->rx.total_packets += total_packets;
+ q_vector->rx.total_bytes += total_bytes;
if (cleaned_count)
igb_alloc_rx_buffers(rx_ring, cleaned_count);
--
1.7.6.4
^ permalink raw reply related
* [net-next 06/11] igb: cleanup IVAR configuration
From: Jeff Kirsher @ 2011-10-11 15:45 UTC (permalink / raw)
To: davem; +Cc: Alexander Duyck, netdev, gospo, sassmann, Jeff Kirsher
In-Reply-To: <1318347952-25068-1-git-send-email-jeffrey.t.kirsher@intel.com>
From: Alexander Duyck <alexander.h.duyck@intel.com>
This change is meant to cleanup some of the IVAR register configuration.
igb_assign_vector had become pretty large with multiple copies of the same
general code for setting the IVAR. This change consolidates most of that
code by adding the igb_write_ivar function which allows us just to compute
the index and offset and then use that information to setup the IVAR.
Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
drivers/net/ethernet/intel/igb/igb_main.c | 120 +++++++++++++---------------
1 files changed, 56 insertions(+), 64 deletions(-)
diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c
index a5597de..bcc1c28 100644
--- a/drivers/net/ethernet/intel/igb/igb_main.c
+++ b/drivers/net/ethernet/intel/igb/igb_main.c
@@ -727,15 +727,40 @@ err:
return -ENOMEM;
}
+/**
+ * igb_write_ivar - configure ivar for given MSI-X vector
+ * @hw: pointer to the HW structure
+ * @msix_vector: vector number we are allocating to a given ring
+ * @index: row index of IVAR register to write within IVAR table
+ * @offset: column offset of in IVAR, should be multiple of 8
+ *
+ * This function is intended to handle the writing of the IVAR register
+ * for adapters 82576 and newer. The IVAR table consists of 2 columns,
+ * each containing an cause allocation for an Rx and Tx ring, and a
+ * variable number of rows depending on the number of queues supported.
+ **/
+static void igb_write_ivar(struct e1000_hw *hw, int msix_vector,
+ int index, int offset)
+{
+ u32 ivar = array_rd32(E1000_IVAR0, index);
+
+ /* clear any bits that are currently set */
+ ivar &= ~((u32)0xFF << offset);
+
+ /* write vector and valid bit */
+ ivar |= (msix_vector | E1000_IVAR_VALID) << offset;
+
+ array_wr32(E1000_IVAR0, index, ivar);
+}
+
#define IGB_N0_QUEUE -1
static void igb_assign_vector(struct igb_q_vector *q_vector, int msix_vector)
{
- u32 msixbm = 0;
struct igb_adapter *adapter = q_vector->adapter;
struct e1000_hw *hw = &adapter->hw;
- u32 ivar, index;
int rx_queue = IGB_N0_QUEUE;
int tx_queue = IGB_N0_QUEUE;
+ u32 msixbm = 0;
if (q_vector->rx.ring)
rx_queue = q_vector->rx.ring->reg_idx;
@@ -758,72 +783,39 @@ static void igb_assign_vector(struct igb_q_vector *q_vector, int msix_vector)
q_vector->eims_value = msixbm;
break;
case e1000_82576:
- /* 82576 uses a table-based method for assigning vectors.
- Each queue has a single entry in the table to which we write
- a vector number along with a "valid" bit. Sadly, the layout
- of the table is somewhat counterintuitive. */
- if (rx_queue > IGB_N0_QUEUE) {
- index = (rx_queue & 0x7);
- ivar = array_rd32(E1000_IVAR0, index);
- if (rx_queue < 8) {
- /* vector goes into low byte of register */
- ivar = ivar & 0xFFFFFF00;
- ivar |= msix_vector | E1000_IVAR_VALID;
- } else {
- /* vector goes into third byte of register */
- ivar = ivar & 0xFF00FFFF;
- ivar |= (msix_vector | E1000_IVAR_VALID) << 16;
- }
- array_wr32(E1000_IVAR0, index, ivar);
- }
- if (tx_queue > IGB_N0_QUEUE) {
- index = (tx_queue & 0x7);
- ivar = array_rd32(E1000_IVAR0, index);
- if (tx_queue < 8) {
- /* vector goes into second byte of register */
- ivar = ivar & 0xFFFF00FF;
- ivar |= (msix_vector | E1000_IVAR_VALID) << 8;
- } else {
- /* vector goes into high byte of register */
- ivar = ivar & 0x00FFFFFF;
- ivar |= (msix_vector | E1000_IVAR_VALID) << 24;
- }
- array_wr32(E1000_IVAR0, index, ivar);
- }
+ /*
+ * 82576 uses a table that essentially consists of 2 columns
+ * with 8 rows. The ordering is column-major so we use the
+ * lower 3 bits as the row index, and the 4th bit as the
+ * column offset.
+ */
+ if (rx_queue > IGB_N0_QUEUE)
+ igb_write_ivar(hw, msix_vector,
+ rx_queue & 0x7,
+ (rx_queue & 0x8) << 1);
+ if (tx_queue > IGB_N0_QUEUE)
+ igb_write_ivar(hw, msix_vector,
+ tx_queue & 0x7,
+ ((tx_queue & 0x8) << 1) + 8);
q_vector->eims_value = 1 << msix_vector;
break;
case e1000_82580:
case e1000_i350:
- /* 82580 uses the same table-based approach as 82576 but has fewer
- entries as a result we carry over for queues greater than 4. */
- if (rx_queue > IGB_N0_QUEUE) {
- index = (rx_queue >> 1);
- ivar = array_rd32(E1000_IVAR0, index);
- if (rx_queue & 0x1) {
- /* vector goes into third byte of register */
- ivar = ivar & 0xFF00FFFF;
- ivar |= (msix_vector | E1000_IVAR_VALID) << 16;
- } else {
- /* vector goes into low byte of register */
- ivar = ivar & 0xFFFFFF00;
- ivar |= msix_vector | E1000_IVAR_VALID;
- }
- array_wr32(E1000_IVAR0, index, ivar);
- }
- if (tx_queue > IGB_N0_QUEUE) {
- index = (tx_queue >> 1);
- ivar = array_rd32(E1000_IVAR0, index);
- if (tx_queue & 0x1) {
- /* vector goes into high byte of register */
- ivar = ivar & 0x00FFFFFF;
- ivar |= (msix_vector | E1000_IVAR_VALID) << 24;
- } else {
- /* vector goes into second byte of register */
- ivar = ivar & 0xFFFF00FF;
- ivar |= (msix_vector | E1000_IVAR_VALID) << 8;
- }
- array_wr32(E1000_IVAR0, index, ivar);
- }
+ /*
+ * On 82580 and newer adapters the scheme is similar to 82576
+ * however instead of ordering column-major we have things
+ * ordered row-major. So we traverse the table by using
+ * bit 0 as the column offset, and the remaining bits as the
+ * row index.
+ */
+ if (rx_queue > IGB_N0_QUEUE)
+ igb_write_ivar(hw, msix_vector,
+ rx_queue >> 1,
+ (rx_queue & 0x1) << 4);
+ if (tx_queue > IGB_N0_QUEUE)
+ igb_write_ivar(hw, msix_vector,
+ tx_queue >> 1,
+ ((tx_queue & 0x1) << 4) + 8);
q_vector->eims_value = 1 << msix_vector;
break;
default:
--
1.7.6.4
^ permalink raw reply related
* [net-next 07/11] igb: retire the RX_CSUM flag and use the netdev flag instead
From: Jeff Kirsher @ 2011-10-11 15:45 UTC (permalink / raw)
To: davem; +Cc: Alexander Duyck, netdev, gospo, sassmann, Jeff Kirsher
In-Reply-To: <1318347952-25068-1-git-send-email-jeffrey.t.kirsher@intel.com>
From: Alexander Duyck <alexander.h.duyck@intel.com>
Since the netdev now has its' own checksum flag to indicate if Rx checksum
is enabled we might as well use that instead of using the ring flag.
Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
drivers/net/ethernet/intel/igb/igb.h | 1 -
drivers/net/ethernet/intel/igb/igb_main.c | 22 ++++++----------------
2 files changed, 6 insertions(+), 17 deletions(-)
diff --git a/drivers/net/ethernet/intel/igb/igb.h b/drivers/net/ethernet/intel/igb/igb.h
index e0dea22..8a15d43 100644
--- a/drivers/net/ethernet/intel/igb/igb.h
+++ b/drivers/net/ethernet/intel/igb/igb.h
@@ -243,7 +243,6 @@ struct igb_ring {
};
enum e1000_ring_flags_t {
- IGB_RING_FLAG_RX_CSUM,
IGB_RING_FLAG_RX_SCTP_CSUM,
IGB_RING_FLAG_TX_CTX_IDX,
IGB_RING_FLAG_TX_DETECT_HANG
diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c
index bcc1c28..33b250f 100644
--- a/drivers/net/ethernet/intel/igb/igb_main.c
+++ b/drivers/net/ethernet/intel/igb/igb_main.c
@@ -709,8 +709,6 @@ static int igb_alloc_queues(struct igb_adapter *adapter)
ring->queue_index = i;
ring->dev = &adapter->pdev->dev;
ring->netdev = adapter->netdev;
- /* enable rx checksum */
- set_bit(IGB_RING_FLAG_RX_CSUM, &ring->flags);
/* set flag indicating ring supports SCTP checksum offload */
if (adapter->hw.mac.type >= e1000_82576)
set_bit(IGB_RING_FLAG_RX_SCTP_CSUM, &ring->flags);
@@ -1764,19 +1762,8 @@ static u32 igb_fix_features(struct net_device *netdev, u32 features)
static int igb_set_features(struct net_device *netdev, u32 features)
{
- struct igb_adapter *adapter = netdev_priv(netdev);
- int i;
u32 changed = netdev->features ^ features;
- for (i = 0; i < adapter->num_rx_queues; i++) {
- if (features & NETIF_F_RXCSUM)
- set_bit(IGB_RING_FLAG_RX_CSUM,
- &adapter->rx_ring[i]->flags);
- else
- clear_bit(IGB_RING_FLAG_RX_CSUM,
- &adapter->rx_ring[i]->flags);
- }
-
if (changed & NETIF_F_HW_VLAN_RX)
igb_vlan_mode(netdev, features);
@@ -5737,9 +5724,12 @@ static inline void igb_rx_checksum(struct igb_ring *ring,
{
skb_checksum_none_assert(skb);
- /* Ignore Checksum bit is set or checksum is disabled through ethtool */
- if (!test_bit(IGB_RING_FLAG_RX_CSUM, &ring->flags) ||
- (status_err & E1000_RXD_STAT_IXSM))
+ /* Ignore Checksum bit is set */
+ if (status_err & E1000_RXD_STAT_IXSM)
+ return;
+
+ /* Rx checksum disabled via ethtool */
+ if (!(ring->netdev->features & NETIF_F_RXCSUM))
return;
/* TCP/UDP checksum error bit is set */
--
1.7.6.4
^ permalink raw reply related
* [net-next 03/11] igb: avoid unnecessary conversions from u16 to int
From: Jeff Kirsher @ 2011-10-11 15:45 UTC (permalink / raw)
To: davem; +Cc: Alexander Duyck, netdev, gospo, sassmann, Jeff Kirsher
In-Reply-To: <1318347952-25068-1-git-send-email-jeffrey.t.kirsher@intel.com>
From: Alexander Duyck <alexander.h.duyck@intel.com>
There are a number of places where we have values that are stored as u16
but are being converted to int unnecessarily. In order to avoid that we
should convert all variables that deal with the next_to_clean, next_to_use,
and count to u16 values.
Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
drivers/net/ethernet/intel/igb/igb_ethtool.c | 5 +++--
drivers/net/ethernet/intel/igb/igb_main.c | 9 ++++-----
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/drivers/net/ethernet/intel/igb/igb_ethtool.c b/drivers/net/ethernet/intel/igb/igb_ethtool.c
index 174540f..c364d84 100644
--- a/drivers/net/ethernet/intel/igb/igb_ethtool.c
+++ b/drivers/net/ethernet/intel/igb/igb_ethtool.c
@@ -1577,8 +1577,8 @@ static int igb_clean_test_rings(struct igb_ring *rx_ring,
union e1000_adv_rx_desc *rx_desc;
struct igb_rx_buffer *rx_buffer_info;
struct igb_tx_buffer *tx_buffer_info;
- int rx_ntc, tx_ntc, count = 0;
u32 staterr;
+ u16 rx_ntc, tx_ntc, count = 0;
/* initialize next to clean and descriptor values */
rx_ntc = rx_ring->next_to_clean;
@@ -1630,7 +1630,8 @@ static int igb_run_loopback_test(struct igb_adapter *adapter)
{
struct igb_ring *tx_ring = &adapter->test_tx_ring;
struct igb_ring *rx_ring = &adapter->test_rx_ring;
- int i, j, lc, good_cnt, ret_val = 0;
+ u16 i, j, lc, good_cnt;
+ int ret_val = 0;
unsigned int size = IGB_RX_HDR_LEN;
netdev_tx_t tx_ret_val;
struct sk_buff *skb;
diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c
index 1c234f0..150bf4e 100644
--- a/drivers/net/ethernet/intel/igb/igb_main.c
+++ b/drivers/net/ethernet/intel/igb/igb_main.c
@@ -338,14 +338,13 @@ static void igb_dump(struct igb_adapter *adapter)
struct net_device *netdev = adapter->netdev;
struct e1000_hw *hw = &adapter->hw;
struct igb_reg_info *reginfo;
- int n = 0;
struct igb_ring *tx_ring;
union e1000_adv_tx_desc *tx_desc;
struct my_u0 { u64 a; u64 b; } *u0;
struct igb_ring *rx_ring;
union e1000_adv_rx_desc *rx_desc;
u32 staterr;
- int i = 0;
+ u16 i, n;
if (!netif_msg_hw(adapter))
return;
@@ -3169,7 +3168,7 @@ static void igb_clean_tx_ring(struct igb_ring *tx_ring)
{
struct igb_tx_buffer *buffer_info;
unsigned long size;
- unsigned int i;
+ u16 i;
if (!tx_ring->tx_buffer_info)
return;
@@ -4285,7 +4284,7 @@ dma_error:
tx_ring->next_to_use = i;
}
-static int __igb_maybe_stop_tx(struct igb_ring *tx_ring, int size)
+static int __igb_maybe_stop_tx(struct igb_ring *tx_ring, const u16 size)
{
struct net_device *netdev = tx_ring->netdev;
@@ -4311,7 +4310,7 @@ static int __igb_maybe_stop_tx(struct igb_ring *tx_ring, int size)
return 0;
}
-static inline int igb_maybe_stop_tx(struct igb_ring *tx_ring, int size)
+static inline int igb_maybe_stop_tx(struct igb_ring *tx_ring, const u16 size)
{
if (igb_desc_unused(tx_ring) >= size)
return 0;
--
1.7.6.4
^ permalink raw reply related
* [net-next 04/11] igb: Consolidate all of the ring feature flags into a single value
From: Jeff Kirsher @ 2011-10-11 15:45 UTC (permalink / raw)
To: davem; +Cc: Alexander Duyck, netdev, gospo, sassmann, Jeff Kirsher
In-Reply-To: <1318347952-25068-1-git-send-email-jeffrey.t.kirsher@intel.com>
From: Alexander Duyck <alexander.h.duyck@intel.com>
This change moves all of the ring flags into a single value. The advantage
to this is that there is one central area for all of these flags and they
can all make use of the set/test bit operations.
Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
drivers/net/ethernet/intel/igb/igb.h | 10 ++++++----
drivers/net/ethernet/intel/igb/igb_main.c | 23 +++++++++++++----------
2 files changed, 19 insertions(+), 14 deletions(-)
diff --git a/drivers/net/ethernet/intel/igb/igb.h b/drivers/net/ethernet/intel/igb/igb.h
index de35c02..0cc4702 100644
--- a/drivers/net/ethernet/intel/igb/igb.h
+++ b/drivers/net/ethernet/intel/igb/igb.h
@@ -234,10 +234,12 @@ struct igb_ring {
dma_addr_t dma; /* phys address of the ring */
};
-#define IGB_RING_FLAG_RX_CSUM 0x00000001 /* RX CSUM enabled */
-#define IGB_RING_FLAG_RX_SCTP_CSUM 0x00000002 /* SCTP CSUM offload enabled */
-
-#define IGB_RING_FLAG_TX_CTX_IDX 0x00000001 /* HW requires context index */
+enum e1000_ring_flags_t {
+ IGB_RING_FLAG_RX_CSUM,
+ IGB_RING_FLAG_RX_SCTP_CSUM,
+ IGB_RING_FLAG_TX_CTX_IDX,
+ IGB_RING_FLAG_TX_DETECT_HANG
+};
#define IGB_TXD_DCMD (E1000_ADVTXD_DCMD_EOP | E1000_ADVTXD_DCMD_RS)
diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c
index 150bf4e..91ae368 100644
--- a/drivers/net/ethernet/intel/igb/igb_main.c
+++ b/drivers/net/ethernet/intel/igb/igb_main.c
@@ -697,7 +697,7 @@ static int igb_alloc_queues(struct igb_adapter *adapter)
ring->netdev = adapter->netdev;
/* For 82575, context index must be unique per ring. */
if (adapter->hw.mac.type == e1000_82575)
- ring->flags = IGB_RING_FLAG_TX_CTX_IDX;
+ set_bit(IGB_RING_FLAG_TX_CTX_IDX, &ring->flags);
adapter->tx_ring[i] = ring;
}
@@ -709,10 +709,11 @@ static int igb_alloc_queues(struct igb_adapter *adapter)
ring->queue_index = i;
ring->dev = &adapter->pdev->dev;
ring->netdev = adapter->netdev;
- ring->flags = IGB_RING_FLAG_RX_CSUM; /* enable rx checksum */
+ /* enable rx checksum */
+ set_bit(IGB_RING_FLAG_RX_CSUM, &ring->flags);
/* set flag indicating ring supports SCTP checksum offload */
if (adapter->hw.mac.type >= e1000_82576)
- ring->flags |= IGB_RING_FLAG_RX_SCTP_CSUM;
+ set_bit(IGB_RING_FLAG_RX_SCTP_CSUM, &ring->flags);
adapter->rx_ring[i] = ring;
}
@@ -1775,9 +1776,11 @@ static int igb_set_features(struct net_device *netdev, u32 features)
for (i = 0; i < adapter->num_rx_queues; i++) {
if (features & NETIF_F_RXCSUM)
- adapter->rx_ring[i]->flags |= IGB_RING_FLAG_RX_CSUM;
+ set_bit(IGB_RING_FLAG_RX_CSUM,
+ &adapter->rx_ring[i]->flags);
else
- adapter->rx_ring[i]->flags &= ~IGB_RING_FLAG_RX_CSUM;
+ clear_bit(IGB_RING_FLAG_RX_CSUM,
+ &adapter->rx_ring[i]->flags);
}
if (changed & NETIF_F_HW_VLAN_RX)
@@ -3965,7 +3968,7 @@ void igb_tx_ctxtdesc(struct igb_ring *tx_ring, u32 vlan_macip_lens,
type_tucmd |= E1000_TXD_CMD_DEXT | E1000_ADVTXD_DTYP_CTXT;
/* For 82575, context index must be unique per ring. */
- if (tx_ring->flags & IGB_RING_FLAG_TX_CTX_IDX)
+ if (test_bit(IGB_RING_FLAG_TX_CTX_IDX, &tx_ring->flags))
mss_l4len_idx |= tx_ring->reg_idx << 4;
context_desc->vlan_macip_lens = cpu_to_le32(vlan_macip_lens);
@@ -4132,7 +4135,7 @@ static void igb_tx_olinfo_status(struct igb_ring *tx_ring,
/* 82575 requires a unique index per ring if any offload is enabled */
if ((tx_flags & (IGB_TX_FLAGS_CSUM | IGB_TX_FLAGS_VLAN)) &&
- (tx_ring->flags & IGB_RING_FLAG_TX_CTX_IDX))
+ test_bit(IGB_RING_FLAG_TX_CTX_IDX, &tx_ring->flags))
olinfo_status |= tx_ring->reg_idx << 4;
/* insert L4 checksum */
@@ -5758,7 +5761,7 @@ static inline void igb_rx_checksum(struct igb_ring *ring,
skb_checksum_none_assert(skb);
/* Ignore Checksum bit is set or checksum is disabled through ethtool */
- if (!(ring->flags & IGB_RING_FLAG_RX_CSUM) ||
+ if (!test_bit(IGB_RING_FLAG_RX_CSUM, &ring->flags) ||
(status_err & E1000_RXD_STAT_IXSM))
return;
@@ -5770,8 +5773,8 @@ static inline void igb_rx_checksum(struct igb_ring *ring,
* L4E bit is set incorrectly on 64 byte (60 byte w/o crc)
* packets, (aka let the stack check the crc32c)
*/
- if ((skb->len == 60) &&
- (ring->flags & IGB_RING_FLAG_RX_SCTP_CSUM)) {
+ if (!((skb->len == 60) &&
+ test_bit(IGB_RING_FLAG_RX_SCTP_CSUM, &ring->flags))) {
u64_stats_update_begin(&ring->rx_syncp);
ring->rx_stats.csum_err++;
u64_stats_update_end(&ring->rx_syncp);
--
1.7.6.4
^ 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