GitHub/LineageOS/android_kernel_motorola_exynos9610.git
9 years agoipvs: Pass ipvs into ip_vs_out
Eric W. Biederman [Mon, 21 Sep 2015 18:02:52 +0000 (13:02 -0500)]
ipvs: Pass ipvs into ip_vs_out

Derive ipvs from state->net in the callers of ip_vs_out and pass it
into ip_vs_out.  Removing the need to use the hack skb_net.

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Acked-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Simon Horman <horms@verge.net.au>
9 years agoipvs: Pass ipvs not net into sysctl_nat_icmp_send
Eric W. Biederman [Mon, 21 Sep 2015 18:02:51 +0000 (13:02 -0500)]
ipvs: Pass ipvs not net into sysctl_nat_icmp_send

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Acked-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Simon Horman <horms@verge.net.au>
9 years agoipvs: Simplify ipvs and net access in ip_vs_leave
Eric W. Biederman [Mon, 21 Sep 2015 18:02:50 +0000 (13:02 -0500)]
ipvs: Simplify ipvs and net access in ip_vs_leave

Stop using the hack skb_net(skb) to compute the network namespace.

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Acked-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Simon Horman <horms@verge.net.au>
9 years agoipvs: Wrap sysctl_cache_bypass and remove ifdefs in ip_vs_leave
Eric W. Biederman [Mon, 21 Sep 2015 18:02:49 +0000 (13:02 -0500)]
ipvs: Wrap sysctl_cache_bypass and remove ifdefs in ip_vs_leave

With sysctl_cache_bypass now a compile time constant the compiler can
figue out that it can elimiate all of the code that depends on
sysctl_cache_bypass being true.

Also remove the duplicate computation of net previously necessitated
by #ifdef CONFIG_SYSCTL

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Acked-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Simon Horman <horms@verge.net.au>
9 years agoipvs: Better derivation of ipvs in ip_vs_in_stats and ip_vs_out_stats
Eric W. Biederman [Mon, 21 Sep 2015 18:02:48 +0000 (13:02 -0500)]
ipvs: Better derivation of ipvs in ip_vs_in_stats and ip_vs_out_stats

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Acked-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Simon Horman <horms@verge.net.au>
9 years agoipvs: Pass ipvs into ensure_mtu_is adequate
Eric W. Biederman [Mon, 21 Sep 2015 18:02:47 +0000 (13:02 -0500)]
ipvs: Pass ipvs into ensure_mtu_is adequate

This allows two different ways for computing/guessing net to be
removed from ensure_mtu_is_adequate.

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Acked-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Simon Horman <horms@verge.net.au>
9 years agoipvs: Pass ipvs into __ip_vs_get_out_rt_v6
Eric W. Biederman [Mon, 21 Sep 2015 18:02:46 +0000 (13:02 -0500)]
ipvs: Pass ipvs into __ip_vs_get_out_rt_v6

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Acked-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Simon Horman <horms@verge.net.au>
9 years agoipvs: Pass ipvs into __ip_vs_get_out_rt
Eric W. Biederman [Mon, 21 Sep 2015 18:02:45 +0000 (13:02 -0500)]
ipvs: Pass ipvs into __ip_vs_get_out_rt

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Acked-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Simon Horman <horms@verge.net.au>
9 years agoipvs: Better derivation of ipvs in ip_vs_tunnel_xmit
Eric W. Biederman [Mon, 21 Sep 2015 18:02:44 +0000 (13:02 -0500)]
ipvs: Better derivation of ipvs in ip_vs_tunnel_xmit

Don't use "net_ipvs(skb_net(skb))" as skb_net is a bad hack.  Instead
use cp->ipvs and ipvs->net for the net.

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Acked-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Simon Horman <horms@verge.net.au>
9 years agoipvs: Pass ipvs into .conn_schedule and ip_vs_try_to_schedule
Eric W. Biederman [Mon, 21 Sep 2015 18:02:43 +0000 (13:02 -0500)]
ipvs: Pass ipvs into .conn_schedule and ip_vs_try_to_schedule

This moves the hack "net_ipvs(skb_net(skb))" up one level where it
will be easier to remove.

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Acked-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Simon Horman <horms@verge.net.au>
9 years agoipvs: Pass ipvs not net into ip_vs_conn_net_init and ip_vs_conn_net_cleanup
Eric W. Biederman [Mon, 21 Sep 2015 18:02:42 +0000 (13:02 -0500)]
ipvs: Pass ipvs not net into ip_vs_conn_net_init and ip_vs_conn_net_cleanup

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Acked-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Simon Horman <horms@verge.net.au>
9 years agoipvs: Pass ipvs not net into ip_vs_conn_net_flush
Eric W. Biederman [Mon, 21 Sep 2015 18:02:41 +0000 (13:02 -0500)]
ipvs: Pass ipvs not net into ip_vs_conn_net_flush

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Acked-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Simon Horman <horms@verge.net.au>
9 years agoipvs: Pass ipvs not net to ip_vs_conn_hashkey
Eric W. Biederman [Mon, 21 Sep 2015 18:02:40 +0000 (13:02 -0500)]
ipvs: Pass ipvs not net to ip_vs_conn_hashkey

Use the address of struct netns_ipvs in the hash not the address of
struct net.  Both addresses are equally valid candidates and by using
the address of struct netns_ipvs there becomes no need deal with
struct net in this part of the code.

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Acked-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Simon Horman <horms@verge.net.au>
9 years agoipvs: Pass ipvs into conn_out_get
Eric W. Biederman [Mon, 21 Sep 2015 18:02:39 +0000 (13:02 -0500)]
ipvs: Pass ipvs into conn_out_get

