Re: [PATCH] macvlan: verify MTU before lowerdev xmit

2017-11-17 Thread Daniel Axtens
Hi Dave, > This is an area where we really haven't set down some clear rules > for behavior. > > If an interface has a particular MTU, it must be able to successfully > send MTU sized packets on that link be it virtual or physical. > > Only a "next hop" can have a different MTU and thus drop

Re: [PATCH] sfp: Add support for DWDM SFP modules

2017-11-17 Thread Russell King - ARM Linux
On Fri, Nov 17, 2017 at 02:58:05PM +0900, David Miller wrote: > From: Jan Kundrát > Date: Wed, 15 Nov 2017 12:39:33 +0100 > > > Without this patch, but with CONFIG_SFP enabled, my NIC won't detect > > module unplugging, which is suboptimal. > > > > I'm using an OEM "Cisco

Re: [PATCH] macvlan: verify MTU before lowerdev xmit

2017-11-17 Thread David Miller
From: Daniel Axtens Date: Fri, 17 Nov 2017 19:34:27 +1100 > Hi Dave, > >> This is an area where we really haven't set down some clear rules >> for behavior. >> >> If an interface has a particular MTU, it must be able to successfully >> send MTU sized packets on that link be it

Re: [PATCH 26/31] nds32: Build infrastructure

2017-11-17 Thread Arnd Bergmann
On Fri, Nov 17, 2017 at 1:39 PM, Greentime Hu wrote: > 2017-11-10 16:26 GMT+08:00 Greentime Hu : >> 2017-11-09 18:33 GMT+08:00 Arnd Bergmann : >>> On Thu, Nov 9, 2017 at 10:02 AM, Greentime Hu wrote: 2017-11-08 18:16

[PATCH v2] net: qcom/emac: extend DMA mask to 46bits

2017-11-17 Thread Wang Dongsheng
Since PTP doesn't support yet, so extend the DMA address to 46bits. When PTP is supported, the dma_mask should be fixed dynamically. Signed-off-by: Wang Dongsheng --- v2: - Changes PATCH subject. - Dynamic fix TPD_BUFFER_ADDR_H_SET size. - Modify DMA MASK to 46bits. - Add

[PATCH] [net] ibmvnic: fix dma_mapping_error call

