[PATCH] net: Remove remaining remnants of pm_qos from netdevice.h

2015-05-09 Thread David Ahern
Commit e2c6544829f removed pm_qos from struct net_device but left the comment above header file. Remove those. Signed-off-by: David Ahern dsah...@gmail.com Cc: Thomas Graf tg...@suug.ch --- include/linux/netdevice.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/include/linux/netdevice.h

[PATCH 1/2] e1000e: Add pm_qos header

2015-05-12 Thread David Ahern
Commit e2c6544829f moved pm_qos_req to e1000_adapter. Add the header file that defines the struct. Signed-off-by: David Ahern dsah...@gmail.com Cc: Thomas Graf tg...@suug.ch Cc: Jeff Kirsher jeffrey.t.kirs...@intel.com --- drivers/net/ethernet/intel/e1000e/e1000.h | 1 + 1 file changed, 1

Re: [RFC net-next 2/3] VRF driver and needed infrastructure

2015-06-08 Thread David Ahern
On 6/8/15 12:35 PM, Shrijeet Mukherjee wrote: diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig index 019fcef..27a333c 100644 --- a/drivers/net/Kconfig +++ b/drivers/net/Kconfig @@ -283,6 +283,12 @@ config NLMON diagnostics, etc. This is mostly intended for developers or support

Re: [RFC net-next 0/3] Proposal for VRF-lite

2015-06-08 Thread David Ahern
On 6/8/15 12:35 PM, Shrijeet Mukherjee wrote: 5. Debugging is built-in as tcpdump and counters on the VRF device works as is. Is the intent that something like this tcpdump -i vrf0 can be used to see vrf traffic? vrf_handle_frame only bumps counters; it does not switch skb-dev to the

Re: [RFC net-next 3/3] rcv path changes for vrf traffic

2015-06-08 Thread David Ahern
On 6/8/15 1:58 PM, Hannes Frederic Sowa wrote: Hi Shrijeet, On Mo, 2015-06-08 at 11:35 -0700, Shrijeet Mukherjee wrote: From: Shrijeet Mukherjee s...@cumulusnetworks.com Incoming frames for IP protocol stacks need the IIF to be changed from the actual interface to the VRF device. This allows

Re: [RFC net-next 3/3] rcv path changes for vrf traffic

2015-06-08 Thread David Ahern
On 6/8/15 1:58 PM, Hannes Frederic Sowa wrote: For rx layer I want to also propose my try: [PATCH net-next RFC] net: ipv4: arp: strong end system model semantics by per-interface local table override I applied only the first 2 patches from Shrijeet and then tried to apply your patch; it

Re: [RFC net-next 0/3] Proposal for VRF-lite

2015-06-09 Thread David Ahern
Hi Nicolas: On 6/9/15 2:58 AM, Nicolas Dichtel wrote: I'm not really in favor of the name 'vrf'. This term is very controversial and having a consensus of what is/contains a 'vrf' is quite impossible. There was already a lot of discussions about this topic on quagga ml that show that everybody

Re: [PATCH net-next] switchdev: fix BUG when port driver doesn't support set attr op

2015-06-10 Thread David Ahern
On 6/10/15 2:56 PM, sfel...@gmail.com wrote: From: Scott Feldman sfel...@gmail.com Fix a BUG() where CONFIG_NET_SWITCHDEV is set but the driver for a bridged port does not support switchdec_port_attr_set op. Don't BUG() if -EOPNOTSUPP is returned. Signed-off-by: Scott Feldman

Re: [PATCH net-next] switchdev: fix BUG when port driver doesn't support set attr op

2015-06-10 Thread David Ahern
On 6/10/15 3:47 PM, Scott Feldman wrote: Should that be WARN_ON instead of BUG_ON? I think I had it as WARN when we were working on the initial patches, but we changed it to BUG_ON because we should only get an error here if the driver screwed something up between PREPARE phase and COMMIT

Re: [RFC net-next 3/6] net: Introduce VRF device driver - v2

