Re: [bpf PATCH 1/3] bpf: sockmap only allow ESTABLISHED sock state

2018-09-17 Thread Y Song
On Mon, Sep 17, 2018 at 10:32 AM John Fastabend wrote: > > After this patch we only allow socks that are in ESTABLISHED state or > are being added via a sock_ops event that is transitioning into an > ESTABLISHED state. By allowing sock_ops events we allow users to > manage sockmaps directly from

Re: [bpf PATCH 2/3] bpf: sockmap, fix transition through disconnect without close

2018-09-17 Thread Y Song
On Mon, Sep 17, 2018 at 10:32 AM John Fastabend wrote: > > It is possible (via shutdown()) for TCP socks to go trough TCP_CLOSE > state via tcp_disconnect() without actually calling tcp_close which > would then call our bpf_tcp_close() callback. Because of this a user > could disconnect a socket

Re: [bpf PATCH 3/3] bpf: test_maps, only support ESTABLISHED socks

2018-09-17 Thread Y Song
On Mon, Sep 17, 2018 at 10:33 AM John Fastabend wrote: > > Ensure that sockets added to a sock{map|hash} that is not in the > ESTABLISHED state is rejected. > > Fixes: 1aa12bdf1bfb ("bpf: sockmap, add sock close() hook to remove socks") > Signed-off-by: John Fastabend > --- >

Re: [PATCH rdma-next 00/24] Extend DEVX functionality

2018-09-17 Thread Or Gerlitz
On Mon, Sep 17, 2018 at 11:07 PM, Leon Romanovsky wrote: > On Mon, Sep 17, 2018 at 10:51:29PM +0300, Or Gerlitz wrote: >> On Mon, Sep 17, 2018 at 10:34 PM, Leon Romanovsky >> wrote: >> > On Mon, Sep 17, 2018 at 02:03:53PM +0300, Leon Romanovsky wrote: >> >> From: Leon Romanovsky >> >> >> >>

Re: [PATCH v2 1/2] netlink: add NLA_REJECT policy type

2018-09-17 Thread Marcelo Ricardo Leitner
On Mon, Sep 17, 2018 at 11:57:28AM +0200, Johannes Berg wrote: > From: Johannes Berg > > In some situations some netlink attributes may be used for output > only (kernel->userspace) or may be reserved for future use. It's > then helpful to be able to prevent userspace from using them in >

Re: [PATCH v2 2/2] netlink: add ethernet address policy types

2018-09-17 Thread Marcelo Ricardo Leitner
On Mon, Sep 17, 2018 at 11:57:29AM +0200, Johannes Berg wrote: > From: Johannes Berg > > Commonly, ethernet addresses are just using a policy of > { .len = ETH_ALEN } > which leaves userspace free to send more data than it should, > which may hide bugs. > > Introduce NLA_EXACT_LEN which

Re: [PATCH rdma-next 00/24] Extend DEVX functionality

2018-09-17 Thread Leon Romanovsky
On Mon, Sep 17, 2018 at 02:03:53PM +0300, Leon Romanovsky wrote: > From: Leon Romanovsky > > From Yishai, > > This series comes to enable the DEVX functionality in some wider scope, > specifically, > - It enables using kernel objects that were created by the verbs > API in the DEVX flow. > - It

Re: [bpf PATCH v2 2/3] bpf: sockmap, fix transition through disconnect without close

2018-09-17 Thread John Fastabend
On 09/17/2018 10:59 AM, John Fastabend wrote: > It is possible (via shutdown()) for TCP socks to go trough TCP_CLOSE > state via tcp_disconnect() without actually calling tcp_close which > would then call our bpf_tcp_close() callback. Because of this a user > could disconnect a socket then put it

Re: [PATCH ethtool] ethtool: support combinations of FEC modes

2018-09-17 Thread John W. Linville
On Wed, Sep 05, 2018 at 06:54:57PM +0100, Edward Cree wrote: > Of the three drivers that currently support FEC configuration, two (sfc > and cxgb4[vf]) accept configurations with more than one bit set in the > feccmd.fec bitmask. (The precise semantics of these combinations vary.) > Thus, this

Re: [PATCH rdma-next 00/24] Extend DEVX functionality

2018-09-17 Thread Leon Romanovsky
On Mon, Sep 17, 2018 at 10:51:29PM +0300, Or Gerlitz wrote: > On Mon, Sep 17, 2018 at 10:34 PM, Leon Romanovsky wrote: > > On Mon, Sep 17, 2018 at 02:03:53PM +0300, Leon Romanovsky wrote: > >> From: Leon Romanovsky > >> > >> From Yishai, > >> > >> This series comes to enable the DEVX

Re: [PATCH v2 net] net/ipv4: defensive cipso option parsing

2018-09-17 Thread Paul Moore
On Mon, Sep 17, 2018 at 1:49 PM Stefan Nuernberger wrote: > commit 40413955ee26 ("Cipso: cipso_v4_optptr enter infinite loop") fixed > a possible infinite loop in the IP option parsing of CIPSO. The fix > assumes that ip_options_compile filtered out all zero length options and > that no other

Re: [PATCH rdma-next 00/24] Extend DEVX functionality

2018-09-17 Thread Or Gerlitz
On Mon, Sep 17, 2018 at 10:34 PM, Leon Romanovsky wrote: > On Mon, Sep 17, 2018 at 02:03:53PM +0300, Leon Romanovsky wrote: >> From: Leon Romanovsky >> >> From Yishai, >> >> This series comes to enable the DEVX functionality in some wider scope, >> specifically, >> - It enables using kernel

