Netdev List
 help / color / mirror / Atom feed
* [PATCH 0/4] Ethtool: cleanup strategy
From: Michał Mirosław @ 2010-10-31  3:40 UTC (permalink / raw)
  To: netdev
  Cc: e1000-devel, Steve Glendinning, Greg Kroah-Hartman, Rasesh Mody,
	Debashis Dutt, Kristoffer Glembo, linux-driver, linux-net-drivers

While writing and debugging driver for StorLink's Gemini ethernet
"card" I couldn't not notice that ethtool support had accumulated a lot
of dust and "aah, let's just copy that from another driver"-generated
code.  There are things that are reimplemented in more-or-less same way
in multiple network drivers, there are logic bugs or unexpected
variations among the implementations, and there is a lot of boilerplate
code needed to be written by a person who wants to support ethtool
in his driver.  I'm concentrating on offload feature setting here as
that's what I needed for my driver.

As I scanned through multiple drivers and ethtool core I noticed that
most (if not all) offload capabilities are determinable at ndo_init()
time.  There are, however, some exceptions as bridge and VLAN drivers,
or chips that have offload capabilities dependent on MTU setting.

Transmit offload features are the simple ones --- almost all drivers
enable support for them at per-packet when-needed basis and so they can
be disabled just by performing the required actions in software before
ndo_start_xmit(). Using a particular offload is mostly a matter of
setting its bit in netdev->features.

Receive offloads are another beast.  They usually need to be enabled
in hardware or ignored/worked-around by the driver for buggy HW.
Changing the offload's state is done in device-specific way.

My proposal is to implement a offload feature setting that needs
(almost) no code in network driver.  The idea is to add two
ethtool-specific fields to struct net_device:

 - hw_features
      offloads supported by the netdev (togglable by user)
 - features_requested
      offloads currently requested by user; this will be superset of
      (features & hw_features) when i.e. current MTU or other external
      conditions disable some offloads

... and use them to implement changing of offloads in ethtool core.
Since get_*() for TX offloads is just a bit test on netdev->features,
corresponding ethtool entry points could be removed.

This patch series is a beginning proof-of-concept work for this idea.
This is a minimal cleanup and move of TX checksum, scatter-gather and
TSO offloads to the new arrangement.  This is intended to be a mostly
no-op in functionality, so most bugs there are preserved and only
minimal code changes in drivers are made except when driver-local
get/set function code can be removed.

Please apply it if you like it as it is now. Further changes will
depend on those anyway. Later in this mail I attached couple of notes
I've taken during the conversion of some drivers. As the Cc list for
all maintainers would be huge (all network drivers are touched), I kept
only those who's drivers are changed in less obvious or uncertain ways.

Best Regards,
Michał Mirosław


  loopback
	missing TSO6 in netdev->features

  bridge
	dynamic hw caps - might need more thought

  8021q/vlan
	uses set_tso, missing TSO6 in tested features
	dynamic hw caps -> might need more thought

  xen-netfront
	optimize offload setting

  ipoib
	uses set_tso - can be moved to netdev_init?

* cxgb2
	assumed: adapter->flags initialized and can't change

* e1000
	removed unused adapter->tso_force
	set_tx_csum side-effect: fix inverted test

  enic
	uses set_tso - can be moved to netdev_init?

* ixgbevf
	set_tso: netif_tx_stop/start_all_queues removed from disable path

  jme
	csum,tso limited to MTU <= 1900

  mlx4
	uses set_tso - can be moved to netdev_init?
		errno: EPERM -> EINVAL

  tg3
	uses set_tso - parts can be moved to netdev_init?
		tso MTU 1500 on some boards
	TG3_FLAG_BROKEN_CHECKSUMS - are netdev->features based on this?

* usb/smsc75xx
	set tx_csum,tso features reset() -> init() - ok?

* usb/smsc95xx
	uses set_tx_csum
	move features change from reset()? - ok to set like this if not?

* bna
	set_tx_csum: removed bnad->conf_mutex locking

  dm9000
	removed struct board_info->can_csum

* gianfar
	set_tx_csum: removed netif_tx_lock_bh() locking

* greth
	set_tx_csum: removed netif_tx_lock_bh() locking

  ibmveth
	uses set_tx_csum - can be changed to avoid it?

  pch_gbe
	uses set_tx_csum - remove adapter->tx_csum completely?
		it's redundant (== netdev->features & NETIF_F_HW_CSUM)

* qlcnic
	set_tx_csum: is ESWITCH exclusion constant?

* sfc
	assumed: constant efx->type->offload_features

  sky2
	set_tx_csum, set_tso: merge to no_tx_offload()?
		MTU 1500 for CHIP_ID_YUKON_EC_U

  s390/net
	uses set_tso
	uses set_tx_csum - can be moved to netdev_init?



