* Re: [PATCH] bridge: mask forwarding of IEEE 802 local multicast groups
From: David Lamparter @ 2011-07-15 16:03 UTC (permalink / raw)
To: Nick Carter
Cc: David Lamparter, Stephen Hemminger, netdev,
Michał Mirosław, davem
In-Reply-To: <CAEJpZP1Da=G3--jThbaj5H4+H+836quXXEfGXtBwdPewr-Pjrg@mail.gmail.com>
On Fri, Jul 15, 2011 at 04:44:50PM +0100, Nick Carter wrote:
> On 12 July 2011 12:36, David Lamparter <equinox@diac24.net> wrote:
> > On Mon, Jul 11, 2011 at 08:27:55AM -0700, Stephen Hemminger wrote:
> >> I am still undecided on this. Understand the need, but don't like idea
> >> of bridge behaving in non-conforming manner. Will see if IEEE 802 committee
> >> has any input.
> >
> > The patch doesn't make the bridge behave nonconformant. The default mask
> > is 0, which just keeps the old behaviour.
>
> Also as David points out in his review, after these diffs are applied
> we will be able to remove this
> @@ -166,6 +166,9 @@ struct sk_buff *br_handle_frame(struct sk_buff *skb)
> if (p->br->stp_enabled == BR_NO_STP && dest[5] == 0)
> goto forward;
> Which is non-standard.
Actually, no, we might not be able to remove this (sorry for stating the
opposite earlier). If we remove this, we can cause loops if we are a
STP-disabled bridge on a STP-enabled ethernet. We would form a STP
blackhole, causing more than one switch to assume responsibility for
forwarding packets to our segment...
While we could shift the burden for making a correct configuration onto
the admin or the userspace tools (by setting the mask to 1 on a no-STP
bridge), this would be a major change from previous behaviour and
(more or less) count as regression.
Either way I would consider removing that line a rather dangerous
change. We didn't remove that line, let's stick with it and everything
will stay as it used to be :)
> So these diffs enable us to change the existing non-conforming
> behaviour to a conforming one.
>
> > If you set the lowest 3 bits, yes, you can break your network.
Btw, a kernel warning for this would be useful i think, at least once.
"You should only enable the lowest 3 bits for sniffing bridges." or so.
-David
^ permalink raw reply
* Re: pull request: wireless-next-2.6 2011-07-15
From: David Miller @ 2011-07-15 15:54 UTC (permalink / raw)
To: linville; +Cc: linux-wireless, netdev
In-Reply-To: <20110715153435.GA2566@tuxdriver.com>
From: "John W. Linville" <linville@tuxdriver.com>
Date: Fri, 15 Jul 2011 11:34:36 -0400
> Here is yet another batch of wireless networking changes intended
> for 3.1, with probably a smidge more yet to come... :-)
>
> This includes another Bluetooth pull, mostly some cleanups,
> restructuring, and some minor fixes. Along with the usual iwlagn and
> ath9k updates, mwifiex, wl12xx, ath5k, and b43 all see significant
> activity. Johannes has done some housekeeping in mac80211 as well.
>
> Please let me know if there are problems!
Pulled, thanks John.
It seems we have one more bluetooth regression straggler for
3.0.0, please make sure I get that soon otherwise it might
not make it in time:
http://marc.info/?l=linux-kernel&m=131072468622609&w=2
Thanks.
^ permalink raw reply
* pull request: wireless-next-2.6 2011-07-15
From: John W. Linville @ 2011-07-15 15:34 UTC (permalink / raw)
To: davem; +Cc: linux-wireless, netdev
Dave,
Here is yet another batch of wireless networking changes intended
for 3.1, with probably a smidge more yet to come... :-)
This includes another Bluetooth pull, mostly some cleanups,
restructuring, and some minor fixes. Along with the usual iwlagn and
ath9k updates, mwifiex, wl12xx, ath5k, and b43 all see significant
activity. Johannes has done some housekeeping in mac80211 as well.
Please let me know if there are problems!
Thanks,
John
---
The following changes since commit ecae42d37045ec71831d0e0e493e00b0e0732edd:
net/ps3: Fix gelic RX DMA restart (2011-07-14 16:03:29 -0700)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6.git for-davem
Amitkumar Karwar (3):
mwifiex: fix regression in WEP security mode
mwifiex: fix minor issue in debugfs command 'info'
mwifiex: 11n specific configuration for transmit
Andre Guedes (7):
Bluetooth: Add extfeatures to struct hci_dev
Bluetooth: Write LE Host Supported command
Bluetooth: Add enable_le module parameter
Bluetooth: Add lmp_host_le_capable() macro
Bluetooth: Remove enable_smp parameter
Bluetooth: Fix potential deadlock in hci_core
Bluetooth: Fix potential deadlock in mgmt
Arik Nemtsov (7):
wl12xx: AP mode - support FW TX inactivity triggers
wl12xx: use 802.11 header location after relocation to frame start
wl12xx: schedule TX packets according to FW occupancy
wl12xx: implement Tx watermarks per AC
wl12xx: initialize max_power levels for 11a channels
wl12xx: always initialize AP-mode max power level
wl12xx: start/stop queues according to global per-AC counters
Christian Lamparter (1):
carl9170: Implement tx_frames_pending mac80211 callback function
Daniel Drake (1):
libertas: fix handling of command timeout, completion and interruption
Don Fry (1):
iwlagn: remove iwlagn_hcmd_utils structure and call directly
Eduardo Bacchi Kienetz (1):
rt2800usb: Add new device ID for Belkin
Eliad Peller (3):
wl12xx: configure suspend/resume only if associated/started
wl12xx: add stop_scan command
wl12xx: implement cancel_hw_scan() callback
Emmanuel Grumbach (7):
iwlagn: remove the CMD_MAPPED flag
iwlagn: add an API to free the TX context
iwlagn: add an API for RX stop
iwlagn: add an API for TX stop
iwlagn: remove code duplication
iwlagn: consolidate the API that sends host commands and move to transport
iwlagn: provide heplers to access the transport ops
Felix Fietkau (17):
ath9k_hw: remove hardcoded PLL overrides for AR9280
ath9k_hw: always enable 5 GHz fast clock for AR9280
ath9k_hw: fix MAC clock for half/quarter rate
ath9k_hw: fix MAC clock rate for AR9287 v1.3+
ath9k_hw: initialize more timing related registers for half/quarter channels
ath9k_hw: remove ar9287 v1.3+ specific hardcoded register hacks
ath9k_hw: set 5 GHz half/quarter channels on AR9002 using fractional mode
ath9k_hw: fix synth delay for half/quarter channels
ath9k_hw: add a missing delay for an analog register
ath5k: add missing checks for rfgain probe
ath5k: apply the synth voltage tweak only on AR5112 rev 2
ath5k: fix reference clock frequency for spur mitigation on AR2413
ath5k: initialize common->clockrate
ath5k: delay full calibration after reset
ath5k: fix reference clock usec duration setting restore
ath5k: disable 32KHz sleep clock operation by default
ath5k: do not call ieee80211_stop_queue for queues not managed by mac80211
Fry, Donald H (3):
iwlagn: remove the indirection for update_chain_flags
iwlagn: remove the indirection for iwl_apm_init
iwlagn: remove indirection for eeprom_query_addr
Gustavo F. Padovan (2):
Bluetooth: Fix bad locking balance
Bluetooth: Clean up unused struct hci_conn items
Hauke Mehrtens (1):
bcma: add check if sprom is available before accessing it.
Ido Yariv (1):
wl12xx: Increase low & high TX watermarks
Ilia Kolomisnky (1):
Bluetooth: Fixes l2cap "command reject" reply according to spec
Joe Perches (5):
Bluetooth: Rename function bt_err to bt_to_errno
Bluetooth: Add bt_printk
ath5k: Add missing breaks in switch/case
iwlegacy: Add missing comma between constant string array
iwlagn: Add missing comma between constant string array
Johannes Berg (11):
mac80211: fix TKIP races, make API easier to use
mac80211: fix CCMP races
mac80211: fix CMAC races
mac80211: use AES_BLOCK_SIZE
mac80211: simplify RX PN/IV handling
mac80211: allow drivers to access key sequence counter
mac80211: allow driver to generate P1K for IV32
cfg80211: fix docbook
mac80211: fix docbook
mac80211: allocate only one RX queue
mac80211: allow driver to disconnect after resume
John W. Linville (4):
Merge branch 'for-linville' of git://git.kernel.org/.../luca/wl12xx
Merge branch 'master' of git://git.kernel.org/.../linville/wireless-2.6
Merge branch 'master' of master.kernel.org:/.../padovan/bluetooth-next-2.6
Merge branch 'master' of git://git.kernel.org/.../linville/wireless-next-2.6 into for-davem
Larry Finger (1):
rtlwifi: rtl8192cu: Fix duplicate if test
Luciano Coelho (1):
cfg80211: return -ENOENT when stopping sched_scan while not running
Mat Martineau (6):
Bluetooth: Fix indentation whitespace
Bluetooth: ERTM timeouts need to be converted to jiffies
Bluetooth: Check earlier for L2CAP ERTM frames to drop
Bluetooth: Move code for ERTM local busy state to separate functions
Bluetooth: Use event-driven approach for handling ERTM receive buffer
Bluetooth: Remove L2CAP busy queue
Meenakshi Venkataraman (2):
mac80211: add driver RSSI threshold events
iwlagn: Enable/disable PS poll based on RSSI and BT coex traffic state
Mohammed Shafi Shajakhan (3):
ath9k_hw: Disable PAPRD based on paprd_ht20_mask for 5GHz
ath9k: remove an unnecessary function declaration
mac80211: remove a redundant check
Ohad Ben-Cohen (1):
wl12xx: one SDIO initialization is enough
Olivier Sobrie (1):
libertas: fix errors in functions accessing module registers
Oz Krakowski (1):
wl12xx: fix Tx security sequence number handling
Pavel Roskin (14):
ath5k: remove PRIV_ENTRY and PRIV_ASSIGN macros, they obfuscate the code
ath5k: replace spaces with tabs as suggested by checkpatch.pl
ath5k: remove unneeded parentheses after return
ath5k: use KERN_WARNING in ATH5K_PRINTF
ath5k: use DEFINE_PCI_DEVICE_TABLE in led.c, mark users with __devinit
ath5k: use more readable way to clear MAC address
ath5k: don't use volatile, it's not needed
ath5k: use parentheses around macro definitions
ath5k: fix misplaced or extraneous braces found by checkpatch.pl
ath5k: fix formatting errors found by checkpatch.pl
ath5k: use kstrtoint() to parse numbers coming from sysfs
ath5k: read sc->imask with sc->irqlock held
ath5k: validate mode in ath5k_ani_init() before trying to set it
ath5k: fix typos, bad comment formatting and GHz in place of MHz
Rafał Miłecki (13):
b43: make b43_wireless_init bus generic
b43: implement BCMA bus ops
b43: use switches for SSB specific code
b43: handle BCMA in bus switches
b43: bus: add helpers for getting/setting wldev from/in bus core
b43: change selecting ucode for newer cores
b43: select BLOCKIO for BCMA
b43: use radio ID reading code to older cores only
b43: read radio ID on new cores
b43: LCN-PHY add place for new PHY support
b43: define firmwares for HT and LCN PHYs
b43: LCN-PHY: include new PHY in common code
b43: HT-PHY: define dummy TX power functions
Rajkumar Manoharan (6):
ath9k_htc: do not configure filter before driver is started
mac80211: Restart STA timers only on associated state
ath9k_hw: Update AR9003 interval to improve 5G Tx EVM
ath9k_hw: Disable power detector calibration for AR9003
ath9k_hw: Remove read-only registers from AR9003 intervals
ath9k_htc: Inform stack about tx ack status
Randy Dunlap (1):
Bluetooth: uses crypto interfaces, select CRYPTO
Sebastian Andrzej Siewior (1):
net/b43: don't return IRQ_HANDLED if nothing was done
Senthil Balasubramanian (1):
ath9k_hw: Fix incorrect key_miss handling
Steven.Li (1):
Bluetooth: Add Atheros AR3012 one PID/VID supported
Vinicius Costa Gomes (12):
Bluetooth: Add support for SMP phase 3 (key distribution)
Bluetooth: Add new structures for supporting SM key distribution
Bluetooth: Add functions to manipulate the link key list for SMP
Bluetooth: Reject an encryption request when the key isn't found
Bluetooth: Fix SM pairing parameters negotiation
Bluetooth: Add support for storing the LTK
Bluetooth: Use the link key list to temporarily store the STK
Bluetooth: Use the stored LTK for restabilishing security
Bluetooth: Remove unused field in hci_conn
Bluetooth: Add support for communicating keys with userspace
Bluetooth: Add support for storing the key size
Bluetooth: Add support for returning the encryption key size
Wey-Yi Guy (9):
iwlagn: remove the indirection for the dma channel num
iwlagn: remove double level temperature indirect call
iwlagn: use bt handler for 2030 and 135 series devices
iwlagn: declare static
iwlagn: add CMD_ON_DEMAND flag for host command from testmode
iwlagn: allow application own the uCode operation
iwlagn: block regular host commands if driver don't own uCode
iwlagn: separate and enhance the fixed rate from
iwlagn: fix warning in testmode attribute table
Yogesh Ashok Powar (2):
mwifiex: 4-byte alignment in mwifiex_process_sta_txpd()
mwifiex: add cfg80211 handler for set_bitrate_mask
Documentation/DocBook/80211.tmpl | 5 +-
drivers/bcma/main.c | 4 +-
drivers/bcma/sprom.c | 3 +
drivers/bluetooth/ath3k.c | 5 +
drivers/bluetooth/btusb.c | 12 +-
drivers/net/wireless/ath/ath5k/ahb.c | 4 +-
drivers/net/wireless/ath/ath5k/ani.c | 9 +-
drivers/net/wireless/ath/ath5k/ath5k.h | 167 +++++-----
drivers/net/wireless/ath/ath5k/attach.c | 24 +-
drivers/net/wireless/ath/ath5k/base.c | 71 ++--
drivers/net/wireless/ath/ath5k/base.h | 11 +-
drivers/net/wireless/ath/ath5k/caps.c | 4 +-
drivers/net/wireless/ath/ath5k/debug.c | 207 ++++++------
drivers/net/wireless/ath/ath5k/desc.h | 4 +-
drivers/net/wireless/ath/ath5k/dma.c | 8 +-
drivers/net/wireless/ath/ath5k/eeprom.c | 46 ++--
drivers/net/wireless/ath/ath5k/eeprom.h | 12 +-
drivers/net/wireless/ath/ath5k/initvals.c | 14 +-
drivers/net/wireless/ath/ath5k/led.c | 8 +-
drivers/net/wireless/ath/ath5k/mac80211-ops.c | 4 +-
drivers/net/wireless/ath/ath5k/pci.c | 14 +-
drivers/net/wireless/ath/ath5k/pcu.c | 16 +-
drivers/net/wireless/ath/ath5k/phy.c | 100 +++---
drivers/net/wireless/ath/ath5k/reg.h | 89 +++---
drivers/net/wireless/ath/ath5k/reset.c | 45 ++-
drivers/net/wireless/ath/ath5k/rfbuffer.h | 4 +-
drivers/net/wireless/ath/ath5k/rfgain.h | 8 +-
drivers/net/wireless/ath/ath5k/sysfs.c | 10 +-
drivers/net/wireless/ath/ath5k/trace.h | 15 +-
drivers/net/wireless/ath/ath9k/ar5008_phy.c | 5 +
drivers/net/wireless/ath/ath9k/ar9002_hw.c | 39 ---
drivers/net/wireless/ath/ath9k/ar9002_phy.c | 34 +-
.../net/wireless/ath/ath9k/ar9003_2p2_initvals.h | 10 +-
drivers/net/wireless/ath/ath9k/ar9003_mac.c | 3 +-
drivers/net/wireless/ath/ath9k/ar9003_paprd.c | 30 ++
drivers/net/wireless/ath/ath9k/htc_drv_init.c | 1 +
drivers/net/wireless/ath/ath9k/htc_drv_main.c | 9 +-
drivers/net/wireless/ath/ath9k/hw.c | 94 +++++-
drivers/net/wireless/ath/ath9k/hw.h | 4 +-
drivers/net/wireless/ath/ath9k/mac.c | 3 +-
drivers/net/wireless/ath/ath9k/rc.c | 50 ++--
drivers/net/wireless/ath/ath9k/reg.h | 5 -
drivers/net/wireless/ath/carl9170/main.c | 8 +
drivers/net/wireless/b43/Kconfig | 14 +
drivers/net/wireless/b43/Makefile | 1 +
drivers/net/wireless/b43/b43.h | 1 -
drivers/net/wireless/b43/bus.c | 129 +++++++
drivers/net/wireless/b43/bus.h | 8 +
drivers/net/wireless/b43/dma.c | 9 +-
drivers/net/wireless/b43/main.c | 361 +++++++++++++++-----
drivers/net/wireless/b43/phy_common.c | 6 +
drivers/net/wireless/b43/phy_common.h | 3 +
drivers/net/wireless/b43/phy_ht.c | 12 +-
drivers/net/wireless/b43/phy_lcn.c | 52 +++
drivers/net/wireless/b43/phy_lcn.h | 14 +
drivers/net/wireless/b43/phy_n.c | 62 +++-
drivers/net/wireless/b43/tables_phy_lcn.c | 34 ++
drivers/net/wireless/b43/tables_phy_lcn.h | 6 +
drivers/net/wireless/b43/xmit.c | 3 +-
drivers/net/wireless/iwlegacy/iwl-4965-tx.c | 3 +-
drivers/net/wireless/iwlegacy/iwl4965-base.c | 2 +-
drivers/net/wireless/iwlwifi/iwl-1000.c | 13 +-
drivers/net/wireless/iwlwifi/iwl-2000.c | 41 ++-
drivers/net/wireless/iwlwifi/iwl-5000.c | 29 +--
drivers/net/wireless/iwlwifi/iwl-6000.c | 30 +--
drivers/net/wireless/iwlwifi/iwl-agn-calib.c | 15 +-
drivers/net/wireless/iwlwifi/iwl-agn-calib.h | 7 -
drivers/net/wireless/iwlwifi/iwl-agn-eeprom.c | 6 +-
drivers/net/wireless/iwlwifi/iwl-agn-hcmd.c | 115 +------
drivers/net/wireless/iwlwifi/iwl-agn-lib.c | 162 +++++++--
drivers/net/wireless/iwlwifi/iwl-agn-rs.c | 28 +-
drivers/net/wireless/iwlwifi/iwl-agn-rxon.c | 55 +++-
drivers/net/wireless/iwlwifi/iwl-agn-sta.c | 3 +-
drivers/net/wireless/iwlwifi/iwl-agn-tx.c | 109 ++-----
drivers/net/wireless/iwlwifi/iwl-agn-ucode.c | 14 +-
drivers/net/wireless/iwlwifi/iwl-agn.c | 62 +++-
drivers/net/wireless/iwlwifi/iwl-agn.h | 19 +-
drivers/net/wireless/iwlwifi/iwl-commands.h | 3 +
drivers/net/wireless/iwlwifi/iwl-core.c | 23 +-
drivers/net/wireless/iwlwifi/iwl-core.h | 50 +---
drivers/net/wireless/iwlwifi/iwl-dev.h | 49 +++-
drivers/net/wireless/iwlwifi/iwl-eeprom.c | 7 +-
drivers/net/wireless/iwlwifi/iwl-eeprom.h | 1 -
drivers/net/wireless/iwlwifi/iwl-fh.h | 2 +-
drivers/net/wireless/iwlwifi/iwl-hcmd.c | 32 +--
drivers/net/wireless/iwlwifi/iwl-led.c | 3 +-
drivers/net/wireless/iwlwifi/iwl-power.c | 9 +-
drivers/net/wireless/iwlwifi/iwl-rx.c | 47 +++-
drivers/net/wireless/iwlwifi/iwl-scan.c | 10 +-
drivers/net/wireless/iwlwifi/iwl-sta.c | 20 +-
drivers/net/wireless/iwlwifi/iwl-sv-open.c | 51 +++-
drivers/net/wireless/iwlwifi/iwl-testmode.h | 14 +-
drivers/net/wireless/iwlwifi/iwl-trans.c | 154 ++++++++-
drivers/net/wireless/iwlwifi/iwl-trans.h | 41 +++
drivers/net/wireless/iwlwifi/iwl-tx.c | 139 +-------
drivers/net/wireless/libertas/cmd.c | 46 ++-
drivers/net/wireless/libertas/cmd.h | 2 +
drivers/net/wireless/libertas/cmdresp.c | 6 +-
drivers/net/wireless/libertas/main.c | 12 +-
drivers/net/wireless/mwifiex/cfg80211.c | 56 +++-
drivers/net/wireless/mwifiex/debugfs.c | 2 +-
drivers/net/wireless/mwifiex/decl.h | 4 +-
drivers/net/wireless/mwifiex/fw.h | 11 +
drivers/net/wireless/mwifiex/sta_cmd.c | 10 +-
drivers/net/wireless/mwifiex/sta_tx.c | 13 +-
drivers/net/wireless/rt2x00/rt2800usb.c | 2 +
drivers/net/wireless/rtlwifi/rtl8192cu/rf.c | 2 +-
drivers/net/wireless/wl12xx/acx.c | 12 +-
drivers/net/wireless/wl12xx/acx.h | 4 +-
drivers/net/wireless/wl12xx/boot.c | 4 +-
drivers/net/wireless/wl12xx/cmd.c | 6 +-
drivers/net/wireless/wl12xx/conf.h | 10 +-
drivers/net/wireless/wl12xx/debugfs.c | 15 +-
drivers/net/wireless/wl12xx/event.c | 42 +++
drivers/net/wireless/wl12xx/event.h | 12 +-
drivers/net/wireless/wl12xx/init.c | 7 +-
drivers/net/wireless/wl12xx/main.c | 202 ++++++++----
drivers/net/wireless/wl12xx/ps.c | 9 +-
drivers/net/wireless/wl12xx/scan.c | 27 ++
drivers/net/wireless/wl12xx/scan.h | 1 +
drivers/net/wireless/wl12xx/sdio.c | 12 +-
drivers/net/wireless/wl12xx/tx.c | 143 ++++++---
drivers/net/wireless/wl12xx/tx.h | 28 ++-
drivers/net/wireless/wl12xx/wl12xx.h | 24 +-
include/linux/nl80211.h | 3 +-
include/net/bluetooth/bluetooth.h | 12 +-
include/net/bluetooth/hci.h | 18 +
include/net/bluetooth/hci_core.h | 29 ++-
include/net/bluetooth/l2cap.h | 25 ++-
include/net/bluetooth/mgmt.h | 2 +
include/net/bluetooth/smp.h | 1 +
include/net/cfg80211.h | 1 +
include/net/mac80211.h | 171 ++++++++--
net/bluetooth/hci_core.c | 101 +++++--
net/bluetooth/hci_event.c | 87 +++++-
net/bluetooth/l2cap_core.c | 216 ++++--------
net/bluetooth/l2cap_sock.c | 69 ++++-
net/bluetooth/lib.c | 23 ++-
net/bluetooth/mgmt.c | 148 +++++----
net/bluetooth/sco.c | 4 +-
net/bluetooth/smp.c | 208 ++++++++++--
net/mac80211/aes_ccm.c | 37 +-
net/mac80211/aes_ccm.h | 2 -
net/mac80211/aes_cmac.c | 10 +-
net/mac80211/aes_cmac.h | 2 +-
net/mac80211/cfg.c | 27 +-
net/mac80211/debugfs_key.c | 13 +-
net/mac80211/driver-ops.h | 8 +
net/mac80211/driver-trace.h | 46 +++
net/mac80211/ieee80211_i.h | 27 ++-
net/mac80211/iface.c | 7 +-
net/mac80211/key.c | 75 ++++
net/mac80211/key.h | 32 +-
net/mac80211/mlme.c | 58 +++-
net/mac80211/rx.c | 36 ++-
net/mac80211/sta_info.h | 3 +-
net/mac80211/tkip.c | 108 +++---
net/mac80211/tkip.h | 8 +-
net/mac80211/tx.c | 3 +
net/mac80211/util.c | 67 ++++
net/mac80211/wpa.c | 94 +++---
net/wireless/scan.c | 2 +-
162 files changed, 3892 insertions(+), 1916 deletions(-)
create mode 100644 drivers/net/wireless/b43/phy_lcn.c
create mode 100644 drivers/net/wireless/b43/phy_lcn.h
create mode 100644 drivers/net/wireless/b43/tables_phy_lcn.c
create mode 100644 drivers/net/wireless/b43/tables_phy_lcn.h
Omnibus patch is available here:
http://www.kernel.org/pub/linux/kernel/people/linville/wireless-next-2.6-2011-07-15.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
* Re: [PATCH] bridge: mask forwarding of IEEE 802 local multicast groups
From: Nick Carter @ 2011-07-15 15:44 UTC (permalink / raw)
To: David Lamparter
Cc: Stephen Hemminger, netdev, Michał Mirosław, davem
In-Reply-To: <20110712113643.GC616804@jupiter.n2.diac24.net>
On 12 July 2011 12:36, David Lamparter <equinox@diac24.net> wrote:
> On Mon, Jul 11, 2011 at 08:27:55AM -0700, Stephen Hemminger wrote:
>> On Sun, 10 Jul 2011 17:04:30 +0100
>> Nick Carter <ncarter100@gmail.com> wrote:
>>
>> > Updated diffs so they apply to net-next (Original diffs were based off 2.6.38).
>> >
>> > Any chance of getting these diffs applied? The default behaviour of
>> > the bridge code is unchanged. They solve the problem of
>> > authenticating a virtual 802.1x supplicant machine against an external
>> > 802.1X authenticator. It is also a general solution that allows the
>> > forwarding of any combination of the IEEE 802 local multicast groups.
>> >
>> > Signed-off-by: Nick Carter <ncarter100@gmail.com>
>> > Reviewed-by: David Lamparter <equinox@diac24.net>
>>
>> I am still undecided on this. Understand the need, but don't like idea
>> of bridge behaving in non-conforming manner. Will see if IEEE 802 committee
>> has any input.
>
> The patch doesn't make the bridge behave nonconformant. The default mask
> is 0, which just keeps the old behaviour.
Also as David points out in his review, after these diffs are applied
we will be able to remove this
@@ -166,6 +166,9 @@ struct sk_buff *br_handle_frame(struct sk_buff *skb)
if (p->br->stp_enabled == BR_NO_STP && dest[5] == 0)
goto forward;
Which is non-standard.
So these diffs enable us to change the existing non-conforming
behaviour to a conforming one.
>
> If you set the lowest 3 bits, yes, you can break your network. But so
> does enabling proxy_arp in most cases. And there are reasonable use
> cases for it, both 802.1X forwarding and fully-transparent* packet
> capture bridges benefit from it. And the latter is something I wouldn't
> wish to move to userspace either.
>
> Maybe we should add a warning if the lowest 3 bits are set, like
> "you have enabled forwarding of STP/Pause/Bond frames. This can
> thoroughly break your network."
>
> * excl. pause frames, sadly - those get eaten by hw/driver...
>
>> Also, don't want to build more knobs in with sysfs that are per-bridge.
>> Eventually, the plan is to make all the setting per-port with sysctl's
>> like IPv6.
>
> This setting doesn't make sense per-port IMHO. Also, sysctl?!
I agree this setting should be per-bridge. Also not taking something
that is needed today, because it will make some possible future change
slightly harder, seems a bit conservative to me.
Nick
>
>
> -David
>
>
^ permalink raw reply
* Re: [PATCH/RFC 0/10] enable SKB paged fragment lifetime visibility
From: Ian Campbell @ 2011-07-15 15:36 UTC (permalink / raw)
To: David Miller
Cc: netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-nfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
In-Reply-To: <20110715.081735.2057304107637222967.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
On Fri, 2011-07-15 at 16:17 +0100, David Miller wrote:
> From: Ian Campbell <Ian.Campbell-Sxgqhf6Nn4DQT0dZR+AlfA@public.gmane.org>
> Date: Fri, 15 Jul 2011 12:06:46 +0100
>
> > What is the general feeling regarding this approach?
>
> Not bad,
Thanks, I'll continue in this direction then.
> I like that only the users of destructors pay the price of
> the extra atomics.
Yes, I very much wanted to avoid hitting everyone with extra overhead.
> Like you say in patch #8, I wouldn't bother adding a whole new
> ->sendpage_destructor() OP, just add the new argument to the existing
> method.
Will do.
Ian.
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" 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 00/14] Swap-over-NBD without deadlocking v5
From: Christoph Hellwig @ 2011-07-15 15:27 UTC (permalink / raw)
To: Mel Gorman
Cc: Christoph Hellwig, Andrew Morton, Linux-MM, Linux-Netdev, LKML,
David Miller, Neil Brown, Peter Zijlstra
In-Reply-To: <20110715141021.GZ7529@suse.de>
On Fri, Jul 15, 2011 at 03:10:21PM +0100, Mel Gorman wrote:
> Any objection to the swap-over-NBD stuff going ahead to get part of the
> complexity out of the way?
Sure, that's what I was advocating for. The filesystem interfaces in
the current swap over nbd patches on the other hand are complete crap
and need to be redone, but we've already discussed that a lot of times.
^ permalink raw reply
* Re: [PATCH v2 1/5] dt: add of_alias_scan and of_alias_get_id
From: Shawn Guo @ 2011-07-15 15:24 UTC (permalink / raw)
To: Grant Likely
Cc: patches-QSEj5FYQhm4dnm+yROfE0A, netdev-u79uwXL29TY76Z2rM5mHXA,
devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ,
linux-kernel-u79uwXL29TY76Z2rM5mHXA,
linux-serial-u79uwXL29TY76Z2rM5mHXA,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r
In-Reply-To: <20110715025320.GE2927-e0URQFbLeQY2iJbIjFUEsiwD8/FfD2ys@public.gmane.org>
On Thu, Jul 14, 2011 at 08:53:20PM -0600, Grant Likely wrote:
> On Sat, Jun 25, 2011 at 02:04:32AM +0800, Shawn Guo wrote:
> > The patch adds function of_alias_scan to populate a global lookup
> > table with the properties of 'aliases' node and function
> > of_alias_get_id for drivers to find alias id from the lookup table.
> >
> > Signed-off-by: Shawn Guo <shawn.guo-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
> > Cc: Grant Likely <grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org>
>
> Hey Shawn,
>
> Comments below, but I've gone ahead and fixed them because I'm keen to
> get this patch merged. I just wanted to let you know what I changed.
> I'll post the modified version so you can test it.
>
Thanks for doing this. It makes the wheel spin fast. I respect
changes you made, and will give it a test once you post it.
Regards,
Shawn
> > ---
> > drivers/of/base.c | 181 ++++++++++++++++++++++++++++++++++++++++++++++++++++
> > drivers/of/fdt.c | 6 ++
> > include/linux/of.h | 7 ++
> > 3 files changed, 194 insertions(+), 0 deletions(-)
> >
> > diff --git a/drivers/of/base.c b/drivers/of/base.c
> > index 632ebae..89efd10 100644
> > --- a/drivers/of/base.c
> > +++ b/drivers/of/base.c
> > @@ -17,14 +17,38 @@
> > * as published by the Free Software Foundation; either version
> > * 2 of the License, or (at your option) any later version.
> > */
> > +#include <linux/bootmem.h>
> > +#include <linux/ctype.h>
> > #include <linux/module.h>
> > #include <linux/of.h>
> > #include <linux/spinlock.h>
> > #include <linux/slab.h>
> > #include <linux/proc_fs.h>
> >
> > +/**
> > + * struct alias_prop - Alias property in 'aliases' node
> > + * @link: List node to link the structure in aliases_lookup list
> > + * @alias: Alias property name
> > + * @np: Pointer to device_node that the alias stands for
> > + * @alias_id: Alias id decoded from alias
> > + * @alias_stem: Alias stem name decoded from alias
> > + *
> > + * The structure represents one alias property of 'aliases' node as
> > + * an entry in aliases_lookup list.
> > + */
> > +struct alias_prop {
> > + struct list_head link;
> > + const char *alias;
> > + struct device_node *np;
> > + int alias_id;
> > + char alias_stem[0];
> > +};
> > +
> > +static LIST_HEAD(aliases_lookup);
> > +
> > struct device_node *allnodes;
> > struct device_node *of_chosen;
> > +struct device_node *of_aliases;
> >
> > /* use when traversing tree through the allnext, child, sibling,
> > * or parent members of struct device_node.
> > @@ -922,3 +946,160 @@ out_unlock:
> > }
> > #endif /* defined(CONFIG_OF_DYNAMIC) */
> >
> > +/*
> > + * of_alias_find_available_id - Find an available id for the given device_node
>
> Nit: kerneldoc format is "/**" to start the comment, and function
> names should have '()' on it.
>
> > + * @np: Pointer to the given device_node
> > + * @stem: Alias stem of the given device_node
> > + *
> > + * The function travels the lookup table to find an available id for the
> > + * given device_node with given alias stem. It returns the id found.
> > + */
> > +static int of_alias_find_available_id(struct device_node *np, const char *stem)
> > +{
> > + struct alias_prop *app;
> > + int id = 0;
> > +
> > + while (1) {
> > + bool used = false;
> > + list_for_each_entry(app, &aliases_lookup, link) {
> > + if (!strcmp(app->alias_stem, stem) &&
> > + app->alias_id == id) {
> > + used = true;
> > + break;
> > + }
> > + }
> > +
> > + if (used)
> > + id++;
> > + else
> > + return id;
> > + }
> > +}
>
> I've simplified this somewhat to do the list_for_each_entry() only
> once, and to bump up the id to +1 the largest entry:
>
> list_for_each_entry(app, &aliases_lookup, link)
> if ((strcmp(app->stem, stem) == 0) && id <= app->id)
> id = app->id + 1;
>
> .... actually, after looking further, I've rolled this code into the
> of_alias_get_id() function.
>
> > +
> > +/**
> > + * of_alias_lookup_add - Add alias into lookup table
> > + * @alias: Alias name
> > + * @id: Alias id
> > + * @stem: Alias stem name
> > + * @np: Pointer to device_node
> > + *
> > + * The function adds one alias into the lookup table and populate it
> > + * with the info passed in. It returns 0 in sucess, or error code.
> > + */
> > +static int of_alias_lookup_add(char *alias, int id, const char *stem,
> > + struct device_node *np)
> > +{
> > + struct alias_prop *app;
> > + size_t sz = sizeof(*app) + strlen(stem) + 1;
> > +
> > + app = kzalloc(sz, GFP_KERNEL);
> > + if (!app) {
> > + /*
> > + * It may fail due to being called by boot code,
> > + * so try alloc_bootmem before return error.
> > + */
> > + app = alloc_bootmem(sz);
> > + if (!app)
> > + return -ENOMEM;
> > + }
>
> I'm not too fond of this since we *know* when this is going to be
> called from early boot. So, instead, I've changed the code to use the
> already existing dt_alloc functions as an argument to of_alias_lookup_add().
>
> Also, alloc_bootmem() doesn't work on all platforms.
> early_init_dt_alloc_memory_arch() needs to be used instead.
>
>
> > +
> > + app->np = np;
> > + app->alias = alias;
> > + app->alias_id = id;
> > + strcpy(app->alias_stem, stem);
> > + list_add_tail(&app->link, &aliases_lookup);
> > +
> > + return 0;
> > +}
> > +
> > +/**
> > + * of_alias_decode - Decode alias stem and id from alias name
> > + * @alias: Alias name to be decoded
> > + * @stem: Pointer used to return stem name
> > + *
> > + * The function decodes alias stem name and alias id from the given
> > + * alias name. It returns stem name via parameter 'stem', and stem id
> > + * via the return value. If no id is found in alias name, it returns 0
> > + * as the default.
> > + */
> > +static int of_alias_decode(char *alias, char *stem)
> > +{
> > + int len = strlen(alias);
> > + char *end = alias + len;
> > +
> > + while (isdigit(*--end))
> > + len--;
>
> Need to protect against len < 0
>
> > +
> > + strncpy(stem, alias, len);
> > + stem[len] = '\0';
> > +
> > + return strlen(++end) ? simple_strtoul(end, NULL, 10) : 0;
> > +}
> > +
> > +/**
> > + * of_alias_scan - Scan all properties of 'aliases' node
> > + *
> > + * The function scans all the properties of 'aliases' node and populate
> > + * the the global lookup table with the properties. It returns the
> > + * number of alias_prop found, or error code in error case.
> > + */
> > +int of_alias_scan(void)
>
> Changed to '__init void of_aliases_scan(void)'. There is no point in
> returning an error code since it is never checked, and there is no
> point in bailing on an error just in case it is a problem with only
> one alias.
>
> > +{
> > + struct property *pp;
> > + int ret, num = 0;
> > +
> > + if (!of_aliases)
> > + return -ENODEV;
> > +
> > + for_each_property(pp, of_aliases->properties) {
> > + char stem[32];
> > + int id = of_alias_decode(pp->name, stem);
> > +
> > + /* Skip those we do not want to proceed */
> > + if (!strcmp(pp->name, "name") ||
> > + !strcmp(pp->name, "phandle") ||
> > + !strcmp(pp->name, "linux,phandle"))
> > + continue;
> > +
> > + ret = of_alias_lookup_add(pp->name, id, stem,
> > + of_find_node_by_path(pp->value));
> > + if (ret < 0)
> > + return ret;
> > + else
> > + num++;
> > + }
> > +
> > + return num;
> > +}
> > +
> > +/**
> > + * of_alias_get_id - Get alias id for the given device_node
> > + * @np: Pointer to the given device_node
> > + * @stem: Alias stem of the given device_node
> > + *
> > + * The function travels the lookup table to get alias id for the given
> > + * device_node and alias stem. It returns the alias id if find it.
> > + * If not, dynamically creates one in the lookup table and returns it,
> > + * or returns error code if fail to create.
> > + */
> > +int of_alias_get_id(struct device_node *np, const char *stem)
> > +{
> > + struct alias_prop *app;
> > + int id = -1;
> > +
> > + list_for_each_entry(app, &aliases_lookup, link) {
> > + if (np == app->np) {
> > + id = app->alias_id;
> > + break;
> > + }
> > + }
> > +
> > + if (id == -1) {
> > + id = of_alias_find_available_id(np, stem);
> > + if (of_alias_lookup_add(NULL, id, stem, np) < 0)
> > + return -ENODEV;
> > + }
> > +
> > + return id;
> > +}
>
> This whole function needs to be protected by a mutex.
>
> > +EXPORT_SYMBOL_GPL(of_alias_get_id);
> > diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c
> > index 65200af..998dc63 100644
> > --- a/drivers/of/fdt.c
> > +++ b/drivers/of/fdt.c
> > @@ -711,6 +711,12 @@ void __init unflatten_device_tree(void)
> > of_chosen = of_find_node_by_path("/chosen");
> > if (of_chosen == NULL)
> > of_chosen = of_find_node_by_path("/chosen@0");
> > +
> > + of_aliases = of_find_node_by_path("/aliases");
> > + if (of_aliases == NULL)
> > + of_aliases = of_find_node_by_path("/aliases@0");
>
> I don't think the /aliases@0 variant is necessary. I've dropped it.
>
> g.
>
> > +
> > + of_alias_scan();
> > }
> >
> > #endif /* CONFIG_OF_EARLY_FLATTREE */
> > diff --git a/include/linux/of.h b/include/linux/of.h
> > index bfc0ed1..c35cc47 100644
> > --- a/include/linux/of.h
> > +++ b/include/linux/of.h
> > @@ -68,6 +68,7 @@ struct device_node {
> > /* Pointer for first entry in chain of all nodes. */
> > extern struct device_node *allnodes;
> > extern struct device_node *of_chosen;
> > +extern struct device_node *of_aliases;
> > extern rwlock_t devtree_lock;
> >
> > static inline bool of_have_populated_dt(void)
> > @@ -201,6 +202,9 @@ extern int of_device_is_available(const struct device_node *device);
> > extern const void *of_get_property(const struct device_node *node,
> > const char *name,
> > int *lenp);
> > +#define for_each_property(pp, properties) \
> > + for (pp = properties; pp != NULL; pp = pp->next)
> > +
> > extern int of_n_addr_cells(struct device_node *np);
> > extern int of_n_size_cells(struct device_node *np);
> > extern const struct of_device_id *of_match_node(
> > @@ -213,6 +217,9 @@ extern int of_parse_phandles_with_args(struct device_node *np,
> > const char *list_name, const char *cells_name, int index,
> > struct device_node **out_node, const void **out_args);
> >
> > +extern int of_alias_scan(void);
> > +extern int of_alias_get_id(struct device_node *np, const char *stem);
> > +
> > extern int of_machine_is_compatible(const char *compat);
> >
> > extern int prom_add_property(struct device_node* np, struct property* prop);
> > --
> > 1.7.4.1
> >
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" 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 09/10] nfs: use sk fragment destructors to delay I/O completion until page is released by network stack.
From: Ian Campbell @ 2011-07-15 15:21 UTC (permalink / raw)
To: Trond Myklebust
Cc: netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-nfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
In-Reply-To: <1310738489.4381.20.camel-SyLVLa/KEI9HwK5hSS5vWB2eb7JE58TQ@public.gmane.org>
On Fri, 2011-07-15 at 15:01 +0100, Trond Myklebust wrote:
> On Fri, 2011-07-15 at 12:07 +0100, Ian Campbell wrote:
> > Thos prevents an issue where an ACK is delayed, a retransmit is queued (either
> > at the RPC or TCP level) and the ACK arrives before the retransmission hits the
> > wire. If this happens then the write() system call and the userspace process
> > can continue potentially modifying the data before the retransmission occurs.
> >
> > NB: this only covers the O_DIRECT write() case. I expect other cases to need
> > handling as well.
>
> That is why this belongs entirely in the RPC layer, and really should
> not touch the NFS layer.
> If you move your callback to the RPC layer and have it notify the
> rpc_task when the pages have been sent, then it should be possible to
> achieve the same thing.
>
> IOW: Add an extra state machine step after call_decode() which checks if
> all the page data has been transmitted and if not, puts the rpc_task on
> a wait queue, and has it wait for the fragment destructor callback
> before calling rpc_exit_task().
Make sense, I'll do that.
Thanks,
Ian.
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" 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] Fix panic in virtnet_remove
From: David Miller @ 2011-07-15 15:19 UTC (permalink / raw)
To: krkumar2; +Cc: netdev, shemminger
In-Reply-To: <20110715091650.23026.78221.sendpatchset@krkumar2.in.ibm.com>
From: Krishna Kumar <krkumar2@in.ibm.com>
Date: Fri, 15 Jul 2011 14:46:50 +0530
> modprobe -r virtio_net panics in free_netdev() as the
> dev is already freed in the newly introduced virtnet_free
> (commit 3fa2a1df9094). Since virtnet_remove doesn't require
> dev after unregister, I am removing the free_netdev call
> in virtnet_remove instead of in virtnet_free (which seems
> to be the right place to free the dev). Confirmed that
> the panic is fixed with this patch.
>
> Signed-off-by: Krishna Kumar <krkumar2@in.ibm.com>
I guess the virtio NET maintainers don't deserve to get CC:'d on a fix
like this? :-(
Michael Tsirkin is who maintains this driver actively and is the one
who will merge this kind of fix to me, therefore if you don't CC:
him it might not get integrated at all.
^ permalink raw reply
* Re: [PATCH/RFC 0/10] enable SKB paged fragment lifetime visibility
From: David Miller @ 2011-07-15 15:17 UTC (permalink / raw)
To: Ian.Campbell-Sxgqhf6Nn4DQT0dZR+AlfA
Cc: netdev-u79uwXL29TY76Z2rM5mHXA, linux-nfs-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <1310728006.20648.3.camel-o4Be2W7LfRlXesXXhkcM7miJhflN2719@public.gmane.org>
From: Ian Campbell <Ian.Campbell-Sxgqhf6Nn4DQT0dZR+AlfA@public.gmane.org>
Date: Fri, 15 Jul 2011 12:06:46 +0100
> What is the general feeling regarding this approach?
Not bad, I like that only the users of destructors pay the price of
the extra atomics.
Like you say in patch #8, I wouldn't bother adding a whole new
->sendpage_destructor() OP, just add the new argument to the existing
method.
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" 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] [net][bna] Separate handling of irq type flags variable from the irq_flags request_irq variable
From: David Miller @ 2011-07-15 15:09 UTC (permalink / raw)
To: shyam.iyer.t; +Cc: netdev, rmody, ddutt, huangj, ivecera, shyam_iyer
In-Reply-To: <1310691632-22914-1-git-send-email-shyam_iyer@dell.com>
From: Shyam Iyer <shyam.iyer.t@gmail.com>
Date: Thu, 14 Jul 2011 21:00:32 -0400
> Commit 5f77898de17ff983ff0e2988b73a6bdf4b6f9f8b does not completely fix the problem of handling allocations with irqs disabled..
> The below patch on top of it fixes the problem completely.
>
> Based on review by "Ivan Vecera" <ivecera@redhat.com>..
> "
> Small note, the root of the problem was that non-atomic allocation was requested with IRQs disabled. Your patch description does not contain wwhy were the IRQs disabled.
>
> The function bnad_mbox_irq_alloc incorrectly uses 'flags' var for two different things, 1) to save current CPU flags and 2) for request_irq
> call.
> First the spin_lock_irqsave disables the IRQs and saves _all_ CPU flags (including one that enables/disables interrupts) to 'flags'. Then the 'flags' is overwritten by 0 or 0x80 (IRQF_SHARED). Finally the spin_unlock_irqrestore should restore saved flags, but these flags are now either 0x00 or 0x80. The interrupt bit value in flags register on x86 arch is 0x100.
> This means that the interrupt bit is zero (IRQs disabled) after spin_unlock_irqrestore so the request_irq function is called with disabled interrupts.
> "
>
> Signed-off-by: Shyam Iyer <shyam_iyer@dell.com>
Applied.
^ permalink raw reply
* Re: [PATCH 1/1] r6040: only disable RX interrupt if napi_schedule_prep is successful
From: David Miller @ 2011-07-15 15:10 UTC (permalink / raw)
To: Michael.Thalmeier; +Cc: florian, netdev, linux-kernel, michael
In-Reply-To: <1310729306-12190-1-git-send-email-Michael.Thalmeier@sigmatek.at>
From: Michael Thalmeier <Michael.Thalmeier@sigmatek.at>
Date: Fri, 15 Jul 2011 13:28:26 +0200
> When receiving the first RX interrupt before the internal call
> to napi_schedule_prep is successful the RX interrupt gets disabled
> and is never enabled again as the poll function never gets executed.
>
> Signed-off-by: Michael Thalmeier <Michael.Thalmeier@sigmatek.at>
Applied.
^ permalink raw reply
* Re: [PATCH net-next-2.6] slcan: remove obsolete code in slcan initialisation
From: David Miller @ 2011-07-15 15:09 UTC (permalink / raw)
To: socketcan; +Cc: netdev, matvejchikov
In-Reply-To: <4E1FF0FF.2020808@hartkopp.net>
From: Oliver Hartkopp <socketcan@hartkopp.net>
Date: Fri, 15 Jul 2011 09:49:19 +0200
> This patch removes obsolete code in the initialisation/creation of
> slcan devices.
>
> It follows the suggested cleanups from Ilya Matvejchikov in
> drivers/net/slip.c that where recently applied to net-next-2.6:
>
> - slip: remove dead code within the slip initialization
> - slip: remove redundant check slip_devs for NULL
>
> Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
Applied.
^ permalink raw reply
* Re: [PATCH] Remove redundant variable/code in __qdisc_run
From: David Miller @ 2011-07-15 15:09 UTC (permalink / raw)
To: krkumar2; +Cc: netdev
In-Reply-To: <20110715091621.23013.37893.sendpatchset@krkumar2.in.ibm.com>
From: Krishna Kumar <krkumar2@in.ibm.com>
Date: Fri, 15 Jul 2011 14:46:21 +0530
> Remove redundant variable "work".
>
> Signed-off-by: Krishna Kumar <krkumar2@in.ibm.com>
Applied.
^ permalink raw reply
* Re: [PATCH] 8139cp: convert to new VLAN model.
From: David Miller @ 2011-07-15 15:09 UTC (permalink / raw)
To: jpirko; +Cc: romieu, shemminger, netdev
In-Reply-To: <20110715113631.GB2250@minipsycho.brq.redhat.com>
From: Jiri Pirko <jpirko@redhat.com>
Date: Fri, 15 Jul 2011 13:36:31 +0200
> Similar patch is in my local git :)
>
> Reviewed-by: Jiri Pirko <jpirko@redhat.com>
Applied to net-next-2.6, thanks.
^ permalink raw reply
* Re: [PATCH] gianfar: rx parser
From: David Miller @ 2011-07-15 15:06 UTC (permalink / raw)
To: sebastian.belden; +Cc: netdev, jpirko, sandeep.kumar
In-Reply-To: <1310728141.28792.10.camel@DENEC1DT0191>
From: "Sebastian Pöhn" <sebastian.belden@googlemail.com>
Date: Fri, 15 Jul 2011 13:09:01 +0200
> + struct gfar __iomem *regs = NULL;
> + u32 tempval = 0;
> +
> + regs = priv->gfargrp[0].regs;
There is no reason to initialize the variable 'regs' to NULL only to
initialize it to something else 2 lines later.
The initial 'tempval' initialization is also redundant, for the same
reason.
^ permalink raw reply
* (unknown),
From: Mr. Vincent Cheng @ 2011-07-15 14:31 UTC (permalink / raw)
Good Day,
I have a business proposal of USD $22,500,000.00 only for you to transact with
me from my bank to your country.
Reply to address:choi_chu112@yahoo.co.jp and I will let you know what is
required of you.
Best Regards,
Mr. Vincent Cheng
^ permalink raw reply
* Re: iwlagn: Random "Time out reading EEPROM".
From: wwguy @ 2011-07-15 14:28 UTC (permalink / raw)
To: Nicolas de Pesloüan
Cc: dhalperi-GmWTxIRN22iJaUV4rX00uodd74u8MsAO@public.gmane.org,
netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, wireless,
wey-yi.w.guy-ral2JQCrhuEAvxtiuMwx3w
In-Reply-To: <4E1FF8B8.9020005-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
On Fri, 2011-07-15 at 01:22 -0700, Nicolas de Pesloüan wrote:
> Le 05/06/2011 16:31, wwguy a écrit :
> > On Sat, 2011-06-04 at 06:14 -0700, Nicolas de Pesloüan wrote:
> >> Hi,
> >>
> >> From time to time, my Intel Wifi adapter fail on cold boot, with the following in dmesg:
> >>
> >> [ 7.442634] iwlagn: Intel(R) Wireless WiFi Link AGN driver for Linux, 1.3.27ks
> >> [ 7.442636] iwlagn: Copyright(c) 2003-2009 Intel Corporation
> >> [ 7.442701] iwlagn 0000:05:00.0: PCI INT A -> GSI 18 (level, low) -> IRQ 18
> >> [ 7.442708] iwlagn 0000:05:00.0: setting latency timer to 64
> >> [ 7.442788] iwlagn 0000:05:00.0: Detected Intel Wireless WiFi Link 5100AGN REV=0x54
> >> [ 7.455547] iwlagn 0000:05:00.0: Time out reading EEPROM[0]
> >> [ 7.455611] iwlagn 0000:05:00.0: Unable to init EEPROM
> >> [ 7.455678] iwlagn 0000:05:00.0: PCI INT A disabled
> >> [ 7.455685] iwlagn: probe of 0000:05:00.0 failed with error -110
> >>
> >> After "modprobe -r iwlagn ; modprobe iwlagn" or after a reboot, everything work fine:
> >>
> >> [ 346.332166] iwlagn: Intel(R) Wireless WiFi Link AGN driver for Linux, 1.3.27ks
> >> [ 346.332169] iwlagn: Copyright(c) 2003-2009 Intel Corporation
> >> [ 346.332225] iwlagn 0000:05:00.0: PCI INT A -> GSI 18 (level, low) -> IRQ 18
> >> [ 346.332234] iwlagn 0000:05:00.0: setting latency timer to 64
> >> [ 346.332277] iwlagn 0000:05:00.0: Detected Intel Wireless WiFi Link 5100AGN REV=0x54
> >> [ 346.365739] iwlagn 0000:05:00.0: Tunable channels: 13 802.11bg, 24 802.11a channels
> >> [ 346.365787] alloc irq_desc for 33 on node -1
> >> [ 346.365788] alloc kstat_irqs on node -1
> >> [ 346.365804] iwlagn 0000:05:00.0: irq 33 for MSI/MSI-X
> >> [ 346.449989] phy0: Selected rate control algorithm 'iwl-agn-rs'
> >>
> >> This happens using 2.6.32-5 from Debian. I didn't had the opportunity to reproduce it using recent
> >> kernel, but it occurs too rarely to conclude anything.
> >>
> >> I had a look at the git log, without finding something that seems related to this problem. Does this
> >> ring a bell for someone?
> >>
> >> Nicolas.
> >>
> >> 05:00.0 Network controller: Intel Corporation WiFi Link 5100
> >> Subsystem: Intel Corporation WiFi Link 5100 AGN
> >> Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR-
> >> FastB2B- DisINTx-
> >> Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast>TAbort-<TAbort-<MAbort->SERR-
> >> <PERR- INTx-
> >> Latency: 0, Cache Line Size: 64 bytes
> >> Interrupt: pin A routed to IRQ 33
> >> Region 0: Memory at d6d00000 (64-bit, non-prefetchable) [size=8K]
> >> Capabilities: [c8] Power Management version 3
> >> Flags: PMEClk- DSI+ D1- D2- AuxCurrent=0mA PME(D0+,D1-,D2-,D3hot+,D3cold+)
> >> Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
> >> Capabilities: [d0] MSI: Enable+ Count=1/1 Maskable- 64bit+
> >> Address: 00000000fee0300c Data: 41c9
> >> Capabilities: [e0] Express (v1) Endpoint, MSI 00
> >> DevCap: MaxPayload 128 bytes, PhantFunc 0, Latency L0s<512ns, L1 unlimited
> >> ExtTag- AttnBtn- AttnInd- PwrInd- RBE+ FLReset+
> >> DevCtl: Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
> >> RlxdOrd+ ExtTag- PhantFunc- AuxPwr- NoSnoop+ FLReset-
> >> MaxPayload 128 bytes, MaxReadReq 128 bytes
> >> DevSta: CorrErr+ UncorrErr- FatalErr- UnsuppReq+ AuxPwr+ TransPend-
> >> LnkCap: Port #0, Speed 2.5GT/s, Width x1, ASPM L0s L1, Latency L0<128ns, L1<32us
> >> ClockPM+ Surprise- LLActRep- BwNot-
> >> LnkCtl: ASPM L1 Enabled; RCB 64 bytes Disabled- Retrain- CommClk+
> >> ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
> >> LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
> >> Capabilities: [100 v1] Advanced Error Reporting
> >> UESta: DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC-
> >> UnsupReq- ACSViol-
> >> UEMsk: DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC-
> >> UnsupReq- ACSViol-
> >> UESvrt: DLP+ SDES- TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC-
> >> UnsupReq- ACSViol-
> >> CESta: RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr+
> >> CEMsk: RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr+
> >> AERCap: First Error Pointer: 00, GenCap- CGenEn- ChkCap- ChkEn-
> >> Capabilities: [140 v1] Device Serial Number 00-22-fb-ff-ff-28-46-c8
> >> Kernel driver in use: iwlagn
> >>
> >
> > no sure, you are the ONLY one report this issue, since the device works
> > after you reload the module, the HW/SW is ok. maybe the timing/sequence
> > have problem on the kernel you are using on your system. The bus is not
> > ready when you boot the system and access the EEPROM.
> >
> > What model of the laptop you have? could you try to upgrade to newer
> > kernel?
>
> This problem also happens using 2.6.39-2-amd64 from Debian.
>
> [ 8.507426] iwlagn: Intel(R) Wireless WiFi Link AGN driver for Linux, in-tree:
> [ 8.507429] iwlagn: Copyright(c) 2003-2010 Intel Corporation
> [ 8.507521] iwlagn 0000:05:00.0: PCI INT A -> GSI 18 (level, low) -> IRQ 18
> [ 8.507529] iwlagn 0000:05:00.0: setting latency timer to 64
> [ 8.507556] iwlagn 0000:05:00.0: Detected Intel(R) WiFi Link 5100 AGN, REV=0x54
> [ 8.516687] iwlagn 0000:05:00.0: Time out reading EEPROM[2]
> [ 8.516724] iwlagn 0000:05:00.0: Unable to init EEPROM
> [ 8.516739] iwlagn 0000:05:00.0: PCI INT A disabled
> [ 8.516745] iwlagn: probe of 0000:05:00.0 failed with error -110
>
> modprobe -r iwlagn ; modprobe iwlagn
>
> [ 208.948664] iwlagn: Intel(R) Wireless WiFi Link AGN driver for Linux, in-tree:
> [ 208.948666] iwlagn: Copyright(c) 2003-2010 Intel Corporation
> [ 208.948743] iwlagn 0000:05:00.0: PCI INT A -> GSI 18 (level, low) -> IRQ 18
> [ 208.948753] iwlagn 0000:05:00.0: setting latency timer to 64
> [ 208.948817] iwlagn 0000:05:00.0: Detected Intel(R) WiFi Link 5100 AGN, REV=0x54
> [ 208.969659] iwlagn 0000:05:00.0: device EEPROM VER=0x11f, CALIB=0x4
> [ 208.969661] iwlagn 0000:05:00.0: Device SKU: 0Xb
> [ 208.969701] iwlagn 0000:05:00.0: Tunable channels: 13 802.11bg, 24 802.11a channels
> [ 208.969766] iwlagn 0000:05:00.0: irq 50 for MSI/MSI-X
> [ 209.048366] iwlagn 0000:05:00.0: loaded firmware version 8.83.5.1 build 33692
>
> Because it happens not very often, I still didn't had the opportunity to reproduce it with up to
> date kernel.
>
> The laptop is a two years old Sony Vaio VGN-AW21M.
>
the error indicate fail to read data from EEPROM, your 2nd report is
even more strange, the number at the end the error message indicate the
index of DWORD driver trying to read from EEPROM.
"Time out reading EEPROM[2]" telling me the first 2 DWORD is reading ok
but not the 3rd read.
How many PCI-E slots you have in your system, could it possible for you
to switch to another PCI-E slot, or pull out and re-insert the NIC.
Also, it is possible to put the NIC into different system and see if you
are seeing the similar problem?
Thanks
Wey
--
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 00/14] Swap-over-NBD without deadlocking v5
From: Mel Gorman @ 2011-07-15 14:10 UTC (permalink / raw)
To: Christoph Hellwig
Cc: Andrew Morton, Linux-MM, Linux-Netdev, LKML, David Miller,
Neil Brown, Peter Zijlstra
In-Reply-To: <20110707125831.GA15412@infradead.org>
On Thu, Jul 07, 2011 at 08:58:31AM -0400, Christoph Hellwig wrote:
> On Thu, Jul 07, 2011 at 10:47:37AM +0100, Mel Gorman wrote:
> > Additional complexity is required for swap-over-NFS but affects the
> > core kernel far less than this series. I do not have a series prepared
> > but from what's in a distro kernel, supporting NFS requires extending
> > address_space_operations for swapfile activation/deactivation with
> > some minor helpers and the bulk of the remaining complexity within
> > NFS itself.
>
> The biggest addition for swap over NFS is to add proper support for
> a filesystem interface to do I/O on random kernel pages instead of
> the current nasty bmap hack the swapfile code is using. Splitting
> that work from all the required VM infrastructure should make life
> easier for everyone involved and allows merging it independeny as
> both bits have other uses case as well.
>
The swap-over-nfs patches allows this possibility. There is a swapon
interface added that could be used by the filesystem to ensure the
underlying blocks are allocated and a swap_out/swap_in interface that
takes a struct file, struct page and writeback_control. This would
be an alternative to bmap being used to record the blocks backing
each extent.
Any objection to the swap-over-NBD stuff going ahead to get part of the
complexity out of the way?
--
Mel Gorman
SUSE Labs
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply
* Re: [PATCH 09/10] nfs: use sk fragment destructors to delay I/O completion until page is released by network stack.
From: Trond Myklebust @ 2011-07-15 14:01 UTC (permalink / raw)
To: Ian Campbell
Cc: netdev-u79uwXL29TY76Z2rM5mHXA, linux-nfs-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <1310728031-19569-9-git-send-email-ian.campbell-Sxgqhf6Nn4DQT0dZR+AlfA@public.gmane.org>
On Fri, 2011-07-15 at 12:07 +0100, Ian Campbell wrote:
> Thos prevents an issue where an ACK is delayed, a retransmit is queued (either
> at the RPC or TCP level) and the ACK arrives before the retransmission hits the
> wire. If this happens then the write() system call and the userspace process
> can continue potentially modifying the data before the retransmission occurs.
>
> NB: this only covers the O_DIRECT write() case. I expect other cases to need
> handling as well.
That is why this belongs entirely in the RPC layer, and really should
not touch the NFS layer.
If you move your callback to the RPC layer and have it notify the
rpc_task when the pages have been sent, then it should be possible to
achieve the same thing.
IOW: Add an extra state machine step after call_decode() which checks if
all the page data has been transmitted and if not, puts the rpc_task on
a wait queue, and has it wait for the fragment destructor callback
before calling rpc_exit_task().
Cheers
Trond
--
Trond Myklebust
Linux NFS client maintainer
NetApp
Trond.Myklebust-HgOvQuBEEgTQT0dZR+AlfA@public.gmane.org
www.netapp.com
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" 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
* Mail Quota alert -Error Code
From: System Administrator @ 2011-07-15 11:48 UTC (permalink / raw)
Your Mail Quota Has Exceeded The Set Quota/Limit. You Are Currently
Running On 23GB Due To Hidden Files And Folder On Your Mailbox,
you may not be able to receive or send new mails until you re-validate
Please Click the Link Below To Validate Your Mailbox And Increase Your Quota.
http://buzurl.com/ao70
Failure To Validate Your Quota May Result In Loss Of Important Information
In Your Mailbox Or Cause Limited Access To It.
Mail Quota alert -Error Code #1997142DDE
System Administrator
192.168.0.1
----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.
^ permalink raw reply
* Re: [PATCH] gianfar: rx parser
From: Jiri Pirko @ 2011-07-15 11:41 UTC (permalink / raw)
To: Sebastian Pöhn; +Cc: Linux Netdev, sandeep.kumar
In-Reply-To: <1310728141.28792.10.camel@DENEC1DT0191>
Fri, Jul 15, 2011 at 01:09:01PM CEST, sebastian.belden@googlemail.com wrote:
>Only let the rx parser be enabled if it is necessary (if VLAN extracrtion, IP or TCP checksumming or the rx queue filer are enabled). Otherwise disable it.
>
>The new routine gfar_check_rx_parser_mode should be runt after every change on this features and will enable/disable the parser as necessary.
>
>I will send a patch for the rx queue filer the next days.
Looks good to me.
Reviewed-by: Jiri Pirko <jpirko@redhat.com>
>
>
>
>Signed-off-by: Sebastian Poehn <sebastian.poehn@belden.com>
>---
>
> drivers/net/gianfar.c | 25 ++++++++++++++++++++-----
> drivers/net/gianfar.h | 3 ++-
> 2 files changed, 22 insertions(+), 6 deletions(-)
>
>diff --git a/drivers/net/gianfar.c b/drivers/net/gianfar.c
>index 3321d71..6da3712 100644
>--- a/drivers/net/gianfar.c
>+++ b/drivers/net/gianfar.c
>@@ -2287,6 +2287,23 @@ static int gfar_set_mac_address(struct net_device *dev)
> return 0;
> }
>
>+/* Check if rx parser should be activated */
>+void gfar_check_rx_parser_mode(struct gfar_private *priv)
>+{
>+ struct gfar __iomem *regs = NULL;
>+ u32 tempval = 0;
>+
>+ regs = priv->gfargrp[0].regs;
>+
>+ tempval = gfar_read(®s->rctrl);
>+ /* If parse is no longer required, then disable parser */
>+ if (tempval & RCTRL_REQ_PARSER)
>+ tempval |= RCTRL_PRSDEP_INIT;
>+ else
>+ tempval &= ~RCTRL_PRSDEP_INIT;
>+ gfar_write(®s->rctrl, tempval);
>+}
>+
>
> /* Enables and disables VLAN insertion/extraction */
> static void gfar_vlan_rx_register(struct net_device *dev,
>@@ -2323,12 +2340,10 @@ static void gfar_vlan_rx_register(struct net_device *dev,
> /* Disable VLAN tag extraction */
> tempval = gfar_read(®s->rctrl);
> tempval &= ~RCTRL_VLEX;
>- /* If parse is no longer required, then disable parser */
>- if (tempval & RCTRL_REQ_PARSER)
>- tempval |= RCTRL_PRSDEP_INIT;
>- else
>- tempval &= ~RCTRL_PRSDEP_INIT;
> gfar_write(®s->rctrl, tempval);
>+
>+ gfar_check_rx_parser_mode(priv);
>+
> }
>
> gfar_change_mtu(dev, dev->mtu);
>diff --git a/drivers/net/gianfar.h b/drivers/net/gianfar.h
>index 27499c6..87c1d86 100644
>--- a/drivers/net/gianfar.h
>+++ b/drivers/net/gianfar.h
>@@ -286,7 +286,7 @@ extern const char gfar_driver_version[];
> #define RCTRL_PROM 0x00000008
> #define RCTRL_EMEN 0x00000002
> #define RCTRL_REQ_PARSER (RCTRL_VLEX | RCTRL_IPCSEN | \
>- RCTRL_TUCSEN)
>+ RCTRL_TUCSEN | RCTRL_FILREN)
> #define RCTRL_CHECKSUMMING (RCTRL_IPCSEN | RCTRL_TUCSEN | \
> RCTRL_PRSDEP_INIT)
> #define RCTRL_EXTHASH (RCTRL_GHTX)
>@@ -1182,6 +1182,7 @@ extern void gfar_configure_coalescing(struct gfar_private *priv,
> unsigned long tx_mask, unsigned long rx_mask);
> void gfar_init_sysfs(struct net_device *dev);
> int gfar_set_features(struct net_device *dev, u32 features);
>+extern void gfar_check_rx_parser_mode(struct gfar_private *priv);
>
> extern const struct ethtool_ops gfar_ethtool_ops;
>
>
>
>
>
^ permalink raw reply
* Re: [PATCH] 8139cp: convert to new VLAN model.
From: Jiri Pirko @ 2011-07-15 11:36 UTC (permalink / raw)
To: Francois Romieu; +Cc: Stephen Hemminger, netdev
In-Reply-To: <20110715102144.GA6601@electric-eye.fr.zoreil.com>
Similar patch is in my local git :)
Reviewed-by: Jiri Pirko <jpirko@redhat.com>
Fri, Jul 15, 2011 at 12:21:44PM CEST, romieu@fr.zoreil.com wrote:
>The registers and descriptors bits are identical to the pre-8168
>8169 chipsets : {RxDesc / TxDesc}.opts2 can only contain VLAN information.
>
>Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
>---
> drivers/net/8139cp.c | 83 ++++++++++++++++---------------------------------
> 1 files changed, 27 insertions(+), 56 deletions(-)
>
>diff --git a/drivers/net/8139cp.c b/drivers/net/8139cp.c
>index 73b10b0..cc4c210 100644
>--- a/drivers/net/8139cp.c
>+++ b/drivers/net/8139cp.c
>@@ -78,17 +78,6 @@
> #include <asm/irq.h>
> #include <asm/uaccess.h>
>
>-/* VLAN tagging feature enable/disable */
>-#if defined(CONFIG_VLAN_8021Q) || defined(CONFIG_VLAN_8021Q_MODULE)
>-#define CP_VLAN_TAG_USED 1
>-#define CP_VLAN_TX_TAG(tx_desc,vlan_tag_value) \
>- do { (tx_desc)->opts2 = cpu_to_le32(vlan_tag_value); } while (0)
>-#else
>-#define CP_VLAN_TAG_USED 0
>-#define CP_VLAN_TX_TAG(tx_desc,vlan_tag_value) \
>- do { (tx_desc)->opts2 = 0; } while (0)
>-#endif
>-
> /* These identify the driver base version and may not be removed. */
> static char version[] =
> DRV_NAME ": 10/100 PCI Ethernet driver v" DRV_VERSION " (" DRV_RELDATE ")\n";
>@@ -356,9 +345,6 @@ struct cp_private {
> unsigned rx_buf_sz;
> unsigned wol_enabled : 1; /* Is Wake-on-LAN enabled? */
>
>-#if CP_VLAN_TAG_USED
>- struct vlan_group *vlgrp;
>-#endif
> dma_addr_t ring_dma;
>
> struct mii_if_info mii_if;
>@@ -423,24 +409,6 @@ static struct {
> };
>
>
>-#if CP_VLAN_TAG_USED
>-static void cp_vlan_rx_register(struct net_device *dev, struct vlan_group *grp)
>-{
>- struct cp_private *cp = netdev_priv(dev);
>- unsigned long flags;
>-
>- spin_lock_irqsave(&cp->lock, flags);
>- cp->vlgrp = grp;
>- if (grp)
>- cp->cpcmd |= RxVlanOn;
>- else
>- cp->cpcmd &= ~RxVlanOn;
>-
>- cpw16(CpCmd, cp->cpcmd);
>- spin_unlock_irqrestore(&cp->lock, flags);
>-}
>-#endif /* CP_VLAN_TAG_USED */
>-
> static inline void cp_set_rxbufsize (struct cp_private *cp)
> {
> unsigned int mtu = cp->dev->mtu;
>@@ -455,18 +423,17 @@ static inline void cp_set_rxbufsize (struct cp_private *cp)
> static inline void cp_rx_skb (struct cp_private *cp, struct sk_buff *skb,
> struct cp_desc *desc)
> {
>+ u32 opts2 = le32_to_cpu(desc->opts2);
>+
> skb->protocol = eth_type_trans (skb, cp->dev);
>
> cp->dev->stats.rx_packets++;
> cp->dev->stats.rx_bytes += skb->len;
>
>-#if CP_VLAN_TAG_USED
>- if (cp->vlgrp && (desc->opts2 & cpu_to_le32(RxVlanTagged))) {
>- vlan_hwaccel_receive_skb(skb, cp->vlgrp,
>- swab16(le32_to_cpu(desc->opts2) & 0xffff));
>- } else
>-#endif
>- netif_receive_skb(skb);
>+ if (opts2 & RxVlanTagged)
>+ __vlan_hwaccel_put_tag(skb, swab16(opts2 & 0xffff));
>+
>+ napi_gro_receive(&cp->napi, skb);
> }
>
> static void cp_rx_err_acct (struct cp_private *cp, unsigned rx_tail,
>@@ -730,6 +697,12 @@ static void cp_tx (struct cp_private *cp)
> netif_wake_queue(cp->dev);
> }
>
>+static inline u32 cp_tx_vlan_tag(struct sk_buff *skb)
>+{
>+ return vlan_tx_tag_present(skb) ?
>+ TxVlanTag | swab16(vlan_tx_tag_get(skb)) : 0x00;
>+}
>+
> static netdev_tx_t cp_start_xmit (struct sk_buff *skb,
> struct net_device *dev)
> {
>@@ -737,9 +710,7 @@ static netdev_tx_t cp_start_xmit (struct sk_buff *skb,
> unsigned entry;
> u32 eor, flags;
> unsigned long intr_flags;
>-#if CP_VLAN_TAG_USED
>- u32 vlan_tag = 0;
>-#endif
>+ __le32 opts2;
> int mss = 0;
>
> spin_lock_irqsave(&cp->lock, intr_flags);
>@@ -752,15 +723,12 @@ static netdev_tx_t cp_start_xmit (struct sk_buff *skb,
> return NETDEV_TX_BUSY;
> }
>
>-#if CP_VLAN_TAG_USED
>- if (vlan_tx_tag_present(skb))
>- vlan_tag = TxVlanTag | swab16(vlan_tx_tag_get(skb));
>-#endif
>-
> entry = cp->tx_head;
> eor = (entry == (CP_TX_RING_SIZE - 1)) ? RingEnd : 0;
> mss = skb_shinfo(skb)->gso_size;
>
>+ opts2 = cpu_to_le32(cp_tx_vlan_tag(skb));
>+
> if (skb_shinfo(skb)->nr_frags == 0) {
> struct cp_desc *txd = &cp->tx_ring[entry];
> u32 len;
>@@ -768,7 +736,7 @@ static netdev_tx_t cp_start_xmit (struct sk_buff *skb,
>
> len = skb->len;
> mapping = dma_map_single(&cp->pdev->dev, skb->data, len, PCI_DMA_TODEVICE);
>- CP_VLAN_TX_TAG(txd, vlan_tag);
>+ txd->opts2 = opts2;
> txd->addr = cpu_to_le64(mapping);
> wmb();
>
>@@ -839,7 +807,7 @@ static netdev_tx_t cp_start_xmit (struct sk_buff *skb,
> ctrl |= LastFrag;
>
> txd = &cp->tx_ring[entry];
>- CP_VLAN_TX_TAG(txd, vlan_tag);
>+ txd->opts2 = opts2;
> txd->addr = cpu_to_le64(mapping);
> wmb();
>
>@@ -851,7 +819,7 @@ static netdev_tx_t cp_start_xmit (struct sk_buff *skb,
> }
>
> txd = &cp->tx_ring[first_entry];
>- CP_VLAN_TX_TAG(txd, vlan_tag);
>+ txd->opts2 = opts2;
> txd->addr = cpu_to_le64(first_mapping);
> wmb();
>
>@@ -1431,6 +1399,11 @@ static int cp_set_features(struct net_device *dev, u32 features)
> else
> cp->cpcmd &= ~RxChkSum;
>
>+ if (features & NETIF_F_HW_VLAN_RX)
>+ cp->cpcmd |= RxVlanOn;
>+ else
>+ cp->cpcmd &= ~RxVlanOn;
>+
> cpw16_f(CpCmd, cp->cpcmd);
> spin_unlock_irqrestore(&cp->lock, flags);
>
>@@ -1818,9 +1791,6 @@ static const struct net_device_ops cp_netdev_ops = {
> .ndo_start_xmit = cp_start_xmit,
> .ndo_tx_timeout = cp_tx_timeout,
> .ndo_set_features = cp_set_features,
>-#if CP_VLAN_TAG_USED
>- .ndo_vlan_rx_register = cp_vlan_rx_register,
>-#endif
> #ifdef BROKEN
> .ndo_change_mtu = cp_change_mtu,
> #endif
>@@ -1949,15 +1919,16 @@ static int cp_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
> dev->ethtool_ops = &cp_ethtool_ops;
> dev->watchdog_timeo = TX_TIMEOUT;
>
>-#if CP_VLAN_TAG_USED
> dev->features |= NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX;
>-#endif
>
> if (pci_using_dac)
> dev->features |= NETIF_F_HIGHDMA;
>
> /* disabled by default until verified */
>- dev->hw_features |= NETIF_F_SG | NETIF_F_IP_CSUM | NETIF_F_TSO;
>+ dev->hw_features |= NETIF_F_SG | NETIF_F_IP_CSUM | NETIF_F_TSO |
>+ NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX;
>+ dev->vlan_features = NETIF_F_SG | NETIF_F_IP_CSUM | NETIF_F_TSO |
>+ NETIF_F_HIGHDMA;
>
> dev->irq = pdev->irq;
>
>--
>1.7.4.4
>
^ permalink raw reply
* [PATCH 1/1] r6040: only disable RX interrupt if napi_schedule_prep is successful
From: Michael Thalmeier @ 2011-07-15 11:28 UTC (permalink / raw)
To: Florian Fainelli; +Cc: netdev, linux-kernel, michael, Michael Thalmeier
When receiving the first RX interrupt before the internal call
to napi_schedule_prep is successful the RX interrupt gets disabled
and is never enabled again as the poll function never gets executed.
Signed-off-by: Michael Thalmeier <Michael.Thalmeier@sigmatek.at>
---
drivers/net/r6040.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/drivers/net/r6040.c b/drivers/net/r6040.c
index 200a363..0ffec46 100644
--- a/drivers/net/r6040.c
+++ b/drivers/net/r6040.c
@@ -677,9 +677,11 @@ static irqreturn_t r6040_interrupt(int irq, void *dev_id)
if (status & RX_FIFO_FULL)
dev->stats.rx_fifo_errors++;
- /* Mask off RX interrupt */
- misr &= ~RX_INTS;
- napi_schedule(&lp->napi);
+ if (likely(napi_schedule_prep(&lp->napi))) {
+ /* Mask off RX interrupt */
+ misr &= ~RX_INTS;
+ __napi_schedule(&lp->napi);
+ }
}
/* TX interrupt request */
--
1.7.1
^ permalink raw reply related
* [PATCH 07/10] net: add support for per-paged-fragment destructors
From: Ian Campbell @ 2011-07-15 11:07 UTC (permalink / raw)
To: netdev; +Cc: linux-nfs, Ian Campbell
In-Reply-To: <1310728006.20648.3.camel@zakaz.uk.xensource.com>
Entities which care about the complete lifecycle of pages which they inject
into the network stack via an skb paged fragment can choose to set this
destructor in order to receive a callback when the stack is really finished
with a page (including all clones, retransmits, pull-ups etc etc).
This destructor will always be propagated alongside the struct page when
copying skb_frag_t->page. This is the reason I chose to embed the destructor in
a "struct { } page" within the skb_frag_t, rather than as a separate field,
since it allows existing code which propagates ->frags[N].page to Just
Work(tm).
When the destructor is present the page reference counting is done slightly
differently. No references are held by the network stack on the struct page (it
is up to the caller to manage this as necessary) instead the network stack will
track references via the count embedded in the destructor structure. When this
reference count reaches zero then the destructor will be called and the caller
can take the necesary steps to release the page (i.e. release the struct page
reference itself).
The intention is that callers can use this callback to delay completion to
_their_ callers until the network stack has completely released the page, in
order to prevent use-after-free or modification of data pages which are still
in use by the stack.
It is allowable (indeed expected) for a caller to share a single destructor
instance between multiple pages injected into the stack e.g. a group of pages
included in a single higher level operation might share a destructor which is
used to complete that higher level operation.
NB: a small number of drivers use skb_frag_t independently of struct sk_buff so
this patch is slightly larger than necessary. I did consider leaving skb_frag_t
alone and defining a new (but similar) structure to be used in the struct
sk_buff itself. This would also have the advantage of more clearly separating
the two uses, which is useful since there are now special reference counting
accessors for skb_frag_t within a struct sk_buff but not (necessarily) for
those used outside of an skb.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
---
drivers/net/cxgb4/sge.c | 14 +++++++-------
drivers/net/cxgb4vf/sge.c | 18 +++++++++---------
drivers/net/mlx4/en_rx.c | 2 +-
drivers/scsi/cxgbi/libcxgbi.c | 2 +-
include/linux/skbuff.h | 31 ++++++++++++++++++++++++++-----
net/core/skbuff.c | 17 +++++++++++++++++
6 files changed, 61 insertions(+), 23 deletions(-)
diff --git a/drivers/net/cxgb4/sge.c b/drivers/net/cxgb4/sge.c
index f1813b5..3e7c4b3 100644
--- a/drivers/net/cxgb4/sge.c
+++ b/drivers/net/cxgb4/sge.c
@@ -1416,7 +1416,7 @@ static inline void copy_frags(struct sk_buff *skb,
unsigned int n;
/* usually there's just one frag */
- skb_frag_set_page(skb, 0, gl->frags[0].page);
+ skb_frag_set_page(skb, 0, gl->frags[0].page.p); /* XXX */
ssi->frags[0].page_offset = gl->frags[0].page_offset + offset;
ssi->frags[0].size = gl->frags[0].size - offset;
ssi->nr_frags = gl->nfrags;
@@ -1425,7 +1425,7 @@ static inline void copy_frags(struct sk_buff *skb,
memcpy(&ssi->frags[1], &gl->frags[1], n * sizeof(skb_frag_t));
/* get a reference to the last page, we don't own it */
- get_page(gl->frags[n].page);
+ get_page(gl->frags[n].page.p); /* XXX */
}
/**
@@ -1482,7 +1482,7 @@ static void t4_pktgl_free(const struct pkt_gl *gl)
const skb_frag_t *p;
for (p = gl->frags, n = gl->nfrags - 1; n--; p++)
- put_page(p->page);
+ put_page(p->page.p); /* XXX */
}
/*
@@ -1635,7 +1635,7 @@ static void restore_rx_bufs(const struct pkt_gl *si, struct sge_fl *q,
else
q->cidx--;
d = &q->sdesc[q->cidx];
- d->page = si->frags[frags].page;
+ d->page = si->frags[frags].page.p; /* XXX */
d->dma_addr |= RX_UNMAPPED_BUF;
q->avail++;
}
@@ -1717,7 +1717,7 @@ static int process_responses(struct sge_rspq *q, int budget)
for (frags = 0, fp = si.frags; ; frags++, fp++) {
rsd = &rxq->fl.sdesc[rxq->fl.cidx];
bufsz = get_buf_size(rsd);
- fp->page = rsd->page;
+ fp->page.p = rsd->page; /* XXX */
fp->page_offset = q->offset;
fp->size = min(bufsz, len);
len -= fp->size;
@@ -1734,8 +1734,8 @@ static int process_responses(struct sge_rspq *q, int budget)
get_buf_addr(rsd),
fp->size, DMA_FROM_DEVICE);
- si.va = page_address(si.frags[0].page) +
- si.frags[0].page_offset;
+ si.va = page_address(si.frags[0].page.p) +
+ si.frags[0].page_offset; /* XXX */
prefetch(si.va);
diff --git a/drivers/net/cxgb4vf/sge.c b/drivers/net/cxgb4vf/sge.c
index f4c4480..0a0dda1 100644
--- a/drivers/net/cxgb4vf/sge.c
+++ b/drivers/net/cxgb4vf/sge.c
@@ -1397,7 +1397,7 @@ struct sk_buff *t4vf_pktgl_to_skb(const struct pkt_gl *gl,
skb_copy_to_linear_data(skb, gl->va, pull_len);
ssi = skb_shinfo(skb);
- skb_frag_set_page(skb, 0, gl->frags[0].page);
+ skb_frag_set_page(skb, 0, gl->frags[0].page.p); /* XXX */
ssi->frags[0].page_offset = gl->frags[0].page_offset + pull_len;
ssi->frags[0].size = gl->frags[0].size - pull_len;
if (gl->nfrags > 1)
@@ -1410,7 +1410,7 @@ struct sk_buff *t4vf_pktgl_to_skb(const struct pkt_gl *gl,
skb->truesize += skb->data_len;
/* Get a reference for the last page, we don't own it */
- get_page(gl->frags[gl->nfrags - 1].page);
+ get_page(gl->frags[gl->nfrags - 1].page.p); /* XXX */
}
out:
@@ -1430,7 +1430,7 @@ void t4vf_pktgl_free(const struct pkt_gl *gl)
frag = gl->nfrags - 1;
while (frag--)
- put_page(gl->frags[frag].page);
+ put_page(gl->frags[frag].page.p); /* XXX */
}
/**
@@ -1450,7 +1450,7 @@ static inline void copy_frags(struct sk_buff *skb,
unsigned int n;
/* usually there's just one frag */
- skb_frag_set_page(skb, 0, gl->frags[0].page);
+ skb_frag_set_page(skb, 0, gl->frags[0].page.p); /* XXX */
si->frags[0].page_offset = gl->frags[0].page_offset + offset;
si->frags[0].size = gl->frags[0].size - offset;
si->nr_frags = gl->nfrags;
@@ -1460,7 +1460,7 @@ static inline void copy_frags(struct sk_buff *skb,
memcpy(&si->frags[1], &gl->frags[1], n * sizeof(skb_frag_t));
/* get a reference to the last page, we don't own it */
- get_page(gl->frags[n].page);
+ get_page(gl->frags[n].page.p); /* XXX */
}
/**
@@ -1633,7 +1633,7 @@ static void restore_rx_bufs(const struct pkt_gl *gl, struct sge_fl *fl,
else
fl->cidx--;
sdesc = &fl->sdesc[fl->cidx];
- sdesc->page = gl->frags[frags].page;
+ sdesc->page = gl->frags[frags].page.p; /* XXX */
sdesc->dma_addr |= RX_UNMAPPED_BUF;
fl->avail++;
}
@@ -1721,7 +1721,7 @@ int process_responses(struct sge_rspq *rspq, int budget)
BUG_ON(rxq->fl.avail == 0);
sdesc = &rxq->fl.sdesc[rxq->fl.cidx];
bufsz = get_buf_size(sdesc);
- fp->page = sdesc->page;
+ fp->page.p = sdesc->page; /* XXX */
fp->page_offset = rspq->offset;
fp->size = min(bufsz, len);
len -= fp->size;
@@ -1739,8 +1739,8 @@ int process_responses(struct sge_rspq *rspq, int budget)
dma_sync_single_for_cpu(rspq->adapter->pdev_dev,
get_buf_addr(sdesc),
fp->size, DMA_FROM_DEVICE);
- gl.va = (page_address(gl.frags[0].page) +
- gl.frags[0].page_offset);
+ gl.va = (page_address(gl.frags[0].page.p) +
+ gl.frags[0].page_offset); /* XXX */
prefetch(gl.va);
/*
diff --git a/drivers/net/mlx4/en_rx.c b/drivers/net/mlx4/en_rx.c
index 21a89e0..c5d01ce 100644
--- a/drivers/net/mlx4/en_rx.c
+++ b/drivers/net/mlx4/en_rx.c
@@ -418,7 +418,7 @@ static int mlx4_en_complete_rx_desc(struct mlx4_en_priv *priv,
break;
/* Save page reference in skb */
- __skb_frag_set_page(&skb_frags_rx[nr], skb_frags[nr].page);
+ __skb_frag_set_page(&skb_frags_rx[nr], skb_frags[nr].page.p); /* XXX */
skb_frags_rx[nr].size = skb_frags[nr].size;
skb_frags_rx[nr].page_offset = skb_frags[nr].page_offset;
dma = be64_to_cpu(rx_desc->data[nr].addr);
diff --git a/drivers/scsi/cxgbi/libcxgbi.c b/drivers/scsi/cxgbi/libcxgbi.c
index 949ee48..8d16a74 100644
--- a/drivers/scsi/cxgbi/libcxgbi.c
+++ b/drivers/scsi/cxgbi/libcxgbi.c
@@ -1823,7 +1823,7 @@ static int sgl_read_to_frags(struct scatterlist *sg, unsigned int sgoffset,
return -EINVAL;
}
- frags[i].page = page;
+ frags[i].page.p = page;
frags[i].page_offset = sg->offset + sgoffset;
frags[i].size = copy;
i++;
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index 982c6a3..99b56e3 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -135,8 +135,17 @@ struct sk_buff;
typedef struct skb_frag_struct skb_frag_t;
+struct skb_frag_destructor {
+ atomic_t ref;
+ int (*destroy)(void *data);
+ void *data;
+};
+
struct skb_frag_struct {
- struct page *page;
+ struct {
+ struct page *p;
+ struct skb_frag_destructor *destructor;
+ } page;
#if (BITS_PER_LONG > 32) || (PAGE_SIZE >= 65536)
__u32 page_offset;
__u32 size;
@@ -1129,7 +1138,8 @@ static inline void __skb_fill_page_desc(struct sk_buff *skb, int i,
{
skb_frag_t *frag = &skb_shinfo(skb)->frags[i];
- frag->page = page;
+ frag->page.p = page;
+ frag->page.destructor = NULL;
frag->page_offset = off;
frag->size = size;
}
@@ -1648,7 +1658,7 @@ static inline void netdev_free_page(struct net_device *dev, struct page *page)
*/
static inline struct page *__skb_frag_page(const skb_frag_t *frag)
{
- return frag->page;
+ return frag->page.p;
}
/**
@@ -1659,9 +1669,12 @@ static inline struct page *__skb_frag_page(const skb_frag_t *frag)
*/
static inline const struct page *skb_frag_page(const skb_frag_t *frag)
{
- return frag->page;
+ return frag->page.p;
}
+extern void skb_frag_destructor_ref(struct skb_frag_destructor *destroy);
+extern void skb_frag_destructor_unref(struct skb_frag_destructor *destroy);
+
/**
* __skb_frag_ref - take an addition reference on a paged fragment.
* @frag: the paged fragment
@@ -1670,6 +1683,10 @@ static inline const struct page *skb_frag_page(const skb_frag_t *frag)
*/
static inline void __skb_frag_ref(skb_frag_t *frag)
{
+ if (unlikely(frag->page.destructor)) {
+ skb_frag_destructor_ref(frag->page.destructor);
+ return;
+ }
get_page(__skb_frag_page(frag));
}
@@ -1693,6 +1710,10 @@ static inline void skb_frag_ref(struct sk_buff *skb, int f)
*/
static inline void __skb_frag_unref(skb_frag_t *frag)
{
+ if (unlikely(frag->page.destructor)) {
+ skb_frag_destructor_unref(frag->page.destructor);
+ return;
+ }
put_page(__skb_frag_page(frag));
}
@@ -1745,7 +1766,7 @@ static inline void *skb_frag_address_safe(const skb_frag_t *frag)
*/
static inline void __skb_frag_set_page(skb_frag_t *frag, struct page *page)
{
- frag->page = page;
+ frag->page.p = page;
__skb_frag_ref(frag);
}
diff --git a/net/core/skbuff.c b/net/core/skbuff.c
index 2133600..bdc6f6e 100644
--- a/net/core/skbuff.c
+++ b/net/core/skbuff.c
@@ -292,6 +292,23 @@ struct sk_buff *dev_alloc_skb(unsigned int length)
}
EXPORT_SYMBOL(dev_alloc_skb);
+void skb_frag_destructor_ref(struct skb_frag_destructor *destroy)
+{
+ BUG_ON(destroy == NULL);
+ atomic_inc(&destroy->ref);
+}
+EXPORT_SYMBOL(skb_frag_destructor_ref);
+
+void skb_frag_destructor_unref(struct skb_frag_destructor *destroy)
+{
+ if (destroy == NULL)
+ return;
+
+ if (atomic_dec_and_test(&destroy->ref))
+ destroy->destroy(destroy->data);
+}
+EXPORT_SYMBOL(skb_frag_destructor_unref);
+
static void skb_drop_list(struct sk_buff **listp)
{
struct sk_buff *list = *listp;
--
1.7.2.5
^ 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