Re: [PATCH bpf-next] bpf_fib_lookup: return target ifindex even if neighbour lookup fails

2020-10-08 Thread David Ahern
On 10/8/20 7:53 AM, Toke Høiland-Jørgensen wrote: > The bpf_fib_lookup() helper performs a neighbour lookup for the destination > IP and returns BPF_FIB_LKUP_NO_NEIGH if this fails, with the expectation > that the BPF program will pass the packet up the stack in this case. > However, with the addit

Re: [PATCH 1/2] net/ipv6: always honour route mtu during forwarding

2020-10-08 Thread David Ahern
On 10/7/20 8:31 PM, Maciej Żenczykowski wrote: > From: Maciej Żenczykowski > > This matches the new ipv4 behaviour as of commit: > commit 02a1b175b0e92d9e0fa5df3957ade8d733ceb6a0 > Author: Maciej Żenczykowski > Date: Wed Sep 23 13:18:15 2020 -0700 > > net/ipv4: always honour route mtu

Re: [PATCH iproute2-next v2 2/2] tc: implement support for terse dump

2020-10-07 Thread David Ahern
On 9/30/20 9:59 AM, Vlad Buslov wrote: > From: Vlad Buslov > > Implement support for classifier/action terse dump using new TCA_DUMP_FLAGS > tlv with only available flag value TCA_DUMP_FLAGS_TERSE. Set the flag when > user requested it with following example CLI (-br for 'brief'): > >> tc -s -br

Re: [PATCH bpf-next V1 2/6] bpf: bpf_fib_lookup return MTU value as output when looked up

2020-10-07 Thread David Ahern
On 10/7/20 12:42 AM, Jesper Dangaard Brouer wrote: > > The struct bpf_fib_lookup is exactly 1 cache-line (64 bytes) for > performance reasons. I do believe that it can be extended, as Ahern > designed the BPF-helper API cleverly via a plen (detail below signature). Yes, I kept it to 64B for perf

Re: [PATCH bpf-next V1 3/6] bpf: add BPF-helper for reading MTU from net_device via ifindex

2020-10-07 Thread David Ahern
On 10/6/20 6:24 PM, Maciej Żenczykowski wrote: > > FYI: It would be nice to have a similar function to return a device's > L2 header size (ie. 14 for ethernet) and/or hwtype. Why does that need to be looked up via a helper? It's a static number for a device and can plumbed to a program in a numbe

Re: [PATCH bpf-next v7 2/2] selftests/bpf: Selftest for real time helper

2020-10-07 Thread David Ahern
On 10/5/20 10:36 AM, Maciej Żenczykowski wrote: >> Don't bother. This helper is no go. > > I disagree on the 'no go' -- I do think we should have this helper. +1 > > Lets not make bpf even harder to use then it already is... > Logging is done using time of day; that is not a posix mistake but

Re: [PATCH iproute2-net v2] ip xfrm: support setting XFRMA_SET_MARK_MASK attribute in states

2020-10-06 Thread David Ahern
On 10/2/20 6:22 AM, Antony Antony wrote: > The XFRMA_SET_MARK_MASK attribute can be set in states (4.19+) > It is optional and the kernel default is 0x > It is the mask of XFRMA_SET_MARK(a.k.a. XFRMA_OUTPUT_MARK in 4.18) > > e.g. > ./ip/ip xfrm state add output-mark 0x6 mask 0xab proto esp

Re: [patch iproute2-next] devlink: Add health reporter test command support

2020-10-06 Thread David Ahern
On 10/1/20 12:21 AM, Jiri Pirko wrote: > From: Jiri Pirko > > Add health reporter test command and allow user to trigger a test event. > > Signed-off-by: Jiri Pirko > --- > bash-completion/devlink | 2 +- > devlink/devlink.c | 11 +++ > man/man8/devlink-health.8 | 16 +++

Re: [iproute2-next v2] devlink: support setting the overwrite mask attribute

2020-10-06 Thread David Ahern
On 9/30/20 2:05 PM, Jacob Keller wrote: > The recently added DEVLINK_ATTR_FLASH_UPDATE_OVERWRITE_MASK allows > userspace to indicate how a device should handle subsections of a flash > component when updating. For example, a flash component might contain > vital data such as PCIe serial number or c

Re: [iproute2-next v2 1/1] devlink: display elapsed time during flash update

2020-10-06 Thread David Ahern
On 9/30/20 4:40 PM, Jacob Keller wrote: > @@ -3124,12 +3140,19 @@ static int cmd_dev_flash_status_cb(const struct > nlmsghdr *nlh, void *data) > done = > mnl_attr_get_u64(tb[DEVLINK_ATTR_FLASH_UPDATE_STATUS_DONE]); > if (tb[DEVLINK_ATTR_FLASH_UPDATE_STATUS_TOTAL]) >

Re: [RFC PATCH 0/3] l3mdev icmp error route lookup fixes

2020-10-05 Thread David Ahern
On 9/25/20 1:04 PM, Mathieu Desnoyers wrote: > Hi, > > Here is an updated series of fixes for ipv4 and ipv6 which which ensure > the route lookup is performed on the right routing table in VRF > configurations when sending TTL expired icmp errors (useful for > traceroute). > > It includes tests f

Re: [RFC PATCH 0/3] l3mdev icmp error route lookup fixes

2020-10-05 Thread David Ahern
On 9/25/20 1:04 PM, Mathieu Desnoyers wrote: > Hi, > > Here is an updated series of fixes for ipv4 and ipv6 which which ensure > the route lookup is performed on the right routing table in VRF > configurations when sending TTL expired icmp errors (useful for > traceroute). > > It includes tests f

