Re: XDP performance regression due to CONFIG_RETPOLINE Spectre V2

2018-04-17 Thread Christoph Hellwig
> I'm not sure if I am really a fan of trying to solve this in this way. > It seems like this is going to be optimizing the paths for one case at > the detriment of others. Historically mapping and unmapping has always > been expensive, especially in the case of IOMMU enabled environments. > I

[PATCH bpf-next 07/10] [bpf]: make cavium thunder compatible w/ bpf_xdp_adjust_tail

2018-04-17 Thread Nikita V. Shirokov
w/ bpf_xdp_adjust_tail helper xdp's data_end pointer could be changed as well (only "decrease" of pointer's location is going to be supported). changing of this pointer will change packet's size. for cavium's thunder driver we will just calculate packet's length unconditionally Signed-off-by:

[PATCH bpf-next 01/10] [bpf]: adding bpf_xdp_adjust_tail helper

2018-04-17 Thread Nikita V. Shirokov
Adding new bpf helper which would allow us to manipulate xdp's data_end pointer, and allow us to reduce packet's size indended use case: to generate ICMP messages from XDP context, where such message would contain truncated original packet. Signed-off-by: Nikita V. Shirokov

Re: [PATCH][next] iwlwifi: mvm: remove division by size of sizeof(struct ieee80211_wmm_rule)

2018-04-17 Thread Luca Coelho
On Wed, 2018-04-11 at 14:05 +0100, Colin King wrote: > From: Colin Ian King > > The subtraction of two struct ieee80211_wmm_rule pointers leaves a > result > that is automatically scaled down by the size of the size of pointed- > to > type, hence the division by

[PATCH net-next 3/3] net: phy: Enable C45 PHYs with vendor specific address space

2018-04-17 Thread Vicentiu Galanopulo
A search of the dev-addr property is done in of_mdiobus_register. If the property is found in the PHY node, of_mdiobus_register_vend_spec_phy() is called. This is a wrapper function for of_mdiobus_register_phy() which finds the device in package based on dev-addr, and fills devices_addrs, which is

[PATCH net-next 2/3] net: phy: Change the array size to 32 for device_ids

2018-04-17 Thread Vicentiu Galanopulo
In the context of enabling the discovery of the PHYs which have the C45 MDIO address space in a non-standard address: num_ids in get_phy_c45_ids, has the value 8 (ARRAY_SIZE(c45_ids->device_ids)), but the u32 *devs can store 32 devices in the bitfield. If a device is stored in *devs, in bits 32

[PATCH net-next 0/3] net: phy: Enable C45 vendor specific MDIO register addr space

2018-04-17 Thread Vicentiu Galanopulo
Enabling the discovery on the MDIO bus of PHYs which have a vendor specific address space for accessing the C45 MDIO registers. Vicentiu Galanopulo (3): net: phy: Add binding for vendor specific C45 MDIO address space net: phy: Change the array size to 32 for device_ids net: phy: Enable C45

Re: [PATCH net-next 3/5] ipv4: support sport, dport and ip protocol in RTM_GETROUTE

2018-04-17 Thread Ido Schimmel
On Mon, Apr 16, 2018 at 01:41:36PM -0700, Roopa Prabhu wrote: > @@ -2757,6 +2796,12 @@ static int inet_rtm_getroute(struct sk_buff *in_skb, > struct nlmsghdr *nlh, > fl4.flowi4_oif = tb[RTA_OIF] ? nla_get_u32(tb[RTA_OIF]) : 0; > fl4.flowi4_mark = mark; > fl4.flowi4_uid = uid; >

Re: tcp hang when socket fills up ?

2018-04-17 Thread Michal Kubecek
On Mon, Apr 16, 2018 at 10:28:11PM -0700, Eric Dumazet wrote: > > I turned pr_debug on in tcp_in_window() for another try and it's a bit > > mangled because the information on multiple lines and the function is > > called in parallel but it looks like I do have some seq > maxend +1 > > > >

[PATCH] net: change the comment of dev_mc_init

2018-04-17 Thread sunlianwen
the comment of dev_mc_init() is wrong. which use dev_mc_flush instead of dev_mc_init. Signed-off-by:Lianwen Sun --- net/core/dev_addr_lists.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/core/dev_addr_lists.c b/net/core/dev_addr_lists.c

[PATCH net-next v4 3/3] cxgb4: collect hardware dump in second kernel

2018-04-17 Thread Rahul Lakkireddy
Register callback to collect hardware/firmware dumps in second kernel before hardware/firmware is initialized. The dumps for each device will be available as elf notes in /proc/vmcore in second kernel. Signed-off-by: Rahul Lakkireddy Signed-off-by: Ganesh Goudar

[PATCH net-next v4 2/3] vmcore: append device dumps to vmcore as elf notes

2018-04-17 Thread Rahul Lakkireddy
Update read and mmap logic to append device dumps as additional notes before the other elf notes. We add device dumps before other elf notes because the other elf notes may not fill the elf notes buffer completely and we will end up with zero-filled data between the elf notes and the device dumps.

[PATCH] bpf: btf: fix semicolon.cocci warnings

2018-04-17 Thread kbuild test robot
From: Fengguang Wu kernel/bpf/btf.c:353:2-3: Unneeded semicolon kernel/bpf/btf.c:280:2-3: Unneeded semicolon kernel/bpf/btf.c:663:2-3: Unneeded semicolon Remove unneeded semicolon. Generated by: scripts/coccinelle/misc/semicolon.cocci Fixes: b22ac5b97dd9 ("bpf: btf:

Re: [PATCH bpf-next v3 02/10] bpf: btf: Validate type reference

2018-04-17 Thread kbuild test robot
Hi Martin, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on bpf-next/master] url: https://github.com/0day-ci/linux/commits/Martin-KaFai-Lau/BTF-BPF-Type-Format/20180417-142247 base: https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master

Re: [PATCH 03/10] net: ax88796: Do not free IRQ in ax_remove() (already freed in ax_close()).

2018-04-17 Thread Sergei Shtylyov
Hello! On 4/17/2018 1:04 AM, Michael Schmitz wrote: From: John Paul Adrian Glaubitz This complements the fix in 82533ad9a1c that removed the free_irq You also need to specify the commit's summary line enclosed in (""). call in the error path of probe, to

[PATCH net-next] liquidio: Enhanced ethtool stats

2018-04-17 Thread Felix Manlunas
From: Intiyaz Basha 1. Added red_drops stats. Inbound packets dropped by RED, buffer exhaustion 2. Included fcs_err, jabber_err, l2_err and frame_err errors under rx_errors 3. Included fifo_err, dmac_drop, red_drops, fw_err_pko, fw_err_link and fw_err_drop under

[PATCH bpf-next 09/10] [bpf]: make tun compatible w/ bpf_xdp_adjust_tail

2018-04-17 Thread Nikita V. Shirokov
w/ bpf_xdp_adjust_tail helper xdp's data_end pointer could be changed as well (only "decrease" of pointer's location is going to be supported). changing of this pointer will change packet's size. for tun driver we need to adjust XDP_PASS handling by recalculating length of the packet if it was