2017-11-17 Thread Desnes Augusto Nunes do Rosario
This patch fixes the dma_mapping_error call to use the correct dma_addr which is inside the ibmvnic_vpd struct. Moreover, it fixes an uninitialized warning regarding a local dma_addr variable which is not used anymore. Fixes: 4e6759be28e4 ("ibmvnic: Feature implementation of VPD for the ibmvnic

Re: Bisected 4.14 Regression: IPsec transport mode breakage

2017-11-17 Thread Steffen Klassert
On Wed, Nov 15, 2017 at 09:46:19AM -0700, Kevin Locke wrote: > Hi all, > > I am using an L2TP/IPsec (transport mode) VPN connection from a client > behind a NAT running Debian with strongswan 5.6.0-2 and xl2tpd > 1.3.10-1 to a Cisco Meraki MX60 with a public IP. The connection > works with

Re: [PATCH] macvlan: verify MTU before lowerdev xmit

2017-11-17 Thread Daniel Axtens
Hi Dave, > So how exactly do the oversized packets get to the macvlan device from > the VM in this scenerio? That detail seems to be missing from the > diagrams you provided earlier. The VM and the macvlan boxes are just > connected with a line. Inside the VM I'm using netperf talking on an

Re: [PATCH 26/31] nds32: Build infrastructure

2017-11-17 Thread Greentime Hu
2017-11-10 16:26 GMT+08:00 Greentime Hu : > 2017-11-09 18:33 GMT+08:00 Arnd Bergmann : >> On Thu, Nov 9, 2017 at 10:02 AM, Greentime Hu wrote: >>> 2017-11-08 18:16 GMT+08:00 Arnd Bergmann : On Wed, Nov 8, 2017 at 6:55 AM,

Re: [PATCH 26/31] nds32: Build infrastructure

2017-11-17 Thread Greentime Hu
2017-11-17 20:50 GMT+08:00 Arnd Bergmann : > On Fri, Nov 17, 2017 at 1:39 PM, Greentime Hu wrote: >> 2017-11-10 16:26 GMT+08:00 Greentime Hu : >>> 2017-11-09 18:33 GMT+08:00 Arnd Bergmann : On Thu, Nov 9, 2017 at 10:02 AM,

Re: GRO disabled with IPv4 options

2017-11-17 Thread David Miller
From: Willem de Bruijn Date: Fri, 17 Nov 2017 08:51:57 -0500 > ipv6_gro_receive already pulls common ones with ipv6_gso_pull_exthdrs. > And to add a counterpoint: GRO has to be resilient to malformed packets, > so there is value in keeping it simple and limited

Re: [PATCH v2] net: qcom/emac: extend DMA mask to 46bits

2017-11-17 Thread Timur Tabi
On 11/17/17 3:56 AM, Wang Dongsheng wrote: -#define TPD_BUFFER_ADDR_H_SET(tpd, val)BITS_SET((tpd)->word[3], 18, 30, val) +#define TPD_BUFFER_ADDR_H_SET(adpt, tpd, val) BITS_SET((tpd)->word[3], 18, \ + TX_TS_ENABLE & \ +

Product Enquiry

2017-11-17 Thread Carol Merck
Hello, We recently visited your website and we are interested in your models, We will like to make an order from your list of products. However, we would like to see your company's latest catalogs with the; minimum order quantity, delivery time/FOB, payment terms etc. Official order placement

Re: [PATCH] qed: fix unnecessary call to memset cocci warnings

2017-11-17 Thread Andy Shevchenko
On Fri, Nov 17, 2017 at 12:04 AM, Vasyl Gomonovych wrote: > Use kzalloc rather than kmalloc followed by memset with 0 > > drivers/net/ethernet/qlogic/qed/qed_dcbx.c:1280:13-20: WARNING: > kzalloc should be used for dcbx_info, instead of kmalloc/memset > Generated by:

Re: [PATCH] sfp: Add support for DWDM SFP modules

2017-11-17 Thread David Miller
From: Russell King - ARM Linux Date: Fri, 17 Nov 2017 09:52:10 + > I already have a stack of patches for phy, phylink and sfp that I > need to send, including documentation patches which Florian has > already found very useful and helpful. I had assumed that net-next

[PATCH net-next v2 2/2] net: thunderx: add timestamping support

2017-11-17 Thread Aleksey Makarov
From: Sunil Goutham This adds timestamping support for both receive and transmit paths. On the receive side no filters are supported i.e either all pkts will get a timestamp appended infront of the packet or none. On the transmit side HW doesn't support timestamp insertion

[PATCH net-next v2 1/2] net: add support for Cavium PTP coprocessor

2017-11-17 Thread Aleksey Makarov
From: Radoslaw Biernacki This patch adds support for the Precision Time Protocol Clocks and Timestamping hardware found on Cavium ThunderX processors. Signed-off-by: Radoslaw Biernacki Signed-off-by: Aleksey Makarov ---

[PATCH net-next v2 0/2] net: thunderx: add support for PTP clock

2017-11-17 Thread Aleksey Makarov
This series adds support for IEEE 1588 Precision Time Protocol to Cavium ethernet driver. The first patch adds support for the Precision Time Protocol Clocks and Timestamping coprocessor (PTP) found on Cavium processors. It registers a new PTP clock in the PTP core and provides functions to use

Re: regression: UFO removal breaks kvm live migration

2017-11-17 Thread Willem de Bruijn
On Fri, Nov 10, 2017 at 12:32 AM, Willem de Bruijn wrote: > On Wed, Nov 8, 2017 at 9:53 PM, Jason Wang wrote: >> >> >> On 2017年11月08日 20:32, David Miller wrote: >>> >>> From: Jason Wang >>> Date: Wed, 8 Nov 2017 17:25:48

Re: regression: UFO removal breaks kvm live migration

2017-11-17 Thread Willem de Bruijn
>> Okay, I will send a patch to reinstate UFO for this use case (only). There >> is some related work in tap_handle_frame and packet_direct_xmit to >> segment directly in the device. I will be traveling the next few days, so >> it won't be in time for 4.14 (but can go in stable later, of course).

Re: [PATCH] net: usb: hso.c: remove unneeded DRIVER_LICENSE #define

2017-11-17 Thread Philippe Ombredanne
On Fri, Nov 17, 2017 at 3:19 PM, Greg Kroah-Hartman wrote: > There is no need to #define the license of the driver, just put it in > the MODULE_LICENSE() line directly as a text string. > > This allows tools that check that the module license matches the source > code

Re: [PATCH net] sctp: set frag_point in sctp_setsockopt_maxseg correctly

2017-11-17 Thread Marcelo Ricardo Leitner
On Fri, Nov 17, 2017 at 02:11:11PM +0800, Xin Long wrote: > Now in sctp_setsockopt_maxseg user_frag or frag_point can be set with > val >= 8 and val <= SCTP_MAX_CHUNK_LEN. But both checks are incorrect. > > val >= 8 means frag_point can even be less than SCTP_DEFAULT_MINSEGMENT. > Then in

Re: [PATCH net] sctp: report SCTP_ERROR_INV_STRM as cpu endian

2017-11-17 Thread Marcelo Ricardo Leitner
On Fri, Nov 17, 2017 at 02:15:02PM +0800, Xin Long wrote: > rfc6458 demands the send_error in SCTP_SEND_FAILED_EVENT should > be in cpu endian, while SCTP_ERROR_INV_STRM is in big endian. > > This issue is there since very beginning, Eric noticed it by > running 'make C=2 M=net/sctp/'. > > This

Re: GRO disabled with IPv4 options

2017-11-17 Thread Willem de Bruijn
On Thu, Nov 16, 2017 at 5:47 PM, Tom Herbert wrote: > On Thu, Nov 16, 2017 at 1:40 PM, Herbert Xu > wrote: >> On Thu, Nov 16, 2017 at 04:12:43PM +0100, Cristian Klein wrote: >>> >>> Does somebody know the rationale for this? Is it because IPv4

Re: [PATCH] ARM64: dts: meson-axg: add ethernet mac controller

2017-11-17 Thread Neil Armstrong
On 13/11/2017 09:01, Yixun Lan wrote: > Add DT info for the stmmac ethernet MAC which found in > the Amlogic's Meson-AXG SoC, also describe the ethernet > pinctrl & clock information here. > > This is tested in the S400 dev board which use a RTL8211F PHY, > and the pins connect to the

Re: [PATCH 26/31] nds32: Build infrastructure

2017-11-17 Thread Greentime Hu
2017-11-16 18:25 GMT+08:00 Arnd Bergmann : > On Thu, Nov 16, 2017 at 11:03 AM, Greentime Hu wrote: >> 2017-11-13 18:45 GMT+08:00 Geert Uytterhoeven : >>> Given the checks for __NDS32_EB__, NDS32 can be either big or little endian, >>> so

Re: [PATCH] net: bridge: add max_fdb_count

2017-11-17 Thread Andrew Lunn
> Usually it's better to apply LRU or random here in my opinion, as the > new entry is much more likely to be needed than older ones by definition. Hi Willy I think this depends on why you need to discard. If it is normal operation and the limits are simply too low, i would agree. If however it

[PATCH] net: usb: hso.c: remove unneeded DRIVER_LICENSE #define

2017-11-17 Thread Greg Kroah-Hartman
There is no need to #define the license of the driver, just put it in the MODULE_LICENSE() line directly as a text string. This allows tools that check that the module license matches the source code license to work properly, as there is no need to unwind the unneeded dereference. Cc: "David S.

[PATCH RFC 15/25] net: Move netlink_net_ops to pernet_sys list

2017-11-17 Thread Kirill Tkhai
According to net/core/Makefile, net/core/af_netlink.o core initcalls execute right after net/core/net_namespace.o. The methods of netlink_net_ops create and destroy "netlink" file, which are not interested for foreigh pernet_operations. So, netlink_net_ops may safely be moved to pernet_sys list.

[PATCH RFC 09/25] net: Move net_ns_ops to pernet_sys list

2017-11-17 Thread Kirill Tkhai
This patch starts to convert pernet_subsys, registered from pure initcalls. Since net_ns_init() is the only pure initcall in net subsystem, and there is no early initcalls; the pernet subsys, it registers, is the first in pernet_operations list. So, we start with it.

[PATCH RFC 12/25] net: Move nf_log_net_ops to pernet_sys list

2017-11-17 Thread Kirill Tkhai
nf_log_net_ops are registered the same initcall as netfilter_net_ops, so they has to be moved right after netfilter_net_ops. The ops would have had a problem in parallel execution with others, if init_net had been possible to released. But it's not, and the rest is safe for that. There is memory

[PATCH RFC 06/25] net: Add pernet sys and registration functions

2017-11-17 Thread Kirill Tkhai
This is a new sublist of pernet_list, which will live ahead of already existing: sys, subsys, device. It's aimed for subsystems, which pernet_operations may execute in parallel with any other's pernet_operations. In further, step-by-step we will move all subsys there, adding necessary small

[PATCH RFC 03/25] net: Introduce net_sem for protection of pernet_list

2017-11-17 Thread Kirill Tkhai
Curently mutex is used to protect pernet operations list. It makes cleanup_net() to execute ->exit methods of the same operations set, which was used on the time of ->init, even after net namespace is unlinked from net_namespace_list. But the problem is it's need to synchronize_rcu() after net is

[PATCH RFC 04/25] net: Move mutex_unlock() in cleanup_net() up

2017-11-17 Thread Kirill Tkhai
net_sem protects from pernet_list changing, while ops_free_list() makes simple kfree(), and it can't race with other pernet_operations callbacks. So we may release net_mutex earlier then it was. Signed-off-by: Kirill Tkhai --- net/core/net_namespace.c |3 ++- 1 file

[PATCH RFC 11/25] net: Move netfilter_net_ops to pernet_sys list

2017-11-17 Thread Kirill Tkhai
Since net/socket.o is the first linked file in net/Makefile, its core initcalls execute the first. netfilter_net_ops is executed right after sysctl_pernet_ops. Methods netfilter_net_init() and netfilter_net_exit() initialize net::nf::hooks and change net-related proc directory of net. Another

Re: [PATCH] net: Convert net_mutex into rw_semaphore and down read it on net->init/->exit

2017-11-17 Thread Kirill Tkhai
On 15.11.2017 19:31, Eric W. Biederman wrote: > Kirill Tkhai writes: > >> On 15.11.2017 12:51, Kirill Tkhai wrote: >>> On 15.11.2017 06:19, Eric W. Biederman wrote: Kirill Tkhai writes: > On 14.11.2017 21:39, Cong Wang wrote: >> On

Re: [PATCH v1 net-next 0/7] net: dsa: microchip: Modify KSZ9477 DSA driver in preparation to add other KSZ switch drivers

2017-11-17 Thread Andrew Lunn
> I really need to monitor the DSA discussion to better contribute to its > success. > I just found out the DSA API set_addr was removed last month due to not > everybody is using it. It cited the Marvell switch was the only switch using > that > API and found a new way to program the MAC

Re: [patch net-next RFC v2 00/11] Add support for resource abstraction

2017-11-17 Thread David Ahern
On 11/14/17 9:18 AM, Jiri Pirko wrote: > From: Jiri Pirko > > Arkadi says: > > Many of the ASIC's internal resources are limited and are shared between > several hardware procedures. For example, unified hash-based memory can > be used for many lookup purposes, like FDB and

[PATCH RFC 13/25] net: Move net_inuse_ops to pernet_sys list

2017-11-17 Thread Kirill Tkhai
net/core/sock.o is the first linked file in net/core/Makefile, so its core initcall executes the first in the directory. net_inuse_ops methods expose statistics in /proc. No one from the rest of pernet_subsys or pernet_device lists does not touch net::core::inuse. So, it's safe to move

[PATCH RFC 21/25] net: Move fib_* pernet_operations, registered via subsys_initcall(), to pernet_sys list

2017-11-17 Thread Kirill Tkhai
Both of them create and initialize lists, which are not touched by another foreing pernet_operations. Signed-off-by: Kirill Tkhai --- net/core/fib_notifier.c |2 +- net/core/fib_rules.c|2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git

[PATCH RFC 19/25] net: Move proto_net_ops to pernet_sys list

2017-11-17 Thread Kirill Tkhai
This patch starts to convert pernet_subsys, registered from subsys initcalls. According to net/Makefile and net/core/Makefile, this is the first exected subsys_initcall(), registering pernet_subsys. It seems to be executed in parallel with others, as it's only creates/destoyes proc entry, which

[PATCH RFC 22/25] net: Move subsys_initcall() registered pernet_operations from net/sched to pernet_sys list

2017-11-17 Thread Kirill Tkhai
psched_net_ops only creates and destroyes /proc entry, and safe to be executed in parallel with any foreigh pernet_operations. tcf_action_net_ops initializes and destructs tcf_action_net::egdev_ht, which is not touched by foreign pernet_operations. So, move them to pernet_sys list.

[PATCH RFC 14/25] net: Move net_defaults_ops to pernet_sys list

2017-11-17 Thread Kirill Tkhai
According to net/core/Makefile, net/core/net_namespace.o core initcalls execute right after net/core/sock.o. net_defaults_ops introduces only net_defaults_init_net method, and it acts on net::core::sysctl_somaxconn, which is not interested the rest of pernet_subsys and pernet_device lists. Then,

[PATCH RFC 24/25] net: Move wext_pernet_ops to pernet_sys list

2017-11-17 Thread Kirill Tkhai
These pernet_operations initialize and purge net::wext_nlevents queue, and are not touched by foreign pernet_operations. Signed-off-by: Kirill Tkhai --- net/wireless/wext-core.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/wireless/wext-core.c

[PATCH RFC 18/25] net: Move uevent_net_ops to pernet_sys list

2017-11-17 Thread Kirill Tkhai
This postcore_initcall() created pernet_operations are registered from ./lib directory, and they have to go right after audit_net_ops. uevent_net_init() and uevent_net_exit() create and destroy netlink socket, and these actions serialized in netlink code. Parallel execution with other

[PATCH RFC 17/25] net: Move audit_net_ops to pernet_sys list

2017-11-17 Thread Kirill Tkhai
This patch starts to convert pernet_subsys, registered from postcore initcalls. These pernet_operations are in ./kernel directory, and there are only one more postcore in ./lib. So, audit_net_ops have to go the first. audit_net_init() creates netlink socket, while audit_net_exit() destroys it.

[PATCH RFC 25/25] net: Move sysctl_core_ops to pernet_sys list

2017-11-17 Thread Kirill Tkhai
These pernet_operations register and destroy sysctl directory, and it's not interested for foreign pernet_operations. Signed-off-by: Kirill Tkhai --- net/core/sysctl_net_core.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

Re: [PATCH] net: Convert net_mutex into rw_semaphore and down read it on net->init/->exit

2017-11-17 Thread Eric W. Biederman
Kirill Tkhai writes: > On 15.11.2017 19:29, Eric W. Biederman wrote: >> Kirill Tkhai writes: >> >>> On 15.11.2017 09:25, Eric W. Biederman wrote: Kirill Tkhai writes: > Curently mutex is used to protect pernet

RE: [PATCH v1 net-next 0/7] net: dsa: microchip: Modify KSZ9477 DSA driver in preparation to add other KSZ switch drivers

2017-11-17 Thread Tristram.Ha
> On Thu, Nov 16, 2017 at 06:41:24PM -0800, tristram...@microchip.com > wrote: > > From: Tristram Ha > > > > This series of patches is to modify the original KSZ9477 DSA driver so > > that other KSZ switch drivers can be added and use the common code. > > Hi Tristram >

Re: [PATCH v10 5/8] ARM: dts: sunxi: Restore EMAC changes (boards)

2017-11-17 Thread Philipp Rossak
Hey, Sorry for the bringing this up again. Isn't there a: ethernet0 = for some boards missing? Best, Philipp (Sorry for sending this to some persons more than once! My Thunderbird sent mails in html and didn't reach the mailing lists. I hope it works now :) ) On 31.10.2017 09:19, Corentin

