Re: [PATCH net v2] net: bridge: Fix ethernet header pointer before check skb forwardable

2019-01-14 Thread Toshiaki Makita
On 2019/01/15 12:12, wangyunjian wrote: > From: Yunjian Wang > > The skb header should be set to ethernet header before using > is_skb_forwardable. Because the ethernet header length has been > considered in is_skb_forwardable(including dev->hard_header_len > length). > > To reproduce the issue:

Re: [RFC net-next 0/6] devlink: add device (driver) information API

2019-01-14 Thread Michal Kubecek
On Mon, Jan 14, 2019 at 07:27:34PM -0800, Jakub Kicinski wrote: > On Tue, 15 Jan 2019 02:57:55 +0100, Andrew Lunn wrote: > > > > Using that argument, you should probably make the devlink core call > > the ethtool .get_drvinfo op if the device does not implement the > > devlink op. > > Could it po

Re: [PATCH net V3] vhost: log dirty page correctly

2019-01-14 Thread Jason Wang
On 2019/1/15 上午2:04, Michael S. Tsirkin wrote: On Fri, Jan 11, 2019 at 12:00:36PM +0800, Jason Wang wrote: Vhost dirty page logging API is designed to sync through GPA. But we try to log GIOVA when device IOTLB is enabled. This is wrong and may lead to missing data after migration. To solve t

Re: [PATCH v3] vrf: Fix conntrack-dnat conflict in vrf-device PREROUTING hook

2019-01-14 Thread Pablo Neira Ayuso
On Mon, Jan 14, 2019 at 11:15:10PM +0100, Florian Westphal wrote: > Pablo Neira Ayuso wrote: > > On Sat, Jan 12, 2019 at 08:03:19AM +0800, we...@ucloud.cn wrote: > > > From: wenxu > > > > > > In the ip_rcv the skb go through the PREROUTING hook first, > > > Then jump in vrf device go through the

Re: [PATCH] libceph: protect pending flags in ceph_con_keepalive()

2019-01-14 Thread Myungho Jung
On Mon, Jan 14, 2019 at 09:37:25PM +0100, Ilya Dryomov wrote: > On Thu, Jan 3, 2019 at 4:50 AM Myungho Jung wrote: > > I reproduced on vm using syzkaller utils and verified the fix by syzbot. > > Hi Myungho, > > I think this might be a better fix: > > diff --git a/net/ceph/messenger.c b/net/cep

Re: Question about default m88e1510 LED configuration of marvell phy

2019-01-14 Thread shenjian (K)
在 2019/1/15 11:39, Andrew Lunn 写道: > On Tue, Jan 15, 2019 at 11:07:17AM +0800, shenjian (K) wrote: >> Hi, all >> We encounted a problem when using the marvel 88e151x phy driver, the >> link(LED[0])/ack(LED[1]) leds worked abnormally since we updated our kernel >> to v4.19. >> The act led k

Re: [PATCH v1 1/1] veth: Do not drop packets larger then the mtu set on the receiving side

2019-01-14 Thread Toshiaki Makita
On 2019/01/11 22:13, Fredrik Gustavsson wrote: > Den fre 11 jan. 2019 kl 05:23 skrev Toshiaki Makita > : >> >> On 2019/01/10 22:26, Fredrik Gustavsson wrote: >>> commit affede4a779420bd8510ab937251a3796d3228df >>> Author: Fredrik Gustavsson >>> Date: Tue Jan 8 11:21:39 2019 +0100 >>> >>> veth: D

Re: [Bridge] [PATCH 1/2] net: bridge: fix tc added QinQ forwarding

2019-01-14 Thread Toshiaki Makita
On 2019/01/13 22:59, Zahari Doychev wrote: > Use the skb->mac_len instead of using the ETH_HLEN when pushing the skb > data pointer. This fixes sending incorrect packets when more than one > vlan tags are pushed by tc-vlan and the mac header length is bigger than > ETH_HLEN. In this way the vlan ta

Problem of TCP bandwidth drops when change MTU to a small value