[PATCH bpf-next 10/10] [bpf]: make virtio compatible w/ bpf_xdp_adjust_tail

2018-04-17 Thread Nikita V. Shirokov
w/ bpf_xdp_adjust_tail helper xdp's data_end pointer could be changed as well (only "decrease" of pointer's location is going to be supported). changing of this pointer will change packet's size. for virtio driver we need to adjust XDP_PASS handling by recalculating length of the packet if it was

net: 4.9-stable regression in drivers/net/phy/micrel.c on 4.9.94

2018-04-17 Thread Lars Persson
Hi We run into a NULL pointer dereference crash when booting 4.9.94 on our Artpec-6 board with stmmac ethernet and Micrel KSZ9031 phy. I traced this to the patch d7ba3c00047d ("net: phy: micrel: Restore led_mode and clk_sel on resume") that was added in 4.9.94. This patch makes kszphy_resume()

[PATCH/RFC net-next 0/5] ravb: updates

2018-04-17 Thread Simon Horman
Hi Sergei, this series is composed of otherwise unrelated RAVB patches from the R-Car BSP v3.6.2 which at a first pass seem worth considering for upstream. I would value your feedback on these patches so they can either proceed into net-next or remain local to the BSP. Thanks! Kazuya Mizuguchi

[PATCH/RFC net-next 1/5] ravb: fix inconsistent lock state at enabling tx timestamp

2018-04-17 Thread Simon Horman
From: Masaru Nagai [ 58.490829] = [ 58.495205] [ INFO: inconsistent lock state ] [ 58.499583] 4.9.0-yocto-standard-7-g2ef7caf #57 Not tainted [ 58.505529] - [ 58.509904] inconsistent

[PATCH/RFC net-next 5/5] ravb: remove tx buffer addr 4byte alilgnment restriction for R-Car Gen3

2018-04-17 Thread Simon Horman
From: Kazuya Mizuguchi This patch sets from two descriptor to one descriptor because R-Car Gen3 does not have the 4 bytes alignment restriction of the transmission buffer. Signed-off-by: Kazuya Mizuguchi Signed-off-by: Simon

[PATCH/RFC net-next 4/5] ravb: remove undocumented processing

2018-04-17 Thread Simon Horman
From: Kazuya Mizuguchi Signed-off-by: Kazuya Mizuguchi Signed-off-by: Simon Horman --- drivers/net/ethernet/renesas/ravb.h | 5 - drivers/net/ethernet/renesas/ravb_main.c | 15

[PATCH/RFC net-next 2/5] ravb: correct ptp does failure after suspend and resume

2018-04-17 Thread Simon Horman
From: Kazuya Mizuguchi This patch fixes the problem that ptp4l command does not work after suspend and resume. Add the initial setting in ravb_suspend() and ravb_resume(), because ptp does not work. Fixes: a0d2f20650e8 ("Renesas Ethernet AVB PTP clock driver")

[PATCH/RFC net-next 3/5] ravb: do not write 1 to reserved bits

2018-04-17 Thread Simon Horman
From: Kazuya Mizuguchi This patch corrects writing 1 to reserved bits. The write value should be 0. Signed-off-by: Kazuya Mizuguchi Signed-off-by: Simon Horman ---

[PATCH net-next v4 0/3] kernel: add support to collect hardware logs in crash recovery kernel

2018-04-17 Thread Rahul Lakkireddy
On production servers running variety of workloads over time, kernel panic can happen sporadically after days or even months. It is important to collect as much debug logs as possible to root cause and fix the problem, that may not be easy to reproduce. Snapshot of underlying hardware/firmware

[PATCH net-next v4 1/3] vmcore: add API to collect hardware dump in second kernel