[PATCH RFC 08/25] net: Move proc_net_ns_ops to pernet_sys list

2017-11-17 Thread Kirill Tkhai
This patch starts to convert pernet_subsys, registered from before initcalls. Since proc_net_ns_ops is registered pernet_subsys, made from: start_kernel()->proc_root_init()->proc_net_init(), and there is no a pernet_subsys, which is registered earlier, we start from it.

[PATCH RFC 07/25] net: Make sys sublist pernet_operations executed out of net_mutex

2017-11-17 Thread Kirill Tkhai
Move net_mutex to setup_net() and cleanup_net(), and do not hold it, while sys sublist methods are executed. Signed-off-by: Kirill Tkhai --- net/core/net_namespace.c | 44 +++- 1 file changed, 35 insertions(+), 9 deletions(-) diff

[PATCH RFC 01/25] net: Assign net to net_namespace_list in setup_net()

2017-11-17 Thread Kirill Tkhai
This patch merges two repeating pieces of code in one, and they will live in setup_net() now. It acts as cleanup even despite init_net_initialized assignment is reordered with the linking of net now. This variable is need for proc_net_init() called from:

[PATCH RFC 02/25] net: Cleanup copy_net_ns()

2017-11-17 Thread Kirill Tkhai
Line up destructors actions in the revers order to constructors. Next patches will add more actions, and this will be comfortable, if there is the such order. Signed-off-by: Kirill Tkhai --- net/core/net_namespace.c | 20 +--- 1 file changed, 9