2019-01-14 Thread Weilong Chen
Hi, when we change the mtu to a small value, for example, ifconfig eth0 mtu 68, IPERF test shows there's a great bandwidth drop while previous kernel versions don't. Git bisect find the differences is from the patch 28d35bcdd3925e7293408cdb8aa5f2aac5f0d6e3 (net: ipv4: don't let PMTU updates inc

Re: [PATCH ipsec, resend 1/1] xfrm: Make set-mark default behavior backward compatible

2019-01-14 Thread Eyal Birger
Hi Benedict, On Mon, 14 Jan 2019 11:24:38 -0800 Benedict Wong wrote: > Fixes 9b42c1f179a6, which changed the default route lookup behavior > for tunnel mode SAs in the outbound direction to use the skb mark, > whereas previously mark=0 was used if the output mark was > unspecified. In mark-based

[PATCH] netfilter: nft_meta: Add NFT_META_L3MASTER meta type

2019-01-14 Thread wenxu
From: wenxu In the ip_rcv the skb go through the PREROUTING hook first, Then jump in vrf device go through the same hook again. When conntrack dnat work with vrf, there will be some conflict for rules. Because the package go through the hook twice with different nf status ip link add user1 type

Re: [PATCHv2 4/4] dt-bindings: net: dsa: add new MT7530 binding to support MT7621

2019-01-14 Thread Greg Ungerer
Hi Andrew, On 15/1/19 12:07 am, Andrew Lunn wrote: On Mon, Jan 14, 2019 at 05:03:34PM +1000, g...@kernel.org wrote: From: Greg Ungerer Add devicetree binding to support the compatible mt7530 switch as used in the MediaTek MT7621 SoC. Hi Gerg It gets messy, but could you try to indicate tha

Re: [PATCHv2 2/4] net: ethernet: mediatek: do not force autonegiation at init

2019-01-14 Thread Greg Ungerer
Hi René, On 14/1/19 10:55 pm, René van Dorst wrote: Quoting g...@kernel.org: From: Greg Ungerer Do not attempt to force a port phy auto-ngeotiation during the driver init phase. It is not necessary and results in a warning at system boot up: mtk_soc_eth 1e10.ethernet: generated random M

Question on ptr_ring linux header

2019-01-14 Thread fei phung
Hi netdev mailing list and Michael, I am having problem getting proper ptr_ring operation where one ptr_ring entry (val1=2 for item_recv_pop) is missing from the void ** queue Did I initialize the ring pointers (ptr_ring_init()) correctly ? See the following for more context: https://i.imgur.co

Re: Question about default m88e1510 LED configuration of marvell phy

2019-01-14 Thread Andrew Lunn
On Tue, Jan 15, 2019 at 11:07:17AM +0800, shenjian (K) wrote: > Hi, all > We encounted a problem when using the marvel 88e151x phy driver, the > link(LED[0])/ack(LED[1]) leds worked abnormally since we updated our kernel > to v4.19. > The act led kept on and never blink. It works well when

Re: [RFC net-next 0/6] devlink: add device (driver) information API

2019-01-14 Thread Jakub Kicinski
On Tue, 15 Jan 2019 02:57:55 +0100, Andrew Lunn wrote: > > I think the plan was to use this opportunity to move the information > > which belongs in devlink to devlink. There is absolutely nothing > > netdev specific here, and ethtool uses a netdev as a handle. We can > > have the new ethtool com

[PATCH net v2] net: bridge: Fix ethernet header pointer before check skb forwardable

2019-01-14 Thread wangyunjian
From: Yunjian Wang The skb header should be set to ethernet header before using is_skb_forwardable. Because the ethernet header length has been considered in is_skb_forwardable(including dev->hard_header_len length). To reproduce the issue: 1, add 2 ports on linux bridge br using following comma

RE: [PATCH net] bridge: Fix ethernet header pointer before check skb forwardable

2019-01-14 Thread wangyunjian
> -Original Message- > From: Nikolay Aleksandrov [mailto:niko...@cumulusnetworks.com] > Sent: Monday, January 14, 2019 10:05 PM > To: wangyunjian > Cc: Andrew Lunn ; netdev@vger.kernel.org; xudingke > > Subject: Re: [PATCH net] bridge: Fix ethernet header pointer before check > skb forw

Question about default m88e1510 LED configuration of marvell phy

2019-01-14 Thread shenjian (K)
Hi, all We encounted a problem when using the marvel 88e151x phy driver, the link(LED[0])/ack(LED[1]) leds worked abnormally since we updated our kernel to v4.19. The act led kept on and never blink. It works well when we use genphy driver, aslo works well when use marvell phy in kernel

[PATCH net-next] ip_gre: Make none-tunnel-dst gre port work with lwtunnel

2019-01-14 Thread wenxu
From: wenxu ip l add dev tun type gretap key 1000 ip a a dev tun 10.0.0.1/24 Packets with tun-id 1000 can be recived by tun dev. But packet can't be sent through dev tun for non-tunnel-dst With this patch: tunnel-dst can be get through lwtunnel like beflow: ip r a 10.0.0.7 encap ip id 1000 dst

Re: [PATCH net 1/1] bonding: fix PACKET_ORIGDEV regression on bonding masters

2019-01-14 Thread महेश बंडेवार
On Mon, Jan 14, 2019 at 12:00 AM Vincent Bernat wrote: > > ❦ 13 janvier 2019 18:01 -08, Maciej Żenczykowski : > > > But I seem to recall that the core problem we were trying to solve was > > that a daemon listening > > on an AF_PACKET ethertype 88CC [LLDP] socket not bound to any device > > would

Re: [RFC net-next 0/6] devlink: add device (driver) information API

2019-01-14 Thread Andrew Lunn
> I think the plan was to use this opportunity to move the information > which belongs in devlink to devlink. There is absolutely nothing > netdev specific here, and ethtool uses a netdev as a handle. We can > have the new ethtool command just issue a devlink request behind the > scenes if we car

Re: [PATCH] net: phy: fixed-phy: Drop GPIO from fixed_phy_add()

2019-01-14 Thread Andrew Lunn
> struct phy_device *fixed_phy_register(unsigned int irq, > struct fixed_phy_status *status, > - int link_gpio, > struct device_node *np) > { > struct fixed_mdio_bus *fmb = &platform_fm

Re: [PATCH] net: phy: fixed-phy: Drop GPIO from fixed_phy_add()

2019-01-14 Thread Andrew Lunn
On Mon, Jan 14, 2019 at 09:02:25AM +0100, Linus Walleij wrote: > All users of the fixed_phy_add() pass -1 as GPIO number > to the fixed phy driver, and all users of fixed_phy_register() > pass -1 as GPIO number as well, except for the device > tree MDIO bus. > > Any new users should create a prope

[PATCH net-next] virtio_net: bulk free tx skbs

2019-01-14 Thread Michael S. Tsirkin
Use napi_consume_skb() to get bulk free. Note that napi_consume_skb is safe to call in a non-napi context as long as the napi_budget flag is correct. Signed-off-by: Michael S. Tsirkin --- My perf testing setup is down but it works fine on my devel box and should be fairly uncontroversial. dri

Re: [RFC net-next 0/6] devlink: add device (driver) information API

2019-01-14 Thread Jakub Kicinski
On Tue, 15 Jan 2019 02:18:59 +0100, Andrew Lunn wrote: > On Mon, Jan 14, 2019 at 04:50:02PM -0800, Jakub Kicinski wrote: > > Hi! > > > > For quite some time now the ethtool -i API has been showing its age. > > The driver version field is generally considered obsolete these > > days, and driver aut

Re: [RFC net-next 0/6] devlink: add device (driver) information API

2019-01-14 Thread Andrew Lunn
On Mon, Jan 14, 2019 at 04:50:02PM -0800, Jakub Kicinski wrote: > Hi! > > For quite some time now the ethtool -i API has been showing its age. > The driver version field is generally considered obsolete these > days, and driver authors are encouraged to report the kernel version. > fw_version fiel

[PATCH hyperv-fixes,3/3] Fix hash key value reset after other ops

2019-01-14 Thread Haiyang Zhang
From: Haiyang Zhang Changing mtu, channels, or buffer sizes ops call to netvsc_attach(), rndis_set_subchannel(), which always reset the hash key to default value. That will override hash key changed previously. This patch fixes the problem by save the hash key, then restore it when we re- add the

Re: [RFC net-next 0/6] devlink: add device (driver) information API

2019-01-14 Thread Florian Fainelli
On 1/14/19 4:50 PM, Jakub Kicinski wrote: > Hi! > > For quite some time now the ethtool -i API has been showing its age. > The driver version field is generally considered obsolete these > days, and driver authors are encouraged to report the kernel version. > fw_version field does not suit modern

Re: [PATCH net] selftests: tc-testing: fix parsing of ife type

2019-01-14 Thread Stephen Hemminger
On Mon, 14 Jan 2019 18:16:44 +0100 Davide Caratti wrote: > In iproute2 commit 90c5c969f0b9 ("fix print_0xhex on 32 bit"), the format > specifier for the ife type changed from 0x%X to %#llX, causing systematic > failures in the following TDC test cases: Another alternative would be if the tests l

[PATCH hyperv-fixes,0/3] fixes for hash key setting issues

2019-01-14 Thread Haiyang Zhang
From: Haiyang Zhang Using ethtool to change Hash key failed on Linux VM runnig on Hyper-V. This patch set fix them. It targets Hyper-V tree, hyperv-fixes branch managed by Sasha Levin . Haiyang Zhang (3): Fix ethtool change hash key error Refactor assignments of struct netvsc_device_info

[PATCH hyperv-fixes,1/3] Fix ethtool change hash key error

2019-01-14 Thread Haiyang Zhang
From: Haiyang Zhang Hyper-V hosts require us to disable RSS before changing RSS key, otherwise the changing request will fail. This patch fixes the coding error. Fixes: ff4a44199012 ("netvsc: allow get/set of RSS indirection table") Reported-by: Wei Hu Signed-off-by: Haiyang Zhang --- drivers

[PATCH hyperv-fixes,2/3] Refactor assignments of struct netvsc_device_info

2019-01-14 Thread Haiyang Zhang
From: Haiyang Zhang These assignments occur in multiple places. The patch refactor them to a function for simplicity. It also puts the struct to heap area for future expension. Signed-off-by: Haiyang Zhang --- drivers/net/hyperv/netvsc_drv.c | 134 1 file chang

[RFC net-next 3/6] nfp: devlink: report serial number

2019-01-14 Thread Jakub Kicinski
Report serial number via the info devlink command. Signed-off-by: Jakub Kicinski --- .../net/ethernet/netronome/nfp/nfp_devlink.c | 22 +++ 1 file changed, 22 insertions(+) diff --git a/drivers/net/ethernet/netronome/nfp/nfp_devlink.c b/drivers/net/ethernet/netronome/nfp/nfp_d

[RFC net-next 1/6] devlink: add device information API

2019-01-14 Thread Jakub Kicinski
ethtool -i has served us well for a long time, but its showing its limitations more and more. The device information should also be reported per device not per-netdev. Lay foundation for a simple devlink-based ethtool -i replacement. Add device serial number as initial piece of information expose

[RFC net-next 6/6] nfp: devlink: report the running and flashed versions

2019-01-14 Thread Jakub Kicinski
Report versions of firmware components using the new NSP command. Signed-off-by: Jakub Kicinski --- .../net/ethernet/netronome/nfp/nfp_devlink.c | 60 +++ 1 file changed, 60 insertions(+) diff --git a/drivers/net/ethernet/netronome/nfp/nfp_devlink.c b/drivers/net/ethernet/netr

[RFC net-next 2/6] devlink: add version reporting API

2019-01-14 Thread Jakub Kicinski
ethtool -i has a few fixed-size fields which can be used to report firmware version and expansion ROM version. Unfortunately, modern hardware has more firmware components. There is usually some datapath microcode, management controller, PXE drivers, and a CPLD load. Running ethtool -i on modern

[RFC iproute2-next] devlink: add info subcommand

2019-01-14 Thread Jakub Kicinski
Add support for reading the device serial number and versions from the kernel. Signed-off-by: Jakub Kicinski --- devlink/devlink.c | 223 +++- man/man8/devlink-info.8 | 75 ++ man/man8/devlink.8 | 5 + 3 files changed, 302 insertions(

[RFC net-next 4/6] nfp: devlink: report fixed versions

2019-01-14 Thread Jakub Kicinski
For now we only use HWinfo for fixed versions. Signed-off-by: Jakub Kicinski --- .../net/ethernet/netronome/nfp/nfp_devlink.c | 72 +++ 1 file changed, 72 insertions(+) diff --git a/drivers/net/ethernet/netronome/nfp/nfp_devlink.c b/drivers/net/ethernet/netronome/nfp/nfp_devli

[RFC net-next 5/6] nfp: nsp: add support for versions command

2019-01-14 Thread Jakub Kicinski
Retrieve the FW versions with the new command. Signed-off-by: Jakub Kicinski --- .../ethernet/netronome/nfp/nfpcore/nfp_nsp.c | 53 +++ .../ethernet/netronome/nfp/nfpcore/nfp_nsp.h | 14 + 2 files changed, 67 insertions(+) diff --git a/drivers/net/ethernet/netronome/nfp/nf

[RFC net-next 0/6] devlink: add device (driver) information API

2019-01-14 Thread Jakub Kicinski
Hi! For quite some time now the ethtool -i API has been showing its age. The driver version field is generally considered obsolete these days, and driver authors are encouraged to report the kernel version. fw_version field does not suit modern needs with 31 characters being quite limiting on more

Re: [PATCH] openvswitch: Avoid OOB read when parsing flow nlattrs

2019-01-14 Thread Pravin Shelar
On Mon, Jan 14, 2019 at 1:17 AM Ross Lagerwall wrote: > > For nested and variable attributes, the expected length of an attribute > is not known and marked by a negative number. This results in an OOB > read when the expected length is later used to check if the attribute is > all zeros. Fix this

Re: [PATCH 3/7] dt-bindings: net: stmmac: Add the bindings documentation for delays

2019-01-14 Thread Florian Fainelli
On 1/11/19 7:01 AM, Rob Herring wrote: > On Wed, Jan 02, 2019 at 02:47:25PM +0530, Vinod Koul wrote: >> Some controllers require that phy delay should be disabled. So add > > If the MAC requires it, then the compatible string should imply this. If > it depends on the PHY, then okay. > >> optiona

Re: [Patch net] net_sched: refetch skb protocol for each filter

2019-01-14 Thread Lucas Bates
On Sat, Jan 12, 2019 at 7:23 AM Jamal Hadi Salim wrote: > > On 2019-01-11 9:55 p.m., Cong Wang wrote: > > Martin reported a set of filters don't work after changing > > from reclassify to continue. Looking into the code, it > > looks like skb protocol is not always fetched for each > > iteration o

Re: [PATCH net-next v2 01/17] net: sched: refactor mini_qdisc_pair_swap() to use workqueue

2019-01-14 Thread Cong Wang
On Mon, Jan 14, 2019 at 11:00 AM Vlad Buslov wrote: > Hi Cong, > > Any comments regarding benchmark results? Are you okay with > spinlock-based implementation? > Hi, Sorry for somehow forgetting to response to your last email. I suggested you to stick to mutex not because it is better than spin

Re: [PATCH v3] vrf: Fix conntrack-dnat conflict in vrf-device PREROUTING hook

2019-01-14 Thread Florian Westphal
Pablo Neira Ayuso wrote: > On Sat, Jan 12, 2019 at 08:03:19AM +0800, we...@ucloud.cn wrote: > > From: wenxu > > > > In the ip_rcv the skb go through the PREROUTING hook first, > > Then jump in vrf device go through the same hook again. > > When conntrack dnat work with vrf, there will be some co

Re: [PATCH v3] vrf: Fix conntrack-dnat conflict in vrf-device PREROUTING hook

2019-01-14 Thread Pablo Neira Ayuso
On Sat, Jan 12, 2019 at 08:03:19AM +0800, we...@ucloud.cn wrote: > From: wenxu > > In the ip_rcv the skb go through the PREROUTING hook first, > Then jump in vrf device go through the same hook again. > When conntrack dnat work with vrf, there will be some conflict for rules. > Because the packag

[PATCH 4/7] netfilter: nft_flow_offload: Fix reverse route lookup

2019-01-14 Thread Pablo Neira Ayuso
From: wenxu Using the following example: client 1.1.1.7 ---> 2.2.2.7 which dnat to 10.0.0.7 server The first reply packet (ie. syn+ack) uses an incorrect destination address for the reverse route lookup since it uses: daddr = ct->tuplehash[!dir].tuple.dst.u3.ip; which is 2.2.2

[PATCH 1/7] netfilter: nf_tables: Fix for endless loop when dumping ruleset

2019-01-14 Thread Pablo Neira Ayuso
From: Phil Sutter __nf_tables_dump_rules() stores the current idx value into cb->args[0] before returning to caller. With multiple chains present, cb->args[0] is therefore updated after each chain's rules have been traversed. This though causes the final nf_tables_dump_rules() run (which should r

[PATCH 7/7] netfilter: nft_flow_offload: fix checking method of conntrack helper

2019-01-14 Thread Pablo Neira Ayuso
From: Henry Yen This patch uses nfct_help() to detect whether an established connection needs conntrack helper instead of using test_bit(IPS_HELPER_BIT, &ct->status). The reason is that IPS_HELPER_BIT is only set when using explicit CT target. However, in the case that a device enables conntrac

[PATCH 5/7] netfilter: ebtables: account ebt_table_info to kmemcg

2019-01-14 Thread Pablo Neira Ayuso
From: Shakeel Butt The [ip,ip6,arp]_tables use x_tables_info internally and the underlying memory is already accounted to kmemcg. Do the same for ebtables. The syzbot, by using setsockopt(EBT_SO_SET_ENTRIES), was able to OOM the whole system from a restricted memcg, a potential DoS. By accountin

[PATCH 6/7] netfilter: nft_flow_offload: fix interaction with vrf slave device

2019-01-14 Thread Pablo Neira Ayuso
From: wenxu In the forward chain, the iif is changed from slave device to master vrf device. Thus, flow offload does not find a match on the lower slave device. This patch uses the cached route, ie. dst->dev, to update the iif and oif fields in the flow entry. After this patch, the following ex

[PATCH 2/7] netfilter: nf_tables: fix leaking object reference count

2019-01-14 Thread Pablo Neira Ayuso
From: Taehee Yoo There is no code that decreases the reference count of stateful objects in error path of the nft_add_set_elem(). this causes a leak of reference count of stateful objects. Test commands: $nft add table ip filter $nft add counter ip filter c1 $nft add map ip filter m1 {

[PATCH 0/7] Netfilter fixes for net

2019-01-14 Thread Pablo Neira Ayuso
Hi David, This is the first batch of Netfilter fixes for your net tree: 1) Fix endless loop in nf_tables rules netlink dump, from Phil Sutter. 2) Reference counter leak in object from the error path, from Taehee Yoo. 3) Selective rule dump requires table and chain. 4) Fix DNAT with nft_flow_of

[PATCH 3/7] netfilter: nf_tables: selective rule dump needs table to be specified

2019-01-14 Thread Pablo Neira Ayuso
Table needs to be specified for selective rule dumps per chain. Fixes: 241faeceb849c ("netfilter: nf_tables: Speed up selective rule dumps") Reported-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso --- net/netfilter/nf_tables_api.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) di

Re: [PATCH] libceph: protect pending flags in ceph_con_keepalive()

2019-01-14 Thread Ilya Dryomov
On Thu, Jan 3, 2019 at 4:50 AM Myungho Jung wrote: > I reproduced on vm using syzkaller utils and verified the fix by syzbot. Hi Myungho, I think this might be a better fix: diff --git a/net/ceph/messenger.c b/net/ceph/messenger.c index d5718284db57..c5f5313e3537 100644 --- a/net/ceph/messenger

[PATCH 2/2] bpf: annotate implicit fall through

2019-01-14 Thread Mathieu Malaterre
There is a plan to build the kernel with -Wimplicit-fallthrough and thise place in the code produced a warnings (W=1). In this particular case change a ‘:’ with a ‘,’ so as to match the regular expression expected by GCC. This commit remove the following warning: net/core/filter.c:5310:6: warn

[PATCH 1/2] bpf: annotate implicit fall through

