GitHub/exynos8895/android_kernel_samsung_universal8895.git
13 years agoigb: Add messaging for thermal sensor events on i350 devices
Carolyn Wyborny [Sat, 12 Mar 2011 08:59:47 +0000 (08:59 +0000)]
igb: Add messaging for thermal sensor events on i350 devices

This feature adds messaging to the link status change to notify
the user if the device returned from a downshift or power off
event due to the Thermal Sensor feature in i350 parts. Feature
is only available on internal copper ports.

Signed-off-by: Carolyn Wyborny <carolyn.wyborny@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoigb: fix hw timestamping
Anders Berggren [Fri, 4 Feb 2011 07:32:32 +0000 (07:32 +0000)]
igb: fix hw timestamping

Hardware timestamping for Intel 82580 didn't work in either 2.6.36 or
2.6.37. Comparing it to Intel's igb-2.4.12 I found that the
timecounter_init clock/counter initialization was done too early.

Signed-off-by: Anders Berggren <andfers@halon.se>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agonet: dcbnl: Add IEEE app selector value definitions
Mark Rustad [Mon, 14 Mar 2011 09:01:15 +0000 (09:01 +0000)]
net: dcbnl: Add IEEE app selector value definitions

This adds defines for the app selector values currently
defined in the IEEE 802.1Qaz specification.

Signed-off-by: Mark Rustad <mark.d.rustad@intel.com>
Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: dcbnl: Fix misspellings
Mark Rustad [Mon, 14 Mar 2011 09:01:08 +0000 (09:01 +0000)]
net: dcbnl: Fix misspellings

Fix a few spelling errors in dcbnl.h.

Signed-off-by: Mark Rustad <mark.d.rustad@intel.com>
Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: dcbnl: Update copyright dates
Mark Rustad [Mon, 14 Mar 2011 09:01:02 +0000 (09:01 +0000)]
net: dcbnl: Update copyright dates

Signed-off-by: Mark Rustad <mark.d.rustad@intel.com>
Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agofcoe: correct checking for bonding
Jiri Pirko [Tue, 1 Mar 2011 20:05:35 +0000 (20:05 +0000)]
fcoe: correct checking for bonding

Check for bonding master and refuse to use that.

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Acked-by: Robert Love <robert.w.love@intel.com>
Acked-by: James Bottomley <James.Bottomley@suse.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoCS89x0: Add networking support for QQ2440
Domenico Andreoli [Mon, 14 Mar 2011 03:47:07 +0000 (03:47 +0000)]
CS89x0: Add networking support for QQ2440

QQ2440 is only another non-ISA board using CS89x0. This patch adds the
minimum bits required to make QQ2440 work with CS89x0.

Signed-off-by: Domenico Andreoli <cavokz@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoCS89x0: Finish transition to CS89x0_NONISA_IRQ
Domenico Andreoli [Mon, 14 Mar 2011 03:46:53 +0000 (03:46 +0000)]
CS89x0: Finish transition to CS89x0_NONISA_IRQ

CS89x0_NONISA_IRQ is selected by all those non-ISA boards which use
CS89x0. This patch only cleans the last bits left after its introduction.

Signed-off-by: Domenico Andreoli <cavokz@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoftmac100: use GFP_ATOMIC allocations where needed
Eric Dumazet [Mon, 14 Mar 2011 22:40:39 +0000 (15:40 -0700)]
ftmac100: use GFP_ATOMIC allocations where needed

When running in softirq context, we should use GFP_ATOMIC allocations
instead of GFP_KERNEL ones.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Tested-by: Po-Yu Chuang <ratbert@faraday-tech.com>
Acked-by: Po-Yu Chuang <ratbert@faraday-tech.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoqeth: change some configurations defaults
Frank Blaschka [Mon, 14 Mar 2011 22:39:47 +0000 (15:39 -0700)]
qeth: change some configurations defaults

This patch turns on RX checksum and GRO by default. To improve
receiving performance and reduce congestion in case of network
bursts we also increase the default number of inbound buffers.

Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobe2net: changes for BE3 native mode support
Sathya Perla [Fri, 11 Mar 2011 02:49:26 +0000 (02:49 +0000)]
be2net: changes for BE3 native mode support

So far be2net has been using BE3 in legacy mode. It now checks for native
 mode capability and if available it sets it. In native mode, the RX_COMPL
 structure is different from that in legacy mode.

Signed-off-by: Sathya Perla <sathya.perla@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonetxen: Notify firmware of Flex-10 interface down
Sony Chacko [Thu, 10 Mar 2011 23:50:02 +0000 (23:50 +0000)]
netxen: Notify firmware of Flex-10 interface down

Notify firmware when a Flex-10 interface is brought down
so that virtual connect manager can display the correct link status.

Signed-off-by: Sony Chacko <sony.chacko@qlogic.com>
Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agophylib: SIOCGMIIREG/SIOCSMIIREG: allow access to all mdio addresses
Peter Korsgaard [Thu, 10 Mar 2011 06:52:13 +0000 (06:52 +0000)]
phylib: SIOCGMIIREG/SIOCSMIIREG: allow access to all mdio addresses

phylib would silently ignore the phy_id argument to these ioctls and
perform the read/write with the active phydev address, whereas most
non-phylib drivers seem to allow access to all mdio addresses
(E.G. pcnet_cs).

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobnx2: Update firmware and version
Michael Chan [Mon, 14 Mar 2011 22:00:12 +0000 (15:00 -0700)]
bnx2: Update firmware and version

Update 5709 mips firmware to 6.2.1a to fix iSCSI performance
regression.  There was an unnecessary context read in the fast path
affecting performance.

Update bnx2 to 2.1.6.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoenic: Support newer version of firmware devcmd CMD_MCPU_FW_INFO
Vasanthy Kolluri [Tue, 8 Mar 2011 15:35:30 +0000 (15:35 +0000)]
enic: Support newer version of firmware devcmd CMD_MCPU_FW_INFO