Move the hack of relying on "net_ipvs(skb_net(skb))" to derive the
ipvs up a layer.

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Acked-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Simon Horman <horms@verge.net.au>
9 years agoipvs: Pass ipvs into .conn_in_get and ip_vs_conn_in_get_proto
Eric W. Biederman [Mon, 21 Sep 2015 18:02:38 +0000 (13:02 -0500)]
ipvs: Pass ipvs into .conn_in_get and ip_vs_conn_in_get_proto

Stop relying on "net_ipvs(skb_net(skb))" to derive the ipvs as
skb_net is a hack.

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Acked-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Simon Horman <horms@verge.net.au>
9 years agoipvs: Pass ipvs into ip_vs_conn_fill_param_proto
Eric W. Biederman [Mon, 21 Sep 2015 18:02:37 +0000 (13:02 -0500)]
ipvs: Pass ipvs into ip_vs_conn_fill_param_proto

Move the ugly hack net_ipvs(skb_net(skb)) up a layer in the call stack
so it is easier to remove.

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Acked-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Simon Horman <horms@verge.net.au>
9 years agoipvs: Pass ipvs not net into init_netns and exit_netns
Eric W. Biederman [Mon, 21 Sep 2015 18:02:36 +0000 (13:02 -0500)]
ipvs: Pass ipvs not net into init_netns and exit_netns

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Acked-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Simon Horman <horms@verge.net.au>
9 years agoipvs: Pass ipvs not net into [un]register_ip_vs_proto_netns
Eric W. Biederman [Mon, 21 Sep 2015 18:02:35 +0000 (13:02 -0500)]
ipvs: Pass ipvs not net into [un]register_ip_vs_proto_netns

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Acked-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Simon Horman <horms@verge.net.au>
9 years agoipvs: Pass ipvs not net into ip_vs_app_net_init and ip_vs_app_net_cleanup
Eric W. Biederman [Mon, 21 Sep 2015 18:02:34 +0000 (13:02 -0500)]
ipvs: Pass ipvs not net into ip_vs_app_net_init and ip_vs_app_net_cleanup

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Acked-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Simon Horman <horms@verge.net.au>
9 years agoipvs: Pass ipvs not net into ip_vs_app_inc_release
Eric W. Biederman [Mon, 21 Sep 2015 18:02:33 +0000 (13:02 -0500)]
ipvs: Pass ipvs not net into ip_vs_app_inc_release

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Acked-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Simon Horman <horms@verge.net.au>
9 years agoipvs: Pass ipvs not net to register_ip_vs_app and unregister_ip_vs_app
Eric W. Biederman [Mon, 21 Sep 2015 18:02:32 +0000 (13:02 -0500)]
ipvs: Pass ipvs not net to register_ip_vs_app and unregister_ip_vs_app