2019-01-14 Thread Mathieu Malaterre
There is a plan to build the kernel with -Wimplicit-fallthrough and this place in the code produced a warnings (W=1). This commit remove the following warning: kernel/bpf/cgroup.c:719:6: warning: this statement may fall through [-Wimplicit-fallthrough=] Signed-off-by: Mathieu Malaterre ---

Re: AF_PACKET fanout not working on MPLS traffic

2019-01-14 Thread Willem de Bruijn
On Mon, Jan 14, 2019 at 2:12 PM Martijn van Oosterhout wrote: > > Hi netdev, > > We're running into an issue where incoming traffic for Suricata is not > being distributed across the workers despite AF_PACKET with fanout > being used, and it appears to be a kernel issue. Below is a description > o

Re: [PATCH mlx5-next] RDMA/mad: Reduce MAD scope to mlx5_ib only

2019-01-14 Thread Jason Gunthorpe
On Sun, Jan 13, 2019 at 03:57:04PM +0200, Leon Romanovsky wrote: > From: Leon Romanovsky > > Management Datagram Interface (MAD) is applicable > only when physical port is Infiniband. It makes MAD > command logic to be completely unrelated to eth/core > parts of mlx5. > Signed-off-by: Leon Roma

Re: [Patch net] net_sched: refetch skb protocol for each filter