This patch provides support to the newer version of firmware devcmd CMD_MCPU_FW_INFO
that returns additional information (ASIC type and revision) about the underlying hardware.
This knowledge is required by the driver to implement any hardware specific features.

Signed-off-by: Vasanthy Kolluri <vkolluri@cisco.com>
Signed-off-by: Roopa Prabhu <roprabhu@cisco.com>
Signed-off-by: David Wang <dwang2@cisco.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobridge: control carrier based on ports online
stephen hemminger [Mon, 7 Mar 2011 08:34:06 +0000 (08:34 +0000)]
bridge: control carrier based on ports online

This makes the bridge device behave like a physical device.
In earlier releases the bridge always asserted carrier. This
changes the behavior so that bridge device carrier is on only
if one or more ports are in the forwarding state. This
should help IPv6 autoconfiguration, DHCP, and routing daemons.

I did brief testing with Network and Virt manager and they
seem fine, but since this changes behavior of bridge, it should
wait until net-next (2.6.39).

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Reviewed-by: Nicolas de Pesloüan <nicolas.2p.debian@free.fr>
Tested-By: Adam Majer <adamm@zombino.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agodrivers/net: fix build warnings with CONFIG_PM_SLEEP disabled
Michel Lespinasse [Sun, 6 Mar 2011 16:14:50 +0000 (16:14 +0000)]
drivers/net: fix build warnings with CONFIG_PM_SLEEP disabled

This fixes a couple of build warnings when CONFIG_PM is enabled but
CONFIG_PM_SLEEP is disabled. Applies on top of v2.6.38-rc7 - I know it's
late, but it would be great if v2.6.38 could compile without warnings!

Signed-off-by: Michel Lespinasse <walken@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: sh_eth: add set_mdio_gate in bb_info
Yoshihiro Shimoda [Mon, 7 Mar 2011 21:59:55 +0000 (21:59 +0000)]
net: sh_eth: add set_mdio_gate in bb_info

The SH7757's ETHER and GETHER use common MDIO pin. The MDIO pin is
selected by specific register. So this patch adds new interface in
bb_info, and when the sh_eth driver use the mdio, the register can
be changed by the function.

Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: sh_eth: add support for SH7757's GETHER
Yoshihiro Shimoda [Mon, 7 Mar 2011 21:59:49 +0000 (21:59 +0000)]
net: sh_eth: add support for SH7757's GETHER

The SH7757 have GETHER and ETHER both. This patch supports them.

Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: sh_eth: modify the PHY_INTERFACE_MODE
Yoshihiro Shimoda [Mon, 7 Mar 2011 21:59:45 +0000 (21:59 +0000)]
net: sh_eth: modify the PHY_INTERFACE_MODE

The previous code had hardcoded the PHY_INTERFACE_MODE_MII of phy_connect.
So some Gigabit PHYs will not behave correctly.
The patch adds the phy_interface in sh_eth_plat_data, so we can select
the phy interface.

Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: sh_eth: remove almost #ifdef of SH7763
Yoshihiro Shimoda [Mon, 7 Mar 2011 21:59:38 +0000 (21:59 +0000)]
net: sh_eth: remove almost #ifdef of SH7763

The SH7763 has GETHER. So the specification of some registers differs than
other CPUs. This patch removes almost #ifdef of CONFIG_CPU_SUBTYPE_SH7763.
Then we are able to add other CPU's GETHER easily.

Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: sh_eth: remove the SH_TSU_ADDR
Yoshihiro Shimoda [Mon, 7 Mar 2011 21:59:34 +0000 (21:59 +0000)]
net: sh_eth: remove the SH_TSU_ADDR

The defination is hardcoded in this driver for some CPUs. This patch
modifies to get resource of TSU address from platform_device.

Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: sh_eth: modify the definitions of register
Yoshihiro Shimoda [Mon, 7 Mar 2011 21:59:26 +0000 (21:59 +0000)]
net: sh_eth: modify the definitions of register

The previous code cannot handle the ETHER and GETHER both as same time
because the definitions of register was hardcoded.

Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoMerge branch 'tipc-Mar14-2011' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg...
David S. Miller [Mon, 14 Mar 2011 20:49:53 +0000 (13:49 -0700)]
Merge branch 'tipc-Mar14-2011' of git://git./linux/kernel/git/paulg/net-next-2.6

13 years agopktgen: bug fix in transmission headers with frags=0
Daniel Turull [Mon, 14 Mar 2011 20:47:40 +0000 (13:47 -0700)]
pktgen: bug fix in transmission headers with frags=0

(bug introduced by commit 26ad787962ef84677a48c560
(pktgen: speedup fragmented skbs)

The headers of pktgen were incorrectly added in a pktgen packet
without frags (frags=0). There was an offset in the pktgen headers.

The cause was in reusing the pgh variable as a return variable in skb_put
when adding the payload to the skb.

Signed-off-by: Daniel Turull <daniel.turull@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
13 years agotipc: delete extra semicolon blocking node deletion
Paul Gortmaker [Mon, 14 Mar 2011 16:03:44 +0000 (12:03 -0400)]
tipc: delete extra semicolon blocking node deletion

Remove bogus semicolon only recently introduced in 34e46258cb9f5
that blocks cleanup of nodes for N>1 on shutdown.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agoinetpeer: should use call_rcu() variant
Eric Dumazet [Mon, 14 Mar 2011 06:22:23 +0000 (23:22 -0700)]
inetpeer: should use call_rcu() variant

After commit 7b46ac4e77f3224a (inetpeer: Don't disable BH for initial
fast RCU lookup.), we should use call_rcu() to wait proper RCU grace
period.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoxfrm: Add user interface for esn and big anti-replay windows
Steffen Klassert [Tue, 8 Mar 2011 00:10:27 +0000 (00:10 +0000)]
xfrm: Add user interface for esn and big anti-replay windows

This patch adds a netlink based user interface to configure
esn and big anti-replay windows. The new netlink attribute
XFRMA_REPLAY_ESN_VAL is used to configure the new implementation.
If the XFRM_STATE_ESN flag is set, we use esn and support for big
anti-replay windows for the configured state. If this flag is not
set we use the new implementation with 32 bit sequence numbers.
A big anti-replay window can be configured in this case anyway.

Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoxfrm: Add support for IPsec extended sequence numbers
Steffen Klassert [Tue, 8 Mar 2011 00:09:51 +0000 (00:09 +0000)]
xfrm: Add support for IPsec extended sequence numbers

This patch adds support for IPsec extended sequence numbers (esn)
as defined in RFC 4303. The bits to manage the anti-replay window
are based on a patch from Alex Badea.

Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoxfrm: Support anti-replay window size bigger than 32 packets
Steffen Klassert [Tue, 8 Mar 2011 00:09:09 +0000 (00:09 +0000)]
xfrm: Support anti-replay window size bigger than 32 packets

As it is, the anti-replay bitmap in struct xfrm_replay_state can
only accomodate 32 packets. Even though it is possible to configure
anti-replay window sizes up to 255 packets from userspace. So we
reject any packet with a sequence number within the configured window
but outside the bitmap. With this patch, we represent the anti-replay
window as a bitmap of variable length that can be accessed via the
new struct xfrm_replay_state_esn. Thus, we have no limit on the
window size anymore. To use the new anti-replay window implementantion,
new userspace tools are required. We leave the old implementation
untouched to stay in sync with old userspace tools.

Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoxfrm: Move IPsec replay detection functions to a separate file
Steffen Klassert [Tue, 8 Mar 2011 00:08:32 +0000 (00:08 +0000)]
xfrm: Move IPsec replay detection functions to a separate file

To support multiple versions of replay detection, we move the replay
detection functions to a separate file and make them accessible
via function pointers contained in the struct xfrm_replay.

Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoesp6: Add support for IPsec extended sequence numbers
Steffen Klassert [Tue, 8 Mar 2011 00:07:51 +0000 (00:07 +0000)]
esp6: Add support for IPsec extended sequence numbers

This patch adds IPsec extended sequence numbers support to esp6.
We use the authencesn crypto algorithm to handle esp with separate
encryption/authentication algorithms.

Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoesp4: Add support for IPsec extended sequence numbers
Steffen Klassert [Tue, 8 Mar 2011 00:07:14 +0000 (00:07 +0000)]
esp4: Add support for IPsec extended sequence numbers

This patch adds IPsec extended sequence numbers support to esp4.
We use the authencesn crypto algorithm to handle esp with separate
encryption/authentication algorithms.

Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoxfrm: Use separate low and high order bits of the sequence numbers in xfrm_skb_cb
Steffen Klassert [Tue, 8 Mar 2011 00:06:31 +0000 (00:06 +0000)]
xfrm: Use separate low and high order bits of the sequence numbers in xfrm_skb_cb

To support IPsec extended sequence numbers, we split the
output sequence numbers of xfrm_skb_cb in low and high order 32 bits
and we add the high order 32 bits to the input sequence numbers.
All users are updated accordingly.

Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoxfrm: Add basic infrastructure to support IPsec extended sequence numbers
Steffen Klassert [Tue, 8 Mar 2011 00:05:43 +0000 (00:05 +0000)]
xfrm: Add basic infrastructure to support IPsec extended sequence numbers

This patch adds the struct xfrm_replay_state_esn which will be
used to support IPsec extended sequence numbers and anti replay windows
bigger than 32 packets. Also we add a function that returns the actual
size of the xfrm_replay_state_esn, a xfrm netlink atribute and a xfrm state
flag for the use of extended sequence numbers.

Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agocrypto: authencesn - Add algorithm to handle IPsec extended sequence numbers
Steffen Klassert [Tue, 8 Mar 2011 00:04:58 +0000 (00:04 +0000)]
crypto: authencesn - Add algorithm to handle IPsec extended sequence numbers

ESP with separate encryption/authentication algorithms needs a special
treatment for the associated data. This patch add a new algorithm that
handles esp with extended sequence numbers.

Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoMerge branch 'tipc-Mar13-2011' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg...
David S. Miller [Mon, 14 Mar 2011 01:49:11 +0000 (18:49 -0700)]
Merge branch 'tipc-Mar13-2011' of git://git./linux/kernel/git/paulg/net-next-2.6

13 years agoipv4: Fix PMTU update.
Hiroaki SHIMODA [Wed, 9 Mar 2011 20:09:58 +0000 (20:09 +0000)]
ipv4: Fix PMTU update.

On current net-next-2.6, when Linux receives ICMP Type: 3, Code: 4
(Destination unreachable (Fragmentation needed)),

  icmp_unreach
    -> ip_rt_frag_needed
         (peer->pmtu_expires is set here)
    -> tcp_v4_err
         -> do_pmtu_discovery
              -> ip_rt_update_pmtu
                   (peer->pmtu_expires is already set,
                    so check_peer_pmtu is skipped.)
                   -> check_peer_pmtu

check_peer_pmtu is skipped and MTU is not updated.

To fix this, let check_peer_pmtu execute unconditionally.
And some minor fixes
1) Avoid potential peer->pmtu_expires set to be zero.
2) In check_peer_pmtu, argument of time_before is reversed.
3) check_peer_pmtu expects peer->pmtu_orig is initialized as zero,
   but not initialized.

Signed-off-by: Hiroaki SHIMODA <shimoda.hiroaki@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agotipc: Update maintenance information
Allan Stephens [Sun, 13 Mar 2011 20:44:07 +0000 (15:44 -0500)]
tipc: Update maintenance information

Updates TIPC maintenance information to reflect changes that have
taken place during TIPC 2.0 development, including:

- removal of directories that have been deleted
- removal of websites that have been decommisioned
- removal of sidestream SCM repositories that are no longer used
- addition of netdev as appropriate list for kernel code.

Grateful acknowledgement is given to Joe Perches <joe@perches.com>,
who reported the stale file entry that triggered the update.

Signed-off-by: Allan Stephens <Allan.Stephens@windriver.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agotipc: Eliminate obsolete routine for handling routed messages
Allan Stephens [Fri, 11 Mar 2011 18:22:53 +0000 (13:22 -0500)]
tipc: Eliminate obsolete routine for handling routed messages

Eliminates a routine that is used in handling messages arriving from
another cluster or zone. Such messages can no longer be received by TIPC
now that multi-cluster and multi-zone network support has been eliminated.

Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agotipc: Eliminate remaining support for routing table messages
Allan Stephens [Fri, 11 Mar 2011 18:09:28 +0000 (13:09 -0500)]
tipc: Eliminate remaining support for routing table messages

Gets rid of all remaining code relating to ROUTE_DISTRIBUTOR messages.
These messages were only used in multi-cluster and multi-zone networks,
which TIPC no longer supports. (For safety, TIPC now treats such messages
the same way that it handles other unrecognized messages.)

Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agotipc: Remove bearer flag indicating existence of broadcast address
Allan Stephens [Mon, 28 Feb 2011 16:47:36 +0000 (11:47 -0500)]
tipc: Remove bearer flag indicating existence of broadcast address

Eliminates the flag in the TIPC bearer structure that indicates if
the bearer supports broadcasting, since the flag is always set to 1
and serves no useful purpose.

Signed-off-by: Allan Stephens <Allan.Stephens@windriver.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agotipc: Don't respond to neighbor discovery request on blocked bearer
Allan Stephens [Mon, 28 Feb 2011 16:04:08 +0000 (11:04 -0500)]
tipc: Don't respond to neighbor discovery request on blocked bearer

Adds a check to prevent TIPC from trying to respond to an incoming
LINK_CONFIG request message if the associated bearer is currently
prohibited from sending messages.

Signed-off-by: Allan Stephens <Allan.Stephens@windriver.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agotipc: Eliminate unnecessary constant for neighbor discovery msg size
Allan Stephens [Mon, 28 Feb 2011 21:02:30 +0000 (16:02 -0500)]
tipc: Eliminate unnecessary constant for neighbor discovery msg size

Eliminates an unnecessary constant that defines the size of a LINK_CONFIG
message, and uses one of the existing standard message size symbols in
its place. (The defunct constant was located in the wrong place anyway,
since it was grouped with other constants that define message users instead
of message sizes.)

Signed-off-by: Allan Stephens <Allan.Stephens@windriver.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agotipc: Remove unused field in bearer structure
Allan Stephens [Mon, 28 Feb 2011 20:03:22 +0000 (15:03 -0500)]
tipc: Remove unused field in bearer structure

Eliminates a field in TIPC's bearer objects that is set, but never
referenced.

Signed-off-by: Allan Stephens <Allan.Stephens@windriver.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agotipc: Correct misnamed references to neighbor discovery domain
Allan Stephens [Mon, 28 Feb 2011 19:56:15 +0000 (14:56 -0500)]
tipc: Correct misnamed references to neighbor discovery domain

Renames items that are improperly labelled as "network scope" items
(which are represented by simple integer values) rather than "network
domain" items (which are represented by <Z.C.N>-type network addresses).
This change is purely cosmetic, and does not affect the operation of TIPC.

Signed-off-by: Allan Stephens <Allan.Stephens@windriver.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agotipc: Optimizations to link creation code
Allan Stephens [Mon, 28 Feb 2011 16:32:27 +0000 (11:32 -0500)]
tipc: Optimizations to link creation code

Enhances link creation code as follows:

1) Detects illegal attempts to add a requested link earlier in the
   link creation process. This prevents TIPC from wasting time
   initializing a link object it then throws away, and also eliminates
   the code needed to do the throwing away.

2) Passes in the node object associated with the requested link.
   This allows TIPC to eliminate a search to locate the node object,
   as well as code that attempted to create the node if it doesn't
   exist.

Signed-off-by: Allan Stephens <Allan.Stephens@windriver.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agotipc: Give Tx of discovery responses priority over link messages
Allan Stephens [Mon, 28 Feb 2011 15:56:23 +0000 (10:56 -0500)]
tipc: Give Tx of discovery responses priority over link messages

Delay releasing the node lock when processing a neighbor discovery
message until after the optional discovery response message has been
sent. This helps ensure that any link protocol messages sent by a
link endpoint created as a result of a neighbor discovery request
are received after the discovery response is received, thereby
giving the receiving node a chance to create a peer link endpoint to
consume those link protocol messages, if one does not already exist.

Signed-off-by: Allan Stephens <Allan.Stephens@windriver.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agotipc: Cosmetic changes to neighbor discovery logic
Allan Stephens [Mon, 28 Feb 2011 15:03:05 +0000 (10:03 -0500)]
tipc: Cosmetic changes to neighbor discovery logic

Reworks the appearance of the routine that processes incoming
LINK_CONFIG messages to keep the main logic flow at a consistent level
of indentation, and to add comments outlining the various phases involved
in processing each message. This rework is being done to allow upcoming
enhancements to this routine to be integrated more cleanly.

The diff isn't really readable, so know that it was a case of the
old code being like:

tipc_disc_recv_msg(..)
{
if (in_own_cluster(orig)) {
...
lines and lines of stuff
...
}
}

which is now replaced with the more sane:

tipc_disc_recv_msg(..)
{
if (!in_own_cluster(orig))
return;
...
lines and lines of stuff
...
}

Instances of spin locking within the reindented block were replaced with
the identical tipc_node_[un]lock() abstractions.  Note that all these
changes are cosmetic in nature, and do not change the way LINK_CONFIG
messages are processed.

Signed-off-by: Allan Stephens <Allan.Stephens@windriver.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agotipc: Fix redundant link field handling in link protocol message
Allan Stephens [Mon, 28 Feb 2011 20:30:20 +0000 (15:30 -0500)]
tipc: Fix redundant link field handling in link protocol message

Ensures that the "redundant link exists" field of the LINK_PROTOCOL
messages sent by a link endpoint is set if and only if the sending
node has at least one other working link to the peer node. Previously,
the bit was set only if there were at least 2 working links to the peer
node, meaning the bit was incorrectly left unset in messages sent by a
non-working link endpoint when exactly one alternate working link was
available. The revised code now takes the state of the link sending
the message into account when deciding if an alternate link exists.

Signed-off-by: Allan Stephens <Allan.Stephens@windriver.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agotipc: make msg_set_redundant_link() consistent with other set ops
Allan Stephens [Mon, 28 Feb 2011 20:30:20 +0000 (15:30 -0500)]
tipc: make msg_set_redundant_link() consistent with other set ops

All the other boolean like msg_set_X(m) operations don't
export both a msg_set_X(a) and a msg_clear_X(m), but instead
just have the single msg_set_X(m, val) variant.

Make the redundant_link one consistent by having the set take
a value, and delete the msg_clear_redundant_link() anomoly.
This is a cosmetic change and should not change behaviour.

Signed-off-by: Allan Stephens <Allan.Stephens@windriver.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agotipc: cosmetic - function names are not to be full sentences
Paul Gortmaker [Mon, 28 Feb 2011 15:36:21 +0000 (11:36 -0400)]
tipc: cosmetic - function names are not to be full sentences

Function names like "tipc_node_has_redundant_links" are unweildy
and result in long lines even for simple lines.  The "has" doesn't
contribute any value add, so dropping that is a slight step in the
right direction.   This is a cosmetic change, basic result of:

for i in `grep -l tipc_node_has_ *` ; do sed -i s/tipc_node_has_/tipc_node_/ $i ; done

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agotipc: Eliminate timestamp from link protocol messages
Allan Stephens [Sun, 27 Feb 2011 19:43:52 +0000 (14:43 -0500)]
tipc: Eliminate timestamp from link protocol messages

Removes support for the timestamp field of TIPC's link protocol messages.

This field was previously used to hold an OS-dependent timestamp value
that was used to assist in debugging early versions of TIPC. The field
has now been deemed unnecessary and has been removed from the latest TIPC
specification. This change has no impact on the operation of TIPC since
the field was set by TIPC, but never referenced.

Signed-off-by: Allan Stephens <Allan.Stephens@windriver.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agotipc: manually inline net_start/stop, make assoc. vars static
Allan Stephens [Sat, 26 Feb 2011 00:11:25 +0000 (19:11 -0500)]
tipc: manually inline net_start/stop, make assoc. vars static

Relocates network-related variables into the subsystem files where
they are now primarily used (following the recent rework of TIPC's
node table), and converts globals into locals where possible. Changes
the initialization of tipc_num_links from run-time to compile-time,
and eliminates the net_start routine that becomes empty as a result.
Also eliminates the corresponding net_stop routine by moving its
(trivial) content into the one location that called the routine.

Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agotipc: Convert node object array to a hash table
Allan Stephens [Fri, 25 Feb 2011 23:42:52 +0000 (18:42 -0500)]
tipc: Convert node object array to a hash table

Replaces the dynamically allocated array of pointers to the cluster's
node objects with a static hash table. Hash collisions are resolved
using chaining, with a typical hash chain having only a single node,
to avoid degrading performance during processing of incoming packets.
The conversion to a hash table reduces the memory requirements for
TIPC's node table to approximately the same size it had prior to
the previous commit.

In addition to the hash table itself, TIPC now also maintains a
linked list for the node objects, sorted by ascending network address.
This list allows TIPC to continue sending responses to user space
applications that request node and link information in sorted order.
The list also improves performance when name table update messages are
sent by making it easier to identify the nodes that must be notified.

Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agotipc: Eliminate configuration for maximum number of cluster nodes
Allan Stephens [Fri, 25 Feb 2011 19:22:11 +0000 (14:22 -0500)]
tipc: Eliminate configuration for maximum number of cluster nodes

Gets rid of the need for users to specify the maximum number of
cluster nodes supported by TIPC. TIPC now automatically provides
support for all 4K nodes allowed by its addressing scheme.

Note: This change sets TIPC's memory usage to the amount used by
a maximum size node table with 4K entries.  An upcoming patch that
converts the node table from a linear array to a hash table will
compact the node table to a more efficient design, but for clarity
it is nice to have all the Kconfig infrastruture go away separately.

Signed-off-by: Allan Stephens <Allan.Stephens@windriver.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agotipc: Split up unified structure of network-related variables
Allan Stephens [Fri, 25 Feb 2011 15:01:58 +0000 (10:01 -0500)]
tipc: Split up unified structure of network-related variables

Converts the fields of the global "tipc_net" structure into individual
variables.  Since the struct was never referenced as a complete unit,
its existence was pointless.  This will facilitate upcoming changes to
TIPC's node table and simpify upcoming relocation of the variables so
they are only visible to the files that actually use them.

This change is essentially cosmetic in nature, and doesn't affect the
operation of TIPC.

Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agotipc: Fix problem with missing link in "tipc-config -l" output
Allan Stephens [Thu, 24 Feb 2011 18:20:20 +0000 (13:20 -0500)]
tipc: Fix problem with missing link in "tipc-config -l" output