[PATCH RFC 10/25] net: Move sysctl_pernet_ops to pernet_sys list

2017-11-17 Thread Kirill Tkhai
This patch starts to convert pernet_subsys, registered from core initcalls. Since net/socket.o is the first linked file in net/Makefile, its core initcalls execute the first. sysctl_pernet_ops is the first pernet_subsys, registered from sock_init(), so it goes ahead of others, registered via

[PATCH RFC 16/25] net: Move rtnetlink_net_ops to pernet_sys list

2017-11-17 Thread Kirill Tkhai
rtnetlink_net_ops are added the same core initcall as netlink_net_ops, so they has to be added right after netlink_net_ops. rtnetlink_net_init() and rtnetlink_net_exit() create and destroy netlink socket. It looks like, another pernet_operations are not interested in foreiner net::rtnl, so

Re: [PATCH] net: bridge: add max_fdb_count

2017-11-17 Thread Willy Tarreau
Hi Andrew, On Fri, Nov 17, 2017 at 03:06:23PM +0100, Andrew Lunn wrote: > > Usually it's better to apply LRU or random here in my opinion, as the > > new entry is much more likely to be needed than older ones by definition. > > Hi Willy > > I think this depends on why you need to discard. If it

[PATCH RFC 23/25] net: Move genl_pernet_ops to pernet_sys list

