pandora-kernel.git
14 years agonetxen: add sysfs entries for diag tools
Dhananjay Phadke [Tue, 13 Oct 2009 05:31:45 +0000 (05:31 +0000)]
netxen: add sysfs entries for diag tools

Add sysfs entries to enable register and memory access
for diagnostic tools.

Signed-off-by: Narender Kumar <narender.kumar@qlogic.com>
Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonetxen: separate register and memory access lock
Dhananjay Phadke [Tue, 13 Oct 2009 05:31:44 +0000 (05:31 +0000)]
netxen: separate register and memory access lock

Since register and onboard memory access has separate
window registers, they need not be kept under same lock.

Also, memory is always accessed from process context
(mostly for firmware init and diagnostic tools).

Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonetxen: annotate register windowing code
Dhananjay Phadke [Tue, 13 Oct 2009 05:31:43 +0000 (05:31 +0000)]
netxen: annotate register windowing code

Use common variables crb_win, ocm_win for all revisions of chip.

Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonetxen: add access to on chip memory for tools
Dhananjay Phadke [Tue, 13 Oct 2009 05:31:42 +0000 (05:31 +0000)]
netxen: add access to on chip memory for tools

Add access to on chip memory, this is used by
debug and diagnostic tools only.

Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonetxen: remove sub 64-bit mem accesses
Amit Kumar Salecha [Tue, 13 Oct 2009 05:31:41 +0000 (05:31 +0000)]
netxen: remove sub 64-bit mem accesses

Sub 64-bit / unaligned access to oncard memory was only used
by old diagnostic tools, causes some intermittent issues when
memory controller agent is used.  The new access method was
added by commit ea6828b8aa3a8ebae8d7740f32f212ba1d2f0742
("netxen: improve pci memory access").  Firmware init anyway
uses 8-byte strides.

This also fixes address/offset calculation for NX2031 context
memory (SIU). For NX3031, SIU uses same register offsets
as packet memory (MIU).

Signed-off-by: Amit Kumar Salecha <amit@netxen.com>
Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet: Use netdev_alloc_skb_ip_align()
Eric Dumazet [Tue, 13 Oct 2009 05:34:20 +0000 (05:34 +0000)]
net: Use netdev_alloc_skb_ip_align()

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agosb1250-mac: duplicate setting of bit V_MAC_RX_PL_THRSH(4) in sbmac_channel_start()
roel kluin [Tue, 6 Oct 2009 10:07:15 +0000 (10:07 +0000)]
sb1250-mac: duplicate setting of bit V_MAC_RX_PL_THRSH(4) in sbmac_channel_start()

The bit V_MAC_RX_PL_THRSH(4) was already set a few lines higher.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet/hamradio: fix test in receive()
roel kluin [Tue, 6 Oct 2009 01:20:08 +0000 (01:20 +0000)]
net/hamradio: fix test in receive()

The negation makes it a bool before the comparison and hence it
will never evaluate to true.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agox25: bit and/or confusion in x25_ioctl()?
roel kluin [Wed, 7 Oct 2009 00:59:42 +0000 (00:59 +0000)]
x25: bit and/or confusion in x25_ioctl()?

Looking at commit ebc3f64b864f it appears that this was intended
and not the original, equivalent to `if (facilities.reverse & ~0x81)'.

In x25_parse_facilities() that patch changed how facilities->reverse
was set. No other bits were set than 0x80 and/or 0x01.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agocxgb3: Added private MAC address and provisioning packet handler for iSCSI
Karen Xie [Thu, 8 Oct 2009 09:11:05 +0000 (09:11 +0000)]
cxgb3: Added private MAC address and provisioning packet handler for iSCSI

This patch added support of private MAC address per port and provisioning
packet handler for iSCSI traffic only.

The above changes are isolated to the cxgb3 driver, independent of any scsi or iscsi driver changes.

Acked-by: Karen Xie <kxie@chelsio.com>
Acked-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: Rakesh Ranjan <rakesh@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet: add Runtime PM to the sh_eth driver
Magnus Damm [Fri, 9 Oct 2009 00:20:04 +0000 (00:20 +0000)]
net: add Runtime PM to the sh_eth driver

Add Runtime PM support to the sh_eth driver.

The clock to the ethernet hardware block will be
enabled as long as the network device is up.

Signed-off-by: Magnus Damm <damm@opensource.se>
Tested-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet: allow sh_eth to get mac address through platform data
Magnus Damm [Fri, 9 Oct 2009 00:17:14 +0000 (00:17 +0000)]
net: allow sh_eth to get mac address through platform data

Extend the sh_eth driver to allow passing the mac address
using the platform data structure. This to simplify board
setup code.

Signed-off-by: Magnus Damm <damm@opensource.se>
Tested-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agocan: make the number of echo skb's configurable
Wolfgang Grandegger [Thu, 8 Oct 2009 22:17:11 +0000 (22:17 +0000)]
can: make the number of echo skb's configurable

This patch allows the CAN controller driver to define the number of echo
skb's used for the local loopback (echo), as suggested by Kurt Van
Dijck, with the function:

  struct net_device *alloc_candev(int sizeof_priv,
                                  unsigned int echo_skb_max);

The CAN drivers have been adapted accordingly. For the ems_usb driver,
as suggested by Sebastian Haas, the number of echo skb's has been
increased to 10, which improves the transmission performance a lot.

Signed-off-by: Wolfgang Grandegger <wg@grandegger.com>
Signed-off-by: Kurt Van Dijck <kurt.van.dijck@eia.be>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet: Add netdev_alloc_skb_ip_align() helper
Eric Dumazet [Wed, 7 Oct 2009 17:11:23 +0000 (17:11 +0000)]
net: Add netdev_alloc_skb_ip_align() helper

Instead of hardcoding NET_IP_ALIGN stuff in various network drivers,
we can add a helper around netdev_alloc_skb()

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agotcp: replace ehash_size by ehash_mask
Eric Dumazet [Fri, 9 Oct 2009 00:16:19 +0000 (00:16 +0000)]
tcp: replace ehash_size by ehash_mask

Storing the mask (size - 1) instead of the size allows fast path to be
a bit faster.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoipv6: fix devconf after adding force_tllao option
Cosmin Ratiu [Fri, 9 Oct 2009 03:11:14 +0000 (03:11 +0000)]
ipv6: fix devconf after adding force_tllao option

Signed-off-by: Cosmin Ratiu <cratiu@ixiacom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agobonding: change bond_create_proc_entry() to return void
Nicolas de Pesloüan [Tue, 13 Oct 2009 07:45:06 +0000 (00:45 -0700)]
bonding: change bond_create_proc_entry() to return void

The function bond_create_proc_entry is currently of type int.

Two versions of this function exist:

The one in the ifdef CONFIG_PROC_FS branch always return 0.
The one in the else branch (which is empty) return nothing.

When CONFIG_PROC_FS is undef, this cause the following warning:

drivers/net/bonding/bond_main.c: In function `bond_create_proc_entry':
drivers/net/bonding/bond_main.c:3393: warning: control reaches end of
non-void function

