Commit graph android_kernel_sony_sdm845/include/net
Message SHA1
IPVS: ip_vs_todrop() becomes a noop when CONFIG_SYSCTL is undefined
Signed-off-by: Simon Horman <horms@verge.net.au>

Simon Horman   commited 2011-03-15 09:36:59 +09:00
3a1bbf1885
IPVS: Add sysctl_sync_ver()
In preparation for not including sysctl_sync_ver in
struct netns_ipvs when CONFIG_SYCTL is not defined.

Signed-off-by: Simon Horman <horms@verge.net.au>

Simon Horman   commited 2011-03-15 09:36:57 +09:00
7532e8d40c
IPVS: Add {sysctl_sync_threshold,period}()
In preparation for not including sysctl_sync_threshold in
struct netns_ipvs when CONFIG_SYCTL is not defined.

Signed-off-by: Simon Horman <horms@verge.net.au>

Simon Horman   commited 2011-03-15 09:36:57 +09:00
59e0350ead
ipvs: rename estimator functions
Rename ip_vs_new_estimator to ip_vs_start_estimator
and ip_vs_kill_estimator to ip_vs_stop_estimator to better
match their logic.

Signed-off-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Simon Horman <horms@verge.net.au>

Julian Anastasov   authored and   Simon Horman   commited 2011-03-15 09:36:54 +09:00
6ef757f965
ipvs: optimize rates reading
Move the estimator reading from estimation_timer to user
context. ip_vs_read_estimator() will be used to decode the rate
values. As the decoded rates are not set by estimation timer
there is no need to reset them in ip_vs_zero_stats.

 	There is no need ip_vs_new_estimator() to encode stats
to rates, if the destination is in trash both the stats and the
rates are inactive.

Signed-off-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Simon Horman <horms@verge.net.au>

Julian Anastasov   authored and   Simon Horman   commited 2011-03-15 09:36:53 +09:00
ea9f22cce9
ipvs: remove unused seqcount stats
Remove ustats_seq, IPVS_STAT_INC and IPVS_STAT_ADD
because they are not used. They were replaced with u64_stats.

Signed-off-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Simon Horman <horms@verge.net.au>

Julian Anastasov   authored and   Simon Horman   commited 2011-03-15 09:36:53 +09:00
87d68a15e2
ipvs: properly zero stats and rates
Currently, the new percpu counters are not zeroed and
the zero commands do not work as expected, we still show the old
sum of percpu values. OTOH, we can not reset the percpu counters
from user context without causing the incrementing to use old
and bogus values.

 	So, as Eric Dumazet suggested fix that by moving all overhead
to stats reading in user context. Do not introduce overhead in
timer context (estimator) and incrementing (packet handling in
softirqs).

 	The new ustats0 field holds the zero point for all
counter values, the rates always use 0 as base value as before.
When showing the values to user space just give the difference
between counters and the base values. The only drawback is that
percpu stats are not zeroed, they are accessible only from /proc
and are new interface, so it should not be a compatibility problem
as long as the sum stats are correct after zeroing.

Signed-off-by: Julian Anastasov <ja@ssi.bg>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: Simon Horman <horms@verge.net.au>

Julian Anastasov   authored and   Simon Horman   commited 2011-03-15 09:36:52 +09:00
55a3d4e15c
ipvs: reorganize tot_stats
The global tot_stats contains cpustats field just like the
stats for dest and svc, so better use it to simplify the usage
in estimation_timer. As tot_stats is registered as estimator
we can remove the special ip_vs_read_cpu_stats call for
tot_stats. Fix ip_vs_read_cpu_stats to be called under
stats lock because it is still used as synchronization between
estimation timer and user context (the stats readers).

 	Also, make sure ip_vs_stats_percpu_show reads properly
the u64 stats from user context.

Signed-off-by: Julian Anastasov <ja@ssi.bg>
Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: Simon Horman <horms@verge.net.au>

Julian Anastasov   authored and   Simon Horman   commited 2011-03-15 09:36:52 +09:00
2a0751af09
ipvs: move struct netns_ipvs
Remove include/net/netns/ip_vs.h because it depends on
structures from include/net/ip_vs.h. As ipvs is pointer in
struct net it is better to move struct netns_ipvs into
include/net/ip_vs.h, so that we can easily use other structures
in struct netns_ipvs.

Signed-off-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Simon Horman <horms@verge.net.au>

