* Re: NULL pointer dereference panic in stable (2.6.33.2), amd64
From: Eric Dumazet @ 2010-04-15 20:30 UTC (permalink / raw)
To: David Miller; +Cc: krkumar2, netdev, nuclearcat
In-Reply-To: <20100415.020619.00349859.davem@davemloft.net>
Le jeudi 15 avril 2010 à 02:06 -0700, David Miller a écrit :
> From: Eric Dumazet <eric.dumazet@gmail.com>
> Date: Thu, 15 Apr 2010 10:51:47 +0200
>
> > In any case, I think there is a fundamental problem with this sk
> > caching. Because one packet can travel in many stacked devices before
> > hitting the wire.
> >
> > (bonding, vlan, ethernet) for example.
> >
> > Socket cache is meaningfull for one level only...
>
> We were talking the other day about that 'tun' change to orphan the
> SKB on TX, and I mentioned the possibility of just doing this in some
> generic location before we give the packet to the device ->xmit()
> method.
>
> Such a scheme could help with this problem too.
Same thing we did with
if (dev->priv_flags & IFF_XMIT_DST_RELEASE)
skb_dst_drop(skb);
in dev_hard_start_xmit() ?
Problem is this skb_tstamp_tx() thing....
One possibility would be to change skb_orphan() to let everything done
by destructor.
One more argument would let destructor() know if this is the final
destructor() called from skb_release_head_state()
destructor() would be responsible to set skb->destructor and/or skb->sk
to NULL when possible.
All normal destructors would not care of this 2nd argument and just do
what they actually do, plus setting skb->sk = NULL, skb->destructor =
NULL
Fast path would stay as today, no extra test.
Only tstamp users would need to setup another destructor, a bit more
complex (it would have to take a look at 2nd argument before really
doing the job)
Completely untested patch to get the idea :
(to be completed for the tstamp thing)
include/linux/skbuff.h | 8 +++-----
include/net/sctp/sctp.h | 2 +-
include/net/sock.h | 4 ++--
net/caif/caif_socket.c | 4 +++-
net/core/dev.c | 26 +++++++++-----------------
net/core/skbuff.c | 2 +-
net/core/sock.c | 8 ++++++--
net/l2tp/l2tp_core.c | 4 +++-
net/netfilter/nf_tproxy_core.c | 2 +-
net/packet/af_packet.c | 4 ++--
net/unix/af_unix.c | 4 ++--
11 files changed, 33 insertions(+), 35 deletions(-)
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index 38501d2..7dfd833 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -353,7 +353,7 @@ struct sk_buff {
kmemcheck_bitfield_end(flags1);
__be16 protocol;
- void (*destructor)(struct sk_buff *skb);
+ void (*destructor)(struct sk_buff *skb, int final);
#if defined(CONFIG_NF_CONNTRACK) || defined(CONFIG_NF_CONNTRACK_MODULE)
struct nf_conntrack *nfct;
struct sk_buff *nfct_reasm;
@@ -1407,15 +1407,13 @@ static inline void pskb_trim_unique(struct sk_buff *skb, unsigned int len)
* @skb: buffer to orphan
*
* If a buffer currently has an owner then we call the owner's
- * destructor function and make the @skb unowned. The buffer continues
+ * destructor function. The buffer continues
* to exist but is no longer charged to its former owner.
*/
static inline void skb_orphan(struct sk_buff *skb)
{
if (skb->destructor)
- skb->destructor(skb);
- skb->destructor = NULL;
- skb->sk = NULL;
+ skb->destructor(skb, 0);
}
/**
diff --git a/include/net/sctp/sctp.h b/include/net/sctp/sctp.h
index 5915155..49e2162 100644
--- a/include/net/sctp/sctp.h
+++ b/include/net/sctp/sctp.h
@@ -130,7 +130,7 @@ int sctp_inet_listen(struct socket *sock, int backlog);
void sctp_write_space(struct sock *sk);
unsigned int sctp_poll(struct file *file, struct socket *sock,
poll_table *wait);
-void sctp_sock_rfree(struct sk_buff *skb);
+void sctp_sock_rfree(struct sk_buff *skb, int final);
void sctp_copy_sock(struct sock *newsk, struct sock *sk,
struct sctp_association *asoc);
extern struct percpu_counter sctp_sockets_allocated;
diff --git a/include/net/sock.h b/include/net/sock.h
index 56df440..a042c9d 100644
--- a/include/net/sock.h
+++ b/include/net/sock.h
@@ -988,8 +988,8 @@ extern struct sk_buff *sock_wmalloc(struct sock *sk,
extern struct sk_buff *sock_rmalloc(struct sock *sk,
unsigned long size, int force,
gfp_t priority);
-extern void sock_wfree(struct sk_buff *skb);
-extern void sock_rfree(struct sk_buff *skb);
+extern void sock_wfree(struct sk_buff *skb, int final);
+extern void sock_rfree(struct sk_buff *skb, int final);
extern int sock_setsockopt(struct socket *sock, int level,
int op, char __user *optval,
diff --git a/net/caif/caif_socket.c b/net/caif/caif_socket.c
index cdf62b9..4e7276a 100644
--- a/net/caif/caif_socket.c
+++ b/net/caif/caif_socket.c
@@ -256,10 +256,12 @@ static void caif_sktflowctrl_cb(struct cflayer *layr,
}
}
-static void skb_destructor(struct sk_buff *skb)
+static void skb_destructor(struct sk_buff *skb, int final)
{
dbfs_atomic_inc(&cnt.skb_free);
dbfs_atomic_dec(&cnt.skb_in_use);
+ skb->sk = NULL;
+ skb->destructor = NULL;
}
diff --git a/net/core/dev.c b/net/core/dev.c
index 876b111..9bffbe5 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -1828,12 +1828,12 @@ static int illegal_highdma(struct net_device *dev, struct sk_buff *skb)
}
struct dev_gso_cb {
- void (*destructor)(struct sk_buff *skb);
+ void (*destructor)(struct sk_buff *skb, int final);
};
#define DEV_GSO_CB(skb) ((struct dev_gso_cb *)(skb)->cb)
-static void dev_gso_skb_destructor(struct sk_buff *skb)
+static void dev_gso_skb_destructor(struct sk_buff *skb, int final)
{
struct dev_gso_cb *cb;
@@ -1847,7 +1847,9 @@ static void dev_gso_skb_destructor(struct sk_buff *skb)
cb = DEV_GSO_CB(skb);
if (cb->destructor)
- cb->destructor(skb);
+ cb->destructor(skb, final);
+ skb->sk = NULL;
+ skb->destructor = NULL;
}
/**
@@ -1904,23 +1906,11 @@ int dev_hard_start_xmit(struct sk_buff *skb, struct net_device *dev,
if (dev->priv_flags & IFF_XMIT_DST_RELEASE)
skb_dst_drop(skb);
+ skb_orphan(skb);
+
rc = ops->ndo_start_xmit(skb, dev);
if (rc == NETDEV_TX_OK)
txq_trans_update(txq);
- /*
- * TODO: if skb_orphan() was called by
- * dev->hard_start_xmit() (for example, the unmodified
- * igb driver does that; bnx2 doesn't), then
- * skb_tx_software_timestamp() will be unable to send
- * back the time stamp.
- *
- * How can this be prevented? Always create another
- * reference to the socket before calling
- * dev->hard_start_xmit()? Prevent that skb_orphan()
- * does anything in dev->hard_start_xmit() by clearing
- * the skb destructor before the call and restoring it
- * afterwards, then doing the skb_orphan() ourselves?
- */
return rc;
}
@@ -1938,6 +1928,8 @@ gso:
if (dev->priv_flags & IFF_XMIT_DST_RELEASE)
skb_dst_drop(nskb);
+ skb_orphan(nskb);
+
rc = ops->ndo_start_xmit(nskb, dev);
if (unlikely(rc != NETDEV_TX_OK)) {
if (rc & ~NETDEV_TX_MASK)
diff --git a/net/core/skbuff.c b/net/core/skbuff.c
index bdea0ef..90c171f 100644
--- a/net/core/skbuff.c
+++ b/net/core/skbuff.c
@@ -396,7 +396,7 @@ static void skb_release_head_state(struct sk_buff *skb)
#endif
if (skb->destructor) {
WARN_ON(in_irq());
- skb->destructor(skb);
+ skb->destructor(skb, 1);
}
#if defined(CONFIG_NF_CONNTRACK) || defined(CONFIG_NF_CONNTRACK_MODULE)
nf_conntrack_put(skb->nfct);
diff --git a/net/core/sock.c b/net/core/sock.c
index 7effa1e..fcf67ea 100644
--- a/net/core/sock.c
+++ b/net/core/sock.c
@@ -1259,7 +1259,7 @@ void __init sk_init(void)
/*
* Write buffer destructor automatically called from kfree_skb.
*/
-void sock_wfree(struct sk_buff *skb)
+void sock_wfree(struct sk_buff *skb, int final)
{
struct sock *sk = skb->sk;
unsigned int len = skb->truesize;
@@ -1279,18 +1279,22 @@ void sock_wfree(struct sk_buff *skb)
*/
if (atomic_sub_and_test(len, &sk->sk_wmem_alloc))
__sk_free(sk);
+ skb->sk = NULL;
+ skb->destructor = NULL;
}
EXPORT_SYMBOL(sock_wfree);
/*
* Read buffer destructor automatically called from kfree_skb.
*/
-void sock_rfree(struct sk_buff *skb)
+void sock_rfree(struct sk_buff *skb, int final)
{
struct sock *sk = skb->sk;
atomic_sub(skb->truesize, &sk->sk_rmem_alloc);
sk_mem_uncharge(skb->sk, skb->truesize);
+ skb->sk = NULL;
+ skb->destructor = NULL;
}
EXPORT_SYMBOL(sock_rfree);
diff --git a/net/l2tp/l2tp_core.c b/net/l2tp/l2tp_core.c
index 98dfcce..a3b0a95 100644
--- a/net/l2tp/l2tp_core.c
+++ b/net/l2tp/l2tp_core.c
@@ -973,9 +973,11 @@ EXPORT_SYMBOL_GPL(l2tp_xmit_core);
/* Automatically called when the skb is freed.
*/
-static void l2tp_sock_wfree(struct sk_buff *skb)
+static void l2tp_sock_wfree(struct sk_buff *skb, int final)
{
sock_put(skb->sk);
+ skb->sk = NULL;
+ skb->destructor = NULL;
}
/* For data skbs that we transmit, we associate with the tunnel socket
diff --git a/net/netfilter/nf_tproxy_core.c b/net/netfilter/nf_tproxy_core.c
index 5490fc3..17dd2d9 100644
--- a/net/netfilter/nf_tproxy_core.c
+++ b/net/netfilter/nf_tproxy_core.c
@@ -55,7 +55,7 @@ nf_tproxy_get_sock_v4(struct net *net, const u8 protocol,
EXPORT_SYMBOL_GPL(nf_tproxy_get_sock_v4);
static void
-nf_tproxy_destructor(struct sk_buff *skb)
+nf_tproxy_destructor(struct sk_buff *skb, int final)
{
struct sock *sk = skb->sk;
diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c
index f162d59..dc8e843 100644
--- a/net/packet/af_packet.c
+++ b/net/packet/af_packet.c
@@ -808,7 +808,7 @@ ring_is_full:
goto drop_n_restore;
}
-static void tpacket_destruct_skb(struct sk_buff *skb)
+static void tpacket_destruct_skb(struct sk_buff *skb, int final)
{
struct packet_sock *po = pkt_sk(skb->sk);
void *ph;
@@ -823,7 +823,7 @@ static void tpacket_destruct_skb(struct sk_buff *skb)
__packet_set_status(po, ph, TP_STATUS_AVAILABLE);
}
- sock_wfree(skb);
+ sock_wfree(skb, final);
}
static int tpacket_fill_skb(struct packet_sock *po, struct sk_buff *skb,
diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c
index 3d9122e..17fca55 100644
--- a/net/unix/af_unix.c
+++ b/net/unix/af_unix.c
@@ -1303,7 +1303,7 @@ static void unix_detach_fds(struct scm_cookie *scm, struct sk_buff *skb)
unix_notinflight(scm->fp->fp[i]);
}
-static void unix_destruct_fds(struct sk_buff *skb)
+static void unix_destruct_fds(struct sk_buff *skb, int final)
{
struct scm_cookie scm;
memset(&scm, 0, sizeof(scm));
@@ -1312,7 +1312,7 @@ static void unix_destruct_fds(struct sk_buff *skb)
/* Alas, it calls VFS */
/* So fscking what? fput() had been SMP-safe since the last Summer */
scm_destroy(&scm);
- sock_wfree(skb);
+ sock_wfree(skb, final);
}
static int unix_attach_fds(struct scm_cookie *scm, struct sk_buff *skb)
^ permalink raw reply related
* Re: NULL pointer dereference panic in stable (2.6.33.2), amd64
From: Eric Dumazet @ 2010-04-15 20:46 UTC (permalink / raw)
To: David Miller; +Cc: krkumar2, netdev, nuclearcat
In-Reply-To: <1271363432.16881.3080.camel@edumazet-laptop>
Le jeudi 15 avril 2010 à 22:30 +0200, Eric Dumazet a écrit :
>
> @@ -1938,6 +1928,8 @@ gso:
> if (dev->priv_flags & IFF_XMIT_DST_RELEASE)
> skb_dst_drop(nskb);
>
> + skb_orphan(nskb);
> +
> rc = ops->ndo_start_xmit(nskb, dev);
> if (unlikely(rc != NETDEV_TX_OK)) {
> if (rc & ~NETDEV_TX_MASK)
Well, might need to test if skb is not shared before orphaning it
if (!skb_shared(skb))
skb_orphan(nskb);
^ permalink raw reply
* pull request: wireless-next-2.6 2010-04-15
From: John W. Linville @ 2010-04-15 20:53 UTC (permalink / raw)
To: davem; +Cc: linux-wireless, netdev
Dave,
Here is another huge dump of wireless bits intended for 2.6.35... It is
mostly drivers, and mostly the "usual suspects" of those -- ath5k,
ath9k, iwlwifi, rt2x00, wl1271, and others. There are also some
infrastructure bits from Johannes and Jouni, including some tracing
stuff.
Please let me know if there are problems!
Thanks,
John
P.S. Please note the "for-davem" after the git url... :-)
---
The following changes since commit fea069152614cdeefba4b2bf80afcddb9c217fc8:
David S. Miller (1):
Merge branch 'vhost' of git://git.kernel.org/.../mst/vhost
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6.git for-davem
Bob Copeland (4):
ath5k: correct channel setting for 2.5 mhz spacing
ath5k: clean up queue manipulation
ath5k: fix race condition in tx desc processing
ath5k: add bounds check to pdadc table
Bruno Randolf (12):
ath5k: remove static calibration interval variable
ath5k: remove the use of SWI interrupt
ath5k: optimize ath5k_hw_calibration_poll
ath5k: move ath5k_hw_calibration_poll to base.c
ath5k: keep beacon RSSI average
ath5k: initialize default noise floor
ath5k: simplify MIB counters
ath5k: update phy errors codes
ath5k: add capability flag for phyerror counters
ath5k: Adaptive Noise Immunity (ANI) Implementation
ath5k: Use high bitrates for ACK/CTS
ath5k: treat RXORN as non-fatal
Christian Lamparter (2):
ar9170usb: fix panic triggered by undersized rxstream buffer
ar9170usb: add a couple more USB IDs
Daniel Mack (1):
libertas/sdio: 8686: set ECSI bit for 1-bit transfers
Felix Fietkau (4):
ath9k: split out access to tx status information
ath9k: split out access to rx status information
ath9k: allocate tx and rx status information on stack
ath9k: fix compile error without debug enabled
Frans Pop (7):
wireless: remove trailing space in messages
wireless/prism54: remove trailing space in messages
wireless/raylink: remove trailing space in messages
wireless/libertas: remove trailing space in debugfs header
wireless/ipw2x00: remove trailing space in messages
iwlwifi: remove trailing space in messages
wireless/ath: remove trailing space in messages
Gertjan van Wingerde (13):
rt2x00: Disable auto wakeup before waking up device.
rt2x00: Add wakeup interrupt handler to rt61pci.
rt2x00: Add wakeup interrupt handler to rt2800pci.
rt2x00: Enable powersaving by default again on rt2500usb.
rt2x00: Let RF chipset decide the RF channel switch method to use in rt2800.
rt2x00: Update rt2800 register definitions towards latest definitions.
rt2x00: Align RT chipset definitions with vendor driver.
rt2x00: Refactor rt2800 version constants.
rt2x00: Align rt2800 register initialization with vendor driver.
rt2x00: Finish rt3070 support in rt2800 register initialization.
rt2x00: Add rt3071 support in rt2800 register initialization.
rt2x00: Add rt3090 support in rt2800 register initialization.
rt2x00: Add rt3390 support in rt2800 register initialization.
Grazvydas Ignotas (1):
wl1251: don't require NVS data when EEPROM is used
Helmut Schaa (1):
rt2x00: use rt2800_config_channel_rt3x for rt2872
Javier Cardona (1):
mac80211: Moved mesh action codes to a more visible location
Jay Sternberg (1):
iwlwifi: enable '6000 Series 2x2 AGN Gen2' adaptors
Joe Perches (1):
include/net/iw_handler.h: Use SIOCIWFIRST not SIOCSIWCOMMIT in comment
Johannes Berg (14):
iwlwifi: remove noise reporting
mac80211: fix station destruction problem
mac80211: remove irq disabling for sta lock
mac80211: remove ieee80211_sta_stop_rx_ba_session
mac80211: rename WLAN_STA_SUSPEND to WLAN_STA_BLOCK_BA
mac80211: clean up/fix aggregation code
mac80211: fix some RX aggregation locking
mac80211: fix paged RX crypto
mac80211: enhance tracing
iwlwifi: make WEP key restoring explicit
iwlwifi: remove wrong key use check
iwlagn: simplify WEP key check
iwlwifi: remove pointless sta_id invalid check
iwlwifi: clean up last_phy_res
John W. Linville (6):
Merge branch 'wireless-next-2.6' of git://git.kernel.org/.../iwlwifi/iwlwifi-2.6
Merge branch 'master' of git://git.kernel.org/.../linville/wireless-2.6 into merge
ath5k: fixup some merge damage for AR5211 IQ calibration
Merge branch 'master' of git://git.kernel.org/.../linville/wireless-2.6
Merge branch 'wireless-next-2.6' of git://git.kernel.org/.../iwlwifi/iwlwifi-2.6
Merge branch 'master' of git://git.kernel.org/.../linville/wireless-next-2.6 into for-davem
Jouni Malinen (8):
mac80211: Track Beacon signal strength and implement cqm events
mac80211: Send deauth/disassoc prior to dropping STA entry
mac80211: Fix BIP to be used only with group-addressed frames
mac80211: Fix dropping of unprotected robust multicast frames
ath9k: Do not indicate RX_FLAG_DECRYPTED for unprotected frames
mac80211: Fix drop_unencrypted for MFP with hwaccel
mac80211: Fix robust management frame handling (MFP)
cfg80211: Add local-state-change-only auth/deauth/disassoc
Juuso Oikarinen (26):
wl1271: Clean up RX rate reporting
wl1271: Add TX rate reporting
wl1271: Fix memory leaks in SPI initialization
wl1271: Fix memory leak in scan command handling
wl1271: Configure clock-request drive mode to open-drain
wl1271: Fix memory leak in cmd_data_path
wl1271: Update busyword checking mechanism
wl1271: Remove device MAC-address randomization
wl1271: Disable connection monitoring while not associated
wl1271: Fix ad-hoc mode handling
wl1271: Update beacon interval properly for ad-hoc
wl1271: Fix memory leak in firmware crash scenario
wl1271: Configure probe-request template when associated
wl1271: Disconnect if PSM entry fails
wl1271: Configure HW connection monitor
wl1271: Add keep-alive frame template support
wl1271: Enable hardware keep alive messages
wl1271: Fix keep-alive related command error
wl1271: Use minimum rate for each band for control messages
wl1271: Configure rates for templates
wl1271: Configure a higher listen interval to AP upon association
wl1271: Fix debug prints for beacon-loss and psm-entry-fail scenarios
wl1271: Fix tx queue flushing
wl1271: Fix memory leaks on driver initialization
wl1271: Go to ELP in idle
wl1271: Add support for connection quality monitoring
Kalle Valo (1):
wl1251: use DRIVER_NAME macro in wl1251_spi_driver
Luciano Coelho (6):
wl1271: fix wl1271_spi driver name
wl1271: wait for join command complete event
wl1271: wait for disconnect command complete event
wl1271: remove deprecated usage of RX status noise
wl1271: fix sdio driver name in wl1271_sdio_driver
wl1271: added missing command header in wl1271_cmd_disconnect
Luis Correia (1):
rt2x00: remove MCU requests for SoC platforms
Luis R. Rodriguez (2):
mac80211_hwsim: add sw_scan sw_scan_complete
mac80211: fix typo for LDPC capability
Luis de Bethencourt (3):
Net: wireless: ath: fix macros coding style issue in hw.c
ath: fix code readability in regd.c
ath: fix coding style/readability in ath/ar9170
Marco Porsch (1):
nl80211: reenable station del for mesh
Ming Lei (4):
ath9k-htc:respect usb buffer cacheline alignment in ath9k_hif_usb_alloc_rx_urbs
ath9k-htc:respect usb buffer cacheline alignment in reg in path
ath9k-htc:respect usb buffer cacheline alignment in reg out path
ath9k-htc: fix lockdep warning and kernel warning after unplugging ar9271 usb device
Pavel Roskin (4):
ath9k: rename symbols in enum ath9k_internal_frame_type to avoid confusion
ath9k: move imask from sc to ah
ath9k: remove ah->mask_reg, it's never used properly
ath9k: simplify AR9220 fixup code for AR_AN_TOP2 register
Quintin Pitts (1):
p54pci: prevent stuck rx-ring on slow system
Rafał Miłecki (6):
b43: N-PHY: some dummy PHY rev 3 calls
b43: N-PHY: use b43_phy_n_sfo_cfg rather than duplicating same fields
b43: N-PHY: find table entry earlier for setting chanspec
b43: N-PHY: prepare for rev3+ channel tables
b43: N-PHY: fix value written on 2055 radio setup
b43: N-PHY: fix copy&paste typo
Reinette Chatre (2):
Revert "iwlwifi: fix build error for CONFIG_IWLAGN=n"
iwlwifi: fix compile warnings when compiling without debug
Saravanan Dhanabal (3):
wl1271: Fix msleep() delay while waiting for completion
wl1271: Fix mac80211 configuration requests during WL1271_STATE_OFF
wl1271: Fix mac80211 RTS threshold requests during WL1271_STATE_OFF
Stanislaw Gruszka (3):
mac80211: explicitly disable/enable QoS
iwlwifi: manage QoS by mac stack
mac80211: enable QoS explicitly in AP mode
Sujith (15):
ath9k_common: Move RX filter code to ath9k_htc
ath9k_htc: Fix bug in aggregation initiation
ath9k_htc: Fix watchdog pattern parsing
ath9k_htc: Simplify RX URB management
ath9k_htc: Handle TX queue overflow
ath9k_htc: Initialize HW opmode
ath9k_htc: Fix TKIP encryption
ath: Add a bus type field
ath9k_hw: Don't check devid for ath9k_htc
ath9k_htc: Add TL-WN422G v2 product ID
ath9k_htc: Protect RX stream variables
ath9k_htc: Fix RX URB reference count
ath9k_htc: Fix module unloading issue
ath9k_htc: Use anchors for REGOUT pipe
ath9k_htc: Fix HTC layer memleak
Teemu Paasikivi (3):
wl1271: Warnings caused by wrong format specifiers fixed
wl1271: Removed checking of PSM from handling BSS_LOST_EVENT
mac80211: check whether scan is in progress before queueing scan_work
Vivek Natarajan (3):
ath9k: Add support for newer AR9285 chipsets.
ath9k_htc: Add support for power save.
ath9k_htc: Configure the beacon timers once the scan is completed.
Wey-Yi Guy (28):
iwlwifi: iwl_good_ack_health() only apply to AGN device
iwlwifi: move ucode loading related code to separated file
iwlwifi: code cleanup for "load ucode" function
iwlwifi: move hcmd related code to separate file
iwlwifi: move tx queue related code to separate file
iwlwifi: move hw related defines to separate file
iwlwifi: move ucode alive related code to separate file
iwlwifi: move agn common code to iwlagn library file
iwlwifi: each device has its own eeprom tx power version
iwlwifi: move agn module parameter structure to common place
iwlwifi: move agn only tx functions from iwlcore to iwlagn
iwlwifi: move agn only rx functions from iwlcore to iwlagn
iwlwifi: more clean up to move agn only rx functions from iwlcore to iwlagn
iwlwifi: remove non-exist extern functions and structures
iwlwifi: add missing email address information
iwlwifi: Generic approach to measure temperature
iwlwifi: remove "\n" from module parameter description
iwlwifi: change spin_lock to spin_lock_irqsave
iwlwifi: avoid device type checking in generic code
iwlwifi: merge module parameters into single place
iwlwifi: remove irrelevant comments
iwlwifi: deprecate "iwl4965" alias support
iwlwifi: code cleanup for generic defines
iwlwifi: default max event log size
iwlwifi: add more debug info in error event dump
iwlwifi: update tx command response status
iwlwifi: small changes in comments
iwlwifi: fix compiler warning
Xose Vazquez Perez (5):
wireless: rt2x00: rt2800usb: identify ids-chips
wireless: rt2x00: rt2800usb: delete id
wireless: rt2x00: rt2800pci: new id
wireless: rt2x00: rt2800usb: new ids
wireless: rt2x00: rt2800usb: identify Sitecom devices
Zhu Yi (6):
mac80211: support paged rx SKBs
iwlwifi: remove skb_linearize for rx frames
ipw2200: restart adapter only when abort_scan doesn't work
iwlwifi: clear rxq->queue in queue reset
mac80211: delay skb linearising in rx decryption
iwlwifi: avoid Tx queue memory allocation in interface down
Documentation/feature-removal-schedule.txt | 22 +-
drivers/net/wireless/ath/ar9170/cmd.h | 2 +-
drivers/net/wireless/ath/ar9170/eeprom.h | 4 +-
drivers/net/wireless/ath/ar9170/hw.h | 1 +
drivers/net/wireless/ath/ar9170/main.c | 13 +-
drivers/net/wireless/ath/ar9170/usb.c | 10 +
drivers/net/wireless/ath/ath.h | 13 +-
drivers/net/wireless/ath/ath5k/Makefile | 1 +
drivers/net/wireless/ath/ath5k/ani.c | 744 ++++++++++++
drivers/net/wireless/ath/ath5k/ani.h | 104 ++
drivers/net/wireless/ath/ath5k/ath5k.h | 68 +-
drivers/net/wireless/ath/ath5k/attach.c | 2 +
drivers/net/wireless/ath/ath5k/base.c | 129 ++-
drivers/net/wireless/ath/ath5k/base.h | 21 +-
drivers/net/wireless/ath/ath5k/caps.c | 6 +
drivers/net/wireless/ath/ath5k/debug.c | 170 +++
drivers/net/wireless/ath/ath5k/debug.h | 2 +
drivers/net/wireless/ath/ath5k/desc.c | 1 +
drivers/net/wireless/ath/ath5k/desc.h | 35 +-
drivers/net/wireless/ath/ath5k/pcu.c | 44 +-
drivers/net/wireless/ath/ath5k/phy.c | 37 +-
drivers/net/wireless/ath/ath5k/reg.h | 40 +-
drivers/net/wireless/ath/ath9k/ahb.c | 1 +
drivers/net/wireless/ath/ath9k/ath9k.h | 4 -
drivers/net/wireless/ath/ath9k/beacon.c | 35 +-
drivers/net/wireless/ath/ath9k/calib.c | 59 +-
drivers/net/wireless/ath/ath9k/common.c | 85 +--
drivers/net/wireless/ath/ath9k/common.h | 4 -
drivers/net/wireless/ath/ath9k/debug.c | 39 +-
drivers/net/wireless/ath/ath9k/debug.h | 9 +-
drivers/net/wireless/ath/ath9k/eeprom_4k.c | 2 +-
drivers/net/wireless/ath/ath9k/eeprom_9287.c | 2 +-
drivers/net/wireless/ath/ath9k/gpio.c | 17 +-
drivers/net/wireless/ath/ath9k/hif_usb.c | 191 ++--
drivers/net/wireless/ath/ath9k/hif_usb.h | 10 +-
drivers/net/wireless/ath/ath9k/htc.h | 25 +-
drivers/net/wireless/ath/ath9k/htc_drv_beacon.c | 41 +-
drivers/net/wireless/ath/ath9k/htc_drv_init.c | 12 +-
drivers/net/wireless/ath/ath9k/htc_drv_main.c | 149 +++-
drivers/net/wireless/ath/ath9k/htc_drv_txrx.c | 112 ++-
drivers/net/wireless/ath/ath9k/htc_hst.c | 35 +-
drivers/net/wireless/ath/ath9k/hw.c | 139 +--
drivers/net/wireless/ath/ath9k/hw.h | 5 +-
drivers/net/wireless/ath/ath9k/initvals.h | 109 ++-
drivers/net/wireless/ath/ath9k/mac.c | 149 ++--
drivers/net/wireless/ath/ath9k/mac.h | 14 +-
drivers/net/wireless/ath/ath9k/main.c | 60 +-
drivers/net/wireless/ath/ath9k/pci.c | 1 +
drivers/net/wireless/ath/ath9k/phy.h | 14 +-
drivers/net/wireless/ath/ath9k/rc.h | 6 +-
drivers/net/wireless/ath/ath9k/recv.c | 26 +-
drivers/net/wireless/ath/ath9k/reg.h | 13 +-
drivers/net/wireless/ath/ath9k/virtual.c | 2 +-
drivers/net/wireless/ath/ath9k/wmi.c | 10 +-
drivers/net/wireless/ath/ath9k/xmit.c | 113 +-
drivers/net/wireless/ath/hw.c | 4 +-
drivers/net/wireless/ath/regd.c | 3 +-
drivers/net/wireless/b43/phy_n.c | 54 +-
drivers/net/wireless/b43/tables_nphy.c | 20 +-
drivers/net/wireless/b43/tables_nphy.h | 28 +-
drivers/net/wireless/ipw2x00/ipw2100.c | 38 +-
drivers/net/wireless/ipw2x00/ipw2200.c | 87 +-
drivers/net/wireless/iwlwifi/Makefile | 2 +
drivers/net/wireless/iwlwifi/iwl-1000.c | 78 +-
drivers/net/wireless/iwlwifi/iwl-3945-hw.h | 5 -
drivers/net/wireless/iwlwifi/iwl-3945-rs.c | 4 +-
drivers/net/wireless/iwlwifi/iwl-3945.c | 79 +--
drivers/net/wireless/iwlwifi/iwl-4965-hw.h | 24 -
drivers/net/wireless/iwlwifi/iwl-4965.c | 62 +-
drivers/net/wireless/iwlwifi/iwl-5000-hw.h | 33 -
drivers/net/wireless/iwlwifi/iwl-5000.c | 1378 ++---------------------
drivers/net/wireless/iwlwifi/iwl-6000.c | 195 ++--
drivers/net/wireless/iwlwifi/iwl-agn-hcmd.c | 274 +++++
drivers/net/wireless/iwlwifi/iwl-agn-hw.h | 118 ++
drivers/net/wireless/iwlwifi/iwl-agn-ict.c | 14 +-
drivers/net/wireless/iwlwifi/iwl-agn-lib.c | 1113 ++++++++++++++++++
drivers/net/wireless/iwlwifi/iwl-agn-rs.c | 6 +-
drivers/net/wireless/iwlwifi/iwl-agn-tx.c | 1333 ++++++++++++++++++++++
drivers/net/wireless/iwlwifi/iwl-agn-ucode.c | 416 +++++++
drivers/net/wireless/iwlwifi/iwl-agn.c | 204 +++--
drivers/net/wireless/iwlwifi/iwl-agn.h | 100 ++
drivers/net/wireless/iwlwifi/iwl-calib.c | 2 +-
drivers/net/wireless/iwlwifi/iwl-commands.h | 108 ++-
drivers/net/wireless/iwlwifi/iwl-core.c | 267 +----
drivers/net/wireless/iwlwifi/iwl-core.h | 31 +-
drivers/net/wireless/iwlwifi/iwl-dev.h | 76 +--
drivers/net/wireless/iwlwifi/iwl-devtrace.c | 1 +
drivers/net/wireless/iwlwifi/iwl-eeprom.h | 17 +-
drivers/net/wireless/iwlwifi/iwl-hcmd.c | 4 +-
drivers/net/wireless/iwlwifi/iwl-io.h | 2 +-
drivers/net/wireless/iwlwifi/iwl-led.c | 2 +-
drivers/net/wireless/iwlwifi/iwl-power.c | 10 +-
drivers/net/wireless/iwlwifi/iwl-rx.c | 758 +-------------
drivers/net/wireless/iwlwifi/iwl-scan.c | 9 +-
drivers/net/wireless/iwlwifi/iwl-sta.c | 48 +-
drivers/net/wireless/iwlwifi/iwl-sta.h | 2 +-
drivers/net/wireless/iwlwifi/iwl-tx.c | 1091 +------------------
drivers/net/wireless/iwlwifi/iwl3945-base.c | 30 +-
drivers/net/wireless/libertas/debugfs.c | 2 +-
drivers/net/wireless/libertas/if_sdio.c | 22 +
drivers/net/wireless/mac80211_hwsim.c | 45 +-
drivers/net/wireless/p54/p54pci.c | 26 +-
drivers/net/wireless/p54/txrx.c | 2 +-
drivers/net/wireless/prism54/islpci_dev.c | 16 +-
drivers/net/wireless/prism54/islpci_eth.c | 8 +-
drivers/net/wireless/prism54/islpci_mgt.c | 8 +-
drivers/net/wireless/prism54/oid_mgt.c | 2 +-
drivers/net/wireless/ray_cs.c | 12 +-
drivers/net/wireless/rt2x00/rt2400pci.c | 4 +
drivers/net/wireless/rt2x00/rt2500pci.c | 4 +
drivers/net/wireless/rt2x00/rt2500usb.c | 9 +-
drivers/net/wireless/rt2x00/rt2800.h | 108 ++-
drivers/net/wireless/rt2x00/rt2800lib.c | 467 ++++++---
drivers/net/wireless/rt2x00/rt2800pci.c | 31 +-
drivers/net/wireless/rt2x00/rt2800usb.c | 76 +-
drivers/net/wireless/rt2x00/rt2x00.h | 29 +-
drivers/net/wireless/rt2x00/rt61pci.c | 14 +
drivers/net/wireless/rt2x00/rt73usb.c | 6 +-
drivers/net/wireless/wl12xx/wl1251_main.c | 4 +-
drivers/net/wireless/wl12xx/wl1251_spi.c | 2 +-
drivers/net/wireless/wl12xx/wl1271.h | 19 +-
drivers/net/wireless/wl12xx/wl1271_acx.c | 146 +++-
drivers/net/wireless/wl12xx/wl1271_acx.h | 89 ++-
drivers/net/wireless/wl12xx/wl1271_boot.c | 15 +-
drivers/net/wireless/wl12xx/wl1271_boot.h | 7 +-
drivers/net/wireless/wl12xx/wl1271_cmd.c | 127 ++-
drivers/net/wireless/wl12xx/wl1271_cmd.h | 13 +-
drivers/net/wireless/wl12xx/wl1271_conf.h | 158 ++--
drivers/net/wireless/wl12xx/wl1271_event.c | 66 +-
drivers/net/wireless/wl12xx/wl1271_event.h | 8 +
drivers/net/wireless/wl12xx/wl1271_init.c | 53 +-
drivers/net/wireless/wl12xx/wl1271_main.c | 393 ++++++--
drivers/net/wireless/wl12xx/wl1271_ps.c | 6 +-
drivers/net/wireless/wl12xx/wl1271_rx.c | 83 +--
drivers/net/wireless/wl12xx/wl1271_rx.h | 2 +-
drivers/net/wireless/wl12xx/wl1271_sdio.c | 6 +-
drivers/net/wireless/wl12xx/wl1271_spi.c | 71 +-
drivers/net/wireless/wl12xx/wl1271_tx.c | 43 +-
drivers/net/wireless/wl12xx/wl1271_tx.h | 2 +
include/linux/ieee80211.h | 3 +-
include/linux/mmc/sdio.h | 2 +
include/linux/nl80211.h | 8 +
include/net/cfg80211.h | 11 +
include/net/iw_handler.h | 2 +-
include/net/mac80211.h | 10 +-
net/mac80211/Kconfig | 8 +-
net/mac80211/agg-rx.c | 72 +-
net/mac80211/agg-tx.c | 14 +-
net/mac80211/cfg.c | 13 +-
net/mac80211/debugfs_netdev.c | 12 +
net/mac80211/debugfs_sta.c | 12 +-
net/mac80211/driver-trace.h | 275 +++++
net/mac80211/ht.c | 3 +-
net/mac80211/ieee80211_i.h | 21 +-
net/mac80211/main.c | 2 +
net/mac80211/mesh.c | 4 +-
net/mac80211/mesh.h | 2 -
net/mac80211/mesh_hwmp.c | 4 +-
net/mac80211/mesh_plink.c | 2 +-
net/mac80211/mlme.c | 106 ++-
net/mac80211/pm.c | 2 +-
net/mac80211/rx.c | 91 ++-
net/mac80211/scan.c | 2 +
net/mac80211/sta_info.c | 75 +-
net/mac80211/sta_info.h | 10 +-
net/mac80211/tx.c | 7 +-
net/mac80211/util.c | 11 +-
net/mac80211/work.c | 7 +-
net/wireless/core.h | 15 +-
net/wireless/mlme.c | 39 +-
net/wireless/nl80211.c | 22 +-
net/wireless/reg.c | 6 +-
net/wireless/sme.c | 15 +-
net/wireless/util.c | 24 +-
174 files changed, 8596 insertions(+), 5612 deletions(-)
create mode 100644 drivers/net/wireless/ath/ath5k/ani.c
create mode 100644 drivers/net/wireless/ath/ath5k/ani.h
create mode 100644 drivers/net/wireless/iwlwifi/iwl-agn-hcmd.c
create mode 100644 drivers/net/wireless/iwlwifi/iwl-agn-hw.h
create mode 100644 drivers/net/wireless/iwlwifi/iwl-agn-lib.c
create mode 100644 drivers/net/wireless/iwlwifi/iwl-agn-tx.c
create mode 100644 drivers/net/wireless/iwlwifi/iwl-agn-ucode.c
Omnibus patch available here:
http://www.kernel.org/pub/linux/kernel/people/linville/wireless-next-2.6-2010-04-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 0/3]: fixes for multicast routing rules
From: David Miller @ 2010-04-15 21:14 UTC (permalink / raw)
To: kaber; +Cc: netdev
In-Reply-To: <1271335678-20961-1-git-send-email-kaber@trash.net>
From: Patrick McHardy <kaber@trash.net>
Date: Thu, 15 Apr 2010 14:47:55 +0200
> the following three patches fix a few bugs introduced by the multicast routing
> rule patches:
...
> Please apply or pull from:
>
> git://git.kernel.org/pub/scm/linux/kernel/git/kaber/ipmr-2.6.git master
Pulled, thanks a lot Patrick!
^ permalink raw reply
* Re: [PATCH] ip: Fix ip_dev_loopback_xmit()
From: David Miller @ 2010-04-15 21:26 UTC (permalink / raw)
To: eric.dumazet; +Cc: eparis, netdev, therbert
In-Reply-To: <1271358783.16881.2949.camel@edumazet-laptop>
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Thu, 15 Apr 2010 21:13:03 +0200
> [PATCH] ip: Fix ip_dev_loopback_xmit()
Applied to net-2.6, thanks Eric.
^ permalink raw reply
* Re: pull request: wireless-2.6 2010-04-15
From: David Miller @ 2010-04-15 21:29 UTC (permalink / raw)
To: linville; +Cc: linux-wireless, netdev, linux-kernel
In-Reply-To: <20100415200331.GD3020@tuxdriver.com>
From: "John W. Linville" <linville@tuxdriver.com>
Date: Thu, 15 Apr 2010 16:03:31 -0400
> Another fix intended for 2.6.34...without it some firmware wierdness can
> induce the driver into hanging the box... :-(
>
> Please let me know if there are problems!
Pulled, thanks.
^ permalink raw reply
* Re: pull request: wireless-next-2.6 2010-04-15
From: David Miller @ 2010-04-15 21:31 UTC (permalink / raw)
To: linville; +Cc: linux-wireless, netdev
In-Reply-To: <20100415205358.GA6659@tuxdriver.com>
From: "John W. Linville" <linville@tuxdriver.com>
Date: Thu, 15 Apr 2010 16:53:59 -0400
> Here is another huge dump of wireless bits intended for 2.6.35... It is
> mostly drivers, and mostly the "usual suspects" of those -- ath5k,
> ath9k, iwlwifi, rt2x00, wl1271, and others. There are also some
> infrastructure bits from Johannes and Jouni, including some tracing
> stuff.
>
> Please let me know if there are problems!
Pulled, thanks John!
> P.S. Please note the "for-davem" after the git url... :-)
Yep, saw it :-)
^ permalink raw reply
* Re: NULL pointer dereference panic in stable (2.6.33.2), amd64
From: David Miller @ 2010-04-15 21:33 UTC (permalink / raw)
To: eric.dumazet; +Cc: krkumar2, netdev, nuclearcat
In-Reply-To: <1271364375.16881.3099.camel@edumazet-laptop>
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Thu, 15 Apr 2010 22:46:15 +0200
> Le jeudi 15 avril 2010 à 22:30 +0200, Eric Dumazet a écrit :
>>
>> @@ -1938,6 +1928,8 @@ gso:
>> if (dev->priv_flags & IFF_XMIT_DST_RELEASE)
>> skb_dst_drop(nskb);
>>
>> + skb_orphan(nskb);
>> +
>> rc = ops->ndo_start_xmit(nskb, dev);
>> if (unlikely(rc != NETDEV_TX_OK)) {
>> if (rc & ~NETDEV_TX_MASK)
>
> Well, might need to test if skb is not shared before orphaning it
>
> if (!skb_shared(skb))
> skb_orphan(nskb);
If it's not legal to skb_orphan() here then it would not be legal for
the drivers to unconditionally skb_orphan(), which they do.
So either your test is unnecessary, or we have a big existing problem
:-)
^ permalink raw reply
* Re: [net-next-2.6 PATCH 2/2] net: replace ipfragok with skb->local_df
From: David Miller @ 2010-04-15 22:33 UTC (permalink / raw)
To: shanwei
Cc: herbert, yinghai.lu, kuznet, pekkas, jmorris, yoshfuji, kaber,
" <netdev
In-Reply-To: <4BC70EF1.6080400@cn.fujitsu.com>
Your netdev entry on the CC: list was literally:
" <netdev@vger.kernel.org>,
which caused your patch to not make it netdev and therefore
it also didn't make it into patchwork.
Please resubmit your patches (both of them) with the CC:
list fixed up.
Thank you.
^ permalink raw reply
* Re: [PATCH net-next] net/l2tp/l2tp_debugfs.c: Convert NIPQUAD to %pI4
From: David Miller @ 2010-04-15 22:37 UTC (permalink / raw)
To: jchapman; +Cc: joe, linux-kernel, netdev
In-Reply-To: <4BC75EA3.2070402@katalix.com>
From: James Chapman <jchapman@katalix.com>
Date: Thu, 15 Apr 2010 19:44:51 +0100
> Joe Perches wrote:
>> Signed-off-by: Joe Perches <joe@perches.com>
> Acked-by: James Chapman <jchapman@katalix.com>
Applied, thanks.
^ permalink raw reply
* Re: rps perfomance WAS(Re: rps: question
From: Changli Gao @ 2010-04-15 23:51 UTC (permalink / raw)
To: hadi; +Cc: Eric Dumazet, Tom Herbert, netdev
In-Reply-To: <1271335844.23780.8.camel@bigi>
On Thu, Apr 15, 2010 at 8:50 PM, jamal <hadi@cyberus.ca> wrote:
> On Thu, 2010-04-15 at 20:32 +0800, Changli Gao wrote:
>
>> For historical reason, we use Linux-2.6.18. Our company have several
>> products with CPU Xen, P4, or i7. Some of them are SMP, Multi-Core and
>> Multi-Threaded.
>
> Thanks for sharing. How much more can you say? ;-> Do you have a paper
> or description of some sort somewhere?
On a dual 4-core Xeon, we use one core for NIC in internal side, one
core for NIC in the external side, one for inbound QoS, one for
outbound QoS, and the CPU cycles left are used by DPI(DFA), the total
throughput is about 3 Gbps with a polygraph test.
>
>> We use the similar mechanism like dynamic weighted
>> RPS. The total throughput is increased nearly linear with the number
>> of the worker threads(one worker thread per CPU).
>
> Other than the i7 - have you tried to run rps on on the P4?
>
No.
--
Regards,
Changli Gao(xiaosuo@gmail.com)
^ permalink raw reply
* Re: rps perfomance WAS(Re: rps: question
From: Changli Gao @ 2010-04-15 23:56 UTC (permalink / raw)
To: hadi; +Cc: Rick Jones, David Miller, eric.dumazet, therbert, netdev, robert,
andi
In-Reply-To: <1271362581.23780.12.camel@bigi>
On Fri, Apr 16, 2010 at 4:16 AM, jamal <hadi@cyberus.ca> wrote:
>
> Sounds interesting.
> Wikipedia information overload. Any arch description of the HP9000?
> Did your scheme use IPIs to message the other CPUs?
>
If you doubt the cost of smp_call_function_single(), how about having
a try with my another patch, which implements the similar of RPS, but
uses kernel threads instead, so no explicit IPI.
http://patchwork.ozlabs.org/patch/38319/
--
Regards,
Changli Gao(xiaosuo@gmail.com)
^ permalink raw reply
* Re: [PATCH] ip: Fix ip_dev_loopback_xmit()
From: Changli Gao @ 2010-04-16 0:03 UTC (permalink / raw)
To: David Miller; +Cc: eric.dumazet, eparis, netdev, therbert
In-Reply-To: <20100415.142641.125242830.davem@davemloft.net>
On Fri, Apr 16, 2010 at 5:26 AM, David Miller <davem@davemloft.net> wrote:
> From: Eric Dumazet <eric.dumazet@gmail.com>
> Date: Thu, 15 Apr 2010 21:13:03 +0200
>
>> [PATCH] ip: Fix ip_dev_loopback_xmit()
>
> Applied to net-2.6, thanks Eric.
Now, I am doubting the correctness of the following comment:
/*
* The higher levels take care of making this non-reentrant (it's
* called with bh's disabled).
*/
static netdev_tx_t loopback_xmit(struct sk_buff *skb,
struct net_device *dev)
{
struct pcpu_lstats __percpu *pcpu_lstats;
struct pcpu_lstats *lb_stats;
int len;
skb_orphan(skb);
skb->protocol = eth_type_trans(skb, dev);
And these lines:
/* it's OK to use per_cpu_ptr() because BHs are off */
pcpu_lstats = (void __percpu __force *)dev->ml_priv;
lb_stats = this_cpu_ptr(pcpu_lstats);
--
Regards,
Changli Gao(xiaosuo@gmail.com)
^ permalink raw reply
* Re: [PATCH] ip: Fix ip_dev_loopback_xmit()
From: David Miller @ 2010-04-16 0:15 UTC (permalink / raw)
To: xiaosuo; +Cc: eric.dumazet, eparis, netdev, therbert
In-Reply-To: <w2o412e6f7f1004151703xdcc4da16s4eb6308f2578b531@mail.gmail.com>
From: Changli Gao <xiaosuo@gmail.com>
Date: Fri, 16 Apr 2010 08:03:59 +0800
> On Fri, Apr 16, 2010 at 5:26 AM, David Miller <davem@davemloft.net> wrote:
>> From: Eric Dumazet <eric.dumazet@gmail.com>
>> Date: Thu, 15 Apr 2010 21:13:03 +0200
>>
>>> [PATCH] ip: Fix ip_dev_loopback_xmit()
>>
>> Applied to net-2.6, thanks Eric.
>
>
> Now, I am doubting the correctness of the following comment:
The ->hard_start_xmit() method always executes with software
interrupts disabled.
^ permalink raw reply
* Re: [PATCH] ip: Fix ip_dev_loopback_xmit()
From: Changli Gao @ 2010-04-16 0:19 UTC (permalink / raw)
To: David Miller; +Cc: eric.dumazet, eparis, netdev, therbert
In-Reply-To: <20100415.171548.179331927.davem@davemloft.net>
On Fri, Apr 16, 2010 at 8:15 AM, David Miller <davem@davemloft.net> wrote:
>
> The ->hard_start_xmit() method always executes with software
> interrupts disabled.
>
Oh, sorry. I traced to the wrong function.
--
Regards,
Changli Gao(xiaosuo@gmail.com)
^ permalink raw reply
* Re: [PATCH] net: mac8390 - Sort out memory/MMIO accesses and casts (was: Re: drivers/net/mac8390.c: Remove useless memcpy casting)
From: Finn Thain @ 2010-04-16 2:14 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: Joe Perches, David S. Miller, netdev, Linux Kernel Mailing List,
Linux/m68k
In-Reply-To: <l2k10f740e81004151234t3004275az36e7873493067a8a@mail.gmail.com>
On Thu, 15 Apr 2010, Geert Uytterhoeven wrote:
> On Mon, Mar 8, 2010 at 18:16, Joe Perches <joe@perches.com> wrote:
>
> > Thanks, I'll submit a patch to fix it by tomorrow or so.
>
> It hasn't been fixed yet.
Thanks for taking care of this, Geert.
> But here's a better solution. I do not have the hardware to test it,
> though. Finn, does it {look OK,work}?
It looks fine. I can't test it right now, but I will do so when I get the
opportunity.
Finn
^ permalink raw reply
* Re: [PATCH] rdma/cm: Randomize local port allocation.
From: Cong Wang @ 2010-04-16 2:22 UTC (permalink / raw)
To: Sean Hefty
Cc: 'Tetsuo Handa', opurdila, eric.dumazet, netdev, nhorman,
davem, ebiederm, linux-kernel, rolandd, linux-rdma
In-Reply-To: <5CE6BC7B954643FAAFFD2AD66F673CBD@amr.corp.intel.com>
Sean Hefty wrote:
> From: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
>
>> Randomize local port allocation in a way sctp_get_port_local() does.
>> Update rover at the end of loop since we're likely to pick a valid port
>> on the first try.
>>
>> Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
> Reviewed-by: Sean Hefty <sean.hefty@intel.com>
>
Thanks, everyone!
>
> I like this version, thanks! I'm not sure which tree to merge it through.
> Are you needing this for 2.6.34, or is 2.6.35 okay?
>
As soon as possible, so 2.6.34. :)
^ permalink raw reply
* Re: [net-next-2.6 PATCH 2/2] net: replace ipfragok with skb->local_df
From: Shan Wei @ 2010-04-16 2:26 UTC (permalink / raw)
To: Herbert Xu
Cc: David Miller, yinghai.lu, kuznet, pekkas, jmorris,
yoshfuji@linux-ipv6.org >> YOSHIFUJI Hideaki,
Patrick McHardy, netdev@vger.kernel.org, dccp, linux-sctp,
kleptog, jchapman, mostrows, acme
In-Reply-To: <20100415151926.GA4813@gondor.apana.org.au>
Herbert Xu wrote, at 04/15/2010 11:19 PM:
> On Thu, Apr 15, 2010 at 09:04:49PM +0800, Shan Wei wrote:
>> As Herbert Xu said: we should be able to simply replace ipfragok
>> with skb->local_df. commit f88037(sctp: Drop ipfargok in sctp_xmit function)
>> has droped ipfragok and set local_df value properly.
>>
>> The patch kills the ipfragok parameter of .queue_xmit().
>
> Both patches look good to me.
>
>> @@ -370,7 +370,7 @@ packet_routed:
>> skb_reset_network_header(skb);
>> iph = ip_hdr(skb);
>> *((__be16 *)iph) = htons((4 << 12) | (5 << 8) | (inet->tos & 0xff));
>> - if (ip_dont_fragment(sk, &rt->u.dst) && !ipfragok)
>> + if (ip_dont_fragment(sk, &rt->u.dst) && !skb->local_df)
>> iph->frag_off = htons(IP_DF);
>> else
>> iph->frag_off = 0;
>
> This hunk looked suspecious at first. However, it is OK because
> ever calls this with ipfragok == 1, or local_df == 1.
>
> The first is obvious from this patch itself, the second not quite
> so obvious.
>
> As nobody calls it with local_df == 1 anyway, and strictly speaking
> local_df shouldn't be set at all by the caller of ip_queue_xmit, we
> should simply remove the && ... bit and have
>
> if (ip_dont_fragment(sk, &rt->u.dst))
Now, PPPoX/PPPoL2TP driver still use ip_queue_xmit to send packets with ipfragok == 1.
So, now we can't remove the && ... bit.
--
Best Regards
-----
Shan Wei
>
> Cheers,
^ permalink raw reply
* another cleanup patch gone wrong
From: Finn Thain @ 2010-04-16 2:34 UTC (permalink / raw)
To: Joe Perches
Cc: David S. Miller, Paul Gortmaker, netdev,
Linux Kernel Mailing List, Linux/m68k
...but this one was already merged, unfortunately.
> Use printk_once
> Add #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
> Convert printks without KERN_<level> to pr_info and pr_cont
>
> Signed-off-by: Joe Perches <joe@perches.com>
> Signed-off-by: David S. Miller <davem@davemloft.net>
>
>
> diff --git a/drivers/net/mac8390.c b/drivers/net/mac8390.c
> index 517cee4..8bd09e2 100644 (file)
> --- a/drivers/net/mac8390.c
> +++ b/drivers/net/mac8390.c
> @@ -17,6 +17,8 @@
> /* 2002-12-30: Try to support more cards, some clues from NetBSD driver */
> /* 2003-12-26: Make sure Asante cards always work. */
>
> +#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
> +
Why the macro? You only used it once.
The pr_xxx naming convention belongs to a kernel-wide include file. Is it
really a good idea to start repurposing it in .c files?
> @@ -545,7 +537,7 @@ static int __init mac8390_initdev(struct net_device * dev, struct nubus_dev * nd
> case MAC8390_APPLE:
> switch (mac8390_testio(dev->mem_start)) {
> case ACCESS_UNKNOWN:
> - printk("Don't know how to access card memory!\n");
> + pr_info("Don't know how to access card memory!\n");
No, this is pr_err. The driver sets dev->mem_start expecting it to work,
obviously.
> return -ENODEV;
> break;
>
> @@ -633,7 +626,7 @@ static int mac8390_open(struct net_device *dev)
> {
> __ei_open(dev);
> if (request_irq(dev->irq, __ei_interrupt, 0, "8390 Ethernet", dev)) {
> - printk ("%s: unable to get IRQ %d.\n", dev->name, dev->irq);
> + pr_info("%s: unable to get IRQ %d.\n", dev->name, dev->irq);
> return -EAGAIN;
Same here.
> }
> return 0;
> @@ -650,7 +643,7 @@ static void mac8390_no_reset(struct net_device *dev)
> {
> ei_status.txing = 0;
> if (ei_debug > 1)
> - printk("reset not supported\n");
> + pr_info("reset not supported\n");
I think you meant pr_debug().
> return;
> }
>
> @@ -658,11 +651,11 @@ static void interlan_reset(struct net_device *dev)
> {
> unsigned char *target=nubus_slot_addr(IRQ2SLOT(dev->irq));
> if (ei_debug > 1)
> - printk("Need to reset the NS8390 t=%lu...", jiffies);
> + pr_info("Need to reset the NS8390 t=%lu...", jiffies);
Same here.
Finn
^ permalink raw reply
* [net-next-2.6 PATCH 1/3 v2] ipv6: cancel to setting local_df in ip6_xmit()
From: Shan Wei @ 2010-04-16 2:39 UTC (permalink / raw)
To: David Miller, Herbert Xu, emils.tantilov
Cc: kuznet, pekkas, jmorris,
yoshfuji@linux-ipv6.org >> YOSHIFUJI Hideaki,
Patrick McHardy, eric.dumazet, netdev@vger.kernel.org, Shan Wei
commit f88037(sctp: Drop ipfargok in sctp_xmit function)
has droped ipfragok and set local_df value properly.
So the change of commit 77e2f1(ipv6: Fix ip6_xmit to
send fragments if ipfragok is true) is not needed.
So the patch remove them.
Signed-off-by: Shan Wei <shanwei@cn.fujitsu.com>
---
Resend the patches with fixed cc list, no content changes.
---
net/ipv6/ip6_output.c | 4 ----
1 files changed, 0 insertions(+), 4 deletions(-)
diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c
index 16c4391..f3a847e 100644
--- a/net/ipv6/ip6_output.c
+++ b/net/ipv6/ip6_output.c
@@ -231,10 +231,6 @@ int ip6_xmit(struct sock *sk, struct sk_buff *skb, struct flowi *fl,
skb_reset_network_header(skb);
hdr = ipv6_hdr(skb);
- /* Allow local fragmentation. */
- if (ipfragok)
- skb->local_df = 1;
-
/*
* Fill in the IPv6 header
*/
--
1.6.3.3
^ permalink raw reply related
* [net-next-2.6 PATCH 2/3 v2] net: replace ipfragok with skb->local_df
From: Shan Wei @ 2010-04-16 2:43 UTC (permalink / raw)
To: David Miller, Herbert Xu
Cc: Shan Wei, yinghai.lu, kuznet, pekkas, jmorris,
yoshfuji@linux-ipv6.org >> YOSHIFUJI Hideaki,
Patrick McHardy, netdev, dccp, linux-sctp, jchapman, mostrows
As Herbert Xu said: we should be able to simply replace ipfragok
with skb->local_df. commit f88037(sctp: Drop ipfargok in sctp_xmit function)
has droped ipfragok and set local_df value properly.
The patch kills the ipfragok parameter of .queue_xmit().
Signed-off-by: Shan Wei <shanwei@cn.fujitsu.com>
---
Resend the patches with fixed cc list, no content changes.
---
include/net/inet6_connection_sock.h | 2 +-
include/net/inet_connection_sock.h | 2 +-
include/net/ip.h | 2 +-
include/net/ipv6.h | 3 +--
net/dccp/ipv6.c | 4 ++--
net/dccp/output.c | 2 +-
net/ipv4/ip_output.c | 4 ++--
net/ipv4/tcp_output.c | 2 +-
net/ipv6/inet6_connection_sock.c | 4 ++--
net/ipv6/ip6_output.c | 2 +-
net/ipv6/tcp_ipv6.c | 4 ++--
net/l2tp/l2tp_core.c | 3 ++-
net/l2tp/l2tp_ip.c | 2 +-
net/sctp/ipv6.c | 2 +-
net/sctp/protocol.c | 2 +-
15 files changed, 20 insertions(+), 20 deletions(-)
diff --git a/include/net/inet6_connection_sock.h b/include/net/inet6_connection_sock.h
index f13ddc2..aae08f6 100644
--- a/include/net/inet6_connection_sock.h
+++ b/include/net/inet6_connection_sock.h
@@ -38,5 +38,5 @@ extern void inet6_csk_reqsk_queue_hash_add(struct sock *sk,
extern void inet6_csk_addr2sockaddr(struct sock *sk, struct sockaddr *uaddr);
-extern int inet6_csk_xmit(struct sk_buff *skb, int ipfragok);
+extern int inet6_csk_xmit(struct sk_buff *skb);
#endif /* _INET6_CONNECTION_SOCK_H */
diff --git a/include/net/inet_connection_sock.h b/include/net/inet_connection_sock.h
index 52c8b8b..b6d3b55 100644
--- a/include/net/inet_connection_sock.h
+++ b/include/net/inet_connection_sock.h
@@ -36,7 +36,7 @@ struct tcp_congestion_ops;
* (i.e. things that depend on the address family)
*/
struct inet_connection_sock_af_ops {
- int (*queue_xmit)(struct sk_buff *skb, int ipfragok);
+ int (*queue_xmit)(struct sk_buff *skb);
void (*send_check)(struct sock *sk, struct sk_buff *skb);
int (*rebuild_header)(struct sock *sk);
int (*conn_request)(struct sock *sk, struct sk_buff *skb);
diff --git a/include/net/ip.h b/include/net/ip.h
index 503994a..a84ceb6 100644
--- a/include/net/ip.h
+++ b/include/net/ip.h
@@ -101,7 +101,7 @@ extern int ip_do_nat(struct sk_buff *skb);
extern void ip_send_check(struct iphdr *ip);
extern int __ip_local_out(struct sk_buff *skb);
extern int ip_local_out(struct sk_buff *skb);
-extern int ip_queue_xmit(struct sk_buff *skb, int ipfragok);
+extern int ip_queue_xmit(struct sk_buff *skb);
extern void ip_init(void);
extern int ip_append_data(struct sock *sk,
int getfrag(void *from, char *to, int offset, int len,
diff --git a/include/net/ipv6.h b/include/net/ipv6.h
index 033ddd4..b1d8db9 100644
--- a/include/net/ipv6.h
+++ b/include/net/ipv6.h
@@ -482,8 +482,7 @@ extern int ip6_rcv_finish(struct sk_buff *skb);
extern int ip6_xmit(struct sock *sk,
struct sk_buff *skb,
struct flowi *fl,
- struct ipv6_txoptions *opt,
- int ipfragok);
+ struct ipv6_txoptions *opt);
extern int ip6_nd_hdr(struct sock *sk,
struct sk_buff *skb,
diff --git a/net/dccp/ipv6.c b/net/dccp/ipv6.c
index ab1ab95..0916988 100644
--- a/net/dccp/ipv6.c
+++ b/net/dccp/ipv6.c
@@ -292,7 +292,7 @@ static int dccp_v6_send_response(struct sock *sk, struct request_sock *req,
&ireq6->loc_addr,
&ireq6->rmt_addr);
ipv6_addr_copy(&fl.fl6_dst, &ireq6->rmt_addr);
- err = ip6_xmit(sk, skb, &fl, opt, 0);
+ err = ip6_xmit(sk, skb, &fl, opt);
err = net_xmit_eval(err);
}
@@ -347,7 +347,7 @@ static void dccp_v6_ctl_send_reset(struct sock *sk, struct sk_buff *rxskb)
if (!ip6_dst_lookup(ctl_sk, &dst, &fl)) {
if (xfrm_lookup(net, &dst, &fl, NULL, 0) >= 0) {
skb_dst_set(skb, dst);
- ip6_xmit(ctl_sk, skb, &fl, NULL, 0);
+ ip6_xmit(ctl_sk, skb, &fl, NULL);
DCCP_INC_STATS_BH(DCCP_MIB_OUTSEGS);
DCCP_INC_STATS_BH(DCCP_MIB_OUTRSTS);
return;
diff --git a/net/dccp/output.c b/net/dccp/output.c
index b8d98e3..e98b65e 100644
--- a/net/dccp/output.c
+++ b/net/dccp/output.c
@@ -136,7 +136,7 @@ static int dccp_transmit_skb(struct sock *sk, struct sk_buff *skb)
DCCP_INC_STATS(DCCP_MIB_OUTSEGS);
- err = icsk->icsk_af_ops->queue_xmit(skb, 0);
+ err = icsk->icsk_af_ops->queue_xmit(skb);
return net_xmit_eval(err);
}
return -ENOBUFS;
diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c
index c65f18e..512af81 100644
--- a/net/ipv4/ip_output.c
+++ b/net/ipv4/ip_output.c
@@ -311,7 +311,7 @@ int ip_output(struct sk_buff *skb)
!(IPCB(skb)->flags & IPSKB_REROUTED));
}
-int ip_queue_xmit(struct sk_buff *skb, int ipfragok)
+int ip_queue_xmit(struct sk_buff *skb)
{
struct sock *sk = skb->sk;
struct inet_sock *inet = inet_sk(sk);
@@ -370,7 +370,7 @@ packet_routed:
skb_reset_network_header(skb);
iph = ip_hdr(skb);
*((__be16 *)iph) = htons((4 << 12) | (5 << 8) | (inet->tos & 0xff));
- if (ip_dont_fragment(sk, &rt->u.dst) && !ipfragok)
+ if (ip_dont_fragment(sk, &rt->u.dst) && !skb->local_df)
iph->frag_off = htons(IP_DF);
else
iph->frag_off = 0;
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c
index e468499..2b7d71f 100644
--- a/net/ipv4/tcp_output.c
+++ b/net/ipv4/tcp_output.c
@@ -890,7 +890,7 @@ static int tcp_transmit_skb(struct sock *sk, struct sk_buff *skb, int clone_it,
if (after(tcb->end_seq, tp->snd_nxt) || tcb->seq == tcb->end_seq)
TCP_INC_STATS(sock_net(sk), TCP_MIB_OUTSEGS);
- err = icsk->icsk_af_ops->queue_xmit(skb, 0);
+ err = icsk->icsk_af_ops->queue_xmit(skb);
if (likely(err <= 0))
return err;
diff --git a/net/ipv6/inet6_connection_sock.c b/net/ipv6/inet6_connection_sock.c
index 628db24..0c5e3c3 100644
--- a/net/ipv6/inet6_connection_sock.c
+++ b/net/ipv6/inet6_connection_sock.c
@@ -178,7 +178,7 @@ struct dst_entry *__inet6_csk_dst_check(struct sock *sk, u32 cookie)
return dst;
}
-int inet6_csk_xmit(struct sk_buff *skb, int ipfragok)
+int inet6_csk_xmit(struct sk_buff *skb)
{
struct sock *sk = skb->sk;
struct inet_sock *inet = inet_sk(sk);
@@ -234,7 +234,7 @@ int inet6_csk_xmit(struct sk_buff *skb, int ipfragok)
/* Restore final destination back after routing done */
ipv6_addr_copy(&fl.fl6_dst, &np->daddr);
- return ip6_xmit(sk, skb, &fl, np->opt, 0);
+ return ip6_xmit(sk, skb, &fl, np->opt);
}
EXPORT_SYMBOL_GPL(inet6_csk_xmit);
diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c
index f3a847e..141819f 100644
--- a/net/ipv6/ip6_output.c
+++ b/net/ipv6/ip6_output.c
@@ -185,7 +185,7 @@ int ip6_output(struct sk_buff *skb)
*/
int ip6_xmit(struct sock *sk, struct sk_buff *skb, struct flowi *fl,
- struct ipv6_txoptions *opt, int ipfragok)
+ struct ipv6_txoptions *opt)
{
struct net *net = sock_net(sk);
struct ipv6_pinfo *np = inet6_sk(sk);
diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c
index b429dfd..bd5ef7b 100644
--- a/net/ipv6/tcp_ipv6.c
+++ b/net/ipv6/tcp_ipv6.c
@@ -509,7 +509,7 @@ static int tcp_v6_send_synack(struct sock *sk, struct request_sock *req,
__tcp_v6_send_check(skb, &treq->loc_addr, &treq->rmt_addr);
ipv6_addr_copy(&fl.fl6_dst, &treq->rmt_addr);
- err = ip6_xmit(sk, skb, &fl, opt, 0);
+ err = ip6_xmit(sk, skb, &fl, opt);
err = net_xmit_eval(err);
}
@@ -1071,7 +1071,7 @@ static void tcp_v6_send_response(struct sk_buff *skb, u32 seq, u32 ack, u32 win,
if (!ip6_dst_lookup(ctl_sk, &dst, &fl)) {
if (xfrm_lookup(net, &dst, &fl, NULL, 0) >= 0) {
skb_dst_set(buff, dst);
- ip6_xmit(ctl_sk, buff, &fl, NULL, 0);
+ ip6_xmit(ctl_sk, buff, &fl, NULL);
TCP_INC_STATS_BH(net, TCP_MIB_OUTSEGS);
if (rst)
TCP_INC_STATS_BH(net, TCP_MIB_OUTRSTS);
diff --git a/net/l2tp/l2tp_core.c b/net/l2tp/l2tp_core.c
index 98dfcce..ecc7aea 100644
--- a/net/l2tp/l2tp_core.c
+++ b/net/l2tp/l2tp_core.c
@@ -954,7 +954,8 @@ int l2tp_xmit_core(struct l2tp_session *session, struct sk_buff *skb, size_t dat
}
/* Queue the packet to IP for output */
- error = ip_queue_xmit(skb, 1);
+ skb->local_df = 1;
+ error = ip_queue_xmit(skb);
/* Update stats */
if (error >= 0) {
diff --git a/net/l2tp/l2tp_ip.c b/net/l2tp/l2tp_ip.c
index 75bf784..0852512 100644
--- a/net/l2tp/l2tp_ip.c
+++ b/net/l2tp/l2tp_ip.c
@@ -501,7 +501,7 @@ static int l2tp_ip_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *m
skb_dst_set(skb, dst_clone(&rt->u.dst));
/* Queue the packet to IP for output */
- rc = ip_queue_xmit(skb, 0);
+ rc = ip_queue_xmit(skb);
error:
/* Update stats */
diff --git a/net/sctp/ipv6.c b/net/sctp/ipv6.c
index 14db568..7326891 100644
--- a/net/sctp/ipv6.c
+++ b/net/sctp/ipv6.c
@@ -232,7 +232,7 @@ static int sctp_v6_xmit(struct sk_buff *skb, struct sctp_transport *transport)
if (!(transport->param_flags & SPP_PMTUD_ENABLE))
skb->local_df = 1;
- return ip6_xmit(sk, skb, &fl, np->opt, 0);
+ return ip6_xmit(sk, skb, &fl, np->opt);
}
/* Returns the dst cache entry for the given source and destination ip
diff --git a/net/sctp/protocol.c b/net/sctp/protocol.c
index a56f98e..704298f 100644
--- a/net/sctp/protocol.c
+++ b/net/sctp/protocol.c
@@ -854,7 +854,7 @@ static inline int sctp_v4_xmit(struct sk_buff *skb,
IP_PMTUDISC_DO : IP_PMTUDISC_DONT;
SCTP_INC_STATS(SCTP_MIB_OUTSCTPPACKS);
- return ip_queue_xmit(skb, 0);
+ return ip_queue_xmit(skb);
}
static struct sctp_af sctp_af_inet;
--
1.6.3.3
^ permalink raw reply related
* [net-next-2.6 PATCH 3/3 v2] ipv6: fix the comment of ip6_xmit()
From: Shan Wei @ 2010-04-16 2:48 UTC (permalink / raw)
To: David Miller; +Cc: netdev@vger.kernel.org
ip6_xmit() is used by upper transport protocol.
Signed-off-by: Shan Wei <shanwei@cn.fujitsu.com>
---
net/ipv6/ip6_output.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c
index 141819f..5129a16 100644
--- a/net/ipv6/ip6_output.c
+++ b/net/ipv6/ip6_output.c
@@ -181,7 +181,7 @@ int ip6_output(struct sk_buff *skb)
}
/*
- * xmit an sk_buff (used by TCP)
+ * xmit an sk_buff (used by TCP, SCTP and DCCP)
*/
int ip6_xmit(struct sock *sk, struct sk_buff *skb, struct flowi *fl,
--
1.6.3.3
^ permalink raw reply related
* Re: another cleanup patch gone wrong
From: David Miller @ 2010-04-16 3:01 UTC (permalink / raw)
To: fthain; +Cc: joe, p_gortmaker, netdev, linux-kernel, linux-m68k
In-Reply-To: <alpine.OSX.2.00.1004161214270.271@localhost>
From: Finn Thain <fthain@telegraphics.com.au>
Date: Fri, 16 Apr 2010 12:34:24 +1000 (EST)
>
> ...but this one was already merged, unfortunately.
>
>> Use printk_once
>> Add #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
>> Convert printks without KERN_<level> to pr_info and pr_cont
>>
>> Signed-off-by: Joe Perches <joe@perches.com>
>> Signed-off-by: David S. Miller <davem@davemloft.net>
>>
>>
>> diff --git a/drivers/net/mac8390.c b/drivers/net/mac8390.c
>> index 517cee4..8bd09e2 100644 (file)
>> --- a/drivers/net/mac8390.c
>> +++ b/drivers/net/mac8390.c
>> @@ -17,6 +17,8 @@
>> /* 2002-12-30: Try to support more cards, some clues from NetBSD driver */
>> /* 2003-12-26: Make sure Asante cards always work. */
>>
>> +#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
>> +
>
> Why the macro? You only used it once.
It gets expanded internally into all of the pr_*() calls.
> The pr_xxx naming convention belongs to a kernel-wide include file. Is it
> really a good idea to start repurposing it in .c files?
This is exactly how it can be used, and there is much
precedent for this now.
>> - printk("Don't know how to access card memory!\n");
>> + pr_info("Don't know how to access card memory!\n");
>
> No, this is pr_err. The driver sets dev->mem_start expecting it to work,
> obviously.
It was an unspecified printk() so Joe's conversion is equal
and that's a good way for him to have made these changes.
If we want to mark this as KERN_ERR or whatever, that's entirely
a seperate change.
I think your objections to Joe's changes are completely uncalled
for and his changes were good ones.
^ permalink raw reply
* Re: another cleanup patch gone wrong
From: Joe Perches @ 2010-04-16 3:11 UTC (permalink / raw)
To: Finn Thain
Cc: David S. Miller, Paul Gortmaker, netdev,
Linux Kernel Mailing List, Linux/m68k
In-Reply-To: <alpine.OSX.2.00.1004161214270.271@localhost>
On Fri, 2010-04-16 at 12:34 +1000, Finn Thain wrote:
> ...but this one was already merged, unfortunately.
>
> > Use printk_once
> > Add #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
> > Convert printks without KERN_<level> to pr_info and pr_cont
> >
> > Signed-off-by: Joe Perches <joe@perches.com>
> > Signed-off-by: David S. Miller <davem@davemloft.net>
> >
> >
> > diff --git a/drivers/net/mac8390.c b/drivers/net/mac8390.c
> > index 517cee4..8bd09e2 100644 (file)
> > --- a/drivers/net/mac8390.c
> > +++ b/drivers/net/mac8390.c
> > @@ -17,6 +17,8 @@
> > /* 2002-12-30: Try to support more cards, some clues from NetBSD driver */
> > /* 2003-12-26: Make sure Asante cards always work. */
> >
> > +#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
> > +
>
> Why the macro? You only used it once.
It's used embedded in the pr_<level> functions.
It's used more than once.
> The pr_xxx naming convention belongs to a kernel-wide include file. Is it
> really a good idea to start repurposing it in .c files?
It's in kernel.h, and yes, it is.
http://lkml.org/lkml/2008/11/12/297
> No, this is pr_err. The driver sets dev->mem_start expecting it to work,
> obviously.
I suggest you change the levels to what you desire.
You could add yourself to the MAINTAINERS entry for this file.
cheers, Joe
^ permalink raw reply
* Re: another cleanup patch gone wrong
From: Finn Thain @ 2010-04-16 3:21 UTC (permalink / raw)
To: Joe Perches
Cc: David S. Miller, Paul Gortmaker, netdev,
Linux Kernel Mailing List, Linux/m68k
In-Reply-To: <1271387506.2298.17.camel@Joe-Laptop.home>
On Thu, 15 Apr 2010, Joe Perches wrote:
> > Why the macro? You only used it once.
>
> It's used embedded in the pr_<level> functions.
> It's used more than once.
>
> > The pr_xxx naming convention belongs to a kernel-wide include file. Is it
> > really a good idea to start repurposing it in .c files?
>
> It's in kernel.h, and yes, it is.
> http://lkml.org/lkml/2008/11/12/297
My mistake.
Finn
^ 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