No caller of this function use the returned value.

So change the returned type from int to void and remove the
useless return 0; .

Signed-off-by: Nicolas de Pesloüan <nicolas.2p.debian@free.fr>
Reported-by: Rakib Mullick <rakib.mullick@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agosfc: 10Xpress: Initialise pause advertising flags
Ben Hutchings [Mon, 12 Oct 2009 09:27:07 +0000 (09:27 +0000)]
sfc: 10Xpress: Initialise pause advertising flags

The mdio module now handles reconfiguration of pause advertising
through ethtool, but not initialisation.  Add the necessary
initialisation to tenxpress_phy_init().

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agomdio: Expose pause frame advertising flags to ethtool
Ben Hutchings [Mon, 12 Oct 2009 09:26:37 +0000 (09:26 +0000)]
mdio: Expose pause frame advertising flags to ethtool

In mdio45_ethtool_gset_npage() and mdio45_ethtool_gset(), check MDIO
pause frame advertising flags and set the corresponding ethtool flags.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agomdio: Advertise pause (flow control) settings even if autoneg is off
Ben Hutchings [Mon, 12 Oct 2009 09:26:17 +0000 (09:26 +0000)]
mdio: Advertise pause (flow control) settings even if autoneg is off

Currently, if pause autoneg is off we do not set either pause
advertising flag.  If autonegotiation of speed and duplex settings is
enabled, there is no way for the link partner to distinguish this from
our refusing to use pause frames.

We should instead set the advertising flags according to the forced
mode so that the link partner can follow our lead.  This is consistent
with the behaviour of other drivers.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agogianfar: Add support for hibernation
Anton Vorontsov [Mon, 12 Oct 2009 06:00:42 +0000 (06:00 +0000)]
gianfar: Add support for hibernation

Thanks to various cleanups and refactorings this is now straightforward:
convert the gianfar driver to dev_pm_ops, plus add ->restore() callback
that will fully reinitialize MAC internal registers and BDs.

Note that I kept legacy suspend/resume callbacks so that this patch
doesn't depend on PowerPC changes (i.e. dev_pm_ops support for OF
platform drivers).

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agogianfar: Factor out gfar_init_bds() from gfar_alloc_skb_resources()
Anton Vorontsov [Mon, 12 Oct 2009 06:00:39 +0000 (06:00 +0000)]
gianfar: Factor out gfar_init_bds() from gfar_alloc_skb_resources()

After hibernation we want to just reinitialize BDs, no need to allocate
anything. So, factor out BDs initialization code from
gfar_alloc_skb_resourses().

Also, teach gfar_init_bds() to reuse already allocated RX SKBs, i.e.
just call gfar_init_rxbdp() if a SKB was already allocated and mapped.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agogianfar: Factor out RX BDs initialization from gfar_new_rxbdp()
Anton Vorontsov [Mon, 12 Oct 2009 06:00:37 +0000 (06:00 +0000)]
gianfar: Factor out RX BDs initialization from gfar_new_rxbdp()

We want to just reinitialize RX BDs after hibernation, no need to
map the skb->data again. So let's factor gfar_init_rxbdp() out of
gfar_new_rxbdp().

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agogianfar: Move tbase/rbase initialization to gfar_init_mac()
Anton Vorontsov [Mon, 12 Oct 2009 06:00:36 +0000 (06:00 +0000)]
gianfar: Move tbase/rbase initialization to gfar_init_mac()

For hibernation we want to call gfar_init_mac() without need to
free/allocate_skb_resources sequence, so save the DMA address into a
private struct, and move tbase/rbase initialization to gfar_init_mac().

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agogianfar: Split allocation and initialization steps out of startup_gfar()
Anton Vorontsov [Mon, 12 Oct 2009 06:00:34 +0000 (06:00 +0000)]
gianfar: Split allocation and initialization steps out of startup_gfar()

Two new functions implemented: gfar_alloc_skb_resources() and
gfar_init_mac(). We'll use gfar_init_mac() for restoring after
hibernation.

The patch just moves the code around, there should be no functional
changes.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agogianfar: Don't needlessly set the wrap bit for the last RX BD
Anton Vorontsov [Mon, 12 Oct 2009 06:00:33 +0000 (06:00 +0000)]
gianfar: Don't needlessly set the wrap bit for the last RX BD

startup_gfar() sets the wrap bit for the last rxbd just after
gfar_new_rxbdp() call, which is issued for all rxbds. And
gfar_new_rxbdp() has the following check already:

if (bdp == priv->rx_bd_base + priv->rx_ring_size - 1)
lstatus |= BD_LFLAG(RXBD_WRAP);

So we don't need to set the bit again.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agogianfar: Simplify skb resources freeing code
Anton Vorontsov [Mon, 12 Oct 2009 06:00:30 +0000 (06:00 +0000)]
gianfar: Simplify skb resources freeing code

Remove dma_free_coherent() from stop_gfar() and gfar_start() calls,
place it into free_skb_resources(). That makes SKB resources management
more understandable, plus free_skb_resources() will be used as a cleanup
routine for gfar_alloc_skb_resources() that will be implemented soon.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agogianfar: Some cleanups for startup_gfar()
Anton Vorontsov [Mon, 12 Oct 2009 06:00:26 +0000 (06:00 +0000)]
gianfar: Some cleanups for startup_gfar()

We're going to split the startup_gfar() into 3 separate functions,
so let's cleanup the code a little bit so that cosmetic changes
won't distract attention from logical ones.

- Remove needless casts (e.g. (struct sk_buff **)kmalloc());
- Turn 'unsigned long vaddr;' into 'void *vaddr', to avoid casting;
- Add new 'struct device *dev' variable as a shorthand for
  '&priv->ofdev->dev' that is used all over the place, also rename
  'struct net_device *dev' to 'struct net_device *ndev';
- Turn printk(KERN_ERR ...) to pr_err(...), which is shorter;
- Don't return bogus -1 (i.e. -EPERM) when request_irq() fails;
- Turn '&priv->regs->' to just '&regs->'.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet: Introduce recvmmsg socket syscall
Arnaldo Carvalho de Melo [Tue, 13 Oct 2009 06:40:10 +0000 (23:40 -0700)]
net: Introduce recvmmsg socket syscall

Meaning receive multiple messages, reducing the number of syscalls and
net stack entry/exit operations.

Next patches will introduce mechanisms where protocols that want to
optimize this operation will provide an unlocked_recvmsg operation.

This takes into account comments made by:

. Paul Moore: sock_recvmsg is called only for the first datagram,
  sock_recvmsg_nosec is used for the rest.

. Caitlin Bestler: recvmmsg now has a struct timespec timeout, that
  works in the same fashion as the ppoll one.

  If the underlying protocol returns a datagram with MSG_OOB set, this
  will make recvmmsg return right away with as many datagrams (+ the OOB
  one) it has received so far.

. Rémi Denis-Courmont & Steven Whitehouse: If we receive N < vlen
  datagrams and then recvmsg returns an error, recvmmsg will return
  the successfully received datagrams, store the error and return it
  in the next call.

This paves the way for a subsequent optimization, sk_prot->unlocked_recvmsg,
where we will be able to acquire the lock only at batch start and end, not at
every underlying recvmsg call.

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agocnic: Need to include net/ip6_checksum.h
David S. Miller [Tue, 13 Oct 2009 06:18:35 +0000 (23:18 -0700)]
cnic: Need to include net/ip6_checksum.h

drivers/net/cnic.c: In function 'cnic_init_storm_conn_bufs':
drivers/net/cnic.c:1757: error: implicit declaration of function 'csum_ipv6_magic'

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agopasemi_mac: ethtool set settings support
Valentine Barshak [Mon, 12 Oct 2009 11:25:05 +0000 (04:25 -0700)]
pasemi_mac: ethtool set settings support

Add ethtool set settings to pasemi_mac_ethtool.

Signed-off-by: Valentine Barshak <vbarshak@ru.mvista.com>
Acked-by: Olof Johansson <olof@lixom.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agobe2net: Implement ethtool get_phys_id function.
Sarveshwar Bandi [Mon, 12 Oct 2009 11:23:15 +0000 (04:23 -0700)]
be2net: Implement ethtool get_phys_id function.

Signed-off-by: Sarveshwar Bandi <sarveshwarb@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet: Generalize socket rx gap / receive queue overflow cmsg
Neil Horman [Mon, 12 Oct 2009 20:26:31 +0000 (13:26 -0700)]
net: Generalize socket rx gap / receive queue overflow cmsg

Create a new socket level option to report number of queue overflows

Recently I augmented the AF_PACKET protocol to report the number of frames lost
on the socket receive queue between any two enqueued frames.  This value was
exported via a SOL_PACKET level cmsg.  AFter I completed that work it was
requested that this feature be generalized so that any datagram oriented socket
could make use of this option.  As such I've created this patch, It creates a
new SOL_SOCKET level option called SO_RXQ_OVFL, which when enabled exports a
SOL_SOCKET level cmsg that reports the nubmer of times the sk_receive_queue
overflowed between any two given frames.  It also augments the AF_PACKET
protocol to take advantage of this new feature (as it previously did not touch
sk->sk_drops, which this patch uses to record the overflow count).  Tested
successfully by me.

Notes:

1) Unlike my previous patch, this patch simply records the sk_drops value, which
is not a number of drops between packets, but rather a total number of drops.
Deltas must be computed in user space.

2) While this patch currently works with datagram oriented protocols, it will
also be accepted by non-datagram oriented protocols. I'm not sure if thats
agreeable to everyone, but my argument in favor of doing so is that, for those
protocols which aren't applicable to this option, sk_drops will always be zero,
and reporting no drops on a receive queue that isn't used for those
non-participating protocols seems reasonable to me.  This also saves us having
to code in a per-protocol opt in mechanism.

3) This applies cleanly to net-next assuming that commit
977750076d98c7ff6cbda51858bb5a5894a9d9ab (my af packet cmsg patch) is reverted

Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoRevert "af_packet: add interframe drop cmsg (v6)"
David S. Miller [Mon, 12 Oct 2009 10:00:31 +0000 (03:00 -0700)]
Revert "af_packet: add interframe drop cmsg (v6)"