2018-04-17 Thread Rahul Lakkireddy
The sequence of actions done by device drivers to append their device specific hardware/firmware logs to /proc/vmcore are as follows: 1. During probe (before hardware is initialized), device drivers register to the vmcore module (via vmcore_add_device_dump()), with callback function, along with

Re: [PATCH] VSOCK: make af_vsock.ko removable again

2018-04-17 Thread Jorgen S. Hansen
> On Apr 17, 2018, at 8:25 AM, Stefan Hajnoczi wrote: > > Commit c1eef220c1760762753b602c382127bfccee226d ("vsock: always call > vsock_init_tables()") introduced a module_init() function without a > corresponding module_exit() function. > > Modules with an init function

[PATCH net-next] vxlan: add ttl inherit support

2018-04-17 Thread Hangbin Liu
Like tos inherit, ttl inherit should also means inherit the inner protocol's ttl values, which actually not implemented in vxlan yet. But we could not treat ttl == 0 as "use the inner TTL", because that would be used also when the "ttl" option is not specified and that would be a behavior change,

[PATCH bpf-next 03/10] [bpf]: add bpf_xdp_adjust_tail sample prog

2018-04-17 Thread Nikita V. Shirokov
adding bpf's sample program which is using bpf_xdp_adjust_tail helper by generating ICMPv4 "packet to big" message if ingress packet's size is bigger then 600 bytes Signed-off-by: Nikita V. Shirokov --- samples/bpf/Makefile | 4 +

[PATCH bpf-next 00/10] introduction of bpf_xdp_adjust_tail

2018-04-17 Thread Nikita V. Shirokov
In this patch series i'm adding new bpf helper which allow to manupulate xdp's data_end pointer. right now only "shrinking" (reduce packet's size by moving pointer) is supported (and i see no use case for "growing"). Main use case for such helper is to be able to generate controll (ICMP) messages

[PATCH bpf-next 02/10] [bpf]: adding tests for bpf_xdp_adjust_tail

2018-04-17 Thread Nikita V. Shirokov
adding selftests for bpf_xdp_adjust_tail helper. in this syntetic test we are testing that 1) if data_end < data helper will return EINVAL 2) for normal use case packet's length would be reduced. aside from adding new tests i'm changing behaviour of bpf_prog_test_run so it would recalculate

[PATCH bpf-next 05/10] [bpf]: make mlx4 compatible w/ bpf_xdp_adjust_tail

2018-04-17 Thread Nikita V. Shirokov
w/ bpf_xdp_adjust_tail helper xdp's data_end pointer could be changed as well (only "decrease" of pointer's location is going to be supported). changing of this pointer will change packet's size. for mlx4 driver we will just calculate packet's length unconditionally (the same way as it's already

[PATCH bpf-next 04/10] [bpf]: make generic xdp compatible w/ bpf_xdp_adjust_tail

2018-04-17 Thread Nikita V. Shirokov
w/ bpf_xdp_adjust_tail helper xdp's data_end pointer could be changed as well (only "decrease" of pointer's location is going to be supported). changing of this pointer will change packet's size. for generic XDP we need to reflect this packet's length change by adjusting skb's tail pointer

Re: tcp hang when socket fills up ?

2018-04-17 Thread Michal Kubecek
On Mon, Apr 16, 2018 at 10:28:11PM -0700, Eric Dumazet wrote: > > I turned pr_debug on in tcp_in_window() for another try and it's a bit > > mangled because the information on multiple lines and the function is > > called in parallel but it looks like I do have some seq > maxend +1 > > > >

[PATCH bpf-next 06/10] [bpf]: make bnxt compatible w/ bpf_xdp_adjust_tail

2018-04-17 Thread Nikita V. Shirokov
w/ bpf_xdp_adjust_tail helper xdp's data_end pointer could be changed as well (only "decrease" of pointer's location is going to be supported). changing of this pointer will change packet's size. for bnxt driver we will just calculate packet's length unconditionally Signed-off-by: Nikita V.

[PATCH bpf-next 08/10] [bpf]: make netronome nfp compatible w/ bpf_xdp_adjust_tail

2018-04-17 Thread Nikita V. Shirokov
w/ bpf_xdp_adjust_tail helper xdp's data_end pointer could be changed as well (only "decrease" of pointer's location is going to be supported). changing of this pointer will change packet's size. for nfp driver we will just calculate packet's length unconditionally Signed-off-by: Nikita V.

Re: XDP performance regression due to CONFIG_RETPOLINE Spectre V2

2018-04-17 Thread Jesper Dangaard Brouer
On Mon, 16 Apr 2018 23:15:50 -0700 Christoph Hellwig wrote: > On Mon, Apr 16, 2018 at 11:07:04PM +0200, Jesper Dangaard Brouer wrote: > > On X86 swiotlb fallback (via get_dma_ops -> get_arch_dma_ops) to use > > x86_swiotlb_dma_ops, instead of swiotlb_dma_ops. I also included

[PATCH net-next 1/3] net: phy: Add binding for vendor specific C45 MDIO address space

2018-04-17 Thread Vicentiu Galanopulo
The extra property enables the discovery on the MDIO bus of the PHYs which have a vendor specific address space for accessing the C45 MDIO registers. Signed-off-by: Vicentiu Galanopulo --- Documentation/devicetree/bindings/net/phy.txt | 6 ++ 1 file changed, 6

[PATCH net] vlan: Fix reading memory beyond skb->tail in skb_vlan_tagged_multi