Also move the tests for net_ipvs being NULL into __ip_vs_ftp_init
and __ip_vs_ftp_exit.  The only places where they possibly make
sense.

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Acked-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Simon Horman <horms@verge.net.au>
9 years agoipvs: Pass ipvs not net to register_ip_vs_app_inc
Eric W. Biederman [Mon, 21 Sep 2015 18:02:31 +0000 (13:02 -0500)]
ipvs: Pass ipvs not net to register_ip_vs_app_inc

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Acked-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Simon Horman <horms@verge.net.au>
9 years agoipvs: Pass ipvs not net into ip_vs_app_inc_new
Eric W. Biederman [Mon, 21 Sep 2015 18:02:30 +0000 (13:02 -0500)]
ipvs: Pass ipvs not net into ip_vs_app_inc_new

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Acked-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Simon Horman <horms@verge.net.au>
9 years agoipvs: Pass ipvs not net into register_app and unregister_app
Eric W. Biederman [Mon, 21 Sep 2015 18:02:29 +0000 (13:02 -0500)]
ipvs: Pass ipvs not net into register_app and unregister_app

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Acked-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Simon Horman <horms@verge.net.au>
9 years agoipvs: Pass ipvs not net to ip_vs_estimator_net_init and ip_vs_estimator_cleanup
Eric W. Biederman [Mon, 21 Sep 2015 18:02:28 +0000 (13:02 -0500)]
ipvs: Pass ipvs not net to ip_vs_estimator_net_init and ip_vs_estimator_cleanup

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Acked-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Simon Horman <horms@verge.net.au>
9 years agoipvs: Pass ipvs not net to estimation_timer
Eric W. Biederman [Mon, 21 Sep 2015 18:02:27 +0000 (13:02 -0500)]
ipvs: Pass ipvs not net to estimation_timer

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Acked-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Simon Horman <horms@verge.net.au>
9 years agoipvs: Pass ipvs not net into ip_vs_control_net_(init|cleanup)
Eric W. Biederman [Mon, 21 Sep 2015 18:02:26 +0000 (13:02 -0500)]
ipvs: Pass ipvs not net into ip_vs_control_net_(init|cleanup)

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Acked-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Simon Horman <horms@verge.net.au>
9 years agoipvs: Pass ipvs not net to ip_vs_control_net_(init|cleanup)_sysctl
Eric W. Biederman [Mon, 21 Sep 2015 18:02:25 +0000 (13:02 -0500)]
ipvs: Pass ipvs not net to ip_vs_control_net_(init|cleanup)_sysctl

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Acked-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Simon Horman <horms@verge.net.au>
9 years agoipvs: Pass ipvs not net to ip_vs_random_drop_entry
Eric W. Biederman [Mon, 21 Sep 2015 18:02:24 +0000 (13:02 -0500)]
ipvs: Pass ipvs not net to ip_vs_random_drop_entry

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Acked-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Simon Horman <horms@verge.net.au>
9 years agoipvs: Pass ipvs not net to ip_vs_start_estimator aned ip_vs_stop_estimator
Eric W. Biederman [Mon, 21 Sep 2015 18:02:23 +0000 (13:02 -0500)]
ipvs: Pass ipvs not net to ip_vs_start_estimator aned ip_vs_stop_estimator

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Acked-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Simon Horman <horms@verge.net.au>
9 years agoipvs: Pass ipvs not net to ip_vs_genl_set_config
Eric W. Biederman [Mon, 21 Sep 2015 18:02:22 +0000 (13:02 -0500)]
ipvs: Pass ipvs not net to ip_vs_genl_set_config

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Acked-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Simon Horman <horms@verge.net.au>
9 years agoipvs: Pass ipvs not net to ip_vs_sync_net_cleanup
Eric W. Biederman [Mon, 21 Sep 2015 18:02:21 +0000 (13:02 -0500)]
ipvs: Pass ipvs not net to ip_vs_sync_net_cleanup

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Acked-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Simon Horman <horms@verge.net.au>
9 years agoipvs: Pass ipvs not net to ip_vs_sync_net_init
Eric W. Biederman [Mon, 21 Sep 2015 18:02:20 +0000 (13:02 -0500)]
ipvs: Pass ipvs not net to ip_vs_sync_net_init

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Acked-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Simon Horman <horms@verge.net.au>
9 years agoipvs: Pass ipvs not net to ip_vs_proc_sync_conn
Eric W. Biederman [Mon, 21 Sep 2015 18:02:19 +0000 (13:02 -0500)]
ipvs: Pass ipvs not net to ip_vs_proc_sync_conn

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Acked-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Simon Horman <horms@verge.net.au>
9 years agoipvs: Pass ipvs not net to ip_vs_proc_conn
Eric W. Biederman [Mon, 21 Sep 2015 18:02:18 +0000 (13:02 -0500)]
ipvs: Pass ipvs not net to ip_vs_proc_conn

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Acked-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Simon Horman <horms@verge.net.au>
9 years agoipvs: Pass ipvs not net to ip_vs_sync_conn
Eric W. Biederman [Mon, 21 Sep 2015 18:02:17 +0000 (13:02 -0500)]
ipvs: Pass ipvs not net to ip_vs_sync_conn

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Acked-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Simon Horman <horms@verge.net.au>
9 years agoipvs: Pass ipvs not net to ip_vs_sync_conn_v0
Eric W. Biederman [Mon, 21 Sep 2015 18:02:16 +0000 (13:02 -0500)]
ipvs: Pass ipvs not net to ip_vs_sync_conn_v0

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Acked-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Simon Horman <horms@verge.net.au>
9 years agoipvs: Pass ipvs not net to ip_vs_process_message
Eric W. Biederman [Mon, 21 Sep 2015 18:02:15 +0000 (13:02 -0500)]
ipvs: Pass ipvs not net to ip_vs_process_message

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Acked-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Simon Horman <horms@verge.net.au>
9 years agoipvs: Store ipvs not net in struct ip_vs_sync_thread_data
Eric W. Biederman [Mon, 21 Sep 2015 18:02:14 +0000 (13:02 -0500)]
ipvs: Store ipvs not net in struct ip_vs_sync_thread_data

In practice struct netns_ipvs is as meaningful as struct net and more
useful as it holds the ipvs specific data.  So store a pointer to
struct netns_ipvs.

