pandora-kernel.git
13 years agonetem: cleanup dump code
stephen hemminger [Wed, 23 Feb 2011 13:04:17 +0000 (13:04 +0000)]
netem: cleanup dump code

Use nla_put_nested to update netlink attribute value.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
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 [Fri, 25 Feb 2011 00:29:00 +0000 (16:29 -0800)]
Merge branch 'master' of /linux/kernel/git/jkirsher/net-next-2.6

13 years agoipv4: Rearrange how ip_route_newports() gets port keys.
David S. Miller [Thu, 24 Feb 2011 21:38:12 +0000 (13:38 -0800)]
ipv4: Rearrange how ip_route_newports() gets port keys.

ip_route_newports() is the only place in the entire kernel that
cares about the port members in the routing cache entry's lookup
flow key.

Therefore the only reason we store an entire flow inside of the
struct rtentry is for this one special case.

Rewrite ip_route_newports() such that:

1) The caller passes in the original port values, so we don't need
   to use the rth->fl.fl_ip_{s,d}port values to remember them.

2) The lookup flow is constructed by hand instead of being copied
   from the routing cache entry's flow.

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoigb: update version string
Carolyn Wyborny [Wed, 16 Feb 2011 05:09:46 +0000 (05:09 +0000)]
igb: update version string

This will synchronize the version with the out of tree driver which
shares its functionality.

Signed-off-by: Carolyn Wyborny <carolyn.wyborny@intel.com>
Tested-by: Jeff Pieper <jeffrey.e.pieper@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoigb: Update Intel copyright notice for driver source.
Carolyn Wyborny [Thu, 17 Feb 2011 09:02:30 +0000 (09:02 +0000)]
igb: Update Intel copyright notice for driver source.

This fix updates copyright information to include current year 2011.

Signed-off-by: Carolyn Wyborny <carolyn.wyborny@intel.com>
Tested-by: Jeff Pieper <jeffrey.e.pieper@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoigb: add support for VF Transmit rate limit using iproute2
Lior Levy [Tue, 8 Feb 2011 02:28:46 +0000 (02:28 +0000)]
igb: add support for VF Transmit rate limit using iproute2

Implemented igb_ndo_set_vf_bw function which is being used
by iproute2 tool. In addition, updated igb_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.
The rate limit value can be ranged between 0 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 only by 82576 device.

Signed-off-by: Lior Levy <lior.levy@intel.com>
Tested-by: Jeff Pieper <jeffrey.e.pieper@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoigbvf: remove Tx hang detection
Lior Levy [Fri, 11 Feb 2011 03:38:04 +0000 (03:38 +0000)]
igbvf: remove Tx hang detection

Removed Tx hang detection mechanism from igbvf.
This mechanism has no affect and can cause false alarm message in some cases.

Signed-off-by: Lior Levy <lior.levy@intel.com>
Tested-by: Jeff Pieper <jeffrey.e.pieper@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoixgbevf: Fix name of function in function header comment
Greg Rose [Thu, 3 Feb 2011 06:54:13 +0000 (06:54 +0000)]
ixgbevf: Fix name of function in function header comment

Some of the function names in function header comments did not match
actual name of the function.

Signed-off-by: Greg Rose <gregory.v.rose@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoixgbevf: Enable jumbo frame support for X540 VF
Greg Rose [Wed, 26 Jan 2011 01:06:12 +0000 (01:06 +0000)]
ixgbevf: Enable jumbo frame support for X540 VF

The X540 controller allows jumbo frame setup on a per VF basis.  Enable
use of jumbo frames when the VF device belongs to the X540 controller.

Signed-off-by: Greg Rose <gregory.v.rose@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoixgbe: Enable Jumbo Frames on the X540 10Gigabit Controller
Greg Rose [Wed, 26 Jan 2011 01:06:07 +0000 (01:06 +0000)]
ixgbe: Enable Jumbo Frames on the X540 10Gigabit Controller

The X540 controller supports jumbo frames in SR-IOV mode.  Allow
configuration of jumbo frames either in the PF driver or on behalf of
a VF.

Signed-off-by: Greg Rose <gregory.v.rose@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoxfrm: Const'ify xfrm_address_t args to xfrm_state_find.
David S. Miller [Thu, 24 Feb 2011 06:55:45 +0000 (01:55 -0500)]
xfrm: Const'ify xfrm_address_t args to xfrm_state_find.

