Re: [PATCH net-next 0/5] virtio-net: Add SCTP checksum offload support

2018-04-17 Thread Xin Long
On Wed, Apr 18, 2018 at 9:33 AM, Marcelo Ricardo Leitner wrote: > On Tue, Apr 17, 2018 at 04:35:18PM -0400, Vlad Yasevich wrote: >> On 04/02/2018 10:47 AM, Marcelo Ricardo Leitner wrote: >> > On Mon, Apr 02, 2018 at 09:40:01AM -0400, Vladislav Yasevich wrote: >> >> Now that we have SCTP offload ca

[PATCH 6/6] rhashtable: add rhashtable_walk_prev()

2018-04-17 Thread NeilBrown
rhashtable_walk_prev() returns the object returned by the previous rhashtable_walk_next(), providing it is still in the table (or was during this grace period). This works even if rhashtable_walk_stop() and rhashtable_talk_start() have been called since the last rhashtable_walk_next(). If there ha

[PATCH 5/6] rhashtable: further improve stability of rhashtable_walk

2018-04-17 Thread NeilBrown
If the sequence: obj = rhashtable_walk_next(iter); rhashtable_walk_stop(iter); rhashtable_remove_fast(ht, &obj->head, params); rhashtable_walk_start(iter); races with another thread inserting or removing an object on the same hash chain, a subsequent rhashtable_walk_next() is not gu

[PATCH 0/6] Assorted rhashtable improvements.

2018-04-17 Thread NeilBrown
Some of these have been posted before and a couple received an Ack from Herbert, but haven't appeared in any git tree yet. Another (the first) has been sent but received no ack. I've added the second patch, which removes more incorrect documentation, and added the last two patches. One further im

[PATCH 3/6] rhashtable: reset iter when rhashtable_walk_start sees new table

2018-04-17 Thread NeilBrown
The documentation claims that when rhashtable_walk_start_check() detects a resize event, it will rewind back to the beginning of the table. This is not true. We need to set ->slot and ->skip to be zero for it to be true. Acked-by: Herbert Xu Signed-off-by: NeilBrown --- lib/rhashtable.c |

[PATCH 4/6] rhashtable: improve rhashtable_walk stability when stop/start used.

2018-04-17 Thread NeilBrown
When a walk of an rhashtable is interrupted with rhastable_walk_stop() and then rhashtable_walk_start(), the location to restart from is based on a 'skip' count in the current hash chain, and this can be incorrect if insertions or deletions have happened. This does not happen when the walk is not

[PATCH 1/6] rhashtable: remove outdated comments about grow_decision etc

2018-04-17 Thread NeilBrown
grow_decision and shink_decision no longer exist, so remove the remaining references to them. Signed-off-by: NeilBrown --- include/linux/rhashtable.h | 33 ++--- 1 file changed, 14 insertions(+), 19 deletions(-) diff --git a/include/linux/rhashtable.h b/include/lin

[PATCH 2/6] rhashtable: remove incorrect comment on r{hl, hash}table_walk_enter()

2018-04-17 Thread NeilBrown
Neither rhashtable_walk_enter() or rhltable_walk_enter() sleep, so remove the comments which suggest that they do. Signed-off-by: NeilBrown --- include/linux/rhashtable.h |3 --- lib/rhashtable.c |3 --- 2 files changed, 6 deletions(-) diff --git a/include/linux/rhashtable.h b

[PATCH net-next 4/4] tcp: export packets delivery info

2018-04-17 Thread Yuchung Cheng
Export data delivered and delivered with CE marks to 1) SNMP TCPDelivered and TCPDeliveredCE 2) getsockopt(TCP_INFO) 3) Timestamping API SOF_TIMESTAMPING_OPT_STATS Note that for SCM_TSTAMP_ACK, the delivery info in SOF_TIMESTAMPING_OPT_STATS is reported before the info was fully updated on the ACK

[PATCH net-next 0/4] tracking TCP data delivery and ECN stats

2018-04-17 Thread Yuchung Cheng
This patch series improve tracking the data delivery status 1. minor improvement on SYN data 2. accounting bytes delivered with CE marks 3. exporting the delivery stats to applications s.t. users can get better sense of TCP performance at per host, per connection, and even per application me

[PATCH net-next 3/4] tcp: track total bytes delivered with ECN CE marks

2018-04-17 Thread Yuchung Cheng
Introduce a new delivered_ce stat in tcp socket to estimate number of packets being marked with CE bits. The estimation is done via ACKs with ECE bit. Depending on the actual receiver behavior, the estimation could have biases. Since the TCP sender can't really see the CE bit in the data path, so

[PATCH net-next 1/4] tcp: better delivery accounting for SYN-ACK and SYN-data