2017-11-17 Thread Kirill Tkhai
This pernet_operations create and destroy net::genl_sock. Foreign pernet_operations don't touch it. Signed-off-by: Kirill Tkhai --- net/netlink/genetlink.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/netlink/genetlink.c

[PATCH RFC 20/25] net: Move pernet_subsys, registered via net_dev_init(), to pernet_sys list

2017-11-17 Thread Kirill Tkhai
net/core/dev.o is lined after net/core/sock.o. There are: 1)dev_proc_ops and dev_mc_net_ops, which create and destroy pernet proc file and not interested to another net namespaces; 2)netdev_net_ops, which creates pernet hash, which is not touched by another pernet_operations. So, move it to

[PATCH RFC 05/25] net: Add primitives to update heads of pernet_list sublists

2017-11-17 Thread Kirill Tkhai
Currently we have first_device, and device and subsys sublists. Next patches introduce one more sublist. So, move the functionality, which will be repeating, to the primitives. Signed-off-by: Kirill Tkhai --- net/core/net_namespace.c | 19 +++ 1 file

Re: [PATCH] net: Convert net_mutex into rw_semaphore and down read it on net->init/->exit

2017-11-17 Thread Eric W. Biederman
Kirill Tkhai writes: > On 15.11.2017 19:31, Eric W. Biederman wrote: >> Kirill Tkhai writes: >> >>> On 15.11.2017 12:51, Kirill Tkhai wrote: On 15.11.2017 06:19, Eric W. Biederman wrote: > Kirill Tkhai writes: >

Re: [PATCH] net: Convert net_mutex into rw_semaphore and down read it on net->init/->exit

2017-11-17 Thread Kirill Tkhai
On 15.11.2017 19:29, Eric W. Biederman wrote: > Kirill Tkhai writes: > >> On 15.11.2017 09:25, Eric W. Biederman wrote: >>> Kirill Tkhai writes: >>> Curently mutex is used to protect pernet operations list. It makes cleanup_net() to execute

[PATCH 3/4] bpf: add a bpf_override_function helper

2017-11-17 Thread Josef Bacik
From: Josef Bacik Error injection is sloppy and very ad-hoc. BPF could fill this niche perfectly with it's kprobe functionality. We could make sure errors are only triggered in specific call chains that we care about with very specific situations. Accomplish this with the

[PATCH 4/4] samples/bpf: add a test for bpf_override_return