This required a const'ification in xfrm_init_tempstate() too.

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoxfrm: Remove unused 'saddr' and 'daddr' args to xfrm_state_look_at.
David S. Miller [Thu, 24 Feb 2011 06:53:13 +0000 (01:53 -0500)]
xfrm: Remove unused 'saddr' and 'daddr' args to xfrm_state_look_at.

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoxfrm: Const'ify xfrm_address_t args to __xfrm_state_lookup{,_byaddr}.
David S. Miller [Thu, 24 Feb 2011 06:51:36 +0000 (01:51 -0500)]
xfrm: Const'ify xfrm_address_t args to __xfrm_state_lookup{,_byaddr}.

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoxfrm: Const'ify xfrm_tmpl arg to xfrm_init_tempstate.
David S. Miller [Thu, 24 Feb 2011 06:50:12 +0000 (01:50 -0500)]
xfrm: Const'ify xfrm_tmpl arg to xfrm_init_tempstate.

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoxfrm: Const'ify xfrm_address_t args to xfrm_*_hash.
David S. Miller [Thu, 24 Feb 2011 06:47:16 +0000 (01:47 -0500)]
xfrm: Const'ify xfrm_address_t args to xfrm_*_hash.

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoxfrm: Const'ify sec_path arg to secpath_has_nontransport.
David S. Miller [Thu, 24 Feb 2011 06:44:12 +0000 (01:44 -0500)]
xfrm: Const'ify sec_path arg to secpath_has_nontransport.

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoxfrm: Const'ify ptr args to xfrm_policy_ok.
David S. Miller [Thu, 24 Feb 2011 06:43:33 +0000 (01:43 -0500)]
xfrm: Const'ify ptr args to xfrm_policy_ok.

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoxfrm: Const'ify ptr args to xfrm_state_ok.
David S. Miller [Thu, 24 Feb 2011 06:43:01 +0000 (01:43 -0500)]
xfrm: Const'ify ptr args to xfrm_state_ok.

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoxfrm: Const'ify ptr args to xfrm_state_*_check and xfrm_state_kern.
David S. Miller [Thu, 24 Feb 2011 06:42:28 +0000 (01:42 -0500)]
xfrm: Const'ify ptr args to xfrm_state_*_check and xfrm_state_kern.

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoxfrm: Const'ify xfrm_tmpl and xfrm_state args to xfrm_state_addr_cmp.
David S. Miller [Thu, 24 Feb 2011 06:35:16 +0000 (01:35 -0500)]
xfrm: Const'ify xfrm_tmpl and xfrm_state args to xfrm_state_addr_cmp.

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoxfrm: Const'ify selector arg to xfrm_dst_update_parent.
David S. Miller [Thu, 24 Feb 2011 06:32:54 +0000 (01:32 -0500)]
xfrm: Const'ify selector arg to xfrm_dst_update_parent.

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoxfrm: Const'ify policy arg to clone_policy.
David S. Miller [Thu, 24 Feb 2011 06:25:41 +0000 (01:25 -0500)]
xfrm: Const'ify policy arg to clone_policy.

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoxfrm: Const'ify policy arg to xp_net.
David S. Miller [Thu, 24 Feb 2011 06:25:19 +0000 (01:25 -0500)]
xfrm: Const'ify policy arg to xp_net.

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoxfrm: Const'ify policy arg and local selector in xfrm_policy_match.
David S. Miller [Thu, 24 Feb 2011 06:23:30 +0000 (01:23 -0500)]
xfrm: Const'ify policy arg and local selector in xfrm_policy_match.

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoxfrm: Const'ify local xfrm_address_t pointers in xfrm_policy_lookup_bytype.
David S. Miller [Thu, 24 Feb 2011 06:22:48 +0000 (01:22 -0500)]
xfrm: Const'ify local xfrm_address_t pointers in xfrm_policy_lookup_bytype.

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoxfrm: Const'ify selector args in xfrm_migrate paths.
David S. Miller [Thu, 24 Feb 2011 05:35:06 +0000 (00:35 -0500)]
xfrm: Const'ify selector args in xfrm_migrate paths.

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoxfrm: Const'ify address args to hash helpers.
David S. Miller [Thu, 24 Feb 2011 05:33:19 +0000 (00:33 -0500)]
xfrm: Const'ify address args to hash helpers.

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoxfrm: Const'ify pointer args to km_migrate() and implementations.
David S. Miller [Thu, 24 Feb 2011 05:28:01 +0000 (00:28 -0500)]
xfrm: Const'ify pointer args to km_migrate() and implementations.

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoxfrm: Const'ify pointer args to migrate_tmpl_match and xfrm_migrate_check
David S. Miller [Thu, 24 Feb 2011 05:21:08 +0000 (00:21 -0500)]
xfrm: Const'ify pointer args to migrate_tmpl_match and xfrm_migrate_check

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoxfrm: Const'ify address argument to xfrm_addr_any()
David S. Miller [Thu, 24 Feb 2011 05:19:59 +0000 (00:19 -0500)]
xfrm: Const'ify address argument to xfrm_addr_any()

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoxfrm: Const'ify address arguments to xfrm_addr_cmp()
David S. Miller [Thu, 24 Feb 2011 05:19:13 +0000 (00:19 -0500)]
xfrm: Const'ify address arguments to xfrm_addr_cmp()

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoxfrm: Const'ify address arguments to __xfrm_dst_lookup()
David S. Miller [Thu, 24 Feb 2011 05:16:53 +0000 (00:16 -0500)]
xfrm: Const'ify address arguments to __xfrm_dst_lookup()

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoxfrm: Const'ify address arguments to ->dst_lookup()
David S. Miller [Thu, 24 Feb 2011 05:14:45 +0000 (00:14 -0500)]
xfrm: Const'ify address arguments to ->dst_lookup()

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoxfrm: Const'ify selector argument to xfrm_selector_match()
David S. Miller [Thu, 24 Feb 2011 05:12:25 +0000 (00:12 -0500)]
xfrm: Const'ify selector argument to xfrm_selector_match()

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoxfrm: Const'ify tmpl and address arguments to ->init_temprop()
David S. Miller [Thu, 24 Feb 2011 05:07:20 +0000 (00:07 -0500)]
xfrm: Const'ify tmpl and address arguments to ->init_temprop()

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoxfrm: Pass km_event pointers around as const when possible.
David S. Miller [Thu, 24 Feb 2011 05:02:38 +0000 (00:02 -0500)]
xfrm: Pass km_event pointers around as const when possible.

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoMerge branch 'tipc-Feb23-2011' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg...
David S. Miller [Thu, 24 Feb 2011 04:47:56 +0000 (20:47 -0800)]
Merge branch 'tipc-Feb23-2011' of git://git./linux/kernel/git/paulg/net-next-2.6

13 years agotipc: Avoid reliable broadcast preparation for NACK messages
Allan Stephens [Tue, 25 Jan 2011 21:12:39 +0000 (16:12 -0500)]
tipc: Avoid reliable broadcast preparation for NACK messages

Enhance TIPC to skip unnecessary (and, in some cases, redundant)
preparation work when sending a broadcast link NACK message, since this
preparation is only required for broadcast messages that are sent in a
reliable manner. This change also fixes a bug that caused NACK messages
to be improperly counted as "TX packets" in TIPC's broadcast link
statistics.

Signed-off-by: Allan Stephens <Allan.Stephens@windriver.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agotipc: Remove unused message header field for requested number of links
Allan Stephens [Tue, 25 Jan 2011 19:39:59 +0000 (14:39 -0500)]
tipc: Remove unused message header field for requested number of links

Eliminates support for the "number of requested links" field in a neighbor
discovery message. This field was never used and has been removed from
the TIPC 2.0 protocol specification.

Signed-off-by: Allan Stephens <Allan.Stephens@windriver.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agotipc: Remove support for per-connection message sequence numbering
Allan Stephens [Tue, 25 Jan 2011 18:33:31 +0000 (13:33 -0500)]
tipc: Remove support for per-connection message sequence numbering

Eliminates TIPC's prototype support for message sequence numbering
on routable connections (i.e. connections requiring more than one hop).
This capability isn't currently used, and can be removed since TIPC
only supports systems in which all inter-node communication can be
achieved in a single hop.

Signed-off-by: Allan Stephens <Allan.Stephens@windriver.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agotipc: Add in missing lock during link initialization
Allan Stephens [Mon, 24 Jan 2011 21:22:43 +0000 (16:22 -0500)]
tipc: Add in missing lock during link initialization

Ensure that the routine that starts up processing on a newly created
link endpoint takes the spinlock of the node object that owns the link,
to prevent possible conflicts with processing involving other links
owned by that node object.

Signed-off-by: Allan Stephens <Allan.Stephens@windriver.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agotipc: Fix port counter handling to correct congestion control
Allan Stephens [Mon, 24 Jan 2011 20:02:14 +0000 (15:02 -0500)]
tipc: Fix port counter handling to correct congestion control

Modifies TIPC's congestion control between a connected port and its
peer so that it works as documented. The following changes have been
made:

1) The counter of the number of messages sent by a port now starts
   at zero, rather than one. This prevents the port from reporting port
   congestion one message earlier than it was supposed to.

2) The counter of the number of messages sent by a port is now
   incremented only if a non-empty message is sent successfully.
   This prevents the port from becoming permanently congested if
   too many send attempts are unsuccessful because of congestion
   (or other reasons). It also removes the risk that empty hand-
   shaking messages used during connection setup might cause the
   port to report congestion earlier than it was supposed to.

3) The counter of the number of unacknowledged messages received by
   a port controlled by an internal TIPC service is now incremented
   only if the message is non-empty, in order to be consistent with
   the aforementioned changes.

Signed-off-by: Allan Stephens <Allan.Stephens@windriver.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agotipc: Minor optimization to topology service connection establishment
Allan Stephens [Fri, 21 Jan 2011 14:45:33 +0000 (09:45 -0500)]
tipc: Minor optimization to topology service connection establishment

Eliminates a local iovec structure containing no data, which was
previously used during the establishment of a topology service connection,
since the same effect can be achieved by passing in a NULL pointer and
an iovec length of zero.

Signed-off-by: Allan Stephens <Allan.Stephens@windriver.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agotipc: Set unused probe field of link protocol messages to defined value
Allan Stephens [Tue, 18 Jan 2011 20:15:34 +0000 (15:15 -0500)]
tipc: Set unused probe field of link protocol messages to defined value

Ensures that a link reset or activate message has a "probe" field
of zero. (This field is currently unused in these messages, but this
could potentially change in future versions of TIPC.)

Signed-off-by: Allan Stephens <Allan.Stephens@windriver.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agotipc: Improve accuracy of link transmit queue maximum size statistic
Allan Stephens [Tue, 18 Jan 2011 20:02:50 +0000 (15:02 -0500)]
tipc: Improve accuracy of link transmit queue maximum size statistic

Enhances TIPC's unicast and broadcast link code to update the transmit
queue maximum size counter in a single place, namely the routine that
adds messages to the queue. This ensures that the maximum size statistic
reported for unicast links is completely accurate, rather than being
partially based on statistical sampling.

The changes to link.h are just documenting the roles of the variables.

Signed-off-by: Allan Stephens <Allan.Stephens@windriver.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agotipc: Eliminate unnecessary locking when starting topology service
Allan Stephens [Tue, 18 Jan 2011 18:58:27 +0000 (13:58 -0500)]
tipc: Eliminate unnecessary locking when starting topology service

Modifies the initialization code for TIPC's topology service to
avoid taking the spinlock protecting the subscriber list, since
there is no need to do this.

Signed-off-by: Allan Stephens <Allan.Stephens@windriver.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agotipc: Clean up tracking of node requesting a broadcast retransmit
Allan Stephens [Tue, 18 Jan 2011 18:53:16 +0000 (13:53 -0500)]
tipc: Clean up tracking of node requesting a broadcast retransmit

Allows the broadcast link to track the node that is requesting a retransmit
in a new field dedicated to that purpose. This replaces the existing
mechanism that (ab)uses an existing node structure linked list field to do
the tracking.

Signed-off-by: Allan Stephens <Allan.Stephens@windriver.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agotipc: Clean out all remaining instances of #if 0'd unused code
Allan Stephens [Tue, 18 Jan 2011 18:37:09 +0000 (13:37 -0500)]
tipc: Clean out all remaining instances of #if 0'd unused code

Remove all instances of legacy or proposed-but-not-implemented code
that lives within an #if 0 ... #endif block.  If some of it is needed
in the future it can recovered out of history, but there is no need
for it to clutter up the active code base.

Signed-off-by: Allan Stephens <Allan.Stephens@windriver.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agotipc: Fix print statements that assume pointers are 32-bit values
Allan Stephens [Tue, 18 Jan 2011 18:31:32 +0000 (13:31 -0500)]
tipc: Fix print statements that assume pointers are 32-bit values

Corrects print statements that use %x to print pointer values to use
%p instead, so that 64-bit pointer values are displayed correctly.

Signed-off-by: Allan Stephens <Allan.Stephens@windriver.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agotipc: Improve handling of invalid link tolerance values
Allan Stephens [Tue, 18 Jan 2011 18:24:55 +0000 (13:24 -0500)]
tipc: Improve handling of invalid link tolerance values

Enhances TIPC link code to ignore an invalid link tolerance value
contained in an incoming LINK_PROTOCOL message, rather than
processing the value and potentially causing a divide-by-zero error.

Also add a compile-time check that catches attempts to redefine
TIPC's minimum link tolerance value in a manner that might result
in the same divide-by-zero error at run-time.

Signed-off-by: Allan Stephens <Allan.Stephens@windriver.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agotipc: Prevent invalid memory access when sending to configuration service
Allan Stephens [Tue, 18 Jan 2011 18:09:29 +0000 (13:09 -0500)]
tipc: Prevent invalid memory access when sending to configuration service

Reject TIPC configuration service messages without a full message
header.  Previously, an application that sent a message to the
configuration service that was too short could cause the validation
code to access an uninitialized field in the msghdr structure,
resulting in a memory access exception.

Signed-off-by: Allan Stephens <Allan.Stephens@windriver.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agotipc: Remove unused global variable tipc_user_count
Allan Stephens [Fri, 7 Jan 2011 18:12:12 +0000 (13:12 -0500)]
tipc: Remove unused global variable tipc_user_count

Eliminates a global variable that was previously used by TIPC's user
registry to track the number of distinct applications using TIPC. Due to
the recent elimination of the user registry this variable no longer serves
any purpose and can be removed.

Signed-off-by: Allan Stephens <Allan.Stephens@windriver.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agotipc: Combine bearer structure with tipc_bearer structure
Allan Stephens [Fri, 7 Jan 2011 18:00:11 +0000 (13:00 -0500)]
tipc: Combine bearer structure with tipc_bearer structure

Combines two distinct structures containing information about a TIPC bearer
into a single structure. The structures were previously kept separate so
that public information about a bearer could be made available to plug-in
media types using TIPC's native API, while the remaining information was
kept private for use by TIPC itself. However, now that the native API has
been removed there is no longer any need for this arrangement.

Since one of the structures was already embedded within the other, the
change largely involves replacing instances of "publ.foo" with "foo".
The changes do not otherwise alter the operation of TIPC bearers.

Signed-off-by: Allan Stephens <Allan.Stephens@windriver.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agotipc: Combine port structure with tipc_port structure
Allan Stephens [Fri, 7 Jan 2011 16:43:40 +0000 (11:43 -0500)]
tipc: Combine port structure with tipc_port structure

Merge two distinct structures containing information about a TIPC port
into a single structure. The structures were previously kept separate
so that public information about a port could be made available to
applications using TIPC's native API, while the remaining information
was kept private for use by TIPC itself. However, now that the native
API has been removed there is no longer any need for this somewhat
confusing arrangement.

Since one of the structures was already embedded within the other, the
change largely involves replacing instances of "publ.foo" with "foo".
The changes do not otherwise alter the operation of TIPC ports.

Signed-off-by: Allan Stephens <Allan.Stephens@windriver.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agoqlcnic: Remove validation for max tx and max rx queues
Rajesh Borundia [Wed, 23 Feb 2011 03:21:25 +0000 (03:21 +0000)]
qlcnic: Remove validation for max tx and max rx queues

Max rx queues and tx queues are governed by fimware.
So driver should not validate these values.

Signed-off-by: Rajesh Borundia <rajesh.borundia@qlogic.com>
Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoqlcnic: fix checks for auto_fw_reset
amit salecha [Wed, 23 Feb 2011 03:21:24 +0000 (03:21 +0000)]
qlcnic: fix checks for auto_fw_reset

o Remove checks of 1 for auto_fw_reset module parameter.
  auto_fw_reset is of type int and can have value > 1.
o Remove unnecessary #define for 1

Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: Implement SFEATURES compatibility for not updated drivers
Michał Mirosław [Tue, 22 Feb 2011 16:52:29 +0000 (16:52 +0000)]
net: Implement SFEATURES compatibility for not updated drivers

Use discrete setting ops for not updated drivers. This will not make
them conform to full G/SFEATURES semantics, though.

Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: Fix ETHTOOL_GFEATURES compatibility
Michał Mirosław [Tue, 22 Feb 2011 16:52:28 +0000 (16:52 +0000)]
net: Fix ETHTOOL_GFEATURES compatibility

Implement getting rx checksum state for not updated drivers.

Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: avoid initial "Features changed" message
Michał Mirosław [Tue, 22 Feb 2011 16:52:28 +0000 (16:52 +0000)]
net: avoid initial "Features changed" message

Avoid "Features changed" message and ndo_set_features call on device
registration caused by automatic enabling of GSO and GRO. Driver should
have enabled hardware offloads it set in features, so the ndo_set_features()
is not needed at registration time.

Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoFix "(unregistered net_device): Features changed" message
Michał Mirosław [Tue, 22 Feb 2011 16:52:28 +0000 (16:52 +0000)]
Fix "(unregistered net_device): Features changed" message

Fix netdev_update_features() messages on register time by moving
the call further in register_netdevice(). When
netdev->reg_state != NETREG_REGISTERED, netdev_name() returns
"(unregistered netdevice)" even if the dev's name is already filled.

Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agor6040: bump to version 0.27 and date 23Feb2011
Florian Fainelli [Wed, 23 Feb 2011 04:32:37 +0000 (04:32 +0000)]
r6040: bump to version 0.27 and date 23Feb2011

Signed-off-by: Florian Fainelli <florian@openwrt.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agor6040: fix multicast operations
Shawn Lin [Wed, 23 Feb 2011 04:32:34 +0000 (04:32 +0000)]
r6040: fix multicast operations

The original code does not work well when the number of mulitcast
address to handle is greater than MCAST_MAX. It only enable promiscous
mode instead of multicast hash table mode, so the hash table function
will not be activated and all multicast frames will be recieved in this
condition.

This patch fixes the following issues with the r6040 NIC operating in
multicast:

1) When the IFF_ALLMULTI flag is set, we should write 0xffff to the NIC
hash table registers to make it process multicast traffic.

2) When the number of multicast address to handle is smaller than
MCAST_MAX, we should use the NIC multicast registers MID1_{L,M,H}.

3) The hashing of the address was not correct, due to an invalid
substraction (15 - (crc & 0x0f)) instead of (crc & 0x0f) and an
incorrect crc algorithm (ether_crc_le) instead of (ether_crc).

4) If necessary, we should set HASH_EN flag in MCR0 to enable multicast
hash table function.

Reported-by: Marc Leclerc <marc-leclerc@signaturealpha.com>
Tested-by: Marc Leclerc <marc-leclerc@signaturealpha.com>
Signed-off-by: Shawn Lin <shawn@dmp.com.tw>
Signed-off-by: Albert Chen <albert.chen@rdc.com.tw>
Signed-off-by: Florian Fainelli <florian@openwrt.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoem_meta: fix sparse warning
stephen hemminger [Wed, 23 Feb 2011 09:06:52 +0000 (09:06 +0000)]
em_meta: fix sparse warning

gfp_t needs to be cast to integer.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agomqprio: cleanups
stephen hemminger [Wed, 23 Feb 2011 09:06:51 +0000 (09:06 +0000)]
mqprio: cleanups

* make qdisc_ops local
* add sparse annotation about expected unlock/unlock in dump_class_stats
* fix indentation

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoafkey: add sparse annotation about rcu
stephen hemminger [Wed, 23 Feb 2011 09:06:50 +0000 (09:06 +0000)]
afkey: add sparse annotation about rcu

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoatl1[ce]: fix sparse warnings
stephen hemminger [Wed, 23 Feb 2011 09:06:49 +0000 (09:06 +0000)]
atl1[ce]: fix sparse warnings

The dmaw_block is an enum and max_pay_load is u32. Therefore
sparse gives warning about comparison of unsigned and signed value.
Resolve by using min_t to force cast.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agosocket: suppress sparse warnings
stephen hemminger [Wed, 23 Feb 2011 09:06:48 +0000 (09:06 +0000)]
socket: suppress sparse warnings

Use __force to quiet sparse warnings for cases where the code
is simulating user space pointers.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet_sched: SFB flow scheduler
Eric Dumazet [Wed, 23 Feb 2011 10:56:17 +0000 (10:56 +0000)]
net_sched: SFB flow scheduler

This is the Stochastic Fair Blue scheduler, based on work from :

W. Feng, D. Kandlur, D. Saha, K. Shin. Blue: A New Class of Active Queue
Management Algorithms. U. Michigan CSE-TR-387-99, April 1999.

http://www.thefengs.com/wuchang/blue/CSE-TR-387-99.pdf

This implementation is based on work done by Juliusz Chroboczek

General SFB algorithm can be found in figure 14, page 15:

B[l][n] : L x N array of bins (L levels, N bins per level)
enqueue()
Calculate hash function values h{0}, h{1}, .. h{L-1}
Update bins at each level
for i = 0 to L - 1
   if (B[i][h{i}].qlen > bin_size)
      B[i][h{i}].p_mark += p_increment;
   else if (B[i][h{i}].qlen == 0)
      B[i][h{i}].p_mark -= p_decrement;
p_min = min(B[0][h{0}].p_mark ... B[L-1][h{L-1}].p_mark);
if (p_min == 1.0)
    ratelimit();
else
    mark/drop with probabilty p_min;

I did the adaptation of Juliusz code to meet current kernel standards,
and various changes to address previous comments :

http://thread.gmane.org/gmane.linux.network/90225
http://thread.gmane.org/gmane.linux.network/90375

Default flow classifier is the rxhash introduced by RPS in 2.6.35, but
we can use an external flow classifier if wanted.

tc qdisc add dev $DEV parent 1:11 handle 11:  \
        est 0.5sec 2sec sfb limit 128

tc filter add dev $DEV protocol ip parent 11: handle 3 \
        flow hash keys dst divisor 1024

Notes:

1) SFB default child qdisc is pfifo_fast. It can be changed by another
qdisc but a child qdisc MUST not drop a packet previously queued. This
is because SFB needs to handle a dequeued packet in order to maintain
its virtual queue states. pfifo_head_drop or CHOKe should not be used.

2) ECN is enabled by default, unlike RED/CHOKe/GRED