Michał Mirosław (4):
  Ethtool: Introduce hw_features field in struct netdevice
  Ethtool: convert get_sg/set_sg calls to hw_features flag
  Ethtool: convert get_tso/set_tso calls to hw_features flags
  Ethtool: convert get_tx_csum/set_tx_csum calls to hw_features flags

 drivers/infiniband/hw/nes/nes_nic.c          |    8 +-
 drivers/infiniband/ulp/ipoib/ipoib_ethtool.c |   10 +-
 drivers/net/8139cp.c                         |    5 +-
 drivers/net/atl1c/atl1c_ethtool.c            |    9 +--
 drivers/net/atl1e/atl1e_ethtool.c            |    5 +-
 drivers/net/atlx/atl1.c                      |    6 +-
 drivers/net/atlx/atl2.c                      |   12 +--
 drivers/net/benet/be_ethtool.c               |    6 -
 drivers/net/benet/be_main.c                  |    2 +
 drivers/net/bna/bnad_ethtool.c               |   43 +-------
 drivers/net/bnx2.c                           |   33 +-----
 drivers/net/bnx2x/bnx2x_ethtool.c            |   21 +---
 drivers/net/bonding/bond_main.c              |    3 -
 drivers/net/chelsio/cxgb2.c                  |   15 +--
 drivers/net/cxgb3/cxgb3_main.c               |    5 +-
 drivers/net/cxgb4/cxgb4_main.c               |   14 +--
 drivers/net/cxgb4vf/cxgb4vf_main.c           |   18 +---
 drivers/net/dm9000.c                         |   17 +---
 drivers/net/e1000/e1000.h                    |    1 -
 drivers/net/e1000/e1000_ethtool.c            |   58 ++--------
 drivers/net/e1000e/ethtool.c                 |   32 +-----
 drivers/net/ehea/ehea_ethtool.c              |    2 +-
 drivers/net/enic/enic_main.c                 |   23 +---
 drivers/net/forcedeth.c                      |   35 +-----
 drivers/net/fs_enet/fs_enet-main.c           |    3 +-
 drivers/net/gianfar.c                        |    2 +
 drivers/net/gianfar_ethtool.c                |   32 -----
 drivers/net/greth.c                          |   16 +---
 drivers/net/ibm_newemac/core.c               |    2 -
 drivers/net/ibmveth.c                        |    6 +-
 drivers/net/igb/igb_ethtool.c                |   51 +-------
 drivers/net/igbvf/ethtool.c                  |   40 +------
 drivers/net/ioc3-eth.c                       |    3 +-
 drivers/net/ixgb/ixgb_ethtool.c              |   33 +-----
 drivers/net/ixgbe/ixgbe_ethtool.c            |   48 ++-------
 drivers/net/ixgbevf/ethtool.c                |   23 +---
 drivers/net/jme.c                            |   17 ++--
 drivers/net/ksz884x.c                        |    6 +-
 drivers/net/loopback.c                       |    4 +-
 drivers/net/mlx4/en_ethtool.c                |   23 +---
 drivers/net/mlx4/en_netdev.c                 |    3 +
 drivers/net/mv643xx_eth.c                    |    3 +-
 drivers/net/myri10ge/myri10ge.c              |   17 +---
 drivers/net/netxen/netxen_nic_ethtool.c      |   34 ------
 drivers/net/netxen/netxen_nic_main.c         |    4 +
 drivers/net/pch_gbe/pch_gbe_ethtool.c        |   20 +---
 drivers/net/ps3_gelic_net.c                  |    3 +-
 drivers/net/ps3_gelic_wireless.c             |    3 +-
 drivers/net/qlcnic/qlcnic_ethtool.c          |   42 -------
 drivers/net/qlcnic/qlcnic_main.c             |    4 +
 drivers/net/qlge/qlge_ethtool.c              |   19 ---
 drivers/net/qlge/qlge_main.c                 |    3 +
 drivers/net/r8169.c                          |    5 +-
 drivers/net/s2io.c                           |   31 +-----
 drivers/net/sfc/efx.c                        |    4 +
 drivers/net/sfc/ethtool.c                    |   38 ------
 drivers/net/skge.c                           |   25 +----
 drivers/net/sky2.c                           |   11 +-
 drivers/net/spider_net.c                     |    1 +
 drivers/net/spider_net_ethtool.c             |    1 -
 drivers/net/stmmac/stmmac_ethtool.c          |   18 +---
 drivers/net/tehuti.c                         |   12 --
 drivers/net/tg3.c                            |   66 +++++------
 drivers/net/typhoon.c                        |    5 +-
 drivers/net/ucc_geth_ethtool.c               |    2 +-
 drivers/net/usb/smsc75xx.c                   |   23 +---
 drivers/net/usb/smsc95xx.c                   |   16 +--
 drivers/net/veth.c                           |   19 +---
 drivers/net/via-velocity.c                   |    4 +-
 drivers/net/virtio_net.c                     |   10 +-
 drivers/net/vmxnet3/vmxnet3_ethtool.c        |    8 +-
 drivers/net/vxge/vxge-ethtool.c              |   19 +---
 drivers/net/xen-netfront.c                   |   19 ++-
 drivers/s390/net/qeth_l3_main.c              |   21 +---
 drivers/staging/hv/netvsc_drv.c              |    3 +-
 drivers/staging/octeon/ethernet-mdio.c       |    2 -
 include/linux/ethtool.h                      |   26 +---
 include/linux/netdevice.h                    |    4 +
 net/8021q/vlan_dev.c                         |    5 +-
 net/bridge/br_device.c                       |   16 +--
 net/core/ethtool.c                           |  162 +++++++++++---------------
 net/dsa/slave.c                              |    2 +-
 82 files changed, 307 insertions(+), 1118 deletions(-)


^ permalink raw reply

* [ANNOUNCE] Host Fabric Interface (HFI) device driver available on sourceforge
From: Jim Dykman @ 2010-10-31  3:10 UTC (permalink / raw)
  To: netdev

The HFI network interface is the internal cluster fabric of IBM's PERCS 
supercomputer. The device driver patch for 2.6.36, hfi-utils, and an 
introduction to the hardware are available on the sourceforge page 
(http://sourceforge.net/projects/hfidevicedriver). The hardware design 
is under US export control, so we cannot release hardware specs.

The HFI device driver allows direct user-space access to network 
resources; a reference library will be uploaded to 
http://sourceforge.net/projects/halreferencelib in the next few days.

The driver has been running in the lab for several months. The 
user-space access is essentially complete. We are still working on IPv6, 
and we are now starting work on an ofed-over-hfi driver, but we'd like 
to start the review process without them.

Jim Dykman


^ permalink raw reply

* [GIT] Networking
From: David Miller @ 2010-10-31  1:32 UTC (permalink / raw)
  To: torvalds; +Cc: akpm, netdev, linux-kernel


Last pull request before 2.6.37-rc1, I really wanted to get your
sendto/recvfrom patch in here as well as the RDS fixes.

I did a bunch of tests with the various I/O calls using different
lengths, like 10, (2^31 - 1), 2^31, 2^32, and larger on 64-bit and it
all seems to be doing the right thing at least with TCP and UDP.

Also:

1) Fix ipv6 UDP statistic regression, from Eric Dumazet.

2) Fix GRE fallback tunnel init, also from Eric Dumazet.

3) Endianness fixes from vmxnet driver, from Harvey Harrison.

4) New ID for pcnet_cs driver.

5) Stack info leak to userland fix in mISDN, from Kulikov Vasiliy.

6) netxen_nic probe crash due to too early tx queue manipulation,
   fix from Denis Kirjanov.

7) RDS fixes from you and Andy Grover.

8) Fix sparse and section mismatch problems in new pch_can driver,
   from Marc Kleine-Budde.

Please pull, thanks a lot!

The following changes since commit b7bdcc47114595b4b359fe0f7d941bb901e9261d:

  Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-2.6-kconfig (2010-10-29 14:43:30 -0700)

are available in the git repository at:

  master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6.git master

Andy Grover (4):
      RDS: Return -EINVAL if rds_rdma_pages returns an error
      RDS: Clean up error handling in rds_cmsg_rdma_args
      RDS: Copy rds_iovecs into kernel memory instead of rereading from userspace
      RDS: Let rds_message_alloc_sgs() return NULL

Cyril Chemparathy (1):
      phy/marvell: rename 88ec048 to 88e1318s and fix mscr1 addr

Denis Kirjanov (1):
      netxen_nic: Fix the tx queue manipulation bug in netxen_nic_probe

Eric Dumazet (2):
      ipv6/udp: report SndbufErrors and RcvbufErrors
      ip_gre: fix fallback tunnel setup

Hans J. Koch (1):
      netdev: can: Change mail address of Hans J. Koch

Harvey Harrison (2):
      vmxnet3: remove unnecessary byteswapping in BAR writing macros
      vmxnet: trivial annotation of protocol constant

Ken Kawasaki (1):
      pcnet_cs: add new_id

Kulikov Vasiliy (1):
      isdn: mISDN: socket: fix information leak to userland

Linus Torvalds (2):
      net: fix rds_iovec page count overflow
      net: Truncate recvfrom and sendto length to INT_MAX.

Marc Kleine-Budde (2):
      can: pch_can: fix sparse warning
      can: pch_can: fix section mismatch warning by using a whitelisted name

 drivers/isdn/mISDN/socket.c          |    2 +
 drivers/net/can/at91_can.c           |    2 +-
 drivers/net/can/pch_can.c            |   10 ++--
 drivers/net/netxen/netxen_nic_main.c |    1 -
 drivers/net/pcmcia/pcnet_cs.c        |    1 +
 drivers/net/phy/marvell.c            |   18 +++---
 drivers/net/vmxnet3/vmxnet3_drv.c    |    2 +-
 drivers/net/vmxnet3/vmxnet3_int.h    |    8 +-
 include/linux/marvell_phy.h          |    2 +-
 net/ipv4/ip_gre.c                    |    6 +-
 net/ipv6/proc.c                      |    4 +
 net/rds/message.c                    |    5 ++
 net/rds/rdma.c                       |  126 ++++++++++++++++++++++-----------
 net/rds/send.c                       |    4 +
 net/socket.c                         |    4 +
 15 files changed, 128 insertions(+), 67 deletions(-)

