Re: [PATCH v2] sched: report if filter is too large to dump

2018-02-20 Thread Phil Sutter
Hi Roman, On Mon, Feb 19, 2018 at 09:32:51PM +0100, Roman Kapl wrote: > So far, if the filter was too large to fit in the allocated skb, the > kernel did not return any error and stopped dumping. Modify the dumper > so that it returns -EMSGSIZE when a filter fails to dump and it is the > first

Re: [net-next v2 1/2] bpf, seccomp: Add eBPF filter capabilities

2018-02-20 Thread Sargun Dhillon
On Mon, Feb 19, 2018 at 4:00 PM, Daniel Borkmann wrote: > On 02/19/2018 05:22 PM, Sargun Dhillon wrote: >> This introduces the BPF_PROG_TYPE_SECCOMP bpf program type. It is meant >> to be used for seccomp filters as an alternative to cBPF filters. The >> program type has

Re: [net-next v2 1/2] bpf, seccomp: Add eBPF filter capabilities

2018-02-20 Thread Sargun Dhillon
On Mon, Feb 19, 2018 at 4:00 PM, Daniel Borkmann wrote: > On 02/19/2018 05:22 PM, Sargun Dhillon wrote: >> This introduces the BPF_PROG_TYPE_SECCOMP bpf program type. It is meant >> to be used for seccomp filters as an alternative to cBPF filters. The >> program type has

Re: [PATCH iproute2-next v2 2/7] iplink: Correctly report error when network device isn't found

2018-02-20 Thread Serhey Popovych
David Ahern wrote: > On 2/20/18 2:37 PM, Serhey Popovych wrote: >> Distinguish cases when "dev" parameter isn't given from cases where no >> network device corresponding to "dev" is found. >> >> Do not check for index validity in xdp_parse(): caller should take care >> of this because has more

Re: [PATCH iproute2-next v2] ip: link_gre6.c: Support IP6_TNL_F_ALLOW_LOCAL_REMOTE flag

2018-02-20 Thread Serhey Popovych
Petr Machata wrote: > For IP-in-IP tunnels, one can specify the [no]allow-localremote command > when configuring a device. Under the hood, this flips the > IP6_TNL_F_ALLOW_LOCAL_REMOTE flag on the netdevice. However, ip6gretap > and ip6erspan devices, where the flag is also relevant, are not

Re: [PATCH iproute2-next v2 3/7] iplink: Use "dev" and "name" parameters interchangeable when possible

2018-02-20 Thread Serhey Popovych
Stephen Hemminger wrote: > On Tue, 20 Feb 2018 23:37:25 +0200 > Serhey Popovych wrote: > >> Both of them accept network device name as argument, but have different >> meaning: >> >> dev - is a device by it's name, >> name - name for specific device device. >> >>

Re: [PATCH net-next] r8169: remove not needed PHY soft reset in rtl8168e_2_hw_phy_config

2018-02-20 Thread Heiner Kallweit
Am 21.02.2018 um 05:27 schrieb David Miller: > From: Heiner Kallweit > Date: Tue, 20 Feb 2018 07:30:16 +0100 > >> rtl8169_init_phy() resets the PHY anyway after applying the chip-specific >> PHY configuration. So we don't need to soft-reset the PHY as part of the >>

Re: [PATCH net-next 0/6] tcp: remove non GSO code

2018-02-20 Thread Oleksandr Natalenko
Hi. On středa 21. února 2018 0:21:37 CET Eric Dumazet wrote: > My latest patch (fixing BBR underestimation of cwnd) > was meant for net tree, on a NIC where SG/TSO/GSO) are disabled. > > ( ie when sk->sk_gso_max_segs is not set to 'infinite' ) > > It is packet scheduler independent really. > >

Re: [PATCH iproute2-next] color: disable color when json output is requested

2018-02-20 Thread Vincent Bernat
❦ 20 février 2018 16:04 -0800, Stephen Hemminger  : >> Instead of declaring -color and -json exclusive, ignore -color when >> -json is provided. The rationale is to allow to put -color in an alias >> for ip while still being able to use -json. -color is merely a >>

nla_put_string() vs NLA_STRING

