summaryrefslogtreecommitdiffstats
path: root/net
AgeCommit message (Collapse)AuthorFilesLines
2011-02-24netem: define NETEM_DIST_MAXstephen hemminger1-1/+1
Rather than magic constant in code, expose the maximum size of packet distribution table in API. In iproute2, q_netem defines MAX_DIST as 16K already. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-02-24netem: use vmalloc for distribution tablestephen hemminger1-4/+18
The netem probability table can be large (up to 64K bytes) which may be too large to allocate in one contiguous chunk. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-02-24netem: cleanup dump codestephen hemminger1-6/+3
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>
2011-02-24ipv4: Rearrange how ip_route_newports() gets port keys.David S. Miller2-4/+12
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>
2011-02-23xfrm: Const'ify xfrm_address_t args to xfrm_state_find.David S. Miller1-2/+2
This required a const'ification in xfrm_init_tempstate() too. Signed-off-by: David S. Miller <davem@davemloft.net>
2011-02-23xfrm: Remove unused 'saddr' and 'daddr' args to xfrm_state_look_at.David S. Miller1-3/+2
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-02-23xfrm: Const'ify xfrm_address_t args to __xfrm_state_lookup{,_byaddr}.David S. Miller1-2/+8
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-02-23xfrm: Const'ify xfrm_tmpl arg to xfrm_init_tempstate.David S. Miller1-1/+1
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-02-23xfrm: Const'ify xfrm_address_t args to xfrm_*_hash.David S. Miller1-5/+6
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-02-23xfrm: Const'ify sec_path arg to secpath_has_nontransport.David S. Miller1-1/+1
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-02-23xfrm: Const'ify ptr args to xfrm_policy_ok.David S. Miller1-1/+1
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-02-23xfrm: Const'ify ptr args to xfrm_state_ok.David S. Miller1-1/+1
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-02-23xfrm: Const'ify selector arg to xfrm_dst_update_parent.David S. Miller1-1/+1
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-02-23xfrm: Const'ify policy arg to clone_policy.David S. Miller1-1/+1
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-02-23xfrm: Const'ify policy arg and local selector in xfrm_policy_match.David S. Miller1-2/+3
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-02-23xfrm: Const'ify local xfrm_address_t pointers in xfrm_policy_lookup_bytype.David S. Miller1-1/+1
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-02-23xfrm: Const'ify selector args in xfrm_migrate paths.David S. Miller1-4/+4
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-02-23xfrm: Const'ify address args to hash helpers.David S. Miller2-15/+26
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-02-23xfrm: Const'ify pointer args to km_migrate() and implementations.David S. Miller3-26/+26
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-02-23xfrm: Const'ify pointer args to migrate_tmpl_match and xfrm_migrate_checkDavid S. Miller1-2/+2
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-02-23xfrm: Const'ify address arguments to __xfrm_dst_lookup()David S. Miller1-2/+2
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-02-23xfrm: Const'ify address arguments to ->dst_lookup()David S. Miller2-4/+4
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-02-23xfrm: Const'ify selector argument to xfrm_selector_match()David S. Miller1-3/+3
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-02-23xfrm: Const'ify tmpl and address arguments to ->init_temprop()David S. Miller2-4/+4
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-02-23xfrm: Pass km_event pointers around as const when possible.David S. Miller3-22/+22
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-02-23Merge branch 'tipc-Feb23-2011' of ↵David S. Miller17-435/+375
git://git.kernel.org/pub/scm/linux/kernel/git/paulg/net-next-2.6
2011-02-23tipc: Avoid reliable broadcast preparation for NACK messagesAllan Stephens1-0/+1
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>
2011-02-23tipc: Remove unused message header field for requested number of linksAllan Stephens5-22/+5
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>
2011-02-23tipc: Remove support for per-connection message sequence numberingAllan Stephens4-46/+3
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>
2011-02-23tipc: Add in missing lock during link initializationAllan Stephens1-0/+2
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>
2011-02-23tipc: Fix port counter handling to correct congestion controlAllan Stephens2-21/+36
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>
2011-02-23tipc: Minor optimization to topology service connection establishmentAllan Stephens1-3/+1
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>
2011-02-23tipc: Set unused probe field of link protocol messages to defined valueAllan Stephens1-0/+1
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>
2011-02-23tipc: Improve accuracy of link transmit queue maximum size statisticAllan Stephens3-20/+9
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>
2011-02-23tipc: Eliminate unnecessary locking when starting topology serviceAllan Stephens1-3/+0
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>
2011-02-23tipc: Clean up tracking of node requesting a broadcast retransmitAllan Stephens3-4/+17
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>
2011-02-23tipc: Fix print statements that assume pointers are 32-bit valuesAllan Stephens1-3/+3
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>
2011-02-23tipc: Improve handling of invalid link tolerance valuesAllan Stephens1-0/+3
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>
2011-02-23tipc: Prevent invalid memory access when sending to configuration serviceAllan Stephens1-0/+2
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>
2011-02-23tipc: Remove unused global variable tipc_user_countAllan Stephens3-7/+3
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>
2011-02-23tipc: Combine bearer structure with tipc_bearer structureAllan Stephens8-127/+119
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>
2011-02-23tipc: Combine port structure with tipc_port structureAllan Stephens5-184/+175
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>
2011-02-23net: Implement SFEATURES compatibility for not updated driversMichał Mirosław1-0/+61
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>
2011-02-23net: Fix ETHTOOL_GFEATURES compatibilityMichał Mirosław1-0/+14
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>
2011-02-23net: avoid initial "Features changed" messageMichał Mirosław1-3/+5
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>
2011-02-23Fix "(unregistered net_device): Features changed" messageMichał Mirosław1-2/+2
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>
2011-02-23em_meta: fix sparse warningstephen hemminger1-1/+1
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>
2011-02-23mqprio: cleanupsstephen hemminger1-2/+4
* 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>
2011-02-23afkey: add sparse annotation about rcustephen hemminger1-0/+2
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-02-23socket: suppress sparse warningsstephen hemminger1-3/+5
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>