This reverts commit 977750076d98c7ff6cbda51858bb5a5894a9d9ab.

Neil is reimplementing this generically, outside of AF_PACKET.

Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoipv6 sit: Set relay to 0.0.0.0 directly if relay_prefixlen == 0.
YOSHIFUJI Hideaki / 吉藤英明 [Sun, 11 Oct 2009 03:45:13 +0000 (03:45 +0000)]
ipv6 sit: Set relay to 0.0.0.0 directly if relay_prefixlen == 0.

ipv6 sit: Set relay to 0.0.0.0 directly if relay_prefixlen == 0.

Do not use bit-shift if relay_prefixlen == 0;
relay_prefix << 32 does not result in 0.

Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoipv6 sit: Fix 6rd relay address.
YOSHIFUJI Hideaki / 吉藤英明 [Sun, 11 Oct 2009 03:44:45 +0000 (03:44 +0000)]
ipv6 sit: Fix 6rd relay address.

ipv6 sit: Fix 6rd relay address.

Relay's address should be extracted from real IPv6 address
instead of configured prefix.

Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoipv6 sit: Ensure to initialize 6rd parameters.
YOSHIFUJI Hideaki / 吉藤英明 [Sun, 11 Oct 2009 03:31:34 +0000 (03:31 +0000)]
ipv6 sit: Ensure to initialize 6rd parameters.

ipv6 sit: Ensure to initialize 6rd parameters.

Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agocnic: Add main functions to support bnx2x devices.
Michael Chan [Sat, 10 Oct 2009 13:46:59 +0000 (13:46 +0000)]
cnic: Add main functions to support bnx2x devices.

Add iSCSI support for bnx2x devices.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: Shmulik Ravid - Rabinovitz <shmulikr@broadcom.com>
Acked-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agocnic: Add bnx2x data structures.
Michael Chan [Sat, 10 Oct 2009 13:46:58 +0000 (13:46 +0000)]
cnic: Add bnx2x data structures.

Add hardware and software structures for bnx2x devices.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Acked-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agocnic: Refactor some code.
Michael Chan [Sat, 10 Oct 2009 13:46:57 +0000 (13:46 +0000)]
cnic: Refactor some code.

Refactor ring init. code for subsequent 10G patches.  Also add rtnl_lock()
in cnic_uio_open() to prevent race condition with netdev events.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agobnx2x: Add main CNIC interface functions.
Michael Chan [Sat, 10 Oct 2009 13:46:56 +0000 (13:46 +0000)]
bnx2x: Add main CNIC interface functions.

Add the main CNIC registration, callback, MAC addr. setup functions.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: Shmulik Ravid - Rabinovitz <shmulikr@broadcom.com>
Acked-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agobnx2x: Add hw init code to support iSCSI.
Michael Chan [Sat, 10 Oct 2009 13:46:55 +0000 (13:46 +0000)]
bnx2x: Add hw init code to support iSCSI.

Add code to initialize hardware blocks used for iSCSI.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: Shmulik Ravid - Rabinovitz <shmulikr@broadcom.com>
Acked-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agobnx2x: Refactor MAC address setup code.
Michael Chan [Sat, 10 Oct 2009 13:46:54 +0000 (13:46 +0000)]
bnx2x: Refactor MAC address setup code.

For iSCSI MAC address setup in later patches.

Signed-off-by: Shmulik Ravid - Rabinovitz <shmulikr@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Acked-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agobnx2x: Refactor bnx2x_sp_post().
Michael Chan [Sat, 10 Oct 2009 13:46:53 +0000 (13:46 +0000)]
bnx2x: Refactor bnx2x_sp_post().

Some of the SPQ (slow-path queue) operations will be used
by the cnic code in later patches.

Signed-off-by: Shmulik Ravid - Rabinovitz <shmulikr@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Acked-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoqlge: Add CBFC pause frame counters to ethtool stats.
Ron Mercer [Sat, 10 Oct 2009 09:35:10 +0000 (09:35 +0000)]
qlge: Add CBFC pause frame counters to ethtool stats.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoqlge: Don't fail open when port is not initialized.
Ron Mercer [Sat, 10 Oct 2009 09:35:09 +0000 (09:35 +0000)]
qlge: Don't fail open when port is not initialized.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoqlge: Get rid of firmware handler debug code.
Ron Mercer [Sat, 10 Oct 2009 09:35:08 +0000 (09:35 +0000)]
qlge: Get rid of firmware handler debug code.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoqlge: Remove inline math for small rx buf mapping.
Ron Mercer [Sat, 10 Oct 2009 09:35:07 +0000 (09:35 +0000)]
qlge: Remove inline math for small rx buf mapping.

rx_ring->sbq_buf_len now holds the length of the mapped portion of the
buffer rather than the overall length.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoqlge: Store firmware revision as early as possible.
Ron Mercer [Sat, 10 Oct 2009 09:35:06 +0000 (09:35 +0000)]
qlge: Store firmware revision as early as possible.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoqlge: Add handler for DCBX firmware event.
Ron Mercer [Sat, 10 Oct 2009 09:35:05 +0000 (09:35 +0000)]
qlge: Add handler for DCBX firmware event.

The driver has nothing to do, but this marker prevents the event from
showing up 'not handled'.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoqlge: Set PCIE max read request size.
Ron Mercer [Sat, 10 Oct 2009 09:35:04 +0000 (09:35 +0000)]
qlge: Set PCIE max read request size.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoqlge: Remove explicit setting of PCI Dev CTL reg.
Ron Mercer [Sat, 10 Oct 2009 09:35:03 +0000 (09:35 +0000)]
qlge: Remove explicit setting of PCI Dev CTL reg.