Removes a race condition that could cause TIPC's internal counter
of the number of links it has to neighboring nodes to have the
incorrect value if two independent threads of control simultaneously
create new link endpoints connecting to two different nodes using two
different bearers. Such under counting would result in TIPC failing to
list the final link(s) in its response to a configuration request to
list all of the node's links. The counter is now updated atomically
to ensure that simultaneous increments do not interfere with each
other.

Thanks go to Peter Butler <pbutler@pt.com> for his assistance in
diagnosing and fixing this problem.

Signed-off-by: Allan Stephens <Allan.Stephens@windriver.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agotipc: Add support for SO_RCVTIMEO socket option
Allan Stephens [Wed, 23 Feb 2011 19:52:14 +0000 (14:52 -0500)]
tipc: Add support for SO_RCVTIMEO socket option

Adds support for the SO_RCVTIMEO socket option to TIPC's socket
receive routines.

Thanks go out to Raj Hegde <rajenhegde@yahoo.ca> for his contribution
to the development and testing this enhancement.

Signed-off-by: Allan Stephens <Allan.Stephens@windriver.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agotipc: Cosmetic changes to node subscription code
Allan Stephens [Wed, 23 Feb 2011 19:13:41 +0000 (14:13 -0500)]
tipc: Cosmetic changes to node subscription code

Relocates the code that notifies users of node subscriptions so that
it is adjacent to the rest of the routines that implement TIPC's node
subscription capability. Renames the name table routine that is
invoked by a node subscription to better reflect its purpose and to
be consistent with other, similar name table routines.

These changes are cosmetic in nature, and do not alter the behavior
of TIPC.

Signed-off-by: Allan Stephens <Allan.Stephens@windriver.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agotipc: Prevent null pointer error when removing a node subscription
Allan Stephens [Wed, 23 Feb 2011 18:51:15 +0000 (13:51 -0500)]
tipc: Prevent null pointer error when removing a node subscription

Prevents a null pointer dereference from occurring if a node subscription
is triggered at the same time that the subscribing port or publication is
terminating the subscription. The problem arises if the triggering routine
asynchronously activates and deregisters the node subscription while
deregistration is already underway -- the deregistration routine may find
that the pointer it has just verified to be non-NULL is now NULL.
To avoid this race condition the triggering routine now simply marks the
node subscription as defunct (to prevent it from re-activating)
instead of deregistering it. The subscription is now both deregistered
and destroyed only when the subscribing port or publication code terminates
the node subscription.

Signed-off-by: Allan Stephens <Allan.Stephens@windriver.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agotipc: Add network address mask helper routines
Allan Stephens [Wed, 23 Feb 2011 16:44:49 +0000 (11:44 -0500)]
tipc: Add network address mask helper routines

Introduces a pair of helper routines that convert the network address
for a TIPC node into the network address for its cluster or zone.

This is a cosmetic change designed to avoid future errors caused by
the incorrect use of address bitmasks, and does not alter the existing
operation of TIPC.

Signed-off-by: Allan Stephens <Allan.Stephens@windriver.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agotipc: Correct broadcast link peer info when displaying links
Allan Stephens [Mon, 21 Feb 2011 14:45:31 +0000 (09:45 -0500)]
tipc: Correct broadcast link peer info when displaying links

Fixes a typo in the calculation of the network address of a node's own
cluster when generating a response to the configuration command that
lists all of the node's links. The correct mask value for a <Z.C.N>
network address uses 1's for the 8-bit zone and 12-bit cluster parts
and 0's for the 12-bit node part.

Signed-off-by: Allan Stephens <Allan.Stephens@windriver.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agotipc: Allow receiving into iovec containing multiple entries
Allan Stephens [Mon, 21 Feb 2011 14:45:40 +0000 (09:45 -0500)]
tipc: Allow receiving into iovec containing multiple entries

Enhances TIPC's socket receive routines to support iovec structures
containing more than a single entry. This change leverages existing
sk_buff routines to do most of the work; the only significant change
to TIPC itself is that an sk_buff now records how much data has been
already consumed as an numeric offset, rather than as a pointer to
the first unread data byte.

Signed-off-by: Allan Stephens <Allan.Stephens@windriver.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agodecnet: Convert to use flowidn where applicable.
David S. Miller [Sat, 12 Mar 2011 22:17:10 +0000 (17:17 -0500)]
decnet: Convert to use flowidn where applicable.

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: Put fl6_* macros to struct flowi6 and use them again.
David S. Miller [Sat, 12 Mar 2011 21:36:19 +0000 (16:36 -0500)]
net: Put fl6_* macros to struct flowi6 and use them again.

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoipv6: Convert to use flowi6 where applicable.
David S. Miller [Sat, 12 Mar 2011 21:22:43 +0000 (16:22 -0500)]
ipv6: Convert to use flowi6 where applicable.

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: Put fl4_* macros to struct flowi4 and use them again.
David S. Miller [Sat, 12 Mar 2011 08:00:33 +0000 (03:00 -0500)]
net: Put fl4_* macros to struct flowi4 and use them again.

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoipv4: Kill fib_semantic_match declaration from fib_lookup.h
David S. Miller [Sat, 12 Mar 2011 07:44:16 +0000 (02:44 -0500)]
ipv4: Kill fib_semantic_match declaration from fib_lookup.h