Re: [PATCH rdma-next 00/24] Extend DEVX functionality

2018-09-17 Thread Leon Romanovsky
On Mon, Sep 17, 2018 at 11:13:55PM +0300, Or Gerlitz wrote: > On Mon, Sep 17, 2018 at 11:07 PM, Leon Romanovsky wrote: > > On Mon, Sep 17, 2018 at 10:51:29PM +0300, Or Gerlitz wrote: > >> On Mon, Sep 17, 2018 at 10:34 PM, Leon Romanovsky > >> wrote: > >> > On Mon, Sep 17, 2018 at 02:03:53PM

Re: [PATCH bpf-next] tools/bpf: bpftool: improve output format for bpftool net

2018-09-17 Thread Yonghong Song
On 9/17/18 3:19 AM, Daniel Borkmann wrote: > On 09/14/2018 11:49 PM, Yonghong Song wrote: >> This is a followup patch for Commit f6f3bac08ff9 >> ("tools/bpf: bpftool: add net support"). >> Some improvements are made for the bpftool net output. >> Specially, plain output is more concise such that

[PATCH] net: emac: fix fixed-link setup for the RTL8363SB switch

2018-09-17 Thread Christian Lamparter
On the Netgear WNDAP620, the emac ethernet isn't receiving nor xmitting any frames from/to the RTL8363SB (identifies itself as a RTL8367RB). This is caused by the emac hardware not knowing the forced link parameters for speed, duplex, pause, etc. This begs the question, how this was working on

Re: [PATCH net-next] liquidio: Add the features to show FEC settings and set FEC settings

2018-09-17 Thread David Miller
From: Felix Manlunas Date: Sun, 16 Sep 2018 22:43:32 -0700 > From: Weilin Chang > > 1. Add functions for get_fecparam and set_fecparam. > 2. Modify lio_get_link_ksettings to display FEC setting. > > Signed-off-by: Weilin Chang > Acked-by: Derek Chickles > Signed-off-by: Felix Manlunas

[PATCH net-next 10/15] s390/qeth: remove qeth_hdr_chk_and_bounce()

2018-09-17 Thread Julian Wiedmann
Restructure the OSN xmit path to handle misaligned HW headers properly, without shifting the packet data around. Signed-off-by: Julian Wiedmann --- drivers/s390/net/qeth_core.h | 1 - drivers/s390/net/qeth_core_main.c | 21 - drivers/s390/net/qeth_l2_main.c | 37

[PATCH net-next 09/15] s390/qeth: speed up TSO transmission

2018-09-17 Thread Julian Wiedmann
Switch TSO over to the faster transmit path, and remove all the unused old TSO code. Signed-off-by: Julian Wiedmann --- drivers/s390/net/qeth_core.h | 1 - drivers/s390/net/qeth_core_main.c | 3 +- drivers/s390/net/qeth_l3_main.c | 151 ++ 3 files

[PATCH net-next 14/15] s390/qeth: fine-tune spinlocks

2018-09-17 Thread Julian Wiedmann
For quite a lot of code paths it's obvious that they will never run in IRQ context. So replace their spin_lock_irqsave() calls with spin_lock_irq(). While at it, get rid of the redundant card pointer in struct qeth_reply that was used by qeth_send_control_data() to access the card's lock.

[PATCH net-next 15/15] s390/qeth: reduce 0-initializing when building IPA cmds

2018-09-17 Thread Julian Wiedmann
qeth_get_ipacmd_buffer() obtains its buffers for building IPA cmds from __qeth_get_buffer(), where they are fully cleared. So get rid of all the additional zero-ing in various other places. Signed-off-by: Julian Wiedmann --- drivers/s390/net/qeth_core_main.c | 15 +-- 1 file

[PATCH net-next 02/15] s390/qeth: run non-offload L3 traffic over common xmit path

2018-09-17 Thread Julian Wiedmann
L3 OSAs can only offload IPv4 traffic, use the common L2 transmit path for all other traffic. In particular there's no support for TX VLAN offload, so any such packet needs to be manually de-accelerated via ndo_features_check(). Signed-off-by: Julian Wiedmann --- drivers/s390/net/qeth_l3_main.c

[PATCH net-next 03/15] s390/qeth: remove unused L3 xmit code

2018-09-17 Thread Julian Wiedmann
qeth_l3_xmit() is now only used for TSOv4 traffic, shrink it down. Signed-off-by: Julian Wiedmann --- drivers/s390/net/qeth_l3_main.c | 71 ++--- 1 file changed, 17 insertions(+), 54 deletions(-) diff --git a/drivers/s390/net/qeth_l3_main.c

[PATCH net-next 06/15] s390/qeth: fix up protocol headers early

2018-09-17 Thread Julian Wiedmann
When qeth_add_hw_header() falls back to the HW header cache, it also copies over the necessary protocol headers. Thus any manipulation to the protocol headers needs to happen before adding the HW header. For current usage this doesn't matter, but it becomes relevant when moving TSO transmission

[PATCH net-next 05/15] s390/qeth: limit csum offload erratum to L3 devices

2018-09-17 Thread Julian Wiedmann
Combined L3+L4 csum offload is only required for some L3 HW. So for L2 devices, don't offload the IP header csum calculation. Signed-off-by: Julian Wiedmann Reference-ID: JUP 394553 --- drivers/s390/net/qeth_core.h| 5 - drivers/s390/net/qeth_l3_main.c | 5 + 2 files changed, 5

[PATCH net-next 13/15] s390/qeth: fix typo in return value