2018-04-17 Thread Toshiaki Makita
Syzkaller spotted an old bug which leads to reading skb beyond tail by 4 bytes on vlan tagged packets. This is caused because skb_vlan_tagged_multi() did not check skb_headlen. BUG: KMSAN: uninit-value in eth_type_vlan include/linux/if_vlan.h:283 [inline] BUG: KMSAN: uninit-value in

Re: [PATCH net 1/2] tipc: add policy for TIPC_NLA_NET_ADDR

2018-04-17 Thread Ying Xue
On 04/16/2018 11:29 PM, Eric Dumazet wrote: > Before syzbot/KMSAN bites, add the missing policy for TIPC_NLA_NET_ADDR > > Fixes: 27c21416727a ("tipc: add net set to new netlink api") > Signed-off-by: Eric Dumazet > Cc: Jon Maloy > Cc: Ying Xue

[PATCHv2 net-next] vxlan: add ttl inherit support

2018-04-17 Thread Hangbin Liu
Like tos inherit, ttl inherit should also means inherit the inner protocol's ttl values, which actually not implemented in vxlan yet. But we could not treat ttl == 0 as "use the inner TTL", because that would be used also when the "ttl" option is not specified and that would be a behavior change,

Re: [PATCH v2 3/8] net: ax88796: Do not free IRQ in ax_remove() (already freed in ax_close()).

2018-04-17 Thread John Paul Adrian Glaubitz
On 04/17/2018 04:08 AM, Michael Schmitz wrote: From: John Paul Adrian Glaubitz This should be: From: Michael Karcher -- .''`. John Paul Adrian Glaubitz : :' : Debian Developer - glaub...@debian.org `. `' Freie

Re: [PATCH v2 6/8] net: ax88796: set IRQF_SHARED flag when IRQ resource is marked as shareable

2018-04-17 Thread John Paul Adrian Glaubitz
On 04/17/2018 04:08 AM, Michael Schmitz wrote: From: John Paul Adrian Glaubitz This should be: From: Michael Karcher -- .''`. John Paul Adrian Glaubitz : :' : Debian Developer - glaub...@debian.org `. `' Freie

Re: [linux-sunxi] Re: [PATCH 3/5] net: stmmac: dwmac-sun8i: Allow getting syscon regmap from device

2018-04-17 Thread Icenowy Zheng
于 2018年4月17日 GMT+08:00 下午7:59:38, Chen-Yu Tsai 写到: >On Tue, Apr 17, 2018 at 7:52 PM, Maxime Ripard > wrote: >> On Mon, Apr 16, 2018 at 10:51:55PM +0800, Chen-Yu Tsai wrote: >>> On Mon, Apr 16, 2018 at 10:31 PM, Maxime Ripard >>>

[PATCH] net: qrtr: add MODULE_ALIAS_NETPROTO macro

2018-04-17 Thread Nicolas Dechesne
To ensure that qrtr can be loaded automatically, when needed, if it is compiled as module. Signed-off-by: Nicolas Dechesne --- net/qrtr/qrtr.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/qrtr/qrtr.c b/net/qrtr/qrtr.c index b33e5aeb4c06..2aa07b547b16

[PATCH net] sfc: check RSS is active for filter insert

2018-04-17 Thread Bert Kenward
For some firmware variants - specifically 'capture packed stream' - RSS filters are not valid. We must check if RSS is actually active rather than merely enabled. Fixes: 42356d9a137b ("sfc: support RSS spreading of ethtool ntuple filters") Signed-off-by: Bert Kenward ---

Re: [PATCH/RFC net-next 2/5] ravb: correct ptp does failure after suspend and resume