This function no longer exists.

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: Use flowi4 and flowi6 in xfrm layer.
David S. Miller [Sat, 12 Mar 2011 07:42:11 +0000 (02:42 -0500)]
net: Use flowi4 and flowi6 in xfrm layer.

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: Add flowi6_* member helper macros.
David S. Miller [Sat, 12 Mar 2011 07:30:50 +0000 (02:30 -0500)]
net: Add flowi6_* member helper macros.

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonetfilter: Use flowi4 and flowi6 in xt_TCPMSS
David S. Miller [Sat, 12 Mar 2011 07:16:48 +0000 (02:16 -0500)]
netfilter: Use flowi4 and flowi6 in xt_TCPMSS

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonetfilter: Use flowi4 and flowi6 in nf_conntrack_h323_main
David S. Miller [Sat, 12 Mar 2011 07:14:05 +0000 (02:14 -0500)]
netfilter: Use flowi4 and flowi6 in nf_conntrack_h323_main

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoipv4: Use flowi4 in UDP
David S. Miller [Sat, 12 Mar 2011 07:09:18 +0000 (02:09 -0500)]
ipv4: Use flowi4 in UDP

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonetfilter: Use flowi4 in nf_nat_standalone.c
David S. Miller [Sat, 12 Mar 2011 07:06:33 +0000 (02:06 -0500)]
netfilter: Use flowi4 in nf_nat_standalone.c

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoipv4: Use flowi4 in ipmr code.
David S. Miller [Sat, 12 Mar 2011 07:04:50 +0000 (02:04 -0500)]
ipv4: Use flowi4 in ipmr code.

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoipv4: Use flowi4 in FIB layer.
David S. Miller [Sat, 12 Mar 2011 07:02:42 +0000 (02:02 -0500)]
ipv4: Use flowi4 in FIB layer.

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoipv4: Use flowi4 in public route lookup interfaces.
David S. Miller [Sat, 12 Mar 2011 06:12:47 +0000 (01:12 -0500)]
ipv4: Use flowi4 in public route lookup interfaces.

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoipv4: Use struct flowi4 internally in routing lookups.
David S. Miller [Sat, 12 Mar 2011 01:07:33 +0000 (20:07 -0500)]
ipv4: Use struct flowi4 internally in routing lookups.

We will change the externally visible APIs next.

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoipv4: Pass ipv4 flow objects into fib_lookup() paths.
David S. Miller [Sat, 12 Mar 2011 00:54:08 +0000 (19:54 -0500)]
ipv4: Pass ipv4 flow objects into fib_lookup() paths.

To start doing these conversions, we need to add some temporary
flow4_* macros which will eventually go away when all the protocol
code paths are changed to work on AF specific flowi objects.

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: Add flowiX_to_flowi() shorthands.
David S. Miller [Sat, 12 Mar 2011 00:23:02 +0000 (19:23 -0500)]
net: Add flowiX_to_flowi() shorthands.

This is just a shorthand which will help in passing around AF
specific flow structures as generic ones.

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: Break struct flowi out into AF specific instances.
David S. Miller [Sat, 12 Mar 2011 05:44:35 +0000 (00:44 -0500)]
net: Break struct flowi out into AF specific instances.

Now we have struct flowi4, flowi6, and flowidn for each address
family.  And struct flowi is just a union of them all.

It might have been troublesome to convert flow_cache_uli_match() but
as it turns out this function is completely unused and therefore can
be simply removed.

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: Make flowi ports AF dependent.
David S. Miller [Sat, 12 Mar 2011 05:43:55 +0000 (00:43 -0500)]
net: Make flowi ports AF dependent.

Create two sets of port member accessors, one set prefixed by fl4_*
and the other prefixed by fl6_*

This will let us to create AF optimal flow instances.

It will work because every context in which we access the ports,
we have to be fully aware of which AF the flowi is anyways.

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: Create union flowi_uli
David S. Miller [Fri, 11 Mar 2011 23:36:42 +0000 (18:36 -0500)]
net: Create union flowi_uli

This will be used when we have seperate flowi types.

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: Create struct flowi_common
David S. Miller [Fri, 11 Mar 2011 23:22:00 +0000 (18:22 -0500)]
net: Create struct flowi_common

Pull out the AF independent members of struct flowi into a
new struct flowi_common

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: Put flowi_* prefix on AF independent members of struct flowi
David S. Miller [Sat, 12 Mar 2011 05:29:39 +0000 (00:29 -0500)]
net: Put flowi_* prefix on AF independent members of struct flowi

I intend to turn struct flowi into a union of AF specific flowi
structs.  There will be a common structure that each variant includes
first, much like struct sock_common.

This is the first step to move in that direction.

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoxfrm: Eliminate "fl" and "pol" args to xfrm_bundle_ok().
David S. Miller [Fri, 11 Mar 2011 20:59:31 +0000 (15:59 -0500)]
xfrm: Eliminate "fl" and "pol" args to xfrm_bundle_ok().

There is only one caller of xfrm_bundle_ok(), and that always passes these
parameters as NULL.

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: Remove unnecessary padding in struct flowi
David S. Miller [Fri, 11 Mar 2011 20:55:37 +0000 (15:55 -0500)]
net: Remove unnecessary padding in struct flowi

Move tos, scope, proto, and flags to the beginning of
the structure.

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoipv4: Create and use route lookup helpers.
David S. Miller [Sat, 12 Mar 2011 05:00:52 +0000 (00:00 -0500)]
ipv4: Create and use route lookup helpers.

The idea here is this minimizes the number of places one has to edit
in order to make changes to how flows are defined and used.

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoMerge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/jkirsher/net...
David S. Miller [Sat, 12 Mar 2011 22:41:02 +0000 (14:41 -0800)]
Merge branch 'master' of /linux/kernel/git/jkirsher/net-next-2.6

13 years agoMerge branch 'for-davem' of git://git.kernel.org/pub/scm/linux/kernel/git/linville...
David S. Miller [Sat, 12 Mar 2011 19:06:59 +0000 (11:06 -0800)]
Merge branch 'for-davem' of git://git./linux/kernel/git/linville/wireless-next-2.6