2018-09-17 Thread Julian Wiedmann
Assuming this was just a typo, as returning an actual negative value from a cmd callback would make no sense either. Signed-off-by: Julian Wiedmann --- drivers/s390/net/qeth_core_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/s390/net/qeth_core_main.c

[PATCH net-next 04/15] s390/qeth: remove qeth_get_elements_no()

2018-09-17 Thread Julian Wiedmann
Convert the last remaining user of qeth_get_elements_no() to qeth_count_elements(), so this helper can be removed. Signed-off-by: Julian Wiedmann --- drivers/s390/net/qeth_core.h | 3 +-- drivers/s390/net/qeth_core_main.c | 39 +++

[PATCH net-next 12/15] s390/qeth: invoke softirqs after napi_schedule()

2018-09-17 Thread Julian Wiedmann
Calling napi_schedule() from process context does not ensure that the NET_RX softirq is run in a timely fashion. So trigger it manually. This is no big issue with current code. A call to ndo_open() is usually followed by a ndo_set_rx_mode() call, and for qeth this contains a spin_unlock_bh().

[PATCH net-next 00/15] s390/qeth: updates 2018-09-17

2018-09-17 Thread Julian Wiedmann
Hi Dave, please apply the following patchset to net-next. This brings more restructuring of qeth's transmit code (eliminating its last usage of skb_realloc_headroom()), and the usual mix of minor improvements & cleanups. Thanks, Julian Julian Wiedmann (15): s390/qeth: move L2 xmit code to

[PATCH net-next 11/15] s390/qeth: uninstall IRQ handler on device removal

2018-09-17 Thread Julian Wiedmann
When setting up, qeth installs its IRQ handler on the ccw devices. But the IRQ handler is not cleared on removal - so even after qeth yields control of the ccw devices, spurious interrupts would still be presented to us. Make (de-)installation of the IRQ handler part of the ccw channel

[PATCH net-next 08/15] s390/qeth: prepare for copy-free TSO transmission

2018-09-17 Thread Julian Wiedmann
Add all the necessary TSO plumbing to the copy-less transmit path. This includes calculating the right length of required protocol headers, and always building a separate buffer element for the TSO headers. A follow-up patch will then switch TSO traffic over to this path. Signed-off-by: Julian

Re: [PATCH iproute2] libnetlink: fix leak and using unused memory on error

2018-09-17 Thread Stephen Hemminger
On Thu, 13 Sep 2018 12:33:38 -0700 Stephen Hemminger wrote: > If an error happens in multi-segment message (tc only) > then report the error and stop processing further responses. > This also fixes refering to the buffer after free. > > The sequence check is not necessary here because the >

Re: What is the best forum (mailing list, irc etc) to ask questions about the usage of AF_XDP sockets.

2018-09-17 Thread Konrad Djimeli
On 2018-09-13 18:52, Jakub Kicinski wrote: > On Thu, 13 Sep 2018 18:31:55 +0200, Konrad Djimeli wrote: >> Hello, >> >> I have been working on trying to make use of AF_XDP sockets as part of a >> project I working on, and I have been facing some issues but I am not >> sure where to ask questions

Re: [PATCH net] net/ipv6: do not copy DST_NOCOUNT flag on rt init

2018-09-17 Thread Peter Oskolkov
On Thu, Sep 13, 2018 at 9:11 PM David Ahern wrote: > > On 9/13/18 1:38 PM, Peter Oskolkov wrote: > > > diff --git a/net/ipv6/route.c b/net/ipv6/route.c > > index 3eed045c65a5..a3902f805305 100644 > > --- a/net/ipv6/route.c > > +++ b/net/ipv6/route.c > > @@ -946,7 +946,7 @@ static void

Re: [PATCH v2 2/4] dt-bindings: net: qcom: Add binding for shared mdio bus

2018-09-17 Thread Wang, Dongsheng
On 9/17/2018 10:50 PM, Andrew Lunn wrote: > On Mon, Sep 17, 2018 at 04:53:29PM +0800, Wang Dongsheng wrote: >> This property copy from "ibm,emac.txt" to describe a shared MIDO bus. >> Since emac include MDIO, so If the motherboard has more than one PHY >> connected to an MDIO bus, this property

Re: [PATCH net] net/ipv6: do not copy DST_NOCOUNT flag on rt init

2018-09-17 Thread David Ahern
On 9/17/18 9:11 AM, Peter Oskolkov wrote: > On Thu, Sep 13, 2018 at 9:11 PM David Ahern wrote: >> >> On 9/13/18 1:38 PM, Peter Oskolkov wrote: >> >>> diff --git a/net/ipv6/route.c b/net/ipv6/route.c >>> index 3eed045c65a5..a3902f805305 100644 >>> --- a/net/ipv6/route.c >>> +++ b/net/ipv6/route.c

Re: [PATCH net] bnxt_en: Fix VF mac address regression.