Julian Anastasov   authored and   Simon Horman   commited 2011-03-15 09:36:50 +09:00
2553d064ff
IPVS: Fix variable assignment in ip_vs_notrack
There's no sense to 'ct = ct = ' in ip_vs_notrack(). Just assign
nf_ct_get()'s return value directly to the pointer variable 'ct' once.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Simon Horman <horms@verge.net.au>

Jesper Juhl   authored and   Simon Horman   commited 2011-03-15 09:36:49 +09:00
06b69390a6
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>

Steffen Klassert   authored and   David S. Miller   commited 2011-03-13 20:22:31 -07:00
2cd084678f
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>

Steffen Klassert   authored and   David S. Miller   commited 2011-03-13 20:22:30 -07:00
9fdc4883d9
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>

Steffen Klassert   authored and   David S. Miller   commited 2011-03-13 20:22:28 -07:00
1ce3644ade
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>

Steffen Klassert   authored and   David S. Miller   commited 2011-03-13 20:22:28 -07:00
9736acf395
decnet: Convert to use flowidn where applicable.
Signed-off-by: David S. Miller <davem@davemloft.net>

David S. Miller   commited 2011-03-12 15:08:55 -08:00
bef55aebd5
net: Put fl6_* macros to struct flowi6 and use them again.
Signed-off-by: David S. Miller <davem@davemloft.net>

David S. Miller   commited 2011-03-12 15:08:55 -08:00
1958b856c1
ipv6: Convert to use flowi6 where applicable.
Signed-off-by: David S. Miller <davem@davemloft.net>

David S. Miller   commited 2011-03-12 15:08:54 -08:00
4c9483b2fb
net: Put fl4_* macros to struct flowi4 and use them again.
Signed-off-by: David S. Miller <davem@davemloft.net>

David S. Miller   commited 2011-03-12 15:08:54 -08:00
9cce96df5b
net: Use flowi4 and flowi6 in xfrm layer.
Signed-off-by: David S. Miller <davem@davemloft.net>

David S. Miller   commited 2011-03-12 15:08:52 -08:00
7e1dc7b6f7
net: Add flowi6_* member helper macros.
Signed-off-by: David S. Miller <davem@davemloft.net>

David S. Miller   commited 2011-03-12 15:08:52 -08:00
2032656e76
ipv4: Use flowi4 in public route lookup interfaces.
Signed-off-by: David S. Miller <davem@davemloft.net>

David S. Miller   commited 2011-03-12 15:08:48 -08:00
9d6ec93801
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>

David S. Miller   commited 2011-03-12 15:08:47 -08:00
22bd5b9b13
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>

David S. Miller   commited 2011-03-12 15:08:47 -08:00
59b1a94c9a
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>

David S. Miller   commited 2011-03-12 15:08:46 -08:00
56bb8059e1
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>

David S. Miller   commited 2011-03-12 15:08:46 -08:00
6281dcc94a
net: Create union flowi_uli
This will be used when we have seperate flowi types.

Signed-off-by: David S. Miller <davem@davemloft.net>

David S. Miller   commited 2011-03-12 15:08:45 -08:00
08704bcbf0
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>

David S. Miller   commited 2011-03-12 15:08:45 -08:00
806566cc78
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>

David S. Miller   commited 2011-03-12 15:08:44 -08:00
1d28f42c1b
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>

David S. Miller   commited 2011-03-12 15:08:43 -08:00
fbef0a4091
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>

David S. Miller   commited 2011-03-12 15:08:42 -08:00
78fbfd8a65
mac80211: implement support for cfg80211_ops->{get,set}_ringparam
Signed-off-by: John W. Linville <linville@tuxdriver.com>

John W. Linville   commited 2011-03-11 15:34:10 -05:00
38c091590f
wireless: add support for ethtool_ops->{get,set}_ringparam
Signed-off-by: John W. Linville <linville@tuxdriver.com>

John W. Linville   commited 2011-03-11 14:16:58 -05:00
3677713b79
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6 into for-davem
John W. Linville   commited 2011-03-11 14:11:11 -05:00
409ec36c32
ipv4: Kill flowi arg to fib_select_multipath()
Completely unused.

Signed-off-by: David S. Miller <davem@davemloft.net>

David S. Miller   commited 2011-03-10 17:03:45 -08:00
1b7fe59322
Phonet: allocate sock from accept syscall rather than soft IRQ
This moves most of the accept logic to process context like other
socket stacks do. Then we can use a few more common socket helpers
and simplify a bit.

Signed-off-by: Rémi Denis-Courmont <remi.denis-courmont@nokia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