13 years agoixgbe: DCB, PFC not cleared until reset occurs
John Fastabend [Thu, 10 Mar 2011 12:06:12 +0000 (12:06 +0000)]
ixgbe: DCB, PFC not cleared until reset occurs

The PFC configuration is not cleared until the device is reset. This
has not been a problem because setting DCB attributes forced a
hardware reset. Now that we no longer require this reset to occur
PFC remains configured even after being disabled until the
device is reset.

This removes a goto in the PFC hardware set routines for 82598 and
82599 devices that was short circuiting the clear.

Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
Tested-by: Ross Brattain <ross.b.brattain@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoixgbe: add support for VF Transmit rate limit using iproute2
Lior Levy [Fri, 11 Mar 2011 02:03:07 +0000 (02:03 +0000)]
ixgbe: add support for VF Transmit rate limit using iproute2

Implemented ixgbe_ndo_set_vf_bw function which is being used by iproute2
tool. In addition, updated ixgbe_ndo_get_vf_config function to show the
actual rate limit to the user.

The rate limitation can be configured only when the link is up and the
link speed is 10Gb.
The rate limit value can be 0 or ranged between 11 and actual link
speed measured in Mbps. A value of '0' disables the rate limit for
this specific VF.

iproute2 usage will be 'ip link set ethX vf Y rate Z'.
After the command is made, the rate will be changed instantly.
To view the current rate limit, use 'ip link show ethX'.

The rates will be zeroed only upon driver reload or a link speed change.

This feature is being supported by 82599 and X540 devices.

Signed-off-by: Lior Levy <lior.levy@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoixgbe: DCB, set minimum bandwidth per traffic class
John Fastabend [Wed, 9 Mar 2011 04:46:16 +0000 (04:46 +0000)]
ixgbe: DCB, set minimum bandwidth per traffic class

DCB provides a guaranteed bandwidth in the case with 0%
bandwidth then no bandwidth is guaranteed. However the
traffic class should still be able to transmit traffic.
For this to work the traffic class must be given the
minimum credits required to send a frame.

Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
Tested-by: Ross Brattain <ross.b.brattain@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoixgbe: correct typo in define name
Emil Tantilov [Sat, 5 Mar 2011 08:02:18 +0000 (08:02 +0000)]
ixgbe: correct typo in define name

VF Free Running Timer register name missing an F.

Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com>
Acked-by: Greg Rose <gregory.v.rose@intel.com>
Tested-by: Evan Swanson <evan.swanson@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoixgbe: update PHY code to support 100Mbps as well as 1G/10G
Emil Tantilov [Sat, 5 Mar 2011 01:28:07 +0000 (01:28 +0000)]
ixgbe: update PHY code to support 100Mbps as well as 1G/10G

This change updates the PHY setup code to support 100Mbps capable PHYs
as well as 10G and 1Gbps.

Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com>
Tested-by: Stephen Ko <stephen.s.ko@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoixgbe: remove timer reset to 0 on timeout
Emil Tantilov [Fri, 4 Mar 2011 03:20:59 +0000 (03:20 +0000)]
ixgbe: remove timer reset to 0 on timeout

The VF mailbox polling for acks and messages would reset the timer to zero
on a timeout. Under heavy load a timeout may actually occur without being
the result of an error and when this occurs it is not practical to perform
a full VF driver reset on every message timeout. Instead, just return an
error (which is already done) and the VF driver will have an opportunity
to retry the operation.

Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com>
Acked-by: Greg Rose <gregory.v.rose@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoixgbe: DCB during ifup use correct CEE or IEEE mode
John Fastabend [Wed, 23 Feb 2011 05:58:25 +0000 (05:58 +0000)]
ixgbe: DCB during ifup use correct CEE or IEEE mode

DCB settings are cleared in the hardware across link events
during ifup ixgbe reprograms the hardware for DCB if it is
enabled. Now that we have two modes CEE or IEEE we need to
use the correct set of configuration data.

This patch checks the dcbx_cap bits and then enables the
device in the correct mode.

Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
Tested-by: Ross Brattain <ross.b.brattain@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoixgbe: IEEE 802.1Qaz, implement priority assignment table
John Fastabend [Wed, 23 Feb 2011 05:58:19 +0000 (05:58 +0000)]
ixgbe: IEEE 802.1Qaz, implement priority assignment table

This patch adds support to use the priority assignment
table in the ieee_ets structure to map priorities to
traffic classes. Previously ixgbe only supported a
1:1 mapping. Now we can enable and disable hardware
DCB support when multiple traffic classes are actually
being used. This allows the default case all priorities
mapped to traffic class 0 to work in normal hardware
mode and utilize the full packet buffer.

This patch does not address putting the hardware in
4TC mode so packet buffer space may be underutilized
in this case. A follow up patch can address this
optimization. But at least we have the hooks to do
this now.

Also CEE will behave as it always has and map priorities
1:1 with traffic classes.

Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
Tested-by: Ross Brattain <ross.b.brattain@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoixgbe: DCB, missed translation from 8021Qaz TSA to CEE link strict
John Fastabend [Wed, 23 Feb 2011 05:58:14 +0000 (05:58 +0000)]
ixgbe: DCB, missed translation from 8021Qaz TSA to CEE link strict

The patch below  allowed IEEE 802.1Qaz and CEE DCB hardware
configurations to use common hardware set routines,

commit 88eb696cc6a7af8f9272266965b1a4dd7d6a931b
Author: John Fastabend <john.r.fastabend@intel.com>
Date:   Thu Feb 10 03:02:11 2011 -0800

    ixgbe: DCB, abstract out dcb_config from DCB hardware configuration

However the case when CEE link strict and group strict
are set was missed and are currently being mapped
incorrectly in some configurations.

This patch resolves this.

Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
Tested-by: Ross Brattain <ross.b.brattain@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>