2015-07-06 Thread David Ahern
On 7/6/15 10:37 AM, Nikolay Aleksandrov wrote: +static int vrf_add_slave(struct net_device *dev, +struct net_device *port_dev) +{ + if (!dev || !port_dev || dev_net(dev) != dev_net(port_dev)) + return -ENODEV; + + if (!vrf_is_master(port_dev)

[RFC net-next 5/6] net: Add sk_bind_dev_if to task_struct

2015-07-06 Thread David Ahern
Allow tasks to have a default device index for binding sockets. If set the value is passed to all AF_INET/AF_INET6 sockets when they are created. The task setting is passed parent to child on fork, but can be set or changed after task creation using prctl (if task has CAP_NET_ADMIN permissions).

[RFC net-next 3/6] net: Introduce VRF device driver - v2

2015-07-06 Thread David Ahern
to vrf 1: ip link set eth1 master vrf1 Signed-off-by: Shrijeet Mukherjee s...@cumulusnetworks.com Signed-off-by: David Ahern d...@cumulusnetworks.com v2: - addressed comments from first RFC - significant changes to improve simplicity of implementation --- drivers/net/Kconfig | 7 + drivers

[RFC net-next 4/6] net: Modifications to ipv4 stack for VRF devices

2015-07-06 Thread David Ahern
bound to VRF device + TCP server not bound to VRF device but working through it * client connections are bound to VRF device + UDP server and client bound to VRF device Signed-off-by: Shrijeet Mukherjee s...@cumulusnetworks.com Signed-off-by: David Ahern d...@cumulusnetworks.com

[RFC PATCH] iproute2: Add support for VRF device

2015-07-06 Thread David Ahern
Allow user to create a vrf device and specify its table binding. Based on the iplink_vlan implementation. Signed-off-by: Shrijeet Mukherjee s...@cumulusnetworks.com Signed-off-by: David Ahern d...@cumulusnetworks.com --- include/linux/if_link.h | 8 + ip/Makefile | 2 +- ip

[RFC net-next 1/6] fib: export symbols

2015-07-06 Thread David Ahern
This change is needed for the following VRF driver. No active code path changes. Signed-off-by: Shrijeet Mukherjee s...@cumulusnetworks.com Signed-off-by: David Ahern d...@cumulusnetworks.com --- net/ipv4/fib_frontend.c | 1 + net/ipv4/fib_trie.c | 1 + 2 files changed, 2 insertions

[RFC net-next 6/6] net: Add chvrf command

2015-07-06 Thread David Ahern
Example of how to use the default bind to interface option for tasks and correlate with VRF devices. Signed-off-by: David Ahern d...@cumulusnetworks.com --- tools/net/Makefile | 6 +- tools/net/chvrf.c | 225 + 2 files changed, 229

[RFC net-next 0/6] Proposal for VRF-lite - v2

2015-07-06 Thread David Ahern
or NOT VRFs e, f, g Bug-Fixes and ideas from Hannes, Roopa Prabhu, Jon Toppins, Jamal Patches can also be pulled from: https://github.com/dsahern/linux.git, vrf-dev-4.1 branch https://github.com/dsahern/iproute2, vrf-dev-4.1 branch Shrijeet Mukherjee and David Ahern (6): fib: export

[RFC net-next 2/6] net: Preparation for vrf device

2015-07-06 Thread David Ahern
-by: David Ahern d...@cumulusnetworks.com --- include/linux/netdevice.h| 21 + include/uapi/linux/if_link.h | 9 + 2 files changed, 30 insertions(+) diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index e20979dfd6a9..142cb64f139c 100644 --- a/include

[PATCH] net: Updates to netif_index_is_vrf

2015-08-15 Thread David Ahern
As Eric noted netif_index_is_vrf is not called with rcu_read_lock held, so use dev_get_by_index instead of dev_get_by_index_rcu. If VRF is not enabled or oif is 0 skip the device lookup. Signed-off-by: David Ahern d...@cumulusnetworks.com --- include/linux/netdevice.h | 14 +++--- 1

[PATCH] net: Move VRF change to udp_sendmsg to inlined function

2015-08-15 Thread David Ahern
Functionally equivalent, but as an inlined function with VRF config check it completely compiles out if VRF is not enabled. Suggested-by: Tom Herbert t...@herbertland.com Signed-off-by: David Ahern d...@cumulusnetworks.com --- net/ipv4/udp.c | 44 1

Re: [PATCH] net: Updates to netif_index_is_vrf

2015-08-16 Thread David Ahern
On 8/15/15 6:39 PM, Florian Westphal wrote: David Ahern d...@cumulusnetworks.com wrote: As Eric noted netif_index_is_vrf is not called with rcu_read_lock held, so use dev_get_by_index instead of dev_get_by_index_rcu. If VRF is not enabled or oif is 0 skip the device lookup. Signed-off

[PATCH net-next v2] net: Updates to netif_index_is_vrf

2015-08-16 Thread David Ahern
As Eric noted netif_index_is_vrf is not called with rcu_read_lock held, so wrap the dev_get_by_index_rcu in rcu_read_lock and unlock. If VRF is not enabled or oif is 0 skip the device lookup. In both cases index cannot be the VRF master. Signed-off-by: David Ahern d...@cumulusnetworks.com --- v2

[PATCH] net: Fix docbook warning for IFF_VRF_MASTER enum

2015-08-16 Thread David Ahern
(include/linux/netdevice.h:1293): Enum value 'IFF_VRF_MASTER' not described in enum 'netdev_priv_flags' Signed-off-by: David Ahern d...@cumulusnetworks.com diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 2d3cd86c5618..aa8b79dd08d8 100644 --- a/include/linux/netdevice.h

Re: [net-next]: unable to add routes to tables

2015-08-18 Thread David Ahern
On 8/18/15 10:57 AM, Andreas Schultz wrote: Hi, It seems that the policy for adding routes to tables has changed between Linux 4.2-rc6 and net-next. In Linux main line (tested up to 4.2-rc6), with this main routing table: # ip route show table main ... 172.28.0.0/24 dev vnf-xe1p0 proto kernel

Re: [net-next]: unable to add routes to tables

2015-08-18 Thread David Ahern
On 8/18/15 10:57 AM, Andreas Schultz wrote: Hi, It seems that the policy for adding routes to tables has changed between Linux 4.2-rc6 and net-next. In Linux main line (tested up to 4.2-rc6), with this main routing table: # ip route show table main ... 172.28.0.0/24 dev vnf-xe1p0 proto kernel

Re: [PATCH net-next] vrf: plug skb leaks

2015-08-19 Thread David Ahern
Hi Nikolay: On 8/18/15 8:12 PM, Nikolay Aleksandrov wrote: diff --git a/drivers/net/vrf.c b/drivers/net/vrf.c index ed208317cbb5..4aa06450fafa 100644 --- a/drivers/net/vrf.c +++ b/drivers/net/vrf.c @@ -97,6 +97,12 @@ static bool is_ip_rx_frame(struct sk_buff *skb) return false; }

Re: [PATCH net-next 0/4] vrf: cleanups part 2

2015-08-19 Thread David Ahern
. Thanks, Nikolay. Acked-by: David Ahern d...@cumulusnetworks.com -- To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH net-next 0/4] vrf: a few simplifications and cleanups