2018-04-17 Thread Yuchung Cheng
the tcp_sock:delivered has inconsistent accounting for SYN and FIN. 1. it counts pure FIN 2. it counts pure SYN 3. it counts SYN-data twice 4. it does not count SYN-ACK For congestion control perspective it does not matter much as C.C. only cares about the difference not the aboslute value. But th

[PATCH net-next 2/4] tcp: new helper to calculate newly delivered

2018-04-17 Thread Yuchung Cheng
Add new helper tcp_newly_delivered() to prepare the ECN accounting change. Signed-off-by: Yuchung Cheng Reviewed-by: Neal Cardwell Reviewed-by: Soheil Hassas Yeganeh Reviewed-by: Eric Dumazet --- net/ipv4/tcp_input.c | 17 +++-- 1 file changed, 15 insertions(+), 2 deletions(-) di

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

2018-04-17 Thread Dave Young
Hi Rahul, On 04/17/18 at 01:14pm, Rahul Lakkireddy wrote: > 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 b

[PATCH bpf-next v2 01/11] 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. --- include/uapi/linux/bpf.h | 10 +- net/core/fi

[PATCH bpf-next v2 06/11] 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 Acked-by: Alexei Starovoitov Ac

[PATCH bpf-next v2 03/11] 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 be

[PATCH bpf-next v2 07/11] 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 pass

[PATCH bpf-next v2 08/11] 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 p

[PATCH bpf-next v2 05/11] 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 Acked-by: Alexei St

[PATCH bpf-next v2 09/11] bpf: making bpf_prog_test run aware of possible data_end ptr change

2018-04-17 Thread Nikita V. Shirokov
after introduction of bpf_xdp_adjust_tail helper packet length could be changed not only if xdp->data pointer has been changed but xdp->data_end as well. making bpf_prog_test_run aware of this possibility --- net/bpf/test_run.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/

[PATCH bpf-next v2 10/11] 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 synthetic 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. --- tools/include/uapi/linux/bpf.h | 10 +++- tools/testing/selftests/bpf/Makefil

[PATCH bpf-next v2 11/11] 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 --- samples/bpf/Makefile | 4 + samples/bpf/xdp_adjust_tail_kern.c| 152 ++

[PATCH bpf-next v2 04/11] 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 Acked-by: Alexei Starovoitov -

[PATCH bpf-next v2 02/11] 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 Acked-b

[PATCH bpf-next v2 00/11] introduction of bpf_xdp_adjust_tail

2018-04-17 Thread Nikita V. Shirokov
In this patch series i'm add 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 from

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

2018-04-17 Thread Yanjun Zhu
On 2018/4/17 23:37, Tariq Toukan wrote: On 16/04/2018 4:02 AM, Zhu Yanjun wrote: 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. " ...    [] dump_stack+0x63/0x81    [] pa

Re: [PATCH v3 00/10] New network driver for Amiga X-Surf 100 (m68k)

2018-04-17 Thread Finn Thain
On Wed, 18 Apr 2018, Michael Schmitz wrote: > All, > > just noticed belatedly that the Makefile hunk of patch 9 does no > longer apply cleanly in 4.17-rc1, sorry. My series was based on 4.16. > I'll resend that one, OK? > I might end up simpler to resend the whole series -- > Cheers, > > Mi

Re: [PATCH v3 00/10] New network driver for Amiga X-Surf 100 (m68k)

2018-04-17 Thread Michael Schmitz
All, just noticed belatedly that the Makefile hunk of patch 9 does no longer apply cleanly in 4.17-rc1, sorry. My series was based on 4.16. I'll resend that one, OK? Cheers, Michael On Wed, Apr 18, 2018 at 4:26 PM, Michael Schmitz wrote: > This patch series adds support for the Individual C

Re: [Regression] net/phy/micrel.c v4.9.94

2018-04-17 Thread Chris Ruehl
On Wednesday, April 18, 2018 09:34 AM, Chris Ruehl wrote: Hello, I like to get your heads up at a regression introduced in 4.9.94 commitment lead to a kernel ops and make the network unusable on my MX6DL customized board. Race condition resume is called on startup and the phy not yet initiali

Re: [PATCH iproute2 net-next] vxlan: fix ttl inherit behavior

2018-04-17 Thread Hangbin Liu
Hi Stephen, The patch's subject contains fix. But the kernel feature is applied on net-next. So I'm not sure if iproute2 net-next is suitable. If you are OK with the patch, please feel free to apply it on the branch which you think is suitable. Thanks Hangbin On 18 April 2018 at 13:05, Hangbin L

[PATCH iproute2 net-next] vxlan: fix ttl inherit behavior

