Re: [PATCH net-next 0/2] net: ipv4: fix circular-list infinite loop

2019-07-01 Thread Tariq Toukan
On 7/1/2019 9:46 AM, Ran Rozenstein wrote: > > >> -Original Message- >> From: Tariq Toukan >> Sent: Sunday, June 30, 2019 10:57 >> To: David Miller ; f...@strlen.de >> Cc: netdev@vger.kernel.org; Ran Rozenstein ; Tariq >> Toukan >> Subject: Re: [PATCH net-next 0/2] net: ipv4: fix circu

Re: [PATCH bpf] selftests: bpf: fix inlines in test_lwt_seg6local

2019-07-01 Thread Jiri Benc
On Sat, 29 Jun 2019 11:04:54 -0700, Song Liu wrote: > > Maybe use "__always_inline" as most other tests do? > > I meant "static __always_inline". Sure, I can do that. It doesn't seem to be as consistent as you suggest, though. There are three different forms used in selftests/bpf/progs: stati

[PATCH] xfrm: use list_for_each_entry_safe in xfrm_policy_flush

2019-07-01 Thread Li RongQing
The iterated pol maybe be freed since it is not protected by RCU or spinlock when put it, lead to UAF, so use _safe function to iterate over it against removal Signed-off-by: Li RongQing --- net/xfrm/xfrm_policy.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/xfrm/x

Re: [PATCH rdma-next v4 06/17] RDMA/counter: Add "auto" configuration mode support