2018-09-17 Thread David Miller
From: Michael Chan Date: Fri, 14 Sep 2018 15:41:29 -0400 > The recent commit to always forward the VF MAC address to the PF for > approval may not work if the PF driver or the firmware is older. This > will cause the VF driver to fail during probe: > > bnxt_en :00:03.0 (unnamed

Re: [PATCH net] ipv6: fix possible use-after-free in ip6_xmit()

2018-09-17 Thread David Miller
From: Eric Dumazet Date: Fri, 14 Sep 2018 12:02:31 -0700 > In the unlikely case ip6_xmit() has to call skb_realloc_headroom(), > we need to call skb_set_owner_w() before consuming original skb, > otherwise we risk a use-after-free. > > Bring IPv6 in line with what we do in IPv4 to fix this. >

Re: [PATCH net] net: dsa: mv88e6xxx: Fix ATU Miss Violation

2018-09-17 Thread David Miller
From: Andrew Lunn Date: Fri, 14 Sep 2018 23:46:12 +0200 > Fix a cut/paste error and a typo which results in ATU miss violations > not being reported. > > Fixes: 0977644c5005 ("net: dsa: mv88e6xxx: Decode ATU problem interrupt") > Signed-off-by: Andrew Lunn Applied and queued up for -stable.

Re: [PATCH net] tls: fix currently broken MSG_PEEK behavior

2018-09-17 Thread David Miller
From: Daniel Borkmann Date: Fri, 14 Sep 2018 23:00:55 +0200 > In kTLS MSG_PEEK behavior is currently failing, strace example: ... > As can be seen from strace, there are two TLS records sent, > i) 'test_read_peek' and ii) '_mult_recs\0' where we end up > peeking

Re: [PATCH] net: phy: phylink: fix SFP interface autodetection

2018-09-17 Thread Baruch Siach
Hi Russell, Russell King - ARM Linux writes: > On Mon, Sep 17, 2018 at 05:19:57PM +0300, Baruch Siach wrote: >> When the switching to the SFP detected link mode update the main >> link_interface field as well. Otherwise, the link fails to come up when >> the configured 'phy-mode' defers from the

Re: [PATCH net-next 00/15] s390/qeth: updates 2018-09-17

2018-09-17 Thread David Miller
From: Julian Wiedmann Date: Mon, 17 Sep 2018 17:35:54 +0200 > please apply the following patchset to net-next. This brings more > restructuring > of qeth's transmit code (eliminating its last usage of > skb_realloc_headroom()), > and the usual mix of minor improvements & cleanups. Series

Re: [PATCH v2 2/4] dt-bindings: net: qcom: Add binding for shared mdio bus

2018-09-17 Thread Florian Fainelli
On 09/17/2018 09:47 AM, Wang, Dongsheng wrote: > On 9/17/2018 10:50 PM, Andrew Lunn wrote: >> On Mon, Sep 17, 2018 at 04:53:29PM +0800, Wang Dongsheng wrote: >>> This property copy from "ibm,emac.txt" to describe a shared MIDO bus. >>> Since emac include MDIO, so If the motherboard has more than

Re: [PATCH v2 0/2] hv_netvsc: associate VF and PV device by serial number

2018-09-17 Thread David Miller
From: Stephen Hemminger Date: Fri, 14 Sep 2018 12:54:55 -0700 > The Hyper-V implementation of PCI controller has concept of 32 bit serial > number > (not to be confused with PCI-E serial number). This value is sent in the > protocol > from the host to indicate SR-IOV VF device is attached to

Re: [PATCH net-next] net: dsa: gswip: Fix return value check in gswip_probe()