2018-04-17 Thread Hangbin Liu
Like kernel net-next commit 72f6d71e491e6 ("vxlan: add ttl inherit support"), vxlan ttl inherit should means inherit the inner protocol's ttl value. But currently when we add vxlan with "ttl inherit", we only set ttl 0, which is actually use whatever default value instead of inherit the inner prot

Re: [PATCH ipsec-next] selftests: add xfrm state-policy-monitor to rtnetlink.sh

2018-04-17 Thread Steffen Klassert
On Thu, Apr 12, 2018 at 03:59:59PM -0700, Shannon Nelson wrote: > Add a simple set of tests for the IPsec xfrm commands. > > Signed-off-by: Shannon Nelson Applied to ipsec-next, thanks Shannon!

Re: [PATCH net-next] net: introduce a new tracepoint for tcp_rcv_space_adjust

2018-04-17 Thread Yafang Shao
On Wed, Apr 18, 2018 at 7:44 AM, Alexei Starovoitov wrote: > On Mon, Apr 16, 2018 at 08:43:31AM -0700, Eric Dumazet wrote: >> >> >> On 04/16/2018 08:33 AM, Yafang Shao wrote: >> > tcp_rcv_space_adjust is called every time data is copied to user space, >> > introducing a tcp tracepoint for which co

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

2018-04-17 Thread Michael Schmitz
Hi Geert, On Wed, Apr 18, 2018 at 1:53 AM, Geert Uytterhoeven wrote: >> --- /dev/null >> +++ b/drivers/net/ethernet/8390/xsurf100.c >> @@ -0,0 +1,411 @@ >> +#include >> +#include >> +#include >> +#include >> +#include >> +#include >> + >> +#define ZORRO_PROD_INDIVIDUAL_COMPUTERS_X_SURF100 \

[PATCH v3 1/9] net: phy: new Asix Electronics PHY driver

2018-04-17 Thread Michael Schmitz
The Asix Electronics PHY found on the X-Surf 100 Amiga Zorro network card by Individual Computers is buggy, and needs the reset bit toggled as workaround to make a PHY soft reset succed. Add workaround driver just for this special case. Export phy_poll_reset() from core phy_device driver to avoid

[PATCH v3 00/10] New network driver for Amiga X-Surf 100 (m68k)

2018-04-17 Thread Michael Schmitz
This patch series adds support for the Individual Computers X-Surf 100 network card for m68k Amiga, a network adapter based on the AX88796 chip set. The driver was originally written for kernel version 3.19 by Michael Karcher (see CC:), and adapted to 4.16 for submission to netdev by me. Questions

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

2018-04-17 Thread Michael Schmitz
From: Michael Karcher Add platform device driver to populate the ax88796 platform data from information provided by the XSurf100 zorro device driver. The ax88796 module will be loaded through this module's probe function. Signed-off-by: Michael Karcher Signed-off-by: Michael Schmitz --- Chan

[PATCH v3 4/9] net: ax88796: Do not free IRQ in ax_remove() (already freed in ax_close()).