Update the accesses of tinfo->net to access tinfo->ipvs->net instead.

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Acked-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Simon Horman <horms@verge.net.au>
9 years agoipvs: Pass ipvs not net to make_receive_sock
Eric W. Biederman [Mon, 21 Sep 2015 18:02:13 +0000 (13:02 -0500)]
ipvs: Pass ipvs not net to make_receive_sock

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Acked-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Simon Horman <horms@verge.net.au>
9 years agoipvs: Pass ipvs not net to make_send_sock
Eric W. Biederman [Mon, 21 Sep 2015 18:02:12 +0000 (13:02 -0500)]
ipvs: Pass ipvs not net to make_send_sock

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Acked-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Simon Horman <horms@verge.net.au>
9 years agoipvs: Pass ipvs not net to stop_sync_thread
Eric W. Biederman [Mon, 21 Sep 2015 18:02:11 +0000 (13:02 -0500)]
ipvs: Pass ipvs not net to stop_sync_thread

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Acked-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Simon Horman <horms@verge.net.au>
9 years agoipvs: Pass ipvs not net to start_sync_thread
Eric W. Biederman [Mon, 21 Sep 2015 18:02:10 +0000 (13:02 -0500)]
ipvs: Pass ipvs not net to start_sync_thread

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Acked-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Simon Horman <horms@verge.net.au>
9 years agoipvs: Pass ipvs not net to ip_vs_genl_del_daemon
Eric W. Biederman [Mon, 21 Sep 2015 18:02:09 +0000 (13:02 -0500)]
ipvs: Pass ipvs not net to ip_vs_genl_del_daemon

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Acked-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Simon Horman <horms@verge.net.au>
9 years agoipvs: Pass ipvs not net to ip_vs_genl_new_daemon
Eric W. Biederman [Mon, 21 Sep 2015 18:02:08 +0000 (13:02 -0500)]
ipvs: Pass ipvs not net to ip_vs_genl_new_daemon

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Acked-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Simon Horman <horms@verge.net.au>
9 years agoipvs: Pass ipvs not net to ip_vs_genl_find_service
Eric W. Biederman [Mon, 21 Sep 2015 18:02:07 +0000 (13:02 -0500)]
ipvs: Pass ipvs not net to ip_vs_genl_find_service

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Acked-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Simon Horman <horms@verge.net.au>
9 years agoipvs: Pass ipvs not net to ip_vs_genl_parse_service
Eric W. Biederman [Mon, 21 Sep 2015 18:02:06 +0000 (13:02 -0500)]
ipvs: Pass ipvs not net to ip_vs_genl_parse_service

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Acked-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Simon Horman <horms@verge.net.au>
9 years agoipvs: Pass ipvs not net to __ip_vs_get_timeouts
Eric W. Biederman [Mon, 21 Sep 2015 18:02:05 +0000 (13:02 -0500)]
ipvs: Pass ipvs not net to __ip_vs_get_timeouts

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Acked-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Simon Horman <horms@verge.net.au>
9 years agoipvs: Pass ipvs not net to __ip_vs_get_dest_entries
Eric W. Biederman [Mon, 21 Sep 2015 18:02:04 +0000 (13:02 -0500)]
ipvs: Pass ipvs not net to __ip_vs_get_dest_entries

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Acked-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Simon Horman <horms@verge.net.au>
9 years agoipvs: Pass ipvs not net to __ip_vs_get_service_entries
Eric W. Biederman [Mon, 21 Sep 2015 18:02:03 +0000 (13:02 -0500)]
ipvs: Pass ipvs not net to __ip_vs_get_service_entries

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Acked-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Simon Horman <horms@verge.net.au>
9 years agoipvs: Pass ipvs not net to ip_vs_set_timeout
Eric W. Biederman [Mon, 21 Sep 2015 18:02:02 +0000 (13:02 -0500)]
ipvs: Pass ipvs not net to ip_vs_set_timeout

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Acked-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Simon Horman <horms@verge.net.au>
9 years agoipvs: Pass ipvs not net to ip_vs_proto_data_get
Eric W. Biederman [Mon, 21 Sep 2015 18:02:01 +0000 (13:02 -0500)]
ipvs: Pass ipvs not net to ip_vs_proto_data_get

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Acked-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Simon Horman <horms@verge.net.au>
9 years agoipvs: Cache ipvs in ip_vs_in_icmp and ip_vs_in_icmp_v6
Eric W. Biederman [Mon, 21 Sep 2015 18:02:00 +0000 (13:02 -0500)]
ipvs: Cache ipvs in ip_vs_in_icmp and ip_vs_in_icmp_v6

Storte the value of net_ipvs in a variable named ipvs so that when
there are more users struct netns_ipvs in ip_vs_in_cmp and
ip_vs_in_icmp_v6 they won't need to compute the value again.

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Acked-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Simon Horman <horms@verge.net.au>
9 years agoipvs: Pass ipvs not net to ip_vs_zero_all
Eric W. Biederman [Mon, 21 Sep 2015 18:01:59 +0000 (13:01 -0500)]
ipvs: Pass ipvs not net to ip_vs_zero_all

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Acked-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Simon Horman <horms@verge.net.au>
9 years agoipvs: Pass ipvs not net to ip_vs_service_net_cleanup
Eric W. Biederman [Mon, 21 Sep 2015 18:01:58 +0000 (13:01 -0500)]
ipvs: Pass ipvs not net to ip_vs_service_net_cleanup

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Acked-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Simon Horman <horms@verge.net.au>
9 years agoipvs: Pass ipvs not net to ip_vs_flush
Eric W. Biederman [Mon, 21 Sep 2015 18:01:57 +0000 (13:01 -0500)]
ipvs: Pass ipvs not net to ip_vs_flush

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Acked-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Simon Horman <horms@verge.net.au>
9 years agoipvs: Pass ipvs not net to ip_vs_add_service
Eric W. Biederman [Mon, 21 Sep 2015 18:01:56 +0000 (13:01 -0500)]
ipvs: Pass ipvs not net to ip_vs_add_service

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Acked-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Simon Horman <horms@verge.net.au>
9 years agoipvs: Cache ipvs in ip_vs_genl_set_cmd
Eric W. Biederman [Mon, 21 Sep 2015 18:01:55 +0000 (13:01 -0500)]
ipvs: Cache ipvs in ip_vs_genl_set_cmd