Re: [PATCH] genl: ctrl: print op -> policy idx mapping

2020-10-02 Thread David Ahern
On 10/2/20 7:39 AM, Johannes Berg wrote: > On Fri, 2020-10-02 at 07:29 -0700, David Ahern wrote: >> On 10/2/20 3:26 AM, Johannes Berg wrote: >>> diff --git a/genl/ctrl.c b/genl/ctrl.c >>> index 68099fe97f1a..c62212b40fa3 100644 >>> --- a/genl/ctrl.c >>

Re: [PATCH] genl: ctrl: print op -> policy idx mapping

2020-10-02 Thread David Ahern
On 10/2/20 3:26 AM, Johannes Berg wrote: > diff --git a/genl/ctrl.c b/genl/ctrl.c > index 68099fe97f1a..c62212b40fa3 100644 > --- a/genl/ctrl.c > +++ b/genl/ctrl.c > @@ -162,6 +162,16 @@ static int print_ctrl(struct rtnl_ctrl_data *ctrl, > __u32 *ma = RTA_DATA(tb[CTRL_ATTR_MAXATTR]);

Re: [PATCH bpf-next v4 3/6] bpf: add redirect_neigh helper as redirect drop-in

2020-09-30 Thread David Ahern
C_MAPPER(FN)\ > FN(unspec), \ Code change looks fine to me: Reviewed-by: David Ahern

Re: [RESEND PATCH iproute2-next 2/2] tc: implement support for terse dump

2020-09-30 Thread David Ahern
On 9/30/20 12:36 AM, Vlad Buslov wrote: > From: Vlad Buslov > > Implement support for classifier/action terse dump using new TCA_DUMP_FLAGS > tlv with only available flag value TCA_DUMP_FLAGS_TERSE. Set the flag when > user requested it with following example CLI: > >> tc -s filter show terse de

Re: [iproute2-next 2/2] devlink: support setting the overwrite mask

2020-09-30 Thread David Ahern
On 9/29/20 4:42 PM, Jacob Keller wrote: > Add support for specifying the overwrite sections to allow in the flash > update command. This is done by adding a new "overwrite" option which > can take either "settings" or "identifiers" passing the overwrite mode > multiple times will combine the fields

Re: [iproute2-next v4 0/2] devlink: add flash update overwrite mask

2020-09-29 Thread David Ahern
On 9/9/20 3:28 PM, Jacob Keller wrote: > This series implements the iproute2 side of the new > DEVLINK_ATTR_FLASH_UPDATE_OVERWRITE_MASK. > > This attribute is used to allow userspace to indicate what a device should > do with various subsections of a flash component when updating. For example, > a

Re: [PATCH iproute2-next] ss: add support for xdp statistics

2020-09-29 Thread David Ahern
On 9/24/20 12:03 AM, Ciara Loftus wrote: > The patch exposes statistics for XDP sockets which can be useful for > debugging purposes. > > The stats exposed are: > rx dropped > rx invalid > rx queue full > rx fill ring empty > tx invalid > tx ring empty > > Signed-off-by: C

Re: [PATCH bpf-next v2 3/6] bpf: add redirect_neigh helper as redirect drop-in

2020-09-28 Thread David Ahern
On 9/28/20 7:38 AM, Daniel Borkmann wrote: > diff --git a/net/core/filter.c b/net/core/filter.c > index a0776e48dcc9..64c6e5ec97d7 100644 > --- a/net/core/filter.c > +++ b/net/core/filter.c > +static int __bpf_redirect_neigh_v6(struct sk_buff *skb, struct net_device > *dev) > +{ > + const stru

Re: IPv6 regression introduced by commit 3b6761d18bc11f2af2a6fc494e9026d39593f22c

2020-09-28 Thread David Ahern
On 9/27/20 11:48 PM, Baptiste Jonglez wrote: > On 27-09-20, David Ahern wrote: >> On 9/27/20 9:10 AM, Baptiste Jonglez wrote: >>> On 27-09-20, Baptiste Jonglez wrote: >>>> 1) failing IPv6 neighbours, what Alarig reported. We are seeing this >>>>on a f

Re: [PATCH 1/1] Network: support default route metric per interface

2020-09-28 Thread David Ahern
On 9/28/20 6:54 PM, Qingtao Cao wrote: > Hi David, > > I understand I can use the "metric" parameter along with the "ip addr > add/change" and "ip route add/change" commands to make use of the > IFA_RT_PRIORITY attribute to explicitly specify the metric for routes > created directly or associated

Re: [PATCH RFC net-next] virtio_net: Relax queue requirement for using XDP

2020-09-28 Thread David Ahern
On 9/28/20 7:25 AM, Magnus Karlsson wrote: > On Mon, Sep 28, 2020 at 5:13 AM David Ahern wrote: >> >> On 2/27/20 2:41 AM, Magnus Karlsson wrote: >>> I will unfortunately be after Netdevconf due to other commitments. The >>> plan is to send out the RFC

Re: IPv6 regression introduced by commit 3b6761d18bc11f2af2a6fc494e9026d39593f22c

2020-09-27 Thread David Ahern
On 9/27/20 9:10 AM, Baptiste Jonglez wrote: > On 27-09-20, Baptiste Jonglez wrote: >> 1) failing IPv6 neighbours, what Alarig reported. We are seeing this >>on a full-view BGP router with rather low amount of IPv6 traffic >>(around 10-20 Mbps) > > Ok, I found a quick way to reproduce this

Re: [PATCH RFC net-next] virtio_net: Relax queue requirement for using XDP