2018-04-17 Thread Michael Schmitz
From: Michael Karcher This complements the fix in 82533ad9a1c ("net: ethernet: ax88796: don't call free_irq without request_irq first") that removed the free_irq call in the error path of probe, to also not call free_irq when remove is called to revert the effects of probe. Fixes: 82533ad9a1c (n

[PATCH v3 5/9] net: ax88796: Add block_input/output hooks to ax_plat_data

2018-04-17 Thread Michael Schmitz
From: Michael Karcher Add platform specific hooks for block transfer reads/writes of packet buffer data, superseding the default provided ax_block_input/output. Currently used for m68k Amiga XSurf100. Signed-off-by: Michael Karcher Signed-off-by: Michael Schmitz --- Changes in v3: Suggested

[PATCH v3 3/9] net: ax88796: Attach MII bus only when open

2018-04-17 Thread Michael Schmitz
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 while the MII bus is attached. Signed-off-by: Michael Karcher Signed-off-by: Michael Schmitz Reviewed-by: Andrew Lu

[PATCH v3 6/9] net: ax88796: add interrupt status callback to platform data

2018-04-17 Thread Michael Schmitz
From: Michael Karcher To be able to tell the ax88796 driver whether it is sensible to enter the 8390 interrupt handler, an "is this interrupt caused by the 88796" callback has been added to the ax_plat_data structure (with NULL being compatible to the previous behaviour). Signed-off-by: Michael

[PATCH v3 8/9] net: ax88796: release platform device drvdata on probe error and module remove

2018-04-17 Thread Michael Schmitz
The net device struct pointer is stored as platform device drvdata on module probe - clear the drvdata entry on probe fail there, as well as when unloading the module. Signed-off-by: Michael Schmitz --- drivers/net/ethernet/8390/ax88796.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(

[PATCH v3 7/9] net: ax88796: set IRQF_SHARED flag when IRQ resource is marked as shareable

2018-04-17 Thread Michael Schmitz
From: Michael Karcher On the Amiga X-Surf100, the network card interrupt is shared with many other interrupt sources, so requires the IRQF_SHARED flag to register. Signed-off-by: Michael Karcher Signed-off-by: Michael Schmitz --- drivers/net/ethernet/8390/ax88796.c |3 +++ 1 files changed

[PATCH v3 2/9] net: ax88796: Fix MAC address reading

2018-04-17 Thread Michael Schmitz
From: Michael Karcher To read the MAC address from the (virtual) SAprom, the remote DMA unit needs to be set up like for every other process access to card-local memory. Signed-off-by: Michael Karcher Signed-off-by: Michael Schmitz --- drivers/net/ethernet/8390/ax88796.c |6 ++ 1 file

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

2018-04-17 Thread Stefan Hajnoczi
On Tue, Apr 17, 2018 at 09:45:12AM -0400, David Miller wrote: > From: Stefan Hajnoczi > Date: Tue, 17 Apr 2018 14:25:58 +0800 > > > Commit c1eef220c1760762753b602c382127bfccee226d ("vsock: always call > > vsock_init_tables()") introduced a module_init() function without a > > corresponding module

Re: [PATCH 04/10] net: ax88796: Add block_input/output hooks to ax_plat_data

2018-04-17 Thread Michael Schmitz
eers, >> >> Michael >> >> >> On Wed, Apr 18, 2018 at 6:46 AM, kbuild test robot wrote: >> > Hi Michael, >> > >> > I love your patch! Perhaps something to improve: >> > >> > [auto build test WARNING on v4.16] >

Re: [PATCH net-next v2 00/21] net/ipv6: Separate data structures for FIB and data path

2018-04-17 Thread David Miller
From: David Ahern Date: Tue, 17 Apr 2018 17:33:06 -0700 > IPv6 uses the same data struct for both control plane (FIB entries) and > data path (dst entries). This struct has elements needed for both paths > adding memory overhead and complexity (taking a dst hold in most places > but an additional

Re: [PATCH 04/10] net: ax88796: Add block_input/output hooks to ax_plat_data

2018-04-17 Thread Michael Schmitz
Hi Andrew, ax88796 includes it via linux/netdevice.h. mac-anubis.c doesn't. Michael Karcher's patches have added forward derclarations for struct netdevice and struct platform_data already - I'll add struct sk_buff as suggested by Finn. Cheers, Michael On Wed, Apr 18, 2018 at 1:19 PM, Andre

Re: [PATCH v2] net: change the comment of dev_mc_init

2018-04-17 Thread David Miller
From: sunlianwen Date: Wed, 18 Apr 2018 08:29:52 +0800 > The comment of dev_mc_init() is wrong. which use dev_mc_flush > instead of dev_mc_init. > > Signed-off-by: Lianwen Sun Patch is still corrupted by your email client. > - * dev_mc_flush - Init multicast address list > + * dev_mc_

Re: [PATCH RFC net-next 00/11] udp gso

2018-04-17 Thread Willem de Bruijn
On Tue, Apr 17, 2018 at 10:25 PM, Samudrala, Sridhar wrote: > > On 4/17/2018 2:07 PM, Willem de Bruijn wrote: >> >> On Tue, Apr 17, 2018 at 4:48 PM, Sowmini Varadhan >> wrote: >>> >>> On (04/17/18 16:23), Willem de Bruijn wrote: Assuming IPv4 with an MTU of 1500 and the maximum segment

Re: [PATCH RFC net-next 06/11] udp: add gso support to virtual devices

2018-04-17 Thread Willem de Bruijn
On Tue, Apr 17, 2018 at 8:43 PM, Dimitris Michailidis wrote: > On Tue, Apr 17, 2018 at 1:00 PM, Willem de Bruijn > wrote: >> From: Willem de Bruijn >> >> Virtual devices such as tunnels and bonding can handle large packets. >> Only segment packets when reaching a physical or loopback device. >>

Fw: [Bug 199429] New: smc_shutdown(net/smc/af_smc.c) has a UAF causing null pointer vulnerability.

2018-04-17 Thread Stephen Hemminger
This may already be fixed. Begin forwarded message: Date: Wed, 18 Apr 2018 01:52:59 + From: bugzilla-dae...@bugzilla.kernel.org To: step...@networkplumber.org Subject: [Bug 199429] New: smc_shutdown(net/smc/af_smc.c) has a UAF causing null pointer vulnerability. https://bugzilla.kernel.org

[PATCH bpf-next] tools: bpftool: make it easier to feed hex bytes to bpftool

2018-04-17 Thread Jakub Kicinski
From: Quentin Monnet bpftool uses hexadecimal values when it dumps map contents: # bpftool map dump id 1337 key: ff 13 37 ff value: a1 b2 c3 d4 ff ff ff ff Found 1 element In order to lookup or update values with bpftool, the natural reflex is then to copy and paste the values to t

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

2018-04-17 Thread Roopa Prabhu
On Tue, Apr 17, 2018 at 1:10 AM, Ido Schimmel wrote: > 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; >>

Re: [PATCH] PCI: Add PCIe to pcie_print_link_status() messages

2018-04-17 Thread Jakub Kicinski
On Fri, 13 Apr 2018 11:16:38 -0700, Jakub Kicinski wrote: > Currently the pcie_print_link_status() will print PCIe bandwidth > and link width information but does not mention it is pertaining > to the PCIe. Since this and related functions are used exclusively > by networking drivers today users m

Re: [PATCH RFC net-next 00/11] udp gso

2018-04-17 Thread Samudrala, Sridhar
On 4/17/2018 2:07 PM, Willem de Bruijn wrote: On Tue, Apr 17, 2018 at 4:48 PM, Sowmini Varadhan wrote: On (04/17/18 16:23), Willem de Bruijn wrote: Assuming IPv4 with an MTU of 1500 and the maximum segment size of 1472, the receiver will see three datagrams with MSS of 1472B, 528B and 512B.

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

2018-04-17 Thread Jason Wang
On 2018年04月17日 14:51, Nikita V. Shirokov wrote: 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 handli

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

2018-04-17 Thread Jason Wang
On 2018年04月17日 14:51, Nikita V. Shirokov wrote: 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

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

2018-04-17 Thread Hangbin Liu
On Tue, Apr 17, 2018 at 03:16:27PM -0400, David Miller wrote: > From: Hangbin Liu > Date: Tue, 17 Apr 2018 20:52:54 +0800 > > > 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

[PATCH 2/3] mac80211: Add support for ethtool gstats2 API.

2018-04-17 Thread greearb
From: Ben Greear This enables users to request fewer stats to be refreshed in cases where firmware does not need to be probed. Signed-off-by: Ben Greear --- include/net/mac80211.h| 6 ++ net/mac80211/driver-ops.h | 9 +++-- net/mac80211/ethtool.c| 18 +- 3 fil

[PATCH] ethtool: Support ETHTOOL_GSTATS2 API.

2018-04-17 Thread greearb
From: Ben Greear This allows users to specify flags to the get-stats API, potentially saving expensive stats queries when they are not desired. Signed-off-by: Ben Greear --- ethtool-copy.h | 9 + ethtool.c | 25 - 2 files changed, 29 insertions(+), 5 delet

[PATCH 3/3] ath10k: Support ethtool gstats2 API.

2018-04-17 Thread greearb
From: Ben Greear Skip a firmware stats update when calling code indicates the stats refresh is not needed. Signed-off-by: Ben Greear --- drivers/net/wireless/ath/ath10k/debug.c | 18 +++--- drivers/net/wireless/ath/ath10k/debug.h | 4 drivers/net/wireless/ath/ath10k/mac.c |

[PATCH 1/3] ethtool: Support ETHTOOL_GSTATS2 command.

2018-04-17 Thread greearb
From: Ben Greear This is similar to ETHTOOL_GSTATS, but it allows you to specify flags. These flags can be used by the driver to decrease the amount of stats refreshed. In particular, this helps with ath10k since getting the firmware stats can be slow. Signed-off-by: Ben Greear --- include/l

Re: [PATCH v3 net,stable] tun: fix vlan packet truncation

2018-04-17 Thread Jason Wang
On 2018年04月18日 04:46, Bjørn Mork wrote: Bogus trimming in tun_net_xmit() causes truncated vlan packets. skb->len is correct whether or not skb_vlan_tag_present() is true. There is no more reason to adjust the skb length on xmit in this driver than any other driver. tun_put_user() adds 4 bytes

Re: [PATCH net-next 0/5] virtio-net: Add SCTP checksum offload support

2018-04-17 Thread Marcelo Ricardo Leitner
On Tue, Apr 17, 2018 at 04:35:18PM -0400, Vlad Yasevich wrote: > On 04/02/2018 10:47 AM, Marcelo Ricardo Leitner wrote: > > On Mon, Apr 02, 2018 at 09:40:01AM -0400, Vladislav Yasevich wrote: > >> Now that we have SCTP offload capabilities in the kernel, we can add > >> them to virtio as well. Fir

[Regression] net/phy/micrel.c v4.9.94

2018-04-17 Thread Chris Ruehl
Hello, I like to get your heads up at a regression introduced in 4.9.94 commitment lead to a kernel ops and make the network unusable on my MX6DL customized board. Race condition resume is called on startup and the phy not yet initialized. [7.313366] Unable to handle kernel NULL pointer d

Re:Re: [PATCH net] net: Fix one possible memleak in ip_setup_cork

2018-04-17 Thread Gao Feng
At 2018-04-17 05:18:25, "Eric Dumazet" wrote: > > >On 04/16/2018 09:58 AM, David Miller wrote: >> From: gfree.w...@vip.163.com >> Date: Mon, 16 Apr 2018 10:16:45 +0800 >> >>> From: Gao Feng >>> >>> It would allocate memory in this function when the cork->opt is NULL. But >>> the memory isn't fre

Re: [PATCH 04/10] net: ax88796: Add block_input/output hooks to ax_plat_data

2018-04-17 Thread Finn Thain
patch has an unrelated whitespace change. -- > Cheers, > > Michael > > > On Wed, Apr 18, 2018 at 6:46 AM, kbuild test robot wrote: > > Hi Michael, > > > > I love your patch! Perhaps something to improve: > > > > [auto build test WARNING on v4.16] > &

[PATCH v3] 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

Re: [RFC v2] virtio: support packed ring

2018-04-17 Thread Tiwei Bie
On Tue, Apr 17, 2018 at 06:54:51PM +0300, Michael S. Tsirkin wrote: > On Tue, Apr 17, 2018 at 10:56:26PM +0800, Tiwei Bie wrote: > > On Tue, Apr 17, 2018 at 05:04:59PM +0300, Michael S. Tsirkin wrote: > > > On Tue, Apr 17, 2018 at 08:47:16PM +0800, Tiwei Bie wrote: > > > > On Tue, Apr 17, 2018 at 0

Re: [PATCH 04/10] net: ax88796: Add block_input/output hooks to ax_plat_data

2018-04-17 Thread Andrew Lunn
On Wed, Apr 18, 2018 at 12:53:21PM +1200, Michael Schmitz wrote: > I think this is a false positive - we're encouraged to provide the > full parameter list for functions, so the sreuct sk_buff* can't be > avoided. Hi Michael How is being included? You probably want to build using the .config fi

[PATCH net-next] ipv6: frags: fix a lockdep false positive

2018-04-17 Thread Eric Dumazet
lockdep does not know that the locks used by IPv4 defrag and IPv6 reassembly units are of different classes. It complains because of following chains : 1) sch_direct_xmit()(lock txq->_xmit_lock) dev_hard_start_xmit() xmit_one() dev_queue_xmit_nit() packet_rcv_fanout(

Re: [PATCH bpf-next v3 2/8] bpf: add documentation for eBPF helpers (01-11)

2018-04-17 Thread Alexei Starovoitov
On Tue, Apr 17, 2018 at 03:34:32PM +0100, Quentin Monnet wrote: > Add documentation for eBPF helper functions to bpf.h user header file. > This documentation can be parsed with the Python script provided in > another commit of the patch series, in order to provide a RST document > that can later be

Re: [PATCH v2 bpf-next 0/3] Add missing types to bpftool, libbpf

2018-04-17 Thread Alexei Starovoitov
On Tue, Apr 17, 2018 at 10:28:43AM -0700, Andrey Ignatov wrote: > v1->v2: > - add new types to bpftool-cgroup man page; > - add new types to bash completion for bpftool; > - don't add types that should not be in bpftool cgroup. > > Add support for various BPF prog types and attach types that have

Re: [PATCH 04/10] net: ax88796: Add block_input/output hooks to ax_plat_data

2018-04-17 Thread Michael Schmitz
omething to improve: > > [auto build test WARNING on v4.16] > [cannot apply to net-next/master net/master v4.17-rc1 next-20180417] > [if your patch is applied to the wrong git tree, please drop us a note to > help improve the system] > > url: > https://github.com/0day-ci/linux

Re: [PATCH RFC net-next 06/11] udp: add gso support to virtual devices

2018-04-17 Thread Dimitris Michailidis
On Tue, Apr 17, 2018 at 1:00 PM, Willem de Bruijn wrote: > From: Willem de Bruijn > > Virtual devices such as tunnels and bonding can handle large packets. > Only segment packets when reaching a physical or loopback device. > > Signed-off-by: Willem de Bruijn > --- > include/linux/netdev_featur

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

2018-04-17 Thread Jakub Kicinski
On Tue, 17 Apr 2018 16:08:29 -0700, Alexei Starovoitov wrote: > On Mon, Apr 16, 2018 at 11:51:29PM -0700, Nikita V. Shirokov wrote: > > 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

Re: Repeatable inet6_dump_fib crash in stock 4.12.0-rc4+

2018-04-17 Thread David Ahern
On 4/17/18 5:29 PM, Ben Greear wrote: > > FYI, problem still happens in 4.16.  I'm going to re-enable my hack below > for this kernel as well...I had hopes it might be fixed... Interesting. I was hoping the same. > > BUG: unable to handle kernel NULL pointer dereference at 8 > IP: fib6_walk_con

[PATCH net-next v2 04/21] net/ipv6: Pass net to fib6_update_sernum

2018-04-17 Thread David Ahern
Pass net namespace to fib6_update_sernum. It can not be marked const as fib6_new_sernum will change ipv6.fib6_sernum. Signed-off-by: David Ahern --- include/net/ip6_fib.h | 2 +- net/ipv6/ip6_fib.c| 3 +-- net/ipv6/route.c | 10 +- 3 files changed, 7 insertions(+), 8 deletions

[PATCH net-next v2 09/21] net/ipv6: Defer initialization of dst to data path

2018-04-17 Thread David Ahern
Defer setting dst input, output and error until fib entry is copied. The reject path from ip6_route_info_create is moved to a new function ip6_rt_init_dst_reject with a helper doing the conversion from fib6_type to dst error. The remainder of the new ip6_rt_init_dst is an amalgamtion of dst code

[PATCH net-next v2 03/21] vrf: Move fib6_table into net_vrf

2018-04-17 Thread David Ahern
A later patch removes rt6i_table from rt6_info. Save the ipv6 table for a VRF in net_vrf. fib tables can not be deleted so no reference counting or locking is required. Signed-off-by: David Ahern --- drivers/net/vrf.c | 25 ++--- 1 file changed, 6 insertions(+), 19 deletions(

[PATCH net-next v2 06/21] net/ipv6: Move support functions up in route.c

2018-04-17 Thread David Ahern
Code move only. Signed-off-by: David Ahern --- net/ipv6/route.c | 119 +++ 1 file changed, 59 insertions(+), 60 deletions(-) diff --git a/net/ipv6/route.c b/net/ipv6/route.c index 045811a3da76..0daf4c9c9f2b 100644 --- a/net/ipv6/route.c +++ b/

[PATCH net-next v2 12/21] net/ipv6: Add fib6_null_entry

2018-04-17 Thread David Ahern
ip6_null_entry will stay a dst based return for lookups that fail to match an entry. Add a new fib6_null_entry which constitutes the root node and leafs for fibs. Replace existing references to ip6_null_entry with the new fib6_null_entry when dealing with FIBs. Signed-off-by: David Ahern --- in

[PATCH net-next v2 02/21] net: Handle null dst in rtnl_put_cacheinfo

2018-04-17 Thread David Ahern
Need to keep expires time for IPv6 routes in a dump of FIB entries. Update rtnl_put_cacheinfo to allow dst to be NULL in which case rta_cacheinfo will only contain non-dst data. Signed-off-by: David Ahern --- net/core/rtnetlink.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) dif

[PATCH net-next v2 18/21] net/ipv6: introduce fib6_info struct and helpers

2018-04-17 Thread David Ahern
Add fib6_info struct and alloc, destroy, hold and release helpers. Signed-off-by: David Ahern --- include/net/ip6_fib.h | 55 ++ net/ipv6/ip6_fib.c| 60 +++ 2 files changed, 115 insertions(+) diff --

[PATCH net-next v2 21/21] net/ipv6: Remove unused code and variables for rt6_info

2018-04-17 Thread David Ahern
Drop unneeded elements from rt6_info struct and rearrange layout to something more relevant for the data path. Signed-off-by: David Ahern --- include/net/ip6_fib.h | 60 +++-- net/ipv6/ip6_fib.c | 22 -- net/ipv6/route.c|

[PATCH net-next v2 13/21] net/ipv6: Add rt6_info create function for ip6_pol_route_lookup

2018-04-17 Thread David Ahern
ip6_pol_route_lookup is the lookup function for ip6_route_lookup and rt6_lookup. At the moment it returns either a reference to a FIB entry or a cached exception. To move FIB entries to a separate struct, this lookup function needs to convert FIB entries to an rt6_info that is returned to the calle

[PATCH net-next v2 08/21] net/ipv6: Move nexthop data to fib6_nh

2018-04-17 Thread David Ahern
Introduce fib6_nh structure and move nexthop related data from rt6_info and rt6_info.dst to fib6_nh. References to dev, gateway or lwtstate from a FIB lookup perspective are converted to use fib6_nh; datapath references to dst version are left as is. Signed-off-by: David Ahern --- .../net/ethern

[PATCH net-next v2 19/21] net/ipv6: separate handling of FIB entries from dst based routes

2018-04-17 Thread David Ahern
Last step before flipping the data type for FIB entries: - use fib6_info_alloc to create FIB entries in ip6_route_info_create and addrconf_dst_alloc - use fib6_info_release in place of dst_release, ip6_rt_put and rt6_release - remove the dst_hold before calling __ip6_ins_rt or ip6_del_rt - when

[PATCH net-next v2 20/21] net/ipv6: Flip FIB entries to fib6_info

2018-04-17 Thread David Ahern
Convert all code paths referencing a FIB entry from rt6_info to fib6_info. Signed-off-by: David Ahern --- .../net/ethernet/mellanox/mlxsw/spectrum_router.c | 64 ++--- include/net/if_inet6.h | 4 +- include/net/ip6_fib.h | 42 ++-- in

[PATCH net-next v2 16/21] net/ipv6: Add gfp_flags to route add functions

2018-04-17 Thread David Ahern
Most FIB entries can be added using memory allocated with GFP_KERNEL. Add gfp_flags to ip6_route_add and addrconf_dst_alloc. Code paths that can be reached from the packet path (e.g., ndisc and autoconfig) or atomic notifiers use GFP_ATOMIC; paths from user context (adding addresses and routes) use

[PATCH net-next v2 17/21] net/ipv6: Cleanup exception and cache route handling

2018-04-17 Thread David Ahern
IPv6 FIB will only contain FIB entries with exception routes added to the FIB entry. Once this transformation is complete, FIB lookups will return a fib6_info with the lookup functions still returning a dst based rt6_info. The current code uses rt6_info for both paths and overloads the rt6_info var

[PATCH net-next v2 14/21] net/ipv6: Move dst flags to booleans in fib entries

2018-04-17 Thread David Ahern
Continuing to wean FIB paths off of dst_entry, use a bool to hold requests for certain dst settings. Add a helper to convert the flags to DST flags when a FIB entry is converted to a dst_entry. Signed-off-by: David Ahern --- include/net/ip6_fib.h | 5 - net/ipv6/addrconf.c | 4 ++-- net/

[PATCH net-next v2 15/21] net/ipv6: Create a neigh_lookup for FIB entries

2018-04-17 Thread David Ahern
The router discovery code has a FIB entry and wants to validate the gateway has a neighbor entry. Refactor the existing dst_neigh_lookup for IPv6 and create a new function that takes the gateway and device and returns a neighbor entry. Use the new function in ndisc_router_discovery to validate the

[PATCH net-next v2 10/21] net/ipv6: move metrics from dst to rt6_info

2018-04-17 Thread David Ahern
Similar to IPv4, add fib metrics to the fib struct, which at the moment is rt6_info. Will be moved to fib6_info in a later patch. Copy metrics into dst by reference using refcount. To make the transition: - add dst_metrics to rt6_info. Default to dst_default_metrics if no metrics are passed duri

[PATCH net-next v2 07/21] net/ipv6: Save route type in rt6_info

2018-04-17 Thread David Ahern
The RTN_ type for IPv6 FIB entries is currently embedded in rt6i_flags and dst.error. Since dst is going to be removed, it can no longer be relied on for FIB dumps so save the route type as fib6_type. fc_type is set in current users based on the algorithm in rt6_fill_node: - rt6i_flags contains

[PATCH net-next v2 00/21] net/ipv6: Separate data structures for FIB and data path

2018-04-17 Thread David Ahern
IPv6 uses the same data struct for both control plane (FIB entries) and data path (dst entries). This struct has elements needed for both paths adding memory overhead and complexity (taking a dst hold in most places but an additional reference on rt6i_ref in a few). Furthermore, because of the dst_

[PATCH net-next v2 01/21] net: Move fib_convert_metrics to metrics file

2018-04-17 Thread David Ahern
Move logic of fib_convert_metrics into ip_metrics_convert. This allows the code that converts netlink attributes into metrics struct to be re-used in a later patch by IPv6. This is mostly a code move with the following changes to variable names: - fi->fib_net becomes net - fc_mx and fc_mx_len

[PATCH net-next v2 05/21] net/ipv6: Pass net namespace to route functions

2018-04-17 Thread David Ahern
Pass network namespace reference into route add, delete and get functions. Signed-off-by: David Ahern --- include/net/ip6_route.h | 12 ++- net/ipv6/addrconf.c | 33 -- net/ipv6/anycast.c | 10 + net/ipv6/ndisc.c| 12 ++- net/i

  1   2   3   4   5   >