2019-01-14 Thread Cong Wang
On Mon, Jan 14, 2019 at 1:23 AM Daniel Borkmann wrote: > Can't we do something like the below instead? Otherwise we'll needlessly > refetch > protocol every time there is a mismatch in above tp->protocol check as well. Does this save anything given the fact we simply return if err>=0? The proto

ss --vsock list peer endpoint by vm name/pid?

2019-01-14 Thread Brian Kroth
Hi all, I'm trying to do some development with the AF_VSOCKs. When a VM connects to an endpoint in the host, I'd like to be able to resolve the peer CID endpoint to a VM name, or even better its process id. I've tried using getsockopt SO_VM_SOCKETS_PEER_HOST_VM_ID, but the value returned is just a

Re: [PATCH 0/2] net: bridge: fix tc added QinQ forwarding

2019-01-14 Thread Zahari Doychev
On Mon, Jan 14, 2019 at 01:46:09PM +0200, Nikolay Aleksandrov wrote: > On 13/01/2019 15:59, Zahari Doychev wrote: [...] > > How well was this set tested ? It breaks connectivity between bridge and > members when vlans are used. The host generated packets going out of the > bridge > have mac_len

[PATCH ipsec, resend 1/1] xfrm: Make set-mark default behavior backward compatible

2019-01-14 Thread Benedict Wong
Fixes 9b42c1f179a6, which changed the default route lookup behavior for tunnel mode SAs in the outbound direction to use the skb mark, whereas previously mark=0 was used if the output mark was unspecified. In mark-based routing schemes such as Android’s, this change in default behavior causes routi

