Re: [PATCH net-next] selftests: forwarding: mirror_lib: Tighten up VLAN capture

2018-07-10 Thread David Miller
From: Petr Machata Date: Sun, 08 Jul 2018 19:58:55 +0200 > The function do_test_span_vlan_dir_ips() is used for testing whether > mirrored packets are VLAN-encapsulated. But since it only considers > VLAN encapsulation, it may end up matching unmirrored ARP traffic as > well. One consequence is a

Re: [PATCH rdma-next 0/9] Support mlx5 flow steering with RAW data

2018-07-10 Thread Leon Romanovsky
On Tue, Jul 10, 2018 at 12:28:54PM -0600, Jason Gunthorpe wrote: > On Sun, Jul 08, 2018 at 01:24:36PM +0300, Leon Romanovsky wrote: > > From: Leon Romanovsky > > > > >From Yishai: > > > > This series introduces vendor create and destroy flow methods on the > > uverbs flow object by using the KABI

Re: [PATCH bpf-next v3 12/13] tools: libbpf: allow map reuse

2018-07-10 Thread Jakub Kicinski
On Tue, 10 Jul 2018 20:45:36 -0700, Andrey Ignatov wrote: > Acked-by: Andrey Ignatov Thank you! :) > Thanks for all the changes Jakub! Sorry, it forced you to deal with > strerror_r(). No worries, I already had issues with reallocarray(). Because we have two reasons now the split seems more j

Re: [PATCH bpf-next v3 12/13] tools: libbpf: allow map reuse

2018-07-10 Thread Andrey Ignatov
Jakub Kicinski [Tue, 2018-07-10 14:43 -0700]: > More advanced applications may want to only replace programs without > destroying associated maps. Allow libbpf users to achieve that. > Instead of always creating all of the maps at load time, expose to > users an API to reconstruct the map object

Re: [PATCH bpf-next v3 08/13] tools: libbpf: add extended attributes version of bpf_object__open()

2018-07-10 Thread Andrey Ignatov
Jakub Kicinski [Tue, 2018-07-10 14:43 -0700]: > Similarly to bpf_prog_load() users of bpf_object__open() may need > to specify the expected program type. Program type is needed at > open to avoid the kernel version check for program types which don't > require it. > > Signed-off-by: Jakub Kicins

Re: [PATCH bpf-next v3 05/13] tools: libbpf: expose the prog type guessing from section name logic

2018-07-10 Thread Andrey Ignatov
Jakub Kicinski [Tue, 2018-07-10 14:43 -0700]: > libbpf can guess program type based on ELF section names. As libbpf > becomes more popular its association between section name strings and > types becomes more of a standard. Allow libbpf users to use the same > logic for matching strings to types

Re: [PATCH v3 net-next] net/sched: add skbprio scheduler

2018-07-10 Thread Cong Wang
On Sat, Jul 7, 2018 at 3:14 AM Nishanth Devarajan wrote: > diff --git a/Documentation/networking/sch_skbprio.txt > b/Documentation/networking/sch_skbprio.txt > new file mode 100644 > index 000..3aa4d3e > --- /dev/null > +++ b/Documentation/networking/sch_skbprio.txt We usually document each

Re: [PATCH v3 net-next] net/sched: add skbprio scheduler

2018-07-10 Thread Cong Wang
On Mon, Jul 9, 2018 at 11:18 AM Michel Machado wrote: > 3. The queues of sch_prio.c are struct Qdisc, which don't have a > method to drop at its tail. This isn't true, you can install a qdisc which drops at tail as its child qdisc, you can install different qdiscs for different children too i

Re: [PATCH v3 net-next] net/sched: add skbprio scheduler

2018-07-10 Thread Cong Wang
On Mon, Jul 9, 2018 at 12:53 PM Marcelo Ricardo Leitner wrote: > > On Mon, Jul 09, 2018 at 02:18:33PM -0400, Michel Machado wrote: > > > >2. sch_prio.c does not have a global limit on the number of packets on > > all its queues, only a limit per queue. > > It can be useful to sch_prio.c as wel

Re: [net-next, v6, 6/7] net-sysfs: Add interface for Rx queue(s) map per Tx queue