2019-07-01 Thread Leon Romanovsky
On Sun, Jun 30, 2019 at 12:40:54AM +, Jason Gunthorpe wrote: > On Tue, Jun 18, 2019 at 08:26:14PM +0300, Leon Romanovsky wrote: > > > +static void __rdma_counter_dealloc(struct rdma_counter *counter) > > +{ > > + mutex_lock(&counter->lock); > > + counter->device->ops.counter_dealloc(counter

[PATCH net] Documentation/networking: fix default_ttl typo in mpls-sysctl

2019-07-01 Thread Hangbin Liu
default_ttl should be integer instead of bool Reported-by: Ying Xu Fixes: a59166e47086 ("mpls: allow TTL propagation from IP packets to be configured") Signed-off-by: Hangbin Liu --- Documentation/networking/mpls-sysctl.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Do

Re: [PATCH] xfrm: use list_for_each_entry_safe in xfrm_policy_flush

2019-07-01 Thread Florian Westphal
Li RongQing wrote: > The iterated pol maybe be freed since it is not protected > by RCU or spinlock when put it, lead to UAF, so use _safe > function to iterate over it against removal > > Signed-off-by: Li RongQing > --- > net/xfrm/xfrm_policy.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 d

[PATCH] sis900: add ethtool tests (link, eeprom)

2019-07-01 Thread Sergej Benilov
Add tests for ethtool: link test, EEPROM read test. Correct a few typos, too. Signed-off-by: Sergej Benilov --- drivers/net/ethernet/sis/sis900.c | 78 +-- 1 file changed, 74 insertions(+), 4 deletions(-) diff --git a/drivers/net/ethernet/sis/sis900.c b/drivers/net/

Re: [PATCH v2 bpf-next 1/4] bpf: unprivileged BPF access via /dev/bpf

2019-07-01 Thread Song Liu
Hi Andy, Thanks for these detailed analysis. > On Jun 30, 2019, at 8:12 AM, Andy Lutomirski wrote: > > On Fri, Jun 28, 2019 at 12:05 PM Song Liu wrote: >> >> Hi Andy, >> >>> On Jun 27, 2019, at 4:40 PM, Andy Lutomirski wrote: >>> >>> On 6/27/19 1:19 PM, Song Liu wrote: This patch int

Re: [PATCH net-next v1] bonding: add an option to specify a delay between peer notifications

2019-07-01 Thread Jiri Pirko
Sun, Jun 30, 2019 at 08:59:31PM CEST, vinc...@bernat.ch wrote: [...] >+module_param(peer_notif_delay, int, 0); >+MODULE_PARM_DESC(peer_notif_delay, "Delay between each peer notification on " >+ "failover event, in milliseconds"); No module options please. Use net

Re: [PATCH bpf-next] virtio_net: add XDP meta data support

2019-07-01 Thread Jason Wang
On 2019/6/27 下午4:06, Yuya Kusakabe wrote: This adds XDP meta data support to both receive_small() and receive_mergeable(). Fixes: de8f3a83b0a0 ("bpf: add meta pointer for direct access") Signed-off-by: Yuya Kusakabe --- drivers/net/virtio_net.c | 40 +---

Re: [PATCH net-next v1] bonding: add an option to specify a delay between peer notifications

2019-07-01 Thread Vincent Bernat
❦ 1 juillet 2019 11:27 +02, Jiri Pirko : >>+module_param(peer_notif_delay, int, 0); >>+MODULE_PARM_DESC(peer_notif_delay, "Delay between each peer notification on " >>+"failover event, in milliseconds"); > > No module options please. Use netlink. See bond_changeli

Re: [PATCH v2 bpf-next 1/4] bpf: unprivileged BPF access via /dev/bpf

2019-07-01 Thread Lorenz Bauer
On Fri, 28 Jun 2019 at 20:10, Song Liu wrote: > There should be a master thread, no? Can we do that from the master thread at > the beginning of the execution? Unfortunately, no. The Go runtime has no such concept. This is all that is defined about program start up: https://golang.org/ref/spec

Re: [PATCH 2/6 bpf-next] Clean up xsk reuseq API

2019-07-01 Thread Magnus Karlsson
On Fri, Jun 28, 2019 at 11:09 PM Jonathan Lemon wrote: > > > > On 28 Jun 2019, at 13:41, Jakub Kicinski wrote: > > > On Thu, 27 Jun 2019 19:31:26 -0700, Jonathan Lemon wrote: > >> On 27 Jun 2019, at 15:38, Jakub Kicinski wrote: > >> > >>> On Thu, 27 Jun 2019 15:08:32 -0700, Jonathan Lemon wrote: >

[PATCH net-next 5/8] net: mscc: describe the PTP register range

2019-07-01 Thread Antoine Tenart
This patch adds support for using the PTP register range, and adds a description of its registers. This bank is used when configuring PTP. Signed-off-by: Antoine Tenart --- drivers/net/ethernet/mscc/ocelot.h | 9 ++ drivers/net/ethernet/mscc/ocelot_board.c | 10 +- drivers/net/eth

[PATCH net-next 7/8] net: mscc: remove the frame_info cpuq member

2019-07-01 Thread Antoine Tenart
In struct frame_info, the cpuq member is never used. This cosmetic patch removes it from the structure, and from the parsing of the frame header as it's only set but never used. Signed-off-by: Antoine Tenart --- drivers/net/ethernet/mscc/ocelot.h | 1 - drivers/net/ethernet/mscc/ocelot_boa

[PATCH net-next 4/8] MIPS: dts: mscc: describe the PTP ready interrupt

2019-07-01 Thread Antoine Tenart
This patch adds a description of the PTP ready interrupt, which can be triggered when a PTP timestamp is available on an hardware FIFO. Signed-off-by: Antoine Tenart --- arch/mips/boot/dts/mscc/ocelot.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/mips/boot/dts

[PATCH net-next 0/8] net: mscc: PTP Hardware Clock (PHC) support

2019-07-01 Thread Antoine Tenart
Hello, This series introduces the PTP Hardware Clock (PHC) support to the Mscc Ocelot switch driver. In order to make use of this, a new register bank is added and described in the device tree, as well as a new interrupt. The use this bank and interrupt was made optional in the driver for dt compa

[PATCH net-next 8/8] net: mscc: PTP Hardware Clock (PHC) support

2019-07-01 Thread Antoine Tenart
This patch adds support for PTP Hardware Clock (PHC) to the Ocelot switch for both PTP 1-step and 2-step modes. Signed-off-by: Antoine Tenart --- drivers/net/ethernet/mscc/ocelot.c | 382 ++- drivers/net/ethernet/mscc/ocelot.h | 37 +++ drivers/net/ethernet/mscc/

[PATCH net-next 3/8] Documentation/bindings: net: ocelot: document the PTP ready IRQ

2019-07-01 Thread Antoine Tenart
One additional interrupt needs to be described within the Ocelot device tree node: the PTP ready one. This patch documents the binding needed to do so. Signed-off-by: Antoine Tenart --- Documentation/devicetree/bindings/net/mscc-ocelot.txt | 11 ++- 1 file changed, 6 insertions(+), 5 del

[PATCH net-next 6/8] net: mscc: improve the frame header parsing readability

2019-07-01 Thread Antoine Tenart
This cosmetic patch improves the frame header parsing readability by introducing a new macro to access and mask its fields. Signed-off-by: Antoine Tenart --- drivers/net/ethernet/mscc/ocelot_board.c | 24 +--- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/dr

[PATCH net-next 2/8] MIPS: dts: mscc: describe the PTP register range

2019-07-01 Thread Antoine Tenart
This patch adds one register range within the mscc,vsc7514-switch node, to describe the PTP registers. Signed-off-by: Antoine Tenart --- arch/mips/boot/dts/mscc/ocelot.dtsi | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/mips/boot/dts/mscc/ocelot.dtsi b/arch/mips/boot

Re: [PATCH 0/6 bpf-next] xsk: reuseq cleanup

2019-07-01 Thread Magnus Karlsson
On Fri, Jun 28, 2019 at 12:10 AM Jonathan Lemon wrote: > > Clean up and normalize usage of the recycle queue in order to > support upcoming TX from RX queue functionality. > > Jonathan Lemon (6): > Have xsk_umem_peek_addr_rq() return chunk-aligned handles. > Clean up xsk reuseq API > Always

[PATCH net-next 1/8] Documentation/bindings: net: ocelot: document the PTP bank

2019-07-01 Thread Antoine Tenart
One additional register range needs to be described within the Ocelot device tree node: the PTP. This patch documents the binding needed to do so. Signed-off-by: Antoine Tenart --- Documentation/devicetree/bindings/net/mscc-ocelot.txt | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-

答复: [PATCH] xfrm: use list_for_each_entry_safe in xfrm_policy_flush

2019-07-01 Thread Li,Rongqing
> -邮件原件- > 发件人: Florian Westphal [mailto:f...@strlen.de] > 发送时间: 2019年7月1日 17:04 > 收件人: Li,Rongqing > 抄送: netdev@vger.kernel.org > 主题: Re: [PATCH] xfrm: use list_for_each_entry_safe in xfrm_policy_flush > > Li RongQing wrote: > > The iterated pol maybe be freed since it is not protecte

Re: [PATCH V3] can: flexcan: fix stop mode acknowledgment

2019-07-01 Thread Marc Kleine-Budde
On 6/19/19 9:42 AM, Joakim Zhang wrote: > To enter stop mode, the CPU should manually assert a global Stop Mode > request and check the acknowledgment asserted by FlexCAN. The CPU must > only consider the FlexCAN in stop mode when both request and > acknowledgment conditions are satisfied. > > Fix

Re: [PATCH 0/3 bpf-next] intel: AF_XDP support for TX of RX packets

2019-07-01 Thread Magnus Karlsson
On Sat, Jun 29, 2019 at 12:18 AM Jonathan Lemon wrote: > > NOTE: This patch depends on my previous "xsk: reuse cleanup" patch, > sent to netdev earlier. > > The motivation is to have packets which were received on a zero-copy > AF_XDP socket, and which returned a TX verdict from the bpf program, >

Re: [PATCH 1/3 bpf-next] net: add convert_to_xdp_frame_keep_zc function

2019-07-01 Thread Magnus Karlsson
On Sat, Jun 29, 2019 at 12:19 AM Jonathan Lemon wrote: > > Add a function which converts a ZC xdp_buff to a an xdp_frame, while nit: "a an" -> "an" > keeping the zc backing storage. This will be used to support TX of > received AF_XDP frames. > > Signed-off-by: Jonathan Lemon > --- > include/

Re: [PATCH 2/3 bpf-next] i40e: Support zero-copy XDP_TX on the RX path for AF_XDP sockets.

2019-07-01 Thread Magnus Karlsson
On Sat, Jun 29, 2019 at 12:18 AM Jonathan Lemon wrote: > > When the XDP program attached to a zero-copy AF_XDP socket returns XDP_TX, > queue the umem frame on the XDP TX ring. Space on the recycle stack is > pre-allocated when the xsk is created. (taken from tx_ring, since the > xdp ring is not

[PATCH v3] ss: introduce switch to print exact value of data rates

2019-07-01 Thread Tomasz Torcz
Introduce -X/--exact switch to disable human-friendly printing of data rates. Without the switch (default), data is presented as MBps/Kbps. Signed-off-by: Tomasz Torcz --- man/man8/ss.8 | 3 +++ misc/ss.c | 12 ++-- 2 files changed, 13 insertions(+), 2 deletions(-) Changes in

[PATCH net-next 1/3] devlink: Introduce PCI PF port flavour and port attribute

2019-07-01 Thread Parav Pandit
In an eswitch, PCI PF may have port which is normally represented using a representor netdevice. To have better visibility of eswitch port, its association with PF, a representor netdevice and port number, introduce a PCI PF port flavour and port attriute. When devlink port flavour is PCI PF, fill

[PATCH net-next 0/3] devlink: Introduce PCI PF, VF ports and attributes

2019-07-01 Thread Parav Pandit
This patchset carry forwards the work initiated in [1] and discussion futher concluded at [2]. To improve visibility of representor netdevice, its association with PF or VF, physical port, two new devlink port flavours are added as PCI PF and PCI VF ports. A sample eswitch view can be seen below,

[PATCH net-next 3/3] net/mlx5e: Register devlink ports for physical link, PCI PF, VFs

2019-07-01 Thread Parav Pandit
Register devlink port of physical port, PCI PF and PCI VF flavour for each PF, VF when a given devlink instance is in switchdev mode. Implement ndo_get_devlink_port callback API to make use of registered devlink ports. This eliminates ndo_get_phys_port_name() and ndo_get_port_parent_id() callbacks

[PATCH net-next 2/3] devlink: Introduce PCI VF port flavour and port attribute

2019-07-01 Thread Parav Pandit
In an eswitch, PCI VF may have port which is normally represented using a representor netdevice. To have better visibility of eswitch port, its association with VF, its representor netdevice and port number, introduce a PCI VF port flavour. When devlink port flavour is PCI VF, fill up PCI VF attri

[PATCH net-next v4 0/5] Add MPLS actions to TC

2019-07-01 Thread John Hurley
This patchset introduces a new TC action module that allows the manipulation of the MPLS headers of packets. The code impliments functionality including push, pop, and modify. Also included are tests for the new funtionality. Note that these will require iproute2 changes to be submitted soon. NOT

[PATCH net-next v4 1/5] net: core: move push MPLS functionality from OvS to core helper

2019-07-01 Thread John Hurley
Open vSwitch provides code to push an MPLS header to a packet. In preparation for supporting this in TC, move the push code to an skb helper that can be reused. Signed-off-by: John Hurley Reviewed-by: Jakub Kicinski Reviewed-by: Simon Horman --- include/linux/skbuff.h| 1 + net/core/skbuf

[PATCH net-next v4 2/5] net: core: move pop MPLS functionality from OvS to core helper

2019-07-01 Thread John Hurley
Open vSwitch provides code to pop an MPLS header to a packet. In preparation for supporting this in TC, move the pop code to an skb helper that can be reused. Remove the, now unused, update_ethertype static function from OvS. Signed-off-by: John Hurley Reviewed-by: Jakub Kicinski Reviewed-by: S

[PATCH net-next v4 3/5] net: core: add MPLS update core helper and use in OvS

2019-07-01 Thread John Hurley
Open vSwitch allows the updating of an existing MPLS header on a packet. In preparation for supporting similar functionality in TC, move this to a common skb helper function. Signed-off-by: John Hurley Reviewed-by: Jakub Kicinski Reviewed-by: Simon Horman --- include/linux/skbuff.h| 1 +

[PATCH net-next v4 4/5] net: sched: add mpls manipulation actions to TC

2019-07-01 Thread John Hurley
Currently, TC offers the ability to match on the MPLS fields of a packet through the use of the flow_dissector_key_mpls struct. However, as yet, TC actions do not allow the modification or manipulation of such fields. Add a new module that registers TC action ops to allow manipulation of MPLS. Thi

[PATCH net-next v4 5/5] selftests: tc-tests: actions: add MPLS tests

2019-07-01 Thread John Hurley
Add a new series of selftests to verify the functionality of act_mpls in TC. Signed-off-by: John Hurley Reviewed-by: Simon Horman Acked-by: Jakub Kicinski --- .../tc-testing/tc-tests/actions/mpls.json | 812 + 1 file changed, 812 insertions(+) create mode 100644

Re: [RFC iproute2 1/1] ip: netns: add mounted state file for each netns

2019-07-01 Thread Nicolas Dichtel
Le 28/06/2019 à 18:26, David Howells a écrit : > Nicolas Dichtel wrote: > >> David Howells was working on a mount notification mechanism: >> https://lwn.net/Articles/760714/ >> https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git/log/?h=notifications >> >> I don't know what is th

Re: [RFC iproute2] netns: add mounting state file for each netns

2019-07-01 Thread Nicolas Dichtel
Le 30/06/2019 à 21:29, Matteo Croce a écrit : > When ip creates a netns, there is a small time interval between the > placeholder file creation in NETNS_RUN_DIR and the bind mount from /proc. > > Add a temporary file named .mounting-$netns which gets deleted after the > bind mount, so watching for

Re: [PATCH] net: ethernet: mediatek: Fix overlapping capability bits.

2019-07-01 Thread René van Dorst
Quoting Willem de Bruijn : On Sat, Jun 29, 2019 at 8:24 AM René van Dorst wrote: Both MTK_TRGMII_MT7621_CLK and MTK_PATH_BIT are defined as bit 10. This causes issues on non-MT7621 devices which has the MTK_PATH_BIT(MTK_ETH_PATH_GMAC1_RGMII) capability set. The wrong TRGMII setup code is exe

Re: [PATCH] net: ethernet: mediatek: Allow non TRGMII mode with MT7621 DDR2 devices

2019-07-01 Thread René van Dorst
Quoting René van Dorst : I see that I also forgot to tag this patch for net-next. Greats, René No reason to error out on a MT7621 device with DDR2 memory when non TRGMII mode is selected. Only MT7621 DDR2 clock setup is not supported for TRGMII mode. But non TRGMII mode doesn't need any speci

Re: [PATCH] net: ethernet: mediatek: Fix overlapping capability bits.

2019-07-01 Thread Willem de Bruijn
On Mon, Jul 1, 2019 at 8:44 AM René van Dorst wrote: > > Quoting Willem de Bruijn : > > > On Sat, Jun 29, 2019 at 8:24 AM René van Dorst > > wrote: > >> > >> Both MTK_TRGMII_MT7621_CLK and MTK_PATH_BIT are defined as bit 10. > >> > >> This causes issues on non-MT7621 devices which has the > >> M

Re: [PATCH net-next 3/3] macsec: add brackets and indentation after calling macsec_decrypt

2019-07-01 Thread Sabrina Dubroca
2019-06-30, 22:05:41 -0400, Willem de Bruijn wrote: > On Sun, Jun 30, 2019 at 4:48 PM Andreas Steinmetz wrote: > > > > At this point, skb could only be a valid pointer, so this patch does > > not introduce any functional change. > > Previously, macsec_post_decrypt could be called on the original

Re: r8169 not working on 5.2.0rc6 with GPD MicroPC

2019-07-01 Thread Andrew Lunn
> When the vendor driver assigns a random MAC address, it writes it to the > chip. The related registers may be persistent (can't say exactly due to > missing documentation). If the device supports WOL, it could be it is powered using the standby supply, not the main supply. Try pulling the plug f

[PATCH net-next] ipv6: icmp: allow flowlabel reflection in echo replies

2019-07-01 Thread Eric Dumazet
Extend flowlabel_reflect bitmask to allow conditional reflection of incoming flowlabels in echo replies. Note this has precedence against auto flowlabels. Add flowlabel_reflect enum to replace hard coded values. Signed-off-by: Eric Dumazet --- Documentation/networking/ip-sysctl.txt | 4 +++- i

Re: [PATCH] sis900: add ethtool tests (link, eeprom)

2019-07-01 Thread Andrew Lunn
On Mon, Jul 01, 2019 at 11:03:33AM +0200, Sergej Benilov wrote: > Add tests for ethtool: link test, EEPROM read test. > Correct a few typos, too. Hi Sergej Please split this up into two patches. The first one should fixing the typos. Rather than implementing a test for the EEPROM, add support fo

Re: [RFC iproute2] netns: add mounting state file for each netns

2019-07-01 Thread Matteo Croce
On Mon, Jul 1, 2019 at 2:38 PM Nicolas Dichtel wrote: > > Le 30/06/2019 à 21:29, Matteo Croce a écrit : > > When ip creates a netns, there is a small time interval between the > > placeholder file creation in NETNS_RUN_DIR and the bind mount from /proc. > > > > Add a temporary file named .mounting

Re: [PATCH net-next 1/8] Documentation/bindings: net: ocelot: document the PTP bank

2019-07-01 Thread Andrew Lunn
On Mon, Jul 01, 2019 at 12:03:20PM +0200, Antoine Tenart wrote: > One additional register range needs to be described within the Ocelot > device tree node: the PTP. This patch documents the binding needed to do > so. Hi Antoine Are there any more register banks? Maybe just add them all? Also, yo

Re: [PATCH net-next 3/8] Documentation/bindings: net: ocelot: document the PTP ready IRQ

2019-07-01 Thread Andrew Lunn
On Mon, Jul 01, 2019 at 12:03:22PM +0200, Antoine Tenart wrote: > One additional interrupt needs to be described within the Ocelot device > tree node: the PTP ready one. This patch documents the binding needed to > do so. Hi Antoine Same questions/points as for the register bank :-) Andr

[PATCH iproute2] man: tc-netem.8: fix URL for netem page

2019-07-01 Thread Andrea Claudi
URL for netem page on sources section points to a no more existent resource. Fix this using the correct URL. Fixes: cd72dcf13c8a4 ("netem: add man-page") Signed-off-by: Andrea Claudi --- man/man8/tc-netem.8 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/man/man8/tc-netem.8 b

Re: [PATCH iproute2] man: tc-netem.8: fix URL for netem page

2019-07-01 Thread Andrea Claudi
On Mon, Jul 1, 2019 at 4:05 PM Andrea Claudi wrote: > > URL for netem page on sources section points to a no more existent > resource. Fix this using the correct URL. > > Fixes: cd72dcf13c8a4 ("netem: add man-page") > Signed-off-by: Andrea Claudi > --- > man/man8/tc-netem.8 | 2 +- > 1 file chan

Re: [RFC iproute2] netns: add mounting state file for each netns

2019-07-01 Thread Nicolas Dichtel
Le 01/07/2019 à 15:50, Matteo Croce a écrit : > On Mon, Jul 1, 2019 at 2:38 PM Nicolas Dichtel > wrote: >> >> Le 30/06/2019 à 21:29, Matteo Croce a écrit : >>> When ip creates a netns, there is a small time interval between the >>> placeholder file creation in NETNS_RUN_DIR and the bind mount from

Re: [PATCH v3] ss: introduce switch to print exact value of data rates

2019-07-01 Thread David Ahern
On 7/1/19 5:52 AM, Tomasz Torcz wrote: > Introduce -X/--exact switch to disable human-friendly printing > of data rates. Without the switch (default), data is presented as MBps/Kbps. > > Signed-off-by: Tomasz Torcz > --- > man/man8/ss.8 | 3 +++ > misc/ss.c | 12 ++-- > 2 files

Re: [PATCH 1/2] samples: pktgen: add some helper functions for port parsing

2019-07-01 Thread Jesper Dangaard Brouer
On Sat, 29 Jun 2019 22:33:57 +0900 "Daniel T. Lee" wrote: > This commit adds port parsing and port validate helper function to parse > single or range of port(s) from a given string. (e.g. 1234, 443-444) > > Helpers will be used in prior to set target port(s) in samples/pktgen. > > Signed-off-b

Re: [PATCH 00/11] XDP unaligned chunk placement support

2019-07-01 Thread Laatz, Kevin
On 28/06/2019 21:29, Jonathan Lemon wrote: On 28 Jun 2019, at 9:19, Laatz, Kevin wrote: On 27/06/2019 22:25, Jakub Kicinski wrote: I think that's very limiting.  What is the challenge in providing aligned addresses, exactly? The challenges are two-fold: 1) it prevents using arbitrary buffer si

Re: [PATCH 2/2] samples: pktgen: allow to specify destination port

2019-07-01 Thread Jesper Dangaard Brouer
On Sat, 29 Jun 2019 22:33:58 +0900 "Daniel T. Lee" wrote: > Currently, kernel pktgen has the feature to specify udp destination port > for sending packet. (e.g. pgset "udp_dst_min 9") > > But on samples, each of the scripts doesn't have any option to achieve this. > > This commit adds the DST_P

Re: [PATCH net-next 8/8] net: mscc: PTP Hardware Clock (PHC) support

2019-07-01 Thread Willem de Bruijn
On Mon, Jul 1, 2019 at 6:05 AM Antoine Tenart wrote: > > This patch adds support for PTP Hardware Clock (PHC) to the Ocelot > switch for both PTP 1-step and 2-step modes. > > Signed-off-by: Antoine Tenart > void ocelot_deinit(struct ocelot *ocelot) > { > + struct ocelot_port *port; > +

[PATCH net] net: don't warn in inet diag when IPV6 is disabled

2019-07-01 Thread Stephen Hemminger
If IPV6 was disabled, then ss command would cause a kernel warning because the command was attempting to dump IPV6 socke information. This should not be a warning, instead just return a normal error code. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=202249 Fixes: 432490f9d455 ("net: ip, d

Re: [PATCH net-next v4 3/5] net: core: add MPLS update core helper and use in OvS

2019-07-01 Thread Willem de Bruijn
On Mon, Jul 1, 2019 at 8:31 AM John Hurley wrote: > > Open vSwitch allows the updating of an existing MPLS header on a packet. > In preparation for supporting similar functionality in TC, move this to a > common skb helper function. > > Signed-off-by: John Hurley > Reviewed-by: Jakub Kicinski >

[PATCH 1/4] net: dsa: Change DT bindings for Vitesse VSC73xx switches

2019-07-01 Thread Pawel Dembicki
This commit document changes after split vsc73xx driver into core and spi part. The change of DT bindings is required for support the same vsc73xx chip, which need PI bus to communicate with CPU. It also introduce how to use vsc73xx platform driver. Signed-off-by: Pawel Dembicki --- .../bindings

Re: [PATCH bpf-next 1/2] bpf: allow wide (u64) aligned stores for some fields of bpf_sock_addr

2019-07-01 Thread Andrii Nakryiko
On Sat, Jun 29, 2019 at 10:53 PM Yonghong Song wrote: > > > > On 6/28/19 4:10 PM, Stanislav Fomichev wrote: > > Since commit cd17d7770578 ("bpf/tools: sync bpf.h") clang decided > > that it can do a single u64 store into user_ip6[2] instead of two > > separate u32 ones: > > > > # 17: (18) r2 =

Re: [PATCH bpf-next 2/2] selftests/bpf: add verifier tests for wide stores

2019-07-01 Thread Andrii Nakryiko
On Sat, Jun 29, 2019 at 11:02 PM Yonghong Song wrote: > > > > On 6/28/19 4:10 PM, Stanislav Fomichev wrote: > > Make sure that wide stores are allowed at proper (aligned) addresses. > > Note that user_ip6 is naturally aligned on 8-byte boundary, so > > correct addresses are user_ip6[0] and user_ip

Re: [PATCH net-next v4 4/5] net: sched: add mpls manipulation actions to TC

2019-07-01 Thread David Ahern
On 7/1/19 6:30 AM, John Hurley wrote: > Currently, TC offers the ability to match on the MPLS fields of a packet > through the use of the flow_dissector_key_mpls struct. However, as yet, TC > actions do not allow the modification or manipulation of such fields. > > Add a new module that registers

Re: [PATCH net-next v4 4/5] net: sched: add mpls manipulation actions to TC

2019-07-01 Thread Willem de Bruijn
On Mon, Jul 1, 2019 at 8:31 AM John Hurley wrote: > > Currently, TC offers the ability to match on the MPLS fields of a packet > through the use of the flow_dissector_key_mpls struct. However, as yet, TC > actions do not allow the modification or manipulation of such fields. > > Add a new module t

[RFC PATCH v2 1/2] Documentation: net: dsa: Describe DSA switch configuration

2019-07-01 Thread Benedikt Spranger
Document DSA tagged and VLAN based switch configuration by showcases. Signed-off-by: Benedikt Spranger --- .../networking/dsa/configuration.rst | 292 ++ Documentation/networking/dsa/index.rst| 1 + 2 files changed, 293 insertions(+) create mode 100644 Documen

[RFC PATCH v2 2/2] Documentation: net: dsa: b53: Describe b53 configuration

2019-07-01 Thread Benedikt Spranger
Document the different needs of documentation for the b53 driver. Signed-off-by: Benedikt Spranger --- Documentation/networking/dsa/b53.rst | 174 + Documentation/networking/dsa/index.rst | 1 + 2 files changed, 175 insertions(+) create mode 100644 Documentation/netw

[RFC PATCH v2 0/2] Document the configuration of b53

2019-07-01 Thread Benedikt Spranger
Hi, this is the second RFC to document the configuration of a b53 supported switch. Thanks for the comments. Regards Bene Spranger v1..v2: - split out generic parts of the configuration. - target comments by Andrew Lunn and Florian Fainelli. - make changes visible to build system Benedikt

Re: [PATCH net-next 8/8] net: mscc: PTP Hardware Clock (PHC) support

2019-07-01 Thread Eric Dumazet
On 7/1/19 8:12 AM, Willem de Bruijn wrote: > On Mon, Jul 1, 2019 at 6:05 AM Antoine Tenart > wrote: >> >> This patch adds support for PTP Hardware Clock (PHC) to the Ocelot >> switch for both PTP 1-step and 2-step modes. >> >> Signed-off-by: Antoine Tenart > >> void ocelot_deinit(struct ocel

Re: [PATCH bpf-next 2/2] selftests/bpf: add verifier tests for wide stores

2019-07-01 Thread Stanislav Fomichev
On 06/30, Yonghong Song wrote: > > > On 6/28/19 4:10 PM, Stanislav Fomichev wrote: > > Make sure that wide stores are allowed at proper (aligned) addresses. > > Note that user_ip6 is naturally aligned on 8-byte boundary, so > > correct addresses are user_ip6[0] and user_ip6[2]. msg_src_ip6 is, >

Re: [PATCH bpf-next 1/2] bpf: allow wide (u64) aligned stores for some fields of bpf_sock_addr

2019-07-01 Thread Stanislav Fomichev
On 06/30, Yonghong Song wrote: > > > On 6/28/19 4:10 PM, Stanislav Fomichev wrote: > > Since commit cd17d7770578 ("bpf/tools: sync bpf.h") clang decided > > that it can do a single u64 store into user_ip6[2] instead of two > > separate u32 ones: > > > > # 17: (18) r2 = 0x100 > >

Re: [PATCH bpf-next 1/2] bpf: allow wide (u64) aligned stores for some fields of bpf_sock_addr

2019-07-01 Thread Stanislav Fomichev
On 07/01, Andrii Nakryiko wrote: > On Sat, Jun 29, 2019 at 10:53 PM Yonghong Song wrote: > > > > > > > > On 6/28/19 4:10 PM, Stanislav Fomichev wrote: > > > Since commit cd17d7770578 ("bpf/tools: sync bpf.h") clang decided > > > that it can do a single u64 store into user_ip6[2] instead of two > >

Re: [PATCH v4 bpf-next 0/9] libbpf: add bpf_link and tracing attach APIs

2019-07-01 Thread Stanislav Fomichev
On 06/28, Andrii Nakryiko wrote: > This patchset adds the following APIs to allow attaching BPF programs to > tracing entities: > - bpf_program__attach_perf_event for attaching to any opened perf event FD, > allowing users full control; > - bpf_program__attach_kprobe for attaching to kernel probe

Re: [PATCH net] Documentation/networking: fix default_ttl typo in mpls-sysctl

2019-07-01 Thread David Ahern
On 7/1/19 2:45 AM, Hangbin Liu wrote: > default_ttl should be integer instead of bool > > Reported-by: Ying Xu > Fixes: a59166e47086 ("mpls: allow TTL propagation from IP packets to be > configured") > Signed-off-by: Hangbin Liu > --- > Documentation/networking/mpls-sysctl.txt | 2 +- > 1 file

[PATCH bpf-next v2 3/3] selftests/bpf: add verifier tests for wide stores

2019-07-01 Thread Stanislav Fomichev
Make sure that wide stores are allowed at proper (aligned) addresses. Note that user_ip6 is naturally aligned on 8-byte boundary, so correct addresses are user_ip6[0] and user_ip6[2]. msg_src_ip6 is, however, aligned on a 4-byte bondary, so only msg_src_ip6[1] can be wide-stored. Cc: Andrii Nakryi

[PATCH bpf-next v2 2/3] bpf: sync bpf.h to tools/

2019-07-01 Thread Stanislav Fomichev
Sync user_ip6 & msg_src_ip6 comments. Signed-off-by: Stanislav Fomichev --- tools/include/uapi/linux/bpf.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/include/uapi/linux/bpf.h b/tools/include/uapi/linux/bpf.h index a396b516a2b2..586867fe6102 100644 --- a/tools/i

[PATCH bpf-next v2 0/3] bpf: allow wide (u64) aligned stores for some fields of bpf_sock_addr

2019-07-01 Thread Stanislav Fomichev
Clang can generate 8-byte stores for user_ip6 & msg_src_ip6, let's support that on the verifier side. v2: * Add simple cover letter (Yonghong Song) * Update comments (Yonghong Song) * Remove [4] selftests (Yonghong Song) Stanislav Fomichev (3): bpf: allow wide (u64) aligned stores for some fiel

[PATCH bpf-next v2 1/3] bpf: allow wide (u64) aligned stores for some fields of bpf_sock_addr

2019-07-01 Thread Stanislav Fomichev
Since commit cd17d7770578 ("bpf/tools: sync bpf.h") clang decided that it can do a single u64 store into user_ip6[2] instead of two separate u32 ones: # 17: (18) r2 = 0x100 # ; ctx->user_ip6[2] = bpf_htonl(DST_REWRITE_IP6_2); # 19: (7b) *(u64 *)(r1 +16) = r2 # invalid bpf_conte

[PATCH] User mode linux bump maximum MTU tuntap interface

2019-07-01 Thread Алексей
Hello, the parameter  ETH_MAX_PACKET limited to 1500 bytes is the not support jumbo frames. This patch change ETH_MAX_PACKET the 65535 bytes to jumbo frame support with user mode linux tuntap driver. PATCH: --- diff -ruNp ./src/1/linux-5.1/arch/um/include/shared/net_user.h ./sr

[PATCH net-next 0/7] net/rds: RDMA fixes

2019-07-01 Thread Gerd Rausch
A number of net/rds fixes necessary to make "rds_rdma.ko" pass some basic Oracle internal tests. Gerd Rausch (7): net/rds: Give fr_state a chance to transition to FRMR_IS_FREE net/rds: Get rid of "wait_clean_list_grace" and add locking net/rds: Wait for the FRMR_IS_FREE (or FRMR_IS_STALE) tr

[PATCH net-next 1/7] net/rds: Give fr_state a chance to transition to FRMR_IS_FREE

2019-07-01 Thread Gerd Rausch
In the context of FRMR (ib_frmr.c): Memory regions make it onto the "clean_list" via "rds_ib_flush_mr_pool", after the memory region has been posted for invalidation via "rds_ib_post_inv". At that point in time, "fr_state" may still be in state "FRMR_IS_INUSE", since the only place where "fr_stat

[PATCH net-next 3/7] net/rds: Wait for the FRMR_IS_FREE (or FRMR_IS_STALE) transition after posting IB_WR_LOCAL_INV

2019-07-01 Thread Gerd Rausch
In order to: 1) avoid a silly bouncing between "clean_list" and "drop_list" triggered by function "rds_ib_reg_frmr" as it is releases frmr regions whose state is not "FRMR_IS_FREE" right away. 2) prevent an invalid access error in a race from a pending "IB_WR_LOCAL_INV" operation with a t

[PATCH net-next 4/7] net/rds: Fix NULL/ERR_PTR inconsistency

2019-07-01 Thread Gerd Rausch
Make function "rds_ib_try_reuse_ibmr" return NULL in case memory region could not be allocated, since callers simply check if the return value is not NULL. Signed-off-by: Gerd Rausch --- net/rds/ib_rdma.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/rds/ib_rdma.c b

[PATCH net-next 2/7] net/rds: Get rid of "wait_clean_list_grace" and add locking

2019-07-01 Thread Gerd Rausch
Waiting for activity on the "clean_list" to quiesce is no substitute for proper locking. We can have multiple threads competing for "llist_del_first" via "rds_ib_reuse_mr", and a single thread competing for "llist_del_all" and "llist_del_first" via "rds_ib_flush_mr_pool". Since "llist_del_first"

[PATCH net-next 7/7] net/rds: Initialize ic->i_fastreg_wrs upon allocation

2019-07-01 Thread Gerd Rausch
Otherwise, if an IB connection is torn down before "rds_ib_setup_qp" is called, the value of "ic->i_fastreg_wrs" is still at zero (as it wasn't initialized by "rds_ib_setup_qp"). Consequently "rds_ib_conn_path_shutdown" will spin forever, waiting for it to go back to "RDS_IB_DEFAULT_FR_WR", which o

[PATCH net-next 5/7] net/rds: Set fr_state only to FRMR_IS_FREE if IB_WR_LOCAL_INV had been successful

2019-07-01 Thread Gerd Rausch
Fix a bug where fr_state first goes to FRMR_IS_STALE, because of a failure of operation IB_WR_LOCAL_INV, but then gets set back to "FRMR_IS_FREE" uncoditionally, even though the operation failed. Signed-off-by: Gerd Rausch --- net/rds/ib_frmr.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletio

[PATCH net-next 6/7] net/rds: Keep track of and wait for FRWR segments in use upon shutdown

2019-07-01 Thread Gerd Rausch
Since "rds_ib_free_frmr" and "rds_ib_free_frmr_list" simply put the FRMR memory segments on the "drop_list" or "free_list", and it is the job of "rds_ib_flush_mr_pool" to reap those entries by ultimately issuing a "IB_WR_LOCAL_INV" work-request, we need to trigger and then wait for all those memory

Re: [PATCH bpf-next v2 1/3] bpf: allow wide (u64) aligned stores for some fields of bpf_sock_addr

2019-07-01 Thread Andrii Nakryiko
On Mon, Jul 1, 2019 at 9:51 AM Stanislav Fomichev wrote: > > Since commit cd17d7770578 ("bpf/tools: sync bpf.h") clang decided > that it can do a single u64 store into user_ip6[2] instead of two > separate u32 ones: > > # 17: (18) r2 = 0x100 > # ; ctx->user_ip6[2] = bpf_htonl(DST_R

[PATCH net-next] tipc: use rcu dereference functions properly

2019-07-01 Thread Xin Long
For these places are protected by rcu_read_lock, we change from rcu_dereference_rtnl to rcu_dereference, as there is no need to check if rtnl lock is held. For these places are protected by rtnl_lock, we change from rcu_dereference_rtnl to rtnl_dereference/rcu_dereference_protected, as no extra me

Re: [PATCH bpf-next v2 3/3] selftests/bpf: add verifier tests for wide stores

2019-07-01 Thread Andrii Nakryiko
On Mon, Jul 1, 2019 at 9:54 AM Stanislav Fomichev wrote: > > Make sure that wide stores are allowed at proper (aligned) addresses. > Note that user_ip6 is naturally aligned on 8-byte boundary, so > correct addresses are user_ip6[0] and user_ip6[2]. msg_src_ip6 is, > however, aligned on a 4-byte bo

[PATCH net-next] tipc: remove ub->ubsock checks

2019-07-01 Thread Xin Long
Both tipc_udp_enable and tipc_udp_disable are called under rtnl_lock, ub->ubsock could never be NULL in tipc_udp_disable and cleanup_bearer, so remove the check. Also remove the one in tipc_udp_enable by adding "free" label. Signed-off-by: Xin Long --- net/tipc/udp_media.c | 17

Re: [PATCH v4 bpf-next 2/9] libbpf: introduce concept of bpf_link

2019-07-01 Thread Yonghong Song
On 6/28/19 8:48 PM, Andrii Nakryiko wrote: > bpf_link is and abstraction of an association of a BPF program and one "is and" => "is an". > of many possible BPF attachment points (hooks). This allows to have > uniform interface for detaching BPF programs regardless of the nature of > link and ho

[PATCH net v2] ipv4: don't set IPv6 only flags to IPv4 addresses

2019-07-01 Thread Matteo Croce
Avoid the situation where an IPV6 only flag is applied to an IPv4 address: # ip addr add 192.0.2.1/24 dev dummy0 nodad home mngtmpaddr noprefixroute # ip -4 addr show dev dummy0 2: dummy0: mtu 1500 qdisc noqueue state UNKNOWN group default qlen 1000 inet 192.0.2.1/24 scope gl

Re: [PATCH v4 bpf-next 3/9] libbpf: add ability to attach/detach BPF program to perf event

2019-07-01 Thread Yonghong Song
On 6/28/19 8:49 PM, Andrii Nakryiko wrote: > bpf_program__attach_perf_event allows to attach BPF program to existing > perf event hook, providing most generic and most low-level way to attach BPF > programs. It returns struct bpf_link, which should be passed to > bpf_link__destroy to detach and f

Re: [PATCH net-next 0/7] net/rds: RDMA fixes

2019-07-01 Thread santosh . shilimkar
On 7/1/19 9:39 AM, Gerd Rausch wrote: A number of net/rds fixes necessary to make "rds_rdma.ko" pass some basic Oracle internal tests. Gerd Rausch (7): net/rds: Give fr_state a chance to transition to FRMR_IS_FREE net/rds: Get rid of "wait_clean_list_grace" and add locking net/rds: Wait

[PATCH net-next 0/5] net: use ICW for sk_proto->{send,recv}msg

2019-07-01 Thread Paolo Abeni
This series extends ICW usage to one of the few remaining spots in fast-path still hitting per packet retpoline overhead, namely the sk_proto->{send,recv}msg calls. The first 3 patches in this series refactor the existing code so that applying the ICW macros is straight-forward: we demux inet_{rec

[PATCH net-next 5/5] ipv4: use indirect call wrappers for {tcp,udp}_{recv,send}msg()

2019-07-01 Thread Paolo Abeni
This avoids an indirect call per syscall for common ipv4 transports Signed-off-by: Paolo Abeni --- net/ipv4/af_inet.c | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/net/ipv4/af_inet.c b/net/ipv4/af_inet.c index 8421e2f5bbb3..9a2f17d0c5f5 100644 --- a/net/ipv4/af

[PATCH net-next 4/5] ipv6: use indirect call wrappers for {tcp,udpv6}_{recv,send}msg()

2019-07-01 Thread Paolo Abeni
This avoids an indirect call per syscall for common ipv6 transports Signed-off-by: Paolo Abeni --- net/ipv6/af_inet6.c | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/net/ipv6/af_inet6.c b/net/ipv6/af_inet6.c index 4628681eca88..d5e98ee9fc79 100644 --- a/net/ipv6

[PATCH net-next 2/5] ipv6: provide and use ipv6 specific version for {recv,send}msg

2019-07-01 Thread Paolo Abeni
This will simplify indirect call wrapper invocation in the following patch. No functional change intended, any - out-of-tree - IPv6 user of inet_{recv,send}msg can keep using the existing functions. SCTP code still uses the existing version even for ipv6: as this series will not add ICW for SCTP,

  1   2   3   >