[PATCH ipsec, resend 0/1] xfrm: set-mark default behavior changes

2019-01-14 Thread Benedict Wong
Resend; added authors of 9b42c1f179a6 to CC list A behavior change introduced in 9b42c1f179a6 (“xfrm: Extend the output_mark to support input direction and masking”) results in a change in: 1. Default outbound behavior with regards to route lookup marks, and 2. Inbound behavior for SAs used to de

AF_PACKET fanout not working on MPLS traffic

2019-01-14 Thread Martijn van Oosterhout
Hi netdev, We're running into an issue where incoming traffic for Suricata is not being distributed across the workers despite AF_PACKET with fanout being used, and it appears to be a kernel issue. Below is a description of the problem and possible solution. Seen on version kernel 4.19, but the c

Re: [PATCH net-next v2 01/17] net: sched: refactor mini_qdisc_pair_swap() to use workqueue

2019-01-14 Thread Vlad Buslov
On Thu 20 Dec 2018 at 13:55, Vlad Buslov wrote: > On Wed 19 Dec 2018 at 04:27, Cong Wang wrote: >> On Mon, Dec 17, 2018 at 2:30 AM Jiri Pirko wrote: >>> >>> Sun, Dec 16, 2018 at 07:52:18PM CET, xiyou.wangc...@gmail.com wrote: >>> >On Sun, Dec 16, 2018 at 8:32 AM Vlad Buslov wrote: >>> >> >>>

[PATCH net v2] ipv6: route: place a warning with duplicated string with correct extack

2019-01-14 Thread Jakub Kicinski
"IPv6: " prefix is already added by pr_fmt, no need to include it again in the pr_warn() format. The message predates extack support, we can replace the whole thing with an extack message. Suggested-by: David Ahern Signed-off-by: Jakub Kicinski --- net/ipv6/route.c | 14 ++ 1 file

Re: [PATCH] ieee802154: mcr20a: fix indentation, remove tabs

2019-01-14 Thread Stefan Schmidt
Hello. On 14.01.19 16:48, Colin King wrote: > From: Colin Ian King > > The are a couple of statments that are one level too deep, fix this by > removing tabs. > > Signed-off-by: Colin Ian King > --- > drivers/net/ieee802154/mcr20a.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-

Re: [PATCH net] ipv6: route: remove duplicated string from error message

2019-01-14 Thread Jakub Kicinski
On Sun, 13 Jan 2019 09:08:56 -0700, David Ahern wrote: > On 1/12/19 2:07 PM, Joe Perches wrote: > > On Sat, 2019-01-12 at 12:45 -0800, Jakub Kicinski wrote: > >> "IPv6: " prefix is already added by pr_fmt, no need to include > >> it again in the pr_warn() format. > > [] > >> diff --git a/net/

Re: [PATCH bpf] xsk: Check if a queue exists during umem setup

2019-01-14 Thread Björn Töpel
On 2019-01-14 18:50, Krzysztof Kazimierczak wrote: From: Krzysztof Kazimierczak In the xdp_umem_assign_dev() path, the xsk code does not check if a queue for which umem is to be created exists. It leads to a situation where umem is not assigned to any Tx/Rx queue of a netdevice, without notifyi

Re: [PATCH net] net: use inet_ehash_bucket(...) for consistency

2019-01-14 Thread Marcus Hüwe
On 2019-01-14 08:47:47 -0800, Eric Dumazet wrote: > On 01/12/2019 06:07 AM, Marcus Huewe wrote: > > Make the access to the struct inet_hashinfo's ehash member consistent. > > In net/ipv4/inet_hashtables.c, the ehash member is accessed by calling > > inet_ehash_bucket(...) except for the access in _

Re: net/core: BUG in copy_net_ns()

2019-01-14 Thread Eric W. Biederman
zzoru writes: > I think that it is exactly same to: > https://groups.google.com/forum/#!searchin/linux.kernel/cleanup_net$20is$20slow%7Csort:date/linux.kernel/IMJ9OzonDSI/QH86oy1PAQAJ > Already, patch was maded, but maybe he forgot to push it. That patch was made to address speed, and lifetime o

Re: [PATCH ipsec, resend 0/1] xfrm: set-mark default behavior changes

2019-01-14 Thread Benedict Wong
(Resend as plaintext. Forgot to check gmail plain-text setting) > There was no need to resend this without changes. I still had this > patchset in my queue. Ahh, my apologies. I will keep that in mind for next time. > I'm ok with the change, but you did not Cc > all the authors of the patch you

Re: net/core: BUG in copy_net_ns()

2019-01-14 Thread Eric W. Biederman
Dmitry Vyukov writes: > This looks superciliously similar to: > https://groups.google.com/d/msg/syzkaller-bugs/nFeC8-UG1gg/B6GFaZFrFQAJ > > The crux: for the last ~half a year low memory conditions randomly > corrupt kernel memory with stack overflows. Does enabling virtually mapped stacks catch

Re: [PATCH net V3] vhost: log dirty page correctly

2019-01-14 Thread Michael S. Tsirkin
On Fri, Jan 11, 2019 at 12:00:36PM +0800, Jason Wang wrote: > Vhost dirty page logging API is designed to sync through GPA. But we > try to log GIOVA when device IOTLB is enabled. This is wrong and may > lead to missing data after migration. > > To solve this issue, when logging with device IOTLB

Re: Regression: mv88e6xxx packet loss after 4.18's PHYLINK merge