Remove explicit setting of error reporting bits.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoMerge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
David S. Miller [Mon, 12 Oct 2009 06:15:47 +0000 (23:15 -0700)]
Merge branch 'master' of /linux/kernel/git/davem/net-2.6

14 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirel...
David S. Miller [Fri, 9 Oct 2009 21:40:09 +0000 (14:40 -0700)]
Merge branch 'master' of git://git./linux/kernel/git/linville/wireless-next-2.6

14 years agonet: Link in PHY drivers before others.
David S. Miller [Fri, 9 Oct 2009 21:24:36 +0000 (14:24 -0700)]
net: Link in PHY drivers before others.

We need PHY drivers to initialize in a static kernel before
the MAC drivers that use them.  So link them in first.

Based upon a report by Felix Radensky.

Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agowireless: make wireless drivers select core
Johannes Berg [Fri, 9 Oct 2009 16:17:05 +0000 (18:17 +0200)]
wireless: make wireless drivers select core

It is somewhat non-sensical to allow selecting wireless
drivers without showing wireless core code options, and
since the wext refactoring this has made it possible to
generate configurations that will not build. Avoid this
and make wireless drivers select the wireless options.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agolibertas: depend on CONFIG_CFG80211
Holger Schurig [Fri, 9 Oct 2009 07:10:34 +0000 (09:10 +0200)]
libertas: depend on CONFIG_CFG80211

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agolibertas: remove double assignment of dev->netdev_ops
Luis R. Rodriguez [Thu, 8 Oct 2009 20:46:09 +0000 (16:46 -0400)]
libertas: remove double assignment of dev->netdev_ops

This came in through the patch titled:
    libertas: first stab at cfg80211 support

I only noticed it because it breaks compat-wireless :)

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Acked-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k: use right parameter for MODULE_PARM_DESC() for debug
Luis R. Rodriguez [Thu, 8 Oct 2009 05:00:18 +0000 (01:00 -0400)]
ath9k: use right parameter for MODULE_PARM_DESC() for debug

Reported-by: sujith.manoharan@atheros.com
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoixgbe: Fix KR to KX fail over for Mezzanine cards
Don Skidmore [Thu, 8 Oct 2009 15:36:22 +0000 (15:36 +0000)]
ixgbe: Fix KR to KX fail over for Mezzanine cards

This patch allows the recently added backplane device IDs that support KR
to fail over to KX during link setup.  This is accomplished by the new MAC
link setup function ixgbe_setup_mac_link_smartspeed().  Comments were also
updated to better document the reason for the delays chosen for KX, KX4, BX,
BX4 and KR connections.

Signed-off-by: Don Skidmore <don.c.skidmore@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoixgbe: add support for 82599 based Express Module X520-P2
Don Skidmore [Thu, 8 Oct 2009 15:35:58 +0000 (15:35 +0000)]
ixgbe: add support for 82599 based Express Module X520-P2

This patch will add the device ID for the 82599-based Ethernet
Express Module X520-P2 SFI card.

Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com>
Acked-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoibm_newemac: Added 16K Tx FIFO size support for EMAC4
Dave Mitchell [Thu, 8 Oct 2009 06:32:21 +0000 (06:32 +0000)]
ibm_newemac: Added 16K Tx FIFO size support for EMAC4

Some of the EMAC V4 implementations support 16K Tx FIFOs. This
patch adds support for this functionality and fixes typos in the
Tx FIFO size error messages.

Signed-off-by: Dave Mitchell <dmitchell@appliedmicro.com>
Acked-by: Prodyut Hazarika <phazarika@appliedmicro.com>
Acked-by: Victor Gallardo <vgallardo@appliedmicro.com>
Acked-by: Loc Ho <lho@appliedmicro.com>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoqlge: Add disable/enable firmare irqs to handler.
Ron Mercer [Thu, 8 Oct 2009 09:54:43 +0000 (09:54 +0000)]
qlge: Add disable/enable firmare irqs to handler.

This was accidentally omitted from one of the previous patches for firmware event
handling.  The handler needs to the enable firmware irq mask when it's done
processing or it may not get any more events interrupts.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoqlge: Restore rx mode after internal reset.
Ron Mercer [Thu, 8 Oct 2009 09:54:42 +0000 (09:54 +0000)]
qlge: Restore rx mode after internal reset.

Call set_multi API after reset recovery.  This was exposed by tripping
tx_timeout.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoqlge: Fix chip reset process.
Ron Mercer [Thu, 8 Oct 2009 09:54:41 +0000 (09:54 +0000)]
qlge: Fix chip reset process.

Add wait for NIC fifo and MGMNT fifo to empty before applying reset.
Otherwise broken frames can be processed by management processor and
cause it to hang.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoqlge: Fix RX multicast filter settings.
Ron Mercer [Thu, 8 Oct 2009 09:54:40 +0000 (09:54 +0000)]
qlge: Fix RX multicast filter settings.

The addresses were being added to the filter properly, but were not
being enabled.  This adds enable bit to filter write.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoqlge: Fix frame routing for multicast frames.
Ron Mercer [Thu, 8 Oct 2009 09:54:39 +0000 (09:54 +0000)]
qlge: Fix frame routing for multicast frames.

Broadcast/multicast should always be routed to the default (zeroeth) rx
ring.  Broadcast frames are already routed correctly.  This fixes
routing for multicast frames.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoqlge: Fix frame routing issue related to bonding.
Ron Mercer [Thu, 8 Oct 2009 09:54:38 +0000 (09:54 +0000)]
qlge: Fix frame routing issue related to bonding.

Currently frames are routed based on their type and MAC address. This
patch adds the port number on which the frame arrived to the routing.
This prevents problems in the case where both interfaces have the same MAC address in
a routing configuration.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoqlge: Fix RSS hashing values.
Ron Mercer [Thu, 8 Oct 2009 09:54:37 +0000 (09:54 +0000)]
qlge: Fix RSS hashing values.