^ permalink raw reply

* [net-next-2.6 PATCH 3/3] net: consolidate 8021q tagging
From: John Fastabend @ 2010-10-31  0:22 UTC (permalink / raw)
  To: davem; +Cc: netdev, jesse
In-Reply-To: <20101031002232.8691.41201.stgit@jf-dev1-dcblab>

Now that VLAN packets are tagged in dev_hard_start_xmit()
at the bottom of the stack we no longer need to tag them
in the 8021Q module (Except in the !VLAN_FLAG_REORDER_HDR
case).

This allows the accel path and non accel paths to be consolidated.
Here the vlan_tci in the skb is always set and we allow the
stack to add the actual tag in dev_hard_start_xmit().

Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
---

 net/8021q/vlan.h     |    4 --
 net/8021q/vlan_dev.c |  105 +++-----------------------------------------------
 net/8021q/vlanproc.c |    4 --
 3 files changed, 7 insertions(+), 106 deletions(-)

diff --git a/net/8021q/vlan.h b/net/8021q/vlan.h
index db01b31..4625ba6 100644
--- a/net/8021q/vlan.h
+++ b/net/8021q/vlan.h
@@ -45,8 +45,6 @@ struct vlan_rx_stats {
  *	@real_dev: underlying netdevice
  *	@real_dev_addr: address of underlying netdevice
  *	@dent: proc dir entry
- *	@cnt_inc_headroom_on_tx: statistic - number of skb expansions on TX
- *	@cnt_encap_on_xmit: statistic - number of skb encapsulations on TX
  *	@vlan_rx_stats: ptr to percpu rx stats
  */
 struct vlan_dev_info {
@@ -62,8 +60,6 @@ struct vlan_dev_info {
 	unsigned char				real_dev_addr[ETH_ALEN];
 
 	struct proc_dir_entry			*dent;
-	unsigned long				cnt_inc_headroom_on_tx;
-	unsigned long				cnt_encap_on_xmit;
 	struct vlan_rx_stats __percpu		*vlan_rx_stats;
 };
 
diff --git a/net/8021q/vlan_dev.c b/net/8021q/vlan_dev.c
index afb03c5..f3c9552 100644
--- a/net/8021q/vlan_dev.c
+++ b/net/8021q/vlan_dev.c
@@ -323,24 +323,12 @@ static netdev_tx_t vlan_dev_hard_start_xmit(struct sk_buff *skb,
 	 */
 	if (veth->h_vlan_proto != htons(ETH_P_8021Q) ||
 	    vlan_dev_info(dev)->flags & VLAN_FLAG_REORDER_HDR) {
-		unsigned int orig_headroom = skb_headroom(skb);
 		u16 vlan_tci;
-
-		vlan_dev_info(dev)->cnt_encap_on_xmit++;
-
 		vlan_tci = vlan_dev_info(dev)->vlan_id;
 		vlan_tci |= vlan_dev_get_egress_qos_mask(dev, skb);
-		skb = __vlan_put_tag(skb, vlan_tci);
-		if (!skb) {
-			txq->tx_dropped++;
-			return NETDEV_TX_OK;
-		}
-
-		if (orig_headroom < VLAN_HLEN)
-			vlan_dev_info(dev)->cnt_inc_headroom_on_tx++;
+		skb = __vlan_hwaccel_put_tag(skb, vlan_tci);
 	}
 
-
 	skb_set_dev(skb, vlan_dev_info(dev)->real_dev);
 	len = skb->len;
 	ret = dev_queue_xmit(skb);
@@ -354,32 +342,6 @@ static netdev_tx_t vlan_dev_hard_start_xmit(struct sk_buff *skb,
 	return ret;
 }
 
-static netdev_tx_t vlan_dev_hwaccel_hard_start_xmit(struct sk_buff *skb,
-						    struct net_device *dev)
-{
-	int i = skb_get_queue_mapping(skb);
-	struct netdev_queue *txq = netdev_get_tx_queue(dev, i);
-	u16 vlan_tci;
-	unsigned int len;
-	int ret;
-
-	vlan_tci = vlan_dev_info(dev)->vlan_id;
-	vlan_tci |= vlan_dev_get_egress_qos_mask(dev, skb);
-	skb = __vlan_hwaccel_put_tag(skb, vlan_tci);
-
-	skb->dev = vlan_dev_info(dev)->real_dev;
-	len = skb->len;
-	ret = dev_queue_xmit(skb);
-
-	if (likely(ret == NET_XMIT_SUCCESS || ret == NET_XMIT_CN)) {
-		txq->tx_packets++;
-		txq->tx_bytes += len;
-	} else
-		txq->tx_dropped++;
-
-	return ret;
-}
-
 static u16 vlan_dev_select_queue(struct net_device *dev, struct sk_buff *skb)
 {
 	struct net_device *rdev = vlan_dev_info(dev)->real_dev;
@@ -716,8 +678,7 @@ static const struct header_ops vlan_header_ops = {
 	.parse	 = eth_header_parse,
 };
 
-static const struct net_device_ops vlan_netdev_ops, vlan_netdev_accel_ops,
-		    vlan_netdev_ops_sq, vlan_netdev_accel_ops_sq;
+static const struct net_device_ops vlan_netdev_ops, vlan_netdev_ops_sq;
 
 static int vlan_dev_init(struct net_device *dev)
 {
@@ -752,19 +713,16 @@ static int vlan_dev_init(struct net_device *dev)
 	if (real_dev->features & NETIF_F_HW_VLAN_TX) {
 		dev->header_ops      = real_dev->header_ops;
 		dev->hard_header_len = real_dev->hard_header_len;
-		if (real_dev->netdev_ops->ndo_select_queue)
-			dev->netdev_ops = &vlan_netdev_accel_ops_sq;
-		else
-			dev->netdev_ops = &vlan_netdev_accel_ops;
 	} else {
 		dev->header_ops      = &vlan_header_ops;
 		dev->hard_header_len = real_dev->hard_header_len + VLAN_HLEN;
-		if (real_dev->netdev_ops->ndo_select_queue)
-			dev->netdev_ops = &vlan_netdev_ops_sq;
-		else
-			dev->netdev_ops = &vlan_netdev_ops;
 	}
 
+	if (real_dev->netdev_ops->ndo_select_queue)
+		dev->netdev_ops = &vlan_netdev_ops_sq;
+	else
+		dev->netdev_ops = &vlan_netdev_ops;
+
 	if (is_vlan_dev(real_dev))
 		subclass = 1;
 
@@ -905,30 +863,6 @@ static const struct net_device_ops vlan_netdev_ops = {
 #endif
 };
 
-static const struct net_device_ops vlan_netdev_accel_ops = {
-	.ndo_change_mtu		= vlan_dev_change_mtu,
-	.ndo_init		= vlan_dev_init,
-	.ndo_uninit		= vlan_dev_uninit,
-	.ndo_open		= vlan_dev_open,
-	.ndo_stop		= vlan_dev_stop,
-	.ndo_start_xmit =  vlan_dev_hwaccel_hard_start_xmit,
-	.ndo_validate_addr	= eth_validate_addr,
-	.ndo_set_mac_address	= vlan_dev_set_mac_address,
-	.ndo_set_rx_mode	= vlan_dev_set_rx_mode,
-	.ndo_set_multicast_list	= vlan_dev_set_rx_mode,
-	.ndo_change_rx_flags	= vlan_dev_change_rx_flags,
-	.ndo_do_ioctl		= vlan_dev_ioctl,
-	.ndo_neigh_setup	= vlan_dev_neigh_setup,
-	.ndo_get_stats64	= vlan_dev_get_stats64,
-#if defined(CONFIG_FCOE) || defined(CONFIG_FCOE_MODULE)
-	.ndo_fcoe_ddp_setup	= vlan_dev_fcoe_ddp_setup,
-	.ndo_fcoe_ddp_done	= vlan_dev_fcoe_ddp_done,
-	.ndo_fcoe_enable	= vlan_dev_fcoe_enable,
-	.ndo_fcoe_disable	= vlan_dev_fcoe_disable,
-	.ndo_fcoe_get_wwn	= vlan_dev_fcoe_get_wwn,
-#endif
-};
-
 static const struct net_device_ops vlan_netdev_ops_sq = {
 	.ndo_select_queue	= vlan_dev_select_queue,
 	.ndo_change_mtu		= vlan_dev_change_mtu,
@@ -954,31 +888,6 @@ static const struct net_device_ops vlan_netdev_ops_sq = {
 #endif
 };
 
-static const struct net_device_ops vlan_netdev_accel_ops_sq = {
-	.ndo_select_queue	= vlan_dev_select_queue,
-	.ndo_change_mtu		= vlan_dev_change_mtu,
-	.ndo_init		= vlan_dev_init,
-	.ndo_uninit		= vlan_dev_uninit,
-	.ndo_open		= vlan_dev_open,
-	.ndo_stop		= vlan_dev_stop,
-	.ndo_start_xmit =  vlan_dev_hwaccel_hard_start_xmit,
-	.ndo_validate_addr	= eth_validate_addr,
-	.ndo_set_mac_address	= vlan_dev_set_mac_address,
-	.ndo_set_rx_mode	= vlan_dev_set_rx_mode,
-	.ndo_set_multicast_list	= vlan_dev_set_rx_mode,
-	.ndo_change_rx_flags	= vlan_dev_change_rx_flags,
-	.ndo_do_ioctl		= vlan_dev_ioctl,
-	.ndo_neigh_setup	= vlan_dev_neigh_setup,
-	.ndo_get_stats64	= vlan_dev_get_stats64,
-#if defined(CONFIG_FCOE) || defined(CONFIG_FCOE_MODULE)
-	.ndo_fcoe_ddp_setup	= vlan_dev_fcoe_ddp_setup,
-	.ndo_fcoe_ddp_done	= vlan_dev_fcoe_ddp_done,
-	.ndo_fcoe_enable	= vlan_dev_fcoe_enable,
-	.ndo_fcoe_disable	= vlan_dev_fcoe_disable,
-	.ndo_fcoe_get_wwn	= vlan_dev_fcoe_get_wwn,
-#endif
-};
-
 void vlan_setup(struct net_device *dev)
 {
 	ether_setup(dev);
diff --git a/net/8021q/vlanproc.c b/net/8021q/vlanproc.c
index 80e280f..8a64db1 100644
--- a/net/8021q/vlanproc.c
+++ b/net/8021q/vlanproc.c
@@ -299,10 +299,6 @@ static int vlandev_seq_show(struct seq_file *seq, void *offset)
 	seq_puts(seq, "\n");
 	seq_printf(seq, fmt64, "total frames transmitted", stats->tx_packets);
 	seq_printf(seq, fmt64, "total bytes transmitted", stats->tx_bytes);
-	seq_printf(seq, fmt, "total headroom inc",
-		   dev_info->cnt_inc_headroom_on_tx);
-	seq_printf(seq, fmt, "total encap on xmit",
-		   dev_info->cnt_encap_on_xmit);
 	seq_printf(seq, "Device: %s", dev_info->real_dev->name);
 	/* now show all PRIORITY mappings relating to this VLAN */
 	seq_printf(seq, "\nINGRESS priority mappings: "


^ permalink raw reply related

* [net-next-2.6 PATCH 2/3] net: remove check for headroom in vlan_dev_create
From: John Fastabend @ 2010-10-31  0:22 UTC (permalink / raw)
  To: davem; +Cc: netdev, jesse
In-Reply-To: <20101031002232.8691.41201.stgit@jf-dev1-dcblab>

It is possible for the headroom to be smaller then the
hard_header_len for a short period of time after toggling
the vlan offload setting.

This is not a hard error and skb_cow_head is called in
__vlan_put_tag() to resolve this.

Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
---

 net/8021q/vlan_dev.c |    3 ---
 1 files changed, 0 insertions(+), 3 deletions(-)

diff --git a/net/8021q/vlan_dev.c b/net/8021q/vlan_dev.c
index 14e3d1f..afb03c5 100644
--- a/net/8021q/vlan_dev.c
+++ b/net/8021q/vlan_dev.c
@@ -274,9 +274,6 @@ static int vlan_dev_hard_header(struct sk_buff *skb, struct net_device *dev,
 	u16 vlan_tci = 0;
 	int rc;
 
-	if (WARN_ON(skb_headroom(skb) < dev->hard_header_len))
-		return -ENOSPC;
-
 	if (!(vlan_dev_info(dev)->flags & VLAN_FLAG_REORDER_HDR)) {
 		vhdr = (struct vlan_hdr *) skb_push(skb, VLAN_HLEN);
 


^ permalink raw reply related

* [net-next-2.6 PATCH 1/3] 8021q: set hard_header_len when VLAN offload features are toggled
From: John Fastabend @ 2010-10-31  0:22 UTC (permalink / raw)
  To: davem; +Cc: netdev, jesse

Toggling the vlan tx|rx hw offloads needs to set the hard_header_len
as well otherwise we end up using LL_RESERVED_SPACE incorrectly.
This results in pskb_expand_head() being used unnecessarily.

Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
---

 net/8021q/vlan.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/net/8021q/vlan.c b/net/8021q/vlan.c
index 05b867e..cb78b99 100644
--- a/net/8021q/vlan.c
+++ b/net/8021q/vlan.c
@@ -334,6 +334,12 @@ static void vlan_transfer_features(struct net_device *dev,
 	vlandev->features &= ~dev->vlan_features;
 	vlandev->features |= dev->features & dev->vlan_features;
 	vlandev->gso_max_size = dev->gso_max_size;
+
+	if (dev->features & NETIF_F_HW_VLAN_TX)
+		vlandev->hard_header_len = dev->hard_header_len;
+	else
+		vlandev->hard_header_len = dev->hard_header_len + VLAN_HLEN;
+
 #if defined(CONFIG_FCOE) || defined(CONFIG_FCOE_MODULE)
 	vlandev->fcoe_ddp_xid = dev->fcoe_ddp_xid;
 #endif


^ permalink raw reply related

* Re: [PATCH 5/6] netdev: can: Change mail address of Hans J. Koch
From: David Miller @ 2010-10-30 23:50 UTC (permalink / raw)
  To: hjk; +Cc: linux-kernel, netdev
In-Reply-To: <20101029223357.GF4331@local>

From: "Hans J. Koch" <hjk@hansjkoch.de>
Date: Sat, 30 Oct 2010 00:33:57 +0200

> My old mail address doesn't exist anymore. This changes all occurrences
> to my new address.
> 
> Signed-off-by: Hans J. Koch <hjk@hansjkoch.de>

Applied.

^ permalink raw reply

* Re: [PATCH] isdn: mISDN: socket: fix information leak to userland
From: David Miller @ 2010-10-30 23:49 UTC (permalink / raw)
  To: segooon; +Cc: kernel-janitors, isdn, acme, tj, eparis, netdev, linux-kernel
In-Reply-To: <1288429473-21864-1-git-send-email-segooon@gmail.com>

From: Vasiliy Kulikov <segooon@gmail.com>
Date: Sat, 30 Oct 2010 13:04:33 +0400

> Structure mISDN_devinfo is copied to userland with the field "name"
> that has the last elements unitialized.  It leads to leaking of
> contents of kernel stack memory.
> 
> Signed-off-by: Vasiliy Kulikov <segooon@gmail.com>

Applied.

^ permalink raw reply

* Re: [PATCH kernel 2.6.36-git10] pcnet_cs: add new_id
From: David Miller @ 2010-10-30 23:49 UTC (permalink / raw)
  To: ken_kawasaki; +Cc: netdev
In-Reply-To: <20101030071751.63611ede.ken_kawasaki@spring.nifty.jp>

From: Ken Kawasaki <ken_kawasaki@spring.nifty.jp>
Date: Sat, 30 Oct 2010 07:17:51 +0900

> 
> pcnet_cs:
>     add new_id: "corega Ether CF-TD" 10Base-T PCMCIA card.
> 
> 
> Signed-off-by: Ken Kawasaki <ken_kawasaki@spring.nifty.jp>

Applied.

^ permalink raw reply

* Re: [GIT] Networking
From: David Miller @ 2010-10-30 23:47 UTC (permalink / raw)
  To: torvalds; +Cc: akpm, netdev, linux-kernel
In-Reply-To: <AANLkTinR6XH30dHwPS23=sGYOJU8rO4+kwz+Uv_XRB-b@mail.gmail.com>

From: Linus Torvalds <torvalds@linux-foundation.org>
Date: Fri, 29 Oct 2010 14:41:03 -0700

> On Fri, Oct 29, 2010 at 12:59 PM, David Miller <davem@davemloft.net> wrote:
>>
>> This has the verify_iovec() INT_MAX limiter change as well as:
> 
> I think you'd want this as well, to make sure that sendto/recvfrom
> don't generate invalid iovecs.
> 
> Feel free to add my sign-off (or just commit it as yourself) after
> giving it some testing.

Done, thanks.

> NOTE! On thing that struck me is that the VFS layer does the
> "access_ok()" on the pre-truncated size and pointer pair, and I think
> that is the correct thing to do. However, the socket layer (and this
> patch) just truncates the size, so even if the copy is then done
> correctly with the proper user access checking, it will not check that
> the whole original buffer was valid - only that the buffer it fills in
> is valid.
> 
> Now, this is not a security issue (since we're just not checking stuff
> that isn't getting filled in), but I think it's a QoI issue - it
> allows users to successfully pass in bogus buffers with huge sizes,
> and then if the thing only reads a few bytes it will all be ok.
> 
> That's not a new thing: the old code may not have truncated the sizes,
> but if you pass in a 2GB buffer size, 99.999% of all socket read calls
> obviously won't ever fill that 2GB, but will happily return with
> whatever is there in the socket now (especially with nonblocking IO
> etc). But I do wonder if we shouldn't do the access_ok() on the whole
> buffer, as a way to keep user code honest.

I honestly don't think it matters.

I suppose we could put the access_ok() check right before these
single-buffer truncations, and then also in the per-iovec check of
{compat_}verify_iovec().

But what would all of that really give us?

Ingrained in datagram socket handling is the idea that the whole
buffer will be processed, and for stream sockets partial buffer
transfers are OK.

And I think this aligns with how we implement and check things
right now.

^ permalink raw reply

* Re: [PATCH 0/5] RDS rds_iovec fixes
From: David Miller @ 2010-10-30 23:34 UTC (permalink / raw)
  To: andy.grover; +Cc: netdev, rds-devel
In-Reply-To: <1288316459-4679-1-git-send-email-andy.grover@oracle.com>

From: Andy Grover <andy.grover@oracle.com>
Date: Thu, 28 Oct 2010 18:40:54 -0700

> This patchset includes Linus' rds_iovec overflow fix, as well as making
> a copy of the rds_iovec array to prevent userspace from changing them after
> we've checked them.
> 
> Please especially review patch 5. We go from 3 to 2 iovec copies, but it's not
> trivial to go to one, due to some code that wants to preallocate space for SGs.
> Until that code can be changed, patch 5 attempts to safely handle the scenario.

I looked carefully over these and they look ok.

Applied, thanks Andy.

^ permalink raw reply

* Re: [PATCH 1/2] can: pch_can: fix sparse warning
From: David Miller @ 2010-10-30 23:28 UTC (permalink / raw)
  To: mkl-bIcnvbaLZ9MEGnE8C9+IrQ
  Cc: socketcan-core-0fE9KPoRgkgATYTw5x5z8w,
	netdev-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <1288168706-870-2-git-send-email-mkl-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>

From: Marc Kleine-Budde <mkl-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
Date: Wed, 27 Oct 2010 10:38:25 +0200

> This patch fixes the following sparse warning:
> 
> drivers/net/can/pch_can.c:231:26: warning: incorrect type in argument 1 (different address spaces)
> drivers/net/can/pch_can.c:231:26:    expected unsigned int [usertype] *addr
> drivers/net/can/pch_can.c:231:26:    got unsigned int [noderef] <asn:2>*<noident>
> 
> Let pch_can_bit_{set,clear} first parameter be a void __iomem pointer.
> 
> Signed-off-by: Marc Kleine-Budde <mkl-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>

Applied.

^ permalink raw reply

* Re: [PATCH 2/2] can: pch_can: fix section mismatch warning by using a whitelisted name
From: David Miller @ 2010-10-30 23:28 UTC (permalink / raw)
  To: mkl; +Cc: socketcan-core, netdev, tomoya-linux
In-Reply-To: <1288168706-870-3-git-send-email-mkl@pengutronix.de>

From: Marc Kleine-Budde <mkl@pengutronix.de>
Date: Wed, 27 Oct 2010 10:38:26 +0200

> This patch fixes the following section mismatch warning:
> 
> WARNING: drivers/net/can/pch_can.o(.data+0x18):
> Section mismatch in reference from the variable pch_can_pcidev
> to the variable .devinit.rodata:pch_pci_tbl
> The variable pch_can_pcidev references
> the variable __devinitconst pch_pci_tbl
> 
> This is actually a false positive which is fixed by giving the offending
> variable a whitelisted name, it's renamed to "pch_can_pci_driver".
> This makes sense because the variable is of the type "struct pci_driver".
> 
> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
> Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

Applied.

^ permalink raw reply

* Re: NULL pointer dereference at netxen_nic_probe+0x813/0x9a0
From: David Miller @ 2010-10-30 23:24 UTC (permalink / raw)
  To: dkirjanov; +Cc: bjorn.helgaas, amit.salecha, netdev, linux-kernel
In-Reply-To: <4CCC7868.60104@kernel.org>

From: Denis Kirjanov <dkirjanov@kernel.org>
Date: Sat, 30 Oct 2010 23:56:24 +0400

> [PATCH] netxen_nic: Fix the tx queue manipulation bug in netxen_nic_probe
> 
> We should not stop the egress queue during probe because it is wrong.
> 
> Signed-off-by: Denis Kirjanov <dkirjanov@kernel.org>

Applied.

^ permalink raw reply

* Re: [PATCH net-next-2.6 1/2] be2net: Adding an option to use INTx instead of MSI-X
From: Matthew Wilcox @ 2010-10-30 23:21 UTC (permalink / raw)
  To: Michael Ellerman
  Cc: David Miller, bhutchings, somnath.kotur, netdev, linux-pci
In-Reply-To: <1288075928.6578.185.camel@concordia>

On Tue, Oct 26, 2010 at 05:52:08PM +1100, Michael Ellerman wrote:
> That horse has really really bolted, it's gawn.
> 
> I count 26 drivers with "disable MSI/X" parameters. Some even have more
> than one.

That's 26 patches someone needs to write, then.  You can put my Acked-by
on all of them.

> I agree it's a mess for users, but it's probably preferable to a
> non-working driver.

What more drivers need is an automatic detection of a non-working
interrupt situation, great big warning messages, and fallback to an
alternate interrupt mechanism.  Doing it for one driver, then generalising
as much of it into the core as possible would be nice.

-- 
Matthew Wilcox				Intel Open Source Technology Centre
"Bill, look, we understand that you're interested in selling us this
operating system, but compare it to ours.  We can't possibly take such
a retrograde step."

^ permalink raw reply

* Re: [PATCH] ip_gre: fix fallback tunnel setup
From: David Miller @ 2010-10-30 23:21 UTC (permalink / raw)
  To: xemul; +Cc: eric.dumazet, netdev
In-Reply-To: <4CC9CF06.1090806@parallels.com>

From: Pavel Emelyanov <xemul@parallels.com>
Date: Thu, 28 Oct 2010 23:29:10 +0400

> On 10/28/2010 11:11 PM, Eric Dumazet wrote:
>> Le jeudi 28 octobre 2010 à 20:47 +0200, Eric Dumazet a écrit :
>>> Le jeudi 28 octobre 2010 à 11:41 -0700, David Miller a écrit :
>>>> I am still able to revert this I think without screwing up
>>>> publicly visible history, so I will double check and do the
>>>> revert if I can.
>>>
>>> Cool, I'll provide a patch in a couple of minutes, when tested.
>>>
>> 
>> I believe the right fix is this one, Pavel what do you think ?
> 
> Indeed. I missed the fact, that the gre driver uses ndo_init for
> all devices including the fb one :(
> 
> Acked-by: Pavel Emelyanov <xemul@openvz.org>

Applied.

^ permalink raw reply

* Re: [PATCH 2/2] vmxnet: trivial annotation of protocol constant
From: David Miller @ 2010-10-30 23:19 UTC (permalink / raw)
  To: harvey.harrison; +Cc: sbhatewara, netdev
In-Reply-To: <1288235555-24675-2-git-send-email-harvey.harrison@gmail.com>

From: Harvey Harrison <harvey.harrison@gmail.com>
Date: Wed, 27 Oct 2010 20:12:35 -0700

> Noticed by sparse:
> drivers/net/vmxnet3/vmxnet3_drv.c:876:38: warning: cast from restricted __be16
> drivers/net/vmxnet3/vmxnet3_drv.c:876:38: warning: cast from restricted __be16
> drivers/net/vmxnet3/vmxnet3_drv.c:876:24: warning: restricted __be16 degrades to integer
> 
> Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>

Applied.

^ permalink raw reply

* Re: [PATCH 1/2] vmxnet3: remove unnecessary byteswapping in BAR writing macros
From: David Miller @ 2010-10-30 23:19 UTC (permalink / raw)
  To: harvey.harrison; +Cc: sbhatewara, netdev
In-Reply-To: <1288235555-24675-1-git-send-email-harvey.harrison@gmail.com>

From: Harvey Harrison <harvey.harrison@gmail.com>
Date: Wed, 27 Oct 2010 20:12:34 -0700

> readl/writel swap to little-endian internally.
> 
> Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>

Applied.

^ permalink raw reply

* Re: [PATCH] ipv6/udp: report SndbufErrors and RcvbufErrors
From: David Miller @ 2010-10-30 23:17 UTC (permalink / raw)
  To: eric.dumazet; +Cc: netdev, stable
In-Reply-To: <1288172116.2709.81.camel@edumazet-laptop>

From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Wed, 27 Oct 2010 11:35:16 +0200

> commit a18135eb9389 (Add UDP_MIB_{SND,RCV}BUFERRORS handling.)
> forgot to make the necessary changes in net/ipv6/proc.c to report
> additional counters in /proc/net/snmp6
> 
> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>

Applied.

^ permalink raw reply

* Re: [PATCH] af_unix: unix_write_space() use keyed wakeups
From: Alban Crequy @ 2010-10-30 21:36 UTC (permalink / raw)
  To: Eric Dumazet
  Cc: Davide Libenzi, David S. Miller, Stephen Hemminger,
	Cyrill Gorcunov, Alexey Dobriyan, netdev, linux-kernel,
	Pauli Nieminen, Rainer Weikusat
In-Reply-To: <1288421084.2680.717.camel@edumazet-laptop>

Le Sat, 30 Oct 2010 08:44:44 +0200,
Eric Dumazet <eric.dumazet@gmail.com> a écrit :

> We still loop on 800 items, on each wake_up_interruptible_sync_poll()
> call, so maybe we want to optimize this later, adding a global key,
> ORing all items keys. I dont think its worth the added complexity,
> given the biased usage of your program (800 'listeners' to one
> event). Is it a real life scenario ?

Pauli Nieminen told me about his performance problem in select() so I
wrote the test program but I don't know what exactly is the real life
scenario.

> [PATCH] af_unix: use keyed wakeups
> [PATCH] af_unix: optimize unix_dgram_poll()

Your 2 patches are good for me. In my opinion the improved performances
are good enough with your 2 patches, so no need to add more complexity
unless we discover new problems.

I am preparing patches to implement multicast features on Unix
datagram+seqpacket sockets and my patches could potentially make things
worse in unix_dgram_poll() because it would need to check the receiving
queues of all multicast members. So I want unix_dgram_poll() to be fast
in the first place before proposing other changes for multicast.

^ permalink raw reply

* [PATCH 38/39] net/rfkill/input.c: Update WARN uses
From: Joe Perches @ 2010-10-30 21:08 UTC (permalink / raw)
  To: Jiri Kosina
  Cc: Johannes Berg, John W. Linville, David S. Miller, linux-wireless,
	netdev, linux-kernel
In-Reply-To: <cover.1288471897.git.joe@perches.com>

Coalesce long formats.
Align arguments.

Signed-off-by: Joe Perches <joe@perches.com>
---
 net/rfkill/input.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/net/rfkill/input.c b/net/rfkill/input.c
index 1bca6d4..4343f59 100644
--- a/net/rfkill/input.c
+++ b/net/rfkill/input.c
@@ -75,9 +75,8 @@ static void __rfkill_handle_global_op(enum rfkill_sched_op op)
 	default:
 		/* memory corruption or bug, fail safely */
 		rfkill_epo();
-		WARN(1, "Unknown requested operation %d! "
-			"rfkill Emergency Power Off activated\n",
-			op);
+		WARN(1, "Unknown requested operation %d! rfkill Emergency Power Off activated\n",
+		     op);
 	}
 }
 
-- 
1.7.3.1.g432b3.dirty


^ permalink raw reply related

* [PATCH 36/39] net/ipv4/tcp.c: Update WARN uses
From: Joe Perches @ 2010-10-30 21:08 UTC (permalink / raw)
  To: Jiri Kosina
  Cc: David S. Miller, Alexey Kuznetsov, Pekka Savola (ipv6),
	James Morris, Hideaki YOSHIFUJI, Patrick McHardy, netdev,
	linux-kernel
In-Reply-To: <cover.1288471897.git.joe@perches.com>

Coalesce long formats.
Align arguments.
Remove KERN_<level>.

Signed-off-by: Joe Perches <joe@perches.com>
---
 net/ipv4/tcp.c |   16 +++++++---------
 1 files changed, 7 insertions(+), 9 deletions(-)

diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
index 1664a05..5f738c5 100644
--- a/net/ipv4/tcp.c
+++ b/net/ipv4/tcp.c
@@ -1193,7 +1193,7 @@ void tcp_cleanup_rbuf(struct sock *sk, int copied)
 	struct sk_buff *skb = skb_peek(&sk->sk_receive_queue);
 
 	WARN(skb && !before(tp->copied_seq, TCP_SKB_CB(skb)->end_seq),
-	     KERN_INFO "cleanup rbuf bug: copied %X seq %X rcvnxt %X\n",
+	     "cleanup rbuf bug: copied %X seq %X rcvnxt %X\n",
 	     tp->copied_seq, TCP_SKB_CB(skb)->end_seq, tp->rcv_nxt);
 #endif
 
@@ -1477,10 +1477,9 @@ int tcp_recvmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,
 			 * shouldn't happen.
 			 */
 			if (WARN(before(*seq, TCP_SKB_CB(skb)->seq),
-			     KERN_INFO "recvmsg bug: copied %X "
-				       "seq %X rcvnxt %X fl %X\n", *seq,
-				       TCP_SKB_CB(skb)->seq, tp->rcv_nxt,
-				       flags))
+				 "recvmsg bug: copied %X seq %X rcvnxt %X fl %X\n",
+				 *seq, TCP_SKB_CB(skb)->seq, tp->rcv_nxt,
+				 flags))
 				break;
 
 			offset = *seq - TCP_SKB_CB(skb)->seq;
@@ -1490,10 +1489,9 @@ int tcp_recvmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,
 				goto found_ok_skb;
 			if (tcp_hdr(skb)->fin)
 				goto found_fin_ok;
-			WARN(!(flags & MSG_PEEK), KERN_INFO "recvmsg bug 2: "
-					"copied %X seq %X rcvnxt %X fl %X\n",
-					*seq, TCP_SKB_CB(skb)->seq,
-					tp->rcv_nxt, flags);
+			WARN(!(flags & MSG_PEEK),
+			     "recvmsg bug 2: copied %X seq %X rcvnxt %X fl %X\n",
+			     *seq, TCP_SKB_CB(skb)->seq, tp->rcv_nxt, flags);
 		}
 
 		/* Well, if we have backlog, try to process it now yet. */
-- 
1.7.3.1.g432b3.dirty


^ permalink raw reply related

* [PATCH 29/39] include/linux/device.h: Update WARN uses
From: Joe Perches @ 2010-10-30 21:08 UTC (permalink / raw)
  To: Jiri Kosina; +Cc: netdev, linux-kernel
In-Reply-To: <cover.1288471897.git.joe@perches.com>

Macro argument neatening.

Signed-off-by: Joe Perches <joe@perches.com>
---
 include/linux/device.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/include/linux/device.h b/include/linux/device.h
index dd48953..724d1fd 100644
--- a/include/linux/device.h
+++ b/include/linux/device.h
@@ -744,7 +744,7 @@ do {						     \
  * file/line information and a backtrace.
  */
 #define dev_WARN(dev, format, arg...) \
-	WARN(1, "Device: %s\n" format, dev_driver_string(dev), ## arg);
+	WARN(1, "Device: %s\n" format, dev_driver_string(dev), ##arg);
 
 /* Create alias, so I can be autoloaded. */
 #define MODULE_ALIAS_CHARDEV(major,minor) \
-- 
1.7.3.1.g432b3.dirty


^ permalink raw reply related

* [PATCH 18/39] drivers/net/wireless/iwlwifi: Update WARN uses
From: Joe Perches @ 2010-10-30 21:08 UTC (permalink / raw)
  To: Jiri Kosina
  Cc: Reinette Chatre, Wey-Yi Guy, Intel Linux Wireless,
	John W. Linville, linux-wireless, netdev, linux-kernel
In-Reply-To: <cover.1288471897.git.joe@perches.com>

Align arguments.
Add missing newlines.

Signed-off-by: Joe Perches <joe@perches.com>
---
 drivers/net/wireless/iwlwifi/iwl-agn-lib.c  |    3 +--
 drivers/net/wireless/iwlwifi/iwl-agn-sta.c  |    6 +++---
 drivers/net/wireless/iwlwifi/iwl-tx.c       |    6 +++---
 drivers/net/wireless/iwlwifi/iwl3945-base.c |    2 +-
 4 files changed, 8 insertions(+), 9 deletions(-)

diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-lib.c b/drivers/net/wireless/iwlwifi/iwl-agn-lib.c
index b555edd..cbb63f3 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-lib.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-lib.c
@@ -2139,8 +2139,7 @@ static int iwl_get_idle_rx_chain_count(struct iwl_priv *priv, int active_cnt)
 	case IEEE80211_SMPS_OFF:
 		return active_cnt;
 	default:
-		WARN(1, "invalid SMPS mode %d",
-		     priv->current_ht_config.smps);
+		WARN(1, "invalid SMPS mode %d\n", priv->current_ht_config.smps);
 		return active_cnt;
 	}
 }
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-sta.c b/drivers/net/wireless/iwlwifi/iwl-agn-sta.c
index 35a30d2..46c45e7 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-sta.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-sta.c
@@ -284,7 +284,7 @@ static int iwl_set_wep_dynamic_key_info(struct iwl_priv *priv,
 	 * in uCode. */
 
 	WARN(priv->stations[sta_id].sta.key.key_offset == WEP_INVALID_OFFSET,
-		"no space for a new key");
+	     "no space for a new key\n");
 
 	priv->stations[sta_id].sta.key.key_flags = key_flags;
 	priv->stations[sta_id].sta.sta.modify_mask = STA_MODIFY_KEY_MASK;
@@ -334,7 +334,7 @@ static int iwl_set_ccmp_dynamic_key_info(struct iwl_priv *priv,
 	 * in uCode. */
 
 	WARN(priv->stations[sta_id].sta.key.key_offset == WEP_INVALID_OFFSET,
-		"no space for a new key");
+	     "no space for a new key\n");
 
 	priv->stations[sta_id].sta.key.key_flags = key_flags;
 	priv->stations[sta_id].sta.sta.modify_mask = STA_MODIFY_KEY_MASK;
@@ -378,7 +378,7 @@ static int iwl_set_tkip_dynamic_key_info(struct iwl_priv *priv,
 	 * in uCode. */
 
 	WARN(priv->stations[sta_id].sta.key.key_offset == WEP_INVALID_OFFSET,
-		"no space for a new key");
+	     "no space for a new key\n");
 
 	priv->stations[sta_id].sta.key.key_flags = key_flags;
 
diff --git a/drivers/net/wireless/iwlwifi/iwl-tx.c b/drivers/net/wireless/iwlwifi/iwl-tx.c
index 7261ee4..1d8c4a6 100644
--- a/drivers/net/wireless/iwlwifi/iwl-tx.c
+++ b/drivers/net/wireless/iwlwifi/iwl-tx.c
@@ -594,9 +594,9 @@ void iwl_tx_cmd_complete(struct iwl_priv *priv, struct iwl_rx_mem_buffer *rxb)
 	 * in the queue management code. */
 	if (WARN(txq_id != priv->cmd_queue,
 		 "wrong command queue %d (should be %d), sequence 0x%X readp=%d writep=%d\n",
-		  txq_id, priv->cmd_queue, sequence,
-		  priv->txq[priv->cmd_queue].q.read_ptr,
-		  priv->txq[priv->cmd_queue].q.write_ptr)) {
+		 txq_id, priv->cmd_queue, sequence,
+		 priv->txq[priv->cmd_queue].q.read_ptr,
+		 priv->txq[priv->cmd_queue].q.write_ptr)) {
 		iwl_print_hex_error(priv, pkt, 32);
 		return;
 	}
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c
index 8f8c4b7..c89c409 100644
--- a/drivers/net/wireless/iwlwifi/iwl3945-base.c
+++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c
@@ -168,7 +168,7 @@ static int iwl3945_set_ccmp_dynamic_key_info(struct iwl_priv *priv,
 	* in uCode. */
 
 	WARN(priv->stations[sta_id].sta.key.key_offset == WEP_INVALID_OFFSET,
-		"no space for a new key");
+	     "no space for a new key\n");
 
 	priv->stations[sta_id].sta.key.key_flags = key_flags;
 	priv->stations[sta_id].sta.sta.modify_mask = STA_MODIFY_KEY_MASK;
-- 
1.7.3.1.g432b3.dirty


^ permalink raw reply related

* [PATCH 37/39] net/mac80211: Update WARN uses
From: Joe Perches @ 2010-10-30 21:08 UTC (permalink / raw)
  To: Jiri Kosina
  Cc: John W. Linville, Johannes Berg, David S. Miller,
	linux-wireless-u79uwXL29TY76Z2rM5mHXA,
	netdev-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <cover.1288471897.git.joe-6d6DIl74uiNBDgjK7y7TUQ@public.gmane.org>

Coalesce long formats.
Add missing newlines.

Signed-off-by: Joe Perches <joe-6d6DIl74uiNBDgjK7y7TUQ@public.gmane.org>
---
 net/mac80211/agg-tx.c |    5 +++--
 net/mac80211/iface.c  |    4 ++--
 net/mac80211/mlme.c   |    2 +-
 net/mac80211/rx.c     |    4 +---
 net/mac80211/tx.c     |    4 +---
 net/mac80211/util.c   |    4 +---
 net/mac80211/work.c   |    4 ++--
 7 files changed, 11 insertions(+), 16 deletions(-)

diff --git a/net/mac80211/agg-tx.c b/net/mac80211/agg-tx.c
index d4679b2..9f2c3f6 100644
--- a/net/mac80211/agg-tx.c
+++ b/net/mac80211/agg-tx.c
@@ -454,8 +454,9 @@ ieee80211_agg_splice_packets(struct ieee80211_local *local,
 
 	ieee80211_stop_queue_agg(local, tid);
 
-	if (WARN(!tid_tx, "TID %d gone but expected when splicing aggregates"
-			  " from the pending queue\n", tid))
+	if (WARN(!tid_tx,
+		 "TID %d gone but expected when splicing aggregates from the pending queue\n",
+		 tid))
 		return;
 
 	if (!skb_queue_empty(&tid_tx->pending)) {
diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c
index f9163b1..328e637 100644
--- a/net/mac80211/iface.c
+++ b/net/mac80211/iface.c
@@ -820,7 +820,7 @@ static void ieee80211_iface_work(struct work_struct *work)
 			ieee80211_mesh_rx_queued_mgmt(sdata, skb);
 			break;
 		default:
-			WARN(1, "frame for unexpected interface type");
+			WARN(1, "frame for unexpected interface type\n");
 			break;
 		}
 
@@ -979,7 +979,7 @@ static int ieee80211_runtime_change_iftype(struct ieee80211_sub_if_data *sdata,
 	ieee80211_setup_sdata(sdata, type);
 
 	err = ieee80211_do_open(sdata->dev, false);
-	WARN(err, "type change: do_open returned %d", err);
+	WARN(err, "type change: do_open returned %d\n", err);
 
 	return ret;
 }
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index a3a9421..22f054a 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -1780,7 +1780,7 @@ void ieee80211_sta_rx_queued_mgmt(struct ieee80211_sub_if_data *sdata,
 			cfg80211_send_disassoc(sdata->dev, (u8 *)mgmt, skb->len);
 			break;
 		default:
-			WARN(1, "unexpected: %d", rma);
+			WARN(1, "unexpected: %d\n", rma);
 		}
 		return;
 	}
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
index 902b03e..7775375 100644
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
@@ -2840,9 +2840,7 @@ void ieee80211_rx(struct ieee80211_hw *hw, struct sk_buff *skb)
 			 */
 			if (WARN((status->rate_idx < 0 ||
 				 status->rate_idx > 76),
-				 "Rate marked as an HT rate but passed "
-				 "status->rate_idx is not "
-				 "an MCS index [0-76]: %d (0x%02x)\n",
+				 "Rate marked as an HT rate but passed status->rate_idx is not an MCS index [0-76]: %d (0x%02x)\n",
 				 status->rate_idx,
 				 status->rate_idx))
 				goto drop;
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index 96c5943..a511d69 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -649,9 +649,7 @@ ieee80211_tx_h_rate_ctrl(struct ieee80211_tx_data *tx)
 	if (WARN(test_bit(SCAN_SW_SCANNING, &tx->local->scanning) &&
 		 (sta_flags & WLAN_STA_ASSOC) &&
 		 !rate_usable_index_exists(sband, &tx->sta->sta),
-		 "%s: Dropped data frame as no usable bitrate found while "
-		 "scanning and associated. Target station: "
-		 "%pM on %d GHz band\n",
+		 "%s: Dropped data frame as no usable bitrate found while scanning and associated. Target station: %pM on %d GHz band\n",
 		 tx->sdata->name, hdr->addr1,
 		 tx->channel->band ? 5 : 2))
 		return TX_DROP;
diff --git a/net/mac80211/util.c b/net/mac80211/util.c
index 0b6fc92..2a14723 100644
--- a/net/mac80211/util.c
+++ b/net/mac80211/util.c
@@ -1120,9 +1120,7 @@ int ieee80211_reconfig(struct ieee80211_local *local)
 		 */
 		res = drv_start(local);
 		if (res) {
-			WARN(local->suspended, "Hardware became unavailable "
-			     "upon resume. This could be a software issue "
-			     "prior to suspend or a hardware issue.\n");
+			WARN(local->suspended, "Hardware became unavailable upon resume. This could be a software issue prior to suspend or a hardware issue.\n");
 			return res;
 		}
 
diff --git a/net/mac80211/work.c b/net/mac80211/work.c
index ae344d1..8583206 100644
--- a/net/mac80211/work.c
+++ b/net/mac80211/work.c
@@ -830,7 +830,7 @@ static void ieee80211_work_rx_queued_mgmt(struct ieee80211_local *local,
 		list_del_rcu(&wk->list);
 		break;
 	default:
-		WARN(1, "unexpected: %d", rma);
+		WARN(1, "unexpected: %d\n", rma);
 	}
 
 	mutex_unlock(&local->mtx);
@@ -973,7 +973,7 @@ static void ieee80211_work_work(struct work_struct *work)
 			list_add(&wk->list, &free_work);
 			break;
 		default:
-			WARN(1, "unexpected: %d", rma);
+			WARN(1, "unexpected: %d\n", rma);
 		}
 	}
 
-- 
1.7.3.1.g432b3.dirty

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox