Re: [v3 2/3] samples: pktgen: add helper functions for IP(v4/v6) CIDR parsing

2019-09-15 Thread Jesper Dangaard Brouer
On Sun, 15 Sep 2019 00:13:52 +0900 "Daniel T. Lee" wrote: > This commit adds CIDR parsing and IP validate helper function to parse > single IP or range of IP with CIDR. (e.g. 198.18.0.0/15) > > Helpers will be used in prior to set target address in samples/pktgen. > > Signed-off-by: Daniel T. L

[PATCH net-next v2 1/3] mlxsw: spectrum_buffers: Prevent changing CPU port's configuration

2019-09-15 Thread Ido Schimmel
From: Shalom Toledo Next patch is going to register the CPU port with devlink, but only so that the CPU port's shared buffer configuration and occupancy could be queried. Prevent changing CPU port's shared buffer threshold and binding configuration. Signed-off-by: Shalom Toledo Signed-off-by:

[PATCH net-next v2 0/3] mlxsw: spectrum_buffers: Add the ability to query the CPU port's shared buffer

2019-09-15 Thread Ido Schimmel
From: Ido Schimmel Shalom says: While debugging packet loss towards the CPU, it is useful to be able to query the CPU port's shared buffer quotas and occupancy. Patch #1 prevents changing the CPU port's threshold and binding. Patch #2 registers the CPU port with devlink. Patch #3 adds the abi

[PATCH net-next v2 3/3] mlxsw: spectrum_buffers: Add the ability to query the CPU port's shared buffer

2019-09-15 Thread Ido Schimmel
From: Shalom Toledo While debugging packet loss towards the CPU, it is useful to be able to query the CPU port's shared buffer quotas and occupancy. Since the CPU port has no ingress buffers, all the shared buffers ingress information will be cleared. Signed-off-by: Shalom Toledo Signed-off-by

[PATCH net-next v2 2/3] mlxsw: spectrum: Register CPU port with devlink

2019-09-15 Thread Ido Schimmel
From: Shalom Toledo Register CPU port with devlink. Signed-off-by: Shalom Toledo Signed-off-by: Ido Schimmel --- drivers/net/ethernet/mellanox/mlxsw/core.c| 65 --- drivers/net/ethernet/mellanox/mlxsw/core.h| 5 ++ .../net/ethernet/mellanox/mlxsw/spectrum.c| 46 ++

Re: [patch net-next 02/15] net: fib_notifier: make FIB notifier per-netns

2019-09-15 Thread Jiri Pirko
Sun, Sep 15, 2019 at 10:05:47PM CEST, dsah...@gmail.com wrote: >On 9/14/19 12:45 AM, Jiri Pirko wrote: >> #define FIB_DUMP_MAX_RETRIES 5 >> -int register_fib_notifier(struct notifier_block *nb, >> +int register_fib_notifier(struct net *net, struct notifier_block *nb, >>void

Re: [patch iproute2-next v4 0/2] devlink: couple forgotten flash patches

2019-09-15 Thread Jiri Pirko
Sun, Sep 15, 2019 at 07:58:33PM CEST, dsah...@gmail.com wrote: >On 9/14/19 12:00 AM, Jiri Pirko wrote: >> Fri, Sep 13, 2019 at 07:25:07PM CEST, dsah...@gmail.com wrote: >>> On 9/12/19 12:29 PM, Jiri Pirko wrote: From: Jiri Pirko I was under impression they are already merged, but ap

Re: [PATCH iproute2-next] rdma: Check comm string before print in print_comm()