Fix RX queue table size and change from random to default hash values.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoipv6: Fix the size overflow of addrconf_sysctl array
Jin Dongming [Fri, 9 Oct 2009 05:44:47 +0000 (22:44 -0700)]
ipv6: Fix the size overflow of addrconf_sysctl array

(This patch fixes bug of commit f7734fdf61ec6bb848e0bafc1fb8bad2c124bb50
 title "make TLLAO option for NA packets configurable")

When the IPV6 conf is used, the function sysctl_set_parent is called and the
array addrconf_sysctl is used as a parameter of the function.

The above patch added new conf "force_tllao" into the array addrconf_sysctl,
but the size of the array was not modified, the static allocated size is
DEVCONF_MAX + 1 but the real size is DEVCONF_MAX + 2, so the problem is
that the function sysctl_set_parent accessed wrong address.

I got the following information.
Call Trace:
    [<ffffffff8106085d>] sysctl_set_parent+0x29/0x3e
    [<ffffffff8106085d>] sysctl_set_parent+0x29/0x3e
    [<ffffffff8106085d>] sysctl_set_parent+0x29/0x3e
    [<ffffffff8106085d>] sysctl_set_parent+0x29/0x3e
    [<ffffffff8106085d>] sysctl_set_parent+0x29/0x3e
    [<ffffffff810622d5>] __register_sysctl_paths+0xde/0x272
    [<ffffffff8110892d>] ? __kmalloc_track_caller+0x16e/0x180
    [<ffffffffa00cfac3>] ? __addrconf_sysctl_register+0xc5/0x144 [ipv6]
    [<ffffffff8141f2c9>] register_net_sysctl_table+0x48/0x4b
    [<ffffffffa00cfaf5>] __addrconf_sysctl_register+0xf7/0x144 [ipv6]
    [<ffffffffa00cfc16>] addrconf_init_net+0xd4/0x104 [ipv6]
    [<ffffffff8139195f>] setup_net+0x35/0x82
    [<ffffffff81391f6c>] copy_net_ns+0x76/0xe0
    [<ffffffff8107ad60>] create_new_namespaces+0xf0/0x16e
    [<ffffffff8107afee>] copy_namespaces+0x65/0x9f
    [<ffffffff81056dff>] copy_process+0xb2c/0x12c3
    [<ffffffff810576e1>] do_fork+0x14b/0x2d2
    [<ffffffff8107ac4e>] ? up_read+0xe/0x10
    [<ffffffff81438e73>] ? do_page_fault+0x27a/0x2aa
    [<ffffffff8101044b>] sys_clone+0x28/0x2a
    [<ffffffff81011fb3>] stub_clone+0x13/0x20
    [<ffffffff81011c72>] ? system_call_fastpath+0x16/0x1b

And the information of IPV6 in .config is as following.
IPV6 in .config:
    CONFIG_IPV6=m
    CONFIG_IPV6_PRIVACY=y
    CONFIG_IPV6_ROUTER_PREF=y
    CONFIG_IPV6_ROUTE_INFO=y
    CONFIG_IPV6_OPTIMISTIC_DAD=y
    CONFIG_IPV6_MIP6=m
    CONFIG_IPV6_SIT=m
    # CONFIG_IPV6_SIT_6RD is not set
    CONFIG_IPV6_NDISC_NODETYPE=y
    CONFIG_IPV6_TUNNEL=m
    CONFIG_IPV6_MULTIPLE_TABLES=y
    CONFIG_IPV6_SUBTREES=y
    CONFIG_IPV6_MROUTE=y
    CONFIG_IPV6_PIMSM_V2=y
    # CONFIG_IP_VS_IPV6 is not set
    CONFIG_NF_CONNTRACK_IPV6=m
    CONFIG_IP6_NF_MATCH_IPV6HEADER=m

I confirmed this patch fixes this problem.

Signed-off-by: Jin Dongming <jin.dongming@np.css.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirel...
David S. Miller [Thu, 8 Oct 2009 22:55:21 +0000 (15:55 -0700)]
Merge branch 'master' of git://git./linux/kernel/git/linville/wireless-2.6

14 years agocfg80211: fix netns error unwinding bug
Johannes Berg [Thu, 8 Oct 2009 19:02:02 +0000 (21:02 +0200)]
cfg80211: fix netns error unwinding bug

The error unwinding code in set_netns has a bug
that will make it run into a BUG_ON if passed a
bad wiphy index, fix by not trying to unlock a
wiphy that doesn't exist.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agonetlink: fix typo in initialization
Jiri Pirko [Thu, 8 Oct 2009 08:21:46 +0000 (01:21 -0700)]
netlink: fix typo in initialization