2020-09-27 Thread David Ahern
On 2/27/20 2:41 AM, Magnus Karlsson wrote: > I will unfortunately be after Netdevconf due to other commitments. The > plan is to send out the RFC to the co-authors of the Plumbers > presentation first, just to check the sanity of it. And after that > send it to the mailing list. Note that I have ta

Re: [PATCH 1/1] Network: support default route metric per interface

2020-09-25 Thread David Ahern
On 9/25/20 5:11 PM, Qingtao Cao wrote: > From: Qingtao Cao > > Add /proc/sys/net/ipv[4|6]/conf//def_rt_metric sysfs attribute > file for each network interface so that userspace programs can specify > different default route metrics for each interface, which will also be > applied by the kernel w

Re: [PATCH bpf-next v5] bpf: Add bpf_ktime_get_real_ns

2020-09-24 Thread David Ahern
On 9/24/20 4:07 PM, bimmy.puj...@intel.com wrote: > diff --git a/include/uapi/linux/bpf.h b/include/uapi/linux/bpf.h > index a22812561064..198e69a6508d 100644 > --- a/include/uapi/linux/bpf.h > +++ b/include/uapi/linux/bpf.h > @@ -3586,6 +3586,13 @@ union bpf_attr { > * the data in *dst

Re: [PATCH bpf-next 3/6] bpf: add redirect_neigh helper as redirect drop-in

2020-09-24 Thread David Ahern
On 9/24/20 12:21 PM, Daniel Borkmann wrote: > diff --git a/net/core/filter.c b/net/core/filter.c > index 0f913755bcba..19caa2fc21e8 100644 > --- a/net/core/filter.c > +++ b/net/core/filter.c > @@ -2160,6 +2160,205 @@ static int __bpf_redirect(struct sk_buff *skb, struct > net_device *dev, >

Re: RTNETLINK answers: Permission denied

2020-09-24 Thread David Ahern
On 9/24/20 10:26 AM, Brian J. Murrell wrote: > On Thu, 2020-09-24 at 10:15 -0600, David Ahern wrote: >> >> check your routes for a prohibit entry: > > I don't have any prohibit entries > perf record -e fib6:* -g -- ip route get 2001:4860:4860::8844 perf script It's a config problem somewhere.

Re: RTNETLINK answers: Permission denied

2020-09-24 Thread David Ahern
On 9/24/20 5:09 AM, Brian J. Murrell wrote: > On Tue, 2020-09-22 at 15:04 -0400, Brian J. Murrell wrote: >> What are the possible causes of: >> >> # ip route get 2001:4860:4860::8844 >> RTNETLINK answers: Permission denied >> >> when >> >> # ip route get fd31:aeb1:48df::99 >> fd31:aeb1:48df::99 fro

Re: ip rule iif oif and vrf

2020-09-24 Thread David Ahern
On 9/24/20 7:48 AM, Stephen Suryaputra wrote: > On Wed, Sep 23, 2020 at 07:47:16PM -0600, David Ahern wrote: >> If I remove the fib rules and add VRF route leaking from core to tenant >> it works. Why is that not an option? Overlapping tenant addresses? > > Exactly. >

Re: [PATCH bpf-next v2 1/2] bpf: Add bpf_ktime_get_real_ns

2020-09-23 Thread David Ahern
On 9/23/20 7:19 PM, Maciej Żenczykowski wrote: >> diff --git a/kernel/bpf/helpers.c b/kernel/bpf/helpers.c >> index 5cc7425ee476..776ff58f969d 100644 >> --- a/kernel/bpf/helpers.c >> +++ b/kernel/bpf/helpers.c >> @@ -155,6 +155,17 @@ const struct bpf_func_proto bpf_ktime_get_ns_proto = { >>

Re: ip rule iif oif and vrf

2020-09-23 Thread David Ahern
On 9/23/20 5:50 PM, Stephen Suryaputra wrote: > > I have a reproducer using namespaces attached in this email (gre_setup.sh). Thanks for the script. Very helpful. Interesting setup. # +---+ +--+ +--+ +---+ # | h0| |r0| |r1| |h1 |

Re: [RFC PATCH v2 0/3] l3mdev icmp error route lookup fixes

2020-09-23 Thread David Ahern
On 9/23/20 1:12 PM, Michael Jeanson wrote: > > Just a final clarification, the asymmetric setup would have no return > route in VRF 2 and only test the TTL case since the others would fail? correct. add a statement about it representing a customer setup so it is clear such a config is a 1-off

Re: [RFC PATCH v2 0/3] l3mdev icmp error route lookup fixes

2020-09-23 Thread David Ahern
On 9/23/20 1:12 PM, Michael Jeanson wrote: > > Just a final clarification, the asymmetric setup would have no return > route in VRF 2 and only test the TTL case since the others would fail? correct. add a statement about it representing a customer setup so it is clear such a config is a 1-off

Re: [RFC PATCH v2 0/3] l3mdev icmp error route lookup fixes

2020-09-23 Thread David Ahern
On 9/23/20 11:03 AM, Michael Jeanson wrote: > On 2020-09-23 12 h 04, Michael Jeanson wrote: >>> It should work without asymmetric routing; adding the return route to >>> the second vrf as I mentioned above fixes the FRAG_NEEDED problem. It >>> should work for TTL as well. >>> >>> Adding a second pa

Re: [RFC PATCH v2 0/3] l3mdev icmp error route lookup fixes

2020-09-23 Thread David Ahern
On 9/23/20 11:03 AM, Michael Jeanson wrote: > On 2020-09-23 12 h 04, Michael Jeanson wrote: >>> It should work without asymmetric routing; adding the return route to >>> the second vrf as I mentioned above fixes the FRAG_NEEDED problem. It >>> should work for TTL as well. >>> >>> Adding a second pa

Re: [PATCH v2] net/ipv4: always honour route mtu during forwarding

2020-09-23 Thread David Ahern
On 9/23/20 2:46 AM, Eric Dumazet wrote: >> diff --git a/include/net/ip.h b/include/net/ip.h >> index b09c48d862cc..c2188bebbc54 100644 >> --- a/include/net/ip.h >> +++ b/include/net/ip.h >> @@ -436,12 +436,17 @@ static inline unsigned int >> ip_dst_mtu_maybe_forward(const struct dst_entry *dst, >>

Re: [PATCH iproute2-next] ip: promote missed packets to the -s row

2020-09-22 Thread David Ahern
On 9/16/20 1:42 PM, Jakub Kicinski wrote: > missed_packet_errors are much more commonly reported: > > linux$ git grep -c '[.>]rx_missed_errors ' -- drivers/ | wc -l > 64 > linux$ git grep -c '[.>]rx_over_errors ' -- drivers/ | wc -l > 37 > > Plus those drivers are generally more modern than those

Re: [PATCH iproute2-next RESEND 0/3] devlink show controller and external info

2020-09-22 Thread David Ahern
On 9/18/20 4:16 AM, Parav Pandit wrote: > For certain devlink port flavours controller number and optionally external > attributes are reported by the kernel. > > (a) controller number indicates that a given port belong to which local or > external controller. > (b) external port attribute indic

Re: [RFC PATCH v2 0/3] l3mdev icmp error route lookup fixes

2020-09-22 Thread David Ahern
On 9/22/20 7:52 AM, Michael Jeanson wrote: >>> >>> the test setup is bad. You have r1 dropping the MTU in VRF red, but not >>> telling VRF red how to send back the ICMP. e.g., for IPv4 add: >>> >>>ip -netns r1 ro add vrf red 172.16.1.0/24 dev blue >>> >>> do the same for v6. >>> >>> Also, I do

Re: [RFC PATCH v2 0/3] l3mdev icmp error route lookup fixes

2020-09-22 Thread David Ahern
On 9/22/20 7:52 AM, Michael Jeanson wrote: >>> >>> the test setup is bad. You have r1 dropping the MTU in VRF red, but not >>> telling VRF red how to send back the ICMP. e.g., for IPv4 add: >>> >>>ip -netns r1 ro add vrf red 172.16.1.0/24 dev blue >>> >>> do the same for v6. >>> >>> Also, I do

Re: [PATCH iproute2] ip: do not exit if RTM_GETNSID failed

2020-09-22 Thread David Ahern
On 9/22/20 5:57 PM, Stephen Hemminger wrote: > On Tue, 22 Sep 2020 17:16:46 -0600 > David Ahern wrote: > >> On 9/22/20 12:28 AM, Jan Engelhardt wrote: >>> >>> On Tuesday 2020-09-22 02:22, Stephen Hemminger wrote: >>>> Jan Engelhardt wrote: &g

Re: [PATCH iproute2] ip: do not exit if RTM_GETNSID failed

2020-09-22 Thread David Ahern
On 9/22/20 12:28 AM, Jan Engelhardt wrote: > > On Tuesday 2020-09-22 02:22, Stephen Hemminger wrote: >> Jan Engelhardt wrote: >> >>> `ip addr` when run under qemu-user-riscv64, fails. This likely is >>> due to qemu-5.1 not doing translation of RTM_GETNSID calls. >>> >>> 2: host0@if5: mtu 1500 qd

Re: ip rule iif oif and vrf

2020-09-22 Thread David Ahern
On 9/22/20 7:11 AM, Stephen Suryaputra wrote: > Hi, > > We have a use case where there are multiple user VRFs being leak routed > to and from tunnels that are on the core VRF. Traffic from user VRF to a > tunnel can be done the normal way by specifying the netdev directly on > the route entry on t

Re: [RFC PATCH v2 0/3] l3mdev icmp error route lookup fixes

2020-09-21 Thread David Ahern
On 9/21/20 12:44 PM, Mathieu Desnoyers wrote: > - On Sep 21, 2020, at 2:36 PM, David Ahern dsah...@gmail.com wrote: > >> On 9/18/20 12:17 PM, Mathieu Desnoyers wrote: >>> Hi, >>> >>> Here is an updated series of fixes for ipv4 and ipv6 which which ensu

Re: [RFC PATCH v2 0/3] l3mdev icmp error route lookup fixes

2020-09-21 Thread David Ahern
On 9/21/20 12:44 PM, Mathieu Desnoyers wrote: > - On Sep 21, 2020, at 2:36 PM, David Ahern dsah...@gmail.com wrote: > >> On 9/18/20 12:17 PM, Mathieu Desnoyers wrote: >>> Hi, >>> >>> Here is an updated series of fixes for ipv4 and ipv6 which which ensu

Re: [RFC PATCH v2 0/3] l3mdev icmp error route lookup fixes

2020-09-21 Thread David Ahern
On 9/18/20 12:17 PM, Mathieu Desnoyers wrote: > Hi, > > Here is an updated series of fixes for ipv4 and ipv6 which which ensure > the route lookup is performed on the right routing table in VRF > configurations when sending TTL expired icmp errors (useful for > traceroute). > > It includes tests

Re: [RFC PATCH v2 0/3] l3mdev icmp error route lookup fixes

2020-09-21 Thread David Ahern
On 9/18/20 12:17 PM, Mathieu Desnoyers wrote: > Hi, > > Here is an updated series of fixes for ipv4 and ipv6 which which ensure > the route lookup is performed on the right routing table in VRF > configurations when sending TTL expired icmp errors (useful for > traceroute). > > It includes tests

Re: [PATCH iproute2-next] ip: promote missed packets to the -s row

2020-09-18 Thread David Ahern
On 9/18/20 9:48 AM, Jakub Kicinski wrote: > On Fri, 18 Sep 2020 09:44:35 -0600 David Ahern wrote: >> On 9/16/20 1:42 PM, Jakub Kicinski wrote: >>> 2: eth0: mtu 1500 qdisc mq state UP mode >>> DEFAULT group default qlen 1000 >>> link/ether 00:0a:f7:c1:4d

Re: [PATCH net-next v2 1/8] devlink: Introduce PCI SF port flavour and port attribute

2020-09-18 Thread David Ahern
On 9/18/20 10:13 AM, Parav Pandit wrote: >> You keep adding patches that extend the template based names. Those are >> going to cause odd EINVAL failures (the absolute worst kind of configuration >> failure) with no way for a user to understand why the command is failing, and >> you need to handle

Re: [PATCH iproute2-next] ip: promote missed packets to the -s row

2020-09-18 Thread David Ahern
On 9/16/20 1:42 PM, Jakub Kicinski wrote: > missed_packet_errors are much more commonly reported: > > linux$ git grep -c '[.>]rx_missed_errors ' -- drivers/ | wc -l > 64 > linux$ git grep -c '[.>]rx_over_errors ' -- drivers/ | wc -l > 37 > > Plus those drivers are generally more modern than those

Re: [PATCH net-next v2 8/8] netdevsim: Add support for add and delete PCI SF port

2020-09-18 Thread David Ahern
On 9/17/20 10:41 PM, Parav Pandit wrote: > Hi David, > >> From: David Ahern >> Sent: Friday, September 18, 2020 9:08 AM >> >> On 9/17/20 9:29 PM, Parav Pandit wrote: >>>>> Examples: >>>>> >>>>> Create a PCI PF and PCI SF

Re: [PATCH net-next v2 1/8] devlink: Introduce PCI SF port flavour and port attribute

2020-09-18 Thread David Ahern
On 9/17/20 10:18 PM, Parav Pandit wrote: > >> From: David Ahern >> Sent: Friday, September 18, 2020 1:32 AM >> >> On 9/17/20 11:20 AM, Parav Pandit wrote: >>> diff --git a/include/net/devlink.h b/include/net/devlink.h index >>> 48b1c1ef1ebd..1edb55

Re: [PATCH net-next v2 8/8] netdevsim: Add support for add and delete PCI SF port

2020-09-17 Thread David Ahern
On 9/17/20 9:29 PM, Parav Pandit wrote: >>> Examples: >>> >>> Create a PCI PF and PCI SF port. >>> $ devlink port add netdevsim/netdevsim10/10 flavour pcipf pfnum 0 $ >>> devlink port add netdevsim/netdevsim10/11 flavour pcisf pfnum 0 sfnum >>> 44 $ devlink port show netdevsim/netdevsim10/11 >>> ne

Re: [PATCH net-next v2 8/8] netdevsim: Add support for add and delete PCI SF port

2020-09-17 Thread David Ahern
On 9/17/20 11:20 AM, Parav Pandit wrote: > Simulate PCI SF ports. Allow user to create one or more PCI SF ports. > > Examples: > > Create a PCI PF and PCI SF port. > $ devlink port add netdevsim/netdevsim10/10 flavour pcipf pfnum 0 > $ devlink port add netdevsim/netdevsim10/11 flavour pcisf pfnum

Re: [PATCH net-next v2 4/8] devlink: Support get and set state of port function

2020-09-17 Thread David Ahern
On 9/17/20 11:20 AM, Parav Pandit wrote: > diff --git a/net/core/devlink.c b/net/core/devlink.c > index d152489e48da..c82098cb75da 100644 > --- a/net/core/devlink.c > +++ b/net/core/devlink.c > @@ -595,6 +598,40 @@ devlink_port_function_hw_addr_fill(struct devlink > *devlink, const struct devlink

Re: [PATCH net-next v2 1/8] devlink: Introduce PCI SF port flavour and port attribute

2020-09-17 Thread David Ahern
On 9/17/20 11:20 AM, Parav Pandit wrote: > diff --git a/include/net/devlink.h b/include/net/devlink.h > index 48b1c1ef1ebd..1edb558125b0 100644 > --- a/include/net/devlink.h > +++ b/include/net/devlink.h > @@ -83,6 +83,20 @@ struct devlink_port_pci_vf_attrs { > u8 external:1; > }; > > +/**

[PATCH net-next] selftests: Set default protocol for raw sockets in nettest

2020-09-17 Thread David Ahern
IPPROTO_IP (0) is not valid for raw sockets. Default the protocol for raw sockets to IPPROTO_RAW if the protocol has not been set via the -P option. Signed-off-by: David Ahern --- tools/testing/selftests/net/nettest.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/testing/selftests

Re: [PATCH net] ipv4: Update exception handling for multipath routes via same device

2020-09-15 Thread David Ahern
On 9/15/20 4:46 PM, David Miller wrote: > > The example topology and commands look like a good addition for > selftests perhaps? > Definitely. I plan to integrate it into pmtu.sh.

Re: [PATCHv11 bpf-next 2/5] xdp: add a new helper for dev map multicast support

2020-09-15 Thread David Ahern
On 9/11/20 1:58 AM, Jesper Dangaard Brouer wrote: > On Thu, 10 Sep 2020 12:35:33 -0600 > David Ahern wrote: > >> On 9/10/20 11:50 AM, Jesper Dangaard Brouer wrote: >>> Maybe we should change the devmap-prog approach, and run this on the >>> xdp_frame&

[PATCH net] ipv4: Update exception handling for multipath routes via same device

2020-09-14 Thread David Ahern
octet more than what is listed. In my tests, using addresses between 11 and 19 usually found 1 that used both legs. With this patch, the cache will have exceptions for both legs. Fixes: 4895c771c7f0 ("ipv4: Add FIB nexthop exceptions") Reported-by: Kfir Itzhak Signed-off-by: David Ahern

[PATCH net] ipv4: Initialize flowi4_multipath_hash in data path

2020-09-13 Thread David Ahern
From: David Ahern flowi4_multipath_hash was added by the commit referenced below for tunnels. Unfortunately, the patch did not initialize the new field for several fast path lookups that do not initialize the entire flow struct to 0. Fix those locations. Currently, flowi4_multipath_hash is

Re: [PATCH] ipv6: remove redundant assignment to variable err

2020-09-11 Thread David Ahern
ions in reverse > Christmas tree ordering. > > Addresses-Coverity: ("Unused value") > Signed-off-by: Colin Ian King > --- > net/ipv6/route.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > Reviewed-by: David Ahern

Re: [RFC PATCH net-next 17/22] nexthop: Replay nexthops when registering a notifier

2020-09-11 Thread David Ahern
On 9/11/20 10:40 AM, Ido Schimmel wrote: >>> @@ -2116,11 +2137,40 @@ static struct notifier_block nh_netdev_notifier = { >>> .notifier_call = nh_netdev_event, >>> }; >>> >>> +static int nexthops_dump(struct net *net, struct notifier_block *nb, >>> +struct netlink_ext_ack

Re: [PATCH] ipv6: remove redundant assignment to variable err

2020-09-11 Thread David Ahern
ions in reverse > Christmas tree ordering. > > Addresses-Coverity: ("Unused value") > Signed-off-by: Colin Ian King > --- > net/ipv6/route.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > Reviewed-by: David Ahern

Re: [RFC PATCH net-next 09/22] rtnetlink: Add RTNH_F_TRAP flag

2020-09-11 Thread David Ahern
> > Signed-off-by: Ido Schimmel > Reviewed-by: David Ahern > " works for me. thanks

Re: [PATCH net-next v3 6/6] devlink: Use controller while building phys_port_name

2020-09-10 Thread David Ahern
On 9/8/20 10:50 PM, Parav Pandit wrote: > $ devlink port show pci/:06:00.0/2 > pci/:06:00.0/2: type eth netdev ens2f0c1pf0vf1 flavour pcivf controller 1 > pfnum 0 vfnum 1 external true splittable false > function: > hw_addr 00:00:00:00:00:00 > > $ devlink port show pci/:06:00.0/

Re: [PATCHv11 bpf-next 2/5] xdp: add a new helper for dev map multicast support

2020-09-10 Thread David Ahern
On 9/10/20 11:50 AM, Jesper Dangaard Brouer wrote: > Maybe we should change the devmap-prog approach, and run this on the > xdp_frame's (in bq_xmit_all() to be precise) . Hangbin's patchset > clearly shows that we need this "layer" between running the xdp_prog and > the devmap-prog. I would pref

Re: [PATCHv11 bpf-next 2/5] xdp: add a new helper for dev map multicast support

2020-09-09 Thread David Ahern
On 9/9/20 8:35 PM, Hangbin Liu wrote: > Hi Alexei, > > On Wed, Sep 09, 2020 at 02:52:06PM -0700, Alexei Starovoitov wrote: >> On Mon, Sep 07, 2020 at 04:27:21PM +0800, Hangbin Liu wrote: >>> This patch is for xdp multicast support. which has been discussed >>> before[0], The goal is to be able to

Re: [PATCH iproute2-next v3] iproute2: ss: add support to expose various inet sockopts

2020-09-08 Thread David Ahern
On 8/19/20 3:13 PM, Wei Wang wrote: > This commit adds support to expose the following inet socket options: > -- recverr > -- is_icsk > -- freebind > -- hdrincl > -- mc_loop > -- transparent > -- mc_all > -- nodefrag > -- bind_address_no_port > -- recverr_rfc4884 > -- defer_connect > with the optio

Re: [RFC PATCH net-next 07/22] nexthop: Prepare new notification info

2020-09-08 Thread David Ahern
++ > 1 file changed, 108 insertions(+) > Reviewed-by: David Ahern one trivial comment below. > +static void > +__nh_notifier_single_info_init(struct nh_notifier_single_info *nh_info, > +const struct nexthop *nh) > +{ > + struc

Re: [RFC PATCH net-next 10/22] nexthop: Allow setting "offload" and "trap" indications on nexthops

2020-09-08 Thread David Ahern
On 9/8/20 3:10 AM, Ido Schimmel wrote: > From: Ido Schimmel > > Add a function that can be called by device drivers to set "offload" or > "trap" indication on nexthops following nexthop notifications. > > Signed-off-by: Ido Schimmel > --- > include/net/nexthop.h | 1 + > net/ipv4/nexthop.c

Re: [RFC PATCH net-next 03/22] nexthop: Only emit a notification when nexthop is actually deleted

2020-09-08 Thread David Ahern
xthop is being deleted > 4. The network namespace of the nexthop device is deleted > > Signed-off-by: Ido Schimmel > --- > net/ipv4/nexthop.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > Reviewed-by: David Ahern

Re: [RFC PATCH net-next 11/22] nexthop: Emit a notification when a nexthop is added

2020-09-08 Thread David Ahern
On 9/8/20 3:10 AM, Ido Schimmel wrote: > From: Ido Schimmel > > Emit a notification in the nexthop notification chain when a new nexthop > is added (not replaced). The nexthop can either be a new group or a > single nexthop. Add a comment about why EVENT_REPLACE is generated on an 'added (not re

Re: [RFC PATCH net-next 04/22] selftests: fib_nexthops: Test cleanup of FDB entries following nexthop deletion

2020-09-08 Thread David Ahern
exthops.sh | 14 ++ > 1 file changed, 14 insertions(+) > Reviewed-by: David Ahern

Re: [RFC PATCH net-next 15/22] nexthop: Emit a notification when a nexthop group is reduced

2020-09-08 Thread David Ahern
On 9/8/20 3:10 AM, Ido Schimmel wrote: > From: Ido Schimmel > > When a single nexthop is deleted, the configuration of all the groups > using the nexthop is effectively modified. In this case, emit a > notification in the nexthop notification chain for each modified group > so that listeners woul

Re: [RFC PATCH net-next 16/22] nexthop: Pass extack to register_nexthop_notifier()

2020-09-08 Thread David Ahern
it is > passed to them upon reload from devlink. > > Signed-off-by: Ido Schimmel > --- > drivers/net/vxlan.c | 3 ++- > include/net/nexthop.h | 3 ++- > net/ipv4/nexthop.c| 3 ++- > 3 files changed, 6 insertions(+), 3 deletions(-) > Reviewed-by: David Ahern

Re: [RFC PATCH net-next 01/22] nexthop: Remove unused function declaration from header file

2020-09-08 Thread David Ahern
On 9/8/20 3:10 AM, Ido Schimmel wrote: > From: Ido Schimmel > > Not used or implemented anywhere. > > Signed-off-by: Ido Schimmel > --- > include/net/nexthop.h | 3 --- > 1 file changed, 3 deletions(-) > Reviewed-by: David Ahern

Re: [RFC PATCH net-next 12/22] nexthop: Emit a notification when a nexthop group is replaced

2020-09-08 Thread David Ahern
ration (i.e., 'struct nh_grp') is > pointed at by the old shell (i.e., 'struct nexthop'). This prevents the > need to perform rollback in case the notification is vetoed. > > Signed-off-by: Ido Schimmel > --- > net/ipv4/nexthop.c | 6 +- > 1 file changed, 5 insertions(+), 1 deletion(-) > Reviewed-by: David Ahern

Re: [RFC PATCH net-next 17/22] nexthop: Replay nexthops when registering a notifier

2020-09-08 Thread David Ahern
On 9/8/20 3:10 AM, Ido Schimmel wrote: > From: Ido Schimmel > > When registering a new notifier to the nexthop notification chain, > replay all the existing nexthops to the new notifier so that it will > have a complete picture of the available nexthops. > > Signed-off-by: Ido Schimmel > --- >

Re: [RFC PATCH net-next 21/22] netdevsim: Allow programming routes with nexthop objects

2020-09-08 Thread David Ahern
rs/net/netdevsim/fib.c | 10 -- > 1 file changed, 10 deletions(-) > Reviewed-by: David Ahern

Re: [RFC PATCH net-next 08/22] nexthop: vxlan: Convert to new notification info

2020-09-08 Thread David Ahern
On 9/8/20 3:10 AM, Ido Schimmel wrote: > From: Ido Schimmel > > Convert the sole listener of the nexthop notification chain (the VXLAN > driver) to the new notification info. > > Signed-off-by: Ido Schimmel > --- > drivers/net/vxlan.c | 9 +++-- > net/ipv4/nexthop.c | 2 +- > 2 files chan

Re: [RFC PATCH net-next 09/22] rtnetlink: Add RTNH_F_TRAP flag

2020-09-08 Thread David Ahern
> net/ipv4/fib_semantics.c | 2 ++ > 2 files changed, 6 insertions(+), 2 deletions(-) > Reviewed-by: David Ahern

Re: [RFC PATCH net-next 13/22] nexthop: Emit a notification when a single nexthop is replaced

2020-09-08 Thread David Ahern
On 9/8/20 3:10 AM, Ido Schimmel wrote: > From: Ido Schimmel > > The notification is emitted after all the validation checks were > performed, but before the new configuration (i.e., 'struct nh_info') is > pointed at by the old shell (i.e., 'struct nexthop'). This prevents the > need to perform ro

Re: [RFC PATCH net-next 18/22] nexthop: Remove in-kernel route notifications when nexthop changes

2020-09-08 Thread David Ahern
or the nexthop change itself > is now sent in the nexthop notification chain. > > Signed-off-by: Ido Schimmel > --- > net/ipv4/fib_trie.c | 9 - > net/ipv6/route.c| 5 - > 2 files changed, 14 deletions(-) > Reviewed-by: David Ahern

Re: [PATCH net] ipv6: avoid lockdep issue in fib6_del()

2020-09-08 Thread David Ahern
urn earlier. > > Bug seems to occur very rarely, I have thus chosen > a 'bug origin' that makes backports not too complex. Make sense. > > [1] ... > > Fixes: 421842edeaf6 ("net/ipv6: Add fib6_null_entry") > Signed-off-by: Eric Dumazet > Cc: David Ahe

Re: [RFC PATCH net-next 06/22] nexthop: Pass extack to nexthop notifier

2020-09-08 Thread David Ahern
struct nl_info *nlinfo) > { > - call_nexthop_notifiers(net, NEXTHOP_EVENT_DEL, nh); > + call_nexthop_notifiers(net, NEXTHOP_EVENT_DEL, nh, NULL); > > /* remove from the tree */ > rb_erase(&nh->rb_node, &net->nexthop.rb_root); > Reviewed-by: David Ahern

Re: [PATCH net] ipv6: avoid lockdep issue in fib6_del()

2020-09-08 Thread David Ahern
On 9/8/20 11:06 AM, Eric Dumazet wrote: > On Tue, Sep 8, 2020 at 6:50 PM David Ahern wrote: >> >> On 9/8/20 2:20 AM, Eric Dumazet wrote: >>> syzbot reported twice a lockdep issue in fib6_del() [1] >>> which I think is caused by net->ipv6.fib6_null_entry

Re: [RFC PATCH net-next 05/22] nexthop: Add nexthop notification data structures

2020-09-08 Thread David Ahern
gt; + u8 gw_family; > + union { > + __be32 ipv4; > + struct in6_addr ipv6; > + }; > + u8 is_reject:1, > +is_fdb:1, > +is_encap:1; use has_encap since it refers to a configuration of a nexthop versus a nexthop type. I take it this is a placeholder until lwt offload is supported? besides the naming nit, Reviewed-by: David Ahern

Re: [RFC PATCH net-next 03/22] nexthop: Only emit a notification when nexthop is actually deleted

2020-09-08 Thread David Ahern
On 9/8/20 8:39 AM, Jiri Pirko wrote: > Tue, Sep 08, 2020 at 11:10:18AM CEST, ido...@idosch.org wrote: >> From: Ido Schimmel >> >> Currently, the delete notification is emitted from the error path of >> nexthop_add() and replace_nexthop(), which can be confusing to listeners >> as they are not fami

Re: [PATCH net] ipv6: avoid lockdep issue in fib6_del()

2020-09-08 Thread David Ahern
On 9/8/20 2:20 AM, Eric Dumazet wrote: > syzbot reported twice a lockdep issue in fib6_del() [1] > which I think is caused by net->ipv6.fib6_null_entry > having a NULL fib6_table pointer. > > fib6_del() already checks for fib6_null_entry special > case, we only need to return earlier. > > Bug see

Re: [RFC PATCH net-next 14/22] nexthop: Emit a notification when a nexthop group is modified

2020-09-08 Thread David Ahern
he configuration of the nexthop groups is still > the same as before the replacement. > > Signed-off-by: Ido Schimmel > --- > net/ipv4/nexthop.c | 32 ++-- > 1 file changed, 30 insertions(+), 2 deletions(-) > Reviewed-by: David Ahern

Re: [RFC PATCH net-next 02/22] nexthop: Convert to blocking notification chain

2020-09-08 Thread David Ahern
| 13 +++-- > 2 files changed, 8 insertions(+), 7 deletions(-) Reviewed-by: David Ahern

Re: [PATCH v2 net-next 1/9] xdp: introduce mb in xdp_buff/xdp_frame

2020-09-07 Thread David Ahern
On 9/7/20 12:02 PM, Jesper Dangaard Brouer wrote: > >> ok, is there any alignment requirement? can frame_sz be number of 32-bit >> words? I believe bit shifts are cheap. > > No that is not possible, because some drivers and generic-XDP have a > fully dynamic frame_sz. > frame_sz represents allo

Re: [PATCH v2 net-next 1/9] xdp: introduce mb in xdp_buff/xdp_frame

2020-09-04 Thread David Ahern
On 9/4/20 9:59 AM, Jesper Dangaard Brouer wrote: >> dev_rx for example seems like it could just be the netdev >> index rather than a pointer or perhaps can be removed completely. I >> believe it is only used for 1 use case (redirects to CPUMAP); maybe that >> code can be refactored to handle the de

Re: [PATCH v2 net-next 1/9] xdp: introduce mb in xdp_buff/xdp_frame

2020-09-04 Thread David Ahern
On 9/4/20 1:19 AM, Jesper Dangaard Brouer wrote: > On Thu, 3 Sep 2020 18:07:05 -0700 > Alexei Starovoitov wrote: > >> On Thu, Sep 03, 2020 at 10:58:45PM +0200, Lorenzo Bianconi wrote: >>> Introduce multi-buffer bit (mb) in xdp_frame/xdp_buffer to specify >>> if shared_info area has been properly

Re: [PATCH net-next] net: tighten the definition of interface statistics

2020-09-03 Thread David Ahern
On 9/2/20 8:03 PM, Jakub Kicinski wrote: > diff --git a/Documentation/networking/statistics.rst > b/Documentation/networking/statistics.rst > new file mode 100644 > index ..487b17c166e8 > --- /dev/null > +++ b/Documentation/networking/statistics.rst ... > + > +sysfs > +- > + > +E

Re: [PATCH bpf-next] bpf: add bpf_get_xdp_hash helper function

2020-09-01 Thread David Ahern
On 9/1/20 6:52 PM, Ramamurthy, Harshitha wrote: >> On 8/31/20 1:25 PM, Harshitha Ramamurthy wrote: >>> diff --git a/include/uapi/linux/bpf.h b/include/uapi/linux/bpf.h index >>> a613750d5515..bffe93b526e7 100644 >>> --- a/include/uapi/linux/bpf.h >>> +++ b/include/uapi/linux/bpf.h >>> @@ -3576,6 +3

Re: [iproute2-next] tipc: support 128bit node identity for peer removing

2020-09-01 Thread David Ahern
On 8/26/20 8:30 PM, Hoang Huu Le wrote: > From: Hoang Le > > Problem: > In kernel upstream, we add the support to set node identity with > 128bit. However, we are still using legacy format in command tipc > peer removing. Then, we got a problem when trying to remove > offline node i.e: > > $ tip

<    3   4   5   6   7   8   9   10   11   12   >