2018-02-20 Thread Kees Cook
Hi, It seems that in at least one case[1], nla_put_string() is being used on an NLA_STRING, which lacks a NULL terminator, which leads to silliness when nla_put_string() uses strlen() to figure out the size: /** * nla_put_string - Add a string netlink attribute to a socket buffer * @skb:

Re: [PATCH] netlink: put module reference if dump start fails

2018-02-20 Thread Eric Dumazet
On Wed, 2018-02-21 at 04:41 +0100, Jason A. Donenfeld wrote: > Before, if cb->start() failed, the module reference would never be put, > because cb->cb_running is intentionally false at this point. Users are > generally annoyed by this because they can no longer unload modules that > leak

[PATCH net] smsc75xx: fix smsc75xx_set_features()

2018-02-20 Thread Eric Dumazet
From: Eric Dumazet If an attempt is made to disable RX checksums, USB adapter is changed but netdev->features is not, because smsc75xx_set_features() returns a non zero value. This throws errors from netdev_rx_csum_fault() : : hw csum failure Signed-off-by: Eric Dumazet

Re: [PATCH iproute2-next v2 2/7] iplink: Correctly report error when network device isn't found

2018-02-20 Thread David Ahern
On 2/20/18 2:37 PM, Serhey Popovych wrote: > Distinguish cases when "dev" parameter isn't given from cases where no > network device corresponding to "dev" is found. > > Do not check for index validity in xdp_parse(): caller should take care > of this because has more information (e.g. when "dev"

Re: [PATCH iproute2-next v2 1/7] utils: Introduce and use nodev() helper routine

2018-02-20 Thread David Ahern
On 2/20/18 2:37 PM, Serhey Popovych wrote: > diff --git a/ip/ipneigh.c b/ip/ipneigh.c > index 0735424..9c9cd23 100644 > --- a/ip/ipneigh.c > +++ b/ip/ipneigh.c > @@ -178,11 +178,13 @@ static int ipneigh_modify(int cmd, int flags, int argc, > char **argv) > > ll_init_map(); > > - if

Re: [PATCH net-next] r8169: remove not needed PHY soft reset in rtl8168e_2_hw_phy_config

2018-02-20 Thread David Miller
From: Heiner Kallweit Date: Tue, 20 Feb 2018 07:30:16 +0100 > rtl8169_init_phy() resets the PHY anyway after applying the chip-specific > PHY configuration. So we don't need to soft-reset the PHY as part of the > chip-specific configuration. > > Signed-off-by: Heiner

Re: [PATCH net-next] r8169: remove some WOL-related dead code

2018-02-20 Thread David Miller
From: Heiner Kallweit Date: Tue, 20 Feb 2018 07:23:03 +0100 > Commit bde135a672bf "r8169: only enable PCI wakeups when WOL is active" > removed the only user of flag RTL_FEATURE_WOL. So let's remove some > now dead code. > > Signed-off-by: Heiner Kallweit

Re: [PATCH V7 2/4] sctp: Add ip option support

2018-02-20 Thread Neil Horman
On Tue, Feb 20, 2018 at 07:15:27PM +, Richard Haines wrote: > Add ip option support to allow LSM security modules to utilise CIPSO/IPv4 > and CALIPSO/IPv6 services. > > Signed-off-by: Richard Haines > --- > All SCTP lksctp-tools/src/func_tests run correctly

[PATCH] netlink: put module reference if dump start fails

2018-02-20 Thread Jason A. Donenfeld
Before, if cb->start() failed, the module reference would never be put, because cb->cb_running is intentionally false at this point. Users are generally annoyed by this because they can no longer unload modules that leak references. Also, it may be possible to tediously wrap a reference counter

Re: [PATCH] Carrier detect ok, don't turn off negotiation

2018-02-20 Thread Denis Du
Hi, David: How  is your thinking about this patch? >From b5902a4dfc709b62b704997ab64f31c9ef69a6db Mon Sep 17 00:00:00 2001 From: Denis Du Date: Mon, 15 Jan 2018 17:26:06 -0500 Subject: [PATCH] netdev: carrier detect ok, don't turn off negotiation Sometimes when

Re: [PATCH v2] sched: report if filter is too large to dump

2018-02-20 Thread David Miller
From: Roman Kapl Date: Mon, 19 Feb 2018 21:32:51 +0100 > So far, if the filter was too large to fit in the allocated skb, the > kernel did not return any error and stopped dumping. Modify the dumper > so that it returns -EMSGSIZE when a filter fails to dump and it is the > first

Re: [PATCH RFC 3/3] netfilter: nf_tables: add BPF-based jit infrastructure

2018-02-20 Thread Alexei Starovoitov
On Tue, Feb 20, 2018 at 11:53:55AM +0100, Pablo Neira Ayuso wrote: > Hi David, > > On Mon, Feb 19, 2018 at 01:53:34PM -0500, David Miller wrote: > > I'm very suprised that this is generating classical BPF filters. > > > > We have native eBPF and that is what anything generating new code > >

Re: [Intel-wired-lan] [PATCH net-queue] e1000e: Fix check_for_link return value with autoneg off.

2018-02-20 Thread Neftin, Sasha
On 2/19/2018 22:12, Benjamin Poirier wrote: When autoneg is off, the .check_for_link callback functions clear the get_link_status flag and systematically return a "pseudo-error". This means that the link is not detected as up until the next execution of the e1000_watchdog_task() 2 seconds later.

[PATCH iproute2-next 2/4] ip: Display ip rule protocol used

2018-02-20 Thread Donald Sharp
Newer kernels are now accepting a protocol from the installing program for who installed the rule. This change allows us to see this change if it is being specified by the installing program. Signed-off-by: Donald Sharp --- ip/iprule.c | 4 1 file changed, 4

[PATCH iproute2-next 3/4] ip: Allow rules to accept a specified protocol

2018-02-20 Thread Donald Sharp
Allow the specification of a protocol when the user adds/modifies/deletes a rule. Signed-off-by: Donald Sharp --- ip/iprule.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/ip/iprule.c b/ip/iprule.c index b3e7d92c..fd242fee 100644 --- a/ip/iprule.c +++

[PATCH iproute2-next 0/4] Allow 'ip rule' command to use protocol

2018-02-20 Thread Donald Sharp
Fix iprule.c to use the actual `struct fib_rule_hdr` and to allow the end user to see and use the protocol keyword for rule manipulations. Donald Sharp (4): ip: Use the `struct fib_rule_hdr` for rules ip: Display ip rule protocol used ip: Allow rules to accept a specified protocol ip: Add

[PATCH iproute2-next 4/4] ip: Add ability to flush a rule based upon protocol

2018-02-20 Thread Donald Sharp
Add code to allow the `ip rule flush protocol XXX` command to be accepted and properly handled. Additionally modify the documentation to be correct with these changes. Signed-off-by: Donald Sharp --- ip/iprule.c| 25 ++---

[PATCH iproute2-next 1/4] ip: Use the `struct fib_rule_hdr` for rules

2018-02-20 Thread Donald Sharp
The iprule.c code was using `struct rtmsg` as the data type to pass into the kernel for the netlink message. While 'struct rtmsg' and `struct fib_rule_hdr` are the same size and mostly the same, we should use the correct data structure. This commit translates the data structures to have iprule.c

Re: [PATCH RFC 0/4] net: add bpfilter

2018-02-20 Thread Alexei Starovoitov
On Tue, Feb 20, 2018 at 11:44:31AM +0100, Pablo Neira Ayuso wrote: > > Don't get me wrong, no software is safe from security issues, but if you > don't abstract your resources in the right way, you have more chance to > have experimence more problems. interesting point. The key part of

[PATCH net-next] net: dsa: mv88e6xxx: scratch registers and external MDIO pins

2018-02-20 Thread Andrew Lunn
MV88E6352 and later switches support GPIO control through the "Scratch & Misc" global2 register. Two of the pins controlled this way on the mv88e6390 family are the external MDIO pins. They can either by used as part of the MII interface for port 0, GPIOs, or MDIO. Add a function to configure them

[net 06/11] net/mlx5e: Return error if prio is specified when offloading eswitch vlan push

2018-02-20 Thread Saeed Mahameed
From: Or Gerlitz This isn't supported when we emulate eswitch vlan push action which is the current state of things. Fixes: 8b32580df1cb ('net/mlx5e: Add TC vlan action for SRIOV offloads') Signed-off-by: Or Gerlitz Reviewed-by: Mark Bloch

[net 01/11] net/mlx5e: Fix TCP checksum in LRO buffers

2018-02-20 Thread Saeed Mahameed
From: Gal Pressman When receiving an LRO packet, the checksum field is set by the hardware to the checksum of the first coalesced packet. Obviously, this checksum is not valid for the merged LRO packet and should be fixed. We can use the CQE checksum which covers the checksum

[net 04/11] net/mlx5e: Eliminate build warnings on no previous prototype

2018-02-20 Thread Saeed Mahameed
From: Or Gerlitz Fix these gcc warnings on drivers/net/ethernet/mellanox/mlx5: [..]/core/lib/clock.c:454:6: warning: no previous prototype for 'mlx5_init_clock' [-Wmissing-prototypes] [..]/core/lib/clock.c:510:6: warning: no previous prototype for 'mlx5_cleanup_clock'

[net 11/11] net/mlx5: Fix error handling when adding flow rules

2018-02-20 Thread Saeed Mahameed
From: Vlad Buslov If building match list or adding existing fg fails when node is locked, function returned without unlocking it. This happened if node version changed or adding existing fg returned with EAGAIN after jumping to search_again_locked label. Fixes: bd71b08ec2ee

[net 08/11] net/mlx5: Use 128B cacheline size for 128B or larger cachelines

2018-02-20 Thread Saeed Mahameed
From: Daniel Jurgens The adapter uses the cache_line_128byte setting to set the bounds for end padding. On systems where the cacheline size is greater than 128B use 128B instead of the default of 64B. This results in fewer partial cacheline writes. There's a 50% chance it

[net 07/11] net/mlx5e: Specify numa node when allocating drop rq

2018-02-20 Thread Saeed Mahameed
From: Gal Pressman When allocating a drop rq, no numa node is explicitly set which means allocations are done on node zero. This is not necessarily the nearest numa node to the HCA, and even worse, might even be a memoryless numa node. Choose the numa_node given to us by the

[net 10/11] net/mlx5: E-Switch, Fix drop counters use before creation

2018-02-20 Thread Saeed Mahameed
From: Eugenia Emantayev First use of drop counters happens in esw_apply_vport_conf function, while they are allocated later in the flow. Fix that by moving esw_vport_create_drop_counters function to be called before the first use. Fixes: b8a0dbe3a90b ("net/mlx5e: E-switch,

[net 02/11] net/mlx5e: Fix loopback self test when GRO is off

2018-02-20 Thread Saeed Mahameed
From: Inbar Karmy When GRO is off, the transport header pointer in sk_buff is initialized to network's header. To find the udp header, instead of using udp_hdr() which assumes skb_network_header was set, manually calculate the udp header offset. Fixes: 0952da791c97

[net 05/11] net/mlx5: Address static checker warnings on non-constant initializers

2018-02-20 Thread Saeed Mahameed
From: Or Gerlitz Address these sparse warnings on drivers/net/ethernet/mellanox/mlx5 [..]/core/diag/fs_tracepoint.c:99:53: warning: non-constant initializer for static object [..]/core/diag/fs_tracepoint.c:102:53: warning: non-constant initializer for static object etc

[net 09/11] net/mlx5: Add header re-write to the checks for conflicting actions

2018-02-20 Thread Saeed Mahameed
From: Or Gerlitz We can't allow only some of the rules sharing an FTE to ask for header re-write, add it to the conflicting action checks. Fixes: 0d235c3fabb7 ('net/mlx5: Add hash table to search FTEs in a flow-group') Signed-off-by: Or Gerlitz

[pull request][net 00/11] Mellanox, mlx5 fixes 2018-02-20

2018-02-20 Thread Saeed Mahameed
Hi Dave, The following pull request includes some fixes for the mlx5 core and netdevice driver. Please pull and let me know if there's any issue. -stable 4.10.y: ('net/mlx5e: Fix loopback self test when GRO is off') -stable 4.12.y: ('net/mlx5e: Specify numa node when allocating drop rq')

[net 03/11] net/mlx5e: Verify inline header size do not exceed SKB linear size

2018-02-20 Thread Saeed Mahameed
From: Eran Ben Elisha Driver tries to copy at least MLX5E_MIN_INLINE bytes into the control segment of the WQE. It assumes that the linear part contains at least MLX5E_MIN_INLINE bytes, which can be wrong. Cited commit verified that driver will not copy more bytes into the

Re: [PATCH net-next] cxgb4: append firmware dump to vmcore in kernel panic

2018-02-20 Thread Jakub Kicinski
On Tue, 20 Feb 2018 16:51:03 -0800, Florian Fainelli wrote: > On 02/20/2018 04:43 PM, Jakub Kicinski wrote: > > On Mon, 19 Feb 2018 18:04:17 +0530, Rahul Lakkireddy wrote: > >> Our requirement is to analyze the state of firmware/hardware at the > >> time of kernel panic. > > > > I was

Re: [PATCH net-next] cxgb4: append firmware dump to vmcore in kernel panic

2018-02-20 Thread Florian Fainelli
On 02/20/2018 04:43 PM, Jakub Kicinski wrote: > On Mon, 19 Feb 2018 18:04:17 +0530, Rahul Lakkireddy wrote: >> Our requirement is to analyze the state of firmware/hardware at the >> time of kernel panic. > > I was wondering about this since you posted the patch and I can't come > up with any

Re: [PATCH iproute2] ip: link_gre6.c: Support IP6_TNL_F_ALLOW_LOCAL_REMOTE flag

2018-02-20 Thread Petr Machata
Serhey Popovych writes: > Maybe it is better to rebase this against iproute2-next? Sure, I sent a v2 rebased on top of iproute2. Thanks, Petr

[PATCH iproute2-next v2] ip: link_gre6.c: Support IP6_TNL_F_ALLOW_LOCAL_REMOTE flag

2018-02-20 Thread Petr Machata
For IP-in-IP tunnels, one can specify the [no]allow-localremote command when configuring a device. Under the hood, this flips the IP6_TNL_F_ALLOW_LOCAL_REMOTE flag on the netdevice. However, ip6gretap and ip6erspan devices, where the flag is also relevant, are not IP-in-IP tunnels, and thus

Re: [PATCH net-next] cxgb4: append firmware dump to vmcore in kernel panic

2018-02-20 Thread Jakub Kicinski
On Mon, 19 Feb 2018 18:04:17 +0530, Rahul Lakkireddy wrote: > Our requirement is to analyze the state of firmware/hardware at the > time of kernel panic. I was wondering about this since you posted the patch and I can't come up with any specific scenario where kernel crash would correlate

Re: [PATCH net-next RFC 0/2] Convert OKI PCH GBE to mdiobus and phylib

2018-02-20 Thread Paul Burton
Hi Andrew, On Tue, Feb 20, 2018 at 03:28:17AM +0100, Andrew Lunn wrote: > Hi Paul > > Here is my stab at converting the OKI PCH GBE to use the common MDIO > bus and phylib drivers. This is compile tested only, and pretty much > guaranteed to be broken. But hopefully it will help you. Feel free

[PATCH iproute2-next] tc: implement color output

2018-02-20 Thread Stephen Hemminger
Implement the -color option; in this case -co is ambiguous since it was already used for -conf. For now this just means putting device name in color. Signed-off-by: Stephen Hemminger --- man/man8/tc.8 | 9 +++-- tc/tc.c| 15 +++

[PATCH net-next v4 2/2] ipvlan: selects master_l3 device instead of depending on it

2018-02-20 Thread Matteo Croce
The L3 Master device is just a glue between the core networking code and device drivers, so it should be selected automatically rather than requiring to be enabled explicitly. Signed-off-by: Matteo Croce --- drivers/net/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1

[PATCH net-next v4 0/2] Remove IPVlan module dependencies on IPv6 and L3 Master dev

2018-02-20 Thread Matteo Croce
The IPVlan module currently depends on IPv6 and L3 Master dev. Refactor the code to allow building IPVlan module regardless of the value of CONFIG_IPV6 as done in other drivers like VxLAN or GENEVE. Also change the CONFIG_NET_L3_MASTER_DEV dependency into a select, since compiling L3 Master device

[PATCH net-next v4 1/2] ipvlan: drop ipv6 dependency

2018-02-20 Thread Matteo Croce
IPVlan has an hard dependency on IPv6, refactor the ipvlan code to allow compiling it with IPv6 disabled, move duplicate code into addr_equal() and refactor series of if-else into a switch. Signed-off-by: Matteo Croce --- v4: more descriptive commit message and fix

Re: [PATCH iproute2-next] color: disable color when json output is requested

2018-02-20 Thread Stephen Hemminger
On Wed, 21 Feb 2018 00:28:04 +0100 Vincent Bernat wrote: > Instead of declaring -color and -json exclusive, ignore -color when > -json is provided. The rationale is to allow to put -color in an alias > for ip while still being able to use -json. -color is merely a >

[PATCH iproute2-next] color: disable color when json output is requested

2018-02-20 Thread Vincent Bernat
Instead of declaring -color and -json exclusive, ignore -color when -json is provided. The rationale is to allow to put -color in an alias for ip while still being able to use -json. -color is merely a presentation suggestion and we can assume there is nothing to color in the JSON output.

Re: [PATCH net-next 0/6] tcp: remove non GSO code

2018-02-20 Thread Eric Dumazet
On Tue, 2018-02-20 at 21:45 +0100, Oleksandr Natalenko wrote: > On úterý 20. února 2018 21:09:37 CET Eric Dumazet wrote: > > Also you can tune your NIC to accept few MSS per GSO/TSO packet > > > > ip link set dev eth0 gso_max_segs 2 > > > > So even if TSO/GSO is there, BBR should not use

Re: [PATCH 1/3] net: Kill net_mutex

2018-02-20 Thread Stephen Hemminger
On Mon, 19 Feb 2018 12:58:38 +0300 Kirill Tkhai wrote: > + struct list_headexit_list; /* To linked to call pernet exit > + * methods on dead net (net_sem > + * read

Re: [PATCH iproute2-next v2 3/7] iplink: Use "dev" and "name" parameters interchangeable when possible

2018-02-20 Thread Stephen Hemminger
On Tue, 20 Feb 2018 23:37:25 +0200 Serhey Popovych wrote: > Both of them accept network device name as argument, but have different > meaning: > > dev - is a device by it's name, > name - name for specific device device. > > The only case where they treated

Re: [V9fs-developer] [PATCH] net/9p: avoid -ERESTARTSYS leak to userspace

2018-02-20 Thread Greg Kurz
Hi Al, It's been two years without any sign of life from 9p maintainers... :-\ Would you apply (or nack) this patch ? Thanks, -- Greg PS: in the case you apply it, probable Cc sta...@vger.kernel.org as well On Thu, 08 Feb 2018 18:38:49 +0100 Greg Kurz wrote: > If it was

Re: [PATCH iproute2-next 1/8] iplink: Return from function instead of calling exit()

2018-02-20 Thread Roopa Prabhu
On Tue, Feb 20, 2018 at 12:49 PM, David Ahern wrote: > On 2/20/18 1:44 PM, Roopa Prabhu wrote: >> On Tue, Feb 20, 2018 at 12:33 PM, Stephen Hemminger >> wrote: >>> On Tue, 20 Feb 2018 13:27:21 -0700 >>> David Ahern wrote: >>>

[RFC net-next 03/11] ip6mr: Align hash implementation to ipmr

2018-02-20 Thread Yuval Mintz
Since commit 8fb472c09b9d ("ipmr: improve hash scalability") ipmr has been using rhashtable as a basis for its mfc routes, but ip6mr is currently still using the old private MFC hash implementation. Align ip6mr to the current ipmr implementation. Signed-off-by: Yuval Mintz

[RFC net-next 09/11] ipmr, ip6mr: Unite vif seq functions

2018-02-20 Thread Yuval Mintz
Same as previously done with the mfc seq, the logic for the vif seq is refactored to be shared between ipmr and ip6mr. Signed-off-by: Yuval Mintz --- include/linux/mroute_base.h | 33 ++ net/ipv4/ipmr.c | 49

[RFC net-next 06/11] ipmr, ip6mr: Make mfc_cache a common structure

2018-02-20 Thread Yuval Mintz
mfc_cache and mfc6_cache are almost identical - the main difference is in the origin/group addresses and comparison-key. Make a common structure encapsulating most of the multicast routing logic - mr_mfc and convert both ipmr and ip6mr into using it. For easy conversion [casting, in this case]

[RFC net-next 00/11] ipmr, ip6mr: Align multicast routing for IPv4 & IPv6

2018-02-20 Thread Yuval Mintz
Historically ip6mr was based [cut-n-paste] on ipmr and the two have not diverged too much. Apparently as ipv4 multicast routing is more common than its ipv6 brethren modifications since then are mostly one-way, affecting ipmr while leaving ip6mr unchanged. This series is meant to re-factor both

[RFC net-next 11/11] ipmr, ip6mr: Unite dumproute flows

2018-02-20 Thread Yuval Mintz
The various MFC entries are being held in the same kind of mr_tables for both ipmr and ip6mr, and their traversal logic is identical. Also, with the exception of the addresses [and other small tidbits] the major bulk of the nla setting is identical. Unite as much of the dumping as possible

[RFC net-next 04/11] mroute*: Make mr_table a common struct

2018-02-20 Thread Yuval Mintz
Following previous changes to ip6mr, mr_table and mr6_table are basically the same [up to mr6_table having additional '6' suffixes to its variable names]. Move the common structure definition into a common header; This requires renaming all references in ip6mr to variables that had the distinct

[RFC net-next 05/11] ipmr, ip6mr: Unite creation of new mr_table

2018-02-20 Thread Yuval Mintz
Now that both ipmr and ip6mr are using the same mr_table structure, we can have a common function to allocate & initialize a new instance. Signed-off-by: Yuval Mintz --- include/linux/mroute_base.h | 17 + net/ipv4/ipmr.c | 27

[RFC net-next 10/11] ip6mr: Remove MFC_NOTIFY and refactor flags

2018-02-20 Thread Yuval Mintz
MFC_NOTIFY exists in ip6mr, probably as some legacy code [was already removed for ipmr in commit 06bd6c0370bb ("net: ipmr: remove unused MFC_NOTIFY flag and make the flags enum"). Remove it from ip6mr as well, and move the enum into a common file; Notice MFC_OFFLOAD is currently only used by

[RFC net-next 08/11] ipmr, ip6mr: Unite mfc seq logic

2018-02-20 Thread Yuval Mintz
With the exception of the final dump, ipmr and ip6mr have the exact same seq logic for traversing a given mr_table. Refactor that code and make it common. Signed-off-by: Yuval Mintz --- include/linux/mroute_base.h | 69 net/ipv4/ipmr.c

[RFC net-next 01/11] ipmr,ipmr6: Define a uniform vif_device

2018-02-20 Thread Yuval Mintz
The two implementations have almost identical structures - vif_device and mif_device. As a step toward uniforming the mr_tables, eliminate the mif_device and relocate the vif_device definition into a new common header file. Also, introduce a common initializing function for setting most of the

[RFC net-next 02/11] ip6mr: Make mroute_sk rcu-based

2018-02-20 Thread Yuval Mintz
In ipmr the mr_table socket is handled under RCU. Introduce the same for ip6mr. Signed-off-by: Yuval Mintz --- include/linux/mroute6.h | 6 +++--- net/ipv6/ip6_output.c | 2 +- net/ipv6/ip6mr.c| 43 ++- 3 files changed, 30

Re: [RFC PATCH v3 0/3] Enable virtio_net to act as a backup for a passthru device

2018-02-20 Thread Jakub Kicinski
On Tue, 20 Feb 2018 21:14:10 +0100, Jiri Pirko wrote: > Yeah, I can see it now :( I guess that the ship has sailed and we are > stuck with this ugly thing forever... > > Could you at least make some common code that is shared in between > netvsc and virtio_net so this is handled in exacly the

[RFC net-next 07/11] ipmr, ip6mr: Unite logic for searching in MFC cache

2018-02-20 Thread Yuval Mintz
ipmr and ip6mr utilize the exact same methods for searching the hashed resolved connections, difference being only in the construction of the hash comparison key. In order to unite the flow, introduce an mr_table operation set that would contain the protocol specific information required for

Re: [PATCH] bpf: hide a possibly unused variable

2018-02-20 Thread Daniel Borkmann
On 02/20/2018 11:08 PM, Arnd Bergmann wrote: > On Tue, Feb 20, 2018 at 10:44 PM, Daniel Borkmann > wrote: >> Hi Arnd, >> >> On 02/20/2018 10:16 PM, Arnd Bergmann wrote: >>> The only user of this variable is inside of an #ifdef, causing >>> a warning without CONFIG_INET: >>>

Re: [PATCH] bpf: hide a possibly unused variable

2018-02-20 Thread Arnd Bergmann
On Tue, Feb 20, 2018 at 10:44 PM, Daniel Borkmann wrote: > Hi Arnd, > > On 02/20/2018 10:16 PM, Arnd Bergmann wrote: >> The only user of this variable is inside of an #ifdef, causing >> a warning without CONFIG_INET: >> >> net/core/filter.c: In function

[PATCH] bpf: clean up unused-variable warning

2018-02-20 Thread Arnd Bergmann
The only user of this variable is inside of an #ifdef, causing a warning without CONFIG_INET: net/core/filter.c: In function 'bpf_sock_ops_cb_flags_set': net/core/filter.c:3382:6: error: unused variable 'val' [-Werror=unused-variable] int val = argval & BPF_SOCK_OPS_ALL_CB_FLAGS; This

Re: [PATCH] bpf: hide a possibly unused variable

2018-02-20 Thread Daniel Borkmann
Hi Arnd, On 02/20/2018 10:16 PM, Arnd Bergmann wrote: > The only user of this variable is inside of an #ifdef, causing > a warning without CONFIG_INET: > > net/core/filter.c: In function 'bpf_sock_ops_cb_flags_set': > net/core/filter.c:3382:6: error: unused variable 'val' >

[PATCH iproute2-next v2 3/7] iplink: Use "dev" and "name" parameters interchangeable when possible

2018-02-20 Thread Serhey Popovych
Both of them accept network device name as argument, but have different meaning: dev - is a device by it's name, name - name for specific device device. The only case where they treated separately is network device rename case where need to specify both ifindex and new name. In rest of the

[PATCH iproute2-next v2 2/7] iplink: Correctly report error when network device isn't found

2018-02-20 Thread Serhey Popovych
Distinguish cases when "dev" parameter isn't given from cases where no network device corresponding to "dev" is found. Do not check for index validity in xdp_parse(): caller should take care of this because has more information (e.g. when "dev" is given or not found) for this. Signed-off-by:

[PATCH iproute2-next v2 5/7] iplink: Perform most of request buffer setups and checks in iplink_parse()

2018-02-20 Thread Serhey Popovych
To benefit other users (e.g. link_veth.c) of iplink_parse() from additional attribute checks and setups made in iplink_modify(). This catches most of weired cobination of parameters to peer device configuration in iplink_vxcan.c and link_veth.c. Use memcpy() to save peer device @ifm data

[PATCH iproute2-next v2 7/7] iplink: Reduce number of arguments to iplink_parse()

2018-02-20 Thread Serhey Popovych
Introduce new @struct iplink_parse_args data structure to consolidate arguments to iplink_parse(). This will reduce number of arguments passed to it. Pass this data structure to ->parse_opt() in iplink specific modules: it may be used to get network device name and other information.

[PATCH iproute2-next v2 6/7] iplink: Move data structures to block of their users

2018-02-20 Thread Serhey Popovych
This will consolidate data and code using it in single place and prepare for upcoming ->parse_opt() method change. Signed-off-by: Serhey Popovych --- ip/link_gre.c| 32 ip/link_gre6.c | 32

[PATCH iproute2-next v2 0/7] iplink: Improve iplink_parse()

2018-02-20 Thread Serhey Popovych
This is main routine to parse ip-link(8) configuration parameters. Main reason to improve it is to pass network device @name, @dev and other parameters to kind specific ->parse_opt() function so they can use this information. For example later we will extend iplink_get() to parse netlink

[PATCH iproute2-next v2 4/7] iplink: Follow documented behaviour when "index" is given

2018-02-20 Thread Serhey Popovych
Both ip-link(8) and error message when "index" parameter is given for set/delete case says that index can only be given during network device creation. Follow this documented behaviour and get rid of ambiguous behaviour in case of both "dev" and "index" specified for ip link delete scenario

[PATCH iproute2-next v2 1/7] utils: Introduce and use nodev() helper routine

2018-02-20 Thread Serhey Popovych
There is a couple of places where we report error in case of no network device is found. In all of them we output message in the same format to stderr and either return -1 or 1 to the caller or exit with -1. Introduce new helper function nodev() that takes name of the network device caused error

[PATCH net] amd-xgbe: Restore PCI interrupt enablement setting on resume

2018-02-20 Thread Tom Lendacky
After resuming from suspend, the PCI device support must re-enable the interrupt setting so that interrupts are actually delivered. Signed-off-by: Tom Lendacky --- Please queue this patch up to stable releases 4.14 and above. drivers/net/ethernet/amd/xgbe/xgbe-pci.c |

[PATCH] bpf: hide a possibly unused variable

2018-02-20 Thread Arnd Bergmann
The only user of this variable is inside of an #ifdef, causing a warning without CONFIG_INET: net/core/filter.c: In function 'bpf_sock_ops_cb_flags_set': net/core/filter.c:3382:6: error: unused variable 'val' [-Werror=unused-variable] int val = argval & BPF_SOCK_OPS_ALL_CB_FLAGS; This adds

pull-request: bpf 2018-02-20

2018-02-20 Thread Daniel Borkmann
Hi David, The following pull-request contains BPF updates for your *net* tree. The main changes are: 1) Fix a memory leak in LPM trie's map_free() callback function, where the trie structure itself was not freed since initial implementation. Also a synchronize_rcu() was needed in order to

Re: [RFC PATCH v3 0/3] Enable virtio_net to act as a backup for a passthru device

2018-02-20 Thread Alexander Duyck
On Tue, Feb 20, 2018 at 12:14 PM, Jiri Pirko wrote: > Tue, Feb 20, 2018 at 06:14:32PM CET, sridhar.samudr...@intel.com wrote: >>On 2/20/2018 8:29 AM, Jiri Pirko wrote: >>> Tue, Feb 20, 2018 at 05:04:29PM CET, alexander.du...@gmail.com wrote: >>> > On Tue, Feb 20, 2018 at 2:42

Re: [PATCH iproute2-next 1/8] iplink: Return from function instead of calling exit()

2018-02-20 Thread David Ahern
On 2/20/18 1:44 PM, Roopa Prabhu wrote: > On Tue, Feb 20, 2018 at 12:33 PM, Stephen Hemminger > wrote: >> On Tue, 20 Feb 2018 13:27:21 -0700 >> David Ahern wrote: >> >>> On 2/20/18 1:17 PM, Serhey Popovych wrote: Stephen Hemminger wrote: >

Re: [PATCH net-next 0/6] tcp: remove non GSO code

2018-02-20 Thread Oleksandr Natalenko
On úterý 20. února 2018 21:09:37 CET Eric Dumazet wrote: > Also you can tune your NIC to accept few MSS per GSO/TSO packet > > ip link set dev eth0 gso_max_segs 2 > > So even if TSO/GSO is there, BBR should not use sk->sk_gso_max_segs to > size its bursts, since burt sizes are also impacting GRO

Re: [PATCH iproute2-next 1/8] iplink: Return from function instead of calling exit()

2018-02-20 Thread Serhey Popovych
David Ahern wrote: > On 2/20/18 1:17 PM, Serhey Popovych wrote: >> Stephen Hemminger wrote: >>> On Tue, 20 Feb 2018 21:39:51 +0200 >>> Serhey Popovych wrote: >>> Signed-off-by: Serhey Popovych --- ip/iplink.c | 12 ++--

Re: [PATCH iproute2-next 1/8] iplink: Return from function instead of calling exit()

2018-02-20 Thread Roopa Prabhu
On Tue, Feb 20, 2018 at 12:33 PM, Stephen Hemminger wrote: > On Tue, 20 Feb 2018 13:27:21 -0700 > David Ahern wrote: > >> On 2/20/18 1:17 PM, Serhey Popovych wrote: >> > Stephen Hemminger wrote: >> >> On Tue, 20 Feb 2018 21:39:51 +0200 >> >> Serhey

Re: [PATCH iproute2-next 1/8] iplink: Return from function instead of calling exit()

2018-02-20 Thread Stephen Hemminger
On Tue, 20 Feb 2018 13:27:21 -0700 David Ahern wrote: > On 2/20/18 1:17 PM, Serhey Popovych wrote: > > Stephen Hemminger wrote: > >> On Tue, 20 Feb 2018 21:39:51 +0200 > >> Serhey Popovych wrote: > >> > >>> Signed-off-by: Serhey Popovych

Re: [PATCH] tools/libbpf: Avoid possibly using uninitialized variable

2018-02-20 Thread Daniel Borkmann
On 02/20/2018 02:00 AM, Jeremy Cline wrote: > Fixes a GCC maybe-uninitialized warning introduced by 48cca7e44f9f. > "text" is only initialized inside the if statement so only print debug > info there. > > Signed-off-by: Jeremy Cline Looks good, applied to bpf tree, thanks

Re: [PATCH iproute2-next 1/8] iplink: Return from function instead of calling exit()

2018-02-20 Thread David Ahern
On 2/20/18 1:17 PM, Serhey Popovych wrote: > Stephen Hemminger wrote: >> On Tue, 20 Feb 2018 21:39:51 +0200 >> Serhey Popovych wrote: >> >>> Signed-off-by: Serhey Popovych >>> --- >>> ip/iplink.c | 12 ++-- >>> 1 file changed, 6

Re: [PATCH iproute2-next v2] ip link: add support to display extended tun attributes

2018-02-20 Thread David Ahern
On 2/20/18 11:40 AM, Stephen Hemminger wrote: >>> diff --git a/ip/iptuntap.c b/ip/iptuntap.c >>> index 4628db2832b4..07253870472f 100644 >>> --- a/ip/iptuntap.c >>> +++ b/ip/iptuntap.c >>> @@ -469,3 +469,89 @@ int do_iptuntap(int argc, char **argv) >>> *argv); >>> exit(-1); >>> }

Re: [PATCH iproute2-next] ip: don't colorize the master device

2018-02-20 Thread David Ahern
On 2/20/18 12:08 PM, Stephen Hemminger wrote: > From: Stephen Hemminger > > Putting whole string "master eth0" in the interface name color > is wrong and confusing. Let's just turn color off for all attributes > of device. > > Fixes: d92cc2d087b0 ("ipaddress: ll_map:

Re: [PATCH iproute2-next 1/8] iplink: Return from function instead of calling exit()

2018-02-20 Thread Serhey Popovych
Stephen Hemminger wrote: > On Tue, 20 Feb 2018 21:39:51 +0200 > Serhey Popovych wrote: > >> Signed-off-by: Serhey Popovych >> --- >> ip/iplink.c | 12 ++-- >> 1 file changed, 6 insertions(+), 6 deletions(-) >> >> diff --git

Re: [PATCH iproute2] ip: link_gre6.c: Support IP6_TNL_F_ALLOW_LOCAL_REMOTE flag

2018-02-20 Thread Serhey Popovych
Petr Machata wrote: > For IP-in-IP tunnels, one can specify the [no]allow-localremote command > when configuring a device. Under the hood, this flips the > IP6_TNL_F_ALLOW_LOCAL_REMOTE flag on the netdevice. However, ip6gretap > and ip6erspan devices, where the flag is also relevant, are not

Re: [RFC PATCH v3 0/3] Enable virtio_net to act as a backup for a passthru device

2018-02-20 Thread Jiri Pirko
Tue, Feb 20, 2018 at 06:14:32PM CET, sridhar.samudr...@intel.com wrote: >On 2/20/2018 8:29 AM, Jiri Pirko wrote: >> Tue, Feb 20, 2018 at 05:04:29PM CET, alexander.du...@gmail.com wrote: >> > On Tue, Feb 20, 2018 at 2:42 AM, Jiri Pirko wrote: >> > > Fri, Feb 16, 2018 at

Re: [PATCH iproute2-next 1/8] iplink: Return from function instead of calling exit()

2018-02-20 Thread Stephen Hemminger
On Tue, 20 Feb 2018 21:39:51 +0200 Serhey Popovych wrote: > Signed-off-by: Serhey Popovych > --- > ip/iplink.c | 12 ++-- > 1 file changed, 6 insertions(+), 6 deletions(-) > > diff --git a/ip/iplink.c b/ip/iplink.c > index

  1   2   3   >