Compute ipvs early in ip_vs_genl_set_cmd and use the cached value to
access ipvs->sync_state.

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Acked-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Simon Horman <horms@verge.net.au>
9 years agoipvs: Pass ipvs not net to ip_vs_dest_trash_expire
Eric W. Biederman [Mon, 21 Sep 2015 18:01:54 +0000 (13:01 -0500)]
ipvs: Pass ipvs not net to ip_vs_dest_trash_expire

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Acked-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Simon Horman <horms@verge.net.au>
9 years agoipvs: Pass ipvs not net to __ip_vs_del_dest
Eric W. Biederman [Mon, 21 Sep 2015 18:01:53 +0000 (13:01 -0500)]
ipvs: Pass ipvs not net to __ip_vs_del_dest

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Acked-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Simon Horman <horms@verge.net.au>
9 years agoipvs: Pass ipvs not net to ip_vs_trash_cleanup
Eric W. Biederman [Mon, 21 Sep 2015 18:01:52 +0000 (13:01 -0500)]
ipvs: Pass ipvs not net to ip_vs_trash_cleanup

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Acked-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Simon Horman <horms@verge.net.au>
9 years agoipvs: Pass ipvs not net to ip_vs_find_dest
Eric W. Biederman [Mon, 21 Sep 2015 18:01:51 +0000 (13:01 -0500)]
ipvs: Pass ipvs not net to ip_vs_find_dest

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Acked-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Simon Horman <horms@verge.net.au>
9 years agoipvs: Pass ipvs not net to ip_vs_has_real_service
Eric W. Biederman [Mon, 21 Sep 2015 18:01:50 +0000 (13:01 -0500)]
ipvs: Pass ipvs not net to ip_vs_has_real_service

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Acked-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Simon Horman <horms@verge.net.au>
9 years agoipvs: Pass ipvs not net to ip_vs_service_find
Eric W. Biederman [Mon, 21 Sep 2015 18:01:49 +0000 (13:01 -0500)]
ipvs: Pass ipvs not net to ip_vs_service_find

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Acked-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Simon Horman <horms@verge.net.au>
9 years agoipvs: Pass ipvs not net to __ip_vs_service_find
Eric W. Biederman [Mon, 21 Sep 2015 18:01:48 +0000 (13:01 -0500)]
ipvs: Pass ipvs not net to __ip_vs_service_find

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Acked-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Simon Horman <horms@verge.net.au>
9 years agoipvs: Pass ipvs not net to ip_vs_svc_hashkey
Eric W. Biederman [Mon, 21 Sep 2015 18:01:47 +0000 (13:01 -0500)]
ipvs: Pass ipvs not net to ip_vs_svc_hashkey

Use the address of ipvs not the address of net when computing the
hash value.  This removes an unncessary dependency on struct net.

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Acked-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Simon Horman <horms@verge.net.au>
9 years agoipvs: Pass ipvs not net to __ip_vs_svc_fwm_find
Eric W. Biederman [Mon, 21 Sep 2015 18:01:46 +0000 (13:01 -0500)]
ipvs: Pass ipvs not net to __ip_vs_svc_fwm_find

ipvs is what the code actually wants to use.

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Acked-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Simon Horman <horms@verge.net.au>
9 years agoipvs: Pass ipvs not net to ip_vs_svc_fwm_hashkey
Eric W. Biederman [Mon, 21 Sep 2015 18:01:45 +0000 (13:01 -0500)]
ipvs: Pass ipvs not net to ip_vs_svc_fwm_hashkey

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Acked-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Simon Horman <horms@verge.net.au>
9 years agoipvs: Store ipvs not net in struct ip_vs_service
Eric W. Biederman [Mon, 21 Sep 2015 18:01:44 +0000 (13:01 -0500)]
ipvs: Store ipvs not net in struct ip_vs_service

In practice struct netns_ipvs is as meaningful as struct net and more
useful as it holds the ipvs specific data.  So store a pointer to
struct netns_ipvs.

Update the accesses of param->net to access param->ipvs->net instead.

In functions where we are searching for an svc and filtering by net
filter by ipvs instead.

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Acked-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Simon Horman <horms@verge.net.au>
9 years agoipvs: Pass ipvs not net to ip_vs_fill_conn
Eric W. Biederman [Mon, 21 Sep 2015 18:01:43 +0000 (13:01 -0500)]
ipvs: Pass ipvs not net to ip_vs_fill_conn

ipvs is what is actually desired so change the parameter and the modify
the callers to pass struct netns_ipvs.

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Acked-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Simon Horman <horms@verge.net.au>
9 years agoipvs: Store ipvs not net in struct ip_vs_conn_param
Eric W. Biederman [Mon, 21 Sep 2015 18:01:42 +0000 (13:01 -0500)]
ipvs: Store ipvs not net in struct ip_vs_conn_param

In practice struct netns_ipvs is as meaningful as struct net and more
useful as it holds the ipvs specific data.  So store a pointer to
struct netns_ipvs.

Update the accesses of param->net to access param->ipvs->net instead.

When lookup up struct ip_vs_conn in a hash table replace comparisons
of cp->net with comparisons of cp->ipvs which is possible
now that ipvs is present in ip_vs_conn_param.

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Acked-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Simon Horman <horms@verge.net.au>
9 years agoipvs: Store ipvs not net in struct ip_vs_conn
Eric W. Biederman [Mon, 21 Sep 2015 18:01:41 +0000 (13:01 -0500)]
ipvs: Store ipvs not net in struct ip_vs_conn

In practice struct netns_ipvs is as meaningful as struct net and more
useful as it holds the ipvs specific data.  So store a pointer to
struct netns_ipvs.

Update the accesses of conn->net to access conn->ipvs->net instead.

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Acked-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Simon Horman <horms@verge.net.au>
9 years agoipvs: Use state->net in the ipvs forward functions
Eric W. Biederman [Mon, 21 Sep 2015 18:01:40 +0000 (13:01 -0500)]
ipvs: Use state->net in the ipvs forward functions

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Acked-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Simon Horman <horms@verge.net.au>
9 years agoipvs: Don't use current in proc_do_defense_mode
Eric W. Biederman [Mon, 21 Sep 2015 18:01:39 +0000 (13:01 -0500)]
ipvs: Don't use current in proc_do_defense_mode