Commit 9ef1d4c7c7aca1cd436612b6ca785b726ffb8ed8 ("[NETLINK]: Missing
initializations in dumped data") introduced a typo in
initialization. This patch fixes this.

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoznet: Don't claim DMA lock around free_dma() calls.
David S. Miller [Thu, 8 Oct 2009 05:15:23 +0000 (22:15 -0700)]
znet: Don't claim DMA lock around free_dma() calls.

It's not necessary and it's illegal too.

Reported-by: Alexander Strakh <strakh@ispras.ru>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agocan: add TI CAN (HECC) driver
Anant Gole [Wed, 7 Oct 2009 02:59:47 +0000 (02:59 +0000)]
can: add TI CAN (HECC) driver

TI HECC (High End CAN Controller) module is found on many TI devices. It
has 32 hardware mailboxes with full implementation of CAN protocol 2.0B
with bus speeds up to 1Mbps. Specifications of the module are available
on TI web <http://www.ti.com>

Signed-off-by: Anant Gole <anantgole@ti.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoixgb: Use the instance of net_device_stats from net_device.
Ajit Khaparde [Wed, 7 Oct 2009 02:46:59 +0000 (02:46 +0000)]
ixgb: Use the instance of net_device_stats from net_device.

Since net_device has an instance of net_device_stats,
we can remove the instance of this from the private adapter structure.

Signed-off-by: Ajit Khaparde <ajitk@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoqlge: Use the instance of net_device_stats from net_device.
Ajit Khaparde [Wed, 7 Oct 2009 02:46:09 +0000 (02:46 +0000)]
qlge: Use the instance of net_device_stats from net_device.

Since net_device has an instance of net_device_stats,
we can remove the instance of this from the private adapter structure.

Signed-off-by: Ajit Khaparde <ajitk@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoe1000: Use the instance of net_device_stats from net_device.
Ajit Khaparde [Wed, 7 Oct 2009 02:42:23 +0000 (02:42 +0000)]
e1000: Use the instance of net_device_stats from net_device.

Since net_device has an instance of net_device_stats,
we can remove the instance of this from the adapter structure.

Signed-off-by: Ajit Khaparde <ajitk@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoigb: Use the instance of net_device_stats from net_device.
Ajit Khaparde [Wed, 7 Oct 2009 02:42:56 +0000 (02:42 +0000)]
igb: Use the instance of net_device_stats from net_device.

Since net_device has an instance of net_device_stats,
we can remove the instance of this from the adapter structure.

Signed-off-by: Ajit Khaparde <ajitk@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoixgbe: Use the instance of net_device_stats from net_device.
Ajit Khaparde [Wed, 7 Oct 2009 02:43:49 +0000 (02:43 +0000)]
ixgbe: Use the instance of net_device_stats from net_device.

Since net_device has an instance of net_device_stats,
we can remove the instance of this from the private adapter structure.

Signed-off-by: Ajit Khaparde <ajitk@serverengines.com>
Acked-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agomyri10ge: Use the instance of net_device_stats from net_device.
Ajit Khaparde [Wed, 7 Oct 2009 02:45:02 +0000 (02:45 +0000)]
myri10ge: Use the instance of net_device_stats from net_device.

Since net_device has an instance of net_device_stats,
we can remove the instance of this from the private myri10ge_priv structure.

Signed-off-by: Ajit Khaparde <ajitk@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonetxen: Use the instance of net_device_stats from net_device.
Ajit Khaparde [Wed, 7 Oct 2009 02:45:34 +0000 (02:45 +0000)]
netxen: Use the instance of net_device_stats from net_device.

Since net_device has an instance of net_device_stats,
we can remove the instance of this from the private adapter structure.

Signed-off-by: Ajit Khaparde <ajitk@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoe1000e: Use the instance of net_device_stats from net_device.
Ajit Khaparde [Wed, 7 Oct 2009 02:44:26 +0000 (02:44 +0000)]
e1000e: Use the instance of net_device_stats from net_device.

Since net_device has an instance of net_device_stats,
we can remove the instance of this from the private adapter structure.

Signed-off-by: Ajit Khaparde <ajitk@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agobridge: Allow enable/disable UFO on bridge device via ethtool
Sridhar Samudrala [Wed, 7 Oct 2009 12:41:17 +0000 (12:41 +0000)]
bridge: Allow enable/disable UFO on bridge device via ethtool

Allow enable/disable UFO on bridge device via ethtool

Signed-off-by: Sridhar Samudrala <sri@us.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet: Make UFO on master device independent of attached devices
Sridhar Samudrala [Wed, 7 Oct 2009 12:24:25 +0000 (12:24 +0000)]
net: Make UFO on master device independent of attached devices

Now that software UFO is supported, UFO can be enabled on master
devices like bridge, bond even though the attached device doesn't
support this feature in hardware.

This allows UFO to be used between KVM host and guest even when a
physical interface attached to the bridge doesn't support UFO.

Signed-off-by: Sridhar Samudrala <sri@us.ibm.com>
Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoudp: dynamically size hash tables at boot time
Eric Dumazet [Wed, 7 Oct 2009 00:37:59 +0000 (00:37 +0000)]
udp: dynamically size hash tables at boot time

UDP_HTABLE_SIZE was initialy defined to 128, which is a bit small for
several setups.

4000 active UDP sockets -> 32 sockets per chain in average. An
incoming frame has to lookup all sockets to find best match, so long
chains hurt latency.

Instead of a fixed size hash table that cant be perfect for every
needs, let UDP stack choose its table size at boot time like tcp/ip
route, using alloc_large_system_hash() helper

Add an optional boot parameter, uhash_entries=x so that an admin can
force a size between 256 and 65536 if needed, like thash_entries and
rhash_entries.

dmesg logs two new lines :
[    0.647039] UDP hash table entries: 512 (order: 0, 4096 bytes)
[    0.647099] UDP Lite hash table entries: 512 (order: 0, 4096 bytes)

Maximal size on 64bit arches would be 65536 slots, ie 1 MBytes for non
debugging spinlocks.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoIPv6: Fix 6RD typo
Alexandre Cassen [Wed, 7 Oct 2009 21:50:30 +0000 (14:50 -0700)]
IPv6: Fix 6RD typo

Following fix a small typo.

Signed-off-by: Alexandre Cassen <acassen@freebox.fr>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoipv4: Define cipso_v4_delopt static
Hagen Paul Pfeifer [Wed, 7 Oct 2009 21:45:58 +0000 (14:45 -0700)]
ipv4: Define cipso_v4_delopt static

There is no reason that cipso_v4_delopt() is not
defined as a static function.

Signed-off-by: Hagen Paul Pfeifer <hagen@jauu.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoeconet: Fix redeclaration of symbol len
Hagen Paul Pfeifer [Wed, 7 Oct 2009 21:43:04 +0000 (14:43 -0700)]
econet: Fix redeclaration of symbol len

Function argument len was redeclarated within the
function. This patch fix the redeclaration of symbol 'len'.

Signed-off-by: Hagen Paul Pfeifer <hagen@jauu.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agobonding: remove useless assignment
Nicolas de Pesloüan [Wed, 7 Oct 2009 21:11:00 +0000 (14:11 -0700)]
bonding: remove useless assignment

The variable old_active is first set to bond->curr_active_slave.
Then, it is unconditionally set to new_active, without being used in between.

The first assignment, having no side effect, is useless.

Signed-off-by: Nicolas de Pesloüan <nicolas.2p.debian@free.fr>
Reviewed-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agobonding: fix a parameter name in error message
Nicolas de Pesloüan [Wed, 7 Oct 2009 21:10:36 +0000 (14:10 -0700)]
bonding: fix a parameter name in error message

When parsing module parameters, bond_check_params() erroneously use
'xor_mode' as the name of a module parameter in an error message.

The right name for this parameter is 'xmit_hash_policy'.

Signed-off-by: Nicolas de Pesloüan <nicolas.2p.debian@free.fr>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoIPv6: use ipv6_addr_set_v4mapped()
Brian Haley [Wed, 7 Oct 2009 20:58:25 +0000 (13:58 -0700)]
IPv6: use ipv6_addr_set_v4mapped()

Might as well use the ipv6_addr_set_v4mapped() inline we created last
year.

Signed-off-by: Brian Haley <brian.haley@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoIPv6: use ipv6_addr_copy() in ip6_route_redirect()
Brian Haley [Wed, 7 Oct 2009 20:58:01 +0000 (13:58 -0700)]
IPv6: use ipv6_addr_copy() in ip6_route_redirect()

Change ip6_route_redirect() to use ipv6_addr_copy().

Signed-off-by: Brian Haley <brian.haley@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoIPv6: Fix 6RD build error
Brian Haley [Wed, 7 Oct 2009 20:57:10 +0000 (13:57 -0700)]
IPv6: Fix 6RD build error

Fix build error introduced in commit fa857afcf - ipv6 sit: 6rd
(IPv6 Rapid Deployment) Support.  Struct in6_addr is the issue.
I'm only seeing this on x86_64 systems, not on 32-bit with same
IPv6 config options, so it could be there's a missing forward
declaration somewhere, but including the correct header file
fixes the problem too.

  CC [M]  net/ipv6/ip6_tunnel.o
In file included from net/ipv6/ip6_tunnel.c:31:
include/linux/if_tunnel.h:59: error: field ‘prefix’ has incomplete type
make[2]: *** [net/ipv6/ip6_tunnel.o] Error 1
make[1]: *** [net/ipv6] Error 2

Signed-off-by: Brian Haley <brian.haley@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet: Add sk_mark route lookup support for IPv4 listening sockets
Atis Elsts [Wed, 7 Oct 2009 20:55:57 +0000 (13:55 -0700)]
net: Add sk_mark route lookup support for IPv4 listening sockets

Add support for route lookup using sk_mark on IPv4 listening sockets.

Signed-off-by: Atis Elsts <atis@mikrotik.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoinclude/linux/netdevice.h: fix nanodoc mismatch
Wolfram Sang [Wed, 7 Oct 2009 20:53:11 +0000 (13:53 -0700)]
include/linux/netdevice.h: fix nanodoc mismatch

nanodoc was missing an ndo_-prefix.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agodccp ccid-3: Remove CCID naming redundancy 2/2
Gerrit Renker [Mon, 5 Oct 2009 00:53:13 +0000 (00:53 +0000)]
dccp ccid-3: Remove CCID naming redundancy 2/2

This continues the previous patch, by applying the same change to CCID-3.

Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
Acked-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agodccp ccid-2: Remove CCID naming redundancy 1/2
Gerrit Renker [Mon, 5 Oct 2009 00:53:12 +0000 (00:53 +0000)]
dccp ccid-2: Remove CCID naming redundancy 1/2

This removes a redundancy in the CCID half-connection (hc) naming scheme:
 * instead of 'hctx->tx_...', write 'hc->tx_...';
 * instead of 'hcrx->rx_...', write 'hc->rx_...';

which works because the 'type' of the half-connection is encoded in the
'rx_' / 'tx_' prefixes.

Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
Acked-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agodccp ccid-3: Overhaul CCID naming convention 2/2
Gerrit Renker [Mon, 5 Oct 2009 00:53:11 +0000 (00:53 +0000)]
dccp ccid-3: Overhaul CCID naming convention 2/2

This implements the new naming scheme also for CCID-3.

Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
Acked-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agodccp ccid-2: Overhaul CCID naming convention 1/2
Gerrit Renker [Mon, 5 Oct 2009 00:53:10 +0000 (00:53 +0000)]
dccp ccid-2: Overhaul CCID naming convention 1/2

This patch starts a less problematic naming convention for CCID structs.

The old naming convention used 'hc{tx,rx}->ccid?hc{tx,rx}->...' as
recurring prefixes, which made the code
 * hard to write (not easy to fit into 80 characters);
 * hard to read  (most of the space is occupied by prefixes).

The new naming scheme:
 * struct entries for the TX socket are prefixed by 'tx_';
 * and those for the RX socket are prefixed by 'rx_'.

The identifiers then remain distinguishable when grep-ing through the tree:
 (a) RX/TX sockets are distinguished by the naming scheme,
 (b) individual CCIDs are distinguished by filename (ccid{2,3,4}.{c,h}).

This first patch implements the scheme for CCID-2.

Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
Acked-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>