2019-01-14 Thread Florian Fainelli
On 1/14/19 6:23 AM, Andrew Lunn wrote: > On Mon, Jan 14, 2019 at 01:34:44PM +0200, Samu Nuutamo wrote: >> Hi, >> >> We have an imx6q-b450v3 board that has one of the switch ports configured as >> a >> fixed link. After upgrading the kernel to version 4.18 the link has >> experienced >> a small am

Re: [PATCH net] gro_cell: add napi_disable in gro_cells_destroy

2019-01-14 Thread Eric Dumazet
On 12/19/2018 02:46 PM, Eric Dumazet wrote: > On Wed, Dec 19, 2018 at 2:23 PM Lorenzo Bianconi > wrote: >> >> Add napi_disable routine in gro_cells_destroy since starting from >> commit c42858eaf492 ("gro_cells: remove spinlock protecting receive >> queues") gro_cell_poll and gro_cells_destroy

[PATCH bpf] selftests/bpf: install with_tunnels.sh for test_flow_dissector.sh

2019-01-14 Thread Stanislav Fomichev
test_flow_dissector.sh depends on both with_addr.sh and with_tunnels.sh However, we install only with_addr.sh. Add with_tunnels.sh to TEST_PROGS_EXTENDED to make sure it gets installed as well. Tested with: make TARGETS=bpf install INSTALL_PATH=$PWD/x Fixes: ef4ab8447aa26 ("selftests: bpf: insta

Re: [PATCH v4] coding-style: Clarify the expectations around bool

2019-01-14 Thread Jason Gunthorpe
On Sun, Jan 13, 2019 at 05:01:39PM +0100, Federico Vaga wrote: > > -17) Don't re-invent the kernel macros > > +17) Using bool > > +-- > > + > > +The Linux kernel bool type is an alias for the C99 _Bool type. bool > > values can > > +only evaluate to 0 or 1, and implicit or explicit con

KASAN: use-after-free Read in ip_tunnel_lookup

2019-01-14 Thread syzbot
Hello, syzbot found the following crash on: HEAD commit:f0c928d878e7 tcp: fix a race in inet_diag_dump_icsk() git tree: net console output: https://syzkaller.appspot.com/x/log.txt?x=1732c79740 kernel config: https://syzkaller.appspot.com/x/.config?x=861a3573f4e78ba1 dashboard link

Re: [PATCH v4] coding-style: Clarify the expectations around bool

2019-01-14 Thread Jason Gunthorpe
On Sun, Jan 13, 2019 at 08:49:36AM -0800, Matthew Wilcox wrote: > On Thu, Jan 10, 2019 at 11:48:13PM +, Jason Gunthorpe wrote: > > +The Linux kernel bool type is an alias for the C99 _Bool type. bool values > > can > > +only evaluate to 0 or 1, and implicit or explicit conversion to bool > > +

Re: [PATCH v4] coding-style: Clarify the expectations around bool

2019-01-14 Thread Jason Gunthorpe
On Fri, Jan 11, 2019 at 07:29:40AM -1000, Joey Pabalinas wrote: > On Thu, Jan 10, 2019 at 11:48:13PM +, Jason Gunthorpe wrote: > > There has been some confusion since checkpatch started warning about bool > > use in structures, and people have been avoiding using it. > > > > Many people feel t

[PATCH net] selftests: tc-testing: fix parsing of ife type

2019-01-14 Thread Davide Caratti
In iproute2 commit 90c5c969f0b9 ("fix print_0xhex on 32 bit"), the format specifier for the ife type changed from 0x%X to %#llX, causing systematic failures in the following TDC test cases: 7682 - Create valid ife encode action with mark and pass control ef47 - Create valid ife encode action wit

Re: [PATCH v7 perf, bpf-next 7/8] perf util: handle PERF_RECORD_BPF_EVENT

2019-01-14 Thread Arnaldo Carvalho de Melo
Em Thu, Jan 10, 2019 at 04:19:32PM -0800, Song Liu escreveu: > This patch adds basic handling of PERF_RECORD_BPF_EVENT. > Tracking of PERF_RECORD_BPF_EVENT is OFF by default. Option --bpf-event > is added to turn it on. > > Signed-off-by: Song Liu Please add the following patch to your tree for

Re: [PATCH v7 perf, bpf-next 6/8] perf util: handle PERF_RECORD_KSYMBOL

2019-01-14 Thread Arnaldo Carvalho de Melo
Em Thu, Jan 10, 2019 at 04:19:31PM -0800, Song Liu escreveu: > This patch handles PERF_RECORD_KSYMBOL in perf record/report. > Specifically, map and symbol are created for ksymbol register, and > removed for ksymbol unregister. > > This patch also set perf_event_attr.ksymbol properly. The flag is

Re: [PATCH RFC 0/3] Support fraglist GRO/GSO

2019-01-14 Thread Willem de Bruijn
On Mon, Jan 14, 2019 at 7:50 AM Steffen Klassert wrote: > > On Sun, Dec 23, 2018 at 08:15:40PM -0500, Willem de Bruijn wrote: > > On Fri, Dec 21, 2018 at 10:23 AM Steffen Klassert > > wrote: > > > > > > This patchset adds support to do GRO/GSO by chaining packets > > > of the same flow at the SKB

Re: [PATCH 4/7] net/packet: Ask driver for protocol if not provided by user

2019-01-14 Thread Willem de Bruijn
On Mon, Jan 14, 2019 at 8:20 AM Maxim Mikityanskiy wrote: > > If a socket was created with socket(AF_PACKET, SOCK_RAW, 0), the > protocol number is unavailable. Try to ask the driver to extract it from > the L2 header in order for skb_try_probe_transport_header to succeed. > > Signed-off-by: Maxim

