* Re: [PATCH] irq: Add node_affinity CPU masks for smarter irqbalance hints
From: Peter P Waskiewicz Jr @ 2009-11-24 19:53 UTC (permalink / raw)
To: Eric Dumazet
Cc: David Miller, peterz@infradead.org, arjan@linux.intel.com,
yong.zhang0@gmail.com, linux-kernel@vger.kernel.org,
arjan@linux.jf.intel.com, netdev@vger.kernel.org
In-Reply-To: <4B0C2D85.7020200@gmail.com>
On Tue, 2009-11-24 at 11:01 -0800, Eric Dumazet wrote:
> Peter P Waskiewicz Jr a écrit :
>
> > That's exactly what we're doing in our 10GbE driver right now (isn't
> > pushed upstream yet, still finalizing our testing). We spread to all
> > NUMA nodes in a semi-intelligent fashion when allocating our rings and
> > buffers. The last piece is ensuring the interrupts tied to the various
> > queues all route to the NUMA nodes those CPUs belong to. irqbalance
> > needs some kind of hint to make sure it does the right thing, which
> > today it does not.
>
> sk_buff allocations should be done on the node of the cpu handling rx interrupts.
Yes, but we preallocate the buffers to minimize overhead when running
our interrupt routines. Regardless, whatever queue we're filling with
those sk_buff's has an interrupt vector attached. So wherever the
descriptor ring/queue and its associated buffers were allocated, that is
where the interrupt's affinity needs to be set to.
> For rings, I am ok for irqbalance and driver cooperation, in case admin
> doesnt want to change the defaults.
>
> >
> > I don't see how this is complex though. Driver loads, allocates across
> > the NUMA nodes for optimal throughput, then writes CPU masks for the
> > NUMA nodes each interrupt belongs to. irqbalance comes along and looks
> > at the new mask "hint," and then balances that interrupt within that
> > hinted mask.
>
> So NUMA policy is given by the driver at load time ?
I think it would have to. Nobody else has insight how the driver
allocated its resources. So the driver can be told where to allocate
(see below), or the driver needs to indicate upwards how it allocated
resources.
> An admin might chose to direct all NIC trafic to a given node, because
> its machine has mixed workload. 3 nodes out of 4 for database workload,
> one node for network IO...
>
> So if an admin changes smp_affinity, is your driver able to reconfigure itself
> and re-allocate all its rings to be on NUMA node chosen by admin ? This is
> what I qualify as complex.
No, we don't want to go this route of reallocation. This, I agree, is
very complex, and can be very devastating. We'd basically be resetting
the driver whenever an interrupt moved, so this could be a terrible DoS
vulnerability.
Jesse Brandeburg has a set of patches he's working on that will allow us
to bind an interface to a single node. So in your example of 3 nodes
for DB workload and 1 for network I/O, the driver can be loaded and
directly bound to that 4th node. Then the node_affinity mask would be
set by the driver for the CPU mask of that single node. But in these
deployments, a sysadmin changing affinity that will fly directly in the
face of how resources are laid out is poor system administration. I
know it will happen, but I don't know how far we need to protect the
sysadmin from shooting themselves in the foot in terms of performance
tuning.
Cheers,
-PJ
^ permalink raw reply
* Re: [PATCH 01/17] sfc: Remove pointless abstraction of memory BAR number (2)
From: David Miller @ 2009-11-24 20:08 UTC (permalink / raw)
To: bhutchings; +Cc: netdev, linux-net-drivers
In-Reply-To: <1259028093.14645.5.camel@achroite.uk.solarflarecom.com>
All patches look good, applied to net-next-2.6
^ permalink raw reply
* Re: NUMA and multiQ interation
From: David Miller @ 2009-11-24 20:10 UTC (permalink / raw)
To: therbert; +Cc: netdev
In-Reply-To: <65634d660911241151q4d7522c0nf9c2e4667c333185@mail.gmail.com>
From: Tom Herbert <therbert@google.com>
Date: Tue, 24 Nov 2009 11:51:39 -0800
> I saw that thread, and it looks compelling. But we have applications
> that are network bound such that we want to use multiple queues across
> multiple nodes for scaling-- and trying keep all queues on the same
> node does not scale very well. Maybe ignoring NUMA allocation could
> be a fall-back mode in a dynamic allocation with heavy load?
You use the word "But" as if what PJ and friends are doing is different
from what you're trying to achive. I think they are the same.
^ permalink raw reply
* Re: [PATCH v2 0/7] via-velocity performance fixes
From: David Miller @ 2009-11-24 20:13 UTC (permalink / raw)
To: simon.kagstrom; +Cc: netdev, davej, shemminger, romieu
In-Reply-To: <20091123152724.2871cf4d@marrow.netinsight.se>
Simon I'm still waiting for you to fix the transmit function return
value problems I pointed out in patch #5.
Please get to this so I can apply your patches.
Thanks.
^ permalink raw reply
* Re: [PATCH] pktgen: Fix device name compares
From: David Miller @ 2009-11-24 20:21 UTC (permalink / raw)
To: eric.dumazet; +Cc: robert, netdev, robert.olsson
In-Reply-To: <4B0AA8C9.8060206@gmail.com>
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Mon, 23 Nov 2009 16:22:49 +0100
> Here is an updated version because the netdev unregister event also needed some changes.
...
> [PATCH] pktgen: Fix device name compares
Eric, I put the original version of your patch into net-next-2.6 and
pushed it out already the other day. Can you give me something relative
with these updates in it?
Thanks.
^ permalink raw reply
* Re: [PATCH] pktgen: Fix device name compares
From: Eric Dumazet @ 2009-11-24 20:24 UTC (permalink / raw)
To: David Miller; +Cc: robert, netdev, robert.olsson
In-Reply-To: <20091124.122135.43806243.davem@davemloft.net>
David Miller a écrit :
>
> Eric, I put the original version of your patch into net-next-2.6 and
> pushed it out already the other day. Can you give me something relative
> with these updates in it?
Sure, I was aware of the possible mismatch, and was waiting for the tree push, dont worry :)
^ permalink raw reply
* Re: [PATCH] irq: Add node_affinity CPU masks for smarter irqbalance hints
From: Andi Kleen @ 2009-11-24 20:35 UTC (permalink / raw)
To: Eric Dumazet
Cc: David Miller, peter.p.waskiewicz.jr, peterz, arjan, yong.zhang0,
linux-kernel, arjan, netdev
In-Reply-To: <4B0C2CCA.6030006@gmail.com>
Eric Dumazet <eric.dumazet@gmail.com> writes:
> David Miller a écrit :
>> From: Eric Dumazet <eric.dumazet@gmail.com>
>> Date: Tue, 24 Nov 2009 19:26:15 +0100
>>
>>> It seems complex to me, maybe optimal thing would be to use a NUMA policy to
>>> spread vmalloc() allocations to all nodes to get a good bandwidth...
>>
>> vmalloc() and sk_buff's don't currently mix and I really don't see us
>> every allowing them to :-)
>
> I think Peter was referring to tx/rx rings buffers, not sk_buffs.
>
> They (ring buffers) are allocated with vmalloc() at driver init time.
They are typically allocated with dma_alloc_coherent(), which does
allocate a continuous area. In theory you could do interleaving
with IOMMus, but just putting it on the same node as the device
is probably better.
-Andi
--
ak@linux.intel.com -- Speaking for myself only.
^ permalink raw reply
* Re: ixgbe question
From: John Fastabend @ 2009-11-24 13:14 UTC (permalink / raw)
To: Peter P Waskiewicz Jr
Cc: Eric Dumazet, robert@herjulf.net, Jesper Dangaard Brouer,
Linux Netdev List
In-Reply-To: <1259057164.2631.36.camel@ppwaskie-mobl2>
Peter P Waskiewicz Jr wrote:
> On Tue, 2009-11-24 at 02:55 -0700, Eric Dumazet wrote:
>
>> Peter P Waskiewicz Jr a écrit :
>>
>>
>>> You might have this elsewhere, but it sounds like you're connecting back
>>> to back with another 82599 NIC. Our optics in that NIC are dual-rate,
>>> and the software mechanism that tries to "autoneg" link speed gets out
>>> of sync easily in back-to-back setups.
>>>
>>> If it's really annoying, and you're willing to run with a local patch to
>>> disable the autotry mechanism, try this:
>>>
>>> diff --git a/drivers/net/ixgbe/ixgbe_main.c
>>> b/drivers/net/ixgbe/ixgbe_main.c
>>> index a5036f7..62c0915 100644
>>> --- a/drivers/net/ixgbe/ixgbe_main.c
>>> +++ b/drivers/net/ixgbe/ixgbe_main.c
>>> @@ -4670,6 +4670,10 @@ static void ixgbe_multispeed_fiber_task(struct
>>> work_struct *work)
>>> autoneg = hw->phy.autoneg_advertised;
>>> if ((!autoneg) && (hw->mac.ops.get_link_capabilities))
>>> hw->mac.ops.get_link_capabilities(hw, &autoneg,
>>> &negotiation);
>>> +
>>> + /* force 10G only */
>>> + autoneg = IXGBE_LINK_SPEED_10GB_FULL;
>>> +
>>> if (hw->mac.ops.setup_link)
>>> hw->mac.ops.setup_link(hw, autoneg, negotiation, true);
>>> adapter->flags |= IXGBE_FLAG_NEED_LINK_UPDATE;
>>>
>> Thanks ! This did the trick :)
>>
>> If I am not mistaken, number of TX queues should be capped by number of possible cpus ?
>>
>> Its currently a fixed 128 value, allocating 128*128 = 16384 bytes,
>> and polluting "tc -s -d class show dev fiber0" output.
>>
>>
>
> Yes, this is a stupid issue we haven't gotten around to fixing yet.
> This looks fine to me. Thanks for putting it together.
>
>
Believe the below patch will break DCB and FCoE though, both features
have the potential to set real_num_tx_queues to greater then the number
of CPUs. This could result in real_num_tx_queues > num_tx_queues.
The current solution isn't that great though, maybe we should set to the
minimum of MAX_TX_QUEUES and num_possible_cpus() * 2 + 8.
That should cover the maximum possible queues for DCB, FCoE and their
combinations.
general multiq = num_possible_cpus()
DCB = 8 tx queue's
FCoE = 2*num_possible_cpus()
FCoE + DCB = 8 tx queues + num_possible_cpus
thanks,
john.
>> [PATCH net-next-2.6] ixgbe: Do not allocate too many netdev txqueues
>>
>> Instead of allocating 128 struct netdev_queue per device, use the minimum
>> value between 128 and number of possible cpus, to reduce ram usage and
>> "tc -s -d class show dev ..." output
>>
>> diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c
>> index ebcec30..ec2508d 100644
>> --- a/drivers/net/ixgbe/ixgbe_main.c
>> +++ b/drivers/net/ixgbe/ixgbe_main.c
>> @@ -5582,7 +5583,10 @@ static int __devinit ixgbe_probe(struct pci_dev *pdev,
>> pci_set_master(pdev);
>> pci_save_state(pdev);
>>
>> - netdev = alloc_etherdev_mq(sizeof(struct ixgbe_adapter), MAX_TX_QUEUES);
>> + netdev = alloc_etherdev_mq(sizeof(struct ixgbe_adapter),
>> + min_t(unsigned int,
>> + MAX_TX_QUEUES,
>> + num_possible_cpus()));
>> if (!netdev) {
>> err = -ENOMEM;
>> goto err_alloc_etherdev;
>>
>
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply
* Re: [PATCH] irq: Add node_affinity CPU masks for smarter irqbalance hints
From: Eric Dumazet @ 2009-11-24 20:46 UTC (permalink / raw)
To: Andi Kleen
Cc: David Miller, peter.p.waskiewicz.jr, peterz, arjan, yong.zhang0,
linux-kernel, arjan, netdev
In-Reply-To: <87iqczwtia.fsf@basil.nowhere.org>
Andi Kleen a écrit :
> They are typically allocated with dma_alloc_coherent(), which does
> allocate a continuous area. In theory you could do interleaving
> with IOMMus, but just putting it on the same node as the device
> is probably better.
There are two parts, biggest one allocated with vmalloc()
(to hold struct ixgbe_rx_buffer array, 32 bytes or more per entry),
only used by driver (not adapter)
and one allocated with pci_alloc_consistent()
(to hold ixgbe_adv_tx_desc array, 16 bytes per entry)
vmalloc() one could be spreaded on many nodes.
I am not speaking about the pci_alloc_consistent() one :)
^ permalink raw reply
* pull request: wireless-next-2.6 2009-11-24
From: John W. Linville @ 2009-11-24 20:53 UTC (permalink / raw)
To: davem; +Cc: linux-wireless, netdev
Dave,
Another week, another century (more-or-less) of patches intended
for 2.6.33... Mostly the usual kind of stuff: lots of iwlwifi, some
ath9k, some wl12xx, a bunch of mac80211 bits from Johannes, and misc
other bits. Included is the reintroduction of my cfg80211 conversion
for ipw2200 and a follow-up for ipw2100 from Matthew Garrett.
Please let me know if there are problems!
Thanks,
John
---
Individual patches are available here:
http://www.kernel.org/pub/linux/kernel/people/linville/wireless-next-2.6/
---
The following changes since commit dfef948ed2ba69cf041840b5e860d6b4e16fa0b1:
David S. Miller (1):
Merge branch 'master' of git://git.kernel.org/.../linville/wireless-next-2.6
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6.git master
Ben M Cahill (4):
iwl3945: Reset saved POWER_TABLE_CMD in "up"
iwlwifi: Add comments about CSR registers
iwlwifi: Add iwl_write8()
iwlagn: Use iwl_write8() for CSR_INT_COALESCING register
Benoit PAPILLAULT (1):
ath9k: This patch fix RX unpadding for any received frame.
Christian Lamparter (1):
ar9170: do not discard valuable DUPOFDM frames
Daniel C Halperin (2):
iwlwifi: fix bugs in beacon configuration
iwlwifi: make iwlwifi send beacons
David-John Willis (1):
wl1251: add NVS in EEPROM support
Felix Fietkau (3):
mac80211: reduce the amount of unnecessary traffic on cooked monitor interfaces
mac80211: add the total ampdu length to tx info
ath9k: get rid of tx_info_priv
Janne Ylalehto (2):
wl1251: Add IRQ looping support
wl1251: Filter out unwanted events
Jaswinder Singh Rajput (1):
mac80211: Fix missing kernel-doc notation
Jay Sternberg (1):
iwlwifi: Tell the ucode immediately when association state changes
Johannes Berg (24):
iwlwifi: report PS filtered status
iwlwifi: add sleep_tx_count ucode station API
iwlwifi: handle unicast PS buffering
mac80211: let sta_info_get_by_idx get sta by sdata
mac80211: convert aggregation to operate on vifs/stas
mac80211: push michael MIC report after DA check
mac80211: cleanup reorder buffer handling
mac80211: trim RX data
mac80211: improve rate handling
mac80211: remove dev_hold/put calls
mac80211: use fixed broadcast address
mac80211: make software rate control optional
cfg80211: re-join IBSS when privacy changes
mac80211: remove encrypt parameter from ieee80211_tx_skb
mac80211: move TX status handling
cfg80211: convert bools into flags
cfg80211: introduce capability for 4addr mode
cfg80211: disallow bridging managed/adhoc interfaces
mac80211: request TX status where needed
mac80211: avoid spurious deauth frames/messages
mac80211: add per-station HT capability file
mac80211: remove dead struct member
mac80211: fix rcu locking
iwlwifi: separate IO tracing
John W. Linville (3):
wl3501_cs: remove pedantic build warning
libipw: initiate cfg80211 API conversion (v2)
ath9k: set ps_default as false
Jouni Malinen (1):
cfg80211: Allow reassociation in associated state
Jussi Kivilinna (2):
rndis_wlan: fix buffer overflow in rndis_query_oid
rndis_wlan: disable stall workaround
Juuso Oikarinen (5):
wl1251: Add connection monitoring configuration
wl1251: Enable beacon filtering with the stack
wl1251: Configure beacon filtering on if PSM used
wl1251: Implement delayed entry into ELP mode
wl1251: Fix regression in IRQ loop handling
Kalle Valo (3):
wl1251: allocate space for firmware with vmalloc()
wl1251: mask aid bits 14 and 15 in ps-poll template
wl1251: remove depcreated qual usage
Larry Finger (1):
ssb: Unconditionally log results of core scans
Lukáš Turek (1):
ath5k: Fix I/Q calibration
Marcel Holtmann (2):
rfkill: Add missing description for RFKILL_TYPE_GPS
rfkill: Add constant for RFKILL_TYPE_FM radio devices
Matthew Garrett (2):
ipw2100: Register the wiphy device
ipw2200: Set core hw rfkill status when hardware changes state
Michael Buesch (4):
b43: Enforce DMA descriptor memory constraints
b43: Rewrite DMA Tx status handling sanity checks
ssb: Fix SPROM writing
ssb: Fix range check in sprom write
Reinette Chatre (2):
iwlagn: power up device before initializing EEPROM
iwl3945: removed unused struct and definitions
Rui Paulo (3):
mac80211: use a structure to hold the mesh config information element
mac80211: update cfg80211 scan result code for the updated mesh conf IE
mac80211: fix endianess on mesh_path_error_tx() calls
Sujith (5):
ath9k: Cleanup bss_info_changed callback
ath9k: Remove a few unused variables
ath9k: Remove a few unused functions
ath9k: Fix bug in initializing chain masks
mac80211: Fix panic in aggregation handling
Thomas Klute (1):
ar9170: Add support for D-Link DWA 160 A2
Vidhya Govindan (4):
wl1251: Add acx command to set tbtt and dtim period
wl1251: Set the correct dtim period to the firmware
wl1251: Increase the beacon loss timeout value and handle regain event
wl1251: Send null data packet with "TODS" bit set
Wey-Yi Guy (21):
iwlwifi: validate enhanced tx power entry
iwlwifi: disable coex until implementation ready for 6x50
iwlwifi: remove unused parameter from iwl_channel_info
iwlwifi: drop non-production PCI-IDs for 6x50 series
iwlwifi: remove external reference for non-exist data structure
iwlwifi: update reply_statistics_cmd with 'clear' parameter
iwlwifi: eliminate the possible 1/2 dBm tx power loss in 6x00 & 6x50 series
iwlwifi: align tx/rx statistics debugfs format
iwlwifi: control led while update tx/rx bytes counts
iwlwifi: set sm_ps_mode as part of cfg parameters
iwlwifi: reset led_tpt when clear tx/rx traffic byte counts
iwlwifi: set read/write permission for debugfs files
iwlwifi: increase tx_queue debugfs buffer size
iwlwifi: dynamically allocate buffer for sram debugfs file
iwlwifi: fix reserved2 field in iwl4965_addsta
iwlwifi: update supported PCI_ID list for 5xx0 series
iwlwifi: by default, dump entire sram data portion
iwlwifi: dump error log when uCode error occurred
iwlwifi: print limited number of event log when uCode error
iwlwifi: change message for cmd queue full error
iwlwifi: remove reset led_tpt from iwl_leds_init()
Xose Vazquez Perez (1):
rt2x00: more ids to rt2800usb.c
drivers/net/wireless/ath/ar9170/main.c | 9 +-
drivers/net/wireless/ath/ar9170/usb.c | 4 +-
drivers/net/wireless/ath/ath5k/phy.c | 4 +-
drivers/net/wireless/ath/ath9k/ath9k.h | 10 -
drivers/net/wireless/ath/ath9k/common.c | 19 +-
drivers/net/wireless/ath/ath9k/common.h | 1 +
drivers/net/wireless/ath/ath9k/debug.c | 11 +-
drivers/net/wireless/ath/ath9k/hw.c | 55 +----
drivers/net/wireless/ath/ath9k/hw.h | 23 --
drivers/net/wireless/ath/ath9k/main.c | 121 +++------
drivers/net/wireless/ath/ath9k/phy.c | 90 -------
drivers/net/wireless/ath/ath9k/phy.h | 3 -
drivers/net/wireless/ath/ath9k/rc.c | 73 +++---
drivers/net/wireless/ath/ath9k/rc.h | 18 +-
drivers/net/wireless/ath/ath9k/virtual.c | 9 +-
drivers/net/wireless/ath/ath9k/xmit.c | 83 +++----
drivers/net/wireless/ath/regd.c | 5 +-
drivers/net/wireless/b43/dma.c | 264 +++++++++++++++-----
drivers/net/wireless/b43/dma.h | 13 +-
drivers/net/wireless/ipw2x00/ipw2100.c | 130 ++++++++---
drivers/net/wireless/ipw2x00/ipw2200.c | 153 +++++++++---
drivers/net/wireless/ipw2x00/libipw.h | 8 +-
drivers/net/wireless/ipw2x00/libipw_module.c | 38 +++-
drivers/net/wireless/iwlwifi/iwl-1000.c | 1 +
drivers/net/wireless/iwlwifi/iwl-3945.h | 11 +-
drivers/net/wireless/iwlwifi/iwl-4965.c | 10 +-
drivers/net/wireless/iwlwifi/iwl-5000.c | 55 ++++-
drivers/net/wireless/iwlwifi/iwl-6000.c | 38 +---
drivers/net/wireless/iwlwifi/iwl-agn-rs.c | 10 +-
drivers/net/wireless/iwlwifi/iwl-agn.c | 322 +++++++++++++++++++------
drivers/net/wireless/iwlwifi/iwl-calib.c | 2 +-
drivers/net/wireless/iwlwifi/iwl-commands.h | 38 +++-
drivers/net/wireless/iwlwifi/iwl-core.c | 106 +++++----
drivers/net/wireless/iwlwifi/iwl-core.h | 27 +--
drivers/net/wireless/iwlwifi/iwl-csr.h | 181 ++++++++++++---
drivers/net/wireless/iwlwifi/iwl-debug.h | 2 +
drivers/net/wireless/iwlwifi/iwl-debugfs.c | 171 ++++++++------
drivers/net/wireless/iwlwifi/iwl-dev.h | 30 +--
drivers/net/wireless/iwlwifi/iwl-devtrace.c | 1 +
drivers/net/wireless/iwlwifi/iwl-devtrace.h | 21 ++-
drivers/net/wireless/iwlwifi/iwl-eeprom.c | 75 ++++--
drivers/net/wireless/iwlwifi/iwl-eeprom.h | 6 +-
drivers/net/wireless/iwlwifi/iwl-io.h | 20 ++
drivers/net/wireless/iwlwifi/iwl-led.c | 1 -
drivers/net/wireless/iwlwifi/iwl-power.c | 2 +-
drivers/net/wireless/iwlwifi/iwl-rx.c | 38 ++--
drivers/net/wireless/iwlwifi/iwl-sta.c | 29 +--
drivers/net/wireless/iwlwifi/iwl-sta.h | 3 +-
drivers/net/wireless/iwlwifi/iwl-tx.c | 61 ++++-
drivers/net/wireless/iwlwifi/iwl3945-base.c | 84 +++++--
drivers/net/wireless/mac80211_hwsim.c | 18 +-
drivers/net/wireless/p54/main.c | 2 +-
drivers/net/wireless/rndis_wlan.c | 11 +-
drivers/net/wireless/rt2x00/rt2800usb.c | 39 +++-
drivers/net/wireless/rt2x00/rt2x00dev.c | 11 +-
drivers/net/wireless/rt2x00/rt2x00lib.h | 4 +-
drivers/net/wireless/rt2x00/rt2x00mac.c | 5 +-
drivers/net/wireless/rt2x00/rt2x00queue.c | 6 +-
drivers/net/wireless/rt2x00/rt2x00queue.h | 5 +-
drivers/net/wireless/wl12xx/wl1251.h | 5 +
drivers/net/wireless/wl12xx/wl1251_acx.c | 68 +++++-
drivers/net/wireless/wl12xx/wl1251_acx.h | 36 +++-
drivers/net/wireless/wl12xx/wl1251_boot.c | 55 +++-
drivers/net/wireless/wl12xx/wl1251_event.c | 15 ++
drivers/net/wireless/wl12xx/wl1251_init.c | 8 +-
drivers/net/wireless/wl12xx/wl1251_main.c | 162 +++++++-----
drivers/net/wireless/wl12xx/wl1251_ps.c | 44 +++-
drivers/net/wireless/wl12xx/wl1251_ps.h | 1 +
drivers/net/wireless/wl12xx/wl1251_reg.h | 6 +
drivers/net/wireless/wl12xx/wl1251_rx.c | 4 -
drivers/net/wireless/wl12xx/wl1251_spi.c | 2 +
drivers/net/wireless/wl3501_cs.c | 2 +-
drivers/ssb/main.c | 126 +++++-----
drivers/ssb/scan.c | 2 +-
drivers/ssb/sprom.c | 30 ++-
drivers/ssb/ssb_private.h | 12 +-
include/linux/ieee80211.h | 16 ++-
include/linux/if.h | 1 +
include/linux/rfkill.h | 3 +
include/linux/spi/wl12xx.h | 1 +
include/net/cfg80211.h | 85 +++++--
include/net/mac80211.h | 51 +++--
net/bridge/br_if.c | 4 +
net/mac80211/Makefile | 2 +-
net/mac80211/agg-rx.c | 8 +-
net/mac80211/agg-tx.c | 103 ++++-----
net/mac80211/cfg.c | 29 +--
net/mac80211/debugfs.c | 2 +-
net/mac80211/debugfs_sta.c | 29 +++
net/mac80211/driver-ops.h | 5 +-
net/mac80211/driver-trace.h | 9 +-
net/mac80211/ht.c | 5 +-
net/mac80211/ibss.c | 3 +-
net/mac80211/ieee80211_i.h | 30 ++-
net/mac80211/iface.c | 12 +-
net/mac80211/main.c | 343 +-------------------------
net/mac80211/mesh.c | 28 +--
net/mac80211/mesh.h | 4 +-
net/mac80211/mesh_hwmp.c | 24 +-
net/mac80211/mesh_pathtbl.c | 7 +-
net/mac80211/mesh_plink.c | 2 +-
net/mac80211/mlme.c | 30 ++-
net/mac80211/rate.c | 12 +-
net/mac80211/rate.h | 9 +-
net/mac80211/rx.c | 334 +++++++++++++------------
net/mac80211/spectmgmt.c | 2 +-
net/mac80211/sta_info.c | 36 ++-
net/mac80211/sta_info.h | 6 +-
net/mac80211/status.c | 337 +++++++++++++++++++++++++
net/mac80211/tkip.c | 4 +-
net/mac80211/tx.c | 45 ++--
net/mac80211/util.c | 10 +-
net/mac80211/wep.c | 8 +-
net/mac80211/wpa.c | 25 +-
net/rfkill/core.c | 4 +-
net/wireless/Kconfig | 6 -
net/wireless/core.c | 17 +-
net/wireless/core.h | 2 +
net/wireless/ibss.c | 4 +-
net/wireless/mlme.c | 56 ++++-
net/wireless/nl80211.c | 40 +++-
net/wireless/reg.c | 13 +-
net/wireless/scan.c | 40 ++--
net/wireless/util.c | 36 +++
net/wireless/wext-compat.c | 49 +++-
125 files changed, 3163 insertions(+), 1936 deletions(-)
create mode 100644 net/mac80211/status.c
Omnibus patch available here:
http://www.kernel.org/pub/linux/kernel/people/linville/wireless-next-2.6-2009-11-24.patch.bz2
--
John W. Linville Someday the world will need a hero, and you
linville@tuxdriver.com might be all we have. Be ready.
^ permalink raw reply
* [PATCH 10/38] don't wrap mlx4_remove_one in __devexit_p
From: Uwe Kleine-König @ 2009-11-24 21:07 UTC (permalink / raw)
To: linux-kernel
Cc: akpm, Roland Dreier, Yevgeny Petrilin, Yang Hongyang,
Jack Morgenstein, Eli Cohen, netdev
In-Reply-To: <1259096853-18909-9-git-send-email-u.kleine-koenig@pengutronix.de>
The function mlx4_remove_one is defined in .text, so there is no need to
wrap it with __devexit_p.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: Roland Dreier <rolandd@cisco.com>
Cc: Yevgeny Petrilin <yevgenyp@mellanox.co.il>
Cc: Yang Hongyang <yanghy@cn.fujitsu.com>
Cc: Jack Morgenstein <jackm@dev.mellanox.co.il>
Cc: Eli Cohen <eli@mellanox.co.il>
Cc: linux-kernel@vger.kernel.org
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: netdev@vger.kernel.org
---
drivers/net/mlx4/main.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/net/mlx4/main.c b/drivers/net/mlx4/main.c
index 291a505..a581860 100644
--- a/drivers/net/mlx4/main.c
+++ b/drivers/net/mlx4/main.c
@@ -1293,7 +1293,7 @@ static struct pci_driver mlx4_driver = {
.name = DRV_NAME,
.id_table = mlx4_pci_table,
.probe = mlx4_init_one,
- .remove = __devexit_p(mlx4_remove_one)
+ .remove = mlx4_remove_one
};
static int __init mlx4_verify_params(void)
--
1.6.5.2
^ permalink raw reply related
* Re: [PATCH] pktgen: Fix device name compares
From: Eric Dumazet @ 2009-11-24 21:15 UTC (permalink / raw)
To: David Miller; +Cc: robert, netdev, robert.olsson
In-Reply-To: <20091124.122135.43806243.davem@davemloft.net>
David Miller a écrit :
>
> Eric, I put the original version of your patch into net-next-2.6 and
> pushed it out already the other day. Can you give me something relative
> with these updates in it?
>
Here is the relative patch against net-2.6
Thanks
[PATCH] pktgen: Fix netdevice unregister
When multi queue compatable names are used by pktgen (eg eth0@0),
we currently cannot unload a NIC driver if one of its device
is currently in use.
Allow pktgen_find_dev() to find pktgen devices by their suffix (netdev name)
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
---
net/core/pktgen.c | 16 +++++++++++-----
1 files changed, 11 insertions(+), 5 deletions(-)
diff --git a/net/core/pktgen.c b/net/core/pktgen.c
index 54c634f..6e79e96 100644
--- a/net/core/pktgen.c
+++ b/net/core/pktgen.c
@@ -427,7 +427,7 @@ static const char version[] =
static int pktgen_remove_device(struct pktgen_thread *t, struct pktgen_dev *i);
static int pktgen_add_device(struct pktgen_thread *t, const char *ifname);
static struct pktgen_dev *pktgen_find_dev(struct pktgen_thread *t,
- const char *ifname);
+ const char *ifname, bool exact);
static int pktgen_device_event(struct notifier_block *, unsigned long, void *);
static void pktgen_run_all_threads(void);
static void pktgen_reset_all_threads(void);
@@ -1818,9 +1818,10 @@ static struct pktgen_dev *__pktgen_NN_threads(const char *ifname, int remove)
{
struct pktgen_thread *t;
struct pktgen_dev *pkt_dev = NULL;
+ bool exact = (remove == FIND);
list_for_each_entry(t, &pktgen_threads, th_list) {
- pkt_dev = pktgen_find_dev(t, ifname);
+ pkt_dev = pktgen_find_dev(t, ifname, exact);
if (pkt_dev) {
if (remove) {
if_lock(t);
@@ -3567,13 +3568,18 @@ static int pktgen_thread_worker(void *arg)
}
static struct pktgen_dev *pktgen_find_dev(struct pktgen_thread *t,
- const char *ifname)
+ const char *ifname, bool exact)
{
struct pktgen_dev *p, *pkt_dev = NULL;
- if_lock(t);
+ size_t len = strlen(ifname);
+ if_lock(t);
list_for_each_entry(p, &t->if_list, list)
- if (strncmp(p->odevname, ifname, IFNAMSIZ) == 0) {
+ if (strncmp(p->odevname, ifname, len) == 0) {
+ if (p->odevname[len]) {
+ if (exact || p->odevname[len] != '@')
+ continue;
+ }
pkt_dev = p;
break;
}
^ permalink raw reply related
* Re: [PATCH v2] irq: Add node_affinity CPU masks for smarter irqbalance hints
From: Thomas Gleixner @ 2009-11-24 21:56 UTC (permalink / raw)
To: David Miller
Cc: peter.p.waskiewicz.jr, linux-kernel, arjan, mingo, yong.zhang0,
netdev
In-Reply-To: <20091124.095703.107687163.davem@davemloft.net>
On Tue, 24 Nov 2009, David Miller wrote:
> From: Thomas Gleixner <tglx@linutronix.de>
> Date: Tue, 24 Nov 2009 12:07:35 +0100 (CET)
>
> > And what does the kernel do with this information and why are we not
> > using the existing device/numa_node information ?
>
> It's a different problem space Thomas.
>
> If the device lives on NUMA node X, we still end up wanting to
> allocate memory resources (RX ring buffers) on other NUMA nodes on a
> per-queue basis.
>
> Otherwise a network card's forwarding performance is limited by the
> memory bandwidth of a single NUMA node, and on a multiqueue cards we
> therefore fare much better by allocating each device RX queue's memory
> resources on a different NUMA node.
>
> It is this NUMA usage that PJ is trying to export somehow to userspace
> so that irqbalanced and friends can choose the IRQ cpu masks more
> intelligently.
So you need a preferred irq mask information on a per IRQ basis and
that mask is not restricted to the CPUs of a single NUMA node, right ?
Thanks,
tglx
^ permalink raw reply
* Re: [PATCH v2] irq: Add node_affinity CPU masks for smarter irqbalance hints
From: Peter P Waskiewicz Jr @ 2009-11-24 22:05 UTC (permalink / raw)
To: Thomas Gleixner
Cc: David Miller, linux-kernel@vger.kernel.org,
arjan@linux.jf.intel.com, mingo@elte.hu, yong.zhang0@gmail.com,
netdev@vger.kernel.org
In-Reply-To: <alpine.LFD.2.00.0911242252190.24119@localhost.localdomain>
On Tue, 2009-11-24 at 13:56 -0800, Thomas Gleixner wrote:
> On Tue, 24 Nov 2009, David Miller wrote:
>
> > From: Thomas Gleixner <tglx@linutronix.de>
> > Date: Tue, 24 Nov 2009 12:07:35 +0100 (CET)
> >
> > > And what does the kernel do with this information and why are we not
> > > using the existing device/numa_node information ?
> >
> > It's a different problem space Thomas.
> >
> > If the device lives on NUMA node X, we still end up wanting to
> > allocate memory resources (RX ring buffers) on other NUMA nodes on a
> > per-queue basis.
> >
> > Otherwise a network card's forwarding performance is limited by the
> > memory bandwidth of a single NUMA node, and on a multiqueue cards we
> > therefore fare much better by allocating each device RX queue's memory
> > resources on a different NUMA node.
> >
> > It is this NUMA usage that PJ is trying to export somehow to userspace
> > so that irqbalanced and friends can choose the IRQ cpu masks more
> > intelligently.
>
> So you need a preferred irq mask information on a per IRQ basis and
> that mask is not restricted to the CPUs of a single NUMA node, right ?
>
Just to clarify, I need a preferred CPU mask on a per IRQ basis. And
yes, that mask may not be restricted to the CPUs of a single NUMA node.
But in the normal case, the mask will be restricted to CPUs of a single
node.
Cheers,
-PJ
^ permalink raw reply
* Re: [PATCH v2] irq: Add node_affinity CPU masks for smarter irqbalance hints
From: Thomas Gleixner @ 2009-11-24 22:23 UTC (permalink / raw)
To: Peter P Waskiewicz Jr
Cc: David Miller, linux-kernel@vger.kernel.org,
arjan@linux.jf.intel.com, mingo@elte.hu, yong.zhang0@gmail.com,
netdev@vger.kernel.org
In-Reply-To: <1259100343.2631.78.camel@ppwaskie-mobl2>
On Tue, 24 Nov 2009, Peter P Waskiewicz Jr wrote:
> On Tue, 2009-11-24 at 13:56 -0800, Thomas Gleixner wrote:
> > On Tue, 24 Nov 2009, David Miller wrote:
> >
> > > From: Thomas Gleixner <tglx@linutronix.de>
> > > Date: Tue, 24 Nov 2009 12:07:35 +0100 (CET)
> > >
> > > > And what does the kernel do with this information and why are we not
> > > > using the existing device/numa_node information ?
> > >
> > > It's a different problem space Thomas.
> > >
> > > If the device lives on NUMA node X, we still end up wanting to
> > > allocate memory resources (RX ring buffers) on other NUMA nodes on a
> > > per-queue basis.
> > >
> > > Otherwise a network card's forwarding performance is limited by the
> > > memory bandwidth of a single NUMA node, and on a multiqueue cards we
> > > therefore fare much better by allocating each device RX queue's memory
> > > resources on a different NUMA node.
> > >
> > > It is this NUMA usage that PJ is trying to export somehow to userspace
> > > so that irqbalanced and friends can choose the IRQ cpu masks more
> > > intelligently.
> >
> > So you need a preferred irq mask information on a per IRQ basis and
> > that mask is not restricted to the CPUs of a single NUMA node, right ?
> >
> Just to clarify, I need a preferred CPU mask on a per IRQ basis. And
> yes, that mask may not be restricted to the CPUs of a single NUMA node.
> But in the normal case, the mask will be restricted to CPUs of a single
> node.
Right, but the normal case does not help much if we need to consider
the special case of multiple nodes affected which requires another
cpumask in irq_desc. That's what I really want to avoid.
I at least understand the exact problem you guys want to solve. Will
think more about it.
Thanks,
tglx
^ permalink raw reply
* Re: [PATCH] pktgen: Fix device name compares
From: David Miller @ 2009-11-24 22:51 UTC (permalink / raw)
To: eric.dumazet; +Cc: robert, netdev, robert.olsson
In-Reply-To: <4B0C4CF3.3050307@gmail.com>
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Tue, 24 Nov 2009 22:15:31 +0100
> [PATCH] pktgen: Fix netdevice unregister
>
> When multi queue compatable names are used by pktgen (eg eth0@0),
> we currently cannot unload a NIC driver if one of its device
> is currently in use.
>
> Allow pktgen_find_dev() to find pktgen devices by their suffix (netdev name)
>
> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Applied, thanks Eric.
^ permalink raw reply
* Re: [net-next-2.6 PATCH] net/ipv6: Move && and || to end of previous line
From: David Miller @ 2009-11-24 22:53 UTC (permalink / raw)
To: joe; +Cc: william.allen.simpson, netdev
In-Reply-To: <1259002724.16503.83.camel@Joe-Laptop.home>
From: Joe Perches <joe@perches.com>
Date: Mon, 23 Nov 2009 10:58:44 -0800
> Signed-off-by: Joe Perches <joe@perches.com>
Applied, thanks Joe.
^ permalink raw reply
* [PATCH] NET: smc91x: convert to dev_pm_ops
From: Kevin Hilman @ 2009-11-24 22:57 UTC (permalink / raw)
To: Nicolas Pitre, David S. Miller, netdev; +Cc: linux-kernel
Convert smc91x driver from legacy PM hooks over to using dev_pm_ops.
Tested on OMAP3 platform.
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
---
drivers/net/smc91x.c | 18 ++++++++++++------
1 files changed, 12 insertions(+), 6 deletions(-)
diff --git a/drivers/net/smc91x.c b/drivers/net/smc91x.c
index 05c91ee..8e4c455 100644
--- a/drivers/net/smc91x.c
+++ b/drivers/net/smc91x.c
@@ -2365,9 +2365,10 @@ static int __devexit smc_drv_remove(struct platform_device *pdev)
return 0;
}
-static int smc_drv_suspend(struct platform_device *dev, pm_message_t state)
+static int smc_drv_suspend(struct device *dev)
{
- struct net_device *ndev = platform_get_drvdata(dev);
+ struct platform_device *pdev = to_platform_device(dev);
+ struct net_device *ndev = platform_get_drvdata(pdev);
if (ndev) {
if (netif_running(ndev)) {
@@ -2379,9 +2380,10 @@ static int smc_drv_suspend(struct platform_device *dev, pm_message_t state)
return 0;
}
-static int smc_drv_resume(struct platform_device *dev)
+static int smc_drv_resume(struct device *dev)
{
- struct net_device *ndev = platform_get_drvdata(dev);
+ struct platform_device *pdev = to_platform_device(dev);
+ struct net_device *ndev = platform_get_drvdata(pdev);
if (ndev) {
struct smc_local *lp = netdev_priv(ndev);
@@ -2397,14 +2399,18 @@ static int smc_drv_resume(struct platform_device *dev)
return 0;
}
+static struct dev_pm_ops smc_drv_pm_ops = {
+ .suspend = smc_drv_suspend,
+ .resume = smc_drv_resume,
+};
+
static struct platform_driver smc_driver = {
.probe = smc_drv_probe,
.remove = __devexit_p(smc_drv_remove),
- .suspend = smc_drv_suspend,
- .resume = smc_drv_resume,
.driver = {
.name = CARDNAME,
.owner = THIS_MODULE,
+ .pm = &smc_drv_pm_ops,
},
};
--
1.6.5.1
^ permalink raw reply related
* Re: pull request: wireless-next-2.6 2009-11-24
From: David Miller @ 2009-11-24 23:54 UTC (permalink / raw)
To: linville-2XuSBdqkA4R54TAoqtyWWQ
Cc: linux-wireless-u79uwXL29TY76Z2rM5mHXA,
netdev-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <20091124205310.GB2782-2XuSBdqkA4R54TAoqtyWWQ@public.gmane.org>
From: "John W. Linville" <linville-2XuSBdqkA4R54TAoqtyWWQ@public.gmane.org>
Date: Tue, 24 Nov 2009 15:53:10 -0500
> Another week, another century (more-or-less) of patches intended
> for 2.6.33... Mostly the usual kind of stuff: lots of iwlwifi, some
> ath9k, some wl12xx, a bunch of mac80211 bits from Johannes, and misc
> other bits. Included is the reintroduction of my cfg80211 conversion
> for ipw2200 and a follow-up for ipw2100 from Matthew Garrett.
>
> Please let me know if there are problems!
Pulled, thanks a lot John.
--
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: [PATCH 1/1] Defer skb allocation for both mergeable buffers and big packets in virtio_net
From: Rusty Russell @ 2009-11-25 0:12 UTC (permalink / raw)
To: Michael S. Tsirkin
Cc: Shirley Ma, Eric Dumazet, Avi Kivity, netdev, kvm, linux-kernel,
Hollis Blanchard
In-Reply-To: <20091124113754.GB2405@redhat.com>
On Tue, 24 Nov 2009 10:07:54 pm Michael S. Tsirkin wrote:
> On Tue, Nov 24, 2009 at 08:54:23AM +1030, Rusty Russell wrote:
> > On Tue, 24 Nov 2009 02:37:01 am Shirley Ma wrote:
> > > > > + skb = (struct sk_buff *)buf;
> > > > This cast is unnecessary, but a comment would be nice:
> > >
> > > Without this cast there is a compile warning.
> >
> > Hi Shirley,
> >
> > Looks like buf is a void *, so no cast should be necessary. But I could
> > be reading the patch wrong.
> >
> > > > However, I question whether making it 16 byte is the right thing: the
> > > > ethernet header is 14 bytes long, so don't we want 8 bytes of padding?
> > >
> > > Because in QEMU it requires 10 bytes header in a separately, so one page
> > > is used to share between virtio_net_hdr header which is 10 bytes head
> > > and rest of data. So I put 6 bytes offset here between two buffers. I
> > > didn't look at the reason why a seperate buf is used for virtio_net_hdr
> > > in QEMU.
> >
> > It's a qemu bug. It insists the header be an element in the scatterlist by
> > itself. Unfortunately we have to accommodate it.
>
> We do? Let's just fix this?
> All we have to do is replace memcpy with proper iovec walk, correct?
> Something like the followng (untested) patch? It's probably not too
> late to put this in the next qemu release...
You might want to implement a more generic helper which does:
/* Return pointer into iovec if we can, otherwise copy into buf */
void *pull_iovec(struct iovec *iov, int iovcnt, void *buf, size_t len)
{
unsigned int i;
void *p;
if (likely(iov_cnt && iov[0].iov_len >= len)) {
/* Nice contiguous chunk. */
void *p = iov[0].iov_base;
iov[i].iov_base += len;
iov[i].iov_len -= len;
return p;
}
p = buf;
for (i = 0; i < iov_cnt; i++) {
size_t this_len = min(len, iov[i].iov_len);
memcpy(p, iov[i].iov_base, this_len);
len -= this_len;
iov[i].iov_base += len;
iov[i].iov_len -= len;
if (len == 0)
return buf;
}
/* BTW, we screwed your iovec. */
return NULL;
}
Then use it in all the virtio drivers...
Thanks!
Rusty.
^ permalink raw reply
* Re: [PATCH 1/1] Defer skb allocation for both mergeable buffers and big packets in virtio_net
From: Rusty Russell @ 2009-11-25 0:15 UTC (permalink / raw)
To: Anthony Liguori
Cc: Michael S. Tsirkin, Shirley Ma, Eric Dumazet, Avi Kivity, netdev,
kvm, linux-kernel, Hollis Blanchard
In-Reply-To: <4B0BEF70.5070104@codemonkey.ws>
On Wed, 25 Nov 2009 01:06:32 am Anthony Liguori wrote:
> So does lguest. It's been that way since the beginning. Fixing this
> would result in breaking older guests.
Agreed, we can't "fix" it in the guests, but it's a wart. That's why I
haven't bothered fixing it, but if someone else wants to I'll cheer all the
way.
lguest did it because I knew I could fix lguest any time; it was a bad mistake
and I will now fix lguest :)
> We really need to introduce a feature bit if we want to change this.
I don't think it's worth it. But the spec does say that the implementation
should not rely on the framing (I think there's a note that current
implementations are buggy tho, so you should frame it separately anyway).
That way future devices can get it right, at least.
Thanks,
Rusty.
^ permalink raw reply
* Re: [PATCH] NET: smc91x: convert to dev_pm_ops
From: Nicolas Pitre @ 2009-11-25 1:13 UTC (permalink / raw)
To: Kevin Hilman; +Cc: David S. Miller, netdev, linux-kernel
In-Reply-To: <1259103467-31016-1-git-send-email-khilman@deeprootsystems.com>
On Tue, 24 Nov 2009, Kevin Hilman wrote:
> Convert smc91x driver from legacy PM hooks over to using dev_pm_ops.
>
> Tested on OMAP3 platform.
>
> Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Acked-by: Nicolas Pitre <nico@fluxnic.net>
> ---
> drivers/net/smc91x.c | 18 ++++++++++++------
> 1 files changed, 12 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/net/smc91x.c b/drivers/net/smc91x.c
> index 05c91ee..8e4c455 100644
> --- a/drivers/net/smc91x.c
> +++ b/drivers/net/smc91x.c
> @@ -2365,9 +2365,10 @@ static int __devexit smc_drv_remove(struct platform_device *pdev)
> return 0;
> }
>
> -static int smc_drv_suspend(struct platform_device *dev, pm_message_t state)
> +static int smc_drv_suspend(struct device *dev)
> {
> - struct net_device *ndev = platform_get_drvdata(dev);
> + struct platform_device *pdev = to_platform_device(dev);
> + struct net_device *ndev = platform_get_drvdata(pdev);
>
> if (ndev) {
> if (netif_running(ndev)) {
> @@ -2379,9 +2380,10 @@ static int smc_drv_suspend(struct platform_device *dev, pm_message_t state)
> return 0;
> }
>
> -static int smc_drv_resume(struct platform_device *dev)
> +static int smc_drv_resume(struct device *dev)
> {
> - struct net_device *ndev = platform_get_drvdata(dev);
> + struct platform_device *pdev = to_platform_device(dev);
> + struct net_device *ndev = platform_get_drvdata(pdev);
>
> if (ndev) {
> struct smc_local *lp = netdev_priv(ndev);
> @@ -2397,14 +2399,18 @@ static int smc_drv_resume(struct platform_device *dev)
> return 0;
> }
>
> +static struct dev_pm_ops smc_drv_pm_ops = {
> + .suspend = smc_drv_suspend,
> + .resume = smc_drv_resume,
> +};
> +
> static struct platform_driver smc_driver = {
> .probe = smc_drv_probe,
> .remove = __devexit_p(smc_drv_remove),
> - .suspend = smc_drv_suspend,
> - .resume = smc_drv_resume,
> .driver = {
> .name = CARDNAME,
> .owner = THIS_MODULE,
> + .pm = &smc_drv_pm_ops,
> },
> };
>
> --
> 1.6.5.1
>
^ permalink raw reply
* [PATCH 1/3] X25: Move SYSCTL ifdefs into header
From: andrew hendry @ 2009-11-25 1:15 UTC (permalink / raw)
To: netdev; +Cc: linux-kernel, linux-x25
Moves the CONFIG_SYSCTL ifdefs in x25_init into header.
Signed-off-by: Andrew Hendry <andrew.hendry@gmail.com>
diff -uprN -X a/Documentation/dontdiff a/include/net/x25.h b/include/net/x25.h
--- a/include/net/x25.h 2009-11-10 11:32:31.000000000 +1100
+++ b/include/net/x25.h 2009-11-25 09:05:21.000000000 +1100
@@ -287,8 +287,14 @@ extern unsigned long x25_display_timer(s
extern void x25_check_rbuf(struct sock *);
/* sysctl_net_x25.c */
+#ifdef CONFIG_SYSCTL
extern void x25_register_sysctl(void);
extern void x25_unregister_sysctl(void);
+#else
+static inline void x25_register_sysctl(void) {};
+static inline void x25_unregister_sysctl(void) {};
+#endif /* CONFIG_SYSCTL */
+
struct x25_skb_cb {
unsigned flags;
};
diff -uprN -X a/Documentation/dontdiff a/net/x25/af_x25.c b/net/x25/af_x25.c
--- a/net/x25/af_x25.c 2009-11-17 10:30:18.000000000 +1100
+++ b/net/x25/af_x25.c 2009-11-25 09:04:25.000000000 +1100
@@ -1667,9 +1667,7 @@ static int __init x25_init(void)
printk(KERN_INFO "X.25 for Linux Version 0.2\n");
-#ifdef CONFIG_SYSCTL
x25_register_sysctl();
-#endif
x25_proc_init();
out:
return rc;
@@ -1682,9 +1680,7 @@ static void __exit x25_exit(void)
x25_link_free();
x25_route_free();
-#ifdef CONFIG_SYSCTL
x25_unregister_sysctl();
-#endif
unregister_netdevice_notifier(&x25_dev_notifier);
^ permalink raw reply
* [PATCH 2/3] X25: Check for errors in x25_init
From: andrew hendry @ 2009-11-25 1:15 UTC (permalink / raw)
To: netdev; +Cc: linux-kernel, linux-x25
Adds error checking to x25_init.
Signed-off-by: Andrew Hendry <andrew.hendry@gmail.com>
diff -uprN -X a/Documentation/dontdiff a/net/x25/af_x25.c b/net/x25/af_x25.c
--- a/net/x25/af_x25.c 2009-11-25 10:21:17.000000000 +1100
+++ b/net/x25/af_x25.c 2009-11-25 10:22:06.000000000 +1100
@@ -1659,18 +1659,31 @@ static int __init x25_init(void)
if (rc != 0)
goto out;
- sock_register(&x25_family_ops);
+ rc = sock_register(&x25_family_ops);
+ if (rc != 0)
+ goto out_proto;
dev_add_pack(&x25_packet_type);
- register_netdevice_notifier(&x25_dev_notifier);
+ rc = register_netdevice_notifier(&x25_dev_notifier);
+ if (rc != 0)
+ goto out_sock;
printk(KERN_INFO "X.25 for Linux Version 0.2\n");
x25_register_sysctl();
- x25_proc_init();
+ rc = x25_proc_init();
+ if (rc != 0)
+ goto out_dev;
out:
return rc;
+out_dev:
+ unregister_netdevice_notifier(&x25_dev_notifier);
+out_sock:
+ sock_unregister(AF_X25);
+out_proto:
+ proto_unregister(&x25_proto);
+ goto out;
}
module_init(x25_init);
^ permalink raw reply
* [PATCH 3/3] X25: Fix oops and refcnt problems from x25_dev_get
From: andrew hendry @ 2009-11-25 1:16 UTC (permalink / raw)
To: netdev; +Cc: linux-kernel, linux-x25
Calls to x25_dev_get check for dev = NULL which was not set.
It allowed x25 to set routes and ioctls on down interfaces.
This caused oopses and refcnt problems on device_unregister.
Signed-off-by: Andrew Hendry <andrew.hendry@gmail.com>
--- a/net/x25/x25_route.c 2009-11-25 09:30:52.003038597 +1100
+++ b/net/x25/x25_route.c 2009-11-25 09:33:37.627093701 +1100
@@ -136,8 +136,10 @@ struct net_device *x25_dev_get(char *dev
#if defined(CONFIG_LLC) || defined(CONFIG_LLC_MODULE)
&& dev->type != ARPHRD_ETHER
#endif
- )))
+ ))){
dev_put(dev);
+ dev = NULL;
+ }
return dev;
}
^ permalink raw reply
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