With help from Patrick McHardy & Andi Kleen

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
CC: Juliusz Chroboczek <Juliusz.Chroboczek@pps.jussieu.fr>
CC: Stephen Hemminger <shemminger@vyatta.com>
CC: Patrick McHardy <kaber@trash.net>
CC: Andi Kleen <andi@firstfloor.org>
CC: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: Make flow cache paths use a const struct flowi.
David S. Miller [Wed, 23 Feb 2011 02:44:31 +0000 (18:44 -0800)]
net: Make flow cache paths use a const struct flowi.

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoxfrm: Mark flowi arg to xfrm_resolve_and_create_bundle() const.
David S. Miller [Wed, 23 Feb 2011 02:38:51 +0000 (18:38 -0800)]
xfrm: Mark flowi arg to xfrm_resolve_and_create_bundle() const.

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoxfrm: Mark flowi arg to xfrm_dst_{alloc_copy,update_origin}() const.
David S. Miller [Wed, 23 Feb 2011 02:38:14 +0000 (18:38 -0800)]
xfrm: Mark flowi arg to xfrm_dst_{alloc_copy,update_origin}() const.

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoxfrm: Mark flowi arg to xfrm_bundle_create() const.
David S. Miller [Wed, 23 Feb 2011 02:36:50 +0000 (18:36 -0800)]
xfrm: Mark flowi arg to xfrm_bundle_create() const.

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoxfrm: Mark flowi arg to xfrm_tmpl_resolve{,_one}() const.
David S. Miller [Wed, 23 Feb 2011 02:35:39 +0000 (18:35 -0800)]
xfrm: Mark flowi arg to xfrm_tmpl_resolve{,_one}() const.

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoxfrm: Mark flowi arg to xfrm_expand_policies() const.
David S. Miller [Wed, 23 Feb 2011 02:33:42 +0000 (18:33 -0800)]
xfrm: Mark flowi arg to xfrm_expand_policies() const.

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoxfrm: Mark flowi arg to xfrm_policy_{lookup_by_type,match}() const.
David S. Miller [Wed, 23 Feb 2011 02:31:08 +0000 (18:31 -0800)]
xfrm: Mark flowi arg to xfrm_policy_{lookup_by_type,match}() const.

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoxfrm: Kill strict arg to xfrm_bundle_ok().
David S. Miller [Wed, 23 Feb 2011 02:29:20 +0000 (18:29 -0800)]
xfrm: Kill strict arg to xfrm_bundle_ok().

Always set to "0".

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: Mark flowi arg to flow_cache_uli_match() const.
David S. Miller [Wed, 23 Feb 2011 02:27:22 +0000 (18:27 -0800)]
net: Mark flowi arg to flow_cache_uli_match() const.

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoxfrm: Mark flowi arg to xfrm_state_find() const.
David S. Miller [Wed, 23 Feb 2011 02:24:19 +0000 (18:24 -0800)]
xfrm: Mark flowi arg to xfrm_state_find() const.

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoxfrm: Mark flowi arg to xfrm_init_tempstate() const.
David S. Miller [Wed, 23 Feb 2011 02:22:34 +0000 (18:22 -0800)]
xfrm: Mark flowi arg to xfrm_init_tempstate() const.

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoxfrm: Mark flowi arg to xfrm_state_look_at() const.
David S. Miller [Wed, 23 Feb 2011 02:21:31 +0000 (18:21 -0800)]
xfrm: Mark flowi arg to xfrm_state_look_at() const.

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoxfrm: Mark flowi arg to security_xfrm_state_pol_flow_match() const.
David S. Miller [Wed, 23 Feb 2011 02:13:15 +0000 (18:13 -0800)]
xfrm: Mark flowi arg to security_xfrm_state_pol_flow_match() const.

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoxfrm: Mark flowi arg to xfrm_selector_match() const.
David S. Miller [Wed, 23 Feb 2011 02:07:39 +0000 (18:07 -0800)]
xfrm: Mark flowi arg to xfrm_selector_match() const.

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoxfrm: Mark token args to addr_match() const.
David S. Miller [Wed, 23 Feb 2011 02:02:12 +0000 (18:02 -0800)]
xfrm: Mark token args to addr_match() const.

