[PATCH v2 net-next 1/5] net/flow_dissector: Save vlan ethertype from headers

2018-07-05 Thread Jianbo Liu
Change vlan dissector key to save vlan tpid to support both 802.1Q and 802.1AD ethertype. Signed-off-by: Jianbo Liu Acked-by: Jiri Pirko --- include/net/flow_dissector.h | 2 +- net/core/flow_dissector.c| 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git

[PATCH v2 net-next 2/5] net/sched: flower: Add support for matching on vlan ethertype

2018-07-05 Thread Jianbo Liu
As flow dissector stores vlan ethertype, tc flower now can match on that. It is to make preparation for supporting QinQ. Signed-off-by: Jianbo Liu Acked-by: Jiri Pirko --- net/sched/cls_flower.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/net/sched/cls_flower.c

[PATCH v2 net-next 5/5] net/sched: flower: Add supprt for matching on QinQ vlan headers

2018-07-05 Thread Jianbo Liu
As support dissecting of QinQ inner and outer vlan headers, user can add rules to match on QinQ vlan headers. Signed-off-by: Jianbo Liu Acked-by: Jiri Pirko --- include/uapi/linux/pkt_cls.h | 4 +++ net/sched/cls_flower.c | 65 ++-- 2 files

[PATCH v2 net-next 4/5] net/sched: flower: Dump the ethertype encapsulated in vlan

2018-07-05 Thread Jianbo Liu
Currently the encapsulated ethertype is not dumped as it's the same as TCA_FLOWER_KEY_ETH_TYPE keyvalue. But the dumping result is inconsistent with input, we add dumping it with TCA_FLOWER_KEY_VLAN_ETH_TYPE. Signed-off-by: Jianbo Liu Acked-by: Jiri Pirko --- net/sched/cls_flower.c | 4 1

[PATCH v2 net-next 3/5] net/flow_dissector: Add support for QinQ dissection

2018-07-05 Thread Jianbo Liu
Dissect the QinQ packets to get both outer and inner vlan information, then store to the extended flow keys. Signed-off-by: Jianbo Liu Acked-by: Jiri Pirko --- include/net/flow_dissector.h | 2 ++ net/core/flow_dissector.c| 32 +--- 2 files changed, 19

[PATCH v2 net-next 0/5] Introduce matching on double vlan/QinQ headers for TC flower

2018-07-05 Thread Jianbo Liu
Currently TC flower supports only one vlan tag, it doesn't match on both outer and inner vlan headers for QinQ. To do this, we add support to get both outer and inner vlan headers for flow dissector, and then TC flower do matching on those information. We also plan to extend TC command to support

Re: Crash due to destroying TCP request sockets using SOCK_DESTROY

2018-07-05 Thread Lorenzo Colitti
On Fri, Jul 6, 2018 at 11:37 AM Subash Abhinov Kasiviswanathan wrote: > > From the call stack, a TCP socket is being destroyed using netlink_diag. > The memory dump showed that the socket was an inet request socket (in > state TCP_NEW_SYN_RECV) with refcount of 0. > [...] > 13232.479820: <2>

[PATCH bpf] xdp: XDP_REDIRECT should check IFF_UP and MTU

2018-07-05 Thread Toshiaki Makita
Otherwise we end up with attempting to send packets from down devices or to send oversized packets, which may cause unexpected driver/device behaviour. Generic XDP has already done this check, so reuse the logic in native XDP. Fixes: 814abfabef3c ("xdp: add bpf_redirect helper function")

Crash due to destroying TCP request sockets using SOCK_DESTROY

2018-07-05 Thread Subash Abhinov Kasiviswanathan
We are seeing a crash on an ARM64 device with Android 4.14 based kernel. From the call stack, a TCP socket is being destroyed using netlink_diag. The memory dump showed that the socket was an inet request socket (in state TCP_NEW_SYN_RECV) with refcount of 0. The crash seems to have happened

Re: [PATCH net-next 0/2] IP listification follow-ups

2018-07-05 Thread David Miller
From: Edward Cree Date: Thu, 5 Jul 2018 15:45:04 +0100 > While working on IPv6 list processing, I found another bug in the IPv4 > version. So this patch series has that fix, and the IPv6 version with > both fixes incorporated. Series applied. Edward, please put (" ") around the commit

Re: [PATCH net] net: aquantia: vlan unicast address list correct handling

2018-07-05 Thread David Miller
From: Igor Russkikh Date: Thu, 5 Jul 2018 17:01:09 +0300 > Setting up macvlan/macvtap networks over atlantic NIC results > in no traffic over these networks because ndo_set_rx_mode did > not listed UC MACs as registered in unicast filter. > > Here we fix that taking into account maximum number

Re: [PATCH net] MAINTAINERS: update my email address

2018-07-05 Thread David Miller
From: Stefan Schmidt Date: Thu, 5 Jul 2018 13:56:44 +0200 > The mail server hosting the old address is going to fade out. > Time to update to an address I control directly. > > Signed-off-by: Stefan Schmidt Applied, thank you.

[PATCH iproute2-next] tc: m_tunnel_key: Add tunnel option support to act_tunnel_key