2017-11-17 Thread Josef Bacik
From: Josef Bacik This adds a basic test for bpf_override_return to verify it works. We override the main function for mounting a btrfs fs so it'll return -ENOMEM and then make sure that trying to mount a btrfs fs will fail. Acked-by: Alexei Starovoitov

[PATCH 1/4] add infrastructure for tagging functions as error injectable

2017-11-17 Thread Josef Bacik
From: Josef Bacik Using BPF we can override kprob'ed functions and return arbitrary values. Obviously this can be a bit unsafe, so make this feature opt-in for functions. Simply tag a function with KPROBE_ERROR_INJECT_SYMBOL in order to give BPF access to that function for error

[PATCH 2/2] ip6_tunnel: pass tun_dst arg from ip6_tnl_rcv() to __ip6_tnl_rcv()

2017-11-17 Thread Alexey Kodanev
Otherwise tun_dst argument is unused there. Currently, ip6_tnl_rcv() invoked with tun_dst set to NULL, so there is no actual functional changes introduced in this patch. Fixes: 0d3c703a9d17 ("ipv6: Cleanup IPv6 tunnel receive path") Signed-off-by: Alexey Kodanev ---

[PATCH 1/2] gre6: use log_ecn_error module parameter in ip6_tnl_rcv()

2017-11-17 Thread Alexey Kodanev
After commit 308edfdf1563 ("gre6: Cleanup GREv6 receive path, call common GRE functions") it's not used anywhere in the module, but previously was used in ip6gre_rcv(). Fixes: 308edfdf1563 ("gre6: Cleanup GREv6 receive path, call common GRE functions") Signed-off-by: Alexey Kodanev

Re: [PATCH][v4] uprobes/x86: emulate push insns for uprobe on x86

2017-11-17 Thread Yonghong Song
On 11/17/17 9:25 AM, Oleg Nesterov wrote: On 11/15, Yonghong Song wrote: v3 -> v4: . Revert most of v3 change as 32bit emulation is not really working on x86_64 platform as among other issues, function emulate_push_stack() needs to account for 32bit app on 64bit platform. A

Re: [PATCH][v4] uprobes/x86: emulate push insns for uprobe on x86

2017-11-17 Thread Oleg Nesterov
On 11/15, Yonghong Song wrote: > > v3 -> v4: > . Revert most of v3 change as 32bit emulation is not really working > on x86_64 platform as among other issues, function emulate_push_stack() > needs to account for 32bit app on 64bit platform. > A separate effort is ongoing to address

Re: Bisected 4.14 Regression: IPsec transport mode breakage

2017-11-17 Thread Kevin Locke
On Fri, 2017-11-17 at 11:03 +0100, Steffen Klassert wrote: > On Wed, Nov 15, 2017 at 09:46:19AM -0700, Kevin Locke wrote: >> I have bisected the issue to commit c9f3f813d462. I have attached the >> client ipsec.conf as well as the syslog during the connection attempt >> for both c9f3f813d462

[PATCH 0/4][v6] Add the ability to do BPF directed error injection

2017-11-17 Thread Josef Bacik
I've reworked this to be opt-in only as per Igno and Alexei. Still needs to go through Dave because of the bpf bits, but I need tracing guys to weigh in and sign off on my approach please. v5->v6: - add BPF_ALLOW_ERROR_INJECTION() tagging for functions that will support this feature. This way

[PATCH 2/4] btrfs: make open_ctree error injectable

2017-11-17 Thread Josef Bacik
From: Josef Bacik This allows us to do error injection with BPF for open_ctree. Signed-off-by: Josef Bacik --- fs/btrfs/disk-io.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c index dfdab849037b..c6b4e1f07072 100644

[PATCH RFC 00/25] Replacing net_mutex with rw_semaphore

2017-11-17 Thread Kirill Tkhai
Hi, this is continuation of discussion from here: https://lkml.org/lkml/2017/11/14/298 The plan has changed a little bit, so I'd be happy to hear people's comments, before I dived into all 400+ pernet subsys and devices. The patch set adds pernet sys list ahead of subsys and device, and it's

[PATCH net-next 1/2] net-next: use five-tuple hash for sk_txhash

2017-11-17 Thread Shaohua Li
From: Shaohua Li We are using sk_txhash to calculate flowlabel, but sk_txhash isn't always available, for example, in inet_timewait_sock. This causes problem for reset packet, which will have a different flowlabel. This causes our router doesn't correctly close tcp connection. We

[PATCH net-next 0/2] net: fix flowlabel inconsistency in reset packet

2017-11-17 Thread Shaohua Li
From: Shaohua Li Hi, Please see below tcpdump output: 21:00:48.109122 IP6 (flowlabel 0x43304, hlim 64, next-header TCP (6) payload length: 40) fec0::5054:ff:fe12:3456.55804 > fec0::5054:ff:fe12:3456.: Flags [S], cksum 0x0529 (incorrect -> 0xf56c), seq 3282214508, win 43690,

[PATCH net-next 2/2] net-next: copy user configured flowlabel to reset packet

2017-11-17 Thread Shaohua Li
From: Shaohua Li Reset packet doesn't use user configured flowlabel, instead, it always uses 0. This will cause inconsistency for flowlabel. tw sock already records flowlabel info, so we can directly use it. Cc: Martin KaFai Lau Cc: Eric Dumazet