2018-09-17 Thread David Miller
From: Wei Yongjun Date: Sat, 15 Sep 2018 01:33:21 + > In case of error, the function devm_ioremap_resource() returns ERR_PTR() > and never returns NULL. The NULL test in the return value check should > be replaced with IS_ERR(). > > Fixes: 14fceff4771e ("net: dsa: Add Lantiq / Intel DSA

Re: [PATCH v3 net-next 07/12] net: ethernet: Add helper to remove a supported link mode

2018-09-17 Thread Andrew Lunn
On Mon, Sep 17, 2018 at 05:13:07PM +0200, Simon Horman wrote: > On Wed, Sep 12, 2018 at 01:53:14AM +0200, Andrew Lunn wrote: > > Some MAC hardware cannot support a subset of link modes. e.g. often > > 1Gbps Full duplex is supported, but Half duplex is not. Add a helper > > to remove such a link

[PATCH net-next 01/15] s390/qeth: move L2 xmit code to core module

2018-09-17 Thread Julian Wiedmann
We need the exact same transmit path for non-offload-eligible traffic on L3 OSAs. So make it accessible from both sub-drivers. Signed-off-by: Julian Wiedmann --- drivers/s390/net/qeth_core.h | 5 +++ drivers/s390/net/qeth_core_main.c | 59 +++

[PATCH net-next 07/15] s390/qeth: check size of required HW header cache object

2018-09-17 Thread Julian Wiedmann
When qeth_add_hw_header() falls back to the header cache, ensure that the requested length doesn't exceed the object size. For current usage this is a no-brainer, but TSO transmission will introduce protocol headers of varying length. Signed-off-by: Julian Wiedmann ---

Re: [Patch net-next] ipv4: initialize ra_mutex in inet_init_net()

2018-09-17 Thread David Miller
From: Cong Wang Date: Fri, 14 Sep 2018 13:32:42 -0700 > ra_mutex is a IPv4 specific mutex, it is inside struct netns_ipv4, > but its initialization is in the generic netns code, setup_net(). > > Move it to IPv4 specific net init code, inet_init_net(). > > Fixes: d9ff3049739e ("net: Replace

Re: [PATCH net-next] net: lantiq: Fix return value check in xrx200_probe()

2018-09-17 Thread David Miller
From: Wei Yongjun Date: Sat, 15 Sep 2018 01:33:50 + > In case of error, the function devm_ioremap_resource() returns ERR_PTR() > and never returns NULL. The NULL test in the return value check should > be replaced with IS_ERR(). > > Fixes: fe1a56420cf2 ("net: lantiq: Add Lantiq / Intel

Re: [PATCH net-next] net: hns: make function hns_gmac_wait_fifo_clean() static

2018-09-17 Thread David Miller
From: Wei Yongjun Date: Sat, 15 Sep 2018 01:42:09 + > Fixes the following sparse warning: > > drivers/net/ethernet/hisilicon/hns/hns_dsaf_gmac.c:322:5: warning: > symbol 'hns_gmac_wait_fifo_clean' was not declared. Should it be static? > > Signed-off-by: Wei Yongjun Applied.

Re: [PATCH net-next 0/5] net: lantiq: Minor fixes for vrx200 and gswip

2018-09-17 Thread David Miller
From: Hauke Mehrtens Date: Sat, 15 Sep 2018 14:08:44 +0200 > These are mostly minor fixes to problems addresses in the latests round > of the review of the original series adding these driver, which were not > applied before the patches got merged into net-next. > In addition it fixes a data

[PATCH net] net/ipv4: defensive cipso option parsing

2018-09-17 Thread Stefan Nuernberger
commit 40413955ee26 ("Cipso: cipso_v4_optptr enter infinite loop") fixed a possible infinite loop in the IP option parsing of CIPSO. The fix assumes that ip_options_compile filtered out all zero length options and that no other one-byte options beside IPOPT_END and IPOPT_NOOP exist. While this

Re: [PATCH] net: phy: phylink: fix SFP interface autodetection

2018-09-17 Thread Russell King - ARM Linux
On Mon, Sep 17, 2018 at 05:19:57PM +0300, Baruch Siach wrote: > When the switching to the SFP detected link mode update the main > link_interface field as well. Otherwise, the link fails to come up when > the configured 'phy-mode' defers from the SFP detected mode. > > This fixes 1GB SFP module

Re: [PATCH v3 net-next 07/12] net: ethernet: Add helper to remove a supported link mode

2018-09-17 Thread Simon Horman
On Wed, Sep 12, 2018 at 01:53:14AM +0200, Andrew Lunn wrote: > Some MAC hardware cannot support a subset of link modes. e.g. often > 1Gbps Full duplex is supported, but Half duplex is not. Add a helper > to remove such a link mode. > > Signed-off-by: Andrew Lunn > Reviewed-by: Florian Fainelli

Re: [PATCH v2 net] net: aquantia: memory corruption on jumbo frames

2018-09-17 Thread David Miller
From: Igor Russkikh Date: Sat, 15 Sep 2018 18:03:39 +0300 > From: Friedemann Gerold > > This patch fixes skb_shared area, which will be corrupted > upon reception of 4K jumbo packets. > > Originally build_skb usage purpose was to reuse page for skb to eliminate > needs of extra fragments. But

Re: [PATCHv2 net-next 1/1] net: rds: use memset to optimize the recv

2018-09-17 Thread David Miller
From: Zhu Yanjun Date: Sun, 16 Sep 2018 22:49:30 -0400 > The function rds_inc_init is in recv process. To use memset can optimize > the function rds_inc_init. > The test result: > > Before: > 1) + 24.950 us |rds_inc_init [rds](); > After: > 1) + 10.990 us |

Re: [net-next PATCH] tls: async support causes out-of-bounds access in crypto APIs

2018-09-17 Thread David Miller
From: John Fastabend Date: Fri, 14 Sep 2018 13:01:46 -0700 > When async support was added it needed to access the sk from the async > callback to report errors up the stack. The patch tried to use space > after the aead request struct by directly setting the reqsize field in > aead_request. This

Re: [PATCH net] net/ipv6: do not copy DST_NOCOUNT flag on rt init

2018-09-17 Thread David Ahern
On 9/17/18 9:11 AM, Peter Oskolkov wrote: > On Thu, Sep 13, 2018 at 9:11 PM David Ahern wrote: >> >> On 9/13/18 1:38 PM, Peter Oskolkov wrote: >> >>> diff --git a/net/ipv6/route.c b/net/ipv6/route.c >>> index 3eed045c65a5..a3902f805305 100644 >>> --- a/net/ipv6/route.c >>> +++ b/net/ipv6/route.c

Re: [PATCH net] net/ipv4: defensive cipso option parsing

2018-09-17 Thread Paul Moore
On Mon, Sep 17, 2018 at 11:12 AM Stefan Nuernberger wrote: > commit 40413955ee26 ("Cipso: cipso_v4_optptr enter infinite loop") fixed > a possible infinite loop in the IP option parsing of CIPSO. The fix > assumes that ip_options_compile filtered out all zero length options and > that no other

[PATCH bpf-next v2] tools/bpf: bpftool: improve output format for bpftool net

2018-09-17 Thread Yonghong Song
This is a followup patch for Commit f6f3bac08ff9 ("tools/bpf: bpftool: add net support"). Some improvements are made for the bpftool net output. Specially, plain output is more concise such that per attachment should nicely fit in one line. Compared to previous output, the prog tag is removed

Re: [PATCH net-next 5/5] ebpf: Add sample ebpf program for SOCKET_SG_FILTER

2018-09-17 Thread Sowmini Varadhan
On (09/17/18 16:15), Alexei Starovoitov wrote: > > if the goal is to add firewall ability to RDS then the patch set > is going in the wrong direction. The goal is to add the ability to process scatterlist directly, just like we process skb's today. Your main objection was that you wanted a test

Re: [PATCH net-next 5/5] ebpf: Add sample ebpf program for SOCKET_SG_FILTER

2018-09-17 Thread Alexei Starovoitov
On Mon, Sep 17, 2018 at 07:23:48PM -0400, Sowmini Varadhan wrote: > On (09/17/18 16:15), Alexei Starovoitov wrote: > > > > if the goal is to add firewall ability to RDS then the patch set > > is going in the wrong direction. > > The goal is to add the ability to process scatterlist directly, >

Re: [PATCH net-next 5/5] ebpf: Add sample ebpf program for SOCKET_SG_FILTER

2018-09-17 Thread Alexei Starovoitov
On Thu, Sep 13, 2018 at 06:10:13AM -0400, Sowmini Varadhan wrote: > On (09/12/18 19:07), Alexei Starovoitov wrote: > > > > I didn't know that. The way I understand your statement that > > this new program type, new sg logic, and all the complexity > > are only applicable to RDMA capable hw and

[net-next 2/3] net/mlx5: Check for SQ and not RQ state when modifying hairpin SQ

2018-09-17 Thread Saeed Mahameed
From: Alaa Hleihel When modifying hairpin SQ, instead of checking if the next state equals to MLX5_SQC_STATE_RDY, we compare it against the MLX5_RQC_STATE_RDY enum value. The code worked since both of MLX5_RQC_STATE_RDY and MLX5_SQC_STATE_RDY have the same value today. This patch fixes this

[pull request][net-next 0/3] Mellanox, mlx5 fixes 2018-09-17

2018-09-17 Thread Saeed Mahameed
This series provides three fixes to mlx5 core and mlx5e netdevice driver. Please pull and let me know if there's any problem. For -stable v4.16: ('net/mlx5: Check for SQ and not RQ state when modifying hairpin SQ') Thanks, Saeed. --- The following changes since commit

[net-next 1/3] net/mlx5: Fix read from coherent memory

2018-09-17 Thread Saeed Mahameed
From: Eli Cohen Use accessor function READ_ONCE to read from coherent memory modified by the device and read by the driver. This becomes most important in preemptive kernels where cond_resched implementation does not have the side effect which guaranteed the updated value. Fixes: 269d26f47f6f

[net-next 3/3] net/mlx5e: TLS, Read capabilities only when it is safe

2018-09-17 Thread Saeed Mahameed
Read TLS caps from the core driver only when TLS is supported, i.e mlx5_accel_is_tls_device returns true. Fixes: 790af90c00d2 ("net/mlx5e: TLS, build TLS netdev from capabilities") Reported-by: Michal Kubecek Signed-off-by: Saeed Mahameed Reviewed-by: Boris Pismenny Reviewed-by: Tariq Toukan

[bpf PATCH v2 3/3] bpf: test_maps, only support ESTABLISHED socks

2018-09-17 Thread John Fastabend
Ensure that sockets added to a sock{map|hash} that is not in the ESTABLISHED state is rejected. Fixes: 1aa12bdf1bfb ("bpf: sockmap, add sock close() hook to remove socks") Signed-off-by: John Fastabend --- tools/testing/selftests/bpf/test_maps.c | 10 +++--- 1 file changed, 7

[bpf PATCH v2 1/3] bpf: sockmap only allow ESTABLISHED sock state

2018-09-17 Thread John Fastabend
After this patch we only allow socks that are in ESTABLISHED state or are being added via a sock_ops event that is transitioning into an ESTABLISHED state. By allowing sock_ops events we allow users to manage sockmaps directly from sock ops programs. The two supported sock_ops ops are

[bpf PATCH v2 2/3] bpf: sockmap, fix transition through disconnect without close

2018-09-17 Thread John Fastabend
It is possible (via shutdown()) for TCP socks to go trough TCP_CLOSE state via tcp_disconnect() without actually calling tcp_close which would then call our bpf_tcp_close() callback. Because of this a user could disconnect a socket then put it in a LISTEN state which would break our assumptions

[bpf PATCH v2 0/3] bpf, sockmap ESTABLISHED state only

2018-09-17 Thread John Fastabend
Eric noted that using the close callback is not sufficient to catch all transitions from ESTABLISHED state to a LISTEN state. So this series does two things. First, only allow adding socks in ESTABLISH state and second use unhash callback to catch tcp_disconnect() transitions. v2: Added check for

[Patch net v2] net/ipv6: do not copy dst flags on rt init

2018-09-17 Thread Peter Oskolkov
DST_NOCOUNT in dst_entry::flags tracks whether the entry counts toward route cache size (net->ipv6.sysctl.ip6_rt_max_size). If the flag is NOT set, dst_ops::pcpuc_entries counter is incremented in dist_init() and decremented in dst_destroy(). This flag is tied to allocation/deallocation of

[bpf PATCH 2/3] bpf: sockmap, fix transition through disconnect without close

2018-09-17 Thread John Fastabend
It is possible (via shutdown()) for TCP socks to go trough TCP_CLOSE state via tcp_disconnect() without actually calling tcp_close which would then call our bpf_tcp_close() callback. Because of this a user could disconnect a socket then put it in a LISTEN state which would break our assumptions

[bpf PATCH 3/3] bpf: test_maps, only support ESTABLISHED socks

2018-09-17 Thread John Fastabend
Ensure that sockets added to a sock{map|hash} that is not in the ESTABLISHED state is rejected. Fixes: 1aa12bdf1bfb ("bpf: sockmap, add sock close() hook to remove socks") Signed-off-by: John Fastabend --- tools/testing/selftests/bpf/test_maps.c | 10 +++--- 1 file changed, 7

[bpf PATCH 0/3] bpf, sockmap ESTABLISHED state only

2018-09-17 Thread John Fastabend
Eric noted that using the close callback is not sufficient to catch all transitions from ESTABLISHED state to a LISTEN state. So this series does two things. First, only allow adding socks in ESTABLISH state and second use unhash callback to catch tcp_disconnect() transitions. Thanks, John ---

[bpf PATCH 1/3] bpf: sockmap only allow ESTABLISHED sock state

2018-09-17 Thread John Fastabend
After this patch we only allow socks that are in ESTABLISHED state or are being added via a sock_ops event that is transitioning into an ESTABLISHED state. By allowing sock_ops events we allow users to manage sockmaps directly from sock ops programs. The two supported sock_ops ops are

Re: [PATCH net] net/ipv6: do not copy DST_NOCOUNT flag on rt init

2018-09-17 Thread Peter Oskolkov
On Mon, Sep 17, 2018 at 9:59 AM David Ahern wrote: > > On 9/17/18 9:11 AM, Peter Oskolkov wrote: > > On Thu, Sep 13, 2018 at 9:11 PM David Ahern wrote: > >> > >> On 9/13/18 1:38 PM, Peter Oskolkov wrote: > >> > >>> diff --git a/net/ipv6/route.c b/net/ipv6/route.c > >>> index

[PATCH v2 net] net/ipv4: defensive cipso option parsing

2018-09-17 Thread Stefan Nuernberger
commit 40413955ee26 ("Cipso: cipso_v4_optptr enter infinite loop") fixed a possible infinite loop in the IP option parsing of CIPSO. The fix assumes that ip_options_compile filtered out all zero length options and that no other one-byte options beside IPOPT_END and IPOPT_NOOP exist. While this

Re: [PATCH net] net/ipv4: defensive cipso option parsing

2018-09-17 Thread Nuernberger, Stefan
On Mon, 2018-09-17 at 12:35 -0400, Paul Moore wrote: > On Mon, Sep 17, 2018 at 11:12 AM Stefan Nuernberger > wrote: > > > > commit 40413955ee26 ("Cipso: cipso_v4_optptr enter infinite loop") > > fixed > > a possible infinite loop in the IP option parsing of CIPSO. The fix > > assumes that

iproute2: fail to add fdb entries to ipv6 vxlan device

2018-09-17 Thread Lorenzo Bianconi
Hi all, while working on IPv6 vlxan driver I figured out that with recent version of iproute2 it is no longer possible to configure an IPv6 vxlan device without endpoint info (local ip, remote ip or group ip) and later add entries in the vxlan fdb. This issue can be triggered with the following

Re: [Patch net v2] net/ipv6: do not copy dst flags on rt init

2018-09-17 Thread David Ahern
On 9/17/18 10:20 AM, Peter Oskolkov wrote: > DST_NOCOUNT in dst_entry::flags tracks whether the entry counts > toward route cache size (net->ipv6.sysctl.ip6_rt_max_size). > > If the flag is NOT set, dst_ops::pcpuc_entries counter is incremented > in dist_init() and decremented in dst_destroy(). >

Re: [PATCH] net: caif: remove redundant null check on frontpkt

2018-09-17 Thread David Miller
From: Colin King Date: Fri, 14 Sep 2018 18:19:16 +0100 > From: Colin Ian King > > It is impossible for frontpkt to be null at the point of the null > check because it has been assigned from rearpkt and there is no > way realpkt can be null at the point of the assignment because > of the sanity

Re: [pull request][net-next 0/3] Mellanox, mlx5 fixes 2018-09-17

2018-09-17 Thread David Miller
From: Saeed Mahameed Date: Mon, 17 Sep 2018 17:01:58 -0700 > This series provides three fixes to mlx5 core and mlx5e netdevice > driver. > > Please pull and let me know if there's any problem. > > For -stable v4.16: > ('net/mlx5: Check for SQ and not RQ state when modifying hairpin SQ')

Re: [PATCH v2 net] net/ipv4: defensive cipso option parsing

2018-09-17 Thread David Miller
From: Stefan Nuernberger Date: Mon, 17 Sep 2018 19:46:53 +0200 > commit 40413955ee26 ("Cipso: cipso_v4_optptr enter infinite loop") fixed > a possible infinite loop in the IP option parsing of CIPSO. The fix > assumes that ip_options_compile filtered out all zero length options and > that no

Re: [Patch net v2] net/ipv6: do not copy dst flags on rt init

2018-09-17 Thread David Miller
From: Peter Oskolkov Date: Mon, 17 Sep 2018 10:20:53 -0700 > DST_NOCOUNT in dst_entry::flags tracks whether the entry counts > toward route cache size (net->ipv6.sysctl.ip6_rt_max_size). > > If the flag is NOT set, dst_ops::pcpuc_entries counter is incremented > in dist_init() and decremented

Re: [bpf PATCH 2/3] bpf: sockmap, fix transition through disconnect without close

2018-09-17 Thread John Fastabend
On 09/17/2018 02:09 PM, Y Song wrote: > On Mon, Sep 17, 2018 at 10:32 AM John Fastabend > wrote: >> >> It is possible (via shutdown()) for TCP socks to go trough TCP_CLOSE >> state via tcp_disconnect() without actually calling tcp_close which >> would then call our bpf_tcp_close() callback.

Re: [bpf PATCH v3 2/3] bpf: sockmap, fix transition through disconnect without close

2018-09-17 Thread Y Song
On Mon, Sep 17, 2018 at 9:39 PM John Fastabend wrote: > > It is possible (via shutdown()) for TCP socks to go trough TCP_CLOSE > state via tcp_disconnect() without actually calling tcp_close which > would then call our bpf_tcp_close() callback. Because of this a user > could disconnect a socket

[PATCH] netfilter: nft_osf: use enum nft_data_types for nft_validate_register_store

2018-09-17 Thread Stefan Agner
The function nft_validate_register_store requires a struct of type struct nft_data_types. NFTA_DATA_VALUE is of type enum nft_verdict_attributes. Pass the correct enum type. This fixes a warning seen with Clang: net/netfilter/nft_osf.c:52:8: warning: implicit conversion from enumeration

[RESEND net 2/3] net/mlx5: Check for SQ and not RQ state when modifying hairpin SQ

2018-09-17 Thread Saeed Mahameed
From: Alaa Hleihel When modifying hairpin SQ, instead of checking if the next state equals to MLX5_SQC_STATE_RDY, we compare it against the MLX5_RQC_STATE_RDY enum value. The code worked since both of MLX5_RQC_STATE_RDY and MLX5_SQC_STATE_RDY have the same value today. This patch fixes this

[RESEND net 3/3] net/mlx5e: TLS, Read capabilities only when it is safe

2018-09-17 Thread Saeed Mahameed
Read TLS caps from the core driver only when TLS is supported, i.e mlx5_accel_is_tls_device returns true. Fixes: 790af90c00d2 ("net/mlx5e: TLS, build TLS netdev from capabilities") Reported-by: Michal Kubecek Signed-off-by: Saeed Mahameed Reviewed-by: Boris Pismenny Reviewed-by: Tariq Toukan

[RESEND net 1/3] net/mlx5: Fix read from coherent memory

2018-09-17 Thread Saeed Mahameed
From: Eli Cohen Use accessor function READ_ONCE to read from coherent memory modified by the device and read by the driver. This becomes most important in preemptive kernels where cond_resched implementation does not have the side effect which guaranteed the updated value. Fixes: 269d26f47f6f

[pull request][RESEND net 0/3] Mellanox, mlx5 fixes 2018-09-17

2018-09-17 Thread Saeed Mahameed
Hi Dave, Sorry about the previous submission of this series which was mistakenly marked for net-next, here I am resending with 'net' mark. This series provides three fixes to mlx5 core and mlx5e netdevice driver. Please pull and let me know if there's any problem. For -stable v4.16:

[PATCH][net-next] netlink: avoid to allocate full skb when sending to many devices

2018-09-17 Thread Li RongQing
if skb->head is vmalloc address, when this skb is delivered, full allocation for this skb is required, if there are many devices, the full allocation will be called for every devices now using the first time allocated skb when iterate other devices to send, reduce full allocation and speedup

[bpf PATCH v3 1/3] bpf: sockmap only allow ESTABLISHED sock state

2018-09-17 Thread John Fastabend
After this patch we only allow socks that are in ESTABLISHED state or are being added via a sock_ops event that is transitioning into an ESTABLISHED state. By allowing sock_ops events we allow users to manage sockmaps directly from sock ops programs. The two supported sock_ops ops are

[bpf PATCH v3 3/3] bpf: test_maps, only support ESTABLISHED socks

2018-09-17 Thread John Fastabend
Ensure that sockets added to a sock{map|hash} that is not in the ESTABLISHED state is rejected. Fixes: 1aa12bdf1bfb ("bpf: sockmap, add sock close() hook to remove socks") Signed-off-by: John Fastabend --- tools/testing/selftests/bpf/test_maps.c | 10 +++--- 1 file changed, 7

[bpf PATCH v3 2/3] bpf: sockmap, fix transition through disconnect without close

2018-09-17 Thread John Fastabend
It is possible (via shutdown()) for TCP socks to go trough TCP_CLOSE state via tcp_disconnect() without actually calling tcp_close which would then call our bpf_tcp_close() callback. Because of this a user could disconnect a socket then put it in a LISTEN state which would break our assumptions

[bpf PATCH v3 0/3] bpf, sockmap ESTABLISHED state only

2018-09-17 Thread John Fastabend
Eric noted that using the close callback is not sufficient to catch all transitions from ESTABLISHED state to a LISTEN state. So this series does two things. First, only allow adding socks in ESTABLISH state and second use unhash callback to catch tcp_disconnect() transitions. v2: added check for

[PATCH bpf-next] samples/bpf: fix a compilation failure

2018-09-17 Thread Yonghong Song
samples/bpf build failed with the following errors: $ make samples/bpf/ ... HOSTCC samples/bpf/sockex3_user.o /data/users/yhs/work/net-next/samples/bpf/sockex3_user.c:16:8: error: redefinition of ‘struct bpf_flow_keys’ struct bpf_flow_keys { ^ In file included from

Re: [pull request][net-next 0/3] Mellanox, mlx5 fixes 2018-09-17

2018-09-17 Thread Saeed Mahameed
On Mon, Sep 17, 2018 at 7:37 PM David Miller wrote: > > From: Saeed Mahameed > Date: Mon, 17 Sep 2018 17:01:58 -0700 > > > This series provides three fixes to mlx5 core and mlx5e netdevice > > driver. > > > > Please pull and let me know if there's any problem. > > > > For -stable v4.16: > >

[RFC PATCH bpf-next v3 1/7] bpf: rename stack trace map

2018-09-17 Thread Mauricio Vasquez B
In the following patches queue and stack maps (FIFO and LIFO datastructures) will be implemented. In order to avoid confusion and a possible name clash rename stackmap.c to stacktracemap.c and stack_map_ops to stack_trace_map_ops Signed-off-by: Mauricio Vasquez B --- include/linux/bpf_types.h

  1   2   >