2018-07-05 Thread Jakub Kicinski
From: Simon Horman Allow setting tunnel options using the act_tunnel_key action. Options are expressed as class:type:data and multiple options may be listed using a comma delimiter. # ip link add name geneve0 type geneve dstport 0 external # tc qdisc add dev eth0 ingress # tc filter add dev

Re: [PATCH bpf-next 11/11] tools: bpftool: allow reuse of maps with bpftool prog load

2018-07-05 Thread Jakub Kicinski
On Thu, 5 Jul 2018 10:35:24 +0200, Daniel Borkmann wrote: > On 07/04/2018 04:54 AM, Jakub Kicinski wrote: > > Add map parameter to prog load which will allow reuse of existing > > maps instead of creating new ones. > > > > Signed-off-by: Jakub Kicinski > > Reviewed-by: Quentin Monnet > [...]

[PATCH v3 iproute2 0/3] Add support for ETF qdisc

2018-07-05 Thread Jesus Sanchez-Palencia
Changes since v2: - Added man page for tc-etf. The ETF (earliest txtime first) qdisc was recently merged into net-next [1], so this patchset adds support for it through the tc command line tool. An initial man page is also provided. The first commit in this series is adding an updated version

[PATCH v3 iproute2 3/3] man: Add initial manpage for tc-etf(8)

2018-07-05 Thread Jesus Sanchez-Palencia
Add an initial manpage for tc-etf covering all config options, basic concepts and operation modes. Signed-off-by: Jesus Sanchez-Palencia --- man/man8/tc-etf.8 | 141 ++ 1 file changed, 141 insertions(+) create mode 100644 man/man8/tc-etf.8 diff

[PATCH v3 iproute2 2/3] tc: Add support for the ETF Qdisc

2018-07-05 Thread Jesus Sanchez-Palencia
From: Vinicius Costa Gomes The "Earliest TxTime First" (ETF) queueing discipline allows precise control of the transmission time of packets by providing a sorted time-based scheduling of packets. The syntax is: tc qdisc add dev DEV parent NODE etf delta clockid [offload]

[PATCH v3 iproute2 1/3] uapi pkt_sched: Add etf info - DO NOT COMMIT

2018-07-05 Thread Jesus Sanchez-Palencia
This should come from the next uapi headers update. Sending it now just as a convenience so anyone can build tc with etf and taprio support. Signed-off-by: Jesus Sanchez-Palencia --- include/uapi/linux/pkt_sched.h | 21 + 1 file changed, 21 insertions(+) diff --git

Business Proposal

2018-07-05 Thread BRENDA WILSON
I am Sgt.Brenda Wilson, originally from Lake Jackson Texas USA.I personally made a special research and I came across your information. I am presently writing this mail to you from U.S Military base Kabul Afghanistan I have a secured business proposal for you. Reply for more details via my

Business Proposal

2018-07-05 Thread BRENDA WILSON
I am Sgt.Brenda Wilson, originally from Lake Jackson Texas USA.I personally made a special research and I came across your information. I am presently writing this mail to you from U.S Military base Kabul Afghanistan I have a secured business proposal for you. Reply for more details via my

RE: [PATCH v1 net-next 6/9] lan743x: Add power management support

2018-07-05 Thread Bryan.Whitehead
> > + data = lan743x_csr_read(adapter, PMT_CTL); > > Hi Bryan > > Why do you do this read? You do not use the result. > Good catch, I'll remove it. > > + > > + wol->supported = WAKE_BCAST | WAKE_UCAST | WAKE_MCAST | > > + WAKE_MAGIC | WAKE_PHY | WAKE_ARP; > > + > > +

RE: [PATCH v1 net-next 5/9] lan743x: Add support for ethtool eeprom access

2018-07-05 Thread Bryan.Whitehead
> > MAX_EEPROM_SIZE ? > ... snip ... > > Andrew Thanks Andrew, I'll change it.

[PATCH net-next 1/2] selftests: forwarding: Allow importing dependent libraries

2018-07-05 Thread Petr Machata
The next patch introduces a new mlxsw-specific test that uses mirror_gre_lib.sh and mirror_gre_topo_lib.sh. However when sourcing their own deps, these libraries assume that the test that's running is in the same directory. That's not the case for driver-specific tests. So change the libraries

[PATCH net-next 2/2] selftests: mlxsw: Add mlxsw-specific test for mirror to gretap

2018-07-05 Thread Petr Machata
Test several aspects of offloading mirror to gretap and ip6gretap netdevices that are specific to mlxsw, such as requirements for TTL and TOS values. Signed-off-by: Petr Machata Reviewed-by: Jiri Pirko --- .../selftests/drivers/net/mlxsw/mirror_gre.sh | 217 + 1 file

[PATCH net-next 0/2] Add a mlxsw-specific test for mirror-to-gretap

2018-07-05 Thread Petr Machata
Some configurations of mirror-to-gretap are impossible for mlxsw to offload. Add a test that checks that these out-of-domain conditions are handled properly by mlxsw. In patch #1, fix mirror_gre_lib.sh and mirror_gre_topo_lib.sh so that they can be imported from directories other than

RE: [PATCH v1 net-next 3/9] lan743x: Add support for ethtool statistics

2018-07-05 Thread Bryan.Whitehead
> ARRAY_SIZE(lan743x_set0_hw_cnt_addr) ? > ...snip... > > Andrew Will do, I will resubmit with these changes.