2015-08-18 Thread David Ahern
(+), 12 deletions(-) Looks good to me. Thanks, Nikolay. Acked-by: David Ahern d...@cumulusnetworks.com -- To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

[PATCH] net: Fix nexthop lookups

2015-08-19 Thread David Ahern
changed the lookup to use the passed in table but for cases like this the nexthop is in the local table rather than the passed in table. Fixes: 3bfd847203c (net: Use passed in table for nexthop lookups) Reported-by: Andreas Schultz aschu...@tpip.net Signed-off-by: David Ahern d...@cumulusnetworks.com

Re: [PATCH net-next] vrf: vrf_master_ifindex_rcu is not always called with rcu read lock

2015-08-18 Thread David Ahern
On 8/18/15 10:17 AM, Nikolay Aleksandrov wrote: diff --git a/include/net/vrf.h b/include/net/vrf.h index 40e3793c7a05..22dfe2195092 100644 --- a/include/net/vrf.h +++ b/include/net/vrf.h @@ -35,7 +35,6 @@ struct net_vrf { #if IS_ENABLED(CONFIG_NET_VRF) -/* called with rcu_read_lock() */

Re: [PATCH net-next] vrf: plug skb leaks

2015-08-19 Thread David Ahern
On 8/19/15 1:17 PM, Nikolay Aleksandrov wrote: On Aug 19, 2015, at 8:27 PM, Nikolay Aleksandrov niko...@cumulusnetworks.com wrote: On Aug 19, 2015 20:13, David Ahern d...@cumulusnetworks.com wrote: Hi Nikolay: On 8/18/15 8:12 PM, Nikolay Aleksandrov wrote: diff --git a/drivers/net

[PATCH net-next] vrf: Add ethernet header for pass through VRF device

2015-08-23 Thread David Ahern
echo request, id 23795, seq 1, length 64 05:36:15.714160 IP 10.2.1.2 10.2.1.254: ICMP echo reply, id 23795, seq 1, length 64 ... Signed-off-by: David Ahern d...@cumulusnetworks.com --- drivers/net/vrf.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/drivers/net/vrf.c b

[PATCH net-next] inetpeer: remove dead code

2015-08-23 Thread David Ahern
Remove various inlined functions not referenced in the kernel. Signed-off-by: David Ahern d...@cumulusnetworks.com --- include/net/inetpeer.h | 67 -- 1 file changed, 67 deletions(-) diff --git a/include/net/inetpeer.h b/include/net/inetpeer.h

[PATCH net-next] inetpeer: Add support for VRFs

2015-08-23 Thread David Ahern
inetpeer caches based on address only, so duplicate IP addresses within a namespace return the same cached entry. Similar to IP fragments handle duplicate addresses across VRFs by adding the VRF master device index to the lookup. Signed-off-by: David Ahern d...@cumulusnetworks.com --- include

Re: [PATCH] net af_key: Fix RCU splat

2015-08-20 Thread David Ahern
On 8/20/15 9:51 AM, Eric Dumazet wrote: On Thu, 2015-08-20 at 08:51 -0700, David Ahern wrote: Hit the following splat testing VRF change for ipsec: [ 113.475692] === [ 113.476194] [ INFO: suspicious RCU usage. ] [ 113.476667] 4.2.0-rc6-1+deb7u2+clUNRELEASED

Re: [PATCH net-next v2] vrf: vrf_master_ifindex_rcu is not always called with rcu read lock

2015-08-18 Thread David Ahern
On 8/18/15 12:15 PM, Nikolay Aleksandrov wrote: diff --git a/include/net/vrf.h b/include/net/vrf.h index 3bb4af462ed6..b039850a94a3 100644 --- a/include/net/vrf.h +++ b/include/net/vrf.h @@ -34,7 +34,6 @@ struct net_vrf { #if IS_ENABLED(CONFIG_NET_VRF) -/* called with rcu_read_lock() */

[PATCH] net: FIB tracepoints

2015-08-18 Thread David Ahern
Signed-off-by: David Ahern d...@cumulusnetworks.com --- I realize the sensitivity around adding tracepoints, but these have been invaluable developing the VRF device driver along with a return probe: perf probe -a 'fib_table_lookup_ret=fib_table_lookup%return ret=%ax' include/trace/events

[PATCH ipsec-next] xfrm: Use VRF master index if output device is enslaved

2015-08-18 Thread David Ahern
Directs route lookups to VRF table. Compiles out if NET_VRF is not enabled. With this patch able to successfully bring up ipsec tunnels in VRFs, even with duplicate network configuration (IPv4 tested). Signed-off-by: David Ahern d...@cumulusnetworks.com --- net/ipv4/xfrm4_policy.c | 7

Re: [PATCH net-next v2] net: Move VRF change to udp_sendmsg to function

2015-08-18 Thread David Ahern
On 8/18/15 10:03 AM, Eric Dumazet wrote: +/* unconnected socket. If output device is enslaved to a VRF + * device lookup source address from VRF table. + */ +static void udp_sendmsg_vrf_saddr(struct net *net, struct flowi4 *fl4, + int oif, struct sock *sk) +{ +

Re: linux-next: unregister_netdevice: waiting for lo to become free. Usage count = 1

2015-08-18 Thread David Ahern
On 8/18/15 9:24 AM, Andrey Wagin wrote: Hello David, CRIU tests detetect that references on net devices leak on 4.2.0-rc6-next-20150817. Looks like it started with v4.2-rc6-882-g3bfd847. 1e3136789975f03e461798149309034e5213c1b4 should have fixed it. David -- To unsubscribe from this list:

[PATCH net-next v2] net: Move VRF change to udp_sendmsg to function

2015-08-18 Thread David Ahern
Functionally equivalent, but as a separate function with VRF config check. After 2f52bdcf6ba (net: Updates to netif_index_is_vrf) function completely compiles out if VRF is not enabled; additional CONFIG check is not needed. Suggested-by: Tom Herbert t...@herbertland.com Signed-off-by: David

[PATCH] inet: Move VRF table lookup to inlined function

2015-08-16 Thread David Ahern
Table lookup compiles out when VRF is not enabled. Signed-off-by: David Ahern d...@cumulusnetworks.com --- include/net/vrf.h | 24 net/ipv4/af_inet.c | 10 +- 2 files changed, 25 insertions(+), 9 deletions(-) diff --git a/include/net/vrf.h b/include/net/vrf.h

Re: [PATCH net-next] inetpeer: Add support for VRFs

2015-08-23 Thread David Ahern
On 8/23/15 6:15 PM, Thomas Graf wrote: On 08/23/15 at 08:26am, David Ahern wrote: inetpeer caches based on address only, so duplicate IP addresses within a namespace return the same cached entry. Similar to IP fragments handle duplicate addresses across VRFs by adding the VRF master device

[PATCH] net af_key: Fix RCU splat

2015-08-20 Thread David Ahern
. Fix by using GFP_ATOMIC for the allocation flag. Signed-off-by: David Ahern d...@cumulusnetworks.com --- net/key/af_key.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/key/af_key.c b/net/key/af_key.c index b397f0aa9005..73527e7dd247 100644 --- a/net/key/af_key.c +++ b/net

[PATCH ipsec-next v2] xfrm: Use VRF master index if output device is enslaved

2015-08-20 Thread David Ahern
Directs route lookups to VRF table. Compiles out if NET_VRF is not enabled. With this patch able to successfully bring up ipsec tunnels in VRFs, even with duplicate network configuration. Signed-off-by: David Ahern d...@cumulusnetworks.com --- v2 - use vrf_master_ifindex rather than

Re: [net-next 0/16] Proposal for VRF-lite - v3

2015-07-28 Thread David Ahern
On 7/27/15 2:30 PM, Eric W. Biederman wrote: This paragraph is false when it comes to sockets, as I have already pointed out. - VPN Routing and Forwarding (RFC4364 and it's kin) implies isolation strong enough to allow using the the same ip on different machines in different VPN instances

Re: [PATCH net-next 14/16] net: Add sk_bind_dev_if to task_struct

2015-07-28 Thread David Ahern
On 7/28/15 10:01 AM, Eric Dumazet wrote: On Tue, 2015-07-28 at 14:19 +0200, Hannes Frederic Sowa wrote: Hello Eric, On Mon, 2015-07-27 at 15:33 -0500, Eric W. Biederman wrote: David Ahern d...@cumulusnetworks.com writes: Allow tasks to have a default device index for binding sockets. If set

Re: [PATCH net-next 14/16] net: Add sk_bind_dev_if to task_struct

2015-07-28 Thread David Ahern
On 7/28/15 9:25 AM, Andy Lutomirski wrote: On Jul 27, 2015 11:33 AM, David Ahern d...@cumulusnetworks.com wrote: Allow tasks to have a default device index for binding sockets. If set the value is passed to all AF_INET/AF_INET6 sockets when they are created. This is not intended

Re: [PATCH net-next 13/16] net: Introduce VRF device driver - v2

2015-07-28 Thread David Ahern
On 7/27/15 2:01 PM, Nikolay Aleksandrov wrote: + + if (!vrf_is_master(dev) || vrf_is_master(port_dev) || Hmm, this means that bonds won't be able to be VRF slaves. They have the IFF_MASTER flag set. Right, will change to the IFF_VRF_MASTER flag. + vrf_is_slave(port_dev))

[PATCH 08/10] net: Use passed in table for nexthop lookups

2015-08-05 Thread David Ahern
route fails: $ ip route add table 10 2.2.2.0/24 via 1.1.1.10 RTNETLINK answers: Network is unreachable With this patch the route is added successfully. Signed-off-by: David Ahern d...@cumulusnetworks.com --- net/ipv4/fib_semantics.c | 13 +++-- 1 file changed, 11 insertions(+), 2

[PATCH net-next 00/10] VRF-lite - v4

2015-08-05 Thread David Ahern
https://github.com/dsahern/iproute2, vrf-dev-v4 branch David Ahern (10): net: Introduce VRF related flags and helpers net: Use VRF device index for lookups on RX net: Use VRF device index for lookups on TX udp: Handle VRF device net: Add inet_addr lookup by table net: Fix up inet_addr_type

[PATCH] iproute2: Add support for VRF device

2015-08-05 Thread David Ahern
Allow user to create a vrf device and specify its table binding. Based on the iplink_vlan implementation. Signed-off-by: Shrijeet Mukherjee s...@cumulusnetworks.com Signed-off-by: David Ahern d...@cumulusnetworks.com --- include/linux/if_link.h | 8 + ip/Makefile | 2 +- ip

[PATCH 01/10] net: Introduce VRF related flags and helpers

2015-08-05 Thread David Ahern
with VRF device. Signed-off-by: Shrijeet Mukherjee s...@cumulusnetworks.com Signed-off-by: David Ahern d...@cumulusnetworks.com --- include/linux/netdevice.h| 20 + include/net/vrf.h| 177 +++ include/uapi/linux/if_link.h | 9 +++ 3

[PATCH 05/10] net: Add inet_addr lookup by table

2015-08-05 Thread David Ahern
to the local table. Signed-off-by: Shrijeet Mukherjee s...@cumulusnetworks.com Signed-off-by: David Ahern d...@cumulusnetworks.com --- include/net/route.h | 1 + net/ipv4/fib_frontend.c | 22 +++--- 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/include/net

[PATCH 03/10] net: Use VRF device index for lookups on TX

2015-08-05 Thread David Ahern
within the table. The FLOWI_FLAG_VRFSRC is used to control this latter part. Signed-off-by: Shrijeet Mukherjee s...@cumulusnetworks.com Signed-off-by: David Ahern d...@cumulusnetworks.com --- include/net/flow.h | 1 + include/net/route.h | 3 +++ net/ipv4/fib_trie.c | 7 +-- net/ipv4/icmp.c

[PATCH 10/10] net: Introduce VRF device driver

2015-08-05 Thread David Ahern
link set eth1 master vrf1 Signed-off-by: Shrijeet Mukherjee s...@cumulusnetworks.com Signed-off-by: David Ahern d...@cumulusnetworks.com --- drivers/net/Kconfig | 7 + drivers/net/Makefile | 1 + drivers/net/vrf.c| 715 +++ include/net/vrf.h

[PATCH 02/10] net: Use VRF device index for lookups on RX

2015-08-05 Thread David Ahern
On ingress use index of VRF master device for route lookups if real device is enslaved. Rules are expected to be installed for the VRF device to direct lookups to a specific table. Signed-off-by: Shrijeet Mukherjee s...@cumulusnetworks.com Signed-off-by: David Ahern d...@cumulusnetworks.com

[PATCH 04/10] udp: Handle VRF device

2015-08-05 Thread David Ahern
For unconnected UDP sockets using a VRF device lookup source address based on VRF table. This allows the UDP header to be properly setup before showing up at the VRF device via the dst. Signed-off-by: Shrijeet Mukherjee s...@cumulusnetworks.com Signed-off-by: David Ahern d...@cumulusnetworks.com

[PATCH 09/10] net: Use VRF device index for socket lookups

2015-08-05 Thread David Ahern
Signed-off-by: David Ahern d...@cumulusnetworks.com --- net/ipv4/syncookies.c | 5 - net/ipv4/tcp_input.c | 6 +- net/ipv4/tcp_ipv4.c | 11 +-- 3 files changed, 18 insertions(+), 4 deletions(-) diff --git a/net/ipv4/syncookies.c b/net/ipv4/syncookies.c index d70b1f603692

[PATCH 07/10] net: Add routes to the table associated with the device

2015-08-05 Thread David Ahern
to the correct table as well. Signed-off-by: David Ahern d...@cumulusnetworks.com --- net/ipv4/fib_frontend.c | 8 net/ipv4/fib_semantics.c | 25 +++-- 2 files changed, 23 insertions(+), 10 deletions(-) diff --git a/net/ipv4/fib_frontend.c b/net/ipv4/fib_frontend.c index

[PATCH 06/10] net: Fix up inet_addr_type checks

2015-08-05 Thread David Ahern
to the local table. inet_addr_type_dev_table keeps the same semantics as inet_addr_type but if the passed in device is enslaved to a VRF then the table for that VRF is used for the lookup. Signed-off-by: David Ahern d...@cumulusnetworks.com --- include/net/route.h | 3 +++ net/ipv4/af_inet.c

Re: [PATCH 09/10] net: Use VRF device index for socket lookups

2015-08-05 Thread David Ahern
Hi Tom: On 8/5/15 12:32 PM, Tom Herbert wrote: On Wed, Aug 5, 2015 at 10:14 AM, David Ahernd...@cumulusnetworks.com wrote: The intent of the VRF device is to leverage the existing SO_BINDTODEVICE as a means of creating L3 domains. Since sockets are expected to be bound to the VRF device the

Re: [PATCH RFC net-next 1/3] RDS-TCP: Make RDS-TCP work correctly when it is set up in a netns other than init_net

2015-07-30 Thread David Ahern
On 7/30/15 2:55 AM, Sowmini Varadhan wrote: diff --git a/net/rds/connection.c b/net/rds/connection.c index da6da57..3bea7b9 100644 --- a/net/rds/connection.c +++ b/net/rds/connection.c @@ -117,7 +117,8 @@ static void rds_conn_reset(struct rds_connection *conn) * For now they are not garbage

Re: [PATCH net-next 6/9] net: Fix up inet_addr_type checks

2015-08-11 Thread David Ahern
On 8/11/15 12:14 PM, David Miller wrote: From: David Ahern d...@cumulusnetworks.com Date: Mon, 10 Aug 2015 11:50:33 -0600 @@ -427,6 +428,7 @@ int inet_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len) struct net *net = sock_net(sk); unsigned short snum

[PATCH net-next 08/11] net: Use passed in table for nexthop lookups

2015-08-13 Thread David Ahern
route fails: $ ip route add table 10 2.2.2.0/24 via 1.1.1.10 RTNETLINK answers: Network is unreachable With this patch the route is added successfully. Signed-off-by: David Ahern d...@cumulusnetworks.com --- net/ipv4/fib_semantics.c | 13 +++-- 1 file changed, 11 insertions(+), 2

[PATCH net-next 01/11] net: Introduce VRF related flags and helpers

2015-08-13 Thread David Ahern
with VRF device. Signed-off-by: Shrijeet Mukherjee s...@cumulusnetworks.com Signed-off-by: David Ahern d...@cumulusnetworks.com --- include/linux/netdevice.h| 20 +++ include/net/vrf.h| 139 +++ include/uapi/linux/if_link.h | 9 +++ 3

[PATCH net-next 05/11] net: Add inet_addr lookup by table

2015-08-13 Thread David Ahern
to the local table. Signed-off-by: Shrijeet Mukherjee s...@cumulusnetworks.com Signed-off-by: David Ahern d...@cumulusnetworks.com --- include/net/route.h | 1 + net/ipv4/fib_frontend.c | 22 +++--- 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/include/net

[PATCH net-next 00/10] VRF-lite - v6

2015-08-13 Thread David Ahern
, and bug-Fixes and ideas from Hannes, Roopa Prabhu, Jon Toppins, Jamal. Patches can also be pulled from: https://github.com/dsahern/linux.git, vrf-dev-v6 branch https://github.com/dsahern/iproute2, vrf-dev-v6 branch David Ahern (11): net: Introduce VRF related flags and helpers net

[PATCH net-next 09/11] net: Use VRF index for oif in ip_send_unicast_reply

2015-08-13 Thread David Ahern
If output device is not specified use VRF device if input device is enslaved. This is needed to ensure tcp acks and resets go out VRF device. Signed-off-by: David Ahern d...@cumulusnetworks.com --- net/ipv4/ip_output.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/net

[PATCH net-next] iproute2: Add support for VRF device

2015-08-13 Thread David Ahern
Allow user to create a vrf device and specify its table binding. Based on the iplink_vlan implementation. Signed-off-by: Shrijeet Mukherjee s...@cumulusnetworks.com Signed-off-by: David Ahern d...@cumulusnetworks.com --- include/linux/if_link.h | 8 + ip/Makefile | 2 +- ip

[PATCH net-next 10/11] net: frags: Add VRF device index to cache and lookup

2015-08-13 Thread David Ahern
-off-by: David Ahern d...@cumulusnetworks.com --- net/ipv4/ip_fragment.c | 18 +- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/net/ipv4/ip_fragment.c b/net/ipv4/ip_fragment.c index d96722ae8979..15762e758861 100644 --- a/net/ipv4/ip_fragment.c +++ b/net/ipv4

[PATCH net-next 02/11] net: Use VRF device index for lookups on RX

2015-08-13 Thread David Ahern
On ingress use index of VRF master device for route lookups if real device is enslaved. Rules are expected to be installed for the VRF device to direct lookups to a specific table. Signed-off-by: Shrijeet Mukherjee s...@cumulusnetworks.com Signed-off-by: David Ahern d...@cumulusnetworks.com

[PATCH net-next 04/11] udp: Handle VRF device in sendmsg

2015-08-13 Thread David Ahern
For unconnected UDP sockets using a VRF device lookup source address based on VRF table. This allows the UDP header to be properly setup before showing up at the VRF device via the dst. Signed-off-by: Shrijeet Mukherjee s...@cumulusnetworks.com Signed-off-by: David Ahern d...@cumulusnetworks.com

[PATCH net-next 03/11] net: Use VRF device index for lookups on TX

2015-08-13 Thread David Ahern
within the table. The FLOWI_FLAG_VRFSRC is used to control this latter part. Signed-off-by: Shrijeet Mukherjee s...@cumulusnetworks.com Signed-off-by: David Ahern d...@cumulusnetworks.com --- include/net/flow.h | 1 + include/net/route.h | 3 +++ net/ipv4/fib_trie.c | 7 +-- net/ipv4/icmp.c

[PATCH net-next 07/11] net: Add routes to the table associated with the device

2015-08-13 Thread David Ahern
to the correct table as well. Signed-off-by: David Ahern d...@cumulusnetworks.com --- net/ipv4/fib_frontend.c | 8 net/ipv4/fib_semantics.c | 25 +++-- 2 files changed, 23 insertions(+), 10 deletions(-) diff --git a/net/ipv4/fib_frontend.c b/net/ipv4/fib_frontend.c index

[PATCH net-next 06/11] net: Fix up inet_addr_type checks

2015-08-13 Thread David Ahern
to the local table. inet_addr_type_dev_table keeps the same semantics as inet_addr_type but if the passed in device is enslaved to a VRF then the table for that VRF is used for the lookup. Signed-off-by: David Ahern d...@cumulusnetworks.com --- include/net/route.h | 3 +++ net/ipv4/af_inet.c

[PATCH net-next 11/11] net: Introduce VRF device driver

2015-08-13 Thread David Ahern
link set eth1 master vrf1 Signed-off-by: Shrijeet Mukherjee s...@cumulusnetworks.com Signed-off-by: David Ahern d...@cumulusnetworks.com --- drivers/net/Kconfig | 7 + drivers/net/Makefile | 1 + drivers/net/vrf.c| 685 +++ 3 files changed

[PATCH net-next 9/9] net: Introduce VRF device driver

2015-08-10 Thread David Ahern
link set eth1 master vrf1 Signed-off-by: Shrijeet Mukherjee s...@cumulusnetworks.com Signed-off-by: David Ahern d...@cumulusnetworks.com --- drivers/net/Kconfig | 7 + drivers/net/Makefile | 1 + drivers/net/vrf.c| 685 +++ 3 files changed

[PATCH net-next 00/10] VRF-lite - v5

2015-08-10 Thread David Ahern
, many code reviews whipping the device driver into shape, and bug-Fixes and ideas from Hannes, Roopa Prabhu, Jon Toppins, Jamal. Patches can also be pulled from: https://github.com/dsahern/linux.git, vrf-dev-v5 branch https://github.com/dsahern/iproute2, vrf-dev-v5 branch David Ahern (9

[PATCH net-next 2/9] net: Use VRF device index for lookups on RX

2015-08-10 Thread David Ahern
On ingress use index of VRF master device for route lookups if real device is enslaved. Rules are expected to be installed for the VRF device to direct lookups to a specific table. Signed-off-by: Shrijeet Mukherjee s...@cumulusnetworks.com Signed-off-by: David Ahern d...@cumulusnetworks.com

[PATCH net-next 8/9] net: Use passed in table for nexthop lookups

2015-08-10 Thread David Ahern
route fails: $ ip route add table 10 2.2.2.0/24 via 1.1.1.10 RTNETLINK answers: Network is unreachable With this patch the route is added successfully. Signed-off-by: David Ahern d...@cumulusnetworks.com --- net/ipv4/fib_semantics.c | 13 +++-- 1 file changed, 11 insertions(+), 2

[PATCH] iproute2: Add support for VRF device

2015-08-10 Thread David Ahern
Allow user to create a vrf device and specify its table binding. Based on the iplink_vlan implementation. Signed-off-by: Shrijeet Mukherjee s...@cumulusnetworks.com Signed-off-by: David Ahern d...@cumulusnetworks.com --- include/linux/if_link.h | 8 + ip/Makefile | 2 +- ip

[PATCH net-next 6/9] net: Fix up inet_addr_type checks

2015-08-10 Thread David Ahern
to the local table. inet_addr_type_dev_table keeps the same semantics as inet_addr_type but if the passed in device is enslaved to a VRF then the table for that VRF is used for the lookup. Signed-off-by: David Ahern d...@cumulusnetworks.com --- include/net/route.h | 3 +++ net/ipv4/af_inet.c

[PATCH net-next 7/9] net: Add routes to the table associated with the device

2015-08-10 Thread David Ahern
to the correct table as well. Signed-off-by: David Ahern d...@cumulusnetworks.com --- net/ipv4/fib_frontend.c | 8 net/ipv4/fib_semantics.c | 25 +++-- 2 files changed, 23 insertions(+), 10 deletions(-) diff --git a/net/ipv4/fib_frontend.c b/net/ipv4/fib_frontend.c index

[PATCH net-next 5/9] net: Add inet_addr lookup by table

2015-08-10 Thread David Ahern
to the local table. Signed-off-by: Shrijeet Mukherjee s...@cumulusnetworks.com Signed-off-by: David Ahern d...@cumulusnetworks.com --- include/net/route.h | 1 + net/ipv4/fib_frontend.c | 22 +++--- 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/include/net

[PATCH net-next 1/9] net: Introduce VRF related flags and helpers

2015-08-10 Thread David Ahern
with VRF device. Signed-off-by: Shrijeet Mukherjee s...@cumulusnetworks.com Signed-off-by: David Ahern d...@cumulusnetworks.com --- include/linux/netdevice.h| 20 +++ include/net/vrf.h| 139 +++ include/uapi/linux/if_link.h | 9 +++ 3

[PATCH net-next 4/9] udp: Handle VRF device in sendmsg

2015-08-10 Thread David Ahern
For unconnected UDP sockets using a VRF device lookup source address based on VRF table. This allows the UDP header to be properly setup before showing up at the VRF device via the dst. Signed-off-by: Shrijeet Mukherjee s...@cumulusnetworks.com Signed-off-by: David Ahern d...@cumulusnetworks.com

[PATCH net-next 3/9] net: Use VRF device index for lookups on TX

2015-08-10 Thread David Ahern
within the table. The FLOWI_FLAG_VRFSRC is used to control this latter part. Signed-off-by: Shrijeet Mukherjee s...@cumulusnetworks.com Signed-off-by: David Ahern d...@cumulusnetworks.com --- include/net/flow.h | 1 + include/net/route.h | 3 +++ net/ipv4/fib_trie.c | 7 +-- net/ipv4/icmp.c

[PATCH] xfrm: Add oif to dst lookups

2015-08-10 Thread David Ahern
Rules can be installed that direct route lookups to specific tables based on oif. Plumb the oif through the xfrm lookups so it gets set in the flow struct and passed to the resolver routines. Signed-off-by: David Ahern d...@cumulusnetworks.com --- include/net/xfrm.h | 7 +-- net/ipv4

Re: [BUG net-next] infamous dev refcnt leak... again.

2015-08-14 Thread David Ahern
On 8/14/15 5:14 PM, Eric Dumazet wrote: On Fri, 2015-08-14 at 14:14 -0700, Eric Dumazet wrote: While rebooting host running latest net-next unregister_netdevice: waiting for eth0 to become free. Usage count = 4 Oh well... It looks like David Ahern recent changes uncover a bug

Re: [PATCH net-next 04/11] udp: Handle VRF device in sendmsg

2015-08-14 Thread David Ahern
On 8/14/15 9:16 PM, Tom Herbert wrote: At least collect this code into one (static inline) function to better minimize the code churn in udp. If this is general functionality that can be used by other drivers then abstract it out as such. Also, if the VRF driver is not configured it seems like

Re: [PATCH net-next] ipv4: fix refcount leak in fib_check_nh()

2015-08-15 Thread David Ahern
count = 4 Fixes: 3bfd847203c6 (net: Use passed in table for nexthop lookups) Signed-off-by: Eric Dumazet eduma...@google.com Cc: David Ahern d...@cumulusnetworks.com Still puzzled why I was not seeing the refcnt problem at reboot though I did see the extra dev_hold when I instrumented the hold

increase in time to delete an interface with 4.x kernels

2015-07-27 Thread David Ahern
Hi Alex: I believe you did the recent overhaul to the fib implementation. I am seeing dramatically higher times to delete an interface with an ipv4 address in 4.2-rc3. perf-top points to update_suffix: PerfTop: 15834 irqs/sec kernel:97.3% exact: 0.0% [4000Hz cpu-clock], (all, 4

[PATCH net-next 06/16] net: Tx via VRF device

2015-07-27 Thread David Ahern
in the dst to point to the VRF device if it is enslaved. Signed-off-by: Shrijeet Mukherjee s...@cumulusnetworks.com Signed-off-by: David Ahern d...@cumulusnetworks.com --- net/ipv4/route.c | 18 ++ 1 file changed, 18 insertions(+) diff --git a/net/ipv4/route.c b/net/ipv4/route.c index

[PATCH net-next 14/16] net: Add sk_bind_dev_if to task_struct

2015-07-27 Thread David Ahern
from 1.1.1.254: icmp_seq=1 ttl=64 time=2.32 ms Signed-off-by: David Ahern d...@cumulusnetworks.com --- include/linux/sched.h | 3 +++ include/uapi/linux/prctl.h | 4 kernel/fork.c | 2 ++ kernel/sys.c | 35 +++ net/ipv4

[PATCH net-next 13/16] net: Introduce VRF device driver - v2

2015-07-27 Thread David Ahern
link set eth1 master vrf1 Signed-off-by: Shrijeet Mukherjee s...@cumulusnetworks.com Signed-off-by: David Ahern d...@cumulusnetworks.com v2: - addressed comments from first RFC - significant changes to improve simplicity of implementation --- drivers/net/Kconfig | 7 + drivers/net/Makefile

[PATCH] iproute2: Add support for VRF device

2015-07-27 Thread David Ahern
Allow user to create a vrf device and specify its table binding. Based on the iplink_vlan implementation. Signed-off-by: Shrijeet Mukherjee s...@cumulusnetworks.com Signed-off-by: David Ahern d...@cumulusnetworks.com --- include/linux/if_link.h | 8 + ip/Makefile | 2 +- ip

[PATCH net-next 11/16] net: Use VRF device index for socket lookups

2015-07-27 Thread David Ahern
Signed-off-by: David Ahern d...@cumulusnetworks.com --- net/ipv4/syncookies.c | 5 - net/ipv4/tcp_input.c | 6 +- net/ipv4/tcp_ipv4.c | 11 +-- 3 files changed, 18 insertions(+), 4 deletions(-) diff --git a/net/ipv4/syncookies.c b/net/ipv4/syncookies.c index d70b1f603692

[PATCH net-next 07/16] net: Add inet_addr lookup by table

2015-07-27 Thread David Ahern
to the local table. Signed-off-by: Shrijeet Mukherjee s...@cumulusnetworks.com Signed-off-by: David Ahern d...@cumulusnetworks.com --- include/net/route.h | 1 + net/ipv4/fib_frontend.c | 22 +++--- 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/include/net

[PATCH net-next 12/16] net: Add ipv4 route helper to set next hop

2015-07-27 Thread David Ahern
Signed-off-by: David Ahern d...@cumulusnetworks.com --- include/net/route.h | 3 +++ net/ipv4/route.c| 10 ++ 2 files changed, 13 insertions(+) diff --git a/include/net/route.h b/include/net/route.h index b14cbec93fbd..900d50fbcfc7 100644 --- a/include/net/route.h +++ b/include/net

  1   2   3   4   5   6   7   8   9   10   >