2018-04-17 Thread Wolfram Sang
> @@ -2302,6 +2305,7 @@ static int __maybe_unused ravb_resume(struct device > *dev) > { > struct net_device *ndev = dev_get_drvdata(dev); > struct ravb_private *priv = netdev_priv(ndev); > + struct platform_device *pdev = priv->pdev; Minor nit: I'd save this line... > + if

Re: [PATCH bpf-next 1/3] bpftool: Add missing prog types and attach types

2018-04-17 Thread Quentin Monnet
2018-04-16 16:57 UTC-0700 ~ Andrey Ignatov > Jakub Kicinski [Mon, 2018-04-16 16:53 -0700]: >> On Mon, 16 Apr 2018 14:41:57 -0700, Andrey Ignatov wrote: >>> diff --git a/tools/bpf/bpftool/cgroup.c b/tools/bpf/bpftool/cgroup.c >>> index cae32a6..8689916 100644 >>> ---

Re: [linux-sunxi] Re: [PATCH 3/5] net: stmmac: dwmac-sun8i: Allow getting syscon regmap from device

2018-04-17 Thread Chen-Yu Tsai
On Tue, Apr 17, 2018 at 7:52 PM, Maxime Ripard wrote: > On Mon, Apr 16, 2018 at 10:51:55PM +0800, Chen-Yu Tsai wrote: >> On Mon, Apr 16, 2018 at 10:31 PM, Maxime Ripard >> wrote: >> > On Thu, Apr 12, 2018 at 11:23:30PM +0800, Chen-Yu Tsai

Re: tcp hang when socket fills up ?

2018-04-17 Thread Dominique Martinet
Michal Kubecek wrote on Tue, Apr 17, 2018: > Data (21 bytes) packet in reply direction. And somewhere between the > first and second debugging print, we ended up with sender scale=0 and > that value is then preserved from now on. > > The only place between the two debug prints where we could

Re: [PATCH net-next 2/3] net: phy: Change the array size to 32 for device_ids

2018-04-17 Thread Andrew Lunn
On Tue, Apr 17, 2018 at 04:02:32AM -0500, Vicentiu Galanopulo wrote: > In the context of enabling the discovery of the PHYs > which have the C45 MDIO address space in a non-standard > address: num_ids in get_phy_c45_ids, has the > value 8 (ARRAY_SIZE(c45_ids->device_ids)), but the > u32 *devs can

Re: [PATCH net-next 1/3] net: phy: Add binding for vendor specific C45 MDIO address space

2018-04-17 Thread Andrew Lunn
On Tue, Apr 17, 2018 at 04:02:31AM -0500, Vicentiu Galanopulo wrote: > The extra property enables the discovery on the MDIO bus > of the PHYs which have a vendor specific address space > for accessing the C45 MDIO registers. > > Signed-off-by: Vicentiu Galanopulo Hi

Re: [PATCH 08/10] net: ax88796: Make reset more robust on AX88796B

2018-04-17 Thread Andrew Lunn
On Tue, Apr 17, 2018 at 07:18:10AM +0200, Michael Karcher wrote: > [Andrew, sorry for the dup. I did hit reply-to-auhor instead of > reply-to-all first.] > > Andrew Lunn schrieb: > >> > This should really be fixed in the PHY driver, not the MAC. > >> > >> OK - do you want this separate, or as

[PATCH net-next] cxgb4vf: display pause settings

2018-04-17 Thread Ganesh Goudar
Add support to display pause settings Signed-off-by: Ganesh Goudar --- drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c | 16 1 file changed, 16 insertions(+) diff --git a/drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c

[PATCH RESEND net-next] ipv6: provide Kconfig switch to disable accept_ra by default

2018-04-17 Thread Matthias Schiffer
Many distributions and users prefer to handle router advertisements in userspace; one example is OpenWrt, which includes a combined RA and DHCPv6 client. For such configurations, accept_ra should not be enabled by default. As setting net.ipv6.conf.default.accept_ra via sysctl.conf or similar

Re: [PATCH/RFC net-next 1/5] ravb: fix inconsistent lock state at enabling tx timestamp

2018-04-17 Thread Wolfram Sang
On Tue, Apr 17, 2018 at 10:50:26AM +0200, Simon Horman wrote: > From: Masaru Nagai > > [ 58.490829] = > [ 58.495205] [ INFO: inconsistent lock state ] > [ 58.499583] 4.9.0-yocto-standard-7-g2ef7caf #57 Not tainted > [

Re: [linux-sunxi] Re: [PATCH 3/5] net: stmmac: dwmac-sun8i: Allow getting syscon regmap from device

2018-04-17 Thread Maxime Ripard
On Mon, Apr 16, 2018 at 10:51:55PM +0800, Chen-Yu Tsai wrote: > On Mon, Apr 16, 2018 at 10:31 PM, Maxime Ripard > wrote: > > On Thu, Apr 12, 2018 at 11:23:30PM +0800, Chen-Yu Tsai wrote: > >> On Thu, Apr 12, 2018 at 11:11 PM, Icenowy Zheng wrote: > >>

Re: [PATCH net-next 3/3] net: phy: Enable C45 PHYs with vendor specific address space

2018-04-17 Thread Andrew Lunn
On Tue, Apr 17, 2018 at 04:02:33AM -0500, Vicentiu Galanopulo wrote: > A search of the dev-addr property is done in of_mdiobus_register. > If the property is found in the PHY node, of_mdiobus_register_vend_spec_phy() > is called. This is a wrapper function for of_mdiobus_register_phy() > which

Re: [PATCH/RFC net-next 4/5] ravb: remove undocumented processing

2018-04-17 Thread Wolfram Sang
On Tue, Apr 17, 2018 at 10:50:29AM +0200, Simon Horman wrote: > From: Kazuya Mizuguchi > > Signed-off-by: Kazuya Mizuguchi > Signed-off-by: Simon Horman > --- > drivers/net/ethernet/renesas/ravb.h

Re: [RFC v2] virtio: support packed ring

2018-04-17 Thread Tiwei Bie
On Tue, Apr 17, 2018 at 03:17:41PM +0300, Michael S. Tsirkin wrote: > On Tue, Apr 17, 2018 at 10:51:33AM +0800, Tiwei Bie wrote: > > On Tue, Apr 17, 2018 at 10:11:58AM +0800, Jason Wang wrote: > > > On 2018年04月13日 15:15, Tiwei Bie wrote: > > > > On Fri, Apr 13, 2018 at 12:30:24PM +0800, Jason Wang

Re: [RFC v2] virtio: support packed ring

2018-04-17 Thread Michael S. Tsirkin
On Tue, Apr 17, 2018 at 10:51:33AM +0800, Tiwei Bie wrote: > On Tue, Apr 17, 2018 at 10:11:58AM +0800, Jason Wang wrote: > > On 2018年04月13日 15:15, Tiwei Bie wrote: > > > On Fri, Apr 13, 2018 at 12:30:24PM +0800, Jason Wang wrote: > > > > On 2018年04月01日 22:12, Tiwei Bie wrote: > [...] > > > > >

Re: tcp hang when socket fills up ?

2018-04-17 Thread Michal Kubecek
On Tue, Apr 17, 2018 at 02:34:37PM +0200, Dominique Martinet wrote: > Michal Kubecek wrote on Tue, Apr 17, 2018: > > Data (21 bytes) packet in reply direction. And somewhere between the > > first and second debugging print, we ended up with sender scale=0 and > > that value is then preserved from

[net-next V10 PATCH 16/16] xdp: transition into using xdp_frame for ndo_xdp_xmit

2018-04-17 Thread Jesper Dangaard Brouer
Changing API ndo_xdp_xmit to take a struct xdp_frame instead of struct xdp_buff. This brings xdp_return_frame and ndp_xdp_xmit in sync. This builds towards changing the API further to become a bulk API, because xdp_buff is not a queue-able object while xdp_frame is. V4: Adjust for commit

[net-next V10 PATCH 15/16] xdp: transition into using xdp_frame for return API

2018-04-17 Thread Jesper Dangaard Brouer
Changing API xdp_return_frame() to take struct xdp_frame as argument, seems like a natural choice. But there are some subtle performance details here that needs extra care, which is a deliberate choice. When de-referencing xdp_frame on a remote CPU during DMA-TX completion, result in the

[net-next V10 PATCH 14/16] mlx5: use page_pool for xdp_return_frame call

2018-04-17 Thread Jesper Dangaard Brouer
This patch shows how it is possible to have both the driver local page cache, which uses elevated refcnt for "catching"/avoiding SKB put_page returns the page through the page allocator. And at the same time, have pages getting returned to the page_pool from ndp_xdp_xmit DMA completion. The

[net-next V10 PATCH 12/16] page_pool: refurbish version of page_pool code

2018-04-17 Thread Jesper Dangaard Brouer
Need a fast page recycle mechanism for ndo_xdp_xmit API for returning pages on DMA-TX completion time, which have good cross CPU performance, given DMA-TX completion time can happen on a remote CPU. Refurbish my page_pool code, that was presented[1] at MM-summit 2016. Adapted page_pool code to

[net-next V10 PATCH 13/16] xdp: allow page_pool as an allocator type in xdp_return_frame

2018-04-17 Thread Jesper Dangaard Brouer
New allocator type MEM_TYPE_PAGE_POOL for page_pool usage. The registered allocator page_pool pointer is not available directly from xdp_rxq_info, but it could be (if needed). For now, the driver should keep separate track of the page_pool pointer, which it should use for RX-ring page

[PATCH net-next] ipv6: send netlink notifications for manually configured addresses

2018-04-17 Thread Lorenzo Bianconi
Send a netlink notification when userspace adds a manually configured address if DAD is enabled and optimistic flag isn't set. Moreover send RTM_DELADDR notifications for tentative addresses. Some userspace applications (e.g. NetworkManager) are interested in addr netlink events albeit the

Re: [PATCH 4/4] dt-bindings: Document the DT bindings for lan78xx

2018-04-17 Thread Phil Elwell
On 16/04/2018 20:22, Rob Herring wrote: > On Thu, Apr 12, 2018 at 02:55:36PM +0100, Phil Elwell wrote: >> The Microchip LAN78XX family of devices are Ethernet controllers with >> a USB interface. Despite being discoverable devices it can be useful to >> be able to configure them from Device Tree,

Re: [PATCH net 2/2] tipc: fix possible crash in __tipc_nl_net_set()

2018-04-17 Thread Ying Xue
On 04/16/2018 11:29 PM, Eric Dumazet wrote: > syzbot reported a crash in __tipc_nl_net_set() caused by NULL dereference. > > We need to check that both TIPC_NLA_NET_NODEID and TIPC_NLA_NET_NODEID_W1 > are present. > > We also need to make sure userland provided u64 attributes. > > Fixes:

[net-next V10 PATCH 04/16] xdp: move struct xdp_buff from filter.h to xdp.h

2018-04-17 Thread Jesper Dangaard Brouer
This is done to prepare for the next patch, and it is also nice to move this XDP related struct out of filter.h. Signed-off-by: Jesper Dangaard Brouer --- include/linux/filter.h | 24 +--- include/net/xdp.h | 22 ++ 2 files

[net-next V10 PATCH 06/16] tun: convert to use generic xdp_frame and xdp_return_frame API

2018-04-17 Thread Jesper Dangaard Brouer
From: Jesper Dangaard Brouer The tuntap driver invented it's own driver specific way of queuing XDP packets, by storing the xdp_buff information in the top of the XDP frame data. Convert it over to use the more generic xdp_frame structure. The main problem with the in-driver

[net-next V10 PATCH 07/16] virtio_net: convert to use generic xdp_frame and xdp_return_frame API

2018-04-17 Thread Jesper Dangaard Brouer
The virtio_net driver assumes XDP frames are always released based on page refcnt (via put_page). Thus, is only queues the XDP data pointer address and uses virt_to_head_page() to retrieve struct page. Use the XDP return API to get away from such assumptions. Instead queue an xdp_frame, which

[net-next V10 PATCH 08/16] bpf: cpumap convert to use generic xdp_frame

2018-04-17 Thread Jesper Dangaard Brouer
The generic xdp_frame format, was inspired by the cpumap own internal xdp_pkt format. It is now time to convert it over to the generic xdp_frame format. The cpumap needs one extra field dev_rx. Signed-off-by: Jesper Dangaard Brouer --- include/net/xdp.h |1 +

[net-next V10 PATCH 11/16] xdp: rhashtable with allocator ID to pointer mapping

2018-04-17 Thread Jesper Dangaard Brouer
Use the IDA infrastructure for getting a cyclic increasing ID number, that is used for keeping track of each registered allocator per RX-queue xdp_rxq_info. Instead of using the IDR infrastructure, which uses a radix tree, use a dynamic rhashtable, for creating ID to pointer lookup table, because

[net-next V10 PATCH 10/16] mlx5: register a memory model when XDP is enabled

2018-04-17 Thread Jesper Dangaard Brouer
Now all the users of ndo_xdp_xmit have been converted to use xdp_return_frame. This enable a different memory model, thus activating another code path in the xdp_return_frame API. V2: Fixed issues pointed out by Tariq. Signed-off-by: Jesper Dangaard Brouer Reviewed-by: Tariq

[net-next V10 PATCH 09/16] i40e: convert to use generic xdp_frame and xdp_return_frame API

2018-04-17 Thread Jesper Dangaard Brouer
Also convert driver i40e, which very recently got XDP_REDIRECT support in commit d9314c474d4f ("i40e: add support for XDP_REDIRECT"). V7: This patch got added in V7 of this patchset. Signed-off-by: Jesper Dangaard Brouer --- drivers/net/ethernet/intel/i40e/i40e_txrx.c | 20

[net-next V10 PATCH 01/16] mlx5: basic XDP_REDIRECT forward support

2018-04-17 Thread Jesper Dangaard Brouer
This implements basic XDP redirect support in mlx5 driver. Notice that the ndo_xdp_xmit() is NOT implemented, because that API need some changes that this patchset is working towards. The main purpose of this patch is have different drivers doing XDP_REDIRECT to show how different memory models

[net-next V10 PATCH 02/16] xdp: introduce xdp_return_frame API and use in cpumap

2018-04-17 Thread Jesper Dangaard Brouer
Introduce an xdp_return_frame API, and convert over cpumap as the first user, given it have queued XDP frame structure to leverage. V3: Cleanup and remove C99 style comments, pointed out by Alex Duyck. V6: Remove comment that id will be added later (Req by Alex Duyck) V8: Rename enum mem_type to

[net-next V10 PATCH 03/16] ixgbe: use xdp_return_frame API

2018-04-17 Thread Jesper Dangaard Brouer
Extend struct ixgbe_tx_buffer to store the xdp_mem_info. Notice that this could be optimized further by putting this into a union in the struct ixgbe_tx_buffer, but this patchset works towards removing this again. Thus, this is not done. Signed-off-by: Jesper Dangaard Brouer

[net-next V10 PATCH 05/16] xdp: introduce a new xdp_frame type

2018-04-17 Thread Jesper Dangaard Brouer
This is needed to convert drivers tuntap and virtio_net. This is a generalization of what is done inside cpumap, which will be converted later. Signed-off-by: Jesper Dangaard Brouer --- include/net/xdp.h | 40 1 file changed, 40

[net-next V10 PATCH 00/16] XDP redirect memory return API

2018-04-17 Thread Jesper Dangaard Brouer
Resubmit V10 against net-next, as it contains NIC driver changes. This patchset works towards supporting different XDP RX-ring memory allocators. As this will be needed by the AF_XDP zero-copy mode. The patchset uses mlx5 as the sample driver, which gets implemented XDP_REDIRECT RX-mode, but

Re: XDP performance regression due to CONFIG_RETPOLINE Spectre V2

2018-04-17 Thread Christoph Hellwig
On Mon, Apr 16, 2018 at 11:07:04PM +0200, Jesper Dangaard Brouer wrote: > On X86 swiotlb fallback (via get_dma_ops -> get_arch_dma_ops) to use > x86_swiotlb_dma_ops, instead of swiotlb_dma_ops. I also included that > in below fix patch. x86_swiotlb_dma_ops should not exist any mor, and x86 now

[PATCH] VSOCK: make af_vsock.ko removable again

2018-04-17 Thread Stefan Hajnoczi
Commit c1eef220c1760762753b602c382127bfccee226d ("vsock: always call vsock_init_tables()") introduced a module_init() function without a corresponding module_exit() function. Modules with an init function can only be removed if they also have an exit function. Therefore the vsock module was

Re: [PATCH 1/1] net/mlx4_core: avoid resetting HCA when accessing an offline device

2018-04-17 Thread Tariq Toukan
On 16/04/2018 7:51 PM, David Miller wrote: From: Zhu Yanjun Date: Sun, 15 Apr 2018 21:02:07 -0400 While a faulty cable is used or HCA firmware error, HCA device will be offline. When the driver is accessing this offline device, the following call trace will pop out.

Re: XDP performance regression due to CONFIG_RETPOLINE Spectre V2

2018-04-17 Thread Christoph Hellwig
On Tue, Apr 17, 2018 at 09:07:01AM +0200, Jesper Dangaard Brouer wrote: > > > number should improve more). > > > > What is the number for the otherwise comparable setup without repolines? > > Approx 12 Mpps. > > You forgot to handle the dma_direct_mapping_error() case, which still > used the

Re: [PATCH v2 3/8] net: ax88796: Do not free IRQ in ax_remove() (already freed in ax_close()).

2018-04-17 Thread Geert Uytterhoeven
Hi Michael, Adrian, Thanks for your patch! On Tue, Apr 17, 2018 at 4:08 AM, Michael Schmitz wrote: > From: John Paul Adrian Glaubitz > > This complements the fix in 82533ad9a1c that removed the free_irq Please quote the commit's subject,

RE: [PATCH 0/3] Receive Side Coalescing for macb driver

2018-04-17 Thread Rafal Ozieblo
From: David Miller [mailto:da...@davemloft.net] Sent: 16 kwietnia 2018 17:09 > From: Rafal Ozieblo > Date: Sat, 14 Apr 2018 21:53:07 +0100 > >> This patch series adds support for receive side coalescing for Cadence >> GEM driver. Receive segmentation coalescing is a

Re: [PATCH v2 2/8] net: ax88796: Attach MII bus only when open

2018-04-17 Thread Andrew Lunn
On Tue, Apr 17, 2018 at 02:08:09PM +1200, Michael Schmitz wrote: > From: Michael Karcher > > Call ax_mii_init in ax_open(), and unregister/remove mdiobus resources > in ax_close(). > > This is needed to be able to unload the module, as the module is busy >

Re: [PATCH v2 8/8] net: New ax88796 platform driver for Amiga X-Surf 100 Zorro board (m68k)

2018-04-17 Thread Andrew Lunn
On Tue, Apr 17, 2018 at 02:08:15PM +1200, Michael Schmitz wrote: > Add platform device driver to populate the ax88796 platform data from > information provided by the XSurf100 zorro device driver. > This driver will have to be loaded before loading the ax88796 module, > or compiled as built-in. >

Re: [RFC v2] virtio: support packed ring

2018-04-17 Thread Michael S. Tsirkin
On Tue, Apr 17, 2018 at 08:47:16PM +0800, Tiwei Bie wrote: > On Tue, Apr 17, 2018 at 03:17:41PM +0300, Michael S. Tsirkin wrote: > > On Tue, Apr 17, 2018 at 10:51:33AM +0800, Tiwei Bie wrote: > > > On Tue, Apr 17, 2018 at 10:11:58AM +0800, Jason Wang wrote: > > > > On 2018年04月13日 15:15, Tiwei Bie

[bpf-next PATCH] samples/bpf: fix xdp_monitor user output for tracepoint exception

2018-04-17 Thread Jesper Dangaard Brouer
The variable rec_i contains an XDP action code not an error. Thus, using err2str() was wrong, it should have been action2str(). Signed-off-by: Jesper Dangaard Brouer --- samples/bpf/xdp_monitor_user.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

Re: [PATCH bpf-next 01/10] [bpf]: adding bpf_xdp_adjust_tail helper

2018-04-17 Thread kbuild test robot
Hi Nikita, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on bpf-next/master] url: https://github.com/0day-ci/linux/commits/Nikita-V-Shirokov/introduction-of-bpf_xdp_adjust_tail/20180417-211905 base: https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf

Re: [PATCH/RFC net-next 1/5] ravb: fix inconsistent lock state at enabling tx timestamp

2018-04-17 Thread David Miller
From: Simon Horman Date: Tue, 17 Apr 2018 10:50:26 +0200 > From: Masaru Nagai > > [ 58.490829] = > [ 58.495205] [ INFO: inconsistent lock state ] > [ 58.499583] 4.9.0-yocto-standard-7-g2ef7caf

Re: One question about __tcp_select_window()

2018-04-17 Thread Eric Dumazet
On 04/17/2018 06:53 AM, Wang Jian wrote: > I test the fix with 4.17.0-rc1+ and it seems work. > > 1. iperf -c IP -i 20 -t 60 -w 1K > with-fix vs without-fix : 1.15Gbits/sec vs 1.05Gbits/sec > I also try other windows and have similar results. > > 2. Use tcp probe trace snd_wind. > with-fix vs

Re: One question about __tcp_select_window()

2018-04-17 Thread Wang Jian
I test the fix with 4.17.0-rc1+ and it seems work. 1. iperf -c IP -i 20 -t 60 -w 1K with-fix vs without-fix : 1.15Gbits/sec vs 1.05Gbits/sec I also try other windows and have similar results. 2. Use tcp probe trace snd_wind. with-fix vs without-fix: 1245568 vs 1042816 3. I don't see extra

Re: [net-next V10 PATCH 00/16] XDP redirect memory return API

2018-04-17 Thread David Miller
From: Jesper Dangaard Brouer Date: Tue, 17 Apr 2018 14:58:52 +0200 > Resubmit V10 against net-next, as it contains NIC driver changes. Series applied, thanks Jesper.

Re: [PATCH v2 3/8] net: ax88796: Do not free IRQ in ax_remove() (already freed in ax_close()).

2018-04-17 Thread David Miller
From: Geert Uytterhoeven Date: Tue, 17 Apr 2018 10:20:25 +0200 > BTW, I have a git alias for that: > > $ git help fixes > `git fixes' is aliased to `show --format='Fixes: %h ("%s")' -s' > $ git fixes 82533ad9a1c > Fixes: 82533ad9a1c ("net: ethernet: ax88796: don't call

Re: [net-next V10 PATCH 00/16] XDP redirect memory return API

2018-04-17 Thread David Miller
From: Alexei Starovoitov Date: Tue, 17 Apr 2018 06:53:33 -0700 > looks like you forgot to include extra patch to fixup xdp_adjust_head() > helper. Otherwise reused xdp_frame in the top of that packet is leaking > kernel pointers into bpf program. > Could you please

  1   2   3   4   5   >