Move source address lookup from fib6_rule_action to a helper. It will be
used in a later patch by a second variant for fib6_rule_action.
Signed-off-by: David Ahern <dsah...@gmail.com>
---
net/ipv6/fib6_rules.c | 52 ++-
1 file chang
Rename fib6_lookup to fib6_node_lookup to better reflect what it
returns. The fib6_lookup name will be used in a later patch for
an IPv6 equivalent to IPv4's fib_lookup.
Signed-off-by: David Ahern <dsah...@gmail.com>
---
include/net/ip6_fib.h | 6 +++---
net/ipv6/ip6_fib.c
d this is done in the fast path vs gc time. (the existing
code does as well; your change is only moving the call to make the input
and output paths the same)
The change looks correct to me and all of my functional tests passed.
Acked-by: David Ahern <dsah...@gmail.com>
On 5/2/18 2:48 PM, Thomas Winter wrote:
> Should I look at reworking this? It would be great to have these ECMP routes
> for other purposes.
Looking at my IPv6 bug list this change is on it -- allowing ECMP routes
to have a device only hop.
Let me take a look at it at the same time as a few
On 5/2/18 12:53 PM, Ido Schimmel wrote:
>
> So this fixes the issue for me. To reproduce:
>
> # ip -6 address add 2001:db8::1/64 dev dummy0
> # ip -6 address add 2001:db8::1/64 dev dummy1
>
> This reproduces the issue because due to above commit both local routes
> are considered siblings... :/
On 5/2/18 5:13 AM, Jesper Dangaard Brouer wrote:
>
> On Sun, 29 Apr 2018 11:07:52 -0700 David Ahern <dsah...@gmail.com> wrote:
>
>> +/* verify egress index has xdp support */
>> +// TO-DO bpf_map_lookup_elem(_port, ) fails with
>> +//
On 5/2/18 5:27 AM, Jesper Dangaard Brouer wrote:
> On Sun, 29 Apr 2018 11:07:51 -0700
> David Ahern <dsah...@gmail.com> wrote:
>
>> Initial performance numbers collected by Jesper, forwarded packets/sec:
>>
>>Full stackXDP FIB lookupXDP
break;
> + case FIB_EVENT_ENTRY_ADD:
> + if (router->aborted) {
> + NL_SET_ERR_MSG_MOD(info->extack, "FIB offload was
> aborted. Not configuring route");
> + return notifier_from_errno(-EINVAL);
> + }
> + break;
>
ialization.
>
> Signed-off-by: Ido Schimmel <ido...@mellanox.com>
> ---
> drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c | 14 +++---
> 1 file changed, 7 insertions(+), 7 deletions(-)
>
Acked-by: David Ahern <dsah...@gmail.com>
On 5/1/18 10:51 PM, Dave Taht wrote:
> On Tue, May 1, 2018 at 9:12 PM, David Ahern <dsah...@gmail.com> wrote:
>> On 5/1/18 12:32 PM, Dave Taht wrote:
>>> ack_recognize can shift pure tcp acks into another flowid.
>>> ---
>&
On 4/30/18 8:36 AM, Steve Wise wrote:
> Signed-off-by: Steve Wise
> ---
> rdma/include/uapi/rdma/rdma_netlink.h | 37
> ++-
> 1 file changed, 36 insertions(+), 1 deletion(-)
>
> diff --git a/rdma/include/uapi/rdma/rdma_netlink.h
>
On 5/1/18 12:32 PM, Dave Taht wrote:
> ack_recognize can shift pure tcp acks into another flowid.
> ---
> examples/bpf/ack_recognize.c | 98
>
> 1 file changed, 98 insertions(+)
> create mode 100644 examples/bpf/ack_recognize.c
>
> diff --git
On 5/1/18 12:15 PM, Vincent Bernat wrote:
> ❦ 29 avril 2018 11:07 -0700, David Ahern <dsah...@gmail.com> :
>
>> +struct fib6_info *fib6_lookup(struct net *net, int oif, struct flowi6 *fl6,
>> + int flags)
>
> Maybe an EXPORT_SYMBOL_GPL?
On 5/1/18 2:16 AM, Ido Schimmel wrote:
> Since commit 9776d32537d2 ("net: Move call_fib_rule_notifiers up in
> fib_nl_newrule") it is possible to forbid the installation of
> unsupported FIB rules.
>
> Have mlxsw return an error for non-default FIB rules in addition to the
> existing extack
...@mellanox.com>
> ---
> ip/iproute.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
Acked-by: David Ahern <dsah...@gmail.com>
edtelesis.co.nz>
> Cc: David Ahern <dsah...@gmail.com>
> Cc: "David S. Miller" <da...@davemloft.net>
> Cc: Alexey Kuznetsov <kuz...@ms2.inr.ac.ru>
> Cc: Hideaki YOSHIFUJI <yoshf...@linux-ipv6.org>
> ---
> include/net/ip6_route.h | 3 +--
>
On 4/30/18 9:08 AM, Alexei Starovoitov wrote:
>> diff --git a/include/uapi/linux/bpf.h b/include/uapi/linux/bpf.h
>> index 530ff6588d8f..8daef7326bb7 100644
>> --- a/include/uapi/linux/bpf.h
>> +++ b/include/uapi/linux/bpf.h
>> @@ -1770,33 +1770,33 @@ union bpf_attr {
>> *
>> * int
On 4/29/18 5:36 PM, Alexei Starovoitov wrote:
>> +if (flags & BPF_FIB_LOOKUP_DIRECT) {
>> +u32 tbid = l3mdev_fib_table_rcu(dev) ? : RT_TABLE_MAIN;
>> +struct fib_table *tb;
>> +
>> +tb = fib_get_table(net, tbid);
>> +if (unlikely(!tb))
>> +
Signed-off-by: David Ahern <dsah...@gmail.com>
---
samples/bpf/Makefile | 4 +
samples/bpf/xdp_fwd_kern.c| 110
samples/bpf/xdp_fwd_user.c| 136 ++
tools/testing/selftests/bpf/bpf_hel
Rename fib6_lookup to fib6_node_lookup to better reflect what it
returns. The fib6_lookup name will be used in a later patch for
an IPv6 equivalent to IPv4's fib_lookup.
Signed-off-by: David Ahern <dsah...@gmail.com>
---
include/net/ip6_fib.h | 6 +++---
net/ipv6/ip6_fib.c
.
Default is an ingress lookup.
Initial performance numbers collected by Jesper, forwarded packets/sec:
Full stackXDP FIB lookupXDP Direct lookup
IPv4 1,947,969 7,074,156 7,415,333
IPv6 1,728,000 6,165,504 7,262,720
Signed-off-by: David Ahern <d
Move source address lookup from fib6_rule_action to a helper. It will be
used in a later patch by a second variant for fib6_rule_action.
Signed-off-by: David Ahern <dsah...@gmail.com>
---
net/ipv6/fib6_rules.c | 52 ++-
1 file chang
-by: David Ahern <dsah...@gmail.com>
---
include/net/ip6_fib.h | 4
net/ipv6/route.c | 39 +--
2 files changed, 29 insertions(+), 14 deletions(-)
diff --git a/include/net/ip6_fib.h b/include/net/ip6_fib.h
index 80d76d8dc683..4f7b8f59ea6d
Rename rt6_multipath_select to fib6_multipath_select and export it.
A later patch wants access to it similar to IPv4's fib_select_path.
Signed-off-by: David Ahern <dsah...@gmail.com>
---
include/net/ip6_fib.h | 5 +
net/ipv6/route.c | 17 +
2 files chang
Add stubs to retrieve a handle to an IPv6 FIB table, fib6_get_table,
a stub to do a lookup in a specific table, fib6_table_lookup, and
a stub for a full route lookup.
The stubs are needed for core bpf code to handle the case when the
IPv6 module is not builtin.
Signed-off-by: David Ahern <d
into the kernel and ipv6 may not be built or loaded.
Patch 8 adds the bpf helper and 9 adds a sample program.
v2
- fixed use of foward helper from cls_act as noted by Daniel
- in patch 1 rename fib6_lookup_1 as well for consistency
David Ahern (9):
net/ipv6: Rename fib6_lookup
.
Caller must hold rcu lock as no reference is taken on the returned
fib entry.
Signed-off-by: David Ahern <dsah...@gmail.com>
---
include/net/ip6_fib.h | 6
net/ipv6/fib6_rules.c | 86 +--
net/ipv6/ip6_fib.c| 7 +
3 files chang
Similar to IPv4, IPv6 should use the FIB lookup result in the
tracepoint.
Signed-off-by: David Ahern <dsah...@gmail.com>
---
include/trace/events/fib6.h | 14 +++---
net/ipv6/route.c| 14 ++
2 files changed, 13 insertions(+), 15 deletions(-)
diff --git a/i
On 4/27/18 9:44 AM, Ashwanth Goli wrote:
> On 2018-04-27 20:18, David Ahern wrote:
>> On 4/27/18 5:02 AM, Ashwanth Goli wrote:
>>> On 2018-04-26 17:21, Paolo Abeni wrote:
>>>> Hi,
>>>>
>>>> [fixed CC list]
>>>>
>>&
On 4/27/18 10:43 AM, Martin KaFai Lau wrote:
>> +#if IS_ENABLED(CONFIG_IPV6)
>> +static int bpf_ipv6_fib_lookup(struct xdp_buff *ctx,
>> + struct bpf_fib_lookup *params, u32 flags)
>> +{
>> +struct net *net = dev_net(ctx->rxq->dev);
>> +struct neighbour *neigh;
>>
On 4/27/18 5:02 AM, Ashwanth Goli wrote:
> On 2018-04-26 17:21, Paolo Abeni wrote:
>> Hi,
>>
>> [fixed CC list]
>>
>> On Wed, 2018-04-25 at 21:43 +0530, Ashwanth Goli wrote:
>>> Hi Pablo,
>>
>> Actually I'm Paolo, but yours is a recurring mistake ;)
>>
>>> I am noticing an issue similar to the one
On 4/25/18 1:55 PM, Daniel Borkmann wrote:
>> @@ -3861,6 +4090,8 @@ sk_filter_func_proto(enum bpf_func_id func_id, const
>> struct bpf_prog *prog)
>> return _get_socket_cookie_proto;
>> case BPF_FUNC_get_socket_uid:
>> return _get_socket_uid_proto;
>> +case
Rename rt6_multipath_select to fib6_multipath_select and export it.
A later patch wants access to it similar to IPv4's fib_select_path.
Signed-off-by: David Ahern <dsah...@gmail.com>
---
include/net/ip6_fib.h | 5 +
net/ipv6/route.c | 17 +
2 files chang
Similar to IPv4, IPv6 should use the FIB lookup result in the
tracepoint.
Signed-off-by: David Ahern <dsah...@gmail.com>
---
include/trace/events/fib6.h | 14 +++---
net/ipv6/route.c| 14 ++
2 files changed, 13 insertions(+), 15 deletions(-)
diff --git a/i
Signed-off-by: David Ahern <dsah...@gmail.com>
---
samples/bpf/Makefile | 4 +
samples/bpf/xdp_fwd_kern.c| 110
samples/bpf/xdp_fwd_user.c| 136 ++
tools/testing/selftests/bpf/bpf_hel
Add stubs to retrieve a handle to an IPv6 FIB table, fib6_get_table,
a stub to do a lookup in a specific table, fib6_table_lookup, and
a stub for a full route lookup.
The stubs are needed for core bpf code to handle the case when the
IPv6 module is not builtin.
Signed-off-by: David Ahern <d
.
Default is an ingress lookup.
Initial performance numbers collected by Jesper, forwarded packets/sec:
Full stackXDP FIB lookupXDP Direct lookup
IPv4 1,947,969 7,074,156 7,415,333
IPv6 1,728,000 6,165,504 7,262,720
Signed-off-by: David Ahern <d
-by: David Ahern <dsah...@gmail.com>
---
include/net/ip6_fib.h | 4
net/ipv6/route.c | 39 +--
2 files changed, 29 insertions(+), 14 deletions(-)
diff --git a/include/net/ip6_fib.h b/include/net/ip6_fib.h
index 80d76d8dc683..4f7b8f59ea6d
.
Caller must hold rcu lock as no reference is taken on the returned
fib entry.
Signed-off-by: David Ahern <dsah...@gmail.com>
---
include/net/ip6_fib.h | 6
net/ipv6/fib6_rules.c | 83 +--
net/ipv6/ip6_fib.c| 7 +
3 files chang
Rename fib6_lookup to fib6_node_lookup to better reflect what it
returns. The fib6_lookup name will be used in a later patch for
an IPv6 equivalent to IPv4's fib_lookup.
Signed-off-by: David Ahern <dsah...@gmail.com>
---
include/net/ip6_fib.h | 6 +++---
net/ipv6/ip6_fib.c| 5 +++--
ne
Move source address lookup from fib6_rule_action to a helper. It will be
used in a later patch by a second variant for fib6_rule_action.
Signed-off-by: David Ahern <dsah...@gmail.com>
---
net/ipv6/fib6_rules.c | 52 ++-
1 file chang
into the kernel and ipv6 may not be built or loaded.
Patch 8 adds the bpf helper and 9 is a sample program.
David Ahern (9):
net/ipv6: Rename fib6_lookup to fib6_node_lookup
net/ipv6: Rename rt6_multipath_select
net/ipv6: Extract table lookup from ip6_pol_route
net/ipv6: Refactor
Move the check on FRA_L3MDEV attribute to helper to improve the
readability of fib_nl2rule. Update the extack messages to be
clear when the configuration option is disabled versus an invalid
value has been passed.
Signed-off-by: David Ahern <dsah...@gmail.com>
---
net/core/fib_rules.
On 4/24/18 1:31 AM, Ivan Vecera wrote:
> The addrconf_ifdown() evaluates keep_addr_on_down state twice. There
> is no need to do it.
>
> Cc: David Ahern <dsah...@gmail.com>
> Signed-off-by: Ivan Vecera <c...@cera.cz>
> ---
> net/ipv6/addrconf.c | 23 ++--
On 4/23/18 11:57 PM, Sukumar Gopalakrishnan wrote:
> Get master device address from (skb->dev) and pass master to socket
> lookup up function for Ipv6 Linklocal/Multicast address.
>
> ipv6_raw_deliver()
> {
> int mdif;
> ..
> ..
> mdif = (((nexthdr == IPPROTO_PIM || nexthdr == 89 /*
quot;)
> Signed-off-by: Eric Dumazet <eduma...@google.com>
> Reported-by: syzbot <syzkal...@googlegroups.com>
> Cc: David Ahern <dsah...@gmail.com>
> ---
> net/ipv6/route.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
>
Acked-by: David Ahern <dsah...@gmail.com>
Thanks, Eric.
On 4/23/18 9:21 PM, David Miller wrote:
> From: Roopa Prabhu
> Date: Mon, 23 Apr 2018 20:08:41 -0700
>
>> From: Roopa Prabhu
>>
>> Fixes: b16fb418b1bf ("net: fib_rules: add extack support")
>> Signed-off-by: Roopa Prabhu
On 4/20/18 2:32 AM, Sabrina Dubroca wrote:
> Currently, iproute allows setting those flags, but it's impossible to
> clear them, since their current value is fetched from the kernel and
> then we OR in the additional flags passed on the command line.
>
> Add no* variants to allow clearing them.
>
On 4/23/18 8:40 PM, Hangbin Liu wrote:
> Signed-off-by: Hangbin Liu
> ---
> ip/iplink_vxlan.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
applied to iproute2-next. Thanks,
ime so it can be used the sceond time outside of the lock
Fixes: a68886a69180 ("net/ipv6: Make from in rt6_info rcu protected")
Reported-by: kbuild test robot <l...@intel.com>
Signed-off-by: David Ahern <dsah...@gmail.com>
---
net/ipv6/route.c | 15 ++-
1 file cha
to rt6_check_expired in
ip6_negative_advice.
Fixes: a68886a69180 ("net/ipv6: Make from in rt6_info rcu protected")
Reported-by: syzbot+2422c9e35796659d2...@syzkaller.appspotmail.com
Signed-off-by: David Ahern <dsah...@gmail.com>
---
net/ipv6/route.c | 2 ++
1 file changed, 2 insertion
So many details... I am thankful for all the robots running the
permutations and tools.
Two bug fixes from the rcu change to rt->from:
1. missing rcu lock in ip6_negative_advice
2. rcu dereferences in 2 sites
David Ahern (2):
net/ipv6: add rcu locking to ip6_negative_advice
net/ipv6:
g struct
> fib6_config")
> Fixes: c3968a857a6b ("ipv6: RTA_PREFSRC support for ipv6 route source address
> selection")
> Signed-off-by: Eric Dumazet <eduma...@google.com>
> Reported-by: syzbot <syzkal...@googlegroups.com>
> ---
> net/ipv6/route.c |
On 4/23/18 7:31 AM, Eric Dumazet wrote:
>> stack backtrace:
>> CPU: 1 PID: 25958 Comm: syz-executor7 Not tainted 4.16.0+ #11
>> Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS
>> Google 01/01/2011
>> Call Trace:
>> __dump_stack lib/dump_stack.c:77 [inline]
>>
This commit breaks my FIB forwarding program:
commit 6870de435b90c083ae0f3f7f341287976ef56f03
Author: Nikita V. Shirokov
Date: Tue Apr 17 21:42:20 2018 -0700
bpf: make virtio compatible w/ bpf_xdp_adjust_tail
w/ bpf_xdp_adjust_tail helper xdp's data_end pointer
rt6_get_cookie_safe takes a fib6_info and checks the sernum of
the node. Update the name to reflect its purpose.
Signed-off-by: David Ahern <dsah...@gmail.com>
---
include/net/ip6_fib.h | 6 +++---
net/ipv6/route.c | 4 ++--
2 files changed, 5 insertions(+), 5 deletions(-)
diff
A later patch protects 'from' in rt6_info and this simplifies the
locking needed by it.
Signed-off-by: David Ahern <dsah...@gmail.com>
---
include/net/ip6_fib.h | 6 --
net/ipv6/route.c | 13 ++---
2 files changed, 14 insertions(+), 5 deletions(-)
diff --git a/inclu
this race using rcu on from.
Signed-off-by: David Ahern <dsah...@gmail.com>
---
include/net/ip6_fib.h | 10 +++---
net/ipv6/ip6_fib.c| 8 +++--
net/ipv6/ip6_output.c | 9 +++--
net/ipv6/route.c | 96 ---
4 files changed, 88 insertions(
Code move only; no functional change intended.
Signed-off-by: David Ahern <dsah...@gmail.com>
---
net/ipv6/ip6_fib.c | 41 +++--
1 file changed, 23 insertions(+), 18 deletions(-)
diff --git a/net/ipv6/ip6_fib.c b/net/ipv6/ip6_fib.c
index f936e9
Dan reported an imbalance in fib6_check on use of f6i and checking
whether it is null. Since fib6_check is only called if f6i is non-null,
remove the unnecessary check.
Reported-by: Dan Carpenter <dan.carpen...@oracle.com>
Signed-off-by: David Ahern <dsah...@gmail.com>
---
net/ipv6
rt6_clean_expires and rt6_set_expires are no longer used. Removed them.
rt6_update_expires has 1 caller in route.c, so move it from the header.
Signed-off-by: David Ahern <dsah...@gmail.com>
---
include/net/ip6_fib.h | 21 -
net/ipv6/route.c | 9 +
2
a panic once, so
I can not definitively confirm it addresses the problem but it seems
pretty clear that it is a race on removing a 'from' reference on
an rt6_info and another path using that 'from' value to do
cookie checking.
David Ahern (7):
net/ipv6: Clean up rt expires helpers
net/ipv6: Rename
A later patch protects 'from' in rt6_info and this simplifies the
locking needed by it.
With the move, the fib6_info_hold for the uncached_rt is no longer
needed since the rcu_lock is still held.
Signed-off-by: David Ahern <dsah...@gmail.com>
---
net/ipv6/route.c | 13 ++---
On 4/17/18 11:05 PM, Hangbin Liu wrote:
> Like kernel net-next commit 72f6d71e491e6 ("vxlan: add ttl inherit support"),
> vxlan ttl inherit should means inherit the inner protocol's ttl value.
>
> But currently when we add vxlan with "ttl inherit", we only set ttl 0,
> which is actually use
ned-off-by: Eric Dumazet <eduma...@google.com>
> Cc: David Ahern <d...@cumulusnetworks.com>
> Reported-by: syzbot <syzkal...@googlegroups.com>
> ---
> net/ipv6/route.c | 20 +---
> 1 file changed, 9 insertions(+), 11 deletions(-)
Acked-by: David Ahern <d...@cumulusnetworks.com>
Thanks for fixing.
Signed-off-by: David Ahern <dsah...@gmail.com>
---
include/net/ip6_route.h | 11 ++-
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/include/net/ip6_route.h b/include/net/ip6_route.h
index 31e24f821ef6..c0620330035c 100644
--- a/include/net/ip6_route.h
+++ b/include/net/ip6_ro
Change the prefix for fib6_info struct elements from rt6i_ to fib6_.
rt6i_pcpu and rt6i_exception_bucket are left as is given that they
point to rt6_info entries.
Rename only; not functional change intended.
Signed-off-by: David Ahern <dsah...@gmail.com>
---
.../net/ethernet/mellanox
After 4832c30d5458 ("net: ipv6: put host and anycast routes on device
with address") the comparison of idev does not add value since it
correlates to the nexthop device which is already compared. Remove
the idev comparison.
Signed-off-by: David Ahern <dsah...@gmail.com>
fib6_idev can be obtained from __in6_dev_get on the nexthop device
rather than caching it in the fib6_info. Remove it.
Signed-off-by: David Ahern <dsah...@gmail.com>
---
include/net/ip6_fib.h | 1 -
net/ipv6/ip6_fib.c| 2 --
net/ipv6/route.c
Signed-off-by: David Ahern <dsah...@gmail.com>
---
net/ipv6/route.c | 24 ++--
1 file changed, 2 insertions(+), 22 deletions(-)
diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index e44f82848143..8cf4f0623229 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
aca_idev has only 1 user - inet6_fill_ifacaddr - and it only
wants the device index which can be extracted from the fib6_info
nexthop.
Signed-off-by: David Ahern <dsah...@gmail.com>
---
include/net/if_inet6.h | 1 -
include/net/ip6_fib.h | 5 +
net/ipv6/addrconf.c| 3 ++-
ne
flags to route add functions")
Reported-by: syzbot+2add39b05179b31f9...@syzkaller.appspotmail.com
Reported-by: Eric Dumazet <eric.duma...@gmail.com>
Signed-off-by: David Ahern <dsah...@gmail.com>
---
net/ipv6/addrconf.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
flags argument to addrconf_prefix_route in a
couple of places.
David Ahern (8):
net/ipv6: Rename fib6_info struct elements
net/ipv6: Rename addrconf_dst_alloc
net/ipv6: Remove aca_idev
net/ipv6: Remove unnecessary checks on fib6_idev
net/ipv6: Change ip6_route_get_saddr to get dev from
addrconf_dst_alloc now returns a fib6_info. Update the name
and its users to reflect the change.
Rename only; no functional change intended.
Signed-off-by: David Ahern <dsah...@gmail.com>
---
include/net/ip6_route.h | 2 +-
net/ipv6/addrconf.c | 28 ++--
ne
On 4/18/18 3:02 PM, syzbot wrote:
> stack backtrace:
> CPU: 1 PID: 25 Comm: kworker/1:1 Not tainted 4.16.0+ #5
> Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS
> Google 01/01/2011
> Workqueue: ipv6_addrconf addrconf_dad_work
> Call Trace:
> __dump_stack
On 4/18/18 11:06 AM, Eric Dumazet wrote:
>
>
> On 04/17/2018 05:33 PM, David Ahern wrote:
>> Most FIB entries can be added using memory allocated with GFP_KERNEL.
>> Add gfp_flags to ip6_route_add and addrconf_dst_alloc. Code paths that
>> can be reached from t
On 4/17/18 5:29 PM, Ben Greear wrote:
>
> FYI, problem still happens in 4.16. I'm going to re-enable my hack below
> for this kernel as well...I had hopes it might be fixed...
Interesting. I was hoping the same.
>
> BUG: unable to handle kernel NULL pointer dereference at 8
> IP:
Pass net namespace to fib6_update_sernum. It can not be marked const
as fib6_new_sernum will change ipv6.fib6_sernum.
Signed-off-by: David Ahern <dsah...@gmail.com>
---
include/net/ip6_fib.h | 2 +-
net/ipv6/ip6_fib.c| 3 +--
net/ipv6/route.c | 10 +-
3 files chan
at rt6i_flags.
Signed-off-by: David Ahern <dsah...@gmail.com>
---
net/ipv6/route.c | 115 +++
1 file changed, 74 insertions(+), 41 deletions(-)
diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index 222af19d3403..3b301aafd2ed 100644
---
A later patch removes rt6i_table from rt6_info. Save the ipv6
table for a VRF in net_vrf. fib tables can not be deleted so
no reference counting or locking is required.
Signed-off-by: David Ahern <dsah...@gmail.com>
---
drivers/net/vrf.c | 25 ++---
1 file chan
Code move only.
Signed-off-by: David Ahern <dsah...@gmail.com>
---
net/ipv6/route.c | 119 +++
1 file changed, 59 insertions(+), 60 deletions(-)
diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index 045811a3da76..0daf4c9c9f2b 100644
---
ip6_null_entry will stay a dst based return for lookups that fail to
match an entry.
Add a new fib6_null_entry which constitutes the root node and leafs
for fibs. Replace existing references to ip6_null_entry with the
new fib6_null_entry when dealing with FIBs.
Signed-off-by: David Ahern <d
Need to keep expires time for IPv6 routes in a dump of FIB entries.
Update rtnl_put_cacheinfo to allow dst to be NULL in which case
rta_cacheinfo will only contain non-dst data.
Signed-off-by: David Ahern <dsah...@gmail.com>
---
net/core/rtnetlink.c | 8 +---
1 file changed, 5 inse
Add fib6_info struct and alloc, destroy, hold and release helpers.
Signed-off-by: David Ahern <dsah...@gmail.com>
---
include/net/ip6_fib.h | 55 ++
net/ipv6/ip6_fib.c| 60 +++
2 files change
Drop unneeded elements from rt6_info struct and rearrange layout to
something more relevant for the data path.
Signed-off-by: David Ahern <dsah...@gmail.com>
---
include/net/ip6_fib.h | 60 +++--
net/ipv6/ip6_fib.c | 22 -
to the caller.
Signed-off-by: David Ahern <dsah...@gmail.com>
---
net/ipv6/route.c | 29 +
1 file changed, 25 insertions(+), 4 deletions(-)
diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index 7c141394d4f1..e293692174ba 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/r
Introduce fib6_nh structure and move nexthop related data from
rt6_info and rt6_info.dst to fib6_nh. References to dev, gateway or
lwtstate from a FIB lookup perspective are converted to use fib6_nh;
datapath references to dst version are left as is.
Signed-off-by: David Ahern <dsah...@gmail.
off-by: David Ahern <dsah...@gmail.com>
---
include/net/ip6_fib.h | 4 +-
include/net/ip6_route.h | 3 +-
net/ipv6/addrconf.c | 18 +++--
net/ipv6/anycast.c | 7 +-
net/ipv6/ip6_fib.c | 55 ++--
net/ipv6/ip6_output.c | 3 +-
net/ipv6/ndisc.c|
Convert all code paths referencing a FIB entry from
rt6_info to fib6_info.
Signed-off-by: David Ahern <dsah...@gmail.com>
---
.../net/ethernet/mellanox/mlxsw/spectrum_router.c | 64 ++---
include/net/if_inet6.h | 4 +-
include/net/ip6
) use GFP_KERNEL.
Signed-off-by: David Ahern <dsah...@gmail.com>
---
include/net/ip6_route.h | 6 --
net/ipv6/addrconf.c | 39 +++
net/ipv6/anycast.c | 2 +-
net/ipv6/route.c| 18 ++
4 files changed, 38 insertions(
.
In addition, remove RTF_CACHE and dst checks from fib6 add and delete
since they can not happen now and will never happen after the data
type flip.
Signed-off-by: David Ahern <dsah...@gmail.com>
---
include/net/ip6_route.h | 1 -
net/ipv6/ip6_fib.c | 16 +-
net/ipv6/route.c
Continuing to wean FIB paths off of dst_entry, use a bool to hold
requests for certain dst settings. Add a helper to convert the
flags to DST flags when a FIB entry is converted to a dst_entry.
Signed-off-by: David Ahern <dsah...@gmail.com>
---
include/net/ip6_fib.h | 5 -
ne
the gateway.
Signed-off-by: David Ahern <dsah...@gmail.com>
---
include/net/ip6_route.h | 3 +++
net/ipv6/ndisc.c| 8 ++--
net/ipv6/route.c| 33 -
3 files changed, 29 insertions(+), 15 deletions(-)
diff --git a/include/net/ip6_route.h b/i
functions similar to fib_dump_info and rt_fill_info)
- rt6_fill_node no longer needs the temporary metrics variable
Signed-off-by: David Ahern <dsah...@gmail.com>
---
include/net/ip6_fib.h | 17 ++--
net/core/dst.c| 1 +
net/ipv6/ip6_fib.c| 66 +
net/ipv6/ndisc.c
RTF_LOCAL: fc_type = RTN_LOCAL
- rt6i_flags contains RTF_ANYCAST: fc_type = RTN_ANYCAST
- else fc_type = RTN_UNICAST
Similarly, fib6_type is set in the rt6_info templates based on the
RTF_REJECT section of rt6_fill_node converting dst.error to RTN type.
Signed-off-by: David Ahern <d
with an intermediate patch; added
dst_hold_safe on rt->from. Code is removed 3 patches later
- allow cacheinfo to handle NULL dst; means only expires is pushed to
userspace
David Ahern (21):
net: Move fib_convert_metrics to metrics file
net: Handle null dst in rtnl_put_cacheinfo
vrf: M
len are passed as inputs pulled from fib_config
- metrics array is passed as an input from fi->fib_metrics->metrics
Signed-off-by: David Ahern <dsah...@gmail.com>
---
include/net/ip.h | 3 +++
net/ipv4/Makefile| 3 ++-
net/ipv4/fib_s
Pass network namespace reference into route add, delete and get
functions.
Signed-off-by: David Ahern <dsah...@gmail.com>
---
include/net/ip6_route.h | 12 ++-
net/ipv6/addrconf.c | 33 --
net/ipv6/anycast.c | 10 +
net/ipv6/n
xpires becomes fib6_set_expires, and
rt6_check_expired becomes fib6_check_expired, where the fib6 versions
are added by this patch.
Signed-off-by: David Ahern <dsah...@gmail.com>
---
include/net/ip6_fib.h | 27 +++
net/ipv6/addrconf.c | 6 +++---
net/ipv6/ip6_f
BPF core gets access to __inet6_bind via ipv6_bpf_stub_impl, so it is
not invoked directly outside of af_inet6.c. Make it static and move
inet6_bind after to avoid forward declaration.
Signed-off-by: David Ahern <dsah...@gmail.com>
---
include/net/ipv6.h | 2 --
net/ipv6/af_inet6.
701 - 800 of 3466 matches
Mail list logo