Instead store ipvs in extra2 so that proc_do_defense_mode can easily
find the ipvs that it's value is associated with.

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Acked-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Simon Horman <horms@verge.net.au>
9 years agoipvs: Hoist computation of ipvs earlier in sctp_conn_schedule
Eric W. Biederman [Mon, 21 Sep 2015 18:01:38 +0000 (13:01 -0500)]
ipvs: Hoist computation of ipvs earlier in sctp_conn_schedule

The addition of sysctl_sloppy_sctp in sctp_conn_schedule resulted
in a use of ipvs before it was computed.  Hoist the computation of
ipvs earlier to avoid this problem.

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Acked-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Simon Horman <horms@verge.net.au>
9 years agousbnet: remove invalid check
Andrzej Hajda [Mon, 21 Sep 2015 13:33:59 +0000 (15:33 +0200)]
usbnet: remove invalid check

skb->len is always non-negative.

The problem has been detected using proposed semantic patch
scripts/coccinelle/tests/unsigned_lesser_than_zero.cocci [1].

[1]: http://permalink.gmane.org/gmane.linux.kernel/2038576

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agorndis_wlan: fix checking for default value
Andrzej Hajda [Mon, 21 Sep 2015 13:33:55 +0000 (15:33 +0200)]
rndis_wlan: fix checking for default value

Thresholds uses -1 to indicate that default value should be used.
Since thresholds are unsigned sign checking makes no sense.

The problem has been detected using proposed semantic patch
scripts/coccinelle/tests/unsigned_lesser_than_zero.cocci [1].

[1]: http://permalink.gmane.org/gmane.linux.kernel/2038576

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agoorinoco: fix checking for default value
Andrzej Hajda [Mon, 21 Sep 2015 13:33:54 +0000 (15:33 +0200)]
orinoco: fix checking for default value

Thresholds uses -1 to indicate that default value should be used.
Since thresholds are unsigned sign checking makes no sense.

The problem has been detected using proposed semantic patch
scripts/coccinelle/tests/unsigned_lesser_than_zero.cocci [1].

[1]: http://permalink.gmane.org/gmane.linux.kernel/2038576

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agomwifiex: fix comparison expression
Andrzej Hajda [Mon, 21 Sep 2015 13:33:53 +0000 (15:33 +0200)]
mwifiex: fix comparison expression

To avoid underflows signed variables should be used in expression.

The problem has been detected using proposed semantic patch
scripts/coccinelle/tests/unsigned_lesser_than_zero.cocci [1].

[1]: http://permalink.gmane.org/gmane.linux.kernel/2038576

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Acked-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agonet: brcm80211: fix range check
Andrzej Hajda [Mon, 21 Sep 2015 13:33:52 +0000 (15:33 +0200)]
net: brcm80211: fix range check

Unsigned minus constant is still unsigned so checking its sign makes no
sense.

The problem has been detected using proposed semantic patch
scripts/coccinelle/tests/unsigned_lesser_than_zero.cocci [1].

[1]: http://permalink.gmane.org/gmane.linux.kernel/2038576

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agonet: stmmac: fix type of entry variable
Andrzej Hajda [Mon, 21 Sep 2015 13:33:51 +0000 (15:33 +0200)]
net: stmmac: fix type of entry variable

Variable can store negative values.

The problem has been detected using proposed semantic patch
scripts/coccinelle/tests/unsigned_lesser_than_zero.cocci [1].

[1]: http://permalink.gmane.org/gmane.linux.kernel/2038576

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agonet/ibm/emac: fix type of phy_mode
Andrzej Hajda [Mon, 21 Sep 2015 13:33:50 +0000 (15:33 +0200)]
net/ibm/emac: fix type of phy_mode

phy_mode can be negative.

The problem has been detected using proposed semantic patch
scripts/coccinelle/tests/unsigned_lesser_than_zero.cocci [1].

[1]: http://permalink.gmane.org/gmane.linux.kernel/2038576

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agoisdn: hisax: fix frame calculation
Andrzej Hajda [Mon, 21 Sep 2015 13:33:49 +0000 (15:33 +0200)]
isdn: hisax: fix frame calculation

Difference of unsigned values is also unsigned so it does not make
sense to check its sign.

The problem has been detected using proposed semantic patch
scripts/coccinelle/tests/unsigned_lesser_than_zero.cocci [1].

[1]: http://permalink.gmane.org/gmane.linux.kernel/2038576

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next
David S. Miller [Tue, 22 Sep 2015 20:11:43 +0000 (13:11 -0700)]
Merge git://git./linux/kernel/git/pablo/nf-next

Pablo Neira Ayuso says:

====================
Netfilter/IPVS updates for net-next

The following patchset contains Netfilter/IPVS updates for your net-next tree
in this 4.4 development cycle, they are:

1) Schedule ICMP traffic to IPVS instances, this introduces a new schedule_icmp
   proc knob to enable/disable it. By default is off to retain the old
   behaviour. Patchset from Alex Gartrell.

I'm also including what Alex originally said for the record:

"The configuration of ipvs at Facebook is relatively straightforward.  All
ipvs instances bgp advertise a set of VIPs and the network prefers the
nearest one or uses ECMP in the event of a tie.  For the uninitiated, ECMP
deterministically and statelessly load balances by hashing the packet
(usually a 5-tuple of protocol, saddr, daddr, sport, and dport) and using
that number as an index (basic hash table type logic).