Rémi Denis-Courmont   authored and   David S. Miller   commited 2011-03-09 11:59:32 -08:00
f7ae8d59f6
ipv4: Fix scope value used in route src-address caching.
We have to use cfg->fc_scope not the final nh_scope value.

Reported-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: David S. Miller <davem@davemloft.net>

David S. Miller   commited 2011-03-08 11:03:21 -08:00
a7ac8fc1d8
ipv4: Cache source address in nexthop entries.
When doing output route lookups, we have to select the source address
if the user has not specified an explicit one.

First, if the route has an explicit preferred source address
specified, then we use that.

Otherwise we search the route's outgoing interface for a suitable
address.

This search can be precomputed and cached at route insertion time.

The only missing part is that we have to refresh this precomputed
value any time addresses are added or removed from the interface, and
this is accomplished by fib_update_nh_saddrs().

Signed-off-by: David S. Miller <davem@davemloft.net>

David S. Miller   commited 2011-03-07 20:54:48 -08:00
1fc050a134
ipv4: Remove flowi from struct rtable.
The only necessary parts are the src/dst addresses, the
interface indexes, the TOS, and the mark.

The rest is unnecessary bloat, which amounts to nearly
50 bytes on 64-bit.

Signed-off-by: David S. Miller <davem@davemloft.net>

David S. Miller   commited 2011-03-04 21:55:31 -08:00
5e2b61f784
ipv4: Use passed-in protocol in ip_route_newports().
Signed-off-by: David S. Miller <davem@davemloft.net>

David S. Miller   commited 2011-03-04 21:31:48 -08:00
4157434c23
Merge branch 'for-davem' of ssh://master.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6
David S. Miller   commited 2011-03-04 12:48:25 -08:00
d72751ede1
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6 into for-davem
John W. Linville   commited 2011-03-04 14:10:40 -05:00
85a7045a90
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/padovan/bluetooth-next-2.6
John W. Linville   commited 2011-03-04 13:59:44 -05:00
a177584609
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:
	drivers/net/bnx2x/bnx2x.h

David S. Miller   commited 2011-03-03 21:27:42 -08:00
0a0e9ae1bd
net_sched: reduce fifo qdisc size
Because of various alignements [SLUB / qdisc], we use 512 bytes of
memory for one {p|b}fifo qdisc, instead of 256 bytes on 64bit arches and
192 bytes on 32bit ones.

Move the "u32 limit" inside "struct Qdisc" (no impact on other qdiscs)

Change qdisc_alloc(), first trying a regular allocation before an
oversized one.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

Eric Dumazet   authored and   David S. Miller   commited 2011-03-03 11:10:02 -08:00
d276055c4e
dcbnl: add support for retrieving peer configuration - cee
This patch adds the support for retrieving the remote or peer DCBX
configuration via dcbnl for embedded DCBX stacks supporting the CEE DCBX
standard.

Signed-off-by: Shmulik Ravid <shmulikr@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

Shmulik Ravid   authored and   David S. Miller   commited 2011-03-02 21:58:55 -08:00
dc6ed1df5a
dcbnl: add support for retrieving peer configuration - ieee
These 2 patches add the support for retrieving the remote or peer DCBX
configuration via dcbnl for embedded DCBX stacks. The peer configuration
is part of the DCBX MIB and is useful for debugging and diagnostics of
the overall DCB configuration. The first patch add this support for IEEE
802.1Qaz standard the second patch add the same support for the older
CEE standard. Diff for v2 - the peer-app-info is CEE specific.

Signed-off-by: Shmulik Ravid <shmulikr@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

Shmulik Ravid   authored and   David S. Miller   commited 2011-03-02 21:58:54 -08:00
eed84713bc
ipv4: ip_route_output_key() is better as an inline.
This avoid a stack frame at zero cost.

Signed-off-by: David S. Miller <davem@davemloft.net>

David S. Miller   commited 2011-03-02 14:56:30 -08:00
5bfa787fb2
ipv4: Make output route lookup return rtable directly.
Instead of on the stack.

Signed-off-by: David S. Miller <davem@davemloft.net>

David S. Miller   commited 2011-03-02 14:31:35 -08:00
b23dd4fe42
xfrm: Return dst directly from xfrm_lookup()
Instead of on the stack.

Signed-off-by: David S. Miller <davem@davemloft.net>

David S. Miller   commited 2011-03-02 13:27:41 -08:00
452edd598f
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/kaber/nf-next-2.6
David S. Miller   commited 2011-03-02 11:30:24 -08:00
3872b28408