2019-09-15 Thread Leon Romanovsky
On Sun, Sep 15, 2019 at 11:47:19AM -0600, David Ahern wrote: > On 9/11/19 2:12 AM, Leon Romanovsky wrote: > > From: Mark Zhang > > > > Broken kernels (not-upstream) can provide wrong empty "comm" field. > > It causes to segfault while printing in JSON format. > > > > Fixes: 8ecac46a60ff ("rdma: Ad

Re: [PATCH] libbpf: Don't error out if getsockopt() fails for XDP_OPTIONS

2019-09-15 Thread Björn Töpel
On Fri, 13 Sep 2019 at 21:46, Yonghong Song wrote: > > > > On 9/10/19 12:06 AM, Toke Høiland-Jørgensen wrote: > > Yonghong Song writes: > > > >> On 9/9/19 10:46 AM, Toke Høiland-Jørgensen wrote: > >>> The xsk_socket__create() function fails and returns an error if it cannot > >>> get the XDP_OPTI

Re: rt_uses_gateway was removed?

2019-09-15 Thread David Ahern
On 9/15/19 3:08 AM, Julian Anastasov wrote: > Now I see commit 1550c171935d wrongly changes that to > "If rt_gw_family is set it implies rt_uses_gateway.". > As result, we set rt_gw_family while rt_uses_gateway was 0 > for above cases. Think about it in this way: there should be > a reason wh

[PATCH] netfilter: bridge: drop a broken include

2019-09-15 Thread Adam Borowski
This caused a build failure if CONFIG_NF_CONNTRACK_BRIDGE is set but CONFIG_NF_TABLES=n -- and appears to be unused anyway. Signed-off-by: Adam Borowski --- net/bridge/netfilter/nf_conntrack_bridge.c | 1 - 1 file changed, 1 deletion(-) diff --git a/net/bridge/netfilter/nf_conntrack_bridge.c b

Re: [PATCH] net/wan: dscc4: remove broken dscc4 driver

2019-09-15 Thread Francois Romieu
Dan Carpenter : > Using static analysis, I discovered that the "dpriv->pci_priv->pdev" > pointer is always NULL. This pointer was supposed to be initialized > during probe and is essential for the driver to work. It would be easy > to add a "ppriv->pdev = pdev;" to dscc4_found1() but this driver

Re: [patch net-next 02/15] net: fib_notifier: make FIB notifier per-netns

2019-09-15 Thread David Ahern
On 9/14/19 12:45 AM, Jiri Pirko wrote: > #define FIB_DUMP_MAX_RETRIES 5 > -int register_fib_notifier(struct notifier_block *nb, > +int register_fib_notifier(struct net *net, struct notifier_block *nb, > void (*cb)(struct notifier_block *nb)) > { > int retries = 0; >

Re: [PATCH net] net/rds: Fix 'ib_evt_handler_call' element in 'rds_ib_stat_names'

2019-09-15 Thread David Miller
From: Gerd Rausch Date: Thu, 12 Sep 2019 13:49:41 -0700 (PDT) > All entries in 'rds_ib_stat_names' are stringified versions > of the corresponding "struct rds_ib_statistics" element > without the "s_"-prefix. > > Fix entry 'ib_evt_handler_call' to do the same. > > Fixes: f4f943c958a2 ("RDS: IB:

Re: [Patch net v2] net_sched: let qdisc_put() accept NULL pointer

2019-09-15 Thread David Miller
From: Cong Wang Date: Thu, 12 Sep 2019 10:22:30 -0700 > When tcf_block_get() fails in sfb_init(), q->qdisc is still a NULL > pointer which leads to a crash in sfb_destroy(). Similar for > sch_dsmark. > > Instead of fixing each separately, Linus suggested to just accept > NULL pointer in qdisc_pu

Re: [PATCH net] net: dsa: Fix load order between DSA drivers and taggers

2019-09-15 Thread David Miller
From: Andrew Lunn Date: Thu, 12 Sep 2019 15:16:45 +0200 > The DSA core, DSA taggers and DSA drivers all make use of > module_init(). Hence they get initialised at device_initcall() time. > The ordering is non-deterministic. It can be a DSA driver is bound to > a device before the needed tag drive

Re: [PATCH net] net/sched: fix race between deactivation and dequeue for NOLOCK qdisc

2019-09-15 Thread David Miller
From: Paolo Abeni Date: Thu, 12 Sep 2019 12:02:42 +0200 > The test implemented by some_qdisc_is_busy() is somewhat loosy for > NOLOCK qdisc, as we may hit the following scenario: > > CPU1 CPU2 > // in net_tx_action() > clear_bit(__QDISC_STATE_SCHED...); >

Re: [PATCH V1 net-next 01/11] net: ena: add intr_moder_rx_interval to struct ena_com_dev and use it

2019-09-15 Thread David Miller
From: Date: Fri, 13 Sep 2019 01:08:38 +0300 > @@ -1307,8 +1304,8 @@ static void ena_com_update_intr_delay_resolution(struct > ena_com_dev *ena_dev, > ena_dev->intr_delay_resolution = intr_delay_resolution; > > /* update Rx */ > - for (i = 0; i < ENA_INTR_MAX_NUM_OF_LEVELS; i++)

Re: [patch iproute2-next 1/2] devlink: introduce cmdline option to switch to a different namespace

2019-09-15 Thread David Ahern
On 9/14/19 12:57 AM, Jiri Pirko wrote: > From: Jiri Pirko > Both of these patches have no commit logs. Please add - e.g., why -N versus -n that other commands use. > Signed-off-by: Jiri Pirko > --- > v3->v4: > - rebased on top of trap patches > --- > devlink/devlink.c | 12 ++-- > ma

Re: [patch iproute2-next] devlink: add reload failed indication

2019-09-15 Thread David Ahern
On 9/14/19 12:56 AM, Jiri Pirko wrote: > From: Jiri Pirko > Please add a description here - e.g., what change is there to user output. > Signed-off-by: Jiri Pirko > --- > devlink/devlink.c| 22 +++--- > include/uapi/linux/devlink.h | 2 ++ > 2 files changed, 17 in

Re: [patch iproute2-next v4 0/2] devlink: couple forgotten flash patches

2019-09-15 Thread David Ahern
On 9/14/19 12:00 AM, Jiri Pirko wrote: > Fri, Sep 13, 2019 at 07:25:07PM CEST, dsah...@gmail.com wrote: >> On 9/12/19 12:29 PM, Jiri Pirko wrote: >>> From: Jiri Pirko >>> >>> I was under impression they are already merged, but apparently they are >>> not. I just rebased them on top of current ipro

Re: [PATCH iproute2-next] devlink: unknown 'fw_load_policy' string validation

2019-09-15 Thread David Ahern
On 9/11/19 8:56 AM, Simon Horman wrote: > From: Dirk van der Merwe > > The 'fw_load_policy' devlink parameter now supports an unknown value. > > Suggested-by: Jakub Kicinski > Signed-off-by: Dirk van der Merwe > Signed-off-by: Simon Horman > --- > applied to iproute2-next. Thanks

Re: [PATCH iproute2-next] devlink: add 'reset_dev_on_drv_probe' devlink param

2019-09-15 Thread David Ahern
On 9/11/19 7:05 AM, Simon Horman wrote: > From: Dirk van der Merwe > > Add support for the new devlink parameter along with string to uint > conversion. > > Signed-off-by: Dirk van der Merwe > Signed-off-by: Simon Horman > --- > Depends on devlink.h changes present in net-next commit > 5bbd21d

Re: [PATCH iproute2-next] rdma: Check comm string before print in print_comm()

2019-09-15 Thread David Ahern
On 9/11/19 2:12 AM, Leon Romanovsky wrote: > From: Mark Zhang > > Broken kernels (not-upstream) can provide wrong empty "comm" field. > It causes to segfault while printing in JSON format. > > Fixes: 8ecac46a60ff ("rdma: Add QP resource tracking information") that commit is from 2018, so this s

Re: [PATCH iproute2-next] bpf: replace snprintf with asprintf when dealing with long buffers

2019-09-15 Thread David Ahern
On 9/9/19 10:05 AM, Andrea Claudi wrote: > This reduces stack usage, as asprintf allocates memory on the heap. > > This indirectly fixes a snprintf truncation warning (from gcc v9.2.1): > > bpf.c: In function ‘bpf_get_work_dir’: > bpf.c:784:49: warning: ‘snprintf’ output may be truncated before t

Re: [PATCH v4 net-next 4/6] net: dsa: sja1105: Advertise the 8 TX queues

2019-09-15 Thread Vladimir Oltean
Hi Jose, On Sun, 15 Sep 2019 at 19:41, Jose Abreu wrote: > > From: Vladimir Oltean > Date: Sep/15/2019, 03:00:01 (UTC+00:00) > > > Instead of looking directly at skb->priority during xmit, let's get the > > netdev queue and the queue-to-traffic-class mapping, and put the > > resulting traffic cl

[PATCH net-next] s390/ctcm: Delete unnecessary checks before the macro call “dev_kfree_skb”

2019-09-15 Thread Julian Wiedmann
From: Markus Elfring The dev_kfree_skb() function performs also input parameter validation. Thus the test around the shown calls is not needed. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: Julian Wiedmann --- drivers/s390/net/ctcm_mai

RE: [PATCH v4 net-next 4/6] net: dsa: sja1105: Advertise the 8 TX queues

2019-09-15 Thread Jose Abreu
From: Vladimir Oltean Date: Sep/15/2019, 03:00:01 (UTC+00:00) > Instead of looking directly at skb->priority during xmit, let's get the > netdev queue and the queue-to-traffic-class mapping, and put the > resulting traffic class into the dsa_8021q PCP field. The switch is > configured with a 1-to

[PATCH V1 net-next 3/5] make ethtool -l show correct max number of queues

2019-09-15 Thread sameehj
From: Sameeh Jubran - Update ena_ethtool:ena_get_channels() to return adapter->max_io_queues so that ethtool -l returns the correct maximum queue number. - Change the name of ena_calc_io_queue_num() to ena_calc_max_io_queue_num() as it returns the maximum number of io queues and actual num

[PATCH V1 net-next 4/5] net: ena:remove redundant print of number of queues and placement policy

2019-09-15 Thread sameehj
From: Sameeh Jubran The number of queues and the placement policy are printed in the process of queue creation in ena_up(). No need to print them in ena_probe() Signed-off-by: Arthur Kiyanovski Signed-off-by: Sameeh Jubran --- drivers/net/ethernet/amazon/ena/ena_netdev.c | 10 ++ 1 fi

[PATCH V1 net-next 0/5] Introduce ethtool's set_channels

2019-09-15 Thread sameehj
From: Sameeh Jubran This patch series introduces the support of "ethtool --set-channels/-L" command to the ena driver. This series is also a preparation for the upcoming xdp support in the ena driver. This patch series has been rebased over the series: "net: ena: implement adaptive interrupt mo

[PATCH V1 net-next 5/5] net: ena: ethtool: support set_channels callback

2019-09-15 Thread sameehj
From: Sameeh Jubran Set channels callback enables the user to change the count of queues used by the driver using ethtool. We decided to currently support only equal number of rx and tx queues, this might change in the future. Also rename dev_up to dev_was_up in ena_update_queue_count() to make

[PATCH V1 net-next 2/5] net: ena: multiple queue creation related cleanups

2019-09-15 Thread sameehj
From: Sameeh Jubran - Move the print to dmesg of creating io queues from ena_probe to ena_up. ena_up is the place where queues are actually created. - Rename ena_calc_queue_size() to ena_calc_io_queue_size() for clarity and consistency - Remove redundant number of io queues parameter in funct

[PATCH V1 net-next 1/5] net: ena: change num_queues to num_io_queues for clarity and consistency

2019-09-15 Thread sameehj
From: Sameeh Jubran Most places in the code refer to the IO queues as io_queues and not simply queues. Examples - max_io_queues_per_vf, ENA_MAX_NUM_IO_QUEUES, ena_destroy_all_io_queues() etc.. We are also adding the new max_num_io_queues field to struct ena_adapter in the following commit. The

Re: [PATCH v4 net-next 4/6] net: dsa: sja1105: Advertise the 8 TX queues

2019-09-15 Thread Florian Fainelli
On 9/14/2019 7:00 PM, Vladimir Oltean wrote: > This is a preparation patch for the tc-taprio offload (and potentially > for other future offloads such as tc-mqprio). > > Instead of looking directly at skb->priority during xmit, let's get the > netdev queue and the queue-to-traffic-class mapping

[PATCH V1 net] net: ena: don't wake up tx queue when down

2019-09-15 Thread sameehj
From: Sameeh Jubran There is a race condition that can occur when calling ena_down(). The ena_clean_tx_irq() - which is a part of the napi handler - function might wake up the tx queue when the queue is supposed to be down (during recovery or changing the size of the queues for example) This caus

RE: [PATCH net] udp: correct reuseport selection with connected sockets

2019-09-15 Thread Steve Zabele
Hey Willem, Thanks a bunch for getting this resolved, *very* much appreciated. This is a really big help for us Do you know if this will be backported to 4.19 stable, and if so when it might be available?? Thanks again Steve -Original Message- From: Willem de Bruijn [mailto:willemdebru

[bpf-next,v4] samples: bpf: add max_pckt_size option at xdp_adjust_tail

2019-09-15 Thread Daniel T. Lee
Currently, at xdp_adjust_tail_kern.c, MAX_PCKT_SIZE is limited to 600. To make this size flexible, a new map 'pcktsz' is added. By updating new packet size to this map from the userland, xdp_adjust_tail_kern.o will use this value as a new max_pckt_size. If no '-P ' option is used, the size of max

Re: [bpf-next,v3] samples: bpf: add max_pckt_size option at xdp_adjust_tail

2019-09-15 Thread Daniel T. Lee
On Sat, Sep 14, 2019 at 7:34 AM Yonghong Song wrote: > > > > On 9/11/19 8:02 PM, Daniel T. Lee wrote: > > Currently, at xdp_adjust_tail_kern.c, MAX_PCKT_SIZE is limited > > to 600. To make this size flexible, a new map 'pcktsz' is added. > > > > By updating new packet size to this map from the use

Re: [patch iproute2-next 2/2] devlink: extend reload command to add support for network namespace change

2019-09-15 Thread Jiri Pirko
Sun, Sep 15, 2019 at 09:16:39AM CEST, ido...@idosch.org wrote: >On Sat, Sep 14, 2019 at 08:57:57AM +0200, Jiri Pirko wrote: >> diff --git a/man/man8/devlink-dev.8 b/man/man8/devlink-dev.8 >> index 1804463b2321..0e1a5523fa7b 100644 >> --- a/man/man8/devlink-dev.8 >> +++ b/man/man8/devlink-dev.8 >> @

Re: [patch net-next 14/15] net: devlink: allow to change namespaces during reload

2019-09-15 Thread Jiri Pirko
Sun, Sep 15, 2019 at 10:58:29AM CEST, ido...@idosch.org wrote: >On Sat, Sep 14, 2019 at 08:46:07AM +0200, Jiri Pirko wrote: >> From: Jiri Pirko >> >> All devlink instances are created in init_net and stay there for a >> lifetime. Allow user to be able to move devlink instances into >> namespaces

Re: [patch net-next 03/15] net: fib_notifier: propagate possible error during fib notifier registration

2019-09-15 Thread Jiri Pirko
Sun, Sep 15, 2019 at 10:17:46AM CEST, ido...@idosch.org wrote: >On Sat, Sep 14, 2019 at 08:45:56AM +0200, Jiri Pirko wrote: >> From: Jiri Pirko >> >> Unlike events for registered notifier, during the registration, the >> errors that happened for the block being registered are not propagated >> up

Re: [patch net-next 02/15] net: fib_notifier: make FIB notifier per-netns

2019-09-15 Thread Jiri Pirko
Sun, Sep 15, 2019 at 10:06:02AM CEST, ido...@idosch.org wrote: >On Sat, Sep 14, 2019 at 08:45:55AM +0200, Jiri Pirko wrote: >> From: Jiri Pirko >> >> Currently all users of FIB notifier only cares about events in init_net. > >s/cares/care/ ok > >> Later in this patchset, users get interested i

rt_uses_gateway was removed?

2019-09-15 Thread Julian Anastasov
Hello, Looks like I'm a bit late with the storm of changes in the routing. By default, after allocation rt_uses_gateway was set to 0. Later it can be set to 1 if nh_gw is not the final route target, i.e. it is indirect GW and not a target on LAN (the RT_SCOPE_LINK check

Re: [patch net-next 14/15] net: devlink: allow to change namespaces during reload

2019-09-15 Thread Ido Schimmel
On Sat, Sep 14, 2019 at 08:46:07AM +0200, Jiri Pirko wrote: > From: Jiri Pirko > > All devlink instances are created in init_net and stay there for a > lifetime. Allow user to be able to move devlink instances into > namespaces during devlink reload operation. That ensures proper > re-instantiati

Re: [patch net-next 09/15] mlxsw: Propagate extack down to register_fib_notifier()

2019-09-15 Thread Ido Schimmel
On Sat, Sep 14, 2019 at 08:46:02AM +0200, Jiri Pirko wrote: > From: Jiri Pirko > > During the devlink reaload the extack is present, so propagate it all s/reaload/reload/ > the way down to register_fib_notifier() call in spectrum_router.c.

Re: [patch net-next 08/15] mlxsw: Register port netdevices into net of core

2019-09-15 Thread Ido Schimmel
On Sat, Sep 14, 2019 at 08:46:01AM +0200, Jiri Pirko wrote: > From: Jiri Pirko > > When creating netdevices for ports, put then under network namespace s/then/them/ > that the core/parent devlink belongs to.

Re: [patch net-next 03/15] net: fib_notifier: propagate possible error during fib notifier registration

2019-09-15 Thread Ido Schimmel
On Sat, Sep 14, 2019 at 08:45:56AM +0200, Jiri Pirko wrote: > From: Jiri Pirko > > Unlike events for registered notifier, during the registration, the > errors that happened for the block being registered are not propagated > up to the caller. For fib rules, this is already present, but not for

Re: [patch net-next 02/15] net: fib_notifier: make FIB notifier per-netns

2019-09-15 Thread Ido Schimmel
On Sat, Sep 14, 2019 at 08:45:55AM +0200, Jiri Pirko wrote: > From: Jiri Pirko > > Currently all users of FIB notifier only cares about events in init_net. s/cares/care/ > Later in this patchset, users get interested in other namespaces too. > However, for every registered block user is interes

Re: [patch iproute2-next 2/2] devlink: extend reload command to add support for network namespace change

2019-09-15 Thread Ido Schimmel
On Sat, Sep 14, 2019 at 08:57:57AM +0200, Jiri Pirko wrote: > diff --git a/man/man8/devlink-dev.8 b/man/man8/devlink-dev.8 > index 1804463b2321..0e1a5523fa7b 100644 > --- a/man/man8/devlink-dev.8 > +++ b/man/man8/devlink-dev.8 > @@ -25,6 +25,13 @@ devlink-dev \- devlink device configuration > .ti