The problem is that ICMP packets (which contain really important
information like whether or not an MTU has been exceeded) will get a
different hash value and may end up at a different ipvs instance.  With no
information about where to route these packets, they are dropped, creating
ICMP black holes and breaking Path MTU discovery.  Suddenly, my mom's
pictures can't load and I'm fielding midday calls that I want nothing to do
with.

To address this, this patch set introduces the ability to schedule icmp
packets which is gated by a sysctl net.ipv4.vs.schedule_icmp.  If set to 0,
the old behavior is maintained -- otherwise ICMP packets are scheduled."

2) Add another proc entry to ignore tunneled packets to avoid routing loops
   from IPVS, also from Alex.

3) Fifteen patches from Eric Biederman to:

* Stop passing nf_hook_ops as parameter to the hook and use the state hook
  object instead all around the netfilter code, so only the private data
  pointer is passed to the registered hook function.

* Now that we've got state->net, propagate the netns pointer to netfilter hook
  clients to avoid its computation over and over again. A good example of how
  this has been simplified is the former TEE target (now nf_dup infrastructure)
  since it has killed the ugly pick_net() function.

There's another round of netns updates from Eric Biederman making the line. To
avoid the patchbomb again to almost all the networking mailing list (that is 84
patches) I'd suggest we send you a pull request with no patches or let me know
if you prefer a better way.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agodrivers/net/ieee802154/at86rf230.c: seq_printf() now returns NULL
Stephen Rothwell [Tue, 22 Sep 2015 03:41:44 +0000 (20:41 -0700)]
drivers/net/ieee802154/at86rf230.c: seq_printf() now returns NULL

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Alexander Aring <alex.aring@gmail.com>
Cc: Stefan Schmidt <stefan@osg.samsung.com>
Cc: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agoMerge branch 'cpsw-macid-no-of'
David S. Miller [Tue, 22 Sep 2015 00:21:47 +0000 (17:21 -0700)]
Merge branch 'cpsw-macid-no-of'

Mugunthan V N says:

====================
Add support for reading macid when DT macid not found

Did a boot test on dra7-evm [1] and am437x-gp-evm [2].
Pushed a branch [3] for others to test the patch.

[1]: http://pastebin.ubuntu.com/12513420/
[2]: http://pastebin.ubuntu.com/12513428/
[3]: git://git.ti.com/~mugunthanvnm/ti-linux-kernel/linux.git cpsw-macid-read-support
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agoarm: dts: am4372: add syscon phandle to cpsw node
Mugunthan V N [Mon, 21 Sep 2015 10:26:53 +0000 (15:56 +0530)]
arm: dts: am4372: add syscon phandle to cpsw node

There are 2 MACIDs stored in the control module of the am4372.
These are read by the cpsw driver if no valid MACID was found
in the devicetree.

Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agoarm: dts: dra7: add syscon phandle to cpsw node
Mugunthan V N [Mon, 21 Sep 2015 10:26:52 +0000 (15:56 +0530)]
arm: dts: dra7: add syscon phandle to cpsw node

There are 2 MACIDs stored in the control module of the dra7.
These are read by the cpsw driver if no valid MACID was found
in the devicetree.

Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agodrivers: net: cpsw-common: add support for reading mac address for dra7 and am437x...
Mugunthan V N [Mon, 21 Sep 2015 10:26:51 +0000 (15:56 +0530)]
drivers: net: cpsw-common: add support for reading mac address for dra7 and am437x platforms

Adding support for reading mac address using syscon driver for
dra7 and am437x platforms

Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agodrivers: net: cpsw: davinci_emac: move reading mac id to common file
Mugunthan V N [Mon, 21 Sep 2015 10:26:50 +0000 (15:56 +0530)]
drivers: net: cpsw: davinci_emac: move reading mac id to common file

Moving mac address reading from ethernet driver to common
file for better maintenance and for code reusable.

Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agoMerge tag 'linux-can-next-for-4.4-20150921' of git://git.kernel.org/pub/scm/linux...
David S. Miller [Tue, 22 Sep 2015 00:15:03 +0000 (17:15 -0700)]
Merge tag 'linux-can-next-for-4.4-20150921' of git://git./linux/kernel/git/mkl/linux-can-next

Marc Kleine-Budde says:

====================
pull-request: can-next 2015-09-17

this is a pull request of 8 patches for net-next/master.

All 8 patches are by me and cleanup the flexcan driver.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agonet: bcmgenet: Remove duplicate test for tx_coalesce_usecs_high
Florian Fainelli [Fri, 18 Sep 2015 21:16:53 +0000 (14:16 -0700)]
net: bcmgenet: Remove duplicate test for tx_coalesce_usecs_high

We were checking twice for ec->tx_coalesce_usecs_high, remove the
duplicate test.

Reported-by: Julia Lawall <julia.lawall@lip6.fr>
Reported-by: kbuild-all@01.org
Fixes: 2f9130709d2c19 ("net: bcmgenet: Implement TX coalescing control knobs")
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agotcp: send loss probe after 1s if no RTT available
Yuchung Cheng [Fri, 18 Sep 2015 18:40:33 +0000 (11:40 -0700)]
tcp: send loss probe after 1s if no RTT available

This patch makes TLP to use 1 sec timer by default when RTT is
not available due to SYN/ACK retransmission or SYN cookies.

Prior to this change, the lack of RTT prevents TLP so the first
data packets sent can only be recovered by fast recovery or RTO.
If the fast recovery fails to trigger the RTO is 3 second when
SYN/ACK is retransmitted. With this patch we can trigger fast
recovery in 1sec instead.