RE: [PATCH v1 net-next 1/9] lan743x: Add support for ethtool get_drvinfo

2018-07-05 Thread Bryan.Whitehead
> Hi Bryan > > It is normal to put something in the commit message, even if it is the Subject > line said in a different way. > > Otherwise, this looks O.K. > > Andrew OK, thanks Andrew

Re: [PATCH bpf-next 7/7] nfp: bpf: migrate to advanced reciprocal divide in reciprocal_div.h

2018-07-05 Thread Jiong Wang
On 26/06/2018 21:59, Jakub Kicinski wrote: On Sun, 24 Jun 2018 20:54:21 -0700, Jakub Kicinski wrote: +* NOTE: because we are using "reciprocal_value_adv" which doesn't +* support dividend with MSB set, so we need to JIT separate NFP +* sequence to handle such case. It

Re: [PATCH v2 net-next 1/3] rds: Changing IP address internal representation to struct in6_addr

2018-07-05 Thread Santosh Shilimkar
On 6/27/2018 3:23 AM, Ka-Cheong Poon wrote: This patch changes the internal representation of an IP address to use struct in6_addr. IPv4 address is stored as an IPv4 mapped address. All the functions which take an IP address as argument are also changed to use struct in6_addr. But RDS socket

Re: [PATCH v2 net-next 0/3] rds: IPv6 support

2018-07-05 Thread Sowmini Varadhan
Some additional comments on this patchset (consolidated here, please tease this apart into patch1/patch2/patch3 as appropriate) I looked at the most of rds-core, and the rds-tcp changes. Please make sure santosh looks at these carefully, especially. - RDS bind key changes -

Re: [PATCH v1 net-next 6/9] lan743x: Add power management support