Re: [PATCH 1/7] net: Don't set transport offset to invalid value

2019-01-14 Thread Willem de Bruijn
On Mon, Jan 14, 2019 at 8:20 AM Maxim Mikityanskiy wrote: > > If the socket was created with socket(AF_PACKET, SOCK_RAW, 0), > skb->protocol will be unset, __skb_flow_dissect() will fail, and > skb_probe_transport_header() will fall back to the offset_hint, making > the resulting skb_transport_off

Re: [PATCH net] net: use inet_ehash_bucket(...) for consistency

2019-01-14 Thread Eric Dumazet
On 01/12/2019 06:07 AM, Marcus Huewe wrote: > Make the access to the struct inet_hashinfo's ehash member consistent. > In net/ipv4/inet_hashtables.c, the ehash member is accessed by calling > inet_ehash_bucket(...) except for the access in __inet_lookup_established. > In order to make the access

Re: [PATCH iproute2] ip route: get: only set RTM_F_LOOKUP_TABLE flag for IPv4

2019-01-14 Thread David Ahern
On 1/14/19 9:05 AM, Stephen Hemminger wrote: > On Sat, 12 Jan 2019 12:54:06 -0800 > Jakub Kicinski wrote: > >> Kernel ignores the RTM_F_LOOKUP_TABLE flag for all families >> but IPv4. Don't set it, otherwise it may fall foul of >> strict checking policies. >> >> Signed-off-by: Jakub Kicinski >

Does the kernel IPv6 module plan to implement Secure Neighbor Discovery?

2019-01-14 Thread Ttttabcd
IPv6 is rapidly deploying globally. NDP replaces the role of ARP in IPv6 and provides mapping from IP address to MAC address. However, the NDP protocol is as insecure as the ARP protocol, and can be easily spoofed, and then the attacker can conduct man-in-the-middle attacks. The solution to the

[PATCH v1] net: emac: remove IBM_EMAC_RX_SKB_HEADROOM

2019-01-14 Thread Christian Lamparter
The EMAC driver had a custom IBM_EMAC_RX_SKB_HEADROOM Kconfig option that reserved additional skb headroom for RX. This patch removes the option and migrates the code to use napi_alloc_skb() and netdev_alloc_skb_ip_align() in its place. Signed-off-by: Christian Lamparter --- drivers/net/ethernet

Re: [PATCH iproute2] ip route: get: only set RTM_F_LOOKUP_TABLE flag for IPv4

2019-01-14 Thread Stephen Hemminger
On Sat, 12 Jan 2019 12:54:06 -0800 Jakub Kicinski wrote: > Kernel ignores the RTM_F_LOOKUP_TABLE flag for all families > but IPv4. Don't set it, otherwise it may fall foul of > strict checking policies. > > Signed-off-by: Jakub Kicinski Doing the right thing is a good idea, but really I can't

[PATCH] ieee802154: mcr20a: fix indentation, remove tabs

2019-01-14 Thread Colin King
From: Colin Ian King The are a couple of statments that are one level too deep, fix this by removing tabs. Signed-off-by: Colin Ian King --- drivers/net/ieee802154/mcr20a.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/ieee802154/mcr20a.c b/drivers/net/i

[PATCH] net: sungem: fix indentation, remove a tab

2019-01-14 Thread Colin King
From: Colin Ian King The declaration of variable 'found' is one level too deep, fix this by removing a tab. Signed-off-by: Colin Ian King --- drivers/net/ethernet/sun/sungem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/sun/sungem.c b/drivers/net/e

Re: [PATCH net] af_packet: fix raw sockets over 6in4 tunnel

2019-01-14 Thread Willem de Bruijn
On Mon, Jan 14, 2019 at 10:15 AM Willem de Bruijn wrote: > > On Mon, Jan 14, 2019 at 9:51 AM Nicolas Dichtel > wrote: > > > > Le 12/01/2019 à 19:00, Willem de Bruijn a écrit : > > > On Fri, Jan 11, 2019 at 4:29 PM Willem de Bruijn > > > wrote: > > >> > > >> On Fri, Jan 11, 2019 at 9:44 AM Nicola

[PATCH] drivers: net: atp: fix various indentation issues

2019-01-14 Thread Colin King
From: Colin Ian King There are various lines that have indentation issues, fix these. Signed-off-by: Colin Ian King --- drivers/net/ethernet/realtek/atp.c | 27 +++ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/drivers/net/ethernet/realtek/atp.c b/dri

Re: [PATCH 3/7] dt-bindings: net: stmmac: Add the bindings documentation for delays

2019-01-14 Thread Vinod Koul
HI Rob, On 11-01-19, 09:01, Rob Herring wrote: > On Wed, Jan 02, 2019 at 02:47:25PM +0530, Vinod Koul wrote: > > Some controllers require that phy delay should be disabled. So add > > If the MAC requires it, then the compatible string should imply this. If > it depends on the PHY, then okay. Th

Re: [PATCH net] af_packet: fix raw sockets over 6in4 tunnel

2019-01-14 Thread Willem de Bruijn
On Mon, Jan 14, 2019 at 9:51 AM Nicolas Dichtel wrote: > > Le 12/01/2019 à 19:00, Willem de Bruijn a écrit : > > On Fri, Jan 11, 2019 at 4:29 PM Willem de Bruijn > > wrote: > >> > >> On Fri, Jan 11, 2019 at 9:44 AM Nicolas Dichtel > >> wrote: > >>> > >>> Since commit cb9f1b783850, scapy (which u

  1   2   >