Also, make it return a real bool.

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoxfrm: Mark flowi arg to xfrm_type->reject() const.
David S. Miller [Wed, 23 Feb 2011 01:59:59 +0000 (17:59 -0800)]
xfrm: Mark flowi arg to xfrm_type->reject() const.

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoxfrm: Mark flowi arg to ->init_tempsel() const.
David S. Miller [Wed, 23 Feb 2011 01:51:44 +0000 (17:51 -0800)]
xfrm: Mark flowi arg to ->init_tempsel() const.

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoxfrm: Mark flowi arg to ->fill_dst() const.
David S. Miller [Wed, 23 Feb 2011 01:48:57 +0000 (17:48 -0800)]
xfrm: Mark flowi arg to ->fill_dst() const.

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoxfrm: Mark flowi arg to ->get_tos() const.
David S. Miller [Wed, 23 Feb 2011 01:47:10 +0000 (17:47 -0800)]
xfrm: Mark flowi arg to ->get_tos() const.

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoxfrm: Mark flowi arg const in key extraction helpers.
David S. Miller [Wed, 23 Feb 2011 01:42:56 +0000 (17:42 -0800)]
xfrm: Mark flowi arg const in key extraction helpers.

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agocls_u32: fix sparse warnings
stephen hemminger [Sun, 20 Feb 2011 16:14:23 +0000 (16:14 +0000)]
cls_u32: fix sparse warnings

The variable _data is used in asm-generic to define sections
which causes sparse warnings, so just rename the variable.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoMerge branch 'net/ax88796' of git://git.pengutronix.de/git/mkl/linux-2.6
David S. Miller [Tue, 22 Feb 2011 19:15:29 +0000 (11:15 -0800)]
Merge branch 'net/ax88796' of git://git.pengutronix.de/git/mkl/linux-2.6

13 years agobe2net: use hba_port_num instead of port_num
Ajit Khaparde [Sun, 20 Feb 2011 11:42:22 +0000 (11:42 +0000)]
be2net: use hba_port_num instead of port_num

Use hba_port_num for phy loopback and ethtool phy identification.

From: Suresh R <suresh.reddy@emulex.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobe2net: add code to display temperature of ASIC
Ajit Khaparde [Sun, 20 Feb 2011 11:42:07 +0000 (11:42 +0000)]
be2net: add code to display temperature of ASIC

Add support to display temperature of ASIC via ethtool -S

From: Somnath K <somnath.kotur@emulex.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobe2net: fix to ignore transparent vlan ids wrongly indicated by NIC
Ajit Khaparde [Sun, 20 Feb 2011 11:41:53 +0000 (11:41 +0000)]
be2net: fix to ignore transparent vlan ids wrongly indicated by NIC

With transparent VLAN tagging, the ASIC wrongly indicates packets with VLAN ID.
Strip them off in the driver. The VLAN Tag to be stripped will be given to the host
as an async message.

Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobe2net: variable name change
Ajit Khaparde [Sun, 20 Feb 2011 11:41:39 +0000 (11:41 +0000)]
be2net: variable name change

change occurances of stats_ioctl_sent to stats_cmd_sent

Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobe2net: fixes in ethtool selftest
Ajit Khaparde [Sun, 20 Feb 2011 11:41:20 +0000 (11:41 +0000)]
be2net: fixes in ethtool selftest

> add missing separator between items in ethtool self_test array
> fix reporting of test resluts when link is down and
  when selftest command fails.

From: Suresh R <suresh.reddy@emulex.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobe2net: add new counters to display via ethtool stats
Ajit Khaparde [Sun, 20 Feb 2011 11:41:04 +0000 (11:41 +0000)]
be2net: add new counters to display via ethtool stats

New counters:
> jabber frame stats
> red drop stats

Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoMerge branch 'for-davem' of git://git.kernel.org/pub/scm/linux/kernel/git/bwh/sfc...
David S. Miller [Tue, 22 Feb 2011 18:21:36 +0000 (10:21 -0800)]
Merge branch 'for-davem' of git://git./linux/kernel/git/bwh/sfc-next-2.6

13 years agonet: add __rcu annotations to sk_wq and wq
Eric Dumazet [Fri, 18 Feb 2011 03:26:36 +0000 (03:26 +0000)]
net: add __rcu annotations to sk_wq and wq

Add proper RCU annotations/verbs to sk_wq and wq members

Fix __sctp_write_space() sk_sleep() abuse (and sock->wq access)

Fix sunrpc sk_sleep() abuse too

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoMerge branch 'fec' of git://git.pengutronix.de/git/ukl/linux-2.6
David S. Miller [Tue, 22 Feb 2011 18:15:59 +0000 (10:15 -0800)]
Merge branch 'fec' of git://git.pengutronix.de/git/ukl/linux-2.6

13 years agosh: sh_eth: Add support ethtool
Nobuhiro Iwamatsu [Tue, 15 Feb 2011 21:17:32 +0000 (21:17 +0000)]
sh: sh_eth: Add support ethtool

This commit supports following functions.
  - get_settings
  - set_settings
  - nway_reset
  - get_msglevel
  - set_msglevel
  - get_link
  - get_strings
  - get_ethtool_stats
  - get_sset_count

About other function, the device does not support.

Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Signed-off-by: David S. Miller <davem@davemloft.net>