* Re: [RFT PATCH 7/9] ethtool: prepare for larger netdev_features_t type
From: Ben Hutchings @ 2011-06-20 21:16 UTC (permalink / raw)
To: Michał Mirosław; +Cc: netdev, David S. Miller
In-Reply-To: <852a74b9068b3be7413a65023f6096f142dfd805.1308596963.git.mirq-linux@rere.qmqm.pl>
On Mon, 2011-06-20 at 21:14 +0200, Michał Mirosław wrote:
[...]
> @@ -125,19 +131,26 @@ static int ethtool_set_features(struct net_device *dev, void __user *useraddr)
> if (copy_from_user(features, useraddr, sizeof(features)))
> return -EFAULT;
>
> - if (features[0].valid & ~NETIF_F_ETHTOOL_BITS)
> + /* I wonder if the compiler will be smart enough to loop-unroll
> + * and optimize this... (no worries if not) --mq */
> + for (i = ETHTOOL_DEV_FEATURE_WORDS; i-- > 0; ) {
> + valid = (valid << 32)|features[i].valid;
> + wanted = (wanted << 32)|features[i].requested;
> + }
[...]
I don't know (or care) about optimisation of this, but I would expect
gcc to complain about shifting a 32-bit value by 32 bits. I suggest you
write this as:
for (i = 0; i < ETHTOOL_DEV_FEATURE_WORDS; ++i) {
valid |= (netdev_features_t)features[i].valid << 32 *i;
wanted |= (netdev_features_t)features[i].requested << 32 *i;
}
Ben.
--
Ben Hutchings, Senior Software Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.
^ permalink raw reply
* Re: [PATCH 1/1] Allow cascading to work with 6131 chip
From: David Miller @ 2011-06-20 21:18 UTC (permalink / raw)
To: barry; +Cc: netdev, buytenh
In-Reply-To: <1308602433-31320-2-git-send-email-barry@grussling.com>
From: Barry Grussling <barry@grussling.com>
Date: Mon, 20 Jun 2011 13:40:33 -0700
> ---
> net/dsa/mv88e6131.c | 8 ++++++--
> 1 files changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/net/dsa/mv88e6131.c b/net/dsa/mv88e6131.c
> index 45f7411..1a1d1d1 100644
> --- a/net/dsa/mv88e6131.c
> +++ b/net/dsa/mv88e6131.c
> @@ -118,10 +118,14 @@ static int mv88e6131_setup_global(struct dsa_switch *ds)
> REG_WRITE(REG_GLOBAL, 0x1a, (dsa_upstream_port(ds) * 0x1100) | 0x00f0);
>
> /*
> - * Disable cascade port functionality, and set the switch's
> + * Disable cascade port functionality unless this device is
> + * used in a cascade configuration, and set the switch's
This screws up the formatting, please don't do this.
The line is not aligned properly, it uses spaces instead of
TAB characters, etc. etc. etc.
^ permalink raw reply
* [GIT] Networking
From: David Miller @ 2011-06-20 21:20 UTC (permalink / raw)
To: torvalds; +Cc: akpm, netdev, linux-kernel
1) IPVS namespace exit causes crash in conntrack, fix from
Hans Schillstrom.
2) ieee802154_nl_fill_phy() memory leak fix from Jesper Juhl.
3) Fix IRQ autoprobing regression in 3c503 driver, from
Ondrej Zary.
4) Fix oops in mwifiex driver when probing setting using
ethtool, from Yogesh Ashok Powar.
5) Netfilter NAT code adjusts sequence numbers one too many times
over loopback, fix from Julian Anastasov.
6) Bridge multicast code sets ->mrouters_only on wrong SKB, fix
from Fernando Luis Vazquez Cao.
7) Rik van Riel reports a regression of using netpoll over bridge
slave devices. What's happening now is that once we have a device
become a slave, we cannot allow it to have netpoll run over it.
The situations that care about this (virtualization) should run
the netconsole instance over the bridge device, but that only
works if all slave devices support polling. The exception
that makes this difficult is the TUN driver.
Fortunately, adding netpoll support to TUN is entirely trivial
because all of it's receive events are synchronously triggered.
Fix from Neil Horman, tested by Rik van Riel.
8) VLAN code invokes OPS without checking if the underlying device
supports the offload feature, fix from Antoine Reversat.
9) Memory leak fix in bfin_mac driver, from Sonic Zhang.
10) RFS steering doesn't happen on the first pack of a passive TCP
flow due to a missing sock_rps_record_flow() call in both ipv4
and ipv6. Fix from Eric Dumazet.
11) Module ref leak fixes in farsync and gigaset drivers, from
Pavel Shved.
12) inet_diag byte code audit code is buggy and can cause loops as
well as unaligned accesses. Fix from Eric Dumazet.
13) Fix regression in multicast route lookups cause by the conversion
to return error pointers, from Eric Dumazet.
Please pull, thanks a lot!
The following changes since commit ef46222e7b56e728e423527d430cb2013c595491:
Merge branch 'stable/bug.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen (2011-06-20 09:01:33 -0700)
are available in the git repository at:
master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6.git master
Antoine Reversat (1):
vlan: don't call ndo_vlan_rx_register on hardware that doesn't have vlan support
Changli Gao (1):
ppp: use PPP_TRANS instead of the magic number 0x20
Clive Stubbings (1):
fs_enet: fix freescale FCC ethernet dp buffer alignment
David Miller (1):
Bluetooth: Do not ignore errors returned from strict_strtol()
David S. Miller (2):
Merge branch 'master' of git://git.kernel.org/.../kaber/nf-2.6
Merge branch 'davem.r8169' of git://git.kernel.org/.../romieu/netdev-2.6
Eric Dumazet (6):
net: rfs: enable RFS before first data packet is received
inet_diag: fix inet_diag_bc_audit()
ipv4: fix multicast losses
hp100: fix an skb->len race
sgi-xp: fix a use after free
netxen: fix race in skb->len access
Fernando Luis Vázquez Cao (2):
IGMP snooping: set mrouters_only flag for IPv4 traffic properly
IGMP snooping: set mrouters_only flag for IPv6 traffic properly
Filip Palian (1):
Bluetooth: l2cap and rfcomm: fix 1 byte infoleak to userspace.
Francois Romieu (1):
r8169: fix static initializers.
Geert Uytterhoeven (1):
net/hplance: hplance_init() should be __devinit
Hans Schillstrom (1):
IPVS netns exit causes crash in conntrack
Jesper Juhl (2):
ieee802154: Don't leak memory in ieee802154_nl_fill_phy
ipv4, ping: Remove duplicate icmp.h include
Joe Perches (1):
MAINTAINERS: Update EBTABLES mailing list
John W. Linville (2):
Merge branch 'master' of master.kernel.org:/.../padovan/bluetooth-2.6
Merge branch 'master' of git://git.kernel.org/.../linville/wireless-2.6 into for-davem
Julian Anastasov (1):
netfilter: nf_nat: avoid double seq_adjust for loopback
Luiz Augusto von Dentz (1):
Bluetooth: fix shutdown on SCO sockets
Marius B. Kotsbak (1):
net/usb: Add Samsung Kalmia driver for Samsung GT-B3730
Neil Horman (1):
tun: teach the tun/tap driver to support netpoll
Nicolas Cavallari (1):
netfilter: fix looped (broad|multi)cast's MAC handling
Nishant Sarmukadam (1):
mwl8k: Tell firmware to generate CCMP header
Ondrej Zary (1):
3c503: fix broken IRQ autoprobing
Patrick McHardy (3):
Merge branch 'master' of git://git.kernel.org/.../horms/ipvs-2.6
netfilter: ipt_ecn: fix protocol check in ecn_mt_check()
netfilter: ipt_ecn: fix inversion for IP header ECN match
Pavel Shved (2):
farsync: add module_put to error path in fst_open()
gigaset: call module_put before restart of if_open()
Ralf Baechle (1):
phylib: Allow BCM63XX PHY to be selected only on BCM63XX.
Richard Cochran (3):
dp83640: fix phy status frame event parsing
dp83640: drop PHY status frames in the driver.
pxa168_eth: fix race in transmit path.
Sebastian Andrzej Siewior (1):
netfilter: ip_tables: fix compile with debug
Sonic Zhang (1):
netdev: bfin_mac: fix memory leak when freeing dma descriptors
Ville Tervo (1):
Bluetooth: Do not send SET_EVENT_MASK for 1.1 and earlier devices
WANG Cong (1):
netpoll: copy dev name of slaves to struct netpoll
Yogesh Ashok Powar (1):
mwifiex: Fixing NULL pointer dereference
sjur.brandeland@stericsson.com (1):
caif: Bugfix - XOFF removed channel from caif-mux
MAINTAINERS | 3 +-
drivers/bluetooth/btmrvl_debugfs.c | 12 +
drivers/isdn/gigaset/interface.c | 4 +-
drivers/misc/sgi-xp/xpnet.c | 6 +-
drivers/net/3c503.c | 3 +-
drivers/net/bfin_mac.c | 20 +-
drivers/net/bonding/bond_main.c | 1 +
drivers/net/fs_enet/mac-fcc.c | 2 +-
drivers/net/hp100.c | 4 +-
drivers/net/hplance.c | 2 +-
drivers/net/netxen/netxen_nic_main.c | 4 +-
drivers/net/phy/Kconfig | 1 +
drivers/net/phy/dp83640.c | 24 +-
drivers/net/ppp_async.c | 4 +-
drivers/net/pxa168_eth.c | 2 +-
drivers/net/r8169.c | 10 +-
drivers/net/tun.c | 24 ++-
drivers/net/usb/Kconfig | 10 +
drivers/net/usb/Makefile | 1 +
drivers/net/usb/kalmia.c | 384 ++++++++++++++++++++++++
drivers/net/wan/farsync.c | 4 +-
drivers/net/wireless/mwifiex/cfg80211.c | 2 +
drivers/net/wireless/mwl8k.c | 4 +-
include/net/netfilter/nf_conntrack.h | 6 +
net/8021q/vlan.c | 2 +-
net/bluetooth/hci_event.c | 18 +-
net/bluetooth/l2cap_sock.c | 1 +
net/bluetooth/rfcomm/sock.c | 1 +
net/bluetooth/sco.c | 13 +-
net/bridge/br_device.c | 1 +
net/bridge/br_multicast.c | 4 +-
net/caif/cfmuxl.c | 2 +-
net/ieee802154/nl-phy.c | 3 +-
net/ipv4/af_inet.c | 1 +
net/ipv4/inet_diag.c | 14 +-
net/ipv4/netfilter/ip_queue.c | 3 +-
net/ipv4/netfilter/ip_tables.c | 2 +-
net/ipv4/netfilter/ipt_ecn.c | 7 +-
net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c | 4 +-
net/ipv4/ping.c | 1 -
net/ipv4/route.c | 4 +-
net/ipv4/tcp_ipv4.c | 1 +
net/ipv6/netfilter/ip6_queue.c | 3 +-
net/ipv6/tcp_ipv6.c | 1 +
net/netfilter/ipvs/ip_vs_conn.c | 10 +-
net/netfilter/ipvs/ip_vs_core.c | 1 +
net/netfilter/nfnetlink_log.c | 3 +-
net/netfilter/nfnetlink_queue.c | 3 +-
48 files changed, 563 insertions(+), 77 deletions(-)
create mode 100644 drivers/net/usb/kalmia.c
^ permalink raw reply
* Re: [PATCH net-next 5/5] ifb: convert to 64 bit stats
From: Eric Dumazet @ 2011-06-20 21:23 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: David Miller, jamal, netdev
In-Reply-To: <20110620141253.00249218@nehalam.ftrdhcpuser.net>
Le lundi 20 juin 2011 à 14:12 -0700, Stephen Hemminger a écrit :
> Convert input functional block device to use 64 bit stats.
>
> Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
>
> ---
> v2 - add stats_sync
>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
^ permalink raw reply
* Re: [PATCH net-next 5/5] ifb: convert to 64 bit stats
From: Eric Dumazet @ 2011-06-20 21:27 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: David Miller, jamal, netdev
In-Reply-To: <1308604980.2658.23.camel@edumazet-laptop>
Le lundi 20 juin 2011 à 23:23 +0200, Eric Dumazet a écrit :
> Le lundi 20 juin 2011 à 14:12 -0700, Stephen Hemminger a écrit :
> > Convert input functional block device to use 64 bit stats.
> >
> > Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
> >
> > ---
> > v2 - add stats_sync
> >
>
> Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
>
Ah well, I am wondering if ri_tasklet() & ifb_xmit() could run
concurrently
If so, we need two separate syncp, one for each function.
^ permalink raw reply
* Re: [RFT PATCH 3/9] net: ethtool: break association of ETH_FLAG_* with NETIF_F_*
From: Ben Hutchings @ 2011-06-20 21:30 UTC (permalink / raw)
To: David Miller; +Cc: shemminger, mirq-linux, netdev
In-Reply-To: <20110620.135224.1609394919600206157.davem@davemloft.net>
On Mon, 2011-06-20 at 13:52 -0700, David Miller wrote:
> From: Stephen Hemminger <shemminger@vyatta.com>
> Date: Mon, 20 Jun 2011 13:51:09 -0700
>
> > I have no problem with dropping or changing the sysfs feature output.
> > It is useful to have a way to check if device supports something.
>
> These days that's not even where we store the "capabilities" of the
> device.
>
> That happens in ->hw_features now.
In fact there never used to be any way for user-space to find out which
capabilities were *supported*, other than to try enabling them.
Once we work out how to deal with kernel-named features in ethtool it
shouldn't be too hard to add options to (quietly) test whether a given
feature is supported or enabled. Having done that, we could think about
a fallback to sysfs and knowledge of the bit definitions for older
kernel versions.
Ben.
--
Ben Hutchings, Senior Software Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.
^ permalink raw reply
* Re: [PATCH net-next 5/5] ifb: convert to 64 bit stats
From: Stephen Hemminger @ 2011-06-20 21:38 UTC (permalink / raw)
To: Eric Dumazet; +Cc: David Miller, jamal, netdev
In-Reply-To: <1308605221.2658.25.camel@edumazet-laptop>
On Mon, 20 Jun 2011 23:27:01 +0200
Eric Dumazet <eric.dumazet@gmail.com> wrote:
> Le lundi 20 juin 2011 à 23:23 +0200, Eric Dumazet a écrit :
> > Le lundi 20 juin 2011 à 14:12 -0700, Stephen Hemminger a écrit :
> > > Convert input functional block device to use 64 bit stats.
> > >
> > > Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
> > >
> > > ---
> > > v2 - add stats_sync
> > >
> >
> > Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
> >
>
> Ah well, I am wondering if ri_tasklet() & ifb_xmit() could run
> concurrently
>
> If so, we need two separate syncp, one for each function.
For the normal case that isn't possible but
someone could be perverse and put an address on the ifb device and
try and use like loopback?
^ permalink raw reply
* [PATCH net-next 5/5] ifb: convert to 64 bit stats (v3)
From: Stephen Hemminger @ 2011-06-20 21:42 UTC (permalink / raw)
To: Eric Dumazet; +Cc: David Miller, jamal, netdev
In-Reply-To: <1308605221.2658.25.camel@edumazet-laptop>
Subject: ifb: convert to 64 bit stats
Convert input functional block device to use 64 bit stats.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
---
v3 - split tx/rsync
--- a/drivers/net/ifb.c 2011-06-20 13:38:54.271992329 -0700
+++ b/drivers/net/ifb.c 2011-06-20 14:40:52.295990246 -0700
@@ -41,8 +41,16 @@
struct ifb_private {
struct tasklet_struct ifb_tasklet;
int tasklet_pending;
+
+ struct u64_stats_sync rsync;
struct sk_buff_head rq;
+ u64 rx_packets;
+ u64 rx_bytes;
+
+ struct u64_stats_sync tsync;
struct sk_buff_head tq;
+ u64 tx_packets;
+ u64 tx_bytes;
};
static int numifbs = 2;
@@ -54,10 +62,8 @@ static int ifb_close(struct net_device *
static void ri_tasklet(unsigned long dev)
{
-
struct net_device *_dev = (struct net_device *)dev;
struct ifb_private *dp = netdev_priv(_dev);
- struct net_device_stats *stats = &_dev->stats;
struct netdev_queue *txq;
struct sk_buff *skb;
@@ -77,15 +83,18 @@ static void ri_tasklet(unsigned long dev
skb->tc_verd = 0;
skb->tc_verd = SET_TC_NCLS(skb->tc_verd);
- stats->tx_packets++;
- stats->tx_bytes +=skb->len;
+
+ u64_stats_update_begin(&dp->tsync);
+ dp->tx_packets++;
+ dp->tx_bytes += skb->len;
+ u64_stats_update_end(&dp->tsync);
rcu_read_lock();
skb->dev = dev_get_by_index_rcu(&init_net, skb->skb_iif);
if (!skb->dev) {
rcu_read_unlock();
dev_kfree_skb(skb);
- stats->tx_dropped++;
+ _dev->stats.tx_dropped++;
if (skb_queue_len(&dp->tq) != 0)
goto resched;
break;
@@ -120,9 +129,37 @@ resched:
}
+static struct rtnl_link_stats64 *ifb_stats64(struct net_device *dev,
+ struct rtnl_link_stats64 *stats)
+{
+ struct ifb_private *dp = netdev_priv(dev);
+ unsigned int start;
+
+ do {
+ start = u64_stats_fetch_begin_bh(&dp->rsync);
+ stats->rx_packets = dp->rx_packets;
+ stats->rx_bytes = dp->rx_bytes;
+ } while (u64_stats_fetch_retry_bh(&dp->rsync, start));
+
+ do {
+ start = u64_stats_fetch_begin_bh(&dp->tsync);
+
+ stats->tx_packets = dp->tx_packets;
+ stats->tx_bytes = dp->tx_bytes;
+
+ } while (u64_stats_fetch_retry_bh(&dp->tsync, start));
+
+ stats->rx_dropped = dev->stats.rx_dropped;
+ stats->tx_dropped = dev->stats.tx_dropped;
+
+ return stats;
+}
+
+
static const struct net_device_ops ifb_netdev_ops = {
.ndo_open = ifb_open,
.ndo_stop = ifb_close,
+ .ndo_get_stats64 = ifb_stats64,
.ndo_start_xmit = ifb_xmit,
.ndo_validate_addr = eth_validate_addr,
};
@@ -153,15 +190,16 @@ static void ifb_setup(struct net_device
static netdev_tx_t ifb_xmit(struct sk_buff *skb, struct net_device *dev)
{
struct ifb_private *dp = netdev_priv(dev);
- struct net_device_stats *stats = &dev->stats;
u32 from = G_TC_FROM(skb->tc_verd);
- stats->rx_packets++;
- stats->rx_bytes+=skb->len;
+ u64_stats_update_begin(&dp->rsync);
+ dp->rx_packets++;
+ dp->rx_bytes += skb->len;
+ u64_stats_update_end(&dp->rsync);
if (!(from & (AT_INGRESS|AT_EGRESS)) || !skb->skb_iif) {
dev_kfree_skb(skb);
- stats->rx_dropped++;
+ dev->stats.rx_dropped++;
return NETDEV_TX_OK;
}
^ permalink raw reply
* Re: [PATCH net-next 5/5] ifb: convert to 64 bit stats
From: Eric Dumazet @ 2011-06-20 21:42 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: David Miller, jamal, netdev
In-Reply-To: <20110620143813.233f1642@nehalam.ftrdhcpuser.net>
From: Stephen Hemminger <shemminger@vyatta.com>
Le lundi 20 juin 2011 à 14:38 -0700, Stephen Hemminger a écrit :
> On Mon, 20 Jun 2011 23:27:01 +0200
> Eric Dumazet <eric.dumazet@gmail.com> wrote:
>
> > Le lundi 20 juin 2011 à 23:23 +0200, Eric Dumazet a écrit :
> > > Le lundi 20 juin 2011 à 14:12 -0700, Stephen Hemminger a écrit :
> > > > Convert input functional block device to use 64 bit stats.
> > > >
> > > > Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
> > > >
> > > > ---
> > > > v2 - add stats_sync
> > > >
> > >
> > > Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
> > >
> >
> > Ah well, I am wondering if ri_tasklet() & ifb_xmit() could run
> > concurrently
> >
> > If so, we need two separate syncp, one for each function.
>
> For the normal case that isn't possible but
> someone could be perverse and put an address on the ifb device and
> try and use like loopback?
Hmm, this can occur on normal case I think, on SMP.
Here is an updated patch
[PATCH net-next v3] ifb: convert to 64 bit stats
Convert input functional block device to use 64 bit stats.
[Eric Dumazet]: Use two different synchronization points for rx and tx.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
---
v2 - add stats_sync
v3 - must use two different sync
drivers/net/ifb.c | 58 +++++++++++++++++++++++++++++++++++++-------
1 file changed, 49 insertions(+), 9 deletions(-)
diff --git a/drivers/net/ifb.c b/drivers/net/ifb.c
index ce53f4a..2443e90 100644
--- a/drivers/net/ifb.c
+++ b/drivers/net/ifb.c
@@ -41,8 +41,16 @@
struct ifb_private {
struct tasklet_struct ifb_tasklet;
int tasklet_pending;
+
struct sk_buff_head rq;
+ u64 rx_packets;
+ u64 rx_bytes;
+ struct u64_stats_sync stats_rx_sync;
+
struct sk_buff_head tq;
+ u64 tx_packets;
+ u64 tx_bytes;
+ struct u64_stats_sync stats_tx_sync;
};
static int numifbs = 2;
@@ -54,10 +62,8 @@ static int ifb_close(struct net_device *dev);
static void ri_tasklet(unsigned long dev)
{
-
struct net_device *_dev = (struct net_device *)dev;
struct ifb_private *dp = netdev_priv(_dev);
- struct net_device_stats *stats = &_dev->stats;
struct netdev_queue *txq;
struct sk_buff *skb;
@@ -77,15 +83,18 @@ static void ri_tasklet(unsigned long dev)
skb->tc_verd = 0;
skb->tc_verd = SET_TC_NCLS(skb->tc_verd);
- stats->tx_packets++;
- stats->tx_bytes +=skb->len;
+
+ u64_stats_update_begin(&dp->stats_tx_sync);
+ dp->tx_packets++;
+ dp->tx_bytes += skb->len;
+ u64_stats_update_end(&dp->stats_tx_sync);
rcu_read_lock();
skb->dev = dev_get_by_index_rcu(&init_net, skb->skb_iif);
if (!skb->dev) {
rcu_read_unlock();
dev_kfree_skb(skb);
- stats->tx_dropped++;
+ _dev->stats.tx_dropped++;
if (skb_queue_len(&dp->tq) != 0)
goto resched;
break;
@@ -120,9 +129,39 @@ resched:
}
+static struct rtnl_link_stats64 *ifb_stats64(struct net_device *dev,
+ struct rtnl_link_stats64 *stats)
+{
+ const struct ifb_private *dp = netdev_priv(dev);
+ unsigned int start;
+
+ do {
+ start = u64_stats_fetch_begin_bh(&dp->stats_rx_sync);
+
+ stats->rx_packets = dp->rx_packets;
+ stats->rx_bytes = dp->rx_bytes;
+
+ } while (u64_stats_fetch_retry_bh(&dp->stats_rx_sync, start));
+
+ do {
+ start = u64_stats_fetch_begin_bh(&dp->stats_tx_sync);
+
+ stats->tx_packets = dp->tx_packets;
+ stats->tx_bytes = dp->tx_bytes;
+
+ } while (u64_stats_fetch_retry_bh(&dp->stats_tx_sync, start));
+
+ stats->rx_dropped = dev->stats.rx_dropped;
+ stats->tx_dropped = dev->stats.tx_dropped;
+
+ return stats;
+}
+
+
static const struct net_device_ops ifb_netdev_ops = {
.ndo_open = ifb_open,
.ndo_stop = ifb_close,
+ .ndo_get_stats64 = ifb_stats64,
.ndo_start_xmit = ifb_xmit,
.ndo_validate_addr = eth_validate_addr,
};
@@ -153,15 +192,16 @@ static void ifb_setup(struct net_device *dev)
static netdev_tx_t ifb_xmit(struct sk_buff *skb, struct net_device *dev)
{
struct ifb_private *dp = netdev_priv(dev);
- struct net_device_stats *stats = &dev->stats;
u32 from = G_TC_FROM(skb->tc_verd);
- stats->rx_packets++;
- stats->rx_bytes+=skb->len;
+ u64_stats_update_begin(&dp->stats_rx_sync);
+ dp->rx_packets++;
+ dp->rx_bytes += skb->len;
+ u64_stats_update_end(&dp->stats_rx_sync);
if (!(from & (AT_INGRESS|AT_EGRESS)) || !skb->skb_iif) {
dev_kfree_skb(skb);
- stats->rx_dropped++;
+ dev->stats.rx_dropped++;
return NETDEV_TX_OK;
}
^ permalink raw reply related
* Re: [PATCH net-next 5/5] ifb: convert to 64 bit stats (v3)
From: Eric Dumazet @ 2011-06-20 21:44 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: David Miller, jamal, netdev
In-Reply-To: <20110620144230.29421b05@nehalam.ftrdhcpuser.net>
Le lundi 20 juin 2011 à 14:42 -0700, Stephen Hemminger a écrit :
> Subject: ifb: convert to 64 bit stats
>
> Convert input functional block device to use 64 bit stats.
>
> Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
>
> ---
> v3 - split tx/rsync
Seems good :)
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
^ permalink raw reply
* Re: [PATCH net-next 2/5] niu: fix 64 bit statistics on 32 bit platform
From: Ben Hutchings @ 2011-06-20 21:45 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: davem, netdev
In-Reply-To: <20110620203602.739916889@vyatta.com>
On Mon, 2011-06-20 at 13:35 -0700, Stephen Hemminger wrote:
> This resolves issues with NIU driver statistics wrapping on 32 bit SMP.
> Use stats_sync wrapper for bytes and packets, and change error counters
> to natural word size (unsigned long).
[...]
> static void niu_get_tx_stats(struct niu *np,
> struct rtnl_link_stats64 *stats)
> {
> - u64 pkts, errors, bytes;
> struct tx_ring_info *tx_rings;
> int i;
>
> - pkts = errors = bytes = 0;
> -
> tx_rings = ACCESS_ONCE(np->tx_rings);
> if (!tx_rings)
> - goto no_rings;
> + return;
>
> for (i = 0; i < np->num_tx_rings; i++) {
> struct tx_ring_info *rp = &tx_rings[i];
> + unsigned int start;
> + u64 pkts, bytes;
>
> - pkts += rp->tx_packets;
> - bytes += rp->tx_bytes;
> - errors += rp->tx_errors;
> + do {
> + start = u64_stats_fetch_begin(&rp->syncp);
> + pkts = rp->tx_packets;
> + bytes = rp->tx_bytes;
> + } while (u64_stats_fetch_retry(&rp->syncp, start));
> +
> + stats->tx_packets += pkts;
> + stats->tx_bytes += bytes;
> + stats->tx_errors += rp->tx_errors;
> }
[...]
It looks like you also need to update release_tx_packet() where these
stats are written.
Ben.
--
Ben Hutchings, Senior Software Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.
^ permalink raw reply
* Re: [PATCH net-next 3/5] netxen: make 64 bit stats safe on 32 bit platform
From: Eric Dumazet @ 2011-06-20 21:50 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: davem, Amit Kumar Salecha, netdev
In-Reply-To: <20110620203602.836836605@vyatta.com>
Le lundi 20 juin 2011 à 13:35 -0700, Stephen Hemminger a écrit :
> pièce jointe document texte brut (netxen-stats-sync.patch)
> Use stats_update wrapper to avoid problems where 64 bit statistic update
> is not atomic on 32 bit platform.
>
> Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
>
Same remark than ifb : You need to be careful not having two different
cpus doing an u64_stats_update_begin(one_syncp);
(Separate rx & tx)
^ permalink raw reply
* Re: [PATCH net-next 2/5] niu: fix 64 bit statistics on 32 bit platform
From: Stephen Hemminger @ 2011-06-20 21:52 UTC (permalink / raw)
To: Ben Hutchings; +Cc: davem, netdev
In-Reply-To: <1308606356.2701.199.camel@bwh-desktop>
> It looks like you also need to update release_tx_packet() where these
> stats are written.
Probably need to split tx/rx update as well.
^ permalink raw reply
* Re: [PATCH net-next 3/5] netxen: make 64 bit stats safe on 32 bit platform
From: Ben Hutchings @ 2011-06-20 21:52 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: davem, Amit Kumar Salecha, netdev
In-Reply-To: <20110620203602.836836605@vyatta.com>
On Mon, 2011-06-20 at 13:35 -0700, Stephen Hemminger wrote:
> Use stats_update wrapper to avoid problems where 64 bit statistic update
> is not atomic on 32 bit platform.
[...]
> @@ -2115,11 +2117,17 @@ static struct rtnl_link_stats64 *netxen_
> struct rtnl_link_stats64 *stats)
> {
> struct netxen_adapter *adapter = netdev_priv(netdev);
> + unsigned int start;
> +
> + do {
> + start = u64_stats_fetch_begin(&adapter->stats.syncp);
> +
> + stats->rx_packets = adapter->stats.rx_pkts + adapter->stats.lro_pkts;
> + stats->tx_packets = adapter->stats.xmitfinished;
> + stats->rx_bytes = adapter->stats.rxbytes;
> + stats->tx_bytes = adapter->stats.txbytes;
> + } while (u64_stats_fetch_retry(&adapter->stats.syncp, start));
>
> - stats->rx_packets = adapter->stats.rx_pkts + adapter->stats.lro_pkts;
> - stats->tx_packets = adapter->stats.xmitfinished;
> - stats->rx_bytes = adapter->stats.rxbytes;
> - stats->tx_bytes = adapter->stats.txbytes;
> stats->rx_dropped = adapter->stats.rxdropped;
> stats->tx_dropped = adapter->stats.txdropped;
netxen_nic_get_ethtool_stats() should also be fixed.
The 'txdropped' and 'csummed' stats are also 64-bit and updated on the
data path. ('rxdropped' isn't updated at all, AFAICS.)
Ben.
--
Ben Hutchings, Senior Software Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.
^ permalink raw reply
* Re: [PATCH net-next 2/5] niu: fix 64 bit statistics on 32 bit platform
From: Eric Dumazet @ 2011-06-20 22:02 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: Ben Hutchings, davem, netdev
In-Reply-To: <20110620145201.42dd9bf8@nehalam.ftrdhcpuser.net>
Le lundi 20 juin 2011 à 14:52 -0700, Stephen Hemminger a écrit :
> > It looks like you also need to update release_tx_packet() where these
> > stats are written.
>
> Probably need to split tx/rx update as well.
Its already done in your patch ;)
^ permalink raw reply
* [PATCH] Remove redundant linux/version.h includes from net/
From: Jesper Juhl @ 2011-06-20 22:13 UTC (permalink / raw)
To: netdev
Cc: David S. Miller, coreteam, netfilter, netfilter-devel,
linux-kernel, Dmitry Kozlov
It was suggested by "make versioncheck" that the follwing includes of
linux/version.h are redundant:
/home/jj/src/linux-2.6/net/caif/caif_dev.c: 14 linux/version.h not needed.
/home/jj/src/linux-2.6/net/caif/chnl_net.c: 10 linux/version.h not needed.
/home/jj/src/linux-2.6/net/ipv4/gre.c: 19 linux/version.h not needed.
/home/jj/src/linux-2.6/net/netfilter/ipset/ip_set_core.c: 20 linux/version.h not needed.
/home/jj/src/linux-2.6/net/netfilter/xt_set.c: 16 linux/version.h not needed.
and it seems that it is right.
Beyond manually inspecting the source files I also did a few build
tests with various configs to confirm that including the header in
those files is indeed not needed.
Here's a patch to remove the pointless includes.
Signed-off-by: Jesper Juhl <jj@chaosbits.net>
---
net/caif/caif_dev.c | 1 -
net/caif/chnl_net.c | 1 -
net/ipv4/gre.c | 1 -
net/netfilter/ipset/ip_set_core.c | 1 -
net/netfilter/xt_set.c | 1 -
5 files changed, 0 insertions(+), 5 deletions(-)
diff --git a/net/caif/caif_dev.c b/net/caif/caif_dev.c
index 682c0fe..7c2fa0a 100644
--- a/net/caif/caif_dev.c
+++ b/net/caif/caif_dev.c
@@ -11,7 +11,6 @@
#define pr_fmt(fmt) KBUILD_MODNAME ":%s(): " fmt, __func__
-#include <linux/version.h>
#include <linux/kernel.h>
#include <linux/if_arp.h>
#include <linux/net.h>
diff --git a/net/caif/chnl_net.c b/net/caif/chnl_net.c
index adbb424..8237766 100644
--- a/net/caif/chnl_net.c
+++ b/net/caif/chnl_net.c
@@ -7,7 +7,6 @@
#define pr_fmt(fmt) KBUILD_MODNAME ":%s(): " fmt, __func__
-#include <linux/version.h>
#include <linux/fs.h>
#include <linux/init.h>
#include <linux/module.h>
diff --git a/net/ipv4/gre.c b/net/ipv4/gre.c
index c6933f2..9dbe108 100644
--- a/net/ipv4/gre.c
+++ b/net/ipv4/gre.c
@@ -16,7 +16,6 @@
#include <linux/skbuff.h>
#include <linux/in.h>
#include <linux/netdevice.h>
-#include <linux/version.h>
#include <linux/spinlock.h>
#include <net/protocol.h>
#include <net/gre.h>
diff --git a/net/netfilter/ipset/ip_set_core.c b/net/netfilter/ipset/ip_set_core.c
index 42aa64b..40c9645 100644
--- a/net/netfilter/ipset/ip_set_core.c
+++ b/net/netfilter/ipset/ip_set_core.c
@@ -17,7 +17,6 @@
#include <linux/spinlock.h>
#include <linux/netlink.h>
#include <linux/rculist.h>
-#include <linux/version.h>
#include <net/netlink.h>
#include <linux/netfilter.h>
diff --git a/net/netfilter/xt_set.c b/net/netfilter/xt_set.c
index b3babae..5c23c44 100644
--- a/net/netfilter/xt_set.c
+++ b/net/netfilter/xt_set.c
@@ -13,7 +13,6 @@
#include <linux/module.h>
#include <linux/skbuff.h>
-#include <linux/version.h>
#include <linux/netfilter/x_tables.h>
#include <linux/netfilter/xt_set.h>
--
Jesper Juhl <jj@chaosbits.net> http://www.chaosbits.net/
Don't top-post http://www.catb.org/jargon/html/T/top-post.html
Plain text mails only, please.
^ permalink raw reply related
* Re: [PATCH net-next 3/5] netxen: make 64 bit stats safe on 32 bit platform
From: Stephen Hemminger @ 2011-06-20 22:18 UTC (permalink / raw)
To: Ben Hutchings; +Cc: davem, Amit Kumar Salecha, netdev
In-Reply-To: <1308606738.2701.203.camel@bwh-desktop>
> On Mon, 2011-06-20 at 13:35 -0700, Stephen Hemminger wrote:
>
> > Use stats_update wrapper to avoid problems where 64 bit statistic
> > update is not atomic on 32 bit platform.
> [...]
> > @@ -2115,11 +2117,17 @@ static struct rtnl_link_stats64 *netxen_
> > struct rtnl_link_stats64 *stats)
> > {
> > struct netxen_adapter *adapter = netdev_priv(netdev);
> > + unsigned int start;
> > + + do {
> > + start = u64_stats_fetch_begin(&adapter->stats.syncp);
> > + + stats->rx_packets = adapter->stats.rx_pkts +
> > adapter->stats.lro_pkts; + stats->tx_packets =
> > adapter->stats.xmitfinished; + stats->rx_bytes =
> > adapter->stats.rxbytes; + stats->tx_bytes = adapter->stats.txbytes;
> > + } while (u64_stats_fetch_retry(&adapter->stats.syncp, start));
> >
> > - stats->rx_packets = adapter->stats.rx_pkts +
> > adapter->stats.lro_pkts; - stats->tx_packets =
> > adapter->stats.xmitfinished; - stats->rx_bytes =
> > adapter->stats.rxbytes; - stats->tx_bytes = adapter->stats.txbytes;
> > stats->rx_dropped = adapter->stats.rxdropped;
> > stats->tx_dropped = adapter->stats.txdropped;
>
> netxen_nic_get_ethtool_stats() should also be fixed.
>
> The 'txdropped' and 'csummed' stats are also 64-bit and updated on the
> data path. ('rxdropped' isn't updated at all, AFAICS.)
Since they are error counters, just changing them to unsigned long is
easier.
^ permalink raw reply
* Re: [PATCH net-next 3/5] netxen: make 64 bit stats safe on 32 bit platform
From: Ben Hutchings @ 2011-06-20 22:27 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: davem, Amit Kumar Salecha, netdev
In-Reply-To: <1528961426.419.1308608312735.JavaMail.root@tahiti.vyatta.com>
On Mon, 2011-06-20 at 15:18 -0700, Stephen Hemminger wrote:
> > On Mon, 2011-06-20 at 13:35 -0700, Stephen Hemminger wrote:
> >
> > > Use stats_update wrapper to avoid problems where 64 bit statistic
> > > update is not atomic on 32 bit platform.
> > [...]
> > > @@ -2115,11 +2117,17 @@ static struct rtnl_link_stats64 *netxen_
> > > struct rtnl_link_stats64 *stats)
> > > {
> > > struct netxen_adapter *adapter = netdev_priv(netdev);
> > > + unsigned int start;
> > > + + do {
> > > + start = u64_stats_fetch_begin(&adapter->stats.syncp);
> > > + + stats->rx_packets = adapter->stats.rx_pkts +
> > > adapter->stats.lro_pkts; + stats->tx_packets =
> > > adapter->stats.xmitfinished; + stats->rx_bytes =
> > > adapter->stats.rxbytes; + stats->tx_bytes = adapter->stats.txbytes;
> > > + } while (u64_stats_fetch_retry(&adapter->stats.syncp, start));
> > >
> > > - stats->rx_packets = adapter->stats.rx_pkts +
> > > adapter->stats.lro_pkts; - stats->tx_packets =
> > > adapter->stats.xmitfinished; - stats->rx_bytes =
> > > adapter->stats.rxbytes; - stats->tx_bytes = adapter->stats.txbytes;
> > > stats->rx_dropped = adapter->stats.rxdropped;
> > > stats->tx_dropped = adapter->stats.txdropped;
> >
> > netxen_nic_get_ethtool_stats() should also be fixed.
> >
> > The 'txdropped' and 'csummed' stats are also 64-bit and updated on the
> > data path. ('rxdropped' isn't updated at all, AFAICS.)
>
> Since they are error counters, just changing them to unsigned long is
> easier.
'csummed' is not.
Ben.
--
Ben Hutchings, Senior Software Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.
^ permalink raw reply
* Re: [PATCH net-next 5/5] ifb: convert to 64 bit stats (v3)
From: jamal @ 2011-06-21 0:04 UTC (permalink / raw)
To: Eric Dumazet; +Cc: Stephen Hemminger, David Miller, netdev
In-Reply-To: <1308606278.2658.33.camel@edumazet-laptop>
On Mon, 2011-06-20 at 23:44 +0200, Eric Dumazet wrote:
> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Acked-by: Jamal Hadi Salim <hadi@cyberus.ca>
cheers,
jamal
^ permalink raw reply
* [PATCH] svcsock.c: include sunrpc.h to quite sparse noise
From: H Hartley Sweeten @ 2011-06-21 0:54 UTC (permalink / raw)
To: Linux Kernel
Cc: netdev-u79uwXL29TY76Z2rM5mHXA, linux-nfs-u79uwXL29TY76Z2rM5mHXA,
Trond.Myklebust-HgOvQuBEEgTQT0dZR+AlfA,
bfields-uC3wQj2KruNg9hUCZPvPmw, neilb-l3A5Bk7waGM,
davem-fT/PcQaiUtIeIZ0/mPfg9Q
Include the private header sunrpc.h to pickup the declaration of the
function svc_send_common to quiet the following sparse noise:
warning: symbol 'svc_send_common' was not declared. Should it be static?
Signed-off-by: H Hartley Sweeten <hsweeten-3FF4nKcrg1dE2c76skzGb0EOCMrvLtNR@public.gmane.org>
Cc: Trond Myklebust <Trond.Myklebust-HgOvQuBEEgTQT0dZR+AlfA@public.gmane.org>
Cc: "J. Bruce Fields" <bfields-uC3wQj2KruNg9hUCZPvPmw@public.gmane.org>
Cc: Neil Brown <neilb-l3A5Bk7waGM@public.gmane.org>
Cc: "David S. Miller" <davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
---
diff --git a/net/sunrpc/svcsock.c b/net/sunrpc/svcsock.c
index af04f77..f2cb5b8 100644
--- a/net/sunrpc/svcsock.c
+++ b/net/sunrpc/svcsock.c
@@ -51,6 +51,8 @@
#include <linux/sunrpc/stats.h>
#include <linux/sunrpc/xprt.h>
+#include "sunrpc.h"
+
#define RPCDBG_FACILITY RPCDBG_SVCXPRT
--
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 related
* [PATCH] svcauth_unix.c: quiet sparse noise
From: H Hartley Sweeten @ 2011-06-21 1:19 UTC (permalink / raw)
To: Linux Kernel
Cc: netdev-u79uwXL29TY76Z2rM5mHXA, linux-nfs-u79uwXL29TY76Z2rM5mHXA,
Trond.Myklebust-HgOvQuBEEgTQT0dZR+AlfA,
bfields-uC3wQj2KruNg9hUCZPvPmw, neilb-l3A5Bk7waGM,
davem-fT/PcQaiUtIeIZ0/mPfg9Q
Like svcauth_unix, the symbol svcauth_null is used external from this
file. Declare it as extern to quiet the following sparse noise:
warning: symbol 'svcauth_null' was not declared. Should it be static?
Signed-off-by: H Hartley Sweeten <hsweeten-3FF4nKcrg1dE2c76skzGb0EOCMrvLtNR@public.gmane.org>
Cc: Trond Myklebust <Trond.Myklebust-HgOvQuBEEgTQT0dZR+AlfA@public.gmane.org>
Cc: "J. Bruce Fields" <bfields-uC3wQj2KruNg9hUCZPvPmw@public.gmane.org>
Cc: Neil Brown <neilb-l3A5Bk7waGM@public.gmane.org>
Cc: "David S. Miller" <davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
---
diff --git a/net/sunrpc/svcauth_unix.c b/net/sunrpc/svcauth_unix.c
index c8e1021..62e49e2 100644
--- a/net/sunrpc/svcauth_unix.c
+++ b/net/sunrpc/svcauth_unix.c
@@ -36,6 +36,7 @@ struct unix_domain {
/* other stuff later */
};
+extern struct auth_ops svcauth_null;
extern struct auth_ops svcauth_unix;
static void svcauth_unix_domain_release(struct auth_domain *dom)
--
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 related
* [PATCH net-next] cnic, bnx2i: Add support for new devices - 57800, 57810, and 57840
From: Michael Chan @ 2011-06-21 1:15 UTC (permalink / raw)
To: davem; +Cc: netdev
And change iSCSI RQ doorbell size from 16B to 64B to match new firmware.
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: Eddie Wai <eddie.wai@broadcom.com>
---
drivers/net/cnic.h | 14 +++++++++++++-
drivers/scsi/bnx2i/57xx_iscsi_constants.h | 2 +-
drivers/scsi/bnx2i/bnx2i.h | 2 +-
drivers/scsi/bnx2i/bnx2i_init.c | 21 +++++++++++++++------
include/linux/pci_ids.h | 9 +++++++++
5 files changed, 39 insertions(+), 9 deletions(-)
diff --git a/drivers/net/cnic.h b/drivers/net/cnic.h
index 330ef93..7a2928f 100644
--- a/drivers/net/cnic.h
+++ b/drivers/net/cnic.h
@@ -384,6 +384,9 @@ struct bnx2x_bd_chain_next {
#define BNX2X_CHIP_NUM_57712E 0x1663
#define BNX2X_CHIP_NUM_57713 0x1651
#define BNX2X_CHIP_NUM_57713E 0x1652
+#define BNX2X_CHIP_NUM_57800 0x168a
+#define BNX2X_CHIP_NUM_57810 0x168e
+#define BNX2X_CHIP_NUM_57840 0x168d
#define BNX2X_CHIP_NUM(x) (x >> 16)
#define BNX2X_CHIP_IS_57710(x) \
@@ -402,10 +405,19 @@ struct bnx2x_bd_chain_next {
(BNX2X_CHIP_NUM(x) == BNX2X_CHIP_NUM_57713)
#define BNX2X_CHIP_IS_57713E(x) \
(BNX2X_CHIP_NUM(x) == BNX2X_CHIP_NUM_57713E)
+#define BNX2X_CHIP_IS_57800(x) \
+ (BNX2X_CHIP_NUM(x) == BNX2X_CHIP_NUM_57800)
+#define BNX2X_CHIP_IS_57810(x) \
+ (BNX2X_CHIP_NUM(x) == BNX2X_CHIP_NUM_57810)
+#define BNX2X_CHIP_IS_57840(x) \
+ (BNX2X_CHIP_NUM(x) == BNX2X_CHIP_NUM_57840)
#define BNX2X_CHIP_IS_E2(x) \
(BNX2X_CHIP_IS_57712(x) || BNX2X_CHIP_IS_57712E(x) || \
BNX2X_CHIP_IS_57713(x) || BNX2X_CHIP_IS_57713E(x))
-#define BNX2X_CHIP_IS_E2_PLUS(x) BNX2X_CHIP_IS_E2(x)
+#define BNX2X_CHIP_IS_E3(x) \
+ (BNX2X_CHIP_IS_57800(x) || BNX2X_CHIP_IS_57810(x) || \
+ BNX2X_CHIP_IS_57840(x))
+#define BNX2X_CHIP_IS_E2_PLUS(x) (BNX2X_CHIP_IS_E2(x) || BNX2X_CHIP_IS_E3(x))
#define IS_E1H_OFFSET BNX2X_CHIP_IS_E1H(cp->chip_id)
diff --git a/drivers/scsi/bnx2i/57xx_iscsi_constants.h b/drivers/scsi/bnx2i/57xx_iscsi_constants.h
index 30e6bdb..15673cc 100644
--- a/drivers/scsi/bnx2i/57xx_iscsi_constants.h
+++ b/drivers/scsi/bnx2i/57xx_iscsi_constants.h
@@ -125,7 +125,7 @@
/* SQ/RQ/CQ DB structure sizes */
#define ISCSI_SQ_DB_SIZE (16)
-#define ISCSI_RQ_DB_SIZE (16)
+#define ISCSI_RQ_DB_SIZE (64)
#define ISCSI_CQ_DB_SIZE (80)
#define ISCSI_SQN_TO_NOTIFY_NOT_VALID 0xFFFF
diff --git a/drivers/scsi/bnx2i/bnx2i.h b/drivers/scsi/bnx2i/bnx2i.h
index 6bdd25a..e7cb7ec 100644
--- a/drivers/scsi/bnx2i/bnx2i.h
+++ b/drivers/scsi/bnx2i/bnx2i.h
@@ -478,7 +478,7 @@ struct bnx2i_5771x_cq_db {
struct bnx2i_5771x_sq_rq_db {
u16 prod_idx;
- u8 reserved0[14]; /* Pad structure size to 16 bytes */
+ u8 reserved0[62]; /* Pad structure size to 64 bytes */
};
diff --git a/drivers/scsi/bnx2i/bnx2i_init.c b/drivers/scsi/bnx2i/bnx2i_init.c
index 6adbdc3..f815197 100644
--- a/drivers/scsi/bnx2i/bnx2i_init.c
+++ b/drivers/scsi/bnx2i/bnx2i_init.c
@@ -30,7 +30,7 @@ MODULE_AUTHOR("Anil Veerabhadrappa <anilgv@broadcom.com> and "
"Eddie Wai <eddie.wai@broadcom.com>");
MODULE_DESCRIPTION("Broadcom NetXtreme II BCM5706/5708/5709/57710/57711/57712"
- " iSCSI Driver");
+ "/57800/57810/57840 iSCSI Driver");
MODULE_LICENSE("GPL");
MODULE_VERSION(DRV_MODULE_VERSION);
@@ -88,11 +88,20 @@ void bnx2i_identify_device(struct bnx2i_hba *hba)
(hba->pci_did == PCI_DEVICE_ID_NX2_5709S)) {
set_bit(BNX2I_NX2_DEV_5709, &hba->cnic_dev_type);
hba->mail_queue_access = BNX2I_MQ_BIN_MODE;
- } else if (hba->pci_did == PCI_DEVICE_ID_NX2_57710 ||
- hba->pci_did == PCI_DEVICE_ID_NX2_57711 ||
- hba->pci_did == PCI_DEVICE_ID_NX2_57711E ||
- hba->pci_did == PCI_DEVICE_ID_NX2_57712 ||
- hba->pci_did == PCI_DEVICE_ID_NX2_57712E)
+ } else if (hba->pci_did == PCI_DEVICE_ID_NX2_57710 ||
+ hba->pci_did == PCI_DEVICE_ID_NX2_57711 ||
+ hba->pci_did == PCI_DEVICE_ID_NX2_57711E ||
+ hba->pci_did == PCI_DEVICE_ID_NX2_57712 ||
+ hba->pci_did == PCI_DEVICE_ID_NX2_57712E ||
+ hba->pci_did == PCI_DEVICE_ID_NX2_57800 ||
+ hba->pci_did == PCI_DEVICE_ID_NX2_57800_MF ||
+ hba->pci_did == PCI_DEVICE_ID_NX2_57800_VF ||
+ hba->pci_did == PCI_DEVICE_ID_NX2_57810 ||
+ hba->pci_did == PCI_DEVICE_ID_NX2_57810_MF ||
+ hba->pci_did == PCI_DEVICE_ID_NX2_57810_VF ||
+ hba->pci_did == PCI_DEVICE_ID_NX2_57840 ||
+ hba->pci_did == PCI_DEVICE_ID_NX2_57840_MF ||
+ hba->pci_did == PCI_DEVICE_ID_NX2_57840_VF)
set_bit(BNX2I_NX2_DEV_57710, &hba->cnic_dev_type);
else
printk(KERN_ALERT "bnx2i: unknown device, 0x%x\n",
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h
index a311008..d76bd9e 100644
--- a/include/linux/pci_ids.h
+++ b/include/linux/pci_ids.h
@@ -2102,6 +2102,9 @@
#define PCI_DEVICE_ID_TIGON3_5761E 0x1680
#define PCI_DEVICE_ID_TIGON3_5761 0x1681
#define PCI_DEVICE_ID_TIGON3_5764 0x1684
+#define PCI_DEVICE_ID_NX2_57800 0x168a
+#define PCI_DEVICE_ID_NX2_57840 0x168d
+#define PCI_DEVICE_ID_NX2_57810 0x168e
#define PCI_DEVICE_ID_TIGON3_5787M 0x1693
#define PCI_DEVICE_ID_TIGON3_5782 0x1696
#define PCI_DEVICE_ID_TIGON3_5784 0x1698
@@ -2109,11 +2112,17 @@
#define PCI_DEVICE_ID_TIGON3_5787 0x169b
#define PCI_DEVICE_ID_TIGON3_5788 0x169c
#define PCI_DEVICE_ID_TIGON3_5789 0x169d
+#define PCI_DEVICE_ID_NX2_57800_MF 0x16a5
#define PCI_DEVICE_ID_TIGON3_5702X 0x16a6
#define PCI_DEVICE_ID_TIGON3_5703X 0x16a7
#define PCI_DEVICE_ID_TIGON3_5704S 0x16a8
+#define PCI_DEVICE_ID_NX2_57800_VF 0x16a9
#define PCI_DEVICE_ID_NX2_5706S 0x16aa
+#define PCI_DEVICE_ID_NX2_57840_MF 0x16ab
#define PCI_DEVICE_ID_NX2_5708S 0x16ac
+#define PCI_DEVICE_ID_NX2_57840_VF 0x16ad
+#define PCI_DEVICE_ID_NX2_57810_MF 0x16ae
+#define PCI_DEVICE_ID_NX2_57810_VF 0x16af
#define PCI_DEVICE_ID_TIGON3_5702A3 0x16c6
#define PCI_DEVICE_ID_TIGON3_5703A3 0x16c7
#define PCI_DEVICE_ID_TIGON3_5781 0x16dd
--
1.6.4.GIT
^ permalink raw reply related
* [PATCH] netconsole: fix build when CONFIG_NETCONSOLE_DYNAMIC is turned on
From: Randy Dunlap @ 2011-06-21 4:25 UTC (permalink / raw)
To: Andrew Morton, davem; +Cc: netdev, bugme-daemon, hilld
In-Reply-To: <20110620122835.444f16d7.akpm@linux-foundation.org>
From: Randy Dunlap <randy.dunlap@oracle.com>
When NETCONSOLE_DYNAMIC=y and CONFIGFS_FS=m, there are build errors
in netconsole:
drivers/built-in.o: In function `drop_netconsole_target':
netconsole.c:(.text+0x1a100f): undefined reference to `config_item_put'
drivers/built-in.o: In function `make_netconsole_target':
netconsole.c:(.text+0x1a10b9): undefined reference to `config_item_init_type_name'
drivers/built-in.o: In function `write_msg':
netconsole.c:(.text+0x1a11a4): undefined reference to `config_item_get'
netconsole.c:(.text+0x1a1211): undefined reference to `config_item_put'
drivers/built-in.o: In function `netconsole_netdev_event':
netconsole.c:(.text+0x1a12cc): undefined reference to `config_item_put'
netconsole.c:(.text+0x1a12ec): undefined reference to `config_item_get'
netconsole.c:(.text+0x1a1366): undefined reference to `config_item_put'
drivers/built-in.o: In function `init_netconsole':
netconsole.c:(.init.text+0x953a): undefined reference to `config_group_init'
netconsole.c:(.init.text+0x9560): undefined reference to `configfs_register_subsystem'
drivers/built-in.o: In function `dynamic_netconsole_exit':
netconsole.c:(.exit.text+0x809): undefined reference to `configfs_unregister_subsystem'
so make NETCONSOLE_DYNAMIC require CONFIGFS_FS=y to fix the build errors.
This is one possible fix.
Fixes https://bugzilla.kernel.org/show_bug.cgi?id=37992
Reported-by: David Hill <hilld@binarystorm.net>
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
---
drivers/net/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- lnx-30-rc3.orig/drivers/net/Kconfig
+++ lnx-30-rc3/drivers/net/Kconfig
@@ -3416,7 +3416,7 @@ config NETCONSOLE
config NETCONSOLE_DYNAMIC
bool "Dynamic reconfiguration of logging targets"
- depends on NETCONSOLE && SYSFS && CONFIGFS_FS
+ depends on NETCONSOLE && SYSFS && CONFIGFS_FS=y
help
This option enables the ability to dynamically reconfigure target
parameters (interface, IP addresses, port numbers, MAC addresses)
^ permalink raw reply
* [PATCH V4] mv643xx_eth: enable transmit time stamping.
From: Richard Cochran @ 2011-06-21 4:35 UTC (permalink / raw)
To: David Miller; +Cc: buytenh, netdev, eric.dumazet
In-Reply-To: <20110620.135512.26659219089505445.davem@davemloft.net>
This patch enables software (and phy device) transmit time stamping.
Compile tested only.
Cc: Lennert Buytenhek <buytenh@wantstofly.org>
Signed-off-by: Richard Cochran <richard.cochran@omicron.at>
---
drivers/net/mv643xx_eth.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/drivers/net/mv643xx_eth.c b/drivers/net/mv643xx_eth.c
index 1b7d2c1..77dc6ab 100644
--- a/drivers/net/mv643xx_eth.c
+++ b/drivers/net/mv643xx_eth.c
@@ -840,6 +840,8 @@ no_csum:
__skb_queue_tail(&txq->tx_skb, skb);
+ skb_tx_timestamp(skb);
+
/* ensure all other descriptors are written before first cmd_sts */
wmb();
desc->cmd_sts = cmd_sts;
--
1.7.0.4
^ permalink raw reply related
* linux-next: manual merge of the staging tree with the trivial and net trees
From: Stephen Rothwell @ 2011-06-21 5:10 UTC (permalink / raw)
To: Greg KH
Cc: linux-next, linux-kernel, Vitaliy Ivanov, Jiri Kosina,
David Miller, netdev
Hi Greg,
Today's linux-next merge of the staging tree got a conflict in
drivers/staging/brcm80211/brcmfmac/wl_iw.c between commit e44ba033c565
("treewide: remove duplicate includes") from the trivial tree, commit
219eb47e6f35 ("net/staging: add needed interrupt.h and hardirq.h
includes") from the net tree and various commits from the staging tree.
I fixed them up (see below) and can carry the fix as necessary.
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
diff --cc drivers/staging/brcm80211/brcmfmac/wl_iw.c
index 53e6a10,9e4b087..0000000
--- a/drivers/staging/brcm80211/brcmfmac/wl_iw.c
+++ b/drivers/staging/brcm80211/brcmfmac/wl_iw.c
@@@ -16,21 -16,30 +16,30 @@@
#include <linux/kthread.h>
#include <linux/semaphore.h>
- #include <bcmdefs.h>
+ #include <defs.h>
#include <linux/netdevice.h>
+#include <linux/hardirq.h>
- #include <wlioctl.h>
- #include <bcmutils.h>
+ #include <linux/etherdevice.h>
+ #include <linux/wireless.h>
+#include <linux/if_arp.h>
- #include <asm/uaccess.h>
+#include <linux/ieee80211.h>
+
++#include <asm/uaccess.h>
+
+ #include <brcmu_utils.h>
+ #include <brcmu_wifi.h>
+
-#include <linux/if_arp.h>
-#include <asm/uaccess.h>
-
#include <dngl_stats.h>
#include <dhd.h>
- #include <dhdioctl.h>
-#include <linux/ieee80211.h>
+
+ struct si_pub;
-#include <dngl_stats.h>
-#include <dhd.h>
+typedef const struct si_pub si_t;
+ #define WPA_OUI "\x00\x50\xF2"
+ #define DOT11_MNG_RSN_ID 48
+ #define DOT11_MNG_WPA_ID 221
+
#define WL_ERROR(fmt, args...) printk(fmt, ##args)
#define WL_TRACE(fmt, args...) no_printk(fmt, ##args)
#define WL_INFORM(fmt, args...) no_printk(fmt, ##args)
^ 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