2018-07-10 Thread Nambiar, Amritha
On 7/4/2018 12:20 AM, Andrei Vagin wrote: > Hello Amritha, > > I see a following warning on 4.18.0-rc3-next-20180703. > It looks like a problem is in this series. > > [1.084722] > [1.084797] WARNING: possible recursive locking detected > [1

Re: [PATCH v3 net-next] net/sched: add skbprio scheduler

2018-07-10 Thread Cong Wang
On Mon, Jul 9, 2018 at 2:40 PM Marcelo Ricardo Leitner wrote: > > On Mon, Jul 09, 2018 at 05:03:31PM -0400, Michel Machado wrote: > >Changing TC_PRIO_MAX from 15 to 63 risks breaking backward compatibility > > with applications. > > If done, it needs to be done carefully, indeed. I don't know

Re: [PATCH v2 net-next 00/18] TLS offload rx, netdev & mlx5

2018-07-10 Thread Boris Pismenny
On 7/9/2018 7:23 PM, David Miller wrote: From: Boris Pismenny Date: Sun, 8 Jul 2018 12:36:14 +0300 The following series provides TLS TX inline crypto offload. I think this patch series provides RX inline offload not TX inline offload. Right, sorry for confusing the 2 in this statement

[PATCH net-next] tc-testing: add geneve options in tunnel_key unit tests

2018-07-10 Thread Jakub Kicinski
From: Pieter Jansen van Vuuren Extend tc tunnel_key action unit tests with geneve options. Tests include testing single and multiple geneve options, as well as testing geneve options that are expected to fail. Signed-off-by: Pieter Jansen van Vuuren --- .../tc-tests/actions/tunnel_key.json

Re: [PATCH net-next 0/2] net/sched: act_skbedit: lockless data path

2018-07-10 Thread David Miller
From: Davide Caratti Date: Fri, 6 Jul 2018 12:40:12 +0200 > the data path of act_skbedit can be faster if we avoid using spinlocks: > - patch 1 converts act_skbedit statistics to use per-cpu counters > - patch 2 lets act_skbedit use RCU to read/update its configuration This doesn't apply cle

Re: [PATCH mlx5-next 2/9] net/mlx5: Add support for flow table destination number

2018-07-10 Thread Saeed Mahameed
On Sun, Jul 8, 2018 at 3:24 AM, Leon Romanovsky wrote: > From: Yishai Hadas > > Add support to set a destination from a flow table number. > This functionality will be used in downstream patches from this > series by the DEVX stuff. > > Signed-off-by: Yishai Hadas > Signed-off-by: Leon Romanovsk

Re: [PATCH net-next 01/13] ARM: net: bpf: enumerate the JIT scratch stack layout

2018-07-10 Thread Russell King - ARM Linux
On Tue, Jul 10, 2018 at 08:30:04PM +0200, Daniel Borkmann wrote: > Hi Russell, > > thanks a lot for your work on the arm32 JIT! > > On 07/10/2018 02:36 PM, Russell King wrote: > > Enumerate the contents of the JIT scratch stack layout used for storing > > some of the JITs 64-bit registers, tail c

Re: [PATCH net-next v2 02/10] r8169: use phy_resume/phy_suspend

2018-07-10 Thread Heiner Kallweit
On 10.07.2018 22:52, Andrew Lunn wrote: >>> Why is it powered up, but not connected? Is it powered down before it >>> is disconnected? Is it the bootloader which is powering it up? >>> >> Exactly, if the device is active when driver is loaded and the >> interface isn't used and therefore not brough

[PATCH bpf-next v3 13/13] tools: bpftool: allow reuse of maps with bpftool prog load

2018-07-10 Thread Jakub Kicinski
Add map parameter to prog load which will allow reuse of existing maps instead of creating new ones. We need feature detection and compat code for reallocarray, since it's not available in many libc versions. Signed-off-by: Jakub Kicinski Reviewed-by: Quentin Monnet Acked-by: Alexei Starovoitov

[PATCH bpf-next v3 07/13] tools: libbpf: recognize offload neutral maps

2018-07-10 Thread Jakub Kicinski
Add helper to libbpf for recognizing maps which should not have ifindex set when program is loaded. These maps only contain host metadata and therefore are not marked for offload, e.g. the perf event map. Use this helper in bpf_prog_load_xattr(). Signed-off-by: Jakub Kicinski Reviewed-by: Quent

[PATCH bpf-next v3 12/13] tools: libbpf: allow map reuse

2018-07-10 Thread Jakub Kicinski
More advanced applications may want to only replace programs without destroying associated maps. Allow libbpf users to achieve that. Instead of always creating all of the maps at load time, expose to users an API to reconstruct the map object from already existing map. The map parameters are read

[PATCH bpf-next v3 11/13] tools: bpf: make use of reallocarray

2018-07-10 Thread Jakub Kicinski
reallocarray() is a safer variant of realloc which checks for multiplication overflow in case of array allocation. Since it's not available in Glibc < 2.26 import kernel's overflow.h and add a static inline implementation when needed. Use feature detection to probe for existence of reallocarray.

[PATCH bpf-next v3 09/13] tools: bpftool: reimplement bpf_prog_load() for prog load

2018-07-10 Thread Jakub Kicinski
bpf_prog_load() is a very useful helper but it doesn't give us full flexibility of modifying the BPF objects before loading. Open code bpf_prog_load() in bpftool so we can add extra logic in following commits. Signed-off-by: Jakub Kicinski Reviewed-by: Quentin Monnet Acked-by: Alexei Starovoito

[PATCH bpf-next v3 04/13] tools: bpftool: add support for loading programs for offload

2018-07-10 Thread Jakub Kicinski
Extend the bpftool prog load command to also accept "dev" parameter, which will allow us to load programs onto devices. Signed-off-by: Jakub Kicinski Reviewed-by: Quentin Monnet --- .../bpftool/Documentation/bpftool-prog.rst| 6 ++-- tools/bpf/bpftool/bash-completion/bpftool | 23 +

[PATCH bpf-next v3 05/13] tools: libbpf: expose the prog type guessing from section name logic

2018-07-10 Thread Jakub Kicinski
libbpf can guess program type based on ELF section names. As libbpf becomes more popular its association between section name strings and types becomes more of a standard. Allow libbpf users to use the same logic for matching strings to types, e.g. when the string originates from command line. S

[PATCH bpf-next v3 03/13] tools: bpftool: refactor argument parsing for prog load

2018-07-10 Thread Jakub Kicinski
Add a new macro for printing more informative message than straight usage() when parameters are missing, and use it for prog do_load(). Save the object and pin path argument to variables for clarity. Signed-off-by: Jakub Kicinski Reviewed-by: Quentin Monnet --- tools/bpf/bpftool/main.h | 15 +++

[PATCH bpf-next v3 06/13] tools: bpftool: allow users to specify program type for prog load

2018-07-10 Thread Jakub Kicinski
Sometimes program section names don't match with libbpf's expectation. In particular XDP's default section names differ between libbpf and iproute2. Allow users to pass program type on command line. Name the types like the libbpf expected section names. Signed-off-by: Jakub Kicinski Reviewed-by

[PATCH bpf-next v3 08/13] tools: libbpf: add extended attributes version of bpf_object__open()

2018-07-10 Thread Jakub Kicinski
Similarly to bpf_prog_load() users of bpf_object__open() may need to specify the expected program type. Program type is needed at open to avoid the kernel version check for program types which don't require it. Signed-off-by: Jakub Kicinski Reviewed-by: Quentin Monnet --- v3 (Andrey): - put fi

[PATCH bpf-next v3 10/13] tools: libbpf: move library error code into a separate file

2018-07-10 Thread Jakub Kicinski
libbpf_strerror() depends on XSI-compliant (POSIX) version of strerror_r(), which prevents us from using GNU-extensions in libbpf.c, like reallocarray() or dup3(). Move error printing code into a separate file to allow it to continue using POSIX strerror_r(). No functional changes. Signed-off-by

[PATCH bpf-next v3 02/13] selftests/bpf: add Error: prefix in check_extack helper

2018-07-10 Thread Jakub Kicinski
Currently the test only checks errors, not warnings, so save typing and prefix the extack messages with "Error:" inside the check helper. Signed-off-by: Jakub Kicinski Reviewed-by: Quentin Monnet --- tools/testing/selftests/bpf/test_offload.py | 8 1 file changed, 4 insertions(+), 4 de

[PATCH bpf-next v3 01/13] selftests/bpf: remove duplicated word from test offloads

2018-07-10 Thread Jakub Kicinski
Trivial removal of duplicated "mode" in error message. Signed-off-by: Jakub Kicinski Reviewed-by: Quentin Monnet --- tools/testing/selftests/bpf/test_offload.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/bpf/test_offload.py b/tools/testing/selft

[PATCH bpf-next v3 00/13] tools: bpf: extend bpftool prog load

2018-07-10 Thread Jakub Kicinski
Hi! This series starts with two minor clean ups to test_offload.py selftest script. The next 11 patches extend the abilities of bpftool prog load beyond the simple cgroup use cases. Three new parameters are added: - type - allows specifying program type, independent of how code sections are

Re: [PATCH net-next v2 02/10] r8169: use phy_resume/phy_suspend

2018-07-10 Thread Heiner Kallweit
On 10.07.2018 22:52, Andrew Lunn wrote: >>> Why is it powered up, but not connected? Is it powered down before it >>> is disconnected? Is it the bootloader which is powering it up? >>> >> Exactly, if the device is active when driver is loaded and the >> interface isn't used and therefore not brough

Re: [PATCH net-next v2 07/10] r8169: migrate speed_down function to phylib

2018-07-10 Thread Andrew Lunn
On Tue, Jul 10, 2018 at 11:26:13PM +0200, Heiner Kallweit wrote: > On 10.07.2018 22:44, Andrew Lunn wrote: > >> static void rtl_speed_down(struct rtl8169_private *tp) > >> { > >> - u32 adv; > >> - int lpa; > >> + struct phy_device *phydev = tp->dev->phydev; > >> + u32 adv = phydev->lp_adverti

Re: [PATCH net-next v2 09/10] r8169: remove mii_if_info member from struct rtl8169_private

2018-07-10 Thread Andrew Lunn
On Tue, Jul 10, 2018 at 11:32:36PM +0200, Heiner Kallweit wrote: > On 10.07.2018 23:00, Andrew Lunn wrote: > >> @@ -6719,7 +6703,7 @@ static int r8169_phy_connect(struct rtl8169_private > >> *tp) > >>if (ret) > >>return ret; > >> > >> - if (!tp->mii.supports_gmii && phydev->supp

Re: [PATCH net-next v2 09/10] r8169: remove mii_if_info member from struct rtl8169_private

2018-07-10 Thread Andrew Lunn
> @@ -6719,7 +6703,7 @@ static int r8169_phy_connect(struct rtl8169_private *tp) > if (ret) > return ret; > > - if (!tp->mii.supports_gmii && phydev->supported & PHY_1000BT_FEATURES) { > + if (!tp->supports_gmii && phydev->supported & PHY_1000BT_FEATURES) { It is bett

Re: [PATCH net-next v2 09/10] r8169: remove mii_if_info member from struct rtl8169_private

2018-07-10 Thread Heiner Kallweit
On 10.07.2018 23:00, Andrew Lunn wrote: >> @@ -6719,7 +6703,7 @@ static int r8169_phy_connect(struct rtl8169_private >> *tp) >> if (ret) >> return ret; >> >> -if (!tp->mii.supports_gmii && phydev->supported & PHY_1000BT_FEATURES) { >> +if (!tp->supports_gmii && phydev->

[PATCH] tcp: allow user to create repair socket without window probes

2018-07-10 Thread Stefan Baranoff
Under rare conditions where repair code may be used it is possible that window probes are either unnecessary or undesired. If the user knows that window probes are not wanted or needed this change allows them to skip sending them when a socket comes out of repair. Signed-off-by: Stefan Baranoff -

Re: [PATCH bpf-next v2 11/12] tools: libbpf: allow map reuse

2018-07-10 Thread Jakub Kicinski
On Tue, 10 Jul 2018 20:16:46 +0200, Daniel Borkmann wrote: > On 07/10/2018 08:09 PM, Jakub Kicinski wrote: > > On Mon, 9 Jul 2018 21:23:20 -0700, Andrey Ignatov wrote: > >> Jakub Kicinski [Mon, 2018-07-09 19:49 > >> -0700]: > >>> On Mon, 9 Jul 2018 13:22:54 -0700, Andrey Ignatov wrote: >

Re: [PATCH net-next v2 07/10] r8169: migrate speed_down function to phylib

2018-07-10 Thread Heiner Kallweit
On 10.07.2018 22:44, Andrew Lunn wrote: >> static void rtl_speed_down(struct rtl8169_private *tp) >> { >> -u32 adv; >> -int lpa; >> +struct phy_device *phydev = tp->dev->phydev; >> +u32 adv = phydev->lp_advertising & phydev->supported; >> >> -rtl_writephy(tp, 0x1f, 0x);

[PATCH] tcp: fix sequence numbers for repaired sockets re-using TIME-WAIT sockets

2018-07-10 Thread Stefan Baranoff
This patch fixes a bug where the sequence numbers of a socket created using TCP repair functionality are lower than set after connect is called. This occurs when the repair socket overlaps with a TIME-WAIT socket and triggers the re-use code. The amount lower is equal to the number of times that a

RE: [net] sch_fq_codel: zero q->flows_cnt when fq_codel_init fails

2018-07-10 Thread Keller, Jacob E
> -Original Message- > From: Cong Wang [mailto:xiyou.wangc...@gmail.com] > Sent: Tuesday, July 10, 2018 1:32 PM > To: Keller, Jacob E > Cc: Linux Kernel Network Developers ; Eric Dumazet > > Subject: Re: [net] sch_fq_codel: zero q->flows_cnt when fq_codel_init fails > > On Mon, Jul 9, 20

[net v2] sch_fq_codel: zero q->flows_cnt when fq_codel_init fails

2018-07-10 Thread Jacob Keller
When fq_codel_init fails, qdisc_create_dflt will cleanup by using qdisc_destroy. This function calls the ->reset() op prior to calling the ->destroy() op. Unfortunately, during the failure flow for sch_fq_codel, the ->flows parameter is not initialized, so the fq_codel_reset function will null poi

[PATCH net-next v2 0/8] be2net: small structures clean-up

2018-07-10 Thread Ivan Vecera
The series: - removes unused / unneccessary fields in several be2net structures - re-order fields in some structures to eliminate holes, cache-lines crosses - as result reduces size of main struct be_adapter by 4kB Ivan Vecera (8): be2net: remove unused old AIC info be2net: remove unused old

[PATCH net-next v2 6/8] be2net: remove unused tx_jiffies field from be_tx_stats

2018-07-10 Thread Ivan Vecera
Signed-off-by: Ivan Vecera --- drivers/net/ethernet/emulex/benet/be.h | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/net/ethernet/emulex/benet/be.h b/drivers/net/ethernet/emulex/benet/be.h index 91ca8d132e87..d521364e17cf 100644 --- a/drivers/net/ethernet/emulex/benet/be.h +++ b/driv

[PATCH net-next v2 3/8] be2net: remove desc field from be_eq_obj

2018-07-10 Thread Ivan Vecera
The event queue description (be_eq_obj.desc) field is used only to format string for IRQ name and it is not really needed to hold this value. Remove it and use local variable to format string for IRQ name. Signed-off-by: Ivan Vecera --- drivers/net/ethernet/emulex/benet/be.h | 1 - drivers/

[PATCH net-next v2 2/8] be2net: remove unused old custom busy-poll fields

2018-07-10 Thread Ivan Vecera
The commit fb6113e688e0 ("be2net: get rid of custom busy poll code") replaced custom busy-poll code by the generic one but left several macros and fields in struct be_eq_obj that are currently unused. Remove this stuff. Fixes: fb6113e688e0 ("be2net: get rid of custom busy poll code") Signed-off-by

[PATCH net-next v2 5/8] be2net: move txcp field in be_tx_obj to eliminate holes in the struct

2018-07-10 Thread Ivan Vecera
Before patch: struct be_tx_obj { u32db_offset;/* 0 4 */ /* XXX 4 bytes hole, try to pack */ struct be_queue_info q;/* 856 */ /* --- cacheline 1 boundary (64 bytes) --- */ struct b

[PATCH net-next v2 1/8] be2net: remove unused old AIC info

2018-07-10 Thread Ivan Vecera
The commit 2632bafd74ae ("be2net: fix adaptive interrupt coalescing") introduced a separate struct be_aic_obj to hold AIC information but unfortunately left the old stuff in be_eq_obj. So remove it. Fixes: 2632bafd74ae ("be2net: fix adaptive interrupt coalescing") Signed-off-by: Ivan Vecera ---

[PATCH net-next v2 7/8] be2net: re-order fields in be_error_recovert to avoid hole

2018-07-10 Thread Ivan Vecera
- Unionize two u8 fields where only one of them is used depending on NIC chipset. - Move recovery_supported field after that union These changes eliminate 7-bytes hole in the struct and makes it smaller by 8 bytes. Signed-off-by: Ivan Vecera --- drivers/net/ethernet/emulex/benet/be.h | 9 +-

[PATCH net-next v2 4/8] be2net: reorder fields in be_eq_obj structure

2018-07-10 Thread Ivan Vecera
Re-order fields in struct be_eq_obj to ensure that .napi field begins at start of cache-line. Also the .adapter field is moved to the first cache-line next to .q field and 3 fields (idx,msi_idx,spurious_intr) and the 4-bytes hole to 3rd cache-line. Signed-off-by: Ivan Vecera --- drivers/net/ethe

[PATCH net-next v2 8/8] be2net: move rss_flags field in rss_info to ensure proper alignment

2018-07-10 Thread Ivan Vecera
The current position of .rss_flags field in struct rss_info causes that fields .rsstable and .rssqueue (both 128 bytes long) crosses cache-line boundaries. Moving it at the end properly align all fields. Before patch: struct rss_info { u64rss_flags;/*

[PATCH v2 iproute2-next 19/31] tc/tbf: implement JSON output format

2018-07-10 Thread Stephen Hemminger
From: Stephen Hemminger Signed-off-by: Stephen Hemminger --- tc/q_tbf.c | 48 ++-- 1 file changed, 26 insertions(+), 22 deletions(-) diff --git a/tc/q_tbf.c b/tc/q_tbf.c index b9465b20d2be..2695b4fb00e6 100644 --- a/tc/q_tbf.c +++ b/tc/q_tbf.c @@ -26

[PATCH v2 iproute2-next 28/31] tc/atm: convert to JSON output

2018-07-10 Thread Stephen Hemminger
From: Stephen Hemminger Signed-off-by: Stephen Hemminger --- tc/q_atm.c | 38 +++--- 1 file changed, 23 insertions(+), 15 deletions(-) diff --git a/tc/q_atm.c b/tc/q_atm.c index f8215f06507a..d5ab7a06b28f 100644 --- a/tc/q_atm.c +++ b/tc/q_atm.c @@ -194,37 +194,

[PATCH v2 iproute2-next 15/31] tc/multiq: implement JSON output

2018-07-10 Thread Stephen Hemminger
From: Stephen Hemminger Signed-off-by: Stephen Hemminger --- tc/q_multiq.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tc/q_multiq.c b/tc/q_multiq.c index 8ad9e0b2fa3c..fd2d301bb0c6 100644 --- a/tc/q_multiq.c +++ b/tc/q_multiq.c @@ -70,7 +70,8 @@ static int multiq_prin

[PATCH v2 iproute2-next 10/31] tc/mqprio: implement JSON output

2018-07-10 Thread Stephen Hemminger
From: Stephen Hemminger Output queue options in JSON if requested. Signed-off-by: Stephen Hemminger --- tc/q_mqprio.c | 134 +++--- 1 file changed, 72 insertions(+), 62 deletions(-) diff --git a/tc/q_mqprio.c b/tc/q_mqprio.c index 207d6441d8fa..3d78

[PATCH v2 iproute2-next 11/31] tc/drr: implement JSON output

2018-07-10 Thread Stephen Hemminger
From: Stephen Hemminger Signed-off-by: Stephen Hemminger --- tc/q_drr.c | 10 +++--- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/tc/q_drr.c b/tc/q_drr.c index f9c90f3035f3..882cd4a37ec7 100644 --- a/tc/q_drr.c +++ b/tc/q_drr.c @@ -84,16 +84,14 @@ static int drr_print_opt(s

[PATCH v2 iproute2-next 14/31] tc/sfb: implement JSON output

2018-07-10 Thread Stephen Hemminger
From: Stephen Hemminger Signed-off-by: Stephen Hemminger --- tc/q_sfb.c | 56 +- 1 file changed, 34 insertions(+), 22 deletions(-) diff --git a/tc/q_sfb.c b/tc/q_sfb.c index 7f48c6e0ef39..d58ce71f83ce 100644 --- a/tc/q_sfb.c +++ b/tc/q_sfb.c

[PATCH v2 iproute2-next 03/31] tc: convert stats print to json

2018-07-10 Thread Stephen Hemminger
From: Stephen Hemminger Convert compatiablity statistics to print in JSON. Signed-off-by: Stephen Hemminger --- tc/tc_util.c | 32 ++-- 1 file changed, 22 insertions(+), 10 deletions(-) diff --git a/tc/tc_util.c b/tc/tc_util.c index e8e1241d083d..05b6c97563b3 10064

[PATCH v2 iproute2-next 31/31] tc/fq_codel: use JSON helpers

2018-07-10 Thread Stephen Hemminger
From: Stephen Hemminger New routines make doing JSON output of time and size easier and consistent. Signed-off-by: Stephen Hemminger --- tc/q_fq_codel.c | 38 +- 1 file changed, 9 insertions(+), 29 deletions(-) diff --git a/tc/q_fq_codel.c b/tc/q_fq_codel.c

[PATCH v2 iproute2-next 12/31] tc/rr: implement JSON output

2018-07-10 Thread Stephen Hemminger
From: Stephen Hemminger Signed-off-by: Stephen Hemminger --- tc/q_rr.c | 16 +++- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/tc/q_rr.c b/tc/q_rr.c index 843a4faeef41..dcc58ac98ba2 100644 --- a/tc/q_rr.c +++ b/tc/q_rr.c @@ -101,13 +101,19 @@ static int rr_print_op

[PATCH v2 iproute2-next 17/31] tc/codel: implement JSON output

2018-07-10 Thread Stephen Hemminger
From: Stephen Hemminger Signed-off-by: Stephen Hemminger --- tc/q_codel.c | 35 +-- 1 file changed, 17 insertions(+), 18 deletions(-) diff --git a/tc/q_codel.c b/tc/q_codel.c index 8a2a871671cb..de5c514fc49c 100644 --- a/tc/q_codel.c +++ b/tc/q_codel.c @@ -133,7

[PATCH v2 iproute2-next 22/31] tc/pie: implement JSON output

2018-07-10 Thread Stephen Hemminger
From: Stephen Hemminger Signed-off-by: Stephen Hemminger --- tc/q_pie.c | 33 ++--- 1 file changed, 18 insertions(+), 15 deletions(-) diff --git a/tc/q_pie.c b/tc/q_pie.c index f7924ef5e76c..086785588d64 100644 --- a/tc/q_pie.c +++ b/tc/q_pie.c @@ -135,8 +135,6 @@ s

[PATCH v2 iproute2-next 16/31] tc/util: allow signed value for time

2018-07-10 Thread Stephen Hemminger
From: Stephen Hemminger The codel algorithm wants a signed value for time when outputting values. Allow it for other uses as well. Signed-off-by: Stephen Hemminger --- tc/tc_util.c | 6 +++--- tc/tc_util.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tc/tc_util.c b/t

[PATCH v2 iproute2-next 26/31] tc/cbs: convert to JSON output

2018-07-10 Thread Stephen Hemminger
From: Stephen Hemminger Signed-off-by: Stephen Hemminger --- tc/q_cbs.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tc/q_cbs.c b/tc/q_cbs.c index a2ffb1db3852..1518a79cd733 100644 --- a/tc/q_cbs.c +++ b/tc/q_cbs.c @@ -125,11 +125,11 @@ static int cbs_print_opt

[PATCH v2 iproute2-next 27/31] tc/cbq: convert to JSON output

2018-07-10 Thread Stephen Hemminger
From: Stephen Hemminger Signed-off-by: Stephen Hemminger --- tc/q_cbq.c | 73 ++ 1 file changed, 40 insertions(+), 33 deletions(-) diff --git a/tc/q_cbq.c b/tc/q_cbq.c index ad0170c41858..525a5823b808 100644 --- a/tc/q_cbq.c +++ b/tc/q_cbq.c

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

2018-07-10 Thread Stephen Hemminger
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 +--- tc/tc_util.h | 6 2 files changed, 59 insertions(+), 30 deletions

[PATCH v2 iproute2-next 21/31] tc/hhf: implement JSON output

2018-07-10 Thread Stephen Hemminger
From: Stephen Hemminger Signed-off-by: Stephen Hemminger --- tc/q_hhf.c | 24 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/tc/q_hhf.c b/tc/q_hhf.c index 21186a92c017..daea6bbcdd65 100644 --- a/tc/q_hhf.c +++ b/tc/q_hhf.c @@ -127,8 +127,6 @@ static int

[PATCH v2 iproute2-next 05/31] tc/util: remove unused print functions

2018-07-10 Thread Stephen Hemminger
From: Stephen Hemminger The functions for printing rate/time/size, etc are not used by current code. Next patch will repurpose these for JSON format output. Signed-off-by: Stephen Hemminger --- tc/tc_util.c | 49 ++--- tc/tc_util.h | 4 2 files

[PATCH v2 iproute2-next 29/31] tc/hfsc: convert to JSON output

2018-07-10 Thread Stephen Hemminger
From: Stephen Hemminger Signed-off-by: Stephen Hemminger --- tc/q_hfsc.c | 26 +- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/tc/q_hfsc.c b/tc/q_hfsc.c index f34b1b2fe2a9..e2f366b8a189 100644 --- a/tc/q_hfsc.c +++ b/tc/q_hfsc.c @@ -113,7 +113,8 @@ hfs

[PATCH v2 iproute2-next 08/31] tc/sfq: add json support

2018-07-10 Thread Stephen Hemminger
From: Stephen Hemminger Convert to use JSON Signed-off-by: Stephen Hemminger --- tc/q_sfq.c | 65 -- 1 file changed, 39 insertions(+), 26 deletions(-) diff --git a/tc/q_sfq.c b/tc/q_sfq.c index 6a1d853b7c93..a813c055b92e 100644 --- a/tc/q_sf

[PATCH v2 iproute2-next 25/31] tc/dsmark: implement JSON output

2018-07-10 Thread Stephen Hemminger
From: Stephen Hemminger Signed-off-by: Stephen Hemminger --- tc/q_dsmark.c | 27 ++- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/tc/q_dsmark.c b/tc/q_dsmark.c index d3e8292d777c..d2b9e3885377 100644 --- a/tc/q_dsmark.c +++ b/tc/q_dsmark.c @@ -131,28 +1

[PATCH v2 iproute2-next 09/31] tc/fq: support JSON output

2018-07-10 Thread Stephen Hemminger
From: Stephen Hemminger Output parameters optionally in JSON. Signed-off-by: Stephen Hemminger --- tc/q_fq.c | 103 +++--- 1 file changed, 60 insertions(+), 43 deletions(-) diff --git a/tc/q_fq.c b/tc/q_fq.c index f3dbf2ba0c6f..fa546c6ae500 1006

[PATCH v2 iproute2-next 07/31] tc/red: use new JSON helpers

2018-07-10 Thread Stephen Hemminger
From: Stephen Hemminger Now have simplier way to print size. Signed-off-by: Stephen Hemminger --- tc/q_red.c | 13 +++-- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/tc/q_red.c b/tc/q_red.c index 49fd4ac80513..9e4124befdb7 100644 --- a/tc/q_red.c +++ b/tc/q_red.c @@ -

[PATCH v2 iproute2-next 13/31] tc/qfq: implement JSON

2018-07-10 Thread Stephen Hemminger
From: Stephen Hemminger Signed-off-by: Stephen Hemminger --- tc/q_qfq.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tc/q_qfq.c b/tc/q_qfq.c index eb8fa4b84927..0bb52ad6340b 100644 --- a/tc/q_qfq.c +++ b/tc/q_qfq.c @@ -94,13 +94,13 @@ static int qfq_print_opt(stru

[PATCH v2 iproute2-next 23/31] tc/gred: implement JSON output

2018-07-10 Thread Stephen Hemminger
From: Stephen Hemminger Signed-off-by: Stephen Hemminger --- tc/q_gred.c | 73 - 1 file changed, 38 insertions(+), 35 deletions(-) diff --git a/tc/q_gred.c b/tc/q_gred.c index e63fac72a883..957d3c0950f1 100644 --- a/tc/q_gred.c +++ b/tc/q_gre

[PATCH v2 iproute2-next 30/31] tc/htb: implement JSON output

2018-07-10 Thread Stephen Hemminger
From: Stephen Hemminger Signed-off-by: Stephen Hemminger --- tc/q_htb.c | 53 ++--- 1 file changed, 30 insertions(+), 23 deletions(-) diff --git a/tc/q_htb.c b/tc/q_htb.c index 7d5f6ce44773..e7026ad017a4 100644 --- a/tc/q_htb.c +++ b/tc/q_htb.c @

[PATCH v2 iproute2-next 18/31] tc/fifo: implement JSON output

2018-07-10 Thread Stephen Hemminger
From: Stephen Hemminger Signed-off-by: Stephen Hemminger --- tc/q_fifo.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/tc/q_fifo.c b/tc/q_fifo.c index 5fd6c1b1107d..65a7b0e218f2 100644 --- a/tc/q_fifo.c +++ b/tc/q_fifo.c @@ -67,11 +67,10 @@ static int fifo_print_o

[PATCH v2 iproute2-next 04/31] tc/cbq: use sprint_rate

2018-07-10 Thread Stephen Hemminger
From: Stephen Hemminger All other places in tc use sprint_rate. Signed-off-by: Stephen Hemminger --- tc/q_cbq.c | 15 ++- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/tc/q_cbq.c b/tc/q_cbq.c index e7f1a3bfaf5d..ad0170c41858 100644 --- a/tc/q_cbq.c +++ b/tc/q_cbq.c

[PATCH v2 iproute2-next 24/31] tc/netem: implement JSON output

2018-07-10 Thread Stephen Hemminger
From: Stephen Hemminger Also, fix a spelling error in usage message. Signed-off-by: Stephen Hemminger --- tc/q_netem.c | 94 +--- 1 file changed, 46 insertions(+), 48 deletions(-) diff --git a/tc/q_netem.c b/tc/q_netem.c index 623ec9038ad3..3844

[PATCH v2 iproute2-next 20/31] tc/choke: implement JSON output

2018-07-10 Thread Stephen Hemminger
From: Stephen Hemminger Signed-off-by: Stephen Hemminger --- tc/q_choke.c | 25 - 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/tc/q_choke.c b/tc/q_choke.c index b269b1338b6d..718743f4a998 100644 --- a/tc/q_choke.c +++ b/tc/q_choke.c @@ -185,19 +185,23 @

[PATCH v2 iproute2-next 01/31] tc: use JSON in error handling

2018-07-10 Thread Stephen Hemminger
From: Stephen Hemminger If option or qdisc is unknown, still output in JSON. Signed-off-by: Stephen Hemminger --- tc/tc.c | 19 +++ 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/tc/tc.c b/tc/tc.c index 0d223281ba25..b6d2a6151793 100644 --- a/tc/tc.c +++ b/tc/tc

[PATCH v2 iproute2-next 02/31] tc: use const char in util

2018-07-10 Thread Stephen Hemminger
From: Stephen Hemminger For prefix and path, can use const char. Signed-off-by: Stephen Hemminger --- tc/tc_util.c | 8 +--- tc/tc_util.h | 6 +++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/tc/tc_util.c b/tc/tc_util.c index e0c96291ade0..e8e1241d083d 100644 --- a/tc/

[PATCH v2 iproute2-next 00/31] tc use JSON in all qdisc

2018-07-10 Thread Stephen Hemminger
From: Stephen Hemminger This patch set adds some utility routines and then converts all the remaining TC queue discipline managers to support JSON output. v2 - consolidate the utility patches - do all the remaining qdisc's Stephen Hemminger (31): tc: use JSON in error handling tc: use c

Re: [PATCH net-next v2 09/10] r8169: remove mii_if_info member from struct rtl8169_private

2018-07-10 Thread Andrew Lunn
On Tue, Jul 10, 2018 at 08:40:00PM +0200, Heiner Kallweit wrote: > The only remaining usage of the struct mii_if_info member is to store the > information whether the chip is GMII-capable. So we can replace it with > a simple flag. > > Signed-off-by: Heiner Kallweit Reviewed-by: Andrew Lunn

Re: [PATCH net-next v2 02/10] r8169: use phy_resume/phy_suspend

2018-07-10 Thread Andrew Lunn
> > Why is it powered up, but not connected? Is it powered down before it > > is disconnected? Is it the bootloader which is powering it up? > > > Exactly, if the device is active when driver is loaded and the > interface isn't used and therefore not brought up, then, when runtime- > suspending, w

Re: [PATCH net-next v2 07/10] r8169: migrate speed_down function to phylib

2018-07-10 Thread Andrew Lunn
> static void rtl_speed_down(struct rtl8169_private *tp) > { > - u32 adv; > - int lpa; > + struct phy_device *phydev = tp->dev->phydev; > + u32 adv = phydev->lp_advertising & phydev->supported; > > - rtl_writephy(tp, 0x1f, 0x); > - lpa = rtl_readphy(tp, MII_LPA); > +

Re: [PATCH net-next v2 04/10] r8169: use phy_ethtool_(g|s)et_link_ksettings

2018-07-10 Thread Andrew Lunn
On Tue, Jul 10, 2018 at 08:39:32PM +0200, Heiner Kallweit wrote: > Use phy_ethtool_(g|s)et_link_ksettings() for the respective ethtool_ops > callbacks. > > Signed-off-by: Heiner Kallweit Reviewed-by: Andrew Lunn Andrew

Re: [net] sch_fq_codel: zero q->flows_cnt when fq_codel_init fails

2018-07-10 Thread Cong Wang
On Mon, Jul 9, 2018 at 8:37 AM Jacob Keller wrote: > +alloc_failure: > + kfree(q->flows); You need to call kvfree() instead. Other than this, Acked-by: Cong Wang For net-next, I will send a patch to skip ->reset() for ->init() failure case, there is no reason to reset queues since qdisc

info!!

2018-07-10 Thread Lee Morrow
Top of the day to you, this is in respect of a very beneficial transaction which you would not want to let go reply for more details, Regards, Lee

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

2018-07-10 Thread Cong Wang
On Sun, Jul 8, 2018 at 2:27 PM Qiaobin Fu wrote: > @@ -111,6 +114,9 @@ parse_skbedit(struct action_util *a, int *argc_p, char > ***argv_p, int tca_id, > } > flags |= SKBEDIT_F_PTYPE; > ok++; > + } else if (match

Re: [PATCH net-next v2 02/10] r8169: use phy_resume/phy_suspend

2018-07-10 Thread Heiner Kallweit
On 10.07.2018 21:15, Andrew Lunn wrote: >> static void r8168_pll_power_down(struct rtl8169_private *tp) >> { >> if (r8168_check_dash(tp)) >> @@ -4503,7 +4462,8 @@ static void r8168_pll_power_down(struct >> rtl8169_private *tp) >> if (rtl_wol_pll_power_down(tp)) >> return;

Re: [PATCH bpf-next] bpf: better availability probing for seg6 helpers

2018-07-10 Thread Daniel Borkmann
On 07/10/2018 06:54 PM, Mathieu Xhonneux wrote: > bpf_lwt_seg6_* helpers require CONFIG_IPV6_SEG6_BPF, and currently > return -EOPNOTSUPP to indicate unavailability. This patch forces the > BPF verifier to reject programs using these helpers when > !CONFIG_IPV6_SEG6_BPF, allowing users to more easi

Re: [PATCH net-next v2 01/10] r8169: add basic phylib support

2018-07-10 Thread Heiner Kallweit
On 10.07.2018 21:10, Andrew Lunn wrote: >> +static int r8169_mdio_read_reg(struct mii_bus *mii_bus, int phyaddr, int >> phyreg) >> +{ >> +struct rtl8169_private *tp = mii_bus->priv; >> + >> +if (phyaddr > 0) >> +return -EINVAL; > > Please use ENODEV. > > The mdio bus is scann

Re: [PATCH net-next 08/13] ARM: net: bpf: use immediate forms of instructions where possible

2018-07-10 Thread kbuild test robot
Hi Russell, I love your patch! Yet something to improve: [auto build test ERROR on net-next/master] url: https://github.com/0day-ci/linux/commits/Russell-King/ARM-net-bpf-enumerate-the-JIT-scratch-stack-layout/20180710-203859 config: arm-allmodconfig (attached as .config) compiler: arm

Re: [PATCH net-next v2 02/10] r8169: use phy_resume/phy_suspend

2018-07-10 Thread Andrew Lunn
> static void r8168_pll_power_down(struct rtl8169_private *tp) > { > if (r8168_check_dash(tp)) > @@ -4503,7 +4462,8 @@ static void r8168_pll_power_down(struct rtl8169_private > *tp) > if (rtl_wol_pll_power_down(tp)) > return; > > - r8168_phy_power_down(tp); > +

Re: [PATCH net-next v2 01/10] r8169: add basic phylib support

2018-07-10 Thread Andrew Lunn
> +static int r8169_mdio_read_reg(struct mii_bus *mii_bus, int phyaddr, int > phyreg) > +{ > + struct rtl8169_private *tp = mii_bus->priv; > + > + if (phyaddr > 0) > + return -EINVAL; Please use ENODEV. The mdio bus is scanned for devices in __mdiobus_register(). If mdiobus_s

Re: [PATCH RFC net-next] openvswitch: Queue upcalls to userspace in per-port round-robin order

2018-07-10 Thread Pravin Shelar
On Wed, Jul 4, 2018 at 7:23 AM, Matteo Croce wrote: > From: Stefano Brivio > > Open vSwitch sends to userspace all received packets that have > no associated flow (thus doing an "upcall"). Then the userspace > program creates a new flow and determines the actions to apply > based on its configura

Re: [PATCH net-next 01/13] ARM: net: bpf: enumerate the JIT scratch stack layout

2018-07-10 Thread Daniel Borkmann
Hi Russell, thanks a lot for your work on the arm32 JIT! On 07/10/2018 02:36 PM, Russell King wrote: > Enumerate the contents of the JIT scratch stack layout used for storing > some of the JITs 64-bit registers, tail call counter and AX register. > > XXX: what about the skb_copy_bits buffer - th

Re: [PATCH rdma-next 6/9] IB/mlx5: Introduce vendor create and destroy flow methods

2018-07-10 Thread Jason Gunthorpe
On Sun, Jul 08, 2018 at 01:24:42PM +0300, Leon Romanovsky wrote: > +static int UVERBS_HANDLER(MLX5_IB_METHOD_CREATE_FLOW)(struct ib_device > *ib_dev, > + struct ib_uverbs_file > *file, > + struct

Re: [PATCH rdma-next 4/9] IB/mlx5: Introduce flow steering matcher object

2018-07-10 Thread Jason Gunthorpe
On Sun, Jul 08, 2018 at 01:24:40PM +0300, Leon Romanovsky wrote: > From: Yishai Hadas > > Introduce flow steering matcher object and its create and destroy > methods. > > This matcher object holds some mlx5 specific driver properties that > matches the underlay device specification when an mlx5

  1   2   >