* Re: [PATCH] netlink: advertise incomplete dumps
From: David Miller @ 2011-06-20 20:59 UTC (permalink / raw)
To: johannes; +Cc: netdev, linux-wireless, samuel, aloisio.almeida, linville, tgraf
In-Reply-To: <1308570046.4322.5.camel@jlt3.sipsolutions.net>
From: Johannes Berg <johannes@sipsolutions.net>
Date: Mon, 20 Jun 2011 13:40:46 +0200
> Should we merge this through wireless? From wireless-next it'll go into
> net-next quickly, but the converse isn't true, so using it in wireless
> would be harder if it was merged through net-next I think? Or John can
> cherry-pick into wireless-testing?
I'm fine with this going in via the wireless tree, that way we'll
see a real user when it merged into net-next-2.6
Acked-by: David S. Miller <davem@davemloft.net>
^ permalink raw reply
* [PATCH 0/1] DSA: Enable cascading for multiple 6131 chips
From: Barry Grussling @ 2011-06-20 20:40 UTC (permalink / raw)
To: netdev; +Cc: buytenh, Barry Grussling
I found that the Cascade Port field of the 6131 was always set
to 0xe which results in from_cpu frames being discarded. This
means cascading style multi chip DSA configuration didn't work
for me. I am a little confused by this since we configure the
DSA routing table a little further down in the function.
It seems like we need to enable cascading by setting the
Cascade Port field to 0xf if we are in a multi-chip scenario.
Barry Grussling (1):
Allow cascading to work with 6131 chip
net/dsa/mv88e6131.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
^ permalink raw reply
* [PATCH net-next 5/5] ifb: convert to 64 bit stats
From: Stephen Hemminger @ 2011-06-20 21:12 UTC (permalink / raw)
To: David Miller, jamal; +Cc: netdev
In-Reply-To: <20110620.135607.2158729745388010853.davem@davemloft.net>
Convert input functional block device to use 64 bit stats.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
---
v2 - add stats_sync
--- a/drivers/net/ifb.c 2011-06-20 13:38:54.271992329 -0700
+++ b/drivers/net/ifb.c 2011-06-20 14:11:30.935991232 -0700
@@ -41,8 +41,16 @@
struct ifb_private {
struct tasklet_struct ifb_tasklet;
int tasklet_pending;
+
+ struct u64_stats_sync stats_sync;
+
struct sk_buff_head rq;
+ u64 rx_packets;
+ u64 rx_bytes;
+
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->stats_sync);
+ dp->tx_packets++;
+ dp->tx_bytes += skb->len;
+ u64_stats_update_end(&dp->stats_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,33 @@ 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->stats_sync);
+
+ stats->rx_packets = dp->rx_packets;
+ stats->rx_bytes = dp->rx_bytes;
+ stats->tx_packets = dp->tx_packets;
+ stats->tx_bytes = dp->tx_bytes;
+
+ } while (u64_stats_fetch_retry_bh(&dp->stats_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 +186,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->stats_sync);
+ dp->rx_packets++;
+ dp->rx_bytes += skb->len;
+ u64_stats_update_end(&dp->stats_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
* [PATCH 1/1] Allow cascading to work with 6131 chip
From: Barry Grussling @ 2011-06-20 20:40 UTC (permalink / raw)
To: netdev; +Cc: buytenh, Barry Grussling
In-Reply-To: <1308602433-31320-1-git-send-email-barry@grussling.com>
---
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
* DSA device number.
*/
- REG_WRITE(REG_GLOBAL, 0x1c, 0xe000 | (ds->index & 0x1f));
+ if (ds->dst->pd->nr_chips > 1)
+ REG_WRITE(REG_GLOBAL, 0x1c, 0xf000 | (ds->index & 0x1f));
+ else
+ REG_WRITE(REG_GLOBAL, 0x1c, 0xe000 | (ds->index & 0x1f));
/*
* Send all frames with destination addresses matching
--
1.7.0.4
^ permalink raw reply related
* 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
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