Re: [iproute PATCH v2 4/4] lib: Enable colored output only for TTYs

2018-08-15 Thread David Ahern
On 8/15/18 10:21 AM, Phil Sutter wrote: > Add an additional prerequisite to check_enable_color() to make sure > stdout actually points to an open TTY device. Otherwise calls like > > | ip -color a s >/tmp/foo > > will print color escape sequences into that file. Allow to override this > check by

Re: [PATCH v3 net-next] veth: Free queues on link delete

2018-08-15 Thread David Ahern
On 8/15/18 2:07 AM, Toshiaki Makita wrote: > David Ahern reported memory leak in veth. > ... > veth_rq allocated in veth_newlink() was not freed on dellink. > > We need to free up them after veth_close() so that any packets will not > reference the queues afterwar

Re: [iproute PATCH 4/4] lib: Enable colored output only for TTYs

2018-08-15 Thread David Ahern
On 8/15/18 3:06 AM, Phil Sutter wrote: > Add an additional prerequisite to check_enable_color() to make sure > stdout actually points to an open TTY device. Otherwise calls like > > | ip -color a s >/tmp/foo > > will print color escape sequences into that file. > > Signed-off-by: Phil Sutter >

Re: [PATCH v2 net-next] veth: Free queues on link delete

2018-08-14 Thread David Ahern
On 8/14/18 7:16 PM, Toshiaki Makita wrote: > Hmm, on second thought this queues need to be freed after veth_close() > to make sure no packet will reference them. That means we need to free > them in .ndo_uninit() or destructor. > (rtnl_delete_link() calls dellink() before

Re: [PATCH net] veth: Free queues on link delete

2018-08-14 Thread David Ahern
On 8/14/18 6:37 PM, Toshiaki Makita wrote: > On 2018/08/15 7:36, dsah...@kernel.org wrote: >> From: David Ahern >> >> kmemleak reported new suspected memory leaks. >> $ cat /sys/kernel/debug/kmemleak >> unreferenced object 0x880130b6ec00 (size 1024):

Re: [PATCH v2 iproute2-next] Add SKB Priority qdisc support in tc(8)

2018-08-14 Thread David Ahern
On 8/13/18 8:57 PM, Nishanth Devarajan wrote: > sch_skbprio is a qdisc that prioritizes packets according to their > skb->priority > field. Under congestion, it drops already-enqueued lower priority packets to > make space available for higher priority packets. Skbprio was conceived as a >

Re: [PATCH v2 iproute2-next] sch_cake: Make gso-splitting configurable

2018-08-13 Thread David Ahern
On 8/13/18 5:36 AM, Toke Høiland-Jørgensen wrote: > This patch makes sch_cake's gso/gro splitting configurable > from userspace. > > To disable breaking apart superpackets in sch_cake: > > tc qdisc replace dev whatever root cake no-split-gso > > to enable: > > tc qdisc replace dev whatever

Re: [Patch net] ipv6: fix double refcount of fib6_metrics

2018-08-12 Thread David Ahern
ave the same life time, so the > whole fib6_metrics refcnt can be removed actually. > > This fixes a kmemleak warning reported by Sabrina. > > Fixes: 93531c674315 ("net/ipv6: separate handling of FIB entries from dst > based routes") > Reported-by: Sabrina Dubroca &

Re: The recvmsg() with IP_PKTINFO for local addresses returns various ipi_ifindex

2018-08-12 Thread David Ahern
On 8/9/18 2:13 AM, Damir Mansurov wrote: > Greetings, > > I use the IP_PKTINFO to detect ipi_ifindex from which the packet was > arrived, it used to work for local addresses also. > > For local addresses ipi_ifindex always returned 1, but starting from > Linux 4.14 ip_ifindex began to return

Re: [PATCH iproute2-next 3/3] q_netem: slotting with non-uniform distribution

2018-08-12 Thread David Ahern
On 8/6/18 11:09 AM, Yousuk Seung wrote: > @@ -417,21 +421,53 @@ static int netem_parse_opt(struct qdisc_util *qu, int > argc, char **argv, > } > } > } else if (matches(*argv, "slot") == 0) { > - NEXT_ARG(); > -

Re: [PATCH iproute2-next 2/3] q_netem: support delivering packets in delayed time slots

2018-08-12 Thread David Ahern
On 8/6/18 11:09 AM, Yousuk Seung wrote: > diff --git a/tc/q_netem.c b/tc/q_netem.c > index 9f9a9b3df255..f52a36b6c31c 100644 > --- a/tc/q_netem.c > +++ b/tc/q_netem.c > @@ -40,7 +40,10 @@ static void explain(void) > " [ loss gemodel PERCENT [R [1-H [1-K]]]\n" \ > "

Re: [PATCH iproute2-next 1/3] tc: support conversions to or from 64 bit nanosecond-based time

2018-08-12 Thread David Ahern
On 8/6/18 11:09 AM, Yousuk Seung wrote: > diff --git a/tc/tc_core.h b/tc/tc_core.h > index 1dfa9a4f773b..a0fe0923d171 100644 > --- a/tc/tc_core.h > +++ b/tc/tc_core.h > @@ -7,6 +7,10 @@ > > #define TIME_UNITS_PER_SEC 100 > > +#define NSEC_PER_USEC 1000 > +#define NSEC_PER_MSEC 100 >

Re: [PATCH iproute2-next] Add SKB Priority qdisc support in tc(8)

2018-08-12 Thread David Ahern
On 8/8/18 12:24 PM, Nishanth Devarajan wrote: > sch_skbprio is a qdisc that prioritizes packets according to their > skb->priority > field. Under congestion, it drops already-enqueued lower priority packets to > make space available for higher priority packets. Skbprio was conceived as a >

Re: [PATCHi iproute2-next] ip: show min and max mtu

2018-08-12 Thread David Ahern
On 7/27/18 2:43 PM, Stephen Hemminger wrote: > From: Stephen Hemminger > > Add min/max MTU to the link details > > Signed-off-by: Stephen Hemminger > --- > include/uapi/linux/if_link.h | 2 ++ > ip/ipaddress.c | 10 ++ > 2 files changed, 12 insertions(+) > applied to

Re: KASAN: use-after-free Read in rtnetlink_put_metrics

2018-08-01 Thread David Ahern
On 8/1/18 10:15 AM, Sabrina Dubroca wrote: > ip -net peerA route add fec0:B::/64 via fec0:A:: mtu 1300 I am on vacation right now with limited access to internet, so not able to take a look. In submitting the fib6_info changes I did tests like this and did not see memleak reports (and verified

Re: KASAN: use-after-free Read in rtnetlink_put_metrics

2018-08-01 Thread David Ahern
On 8/1/18 10:15 AM, Sabrina Dubroca wrote: > ip -net peerA route add fec0:B::/64 via fec0:A:: mtu 1300 I am on vacation right now with limited access to internet, so not able to take a look. In submitting the fib6_info changes I did tests like this and did not see memleak reports (and verified

Re: [PATCH RFC/RFT net-next 00/17] net: Convert neighbor tables to per-namespace

2018-07-25 Thread David Ahern
On 7/24/18 11:14 AM, David Miller wrote: > From: David Ahern > Date: Tue, 24 Jul 2018 09:14:01 -0600 > >> I get the impression there is no longer a strong resistance against >> moving the tables to per namespace, but deciding what is the right >> approach to han

Re: [PATCH RFC/RFT net-next 00/17] net: Convert neighbor tables to per-namespace

2018-07-25 Thread David Ahern
On 7/24/18 11:14 AM, David Miller wrote: > From: David Ahern > Date: Tue, 24 Jul 2018 09:14:01 -0600 > >> I get the impression there is no longer a strong resistance against >> moving the tables to per namespace, but deciding what is the right >> approach to han

Re: [PATCH RFC/RFT net-next 00/17] net: Convert neighbor tables to per-namespace

2018-07-25 Thread David Ahern
On 7/24/18 11:14 AM, David Miller wrote: > From: David Ahern > Date: Tue, 24 Jul 2018 09:14:01 -0600 > >> I get the impression there is no longer a strong resistance against >> moving the tables to per namespace, but deciding what is the right >> approach to han

Re: [PATCH RFC/RFT net-next 00/17] net: Convert neighbor tables to per-namespace

2018-07-25 Thread David Ahern
On 7/24/18 11:14 AM, David Miller wrote: > From: David Ahern > Date: Tue, 24 Jul 2018 09:14:01 -0600 > >> I get the impression there is no longer a strong resistance against >> moving the tables to per namespace, but deciding what is the right >> approach to han

Re: [PATCH RFC/RFT net-next 00/17] net: Convert neighbor tables to per-namespace

2018-07-25 Thread David Ahern
On 7/25/18 11:38 AM, Eric W. Biederman wrote: > > Absolutely NOT. Global thresholds are exactly correct given the fact > you are running on a single kernel. > > Memory is not free (Even though we are swimming in enough of it memory > rarely matters). One of the few remaining challenges is for

Re: [PATCH RFC/RFT net-next 00/17] net: Convert neighbor tables to per-namespace

2018-07-25 Thread David Ahern
On 7/25/18 11:38 AM, Eric W. Biederman wrote: > > Absolutely NOT. Global thresholds are exactly correct given the fact > you are running on a single kernel. > > Memory is not free (Even though we are swimming in enough of it memory > rarely matters). One of the few remaining challenges is for

Re: [PATCH RFC/RFT net-next 00/17] net: Convert neighbor tables to per-namespace

2018-07-25 Thread David Ahern
On 7/25/18 11:38 AM, Eric W. Biederman wrote: > > Absolutely NOT. Global thresholds are exactly correct given the fact > you are running on a single kernel. > > Memory is not free (Even though we are swimming in enough of it memory > rarely matters). One of the few remaining challenges is for

Re: [PATCH RFC/RFT net-next 00/17] net: Convert neighbor tables to per-namespace

2018-07-25 Thread David Ahern
On 7/25/18 11:38 AM, Eric W. Biederman wrote: > > Absolutely NOT. Global thresholds are exactly correct given the fact > you are running on a single kernel. > > Memory is not free (Even though we are swimming in enough of it memory > rarely matters). One of the few remaining challenges is for

Re: [PATCH iproute2] iplink: report drop stats for VFs

2018-07-25 Thread David Ahern
On 7/25/18 10:22 AM, Ivan Vecera wrote: > Kernel commit c5a9f6f0ab40 ("net/core: Add drop counters to VF > statistics") added support for Rx/Tx packet drops but these stats are > not reported by 'ip link'. > > Cc: Eugenia Emantayev > Cc: Saeed Mahameed > > Signed-off-by: Ivan Vecera > --- >

Re: [patch iproute2/net-next v4] tc: introduce support for chain templates

2018-07-25 Thread David Ahern
On 7/23/18 1:24 AM, Jiri Pirko wrote: > From: Jiri Pirko > > Signed-off-by: Jiri Pirko > --- > v3->v4: > - reworked to chain object > v1->v2: > - moved the template handling > from "tc filter template" to "tc chaintemplate" > --- > include/uapi/linux/rtnetlink.h | 7 +++ > man/man8/tc.8

Re: [PATCH iproute2-next] ip: Add violation counters to VF statisctics

2018-07-25 Thread David Ahern
On 7/22/18 4:31 AM, Eran Ben Elisha wrote: > Extend VFs statistics by receive and transmit violation counters. > > Example: "ip -s link show dev enp5s0f0" > > 6: enp5s0f0: mtu 1500 qdisc mq state UP > mode DEFAULT group default qlen 1000 > link/ether 24:8a:07:a5:28:f0 brd ff:ff:ff:ff:ff:ff

Re: [PATCH RFC/RFT net-next 00/17] net: Convert neighbor tables to per-namespace

2018-07-25 Thread David Ahern
On 7/25/18 6:33 AM, Eric W. Biederman wrote: > Cong Wang writes: > >> On Tue, Jul 24, 2018 at 8:14 AM David Ahern wrote: >>> >>> On 7/19/18 11:12 AM, Cong Wang wrote: >>>> On Thu, Jul 19, 2018 at 9:16 AM David Ahern wrote: >>>>> >&g

Re: [PATCH RFC/RFT net-next 00/17] net: Convert neighbor tables to per-namespace

2018-07-25 Thread David Ahern
On 7/25/18 6:33 AM, Eric W. Biederman wrote: > Cong Wang writes: > >> On Tue, Jul 24, 2018 at 8:14 AM David Ahern wrote: >>> >>> On 7/19/18 11:12 AM, Cong Wang wrote: >>>> On Thu, Jul 19, 2018 at 9:16 AM David Ahern wrote: >>>>> >&g

Re: [PATCH RFC/RFT net-next 00/17] net: Convert neighbor tables to per-namespace

2018-07-25 Thread David Ahern
On 7/25/18 6:33 AM, Eric W. Biederman wrote: > Cong Wang writes: > >> On Tue, Jul 24, 2018 at 8:14 AM David Ahern wrote: >>> >>> On 7/19/18 11:12 AM, Cong Wang wrote: >>>> On Thu, Jul 19, 2018 at 9:16 AM David Ahern wrote: >>>>> >&g

Re: [PATCH RFC/RFT net-next 00/17] net: Convert neighbor tables to per-namespace

2018-07-25 Thread David Ahern
On 7/25/18 6:33 AM, Eric W. Biederman wrote: > Cong Wang writes: > >> On Tue, Jul 24, 2018 at 8:14 AM David Ahern wrote: >>> >>> On 7/19/18 11:12 AM, Cong Wang wrote: >>>> On Thu, Jul 19, 2018 at 9:16 AM David Ahern wrote: >>>>> >&g

Re: [PATCHv3 net-next 2/2] selftests: add a selftest for directed broadcast forwarding

2018-07-24 Thread David Ahern
On 7/24/18 11:55 AM, Xin Long wrote: > INFO: bc_forwarding disabled on r1 => > INFO: h1 -> net2: reply from r1 (not forwarding) > TEST: ping 198.51.100.255, expected reply from 192.0.2.1[PASS] > INFO: h1 -> net3: reply from r1 (not forwarding) > TEST: ping 198.51.200.255, expected

Re: [PATCHv3 net-next 2/2] selftests: add a selftest for directed broadcast forwarding

2018-07-24 Thread David Ahern
On 7/24/18 11:24 AM, Xin Long wrote: > On Mon, Jul 23, 2018 at 11:17 PM, David Ahern wrote: >> On 7/23/18 5:51 AM, Xin Long wrote: >>> +ping_ipv4() >>> +{ >>> + sysctl_set net.ipv4.icmp_echo_ignore_broadcasts 0 >>> + >>> + bc_forwardi

Re: [PATCH net] net/ipv6: Fix linklocal to global address with VRF

2018-07-24 Thread David Ahern
On 7/21/18 8:32 PM, David Miller wrote: > > Applied and queued up for -stable. > >> Dave: I can look at the backports to stable if needed. > > Please do, that will help me a lot. > It applies cleanly to 4.17 and 4.14. I tested 4.14 it is fine. Since 4.18 and 4.14 work I have no reason to

Re: [**EXTERNAL**] Re: VRF with enslaved L3 enabled bridge

2018-07-24 Thread David Ahern
On 7/23/18 7:43 PM, D'Souza, Nelson wrote: > I copy and pasted the configs onto my device, but pings on test-vrf do not > work in my setup. > I'm essentially seeing the same issue as I reported before. > > In this case, pings sent out on test-vrf (host ns) are received and replied > to by the

Re: [**EXTERNAL**] Re: VRF with enslaved L3 enabled bridge

2018-07-23 Thread David Ahern
On 7/20/18 1:03 PM, D'Souza, Nelson wrote: > Setup is as follows: > > ethUSB(ingress port) -> mgmtbr0 (bridge) -> mgmtvrf (vrf) | netns foo [ test-vrf ]| | | [ br0 ] 172.16.1.1 | | | [ veth1 ]

Re: [PATCHv3 net-next 2/2] selftests: add a selftest for directed broadcast forwarding

2018-07-23 Thread David Ahern
On 7/23/18 5:51 AM, Xin Long wrote: > +ping_ipv4() > +{ > + sysctl_set net.ipv4.icmp_echo_ignore_broadcasts 0 > + > + bc_forwarding_disable > + ping_test_from $h1 198.51.100.255 192.0.2.1 > + ping_test_from $h1 198.51.200.255 192.0.2.1 > + ping_test_from $h1 192.0.2.255

Re: [PATCH net] ipv6: use fib6_info_hold_safe() when necessary

2018-07-23 Thread David Ahern
ked-by: Eric Dumazet > --- > include/net/ip6_fib.h | 5 + > net/ipv6/addrconf.c | 3 ++- > net/ipv6/route.c | 41 +++++++-- > 3 files changed, 38 insertions(+), 11 deletions(-) Reviewed-by: David Ahern Thanks for fixing.

Re: [PATCH net-next] selftests: forwarding: gre_multipath: Drop IPv6 tests

2018-07-23 Thread David Ahern
re_multipath.sh | 113 > ++--- > 1 file changed, 6 insertions(+), 107 deletions(-) Reviewed-by: David Ahern Thanks for following up.

Re: VRF with enslaved L3 enabled bridge

2018-07-20 Thread David Ahern
On 7/20/18 1:03 PM, D'Souza, Nelson wrote: > Hi Dave, > > It is good to know that this works in your case. However, I'm not able to > pinpoint what the issue is and looking for a way to narrow down to the root > cause. > Do you know if this has been an issue in the past and resolved in Linux >

Re: [PATCH iproute2/next 0/2] set/match the tos/ttl fields of TC based IP tunnels

2018-07-20 Thread David Ahern
On 7/19/18 5:02 AM, Or Gerlitz wrote: > Hi Dave, > > This series comes to address the case to set (encap) and match (decap) > also the tos and ttl fields of TC based IP tunnels. > > Example command lines in the change log of each patch. > > The kernel bits are under review [1], sending this out

Re: [Cake] [PATCH iproute2-next] q_cake: Rename autorate_ingress parameter to use dash as word separator

2018-07-20 Thread David Ahern
On 7/19/18 10:55 AM, Toke Høiland-Jørgensen wrote: > This is consistent with the other multi-word parameters. Also change the > JSON output to be consistent with way it is formatted for the other > options. > > Signed-off-by: Toke Høiland-Jørgensen > --- > man/man8/tc-cake.8 | 4 ++-- >

Re: DNAT with VRF support in Linux Kernel

2018-07-19 Thread David Ahern
On 7/19/18 7:52 PM, D'Souza, Nelson wrote: > Hi, > >   > > I'm seeing a VRF/Netfilter related issue on a system running a 4.14.52 > Linux kernel. > >   > > I have an eth interface enslaved to l3mdev mgmtvrf device. > >   > > After reviewing >

Re: VRF with enslaved L3 enabled bridge

2018-07-19 Thread David Ahern
On 7/19/18 8:19 PM, D'Souza, Nelson wrote: > Hi, > >   > > I'm seeing the following issue on a system running a 4.14.52 Linux kernel. > >   > > With an eth interface enslaved to a VRF device, pings sent out on the > VRF to an neighboring host are successful. But, with an eth interface >

Re: [Cake] [PATCH iproute2-next v11] Add support for CAKE qdisc

2018-07-19 Thread David Ahern
On 7/19/18 7:56 AM, Toke Høiland-Jørgensen wrote: > sch_cake is intended to squeeze the most bandwidth and latency out of even > the slowest ISP links and routers, while presenting an API simple enough > that even an ISP can configure it. > > Example of use on a cable ISP uplink: > > tc qdisc

Re: [PATCH iproute2-next v4] net:sched: add action inheritdsfield to skbedit

2018-07-19 Thread David Ahern
: Cong Wang > Reviewed-by: Marcelo Ricardo Leitner > Reviewed-by: Stephen Hemminger > Reviewed-by: David Ahern > --- > > Note that the motivation for this patch is found in the following discussion: > https://www.spinics.net/lists/netdev/msg501061.html > --- > tc/m_skbedit.

Re: [PATCH iproute2 net-next] devlink: Add support for devlink-region access

2018-07-19 Thread David Ahern
On 7/17/18 2:34 AM, Alex Vesker wrote: > Devlink region allows access to driver defined address regions. > Each device can create its supported address regions and register > them. A device which exposes a region will allow access to it > using devlink. > > This support allows reading and dumping

Re: [Cake] [PATCH iproute2-next v10] Add support for CAKE qdisc

2018-07-19 Thread David Ahern
On 7/19/18 9:20 AM, Toke Høiland-Jørgensen wrote: > David Ahern writes: > >> On 7/19/18 4:53 AM, Toke Høiland-Jørgensen wrote: >>> A few comments below; will fix the rest. >>> >>>>> + print_uint(PRINT_JSON, "bandwidth",

Re: [Cake] [PATCH iproute2-next v10] Add support for CAKE qdisc

2018-07-19 Thread David Ahern
On 7/19/18 4:53 AM, Toke Høiland-Jørgensen wrote: > A few comments below; will fix the rest. > >>> + print_uint(PRINT_JSON, "bandwidth", NULL, bandwidth); >>> + print_string(PRINT_FP, NULL, "bandwidth %s ", >>> sprint_rate(bandwidth, b1)); >>> + }

Re: [Cake] [PATCH iproute2-next v10] Add support for CAKE qdisc

2018-07-18 Thread David Ahern
On 7/16/18 10:39 AM, Toke Høiland-Jørgensen wrote: > +static int cake_parse_opt(struct qdisc_util *qu, int argc, char **argv, > + struct nlmsghdr *n, const char *dev) > +{ > + int unlimited = 0; > + __u64 bandwidth = 0; > + unsigned interval = 0; > + unsigned

Re: [PATCH iproute2 0/5] Various BPF improvements

2018-07-17 Thread David Ahern
On 7/17/18 5:31 PM, Daniel Borkmann wrote: > Main part of this set is to: i) avoid strict af_alg kernel dependency, > ii) add loader support for bpf to bpf calls and iii) add btf loader > support with an option to annotate maps. For details please see the > individual patches. Thanks! > > Daniel

Re: [PATCH iproute2-next v3] net:sched: add action inheritdsfield to skbedit

2018-07-17 Thread David Ahern
On 7/14/18 1:10 AM, Qiaobin Fu wrote: > @@ -156,6 +162,9 @@ parse_skbedit(struct action_util *a, int *argc_p, char > ***argv_p, int tca_id, > if (flags & SKBEDIT_F_PTYPE) > addattr_l(n, MAX_MSG, TCA_SKBEDIT_PTYPE, > , sizeof(ptype)); > + if

Re: [PATCH iproute2 net-next] ipneigh: exclude NTF_EXT_LEARNED from default filter

2018-07-17 Thread David Ahern
On 7/16/18 4:19 PM, Roopa Prabhu wrote: > From: Roopa Prabhu > > NUD_NOARP entries are filtered out by default by iproute2. > We dont want NUD_NOARP with NTF_EXT_LEARNED flag filtered out. > This patch extends the default filter check for ip neigh show > to include the NTF_EXT_LEARNED flag. > >

Re: [PATCH v2 net] net/ipv6: Do not allow device only routes via the multipath API

2018-07-17 Thread David Ahern
On 7/16/18 3:09 PM, David Miller wrote: > > Is this a -stable candidate? > I think so. The API is not doing what the user requested, even though the route add does not fail.

Re: [PATCH v2 iproute2-next 06/31] tc/util: add print helpers for JSON

2018-07-16 Thread David Ahern
On 7/10/18 3:05 PM, Stephen Hemminger wrote: > From: Stephen Hemminger > > Add a helper to print rate, time and size in numeric or pretty format > based on JSON flag. > > Signed-off-by: Stephen Hemminger > --- > tc/tc_util.c | 83 +--- >

Re: [PATCH v2 net] net/ipv6: Do not allow device only routes via the multipath API

2018-07-16 Thread David Ahern
On 7/16/18 10:09 AM, Eric Dumazet wrote: > Yes, I guess we have no real choice for the moment. It is unfortunate that we are forever stuck with this mess from a short sighted implementation years ago. From a uapi perspective, dev-only nexthops and proper add-to/append/replace semantics should

Re: [PATCH iproute2-next v2] iplink: add support for reporting multiple XDP programs

2018-07-15 Thread David Ahern
On 7/13/18 4:54 PM, Jakub Kicinski wrote: > Kernel now supports attaching XDP programs in the driver > and hardware at the same time. Print that information > correctly. > > In case there are multiple programs attached kernel will > not provide IFLA_XDP_PROG_ID, so don't expect it to be > there

Re: [PATCH iproute2/net-next] tc: flower: Add support for QinQ

2018-07-15 Thread David Ahern
On 6/30/18 4:01 AM, Jianbo Liu wrote: > To support matching on both outer and inner vlan headers, > we add new cvlan_id/cvlan_prio/cvlan_ethtype for inner vlan header. > > Example: > # tc filter add dev eth0 protocol 802.1ad parent : \ > flower vlan_id 1000 vlan_ethtype 802.1q \ >

Re: [PATCH iproute2-next 0/9] TC more JSON support

2018-07-13 Thread David Ahern
On 7/9/18 3:48 PM, Stephen Hemminger wrote: > From: Stephen Hemminger > > Update core of TC command and library to do more JSON. > Most of this patch set is about getting tc utility functions > to be more friendly to the json_print infrastructure. > > Stephen Hemminger (9): > tc: use JSON in

Re: [PATCH 2/2] samples/bpf: test_cgrp2_sock2: fix an off by one

2018-07-13 Thread David Ahern
On 7/13/18 11:05 AM, Dan Carpenter wrote: > "prog_cnt" is the number of elements which are filled out in prog_fd[] > so the test should be >= instead of >. > > Signed-off-by: Dan Carpenter > Fixes: 554ae6e792ef3 ("samples/bpf: add userspace example for proh

Re: [PATCH net] net/ipv6: Do not allow device only routes via the multipath API

2018-07-13 Thread David Ahern
On 7/13/18 7:28 AM, Stefano Brivio wrote: > On Thu, 12 Jul 2018 14:48:23 -0700 > dsah...@kernel.org wrote: > >> @@ -4388,6 +4388,13 @@ static int ip6_route_multipath_add(struct fib6_config >> *cfg, >> rt = NULL; >> goto cleanup; >> } >> +

Re: [PATCH iproute2-next] ipaddress: fix label matching

2018-07-11 Thread David Ahern
On 7/11/18 7:36 AM, Vincent Bernat wrote: > diff --git a/ip/ipaddress.c b/ip/ipaddress.c > index 5009bfe6d2e3..20ef6724944e 100644 > --- a/ip/ipaddress.c > +++ b/ip/ipaddress.c > @@ -837,11 +837,6 @@ int print_linkinfo(const struct sockaddr_nl *who, > if (!name) > return -1; >

Re: [PATCH v4 iproute2-next 0/3] Add support for ETF qdisc

2018-07-11 Thread David Ahern
On 7/9/18 7:56 PM, Jesus Sanchez-Palencia wrote: > fixes since v3: > - Add support for clock names with the "CLOCK_" prefix; > - Print clock name on print_opt(); > - Use strcasecmp() instead of strncasecmp(). > > > The ETF (earliest txtime first) qdisc was recently merged into net-next > [1],

Re: [PATCH net v2 4/5] net/ipv6: propagate net.ipv6.conf.all.addr_gen_mode to devices

2018-07-10 Thread David Ahern
On 7/10/18 4:13 AM, Sabrina Dubroca wrote: > 2018-07-09, 11:24:49 -0600, David Ahern wrote: >> On 7/9/18 4:25 AM, Sabrina Dubroca wrote: >>> This aligns the addr_gen_mode sysctl with the expected behavior of the >>> "all" variant. >>> >>> Fixe

Re: [PATCH v3 iproute2 2/3] tc: Add support for the ETF Qdisc

2018-07-09 Thread David Ahern
On 7/9/18 9:48 AM, Jesus Sanchez-Palencia wrote: > Hi David, > > > On 07/06/2018 08:58 AM, David Ahern wrote: >> On 7/5/18 4:42 PM, Jesus Sanchez-Palencia wrote: >> >>> +static int get_clockid(__s32 *val, const char *arg) >>> +{ >>> + const

Re: [PATCH net v2 4/5] net/ipv6: propagate net.ipv6.conf.all.addr_gen_mode to devices

2018-07-09 Thread David Ahern
On 7/9/18 4:25 AM, Sabrina Dubroca wrote: > This aligns the addr_gen_mode sysctl with the expected behavior of the > "all" variant. > > Fixes: d35a00b8e33d ("net/ipv6: allow sysctl to change link-local address > generation mode") > Suggested-by: David A

Re: [PATCH net v2 5/5] Documentation: ip-sysctl.txt: document addr_gen_mode

2018-07-09 Thread David Ahern
on/networking/ip-sysctl.txt | 9 + > 1 file changed, 9 insertions(+) > Reviewed-by: David Ahern

Re: [PATCH net v2 1/5] net/ipv6: fix addrconf_sysctl_addr_gen_mode

2018-07-09 Thread David Ahern
e addr_gen_mode is a __u32, switch to proc_douintvec(). > > Fixes: d35a00b8e33d ("net/ipv6: allow sysctl to change link-local address > generation mode") > Signed-off-by: Sabrina Dubroca > --- > net/ipv6/addrconf.c | 27 ++- > 1 file changed, 14 insertions(+), 13 deletions(-) > Reviewed-by: David Ahern

Re: [PATCH net] net: diag: Don't double-free TCP_NEW_SYN_RECV sockets in tcp_abort

2018-07-09 Thread David Ahern
On 7/9/18 9:17 AM, Eric Dumazet wrote: > > > On 07/09/2018 07:59 AM, David Ahern wrote: >> On 7/8/18 10:53 PM, Lorenzo Colitti wrote: >>> On Sat, Jul 7, 2018 at 10:29 PM Eric Dumazet wrote: >>>>>> Tested: passes Android sock_d

Re: [PATCH net] net: diag: Don't double-free TCP_NEW_SYN_RECV sockets in tcp_abort

2018-07-09 Thread David Ahern
On 7/8/18 11:24 PM, Lorenzo Colitti wrote: > On Sat, Jul 7, 2018 at 10:56 PM David Ahern wrote: >>> Here is a packetdrill test : >> >> So I have to either learn how to use packetdrill or install a web server >> and put load on it. If the Android te

Re: [PATCH net] net: diag: Don't double-free TCP_NEW_SYN_RECV sockets in tcp_abort

2018-07-09 Thread David Ahern
On 7/8/18 10:53 PM, Lorenzo Colitti wrote: > On Sat, Jul 7, 2018 at 10:29 PM Eric Dumazet wrote: Tested: passes Android sock_diag_test.py, which exercises this codepath >>> >>> If this Android test case exercises this path, why didn't it trigger >>> the double free and thus cause this bug to

Re: [PATCH v4,net-next] vlan: implement vlan id and protocol changes

2018-07-07 Thread David Ahern
On 7/7/18 7:14 AM, Ido Schimmel wrote: > On Sat, Jul 07, 2018 at 08:11:16PM +0900, David Miller wrote: >> Chas, it seems to me that you add the new notifier by not even one >> driver is listening for the event. >> >> Either it is necessary, and you should show at least one example >> use case, or

Re: [PATCH net] net: diag: Don't double-free TCP_NEW_SYN_RECV sockets in tcp_abort

2018-07-07 Thread David Ahern
d all the other codepaths > in tcp_abort don't free the socket, just remove the free in that > function. > > Cc: David Ahern > Tested: passes Android sock_diag_test.py, which exercises this codepath > Fixes: d7226c7a4dd1 ("net: diag: Fix refcnt leak in error path destroyin

Re: [PATCHv2 net-next 2/2] selftests: add a selftest for directed broadcast forwarding

2018-07-07 Thread David Ahern
On 7/6/18 3:50 AM, Xin Long wrote: >>> Try this: >>> >>> diff --git a/net/ipv4/fib_frontend.c b/net/ipv4/fib_frontend.c >>> index b21833651394..e46cdd310e5f 100644 >>> --- a/net/ipv4/fib_frontend.c >>> +++ b/net/ipv4/fib_frontend.c >>> @@ -300,6 +300,7 @@ __be32 fib_compute_spec_dst(struct sk_buff

Re: [PATCH net] net: diag: Don't double-free TCP_NEW_SYN_RECV sockets in tcp_abort

2018-07-07 Thread David Ahern
On 7/7/18 7:51 AM, Eric Dumazet wrote: > > > On 07/07/2018 06:45 AM, Eric Dumazet wrote: >> >> >> On 07/07/2018 06:33 AM, David Ahern wrote: >>> On 7/7/18 7:11 AM, David Miller wrote: >>>> From: Lorenzo Colitti >>>> Date: Sat,

Re: [PATCH net] net: diag: Don't double-free TCP_NEW_SYN_RECV sockets in tcp_abort

2018-07-07 Thread David Ahern
On 7/7/18 7:11 AM, David Miller wrote: > From: Lorenzo Colitti > Date: Sat, 7 Jul 2018 16:31:40 +0900 > >> Tested: passes Android sock_diag_test.py, which exercises this codepath > > If this Android test case exercises this path, why didn't it trigger > the double free and thus cause this bug

Re: [PATCH net 1/3] net/ipv6: fix addrconf_sysctl_addr_gen_mode

2018-07-06 Thread David Ahern
On 7/6/18 9:58 AM, Sabrina Dubroca wrote: > > Right. I'll add that as a separate patch in this series, unless you > really prefer the change squashed into this patch. no preference. > > >> Looking at other addr_gen_mode sites, addrconf_sysctl_stable_secret is >> messed up as well. It

Re: [PATCH iproute2-next] tc: m_tunnel_key: Add tunnel option support to act_tunnel_key

2018-07-06 Thread David Ahern
On 7/5/18 6:12 PM, Jakub Kicinski wrote: > From: Simon Horman > > Allow setting tunnel options using the act_tunnel_key action. > > Options are expressed as class:type:data and multiple options > may be listed using a comma delimiter. > > # ip link add name geneve0 type geneve dstport 0

Re: [PATCH v3 iproute2 2/3] tc: Add support for the ETF Qdisc

2018-07-06 Thread David Ahern
On 7/5/18 4:42 PM, Jesus Sanchez-Palencia wrote: > +static int get_clockid(__s32 *val, const char *arg) > +{ > + const struct static_clockid { > + const char *name; > + clockid_t clockid; > + } clockids_sysv[] = { > + { "CLOCK_REALTIME", CLOCK_REALTIME

Re: [PATCH net 1/3] net/ipv6: fix addrconf_sysctl_addr_gen_mode

2018-07-06 Thread David Ahern
On 7/6/18 9:02 AM, Sabrina Dubroca wrote: > 2018-07-06, 08:42:01 -0600, David Ahern wrote: >> On 7/6/18 7:49 AM, Sabrina Dubroca wrote: >>> diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c >>> index 91580c62bb86..e9ba53d2a147 100644 >>> --- a/net/ipv6/addr

Re: [PATCH iproute2 net-next] bridge: add support for isolated option

2018-07-06 Thread David Ahern
On 7/3/18 6:42 AM, Nikolay Aleksandrov wrote: > This patch adds support for the new isolated port option which, if set, > would allow the isolated ports to communicate only with non-isolated > ports and the bridge device. The option can be set via the bridge or ip > link type bridge_slave

Re: [PATCH net 3/3] net/ipv6: reserve room for IFLA_INET6_ADDR_GEN_MODE

2018-07-06 Thread David Ahern
"ipv6: addrconf: implement address generation modes") > Signed-off-by: Sabrina Dubroca > --- > net/ipv6/addrconf.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > Reviewed-by: David Ahern

Re: [PATCH net 2/3] net/ipv6: don't reinitialize ndev->cnf.addr_gen_mode on new inet6_dev

2018-07-06 Thread David Ahern
gned-off-by: Sabrina Dubroca > --- > net/ipv6/addrconf.c | 2 -- > 1 file changed, 2 deletions(-) > Reviewed-by: David Ahern

Re: [PATCH net 1/3] net/ipv6: fix addrconf_sysctl_addr_gen_mode

2018-07-06 Thread David Ahern
On 7/6/18 7:49 AM, Sabrina Dubroca wrote: > diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c > index 91580c62bb86..e9ba53d2a147 100644 > --- a/net/ipv6/addrconf.c > +++ b/net/ipv6/addrconf.c > @@ -5892,32 +5892,31 @@ static int addrconf_sysctl_addr_gen_mode(struct > ctl_table *ctl, int

Re: [PATCHv2 net-next 2/2] selftests: add a selftest for directed broadcast forwarding

2018-07-05 Thread David Ahern
On 7/5/18 1:57 AM, Xin Long wrote: > On Thu, Jul 5, 2018 at 2:36 AM, David Ahern wrote: >> On 7/4/18 11:56 AM, Xin Long wrote: >> >>>> your commands are not a proper test. The test should succeed and fail >>>> based on the routing lookup, not iptables rule

Re: [PATCH net] net/ipv6: Revert attempt to simplify route replace and append

2018-07-04 Thread David Ahern
On 7/4/18 8:29 PM, David Miller wrote: > From: Ido Schimmel > Date: Thu, 5 Jul 2018 00:10:41 +0300 > >> We can have the IPv4/IPv6 code only generate a REPLACE / DELETE >> notification for routes that are actually used for forwarding and >> relieve listeners from the need to implement this logic

Re: [PATCHv2 net-next 2/2] selftests: add a selftest for directed broadcast forwarding

2018-07-04 Thread David Ahern
On 7/4/18 11:56 AM, Xin Long wrote: >> your commands are not a proper test. The test should succeed and fail >> based on the routing lookup, not iptables rules. > A proper test can be done easily with netns, as vrf can't isolate much. > I don't want to bother forwarding/ directory with netns, so

Re: [PATCHv2 net-next 2/2] selftests: add a selftest for directed broadcast forwarding

2018-07-04 Thread David Ahern
On 7/4/18 11:56 AM, Xin Long wrote: > A proper test can be done easily with netns, as vrf can't isolate much. > I don't want to bother forwarding/ directory with netns, so I will probably > just drop this selftest, and let the feature patch go first. > > What do you think? > I think I would

Re: [PATCH net] net/ipv6: Revert attempt to simplify route replace and append

2018-07-03 Thread David Ahern
On 7/3/18 7:43 AM, Ido Schimmel wrote: > On Mon, Jul 02, 2018 at 03:03:12PM -0700, dsah...@kernel.org wrote: >> From: David Ahern >> >> NetworkManager likes to manage linklocal prefix routes and does so with >> the NLM_F_APPEND flag, breaking attempts to simp

Re: [PATCHv2 net-next 2/2] selftests: add a selftest for directed broadcast forwarding

2018-07-03 Thread David Ahern
On 7/3/18 5:36 AM, Xin Long wrote: > On Mon, Jul 2, 2018 at 11:12 PM, David Ahern wrote: >> On 7/2/18 12:30 AM, Xin Long wrote: >>> +ping_ipv4() >>> +{ >>> + sysctl_set net.ipv4.icmp_echo_ignore_broadcasts 0 >>> + bc_forwarding_d

Re: [PATCH net-next 0/7] net/ipv6: Fix route append and replace use cases

2018-07-02 Thread David Ahern
On 5/22/18 2:44 PM, David Ahern wrote: > On 5/22/18 12:46 PM, David Miller wrote: >> >> Ok, I'll apply this series. >> >> But if this breaks things for anyone in a practical way, I am unfortunately >> going to have to revert no matter how silly the current behav

Re: [PATCH v4 net-next 0/9] Handle multiple received packets at each stage

2018-07-02 Thread David Ahern
On 7/2/18 9:11 AM, Edward Cree wrote: > This patch series adds the capability for the network stack to receive a > list of packets and process them as a unit, rather than handling each > packet singly in sequence. This is done by factoring out the existing > datapath code at each layer and

Re: Compiler warnings in kernel 4.14.51

2018-07-02 Thread David Ahern
On 7/1/18 2:35 PM, Enrico Mioso wrote: > Hello! > > While compiling kernel 4.14.51 I got the following warnings: > CC net/core/dev.o > net/core/dev.c: In function 'validate_xmit_skb_list': > net/core/dev.c:3121:15: warning: 'tail' may be used uninitialized in this > function

Re: [PATCHv2 net-next 2/2] selftests: add a selftest for directed broadcast forwarding

2018-07-02 Thread David Ahern
On 7/2/18 12:30 AM, Xin Long wrote: > +ping_ipv4() > +{ > + sysctl_set net.ipv4.icmp_echo_ignore_broadcasts 0 > + bc_forwarding_disable > + ping_test $h1 198.51.100.255 > + > + iptables -A INPUT -i vrf-r1 -p icmp -j DROP > + bc_forwarding_restore > + bc_forwarding_enable >

Re: [PATCHv2 net-next 1/2] route: add support for directed broadcast forwarding

2018-07-02 Thread David Ahern
On 7/2/18 12:30 AM, Xin Long wrote: > @@ -2143,6 +2149,10 @@ static int devinet_conf_proc(struct ctl_table *ctl, > int write, > if ((new_value == 0) && (old_value != 0)) > rt_cache_flush(net); > > + if (i ==

Re: Anyone know if strongswan works with vrf?

2018-06-30 Thread David Ahern
On 6/29/18 4:10 PM, Ben Greear wrote: > Hello, > > We're trying to create lots of strongswan VPN tunnels on network devices > bound to different VRFs.  We are using Fedora-24 on the client side, > with a 4.16.15+ kernel > and updated 'ip' package, etc. > > So far, no luck getting it to work. >

Re: [patch net-next v2 0/9] net: sched: introduce chain templates support with offloading to mlxsw

2018-06-29 Thread David Ahern
On 6/29/18 6:48 AM, Jiri Pirko wrote: > Fri, Jun 29, 2018 at 02:12:21PM CEST, j...@mojatatu.com wrote: >> On 29/06/18 04:39 AM, Jiri Pirko wrote: >>> Fri, Jun 29, 2018 at 12:25:53AM CEST, xiyou.wangc...@gmail.com wrote: On Thu, Jun 28, 2018 at 6:10 AM Jiri Pirko wrote: > Add a template

Re: [patch net-next v2 0/9] net: sched: introduce chain templates support with offloading to mlxsw

2018-06-28 Thread David Ahern
On 6/28/18 9:37 AM, Jiri Pirko wrote: Why this restriction? It's a template, so why can't it be removed regardless of whether there are filters? >>> >>> That means you could start to insert filters that does not match the >>> original template. I wanted to avoid it. The chain is

Re: [PATCH net] net: fib_rules: add protocol check in rule_find

2018-06-28 Thread David Ahern
protocol boot > RTNETLINK answers: File exists > > This patch adds protocol support to rule_find, forcing it to > check protocol match if given by the user. > > Fixes: f9d4b0c1e969 ("fib_rules: move common handling of newrule delrule msgs > into fib_nl2rule") > Signed-off-by: Roopa Prabhu > --- Reviewed-by: David Ahern

Re: [patch net-next v2 0/9] net: sched: introduce chain templates support with offloading to mlxsw

2018-06-28 Thread David Ahern
On 6/28/18 8:29 AM, Jiri Pirko wrote: > Thu, Jun 28, 2018 at 04:18:47PM CEST, dsah...@gmail.com wrote: >> On 6/28/18 7:08 AM, Jiri Pirko wrote: >>> Create dummy device with clsact first: >>> # ip link add type dummy >>> # tc qdisc add dev dummy0 clsact >>> >>> There is no template assigned by

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