[PATCH iproute2/net-next v3]tc: B.W limits can now be specified in %.

2017-11-17 Thread Nishanth Devarajan
This patch adapts the tc command line interface to allow bandwidth limits to be specified as a percentage of the interface's capacity. Adding this functionality requires passing the specified device string to each class/qdisc which changes the prototype for a couple of functions: the .parse_qopt

Re: [PATCH] net: Convert net_mutex into rw_semaphore and down read it on net->init/->exit

2017-11-17 Thread Kirill Tkhai
On 17.11.2017 21:52, Eric W. Biederman wrote: > Kirill Tkhai writes: > >> On 15.11.2017 19:31, Eric W. Biederman wrote: >>> Kirill Tkhai writes: >>> On 15.11.2017 12:51, Kirill Tkhai wrote: > On 15.11.2017 06:19, Eric W. Biederman wrote:

Re: [PATCH iproute2/net-next v3]tc: B.W limits can now be specified in %.

2017-11-17 Thread Stephen Hemminger
On Sat, 18 Nov 2017 02:13:38 +0530 Nishanth Devarajan wrote: > + result = strtoul(buf, , 0); > + > + if (*endp || buf == endp) { > + fprintf(stderr, "value \"%s\" in file %s is not a number\n", > + buf, fname); > + goto out;

Re: [pull request][net V2 0/5] Mellanox, mlx5 fixes 2017-11-08

2017-11-17 Thread Saeed Mahameed
On Sat, Nov 11, 2017 at 2:42 AM, David Miller wrote: > From: Saeed Mahameed > Date: Fri, 10 Nov 2017 15:50:15 +0900 > >> The follwoing series includes some fixes for mlx5 core and etherent >> driver. >> >> Sorry for the late submission but as you can see

[PATCH iproute2] tc: cleanup qdisc arg parsing

2017-11-17 Thread Stephen Hemminger
The qdisc arg parsing has magic limit of 16 for class which is not required by kernel. Also the limit of 16 for device name is really IFNAMSIZ. Signed-off-by: Stephen Hemminger --- tc/tc_qdisc.c | 21 + 1 file changed, 9 insertions(+), 12

Re: [PATCH] net: Convert net_mutex into rw_semaphore and down read it on net->init/->exit

2017-11-17 Thread Kirill Tkhai
On 17.11.2017 21:54, Eric W. Biederman wrote: > Kirill Tkhai writes: > >> On 15.11.2017 19:29, Eric W. Biederman wrote: >>> Kirill Tkhai writes: >>> On 15.11.2017 09:25, Eric W. Biederman wrote: > Kirill Tkhai writes:

[PATCH] usbnet: ipheth: fix potential null pointer dereference in ipheth_carrier_set

2017-11-17 Thread Gustavo A. R. Silva
_dev_ is being dereferenced before it is null checked, hence there is a potential null pointer dereference. Fix this by moving the pointer dereference after _dev_ has been null checked. Addresses-Coverity-ID: 1462020 Fixes: bb1b40c7cb86 ("usbnet: ipheth: prevent TX queue timeouts when device not

Re: [PATCH iproute2/net-next v3]tc: B.W limits can now be specified in %.

2017-11-17 Thread Stephen Hemminger
On Sat, 18 Nov 2017 02:13:38 +0530 Nishanth Devarajan wrote: > diff --git a/tc/tc_util.h b/tc/tc_util.h > index 583a21a..7b7420a 100644 > --- a/tc/tc_util.h > +++ b/tc/tc_util.h > @@ -24,14 +24,14 @@ struct qdisc_util { > struct qdisc_util *next; > const char

Re: [PATCH 2/4] btrfs: make open_ctree error injectable

2017-11-17 Thread Ingo Molnar
* Josef Bacik wrote: > From: Josef Bacik > > This allows us to do error injection with BPF for open_ctree. > > Signed-off-by: Josef Bacik > --- > fs/btrfs/disk-io.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git

Re: [PATCH net] tcp: when scheduling TLP, time of RTO should account for current ACK

2017-11-17 Thread Soheil Hassas Yeganeh
On Fri, Nov 17, 2017 at 9:06 PM, Neal Cardwell wrote: > > Fix the TLP scheduling logic so that when scheduling a TLP probe, we > ensure that the estimated time at which an RTO would fire accounts for > the fact that ACKs indicating forward progress should push back RTO >

Re: [PATCH] net: bridge: add max_fdb_count

2017-11-17 Thread Nikolay Aleksandrov
On 17/11/17 08:14, Nikolay Aleksandrov wrote: > On 17/11/17 07:26, Willy Tarreau wrote: >> Hi Stephen, >> >> On Thu, Nov 16, 2017 at 04:27:18PM -0800, Stephen Hemminger wrote: >>> On Thu, 16 Nov 2017 21:21:55 +0100 >>> Vincent Bernat wrote: >>> ? 16 novembre 2017 20:23

Re: [PATCH] qed: fix unnecessary call to memset cocci warnings

2017-11-17 Thread David Miller
From: Vasyl Gomonovych Date: Thu, 16 Nov 2017 23:04:08 +0100 > Use kzalloc rather than kmalloc followed by memset with 0 > > drivers/net/ethernet/qlogic/qed/qed_dcbx.c:1280:13-20: WARNING: > kzalloc should be used for dcbx_info, instead of kmalloc/memset > Generated by:

Re: [PATCH net] sctp: set frag_point in sctp_setsockopt_maxseg correctly

2017-11-17 Thread David Miller
From: Xin Long Date: Fri, 17 Nov 2017 14:11:11 +0800 > Now in sctp_setsockopt_maxseg user_frag or frag_point can be set with > val >= 8 and val <= SCTP_MAX_CHUNK_LEN. But both checks are incorrect. > > val >= 8 means frag_point can even be less than

Re: [PATCH net] route: update fnhe_expires for redirect when the fnhe exists

2017-11-17 Thread David Miller
From: Xin Long Date: Fri, 17 Nov 2017 14:27:06 +0800 > Now when creating fnhe for redirect, it sets fnhe_expires for this > new route cache. But when updating the exist one, it doesn't do it. > It will cause this fnhe never to be expired. > > Paolo already noticed it

Re: [PATCH net] route: also update fnhe_genid when updating a route cache

2017-11-17 Thread David Miller
From: Xin Long Date: Fri, 17 Nov 2017 14:27:18 +0800 > Now when ip route flush cache and it turn out all fnhe_genid != genid. > If a redirect/pmtu icmp packet comes and the old fnhe is found and all > it's members but fnhe_genid will be updated. > > Then next time when it

Re: [PATCH] net/netlabel: Add list_next_rcu() in rcu_dereference().

2017-11-17 Thread David Miller
From: Tim Hansen Date: Thu, 16 Nov 2017 12:03:34 -0500 > Add list_next_rcu() for fetching next list in rcu_deference safely. > > Found with sparse in linux-next tree on tag next-20171116. > > Signed-off-by: Tim Hansen Applied.

Re: [PATCH] net: usb: hso.c: remove unneeded DRIVER_LICENSE #define

2017-11-17 Thread David Miller
From: Greg Kroah-Hartman Date: Fri, 17 Nov 2017 15:19:39 +0100 > There is no need to #define the license of the driver, just put it in > the MODULE_LICENSE() line directly as a text string. > > This allows tools that check that the module license matches the source >

Re: [PATCH] [net] ibmvnic: fix dma_mapping_error call

2017-11-17 Thread David Miller
From: Desnes Augusto Nunes do Rosario Date: Fri, 17 Nov 2017 09:09:04 -0200 > This patch fixes the dma_mapping_error call to use the correct dma_addr > which is inside the ibmvnic_vpd struct. Moreover, it fixes an uninitialized > warning regarding a local dma_addr

Re: [PATCH net v2 1/1] ipvlan: NULL pointer dereference panic in ipvlan_port_destroy

2017-11-17 Thread David Miller
From: Girish Moodalbail Date: Thu, 16 Nov 2017 23:16:17 -0800 > When call to register_netdevice() (called from ipvlan_link_new()) fails, > we call ipvlan_uninit() (through ndo_uninit()) to destroy the ipvlan > port. After returning unsuccessfully from

Re: [PATCH net] net: accept UFO datagrams from tuntap and packet

2017-11-17 Thread David Miller
From: Willem de Bruijn Date: Fri, 17 Nov 2017 17:59:13 -0500 > Tuntap and similar devices can inject GSO packets. Accept type > VIRTIO_NET_HDR_GSO_UDP, even though not generating UFO natively. > > Processes are expected to use feature negotiation such as

Re: iproute2: make ip route list to search by metric too

2017-11-17 Thread Alexander Zubkov
Hello again, Things turned out to be not so hard. Please take a look at the attached patch. I'm only not sure if RTA_PRIORITY is enough. Because the print_route function prints "metric" also for some situations with RTA_METRICS, which I haven't managed to understand. On Fri, Nov 17, 2017 at 1:40

Re: [PATCH 7/8] net: ovs: remove unused hardirq.h

2017-11-17 Thread Yang Shi
It looks the email address of Pravin in MAINTAINERS file is obsolete, sent to the right address. Yang On 11/17/17 3:02 PM, Yang Shi wrote: Preempt counter APIs have been split out, currently, hardirq.h just includes irq_enter/exit APIs which are not used by openvswitch at all. So, remove

[GIT] Networking

2017-11-17 Thread David Miller
1) Revert regression inducing change to the IPSEC template resolver, from Steffen Klassert. 2) Peeloffs can cause the wrong sk to be waken up in SCTP, fix from Xin Long. 3) Min packet MTU size is wrong in cpsw driver, from Grygorii Strashko. 4) Fix build failure in netfilter ctnetlink,

[PATCH net] tcp: when scheduling TLP, time of RTO should account for current ACK

2017-11-17 Thread Neal Cardwell
Fix the TLP scheduling logic so that when scheduling a TLP probe, we ensure that the estimated time at which an RTO would fire accounts for the fact that ACKs indicating forward progress should push back RTO times. After the following fix: df92c8394e6e ("tcp: fix xmit timer to only be reset if

  1   2   >