Note that we need to check Fast Open more properly. A Fast Open
connection could be (accepted then) closed before it receives
the final ACK of 3WHS so the state is FIN_WAIT_1. Without the
new check, TLP will retransmit FIN instead of SYN/ACK.

Signed-off-by: Yuchung Cheng <ycheng@google.com>
Signed-off-by: Nandita Dukkipati <nanditad@google.com>
Signed-off-by: Neal Cardwell <ncardwell@google.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agotcp: usec resolution SYN/ACK RTT
Yuchung Cheng [Fri, 18 Sep 2015 18:36:14 +0000 (11:36 -0700)]
tcp: usec resolution SYN/ACK RTT

Currently SYN/ACK RTT is measured in jiffies. For LAN the SYN/ACK
RTT is often measured as 0ms or sometimes 1ms, which would affect
RTT estimation and min RTT samping used by some congestion control.

This patch improves SYN/ACK RTT to be usec resolution if platform
supports it. While the timestamping of SYN/ACK is done in request
sock, the RTT measurement is carefully arranged to avoid storing
another u64 timestamp in tcp_sock.

For regular handshake w/o SYNACK retransmission, the RTT is sampled
right after the child socket is created and right before the request
sock is released (tcp_check_req() in tcp_minisocks.c)

For Fast Open the child socket is already created when SYN/ACK was
sent, the RTT is sampled in tcp_rcv_state_process() after processing
the final ACK an right before the request socket is released.

If the SYN/ACK was retransmistted or SYN-cookie was used, we rely
on TCP timestamps to measure the RTT. The sample is taken at the
same place in tcp_rcv_state_process() after the timestamp values
are validated in tcp_validate_incoming(). Note that we do not store
TS echo value in request_sock for SYN-cookies, because the value
is already stored in tp->rx_opt used by tcp_ack_update_rtt().

One side benefit is that the RTT measurement now happens before
initializing congestion control (of the passive side). Therefore
the congestion control can use the SYN/ACK RTT.

Signed-off-by: Yuchung Cheng <ycheng@google.com>
Signed-off-by: Neal Cardwell <ncardwell@google.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agoMerge branch 's390-next'
David S. Miller [Mon, 21 Sep 2015 23:03:05 +0000 (16:03 -0700)]
Merge branch 's390-next'

Ursula Braun says:

====================
s390: qeth and iucv patches

here is version 2 of some s390 related qeth patches for net-next. The patch by
Thomas Richter adds a new feature to the qeth layer2 code; the remaining
patches are minor improvements.
Version 2 of patch 4 uses the desired indentation in function declarations
and definitions spanning multiple lines in almost all cases. Thomas run into a
conflict with the maximum number of columns once. Thus you will still see one
function definition using an earlier column before the opening paranthesis.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agos390/iucv: do not use arrays as argument
Ursula Braun [Fri, 18 Sep 2015 14:06:52 +0000 (16:06 +0200)]
s390/iucv: do not use arrays as argument

The iucv code uses arrays as arguments. Even though this does not
really cause a problem, it could be misleading, since the compiler
turns array arguments into just a pointer argument. To be more
precise this patch changes the array arguments into pointers.

Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agoqeth: add layer 2 RX/TX checksum offloading
Thomas Richter [Fri, 18 Sep 2015 14:06:51 +0000 (16:06 +0200)]
qeth: add layer 2 RX/TX checksum offloading

Checksum offloading for send and receive is already
supported for layer 3 (IP layer). This patch
adds support for RX and TX hardware checksum offloading
for layer 2 (MAC layer). The hardware calculates the checksum
for IP UDP and TCP packets.

This patch moves the hardware checksum offloading setup
to the set of common functions in qeth_core_main.c.
Layer 2 and layer 3 now simply call the same common functions.

Also note that TX checksum offloading is always enabled.
The device driver relies on the TCP/IP stack to make use of
this feature.

Signed-off-by: Thomas Richter <tmricht@linux.vnet.ibm.com>
Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com>
Reviewed-by: Eugene Crosser <Eugene.Crosser@ru.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agoqeth: move OSA portname into deprecated status
Ursula Braun [Fri, 18 Sep 2015 14:06:50 +0000 (16:06 +0200)]
qeth: move OSA portname into deprecated status

An OSA-Express port name was required to identify a shared OSA port.
All operating system instances that shared the port had to use the
same port name. This requirement no longer applies.

Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agoqeth: no write permission for readonly sysattr
Lakhvich Dmitriy [Fri, 18 Sep 2015 14:06:49 +0000 (16:06 +0200)]
qeth: no write permission for readonly sysattr

User is not allowed to write into bridge_state sysfs file.
Fixed attribute not mislead the user

Signed-off-by: Lakhvich Dmitriy <ldmitriy@ru.ibm.com>
Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com>
Reported-by: Peter Oberparleiter <oberpar@linux.vnet.ibm.com>
Reviewed-by: Eugene Crosser <Eugene.Crosser@ru.ibm.com>
Reviewed-by: Thomas Richter <tmricht@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agoqeth: remove extraneous length from %pM format
Eugene Crosser [Fri, 18 Sep 2015 14:06:48 +0000 (16:06 +0200)]
qeth: remove extraneous length from %pM format

Length specifier in the %pM format is not supported (at least, not
documented). Remove it, and also an extraneous '&' for the array.

Signed-off-by: Eugene Crosser <Eugene.Crosser@ru.ibm.com>
Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com>
Suggested-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>