2018-07-05 Thread Andrew Lunn
> +static void lan743x_ethtool_get_wol(struct net_device *netdev, > + struct ethtool_wolinfo *wol) > +{ > + struct lan743x_adapter *adapter = netdev_priv(netdev); > + u32 data; > + > + data = lan743x_csr_read(adapter, PMT_CTL); Hi Bryan Why do you do

Re: [PATCH v1 net-next 5/9] lan743x: Add support for ethtool eeprom access

2018-07-05 Thread Andrew Lunn
Hi Bryan > +static int lan743x_ethtool_set_eeprom(struct net_device *netdev, > + struct ethtool_eeprom *ee, u8 *data) > +{ > + struct lan743x_adapter *adapter = netdev_priv(netdev); > + int ret = -EINVAL; > + > + if (ee->magic == LAN743X_EEPROM_MAGIC)

Re: [PATCH v1 net-next 3/9] lan743x: Add support for ethtool statistics

2018-07-05 Thread Andrew Lunn
Hi Bryan > +static void lan743x_ethtool_get_ethtool_stats(struct net_device *netdev, > + struct ethtool_stats *stats, > + u64 *data) > +{ > + struct lan743x_adapter *adapter = netdev_priv(netdev); > + int

Re: [RFC bpf-next 2/6] net: xdp: RX meta data infrastructure

2018-07-05 Thread Jakub Kicinski
On Wed, 4 Jul 2018 09:51:54 +0200, Daniel Borkmann wrote: > On 07/04/2018 02:57 AM, Saeed Mahameed wrote: > > On Tue, 2018-07-03 at 16:01 -0700, Alexei Starovoitov wrote: > >> How about we make driver+firmware provide a BTF definition of > >> metadata that they > >> can provide? There can be

Re: [PATCH v1 net-next 1/9] lan743x: Add support for ethtool get_drvinfo

2018-07-05 Thread Andrew Lunn
On Thu, Jul 05, 2018 at 12:39:18PM -0400, Bryan Whitehead wrote: Hi Bryan It is normal to put something in the commit message, even if it is the Subject line said in a different way. Otherwise, this looks O.K. Andrew

[PATCH] net/sunrpc: Make rpc_auth_create_args a const

2018-07-05 Thread Sargun Dhillon
This turns rpc_auth_create_args into a const as it gets passed through the auth stack. Signed-off-by: Sargun Dhillon --- include/linux/sunrpc/auth.h| 5 +++-- net/sunrpc/auth.c | 2 +- net/sunrpc/auth_gss/auth_gss.c | 9 + net/sunrpc/auth_null.c | 2 +-

[PATCH v1 net-next 1/9] lan743x: Add support for ethtool get_drvinfo

2018-07-05 Thread Bryan Whitehead
Signed-off-by: Bryan Whitehead --- drivers/net/ethernet/microchip/Makefile | 2 +- drivers/net/ethernet/microchip/lan743x_ethtool.c | 21 + drivers/net/ethernet/microchip/lan743x_ethtool.h | 11 +++ drivers/net/ethernet/microchip/lan743x_main.c| 2 ++ 4

[PATCH v1 net-next 4/9] lan743x: Add support for ethtool message level

2018-07-05 Thread Bryan Whitehead
Signed-off-by: Bryan Whitehead --- drivers/net/ethernet/microchip/lan743x_ethtool.c | 17 + 1 file changed, 17 insertions(+) diff --git a/drivers/net/ethernet/microchip/lan743x_ethtool.c b/drivers/net/ethernet/microchip/lan743x_ethtool.c index 988c67c..addd628 100644 ---

[PATCH v1 net-next 0/9] lan743x: Add features to lan743x driver.

2018-07-05 Thread Bryan Whitehead
This patch series adds extra features to the lan743x driver. Bryan Whitehead (9): lan743x: Add support for ethtool get_drvinfo lan743x: Add support for ethtool link settings lan743x: Add support for ethtool statistics lan743x: Add support for ethtool message level lan743x: Add support

[PATCH v1 net-next 3/9] lan743x: Add support for ethtool statistics

2018-07-05 Thread Bryan Whitehead
Signed-off-by: Bryan Whitehead --- drivers/net/ethernet/microchip/lan743x_ethtool.c | 182 +++ drivers/net/ethernet/microchip/lan743x_main.c| 6 +- drivers/net/ethernet/microchip/lan743x_main.h| 31 3 files changed, 216 insertions(+), 3 deletions(-) diff

[PATCH v1 net-next 2/9] lan743x: Add support for ethtool link settings

2018-07-05 Thread Bryan Whitehead
Signed-off-by: Bryan Whitehead --- drivers/net/ethernet/microchip/lan743x_ethtool.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/net/ethernet/microchip/lan743x_ethtool.c b/drivers/net/ethernet/microchip/lan743x_ethtool.c index 0e20758..5c4582c 100644 ---

[PATCH v1 net-next 7/9] lan743x: Add EEE support

2018-07-05 Thread Bryan Whitehead
Signed-off-by: Bryan Whitehead --- drivers/net/ethernet/microchip/lan743x_ethtool.c | 89 drivers/net/ethernet/microchip/lan743x_main.h| 3 + 2 files changed, 92 insertions(+) diff --git a/drivers/net/ethernet/microchip/lan743x_ethtool.c

[PATCH v1 net-next 5/9] lan743x: Add support for ethtool eeprom access

2018-07-05 Thread Bryan Whitehead
Signed-off-by: Bryan Whitehead --- drivers/net/ethernet/microchip/lan743x_ethtool.c | 209 +++ drivers/net/ethernet/microchip/lan743x_main.h| 33 2 files changed, 242 insertions(+) diff --git a/drivers/net/ethernet/microchip/lan743x_ethtool.c

[PATCH v1 net-next 6/9] lan743x: Add power management support

2018-07-05 Thread Bryan Whitehead
Signed-off-by: Bryan Whitehead --- drivers/net/ethernet/microchip/lan743x_ethtool.c | 51 ++ drivers/net/ethernet/microchip/lan743x_main.c| 210 +++ drivers/net/ethernet/microchip/lan743x_main.h| 47 + 3 files changed, 308 insertions(+) diff --git

[PATCH v1 net-next 8/9] lan743x: Add RSS support

2018-07-05 Thread Bryan Whitehead
Signed-off-by: Bryan Whitehead --- drivers/net/ethernet/microchip/lan743x_ethtool.c | 132 +++ drivers/net/ethernet/microchip/lan743x_main.c| 20 drivers/net/ethernet/microchip/lan743x_main.h| 19 3 files changed, 171 insertions(+) diff --git

[PATCH v1 net-next 9/9] lan743x: Add PTP support

2018-07-05 Thread Bryan Whitehead
Signed-off-by: Bryan Whitehead --- drivers/net/ethernet/microchip/Makefile |2 +- drivers/net/ethernet/microchip/lan743x_ethtool.c | 28 + drivers/net/ethernet/microchip/lan743x_main.c| 81 +- drivers/net/ethernet/microchip/lan743x_main.h| 96 +-

[bpf PATCH v2 4/4] bpf: sockmap, convert bpf_compute_data_pointers to bpf_*_sk_skb

2018-07-05 Thread John Fastabend
In commit 'bpf: bpf_compute_data uses incorrect cb structure' (8108a7751512) we added the routine bpf_compute_data_end_sk_skb() to compute the correct data_end values, but this has since been lost. In kernel v4.14 this was correct and the above patch was applied in it entirety. Then when v4.14

[bpf PATCH v2 3/4] bpf: sockmap, consume_skb in close path

2018-07-05 Thread John Fastabend
Currently, when a sock is closed and the bpf_tcp_close() callback is used we remove memory but do not free the skb. Call consume_skb() if the skb is attached to the buffer. Reported-by: syzbot+d464d2c20c717ef5a...@syzkaller.appspotmail.com Fixes: 1aa12bdf1bfb ("bpf: sockmap, add sock close() hook

[bpf PATCH v2 0/4] sockhash/sockmap fixes

2018-07-05 Thread John Fastabend
First three patches resolve issues found while testing sockhash and reviewing code. Syzbot also found them about the same time as I was working on fixes. The main issue is in the sockhash path we reduced the scope of sk_callback lock but this meant we could get update and close running in parallel

[bpf PATCH v2 2/4] bpf: sockhash, disallow bpf_tcp_close and update in parallel

2018-07-05 Thread John Fastabend
After latest lock updates there is no longer anything preventing a close and recvmsg call running in parallel. Additionally, we can race update with close if we close a socket and simultaneously update if via the BPF userspace API (note the cgroup ops are already run with sock_lock held). To

[bpf PATCH v2 1/4] bpf: fix sk_skb programs without skb->dev assigned

2018-07-05 Thread John Fastabend
Multiple BPF helpers in use by sk_skb programs calculate the max skb length using the __bpf_skb_max_len function. However, this calculates the max length using the skb->dev pointer which can be NULL when an sk_skb program is paired with an sk_msg program. To force this a sk_msg program needs to

Re: [bpf PATCH 0/4] sockhash/sockmap fixes

2018-07-05 Thread John Fastabend
On 07/05/2018 08:36 AM, John Fastabend wrote: > First three patches resolve issues found while testing sockhash and > reviewing code. Syzbot also found them about the same time as I was > working on fixes. The main issue is in the sockhash path we reduced > the scope of sk_callback lock but this

Re: [PATCHv2 net-next 2/2] selftests: add a selftest for directed broadcast forwarding

2018-07-05 Thread Xin Long
On Thu, Jul 5, 2018 at 4:21 PM, Xin Long wrote: > On Thu, Jul 5, 2018 at 4:39 AM, Ido Schimmel wrote: >> On Thu, Jul 05, 2018 at 01:56:23AM +0800, Xin Long wrote: >>> On Wed, Jul 4, 2018 at 3:23 AM, David Ahern wrote: >>> > your commands are not a proper test. The test should succeed and fail

[bpf PATCH 3/4] bpf: sockmap, consume_skb in close path

2018-07-05 Thread John Fastabend
Currently, when a sock is closed and the bpf_tcp_close() callback is used we remove memory but do not free the skb. Call consume_skb() if the skb is attached to the buffer. Reported-by: syzbot+d464d2c20c717ef5a...@syzkaller.appspotmail.com Fixes: 1aa12bdf1bfb ("bpf: sockmap, add sock close() hook

[bpf PATCH 4/4] bpf: sockmap, convert bpf_compute_data_pointers to bpf_*_sk_skb

2018-07-05 Thread John Fastabend
In commit 'bpf: bpf_compute_data uses incorrect cb structure' (8108a7751512) we added the routine bpf_compute_data_end_sk_skb() to compute the correct data_end values, but this has since been lost. In kernel v4.14 this was correct and the above patch was applied in it entirety. Then when v4.14

[bpf PATCH 0/4] sockhash/sockmap fixes

2018-07-05 Thread John Fastabend
First three patches resolve issues found while testing sockhash and reviewing code. Syzbot also found them about the same time as I was working on fixes. The main issue is in the sockhash path we reduced the scope of sk_callback lock but this meant we could get update and close running in parallel

[bpf PATCH 2/4] bpf: sockhash, disallow bpf_tcp_close and update in parallel

2018-07-05 Thread John Fastabend
After latest lock updates there is no longer anything preventing a close and recvmsg call running in parallel. Additionally, we can race update with close if we close a socket and simultaneously update if via the BPF userspace API (note the cgroup ops are already run with sock_lock held). To

[bpf PATCH 1/4] bpf: fix sk_skb programs without skb->dev assigned

2018-07-05 Thread John Fastabend
Multiple BPF helpers in use by sk_skb programs calculate the max skb length using the __bpf_skb_max_len function. However, this calculates the max length using the skb->dev pointer which can be NULL when an sk_skb program is paired with an sk_msg program. To force this a sk_msg program needs to

[PATCH v2 iproute2] man: Fix typos on tc-cbs

2018-07-05 Thread Jesus Sanchez-Palencia
Fix 2 typos on the man page of the CBS qdisc. Signed-off-by: Jesus Sanchez-Palencia Reviewed-by: Simon Horman --- man/man8/tc-cbs.8 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/man/man8/tc-cbs.8 b/man/man8/tc-cbs.8 index 32e1e0d4..ad1d8821 100644 ---

[bpf PATCH v2 1/2] bpf: sockmap, error path can not release psock in multi-map case

2018-07-05 Thread John Fastabend
The current code, in the error path of sock_hash_ctx_update_elem, checks if the sock has a psock in the user data and if so decrements the reference count of the psock. However, if the error happens early in the error path we may have never incremented the psock reference count and if the psock

[bpf PATCH v2 2/2] bpf: sockmap, hash table is RCU so readers do not need locks

2018-07-05 Thread John Fastabend
This removes locking from readers of RCU hash table. Its not necessary. Fixes: 81110384441a ("bpf: sockmap, add hash map support") Signed-off-by: John Fastabend --- kernel/bpf/sockmap.c |2 -- 1 file changed, 2 deletions(-) diff --git a/kernel/bpf/sockmap.c b/kernel/bpf/sockmap.c index

[bpf PATCH v2 0/2] sockmap, syzbot fix error path and RCU fix

2018-07-05 Thread John Fastabend
I missed fixing the error path in the sockhash code to align with supporting socks in multiple maps. Simply checking if the psock is present does not mean we can decrement the reference count because it could be part of another map. Fix this by cleaning up the error path so this situation does not

[PATCH net-next 2/2] net: ipv6: listify ipv6_rcv() and ip6_rcv_finish()

2018-07-05 Thread Edward Cree
Essentially the same as the ipv4 equivalents. Signed-off-by: Edward Cree --- include/net/ipv6.h | 2 + net/ipv6/af_inet6.c | 1 + net/ipv6/ip6_input.c | 131 --- 3 files changed, 118 insertions(+), 16 deletions(-) diff --git

[PATCH net-next 1/2] net: ipv4: fix list processing on L3 slave devices

2018-07-05 Thread Edward Cree
If we have an L3 master device, l3mdev_ip_rcv() will steal the skb, but we were returning NET_RX_SUCCESS from ip_rcv_finish_core() which meant that ip_list_rcv_finish() would keep it on the list. Instead let's move the l3mdev_ip_rcv() call into the caller, so that our response to a steal can

[PATCH net-next 0/2] IP listification follow-ups

2018-07-05 Thread Edward Cree
While working on IPv6 list processing, I found another bug in the IPv4 version. So this patch series has that fix, and the IPv6 version with both fixes incorporated. Edward Cree (2): net: ipv4: fix list processing on L3 slave devices net: ipv6: listify ipv6_rcv() and ip6_rcv_finish()

Re: [bpf PATCH 1/2] bpf: sockmap, error path can not release psock in multi-map case

2018-07-05 Thread John Fastabend
On 07/03/2018 07:40 AM, Daniel Borkmann wrote: > On 06/30/2018 03:51 PM, John Fastabend wrote: >> The current code, in the error path of sock_hash_ctx_update_elem, >> checks if the sock has a psock in the user data and if so decrements >> the reference count of the psock. However, if the error

[PATCH net-next v6 02/11] net: sched: change type of reference and bind counters

2018-07-05 Thread Vlad Buslov
Change type of action reference counter to refcount_t. Change type of action bind counter to atomic_t. This type is used to allow decrementing bind counter without testing for 0 result. Reviewed-by: Marcelo Ricardo Leitner Signed-off-by: Vlad Buslov Signed-off-by: Jiri Pirko ---

[PATCH net-next v6 03/11] net: sched: implement unlocked action init API

2018-07-05 Thread Vlad Buslov
Add additional 'rtnl_held' argument to act API init functions. It is required to implement actions that need to release rtnl lock before loading kernel module and reacquire if afterwards. Reviewed-by: Marcelo Ricardo Leitner Signed-off-by: Vlad Buslov Signed-off-by: Jiri Pirko --- Changes from

[PATCH net-next v6 05/11] net: sched: implement action API that deletes action by index

2018-07-05 Thread Vlad Buslov
Implement new action API function that atomically finds and deletes action from idr by index. Intended to be used by lockless actions that do not rely on rtnl lock. Reviewed-by: Marcelo Ricardo Leitner Signed-off-by: Vlad Buslov Signed-off-by: Jiri Pirko --- Changes from V1 to V2: - Rename

[PATCH net-next v6 10/11] net: sched: atomically check-allocate action

2018-07-05 Thread Vlad Buslov
Implement function that atomically checks if action exists and either takes reference to it, or allocates idr slot for action index to prevent concurrent allocations of actions with same index. Use EBUSY error pointer to indicate that idr slot is reserved. Implement cleanup helper function that

[PATCH net-next v6 01/11] net: sched: use rcu for action cookie update

2018-07-05 Thread Vlad Buslov
Implement functions to atomically update and free action cookie using rcu mechanism. Reviewed-by: Marcelo Ricardo Leitner Signed-off-by: Vlad Buslov Signed-off-by: Jiri Pirko --- include/net/act_api.h | 2 +- include/net/pkt_cls.h | 1 + net/sched/act_api.c | 44

[PATCH net-next v6 06/11] net: sched: add 'delete' function to action ops

2018-07-05 Thread Vlad Buslov
Extend action ops with 'delete' function. Each action type to implements its own delete function that doesn't depend on rtnl lock. Implement delete function that is required to delete actions without holding rtnl lock. Use action API function that atomically deletes action only if it is still in

[PATCH net-next v6 00/11] Modify action API for implementing lockless actions

2018-07-05 Thread Vlad Buslov
Currently, all netlink protocol handlers for updating rules, actions and qdiscs are protected with single global rtnl lock which removes any possibility for parallelism. This patch set is a first step to remove rtnl lock dependency from TC rules update path. Recently, new rtnl registration flag

[PATCH net-next v6 07/11] net: sched: implement reference counted action release

2018-07-05 Thread Vlad Buslov
Implement helper delete function that uses new action ops 'delete', instead of destroying action directly. This is required so act API could delete actions by index, without holding any references to action that is being deleted. Implement function __tcf_action_put() that releases reference to

[PATCH net-next v6 11/11] net: sched: change action API to use array of pointers to actions

2018-07-05 Thread Vlad Buslov
Act API used linked list to pass set of actions to functions. It is intrusive data structure that stores list nodes inside action structure itself, which means it is not safe to modify such list concurrently. However, action API doesn't use any linked list specific operations on this set of

[PATCH net-next v6 08/11] net: sched: don't release reference on action overwrite

2018-07-05 Thread Vlad Buslov
Return from action init function with reference to action taken, even when overwriting existing action. Action init API initializes its fourth argument (pointer to pointer to tc action) to either existing action with same index or newly created action. In case of existing index(and bind argument

[PATCH net-next v6 04/11] net: sched: always take reference to action

2018-07-05 Thread Vlad Buslov
Without rtnl lock protection it is no longer safe to use pointer to tc action without holding reference to it. (it can be destroyed concurrently) Remove unsafe action idr lookup function. Instead of it, implement safe tcf idr check function that atomically looks up action in idr and increments

[PATCH net-next v6 09/11] net: sched: use reference counting action init

2018-07-05 Thread Vlad Buslov
Change action API to assume that action init function always takes reference to action, even when overwriting existing action. This is necessary because action API continues to use action pointer after init function is done. At this point action becomes accessible for concurrent modifications, so

Re: [PATCH iproute2] man: Fix typos on tc-cbs

2018-07-05 Thread Simon Horman
Some changelog text should go here. On Wed, Jun 27, 2018 at 10:50:51AM -0700, Jesus Sanchez-Palencia wrote: > Signed-off-by: Jesus Sanchez-Palencia Otherwise, this seems fine to me. Reviewed-by: Simon Horman > --- > man/man8/tc-cbs.8 | 4 ++-- > 1 file changed, 2 insertions(+), 2

Re: [PATCHv2 net-next 2/2] selftests: add a selftest for directed broadcast forwarding

2018-07-05 Thread Xin Long
On Thu, Jul 5, 2018 at 9:18 PM, David Ahern wrote: > On 7/5/18 1:57 AM, Xin Long wrote: >> On Thu, Jul 5, 2018 at 2:36 AM, David Ahern wrote: >>> On 7/4/18 11:56 AM, Xin Long wrote: >>> > your commands are not a proper test. The test should succeed and fail > based on the routing lookup,

[PATCH net] net: aquantia: vlan unicast address list correct handling

2018-07-05 Thread Igor Russkikh
Setting up macvlan/macvtap networks over atlantic NIC results in no traffic over these networks because ndo_set_rx_mode did not listed UC MACs as registered in unicast filter. Here we fix that taking into account maximum number of UC filters supported by hardware. If more than MAX addresses were

Re: [PATCHv2 net-next 2/2] selftests: add a selftest for directed broadcast forwarding

2018-07-05 Thread David Ahern
On 7/5/18 1:57 AM, Xin Long wrote: > On Thu, Jul 5, 2018 at 2:36 AM, David Ahern wrote: >> On 7/4/18 11:56 AM, Xin Long wrote: >> your commands are not a proper test. The test should succeed and fail based on the routing lookup, not iptables rules. >>> A proper test can be done easily

[PATCH net] MAINTAINERS: update my email address

2018-07-05 Thread Stefan Schmidt
The mail server hosting the old address is going to fade out. Time to update to an address I control directly. Signed-off-by: Stefan Schmidt --- MAINTAINERS | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index b40d702337f2..ca3e75ec9308 100644

Re: [PATCH] atm: Preserve value of skb->truesize when accounting to vcc

2018-07-05 Thread David Miller
From: David Woodhouse Date: Thu, 05 Jul 2018 09:44:22 +0100 > On Sat, 2018-06-16 at 16:27 -0700, David Miller wrote: >> From: "David Woodhouse" >> Date: Sat, 16 Jun 2018 20:52:33 - >> >> >> This Fixes tag shoots the messenger really. >> >> >> >> I suggest to instead use : >> >> >> >>

Re: [PATCH wpan 1/2] net: 6lowpan: fix reserved space for single frames

2018-07-05 Thread Stefan Schmidt
Hello. [CC David Palma and Rabi Narayan Sahoo] On 02.07.2018 22:32, Alexander Aring wrote: > This patch fixes patch add handling to take care tail and headroom for > single 6lowpan frames. We need to be sure we have a skb with the right > head and tailroom for single frames. This patch do it by

Re: [PATCH net-next] cxgb4: Fix the condition to check if the card is T5

2018-07-05 Thread David Miller
From: Ganesh Goudar Date: Wed, 4 Jul 2018 17:49:33 +0530 > Use 'chip_ver' rather than 'chip' to check if the card > is T5. > > Fixes: e8d452923ae6 ("cxgb4: clean up init_one") > Signed-off-by: Ganesh Goudar Applied.

Re: [PATCH net] ixgbe: Off by one in ixgbe_ipsec_tx()

2018-07-05 Thread David Miller
From: Dan Carpenter Date: Wed, 4 Jul 2018 12:53:37 +0300 > The ipsec->tx_tbl[] has IXGBE_IPSEC_MAX_SA_COUNT elements so the > needs > to be changed to >= so we don't read one element beyond the end of the > array. > > Fixes: 592594704761 ("ixgbe: process the Tx ipsec offload") > Signed-off-by:

Re: [PATCH net] qed: off by one in qed_parse_mcp_trace_buf()

2018-07-05 Thread David Miller
From: Dan Carpenter Date: Wed, 4 Jul 2018 12:52:36 +0300 > If format_idx == s_mcp_trace_meta.formats_num then we read one element > beyond the end of the s_mcp_trace_meta.formats[] array. > > Fixes: 50bc60cb155c ("qed*: Utilize FW 8.33.11.0") > Signed-off-by: Dan Carpenter Applied.

Re: [PATCH net-next] net: aquantia: Make some functions static

2018-07-05 Thread David Miller
From: Wei Yongjun Date: Thu, 5 Jul 2018 09:00:10 + > Fixes the following sparse warnings: > > drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_utils.c:525:5: warning: > symbol 'hw_atl_utils_mpi_set_speed' was not declared. Should it be static? >

Re: [PATCH net-next] net: dsa: vsc73xx: Make some functions static

2018-07-05 Thread David Miller
From: Wei Yongjun Date: Thu, 5 Jul 2018 08:59:09 + > Fixes the following sparse warnings: > > drivers/net/dsa/vitesse-vsc73xx.c:1054:6: warning: > symbol 'vsc73xx_get_strings' was not declared. Should it be static? > drivers/net/dsa/vitesse-vsc73xx.c:1113:5: warning: > symbol

Re: [PATCH][net-next][v2] net: limit each hash list length to MAX_GRO_SKBS

2018-07-05 Thread David Miller
From: Li RongQing Date: Thu, 5 Jul 2018 14:34:32 +0800 > After commit 07d78363dcff ("net: Convert NAPI gro list into a small hash > table.")' there is 8 hash buckets, which allows more flows to be held for > merging. but MAX_GRO_SKBS, the total held skb for merging, is 8 skb still, > limit the

[PATCH net-next] net: aquantia: Make some functions static

2018-07-05 Thread Wei Yongjun
Fixes the following sparse warnings: drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_utils.c:525:5: warning: symbol 'hw_atl_utils_mpi_set_speed' was not declared. Should it be static? drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_utils.c:536:5: warning: symbol

[PATCH net-next] net: dsa: vsc73xx: Make some functions static

2018-07-05 Thread Wei Yongjun
Fixes the following sparse warnings: drivers/net/dsa/vitesse-vsc73xx.c:1054:6: warning: symbol 'vsc73xx_get_strings' was not declared. Should it be static? drivers/net/dsa/vitesse-vsc73xx.c:1113:5: warning: symbol 'vsc73xx_get_sset_count' was not declared. Should it be static?

Re: [PATCH] atm: Preserve value of skb->truesize when accounting to vcc

2018-07-05 Thread David Woodhouse
On Sat, 2018-06-16 at 16:27 -0700, David Miller wrote: > From: "David Woodhouse" > Date: Sat, 16 Jun 2018 20:52:33 - > > >> This Fixes tag shoots the messenger really. > >> > >> I suggest to instead use : > >> > >> Fixes: 158f323b9868 ("net: adjust skb->truesize in pskb_expand_head()") > > 

Re: [PATCH bpf-next 11/11] tools: bpftool: allow reuse of maps with bpftool prog load

2018-07-05 Thread Daniel Borkmann
On 07/04/2018 04:54 AM, Jakub Kicinski wrote: > Add map parameter to prog load which will allow reuse of existing > maps instead of creating new ones. > > Signed-off-by: Jakub Kicinski > Reviewed-by: Quentin Monnet [...] > + > + fd = map_parse_fd(, ); > +

Re: [PATCH net-next 09/18] tls: Add rx inline crypto offload

2018-07-05 Thread kbuild test robot
Hi Boris, I love your patch! Yet something to improve: [auto build test ERROR on net-next/master] url: https://github.com/0day-ci/linux/commits/Boris-Pismenny/TLS-offload-rx-netdev-mlx5/20180705-064704 config: ia64-allmodconfig (attached as .config) compiler: ia64-linux-gcc (GCC) 8.1.0

Re: [PATCH net-next 05/18] tls: Refactor tls_offload variable names

2018-07-05 Thread kbuild test robot
Hi Boris, I love your patch! Yet something to improve: [auto build test ERROR on net-next/master] url: https://github.com/0day-ci/linux/commits/Boris-Pismenny/TLS-offload-rx-netdev-mlx5/20180705-064704 config: x86_64-randconfig-s0-07051307 (attached as .config) compiler: gcc-6 (Debian 6.4.0

Re: [PATCH net-next 05/18] tls: Refactor tls_offload variable names

2018-07-05 Thread kbuild test robot
Hi Boris, I love your patch! Yet something to improve: [auto build test ERROR on net-next/master] url: https://github.com/0day-ci/linux/commits/Boris-Pismenny/TLS-offload-rx-netdev-mlx5/20180705-064704 config: ia64-allmodconfig (attached as .config) compiler: ia64-linux-gcc (GCC) 8.1.0

Re: [PATCH net-next 09/18] tls: Add rx inline crypto offload

2018-07-05 Thread kbuild test robot
Hi Boris, I love your patch! Perhaps something to improve: [auto build test WARNING on net-next/master] url: https://github.com/0day-ci/linux/commits/Boris-Pismenny/TLS-offload-rx-netdev-mlx5/20180705-064704 config: x86_64-randconfig-s1-07051503 (attached as .config) compiler: gcc-6 (Debian

Re: [PATCHv2 net-next 2/2] selftests: add a selftest for directed broadcast forwarding

2018-07-05 Thread Xin Long
On Thu, Jul 5, 2018 at 4:39 AM, Ido Schimmel wrote: > On Thu, Jul 05, 2018 at 01:56:23AM +0800, Xin Long wrote: >> On Wed, Jul 4, 2018 at 3:23 AM, David Ahern wrote: >> > your commands are not a proper test. The test should succeed and fail >> > based on the routing lookup, not iptables rules.

  1   2   >