[PATCH v7 13/15] octeontx2-af: Add support for CGX link management

2018-10-05 Thread sunil . kovvuri
From: Linu Cherian CGX LMAC initialization, link status polling etc is done by low level secure firmware. For link management this patch adds a interface or communication mechanism between firmware and this kernel CGX driver. - Firmware interface specification is defined in cgx_fw_if.h. - Suppor

[PATCH v7 15/15] MAINTAINERS: Add entry for Marvell OcteonTX2 Admin Function driver

2018-10-05 Thread sunil . kovvuri
From: Sunil Goutham Added maintainers entry for Marvell OcteonTX2 SOC's RVU admin function driver. Signed-off-by: Sunil Goutham --- MAINTAINERS | 9 + 1 file changed, 9 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index bb5f431..eee6151 100644 --- a/MAINTAINERS +++ b/MAINTAINE

[PATCH v7 14/15] octeontx2-af: Register for CGX lmac events

2018-10-05 Thread sunil . kovvuri
From: Linu Cherian Added support in RVU AF driver to register for CGX LMAC link status change events from firmware and managing them. Processing part will be added in followup patches. - Introduced eventqueue for posting events from cgx lmac. Queueing mechanism will ensure that events can be p

[PATCH v7 12/15] octeontx2-af: Set RVU PFs to CGX LMACs mapping

2018-10-05 Thread sunil . kovvuri
From: Linu Cherian Each of the enabled CGX LMAC is considered a physical interface and RVU PFs are mapped to these. VFs of these SRIOV PFs will be virtual interfaces and share CGX LMAC along with PF. This mapping info will be used later on for Rx/Tx pkt steering. Signed-off-by: Linu Cherian Si

[PATCH v7 02/15] octeontx2-af: Reset all RVU blocks

2018-10-05 Thread sunil . kovvuri
From: Sunil Goutham Go through all BLKADDRs and check which ones are implemented on this silicon and do a HW reset of each implemented block. Also added all RVU AF and PF register offsets. Signed-off-by: Sunil Goutham --- drivers/net/ethernet/marvell/octeontx2/af/rvu.c| 78 ++

[PATCH v7 04/15] octeontx2-af: Add mailbox support infra

2018-10-05 Thread sunil . kovvuri
From: Aleksey Makarov This patch adds mailbox support infrastructure APIs. Each RVU device has a dedicated 64KB mailbox region shared with it's peer for communication. RVU AF has a separate mailbox region shared with each of RVU PFs and a RVU PF has a separate region shared with each of it's VF.

[PATCH v7 06/15] octeontx2-af: Convert mbox msg id check to a macro

2018-10-05 Thread sunil . kovvuri
From: Aleksey Makarov With 10's of mailbox messages expected to be handled in future, checking for message id could become a lengthy switch case. Hence added a macro to auto generate the switch case for each msg id. Signed-off-by: Aleksey Makarov Signed-off-by: Sunil Goutham --- drivers/net/e

[PATCH v7 01/15] octeontx2-af: Add Marvell OcteonTX2 RVU AF driver

2018-10-05 Thread sunil . kovvuri
From: Sunil Goutham This patch adds basic template for Marvell OcteonTX2's resource virtualization unit (RVU) admin function (AF) driver. Just the driver registration and probe. Signed-off-by: Sunil Goutham --- drivers/net/ethernet/marvell/Kconfig | 3 + drivers/net/ethernet/ma

[PATCH v7 09/15] octeontx2-af: Configure block LF's MSIX vector offset

2018-10-05 Thread sunil . kovvuri
From: Sunil Goutham Firmware configures a certain number of MSIX vectors to each of enabled RVU PF/VF. When a block LF is attached to a PF/VF, number of MSIX vectors needed by that LF are set aside (out of PF/VF's total MSIX vectors) and LF's msix_offset is configured in HW. Also added support f

[PATCH v7 11/15] octeontx2-af: Add Marvell OcteonTX2 CGX driver

2018-10-05 Thread sunil . kovvuri
From: Sunil Goutham This patch adds basic template for Marvell OcteonTX2's CGX ethernet interface driver. Just the probe. RVU AF driver will use APIs exported by this driver for various things like PF to physical interface mapping, loopback mode, interface stats etc. Hence marged both drivers int

[PATCH v7 05/15] octeontx2-af: Add mailbox IRQ and msg handlers

2018-10-05 Thread sunil . kovvuri
From: Sunil Goutham This patch adds support for mailbox interrupt and message handling. Mapped mailbox region and registered a workqueue for message handling. Enabled mailbox IRQ of RVU PFs and registered a interrupt handler. When IRQ is triggered work is added to the mbox workqueue for msgs to g

[PATCH v7 03/15] octeontx2-af: Gather RVU blocks HW info

2018-10-05 Thread sunil . kovvuri
From: Sunil Goutham This patch gathers NPA/NIX/SSO/SSOW/TIM/CPT RVU blocks's HW info like number of LFs. Important register offsets saved for later use to avoid code duplication for each block. A bitmap is allocated for each of the blocks which later on will be used to allocate a LF for a RVU PF/

[PATCH v7 07/15] octeontx2-af: Scan blocks for LFs provisioned to PF/VF

2018-10-05 Thread sunil . kovvuri
From: Sunil Goutham Scan all RVU blocks to find any 'LF to RVU PF/VF' mapping done by low level firmware. If found any, mark them as used in respective block's LF bitmap and also save mapped PF/VF's PF_FUNC info. This is done to avoid reattaching a block LF to a different RVU PF/VF. Signed-off-

[PATCH v7 10/15] octeontx2-af: Reconfig MSIX base with IOVA

2018-10-05 Thread sunil . kovvuri
From: Geetha sowjanya HW interprets RVU_AF_MSIXTR_BASE address as an IOVA, hence create a IOMMU mapping for the physcial address configured by firmware and reconfig RVU_AF_MSIXTR_BASE with IOVA. Signed-off-by: Geetha sowjanya Signed-off-by: Sunil Goutham --- drivers/net/ethernet/marvell/octeo

[PATCH v7 08/15] octeontx2-af: Add RVU block LF provisioning support

2018-10-05 Thread sunil . kovvuri
From: Sunil Goutham Added support for a RVU PF/VF to request AF via mailbox to attach or detach NPA/NIX/SSO/SSOW/TIM/CPT block LFs. Also supports partial detachment and modifying current LF attached count of a certian block type. Signed-off-by: Sunil Goutham --- drivers/net/ethernet/marvell/oc

[PATCH v7 00/15] octeontx2-af: Add RVU Admin Function driver

2018-10-05 Thread sunil . kovvuri
From: Sunil Goutham Resource virtualization unit (RVU) on Marvell's OcteonTX2 SOC maps HW resources from the network, crypto and other functional blocks into PCI-compatible physical and virtual functions. Each functional block again has multiple local functions (LFs) for provisioning to PCI devic

RE: [EXT] Re: [PATCH v6 04/15] octeontx2-af: Add mailbox support infra

2018-10-05 Thread Goutham, Sunil
> -Original Message- > From: David Miller > Sent: 06 October 2018 03:21 > To: sunil.kovv...@gmail.com > Cc: netdev@vger.kernel.org; a...@arndb.de; linux-...@vger.kernel.org; > sgout...@marvell.com; amaka...@marvell.com; lbarto...@marvell.com > Subject: [EXT] Re: [PATCH v6 04/15] octeont

[PATCH net] bpf: do not blindly change rlimit in reuseport net selftest

2018-10-05 Thread Eric Dumazet
If the current process has unlimited RLIMIT_MEMLOCK, we should should leave it as is. Fixes: 941ff6f11c02 ("bpf: fix rlimit in reuseport net selftest") Signed-off-by: John Sperbeck Signed-off-by: Eric Dumazet Cc: Daniel Borkmann --- tools/testing/selftests/net/reuseport_bpf.c | 13 +---

Re: [PATCH net-next] net: dsa: mc88e6xxx: Fix 88E6141/6341 2500mbps SERDES speed

2018-10-05 Thread Marek Behun
> Hi Marek > > I'm confused. > > The alt bit is used for configuring 2500. You say 2500 is only > supported on port 5. But !port is only true for port 0? > > Andrew On Topaz alt_bit is used only for port 0 for differentiating 100 mbps vs 200 mbps. The choices for SpdValue are 0 for 10 m

Re: [PATCH net-next v3 0/9] vrf: allow simultaneous service instances in default and other VRFs

2018-10-05 Thread David Ahern
On 10/5/18 3:43 PM, David Miller wrote: > > David, please review this series. > > Thanks. > Looking at them now. Dave: Patches 1 and 2 do not apply cleanly so a new version is needed. >From your perspective you an mark them as changes needed. Mike: Give me a few days before you post a v4; I n

[PATCH iproute2 net-next v3 1/6] utils: Implement get_s64()

2018-10-05 Thread Vinicius Costa Gomes
Add this helper to read signed 64-bit integers from a string. Signed-off-by: Vinicius Costa Gomes --- include/utils.h | 1 + lib/utils.c | 21 + 2 files changed, 22 insertions(+) diff --git a/include/utils.h b/include/utils.h index 8cb4349e..58574a05 100644 --- a/includ

[PATCH iproute2 net-next v3 2/6] include: Add helper to retrieve a __s64 from a netlink msg

2018-10-05 Thread Vinicius Costa Gomes
This allows signed 64-bit integers to be retrieved from a netlink message. Signed-off-by: Vinicius Costa Gomes --- include/libnetlink.h | 7 +++ 1 file changed, 7 insertions(+) diff --git a/include/libnetlink.h b/include/libnetlink.h index 9d9249e6..ffc49e56 100644 --- a/include/libnetlink.

[PATCH iproute2 net-next v3 3/6] libnetlink: Add helper for getting a __s32 from netlink msgs

2018-10-05 Thread Vinicius Costa Gomes
From: Jesus Sanchez-Palencia This function retrieves a signed 32-bit integer from a netlink message and returns it. Signed-off-by: Jesus Sanchez-Palencia --- include/libnetlink.h | 4 1 file changed, 4 insertions(+) diff --git a/include/libnetlink.h b/include/libnetlink.h index ffc49e56.

[PATCH iproute2 net-next v3 4/6] include: add definitions for taprio [DO NOT COMMIT]

2018-10-05 Thread Vinicius Costa Gomes
DO NOT COMMIT This patch exists only to ease the testing, until this header is updated with the definitions from the kernel. Signed-off-by: Vinicius Costa Gomes --- include/uapi/linux/pkt_sched.h | 52 -- 1 file changed, 49 insertions(+), 3 deletions(-) diff --g

[PATCH iproute2 net-next v3 0/6] Introduce the taprio scheduler

2018-10-05 Thread Vinicius Costa Gomes
Hi, Changes from v2: - Used the variable name (instead of the variable type) in a sizeof() operator in patch 2/6 (Ilias Apalodimas); Changes from v1: - Removed references to the "H" (Set-Gates-And-Hold-MAC) and "R" (Set-Gates-And-Release-MAC) commands, as these commands will only

[PATCH iproute2 net-next v3 5/6] tc: Add support for configuring the taprio scheduler

2018-10-05 Thread Vinicius Costa Gomes
This traffic scheduler allows traffic classes states (transmission allowed/not allowed, in the simplest case) to be scheduled, according to a pre-generated time sequence. This is the basis of the IEEE 802.1Qbv specification. Example configuration: tc qdisc replace dev enp3s0 parent root handle 10

[PATCH iproute2 net-next v3 6/6] taprio: Add manpage for tc-taprio(8)

2018-10-05 Thread Vinicius Costa Gomes
This documents the parameters and provides an example of usage. Signed-off-by: Vinicius Costa Gomes --- man/man8/tc-taprio.8 | 142 +++ 1 file changed, 142 insertions(+) create mode 100644 man/man8/tc-taprio.8 diff --git a/man/man8/tc-taprio.8 b/man/man8

Re: [PATCH bpf-next] bpf: emit audit messages upon successful prog load and unload

2018-10-05 Thread Jiri Olsa
On Fri, Oct 05, 2018 at 11:44:35AM -0700, Alexei Starovoitov wrote: > On Fri, Oct 05, 2018 at 08:14:09AM +0200, Jiri Olsa wrote: > > On Thu, Oct 04, 2018 at 03:10:15PM -0700, Alexei Starovoitov wrote: > > > On Thu, Oct 04, 2018 at 10:22:31PM +0200, Jesper Dangaard Brouer wrote: > > > > On Thu, 4 Oc

Re: [PATCH bpf-next 1/6] bpf: introduce BPF_PROG_TYPE_FILE_FILTER

2018-10-05 Thread Alexei Starovoitov
On Fri, Oct 05, 2018 at 05:46:59AM +0100, Al Viro wrote: > On Wed, Oct 03, 2018 at 07:57:45PM -0700, Alexei Starovoitov wrote: > > > @@ -15,6 +15,7 @@ > > #include > > #include > > #include > > +#include <../fs/mount.h> > > No. I've considered splitting cgroup_file_filter_ctx_access() int

Re: [PATCH net-next] rtnetlink: fix rtnl_fdb_dump() for shorter family headers

2018-10-05 Thread David Miller
From: David Ahern Date: Fri, 5 Oct 2018 15:24:29 -0600 > On 10/5/18 3:22 PM, David Miller wrote: >> From: Mauricio Faria de Oliveira >> Date: Mon, 1 Oct 2018 22:50:32 -0300 >> >>> On Mon, Oct 1, 2018 at 12:38 PM Mauricio Faria de Oliveira >>> wrote: Ok, thanks for your suggestions. I

Re: [PATCH net-next] rtnetlink: fix rtnl_fdb_dump() for shorter family headers

2018-10-05 Thread David Miller
From: Mauricio Faria de Oliveira Date: Fri, 5 Oct 2018 18:46:47 -0300 > On Fri, Oct 5, 2018 at 6:24 PM David Ahern wrote: >> >> On 10/5/18 3:22 PM, David Miller wrote: >> > From: Mauricio Faria de Oliveira >> > Date: Mon, 1 Oct 2018 22:50:32 -0300 >> > >> >> On Mon, Oct 1, 2018 at 12:38 PM Maur

Re: [PATCH net-next 00/20] rtnetlink: Add support for rigid checking of data in dump request

2018-10-05 Thread David Miller
From: David Ahern Date: Fri, 5 Oct 2018 15:18:11 -0600 > One thing I missed in the rfc and v1 versions is strict attribute > parsing -- ie., there should be nothing remaining after nla_parse is > done. I have a new patch that adds an nlmsg_parse_strict and > nla_parse_strict that returns -EINVAL

Re: [PATCH net-next] selftests: net: Clean up an unused variable

2018-10-05 Thread David Miller
From: Jakub Sitnicki Date: Fri, 5 Oct 2018 10:19:57 +0200 > Address compiler warning: > > ip_defrag.c: In function 'send_udp_frags': > ip_defrag.c:206:16: warning: unused variable 'udphdr' [-Wunused-variable] > struct udphdr udphdr; > ^~ > > Signed-off-by: Jakub Sitnicki

Re: [PATCH v6 04/15] octeontx2-af: Add mailbox support infra

2018-10-05 Thread David Miller
From: sunil.kovv...@gmail.com Date: Thu, 4 Oct 2018 23:51:47 +0530 > +int otx2_mbox_init(struct otx2_mbox *mbox, void *hwbase, struct pci_dev > *pdev, > +void *reg_base, int direction, int ndevs) > +{ > + int devid; > + struct otx2_mbox_dev *mdev; Please order local vari

Re: [PATCH net-next] rtnetlink: fix rtnl_fdb_dump() for shorter family headers

2018-10-05 Thread Mauricio Faria de Oliveira
On Fri, Oct 5, 2018 at 6:24 PM David Ahern wrote: > > On 10/5/18 3:22 PM, David Miller wrote: > > From: Mauricio Faria de Oliveira > > Date: Mon, 1 Oct 2018 22:50:32 -0300 > > > >> On Mon, Oct 1, 2018 at 12:38 PM Mauricio Faria de Oliveira > >> wrote: > >>> Ok, thanks for your suggestions. > >>>

Re: [PATCH net] ipv6: take rcu lock in rawv6_send_hdrinc()

2018-10-05 Thread David Miller
From: Wei Wang Date: Thu, 4 Oct 2018 10:12:37 -0700 > From: Wei Wang > > In rawv6_send_hdrinc(), in order to avoid an extra dst_hold(), we > directly assign the dst to skb and set passed in dst to NULL to avoid > double free. > However, in error case, we free skb and then do stats update with

Re: [PATCH v2] typo fix in Documentation/networking/af_xdp.rst

2018-10-05 Thread Konrad Djimeli
On 2018-10-04 19:38, Björn Töpel wrote: > Den tors 4 okt. 2018 kl 19:03 skrev Konrad Djimeli : >> >> Fix a simple typo: Completetion -> Completion >> >> Signed-off-by: Konrad Djimeli >> --- >> Changes in v2: >> - Update line below to be same length as text above >> >> Documentation/networking/af_

Re: [PATCH net-next v3 0/9] vrf: allow simultaneous service instances in default and other VRFs

2018-10-05 Thread David Miller
David, please review this series. Thanks.

Re: [PATCH net-next] socket: Tighten no-error check in bind()

2018-10-05 Thread David Miller
From: Jakub Sitnicki Date: Thu, 4 Oct 2018 11:09:40 +0200 > move_addr_to_kernel() returns only negative values on error, or zero on > success. Rewrite the error check to an idiomatic form to avoid confusing > the reader. > > Signed-off-by: Jakub Sitnicki Applied.

Re: [PATCH net] net: sched: Add policy validation for tc attributes

2018-10-05 Thread David Miller
From: David Ahern Date: Wed, 3 Oct 2018 15:05:36 -0700 > From: David Ahern > > A number of TC attributes are processed without proper validation > (e.g., length checks). Add a tca policy for all input attributes and use > when invoking nlmsg_parse. > > The 2 Fixes tags below cover the latest

Re: [PATCH net-next] rtnetlink: fix rtnl_fdb_dump() for shorter family headers

2018-10-05 Thread David Ahern
On 10/5/18 3:22 PM, David Miller wrote: > From: Mauricio Faria de Oliveira > Date: Mon, 1 Oct 2018 22:50:32 -0300 > >> On Mon, Oct 1, 2018 at 12:38 PM Mauricio Faria de Oliveira >> wrote: >>> Ok, thanks for your suggestions. >>> I'll do some research/learning on them, and give it a try for a v2.

Re: [PATCH net-next] rtnetlink: fix rtnl_fdb_dump() for shorter family headers

2018-10-05 Thread David Miller
From: Mauricio Faria de Oliveira Date: Mon, 1 Oct 2018 22:50:32 -0300 > On Mon, Oct 1, 2018 at 12:38 PM Mauricio Faria de Oliveira > wrote: >> Ok, thanks for your suggestions. >> I'll do some research/learning on them, and give it a try for a v2. > > FYI, that is "[PATCH v2 net-next] rtnetlink:

Re: [PATCH net-next] net: dsa: mc88e6xxx: Fix 88E6141/6341 2500mbps SERDES speed

2018-10-05 Thread Andrew Lunn
On Fri, Oct 05, 2018 at 04:42:27PM +0200, Marek Behún wrote: > The port_set_speed method for the Topaz family must not be the same > as for Peridot family, since on Topaz port 5 is the SERDES port and it > can be set to 2500mbps speed mode. > > This patch adds a new method for the Topaz family, al

Re: [PATCH net-next 00/20] rtnetlink: Add support for rigid checking of data in dump request

2018-10-05 Thread David Ahern
On 10/4/18 3:33 PM, David Ahern wrote: > From: David Ahern ... > This patch set addresses the problem by adding a new socket flag, > NETLINK_DUMP_STRICT_CHK, that userspace can use with setsockopt to > request strict checking of headers and attributes on dump requests and > hence unlock the abil

Re: [PATCH 1/3] bpf: allow zero-initializing hash map seed

2018-10-05 Thread Alexei Starovoitov
On Fri, Oct 05, 2018 at 04:27:58PM +0200, Jann Horn wrote: > > Can you please describe exactly why something that is not a kernel > unit test needs deterministic BPF hash map behavior? my use case for deterministic hashing is performance analysis. Both while developing and tuning bpf program and

Re: [PATCH bpf-next] bpf: emit audit messages upon successful prog load and unload

2018-10-05 Thread Alexei Starovoitov
On Fri, Oct 05, 2018 at 04:42:49PM -0300, Arnaldo Carvalho de Melo wrote: > > Is there a way for us to synthesize those prog load/unload for > preexisting loaded bpf objects? see 'bpftool prog show'. get_next_id + get_fd_by_id solve it race free.

Re: [PATCH iproute2-next] libnetlink: Use NLMSG_LENGTH to set nlmsg_len

2018-10-05 Thread David Ahern
On 10/4/18 3:37 PM, David Ahern wrote: > From: David Ahern > > Some of the inner headers are not 4-byte aligned, so use > NLMSG_LENGTH instead of sizeof(req) to set nlmsg_len. > this patch is wrong; headers are supposed to be 4-bytes aligned.

Re: [PATCH bpf-next] bpf: emit audit messages upon successful prog load and unload

2018-10-05 Thread Arnaldo Carvalho de Melo
Em Fri, Oct 05, 2018 at 11:44:35AM -0700, Alexei Starovoitov escreveu: > On Fri, Oct 05, 2018 at 08:14:09AM +0200, Jiri Olsa wrote: > > On Thu, Oct 04, 2018 at 03:10:15PM -0700, Alexei Starovoitov wrote: > > > On Thu, Oct 04, 2018 at 10:22:31PM +0200, Jesper Dangaard Brouer wrote: > > > > My use-ca

Re: [PATCH net-next 11/20] rtnetlink: Update inet6_dump_ifinfo for strict data checking

2018-10-05 Thread David Ahern
On 10/5/18 11:54 AM, Christian Brauner wrote: >> +static int inet6_valid_dump_ifinfo(const struct nlmsghdr *nlh, >> + struct netlink_ext_ack *extack) >> +{ >> +struct ifinfomsg *ifm; >> + >> +if (nlh->nlmsg_len < nlmsg_msg_size(sizeof(*ifm))) { >> +

Re: [PATCH net-next 11/20] rtnetlink: Update inet6_dump_ifinfo for strict data checking

2018-10-05 Thread David Ahern
On 10/5/18 11:48 AM, Christian Brauner wrote: > On Thu, Oct 04, 2018 at 02:33:46PM -0700, David Ahern wrote: >> From: David Ahern >> >> Update inet6_dump_ifinfo for strict data checking. If the flag is >> set, the dump request is expected to have an ifinfomsg struct as >> the header. All elements

Re: [PATCH net-next 08/20] rtnetlink: Update rtnl_dump_ifinfo for strict data checking

2018-10-05 Thread David Ahern
On 10/5/18 11:59 AM, Christian Brauner wrote: >> +err = nlmsg_parse(nlh, hdrlen, tb, IFLA_MAX, ifla_policy, extack); >> +if (err < 0) { >> +if (cb->strict_check) >> +return -EINVAL; >> +goto walk_entries; >> +} >> >> -if (master_

Re: [PATCH net] ipv6: do not leave garbage in rt->fib6_metrics

2018-10-05 Thread Eric Dumazet
On Fri, Oct 5, 2018 at 11:57 AM David Miller wrote: > Applied to net-next, thanks Eric. > > Subject should have said net-next instead of net btw. Oops, sorry for that, I used the wrong script. Thanks.

Re: [PATCH net-next] fib_tests: Add tests for invalid metric on route

2018-10-05 Thread David Miller
From: David Ahern Date: Fri, 5 Oct 2018 10:01:19 -0700 > From: David Ahern > > Add ipv4 and ipv6 test cases with an invalid metrics option causing > ip_metrics_convert to fail. Tests clean up path during route add. > > Also, add nodad to to ipv6 address add. When running ipv6_route_metrics >

Re: [PATCH net] ipv6: do not leave garbage in rt->fib6_metrics

2018-10-05 Thread David Miller
From: Eric Dumazet Date: Fri, 5 Oct 2018 09:17:50 -0700 > In case ip_fib_metrics_init() returns an error, we better > rewrite rt->fib6_metrics with &dst_default_metrics so that > we do not crash later in ip_fib_metrics_put() > > Fixes: 767a2217533f ("net: common metrics init helper for FIB entr

Re: [PATCH net-next] udp: gro behind static key

2018-10-05 Thread David Miller
From: Willem de Bruijn Date: Fri, 5 Oct 2018 11:31:40 -0400 > From: Willem de Bruijn > > Avoid the socket lookup cost in udp_gro_receive if no socket has a > udp tunnel callback configured. > > udp_sk(sk)->gro_receive requires a registration with > setup_udp_tunnel_sock, which enables the sta

Re: [PATCH net-next 06/20] net/ipv4: Update inet_dump_ifaddr for strict data checking

2018-10-05 Thread David Ahern
On 10/5/18 12:02 PM, Christian Brauner wrote: >> + >> +err = nlmsg_parse(nlh, sizeof(struct ifaddrmsg), tb, IFA_MAX, >> + ifa_ipv4_policy, extack); >> +if (err < 0) >> +return err; >> >> -tgt_net = rtnl_g

Re: [PATCH net-next 05/20] netlink: Add new socket option to enable strict checking on dumps

2018-10-05 Thread Christian Brauner
On October 5, 2018 8:43:55 PM GMT+02:00, David Ahern wrote: >On 10/5/18 11:36 AM, Christian Brauner wrote: >>> diff --git a/include/linux/netlink.h b/include/linux/netlink.h >>> index 88c8a2d83eb3..36bdca2aa42d 100644 >>> --- a/include/linux/netlink.h >>> +++ b/include/linux/netlink.h >>> @@ -179,

Re: [PATCH bpf-next] bpf: emit audit messages upon successful prog load and unload

2018-10-05 Thread Alexei Starovoitov
On Fri, Oct 05, 2018 at 08:14:09AM +0200, Jiri Olsa wrote: > On Thu, Oct 04, 2018 at 03:10:15PM -0700, Alexei Starovoitov wrote: > > On Thu, Oct 04, 2018 at 10:22:31PM +0200, Jesper Dangaard Brouer wrote: > > > On Thu, 4 Oct 2018 21:41:17 +0200 Daniel Borkmann > > > wrote: > > > > > > > On 10/04

Re: [PATCH net-next 05/20] netlink: Add new socket option to enable strict checking on dumps

2018-10-05 Thread David Ahern
On 10/5/18 11:36 AM, Christian Brauner wrote: >> diff --git a/include/linux/netlink.h b/include/linux/netlink.h >> index 88c8a2d83eb3..36bdca2aa42d 100644 >> --- a/include/linux/netlink.h >> +++ b/include/linux/netlink.h >> @@ -179,6 +179,8 @@ struct netlink_callback { >> struct netlink_ext_ac

Re: [PATCH net-next 03/20] net: Add extack to nlmsg_parse

2018-10-05 Thread David Ahern
On 10/5/18 11:39 AM, Christian Brauner wrote: > On Thu, Oct 04, 2018 at 02:33:38PM -0700, David Ahern wrote: >> From: David Ahern >> >> Make sure extack is passed to nlmsg_parse where easy to do so. >> Most of these are dump handlers and leveraging the extack in >> the netlink_callback. >> >> Sign

Re: [RFC PATCH bpf-next v4 4/7] bpf: add bpf queue and stack maps

2018-10-05 Thread Alexei Starovoitov
On Thu, Oct 04, 2018 at 10:40:55PM -0500, Mauricio Vasquez wrote: > > > > + /* Round up queue size to nearest power of 2 */ > > > + max_entries = index_mask + 1; > > what's the point of roundup ? > > If the size of the buffer is power of two we can wrap the indexes with an > AND operation instead

Re: [PATCH bpf-next 0/6] Error handling when map lookup isn't supported

2018-10-05 Thread Alexei Starovoitov
On Fri, Oct 05, 2018 at 12:35:55PM +0900, Prashant Bhole wrote: > Currently when map a lookup fails, user space API can not make any > distinction whether given key was not found or lookup is not supported > by particular map. > > In this series we modify return value of maps which do not support

[PATCH ipsec-next] Clear secpath on loopback_xmit

2018-10-05 Thread Benedict Wong
This patch clears the skb->sp when transmitted over loopback. This ensures that the loopback-ed packet does not have any secpath information from the outbound transforms. At present, this causes XFRM tunnel mode packets to be dropped with XFRMINNOPOLS, due to the outbound state being in the secpat

Re: [PATCH net-next 06/20] net/ipv4: Update inet_dump_ifaddr for strict data checking

2018-10-05 Thread Christian Brauner
On Thu, Oct 04, 2018 at 02:33:41PM -0700, David Ahern wrote: > From: David Ahern > > Update inet_dump_ifaddr for strict data checking. If the flag is set, > the dump request is expected to have an ifaddrmsg struct as the header > potentially followed by one or more attributes. Any data passed in

Re: [PATCH net-next 08/20] rtnetlink: Update rtnl_dump_ifinfo for strict data checking

2018-10-05 Thread Christian Brauner
On Thu, Oct 04, 2018 at 02:33:43PM -0700, David Ahern wrote: > From: David Ahern > > Update rtnl_dump_ifinfo for strict data checking. If the flag is set, > the dump request is expected to have an ifinfomsg struct as the header > potentially followed by one or more attributes. Any data passed in

Re: pull-request: bpf 2018-10-05

2018-10-05 Thread David Miller
From: Daniel Borkmann Date: Fri, 5 Oct 2018 19:47:13 +0200 > The following pull-request contains BPF updates for your *net* tree. > > The main changes are: > > 1) Fix to truncate input on ALU operations in 32 bit mode, from Jann. > > 2) Fixes for cgroup local storage to reject reserved flags

Re: [PATCH net-next 11/20] rtnetlink: Update inet6_dump_ifinfo for strict data checking

2018-10-05 Thread Christian Brauner
On Thu, Oct 04, 2018 at 02:33:46PM -0700, David Ahern wrote: > From: David Ahern > > Update inet6_dump_ifinfo for strict data checking. If the flag is > set, the dump request is expected to have an ifinfomsg struct as > the header. All elements of the struct are expected to be 0 and no > attribut

Re: [PATCH net-next 07/20] net/ipv6: Update inet6_dump_addr for strict data checking

2018-10-05 Thread Christian Brauner
On Thu, Oct 04, 2018 at 02:33:42PM -0700, David Ahern wrote: > From: David Ahern > > Update inet6_dump_addr for strict data checking. If the flag is set, the > dump request is expected to have an ifaddrmsg struct as the header > potentially followed by one or more attributes. Any data passed in t

Re: [PATCH net-next 0/5] net: Consolidate metrics handling for ipv4 and ipv6

2018-10-05 Thread David Miller
From: Eric Dumazet Date: Fri, 5 Oct 2018 06:08:57 -0700 > For some reason I have not received the patch series in my inbox, I > only got your "series applied" message. I see what happened. I did something stupid on vger.kernel.org yesterday which ran a partition out of disk space, and some post

Re: [PATCH net-next 11/20] rtnetlink: Update inet6_dump_ifinfo for strict data checking

2018-10-05 Thread Christian Brauner
On Fri, Oct 05, 2018 at 07:48:27PM +0200, Christian Brauner wrote: > On Thu, Oct 04, 2018 at 02:33:46PM -0700, David Ahern wrote: > > From: David Ahern > > > > Update inet6_dump_ifinfo for strict data checking. If the flag is > > set, the dump request is expected to have an ifinfomsg struct as >

Re: [PATCH net-next 11/20] rtnetlink: Update inet6_dump_ifinfo for strict data checking

2018-10-05 Thread Christian Brauner
On Thu, Oct 04, 2018 at 02:33:46PM -0700, David Ahern wrote: > From: David Ahern > > Update inet6_dump_ifinfo for strict data checking. If the flag is > set, the dump request is expected to have an ifinfomsg struct as > the header. All elements of the struct are expected to be 0 and no > attribut

pull-request: bpf 2018-10-05

2018-10-05 Thread Daniel Borkmann
Hi David, The following pull-request contains BPF updates for your *net* tree. The main changes are: 1) Fix to truncate input on ALU operations in 32 bit mode, from Jann. 2) Fixes for cgroup local storage to reject reserved flags on element update and rejection of map allocation with zero-si

Re: [PATCH net-next 16/20] net/namespace: Update rtnl_net_dumpid for strict data checking

2018-10-05 Thread Christian Brauner
On Thu, Oct 04, 2018 at 02:33:51PM -0700, David Ahern wrote: > From: David Ahern > > Update rtnl_net_dumpid for strict data checking. If the flag is set, > the dump request is expected to have an rtgenmsg struct as the header > which has the family as the only element. No data may be appended. >

Re: [PATCH] bpf: 32-bit RSH verification must truncate input before the ALU op

2018-10-05 Thread Edward Cree
On 05/10/18 17:17, Jann Horn wrote: > When I wrote commit 468f6eafa6c4 ("bpf: fix 32-bit ALU op verification"), I > assumed that, in order to emulate 64-bit arithmetic with 32-bit logic, it > is sufficient to just truncate the output to 32 bits; and so I just moved > the register size coercion that

Re: [PATCH net-next 02/20] netlink: Add extack message to nlmsg_parse for invalid header length

2018-10-05 Thread Christian Brauner
On Thu, Oct 04, 2018 at 02:33:37PM -0700, David Ahern wrote: > From: David Ahern > > Give a user a reason why EINVAL is returned in nlmsg_parse. > > Signed-off-by: David Ahern Acked-by: Christian Brauner > --- > include/net/netlink.h | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-

Re: [PATCH net-next 01/20] netlink: Pass extack to dump handlers

2018-10-05 Thread Christian Brauner
On Thu, Oct 04, 2018 at 02:33:36PM -0700, David Ahern wrote: > From: David Ahern > > Declare extack in netlink_dump and pass to dump handlers via > netlink_callback. Add any extack message after the dump_done_errno > allowing error messages to be returned. This will be useful when > strict checki

Re: [PATCH net-next 03/20] net: Add extack to nlmsg_parse

2018-10-05 Thread Christian Brauner
On Thu, Oct 04, 2018 at 02:33:38PM -0700, David Ahern wrote: > From: David Ahern > > Make sure extack is passed to nlmsg_parse where easy to do so. > Most of these are dump handlers and leveraging the extack in > the netlink_callback. > > Signed-off-by: David Ahern Yeah, having extack in dump

Re: [PATCH net-next 02/19] net: usb: aqc111: Add bind and empty unbind callbacks

2018-10-05 Thread David Miller
From: Igor Russkikh Date: Fri, 5 Oct 2018 10:24:42 + > +static int aqc111_bind(struct usbnet *dev, struct usb_interface *intf) > +{ > + int ret; > + struct usb_device *udev = interface_to_usbdev(intf); Please always order local variable declarations from longest to shortest line (rev

Re: [PATCH net-next 05/20] netlink: Add new socket option to enable strict checking on dumps

2018-10-05 Thread Christian Brauner
On Thu, Oct 04, 2018 at 02:33:40PM -0700, David Ahern wrote: > From: David Ahern > > Add a new socket option, NETLINK_DUMP_STRICT_CHK, that userspace > can use via setsockopt to request strict checking of headers and > attributes on dump requests. > > To get dump features such as kernel side fil

Re: [PATCH net-next] cxgb4: use FW_PORT_ACTION_L1_CFG32 for 32 bit capability

2018-10-05 Thread David Miller
From: Ganesh Goudar Date: Fri, 5 Oct 2018 15:04:45 +0530 > when 32 bit port capability is in use, use FW_PORT_ACTION_L1_CFG32 > rather than FW_PORT_ACTION_L1_CFG. > > Signed-off-by: Casey Leedom > Signed-off-by: Ganesh Goudar Applied.

Re: [PATCH v3] net/ncsi: Add NCSI OEM command support

2018-10-05 Thread Vijay Khemka
On 10/4/18, 9:48 PM, "Samuel Mendoza-Jonas" wrote: On Wed, 2018-10-03 at 16:32 -0700, Vijay Khemka wrote: > This patch adds OEM commands and response handling. It also defines OEM > command and response structure as per NCSI specification along with its > handlers. > >

Re: [PATCH net-next 20/20] net/bridge: Update br_mdb_dump for strict data checking

2018-10-05 Thread Christian Brauner
On Thu, Oct 04, 2018 at 02:33:55PM -0700, David Ahern wrote: > From: David Ahern > > Update br_mdb_dump for strict data checking. If the flag is set, > the dump request is expected to have a br_port_msg struct as the > header. All elements of the struct are expected to be 0 and no > attributes ca

Re: [PATCH iproute2 net-next v2 2/6] include: Add helper to retrieve a __s64 from a netlink msg

2018-10-05 Thread Vinicius Costa Gomes
Hi Ilias, Ilias Apalodimas writes: > On Thu, Oct 04, 2018 at 04:17:07PM -0700, Vinicius Costa Gomes wrote: >> This allows signed 64-bit integers to be retrieved from a netlink >> message. >> --- >> include/libnetlink.h | 7 +++ >> 1 file changed, 7 insertions(+) >> >> diff --git a/include/

[PATCH net-next] fib_tests: Add tests for invalid metric on route

2018-10-05 Thread David Ahern
From: David Ahern Add ipv4 and ipv6 test cases with an invalid metrics option causing ip_metrics_convert to fail. Tests clean up path during route add. Also, add nodad to to ipv6 address add. When running ipv6_route_metrics directly seeing an occasional failure on the "Using route with mtu metri

RE: [RFC PATCH] skb: Define NET_IP_ALIGN based on CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS

2018-10-05 Thread David Laight
From: Ben Hutchings > Sent: 04 October 2018 18:37 > > NET_IP_ALIGN is supposed to be defined as 0 if DMA writes to an > unaligned buffer would be more expensive than CPU access to unaligned > header fields, and otherwise defined as 2. > > Currently only ppc64 and x86 configurations define it to b

Re: [PATCH bpf-next] xsk: proper AF_XDP socket teardown ordering

2018-10-05 Thread Song Liu
On Fri, Oct 5, 2018 at 4:28 AM Björn Töpel wrote: > > From: Björn Töpel > > The AF_XDP socket struct can exist in three different, implicit > states: setup, bound and released. Setup is prior the socket has been > bound to a device. Bound is when the socket is active for receive and > send. Relea

Re: [PATCH net] ipv6: do not leave garbage in rt->fib6_metrics

2018-10-05 Thread Eric Dumazet
On Fri, Oct 5, 2018 at 9:29 AM David Ahern wrote: > > On 10/5/18 10:17 AM, Eric Dumazet wrote: > > In case ip_fib_metrics_init() returns an error, we better > > rewrite rt->fib6_metrics with &dst_default_metrics so that > > we do not crash later in ip_fib_metrics_put() > > > > Fixes: 767a2217533f

Re: [PATCH net] ipv6: do not leave garbage in rt->fib6_metrics

2018-10-05 Thread David Ahern
On 10/5/18 10:17 AM, Eric Dumazet wrote: > In case ip_fib_metrics_init() returns an error, we better > rewrite rt->fib6_metrics with &dst_default_metrics so that > we do not crash later in ip_fib_metrics_put() > > Fixes: 767a2217533f ("net: common metrics init helper for FIB entries") > Signed-off

[PATCH net] ipv6: do not leave garbage in rt->fib6_metrics

2018-10-05 Thread Eric Dumazet
In case ip_fib_metrics_init() returns an error, we better rewrite rt->fib6_metrics with &dst_default_metrics so that we do not crash later in ip_fib_metrics_put() Fixes: 767a2217533f ("net: common metrics init helper for FIB entries") Signed-off-by: Eric Dumazet Reported-by: syzbot --- net/ipv6

Re: [PATCH net-next RFC 0/8] udp and configurable gro

2018-10-05 Thread Willem de Bruijn
On Fri, Oct 5, 2018 at 12:05 PM Paolo Abeni wrote: > > On Fri, 2018-10-05 at 11:45 -0400, Willem de Bruijn wrote: > > On Fri, Oct 5, 2018 at 11:30 AM Paolo Abeni wrote: > > > Would love that. We need to care of key decr, too (and possibly don't > > > be fooled by encap_rcv() users). > > > > I jus

Re: [PATCH net-next RFC 0/8] udp and configurable gro

2018-10-05 Thread Paolo Abeni
On Fri, 2018-10-05 at 11:45 -0400, Willem de Bruijn wrote: > On Fri, Oct 5, 2018 at 11:30 AM Paolo Abeni wrote: > > Would love that. We need to care of key decr, too (and possibly don't > > be fooled by encap_rcv() users). > > I just sent http://patchwork.ozlabs.org/patch/979525/ > > Right now

Re: [PATCH net-next] udp: gro behind static key

2018-10-05 Thread Paolo Abeni
On Fri, 2018-10-05 at 11:31 -0400, Willem de Bruijn wrote: > From: Willem de Bruijn > > Avoid the socket lookup cost in udp_gro_receive if no socket has a > udp tunnel callback configured. > > udp_sk(sk)->gro_receive requires a registration with > setup_udp_tunnel_sock, which enables the static

Re: [PATCH net-next 20/20] net/bridge: Update br_mdb_dump for strict data checking

2018-10-05 Thread David Ahern
On 10/5/18 1:34 AM, David Miller wrote: > From: David Ahern > Date: Thu, 4 Oct 2018 14:33:55 -0700 > >> @@ -162,6 +162,28 @@ static int br_mdb_fill_info(struct sk_buff *skb, struct >> netlink_callback *cb, >> return err; >> } >> >> +static int br_mdb_valid_dump_req(const struct nlmsghdr

Re: [PATCH net-next RFC 0/8] udp and configurable gro

2018-10-05 Thread Willem de Bruijn
On Fri, Oct 5, 2018 at 11:30 AM Paolo Abeni wrote: > > Hi, > > Thank you for the prompt reply! > Not at all. Thanks for moving this forward :) > On Fri, 2018-10-05 at 10:41 -0400, Willem de Bruijn wrote: > > On Fri, Oct 5, 2018 at 9:53 AM Paolo Abeni wrote: > > > > > > Hi all, > > > > > > On Fr

Re: [PATCH net-next 0/5] net: Consolidate metrics handling for ipv4 and ipv6

2018-10-05 Thread David Ahern
On 10/5/18 7:08 AM, Eric Dumazet wrote: > Commit 767a2217533fed6 ("net: common metrics init helper for FIB entries") > is not correct because we need to better deal with error paths. > > I will submit this more formally when I can reach my workstation in a few > minutes : > > diff --git a/net/ip

[PATCH net-next] udp: gro behind static key

2018-10-05 Thread Willem de Bruijn
From: Willem de Bruijn Avoid the socket lookup cost in udp_gro_receive if no socket has a udp tunnel callback configured. udp_sk(sk)->gro_receive requires a registration with setup_udp_tunnel_sock, which enables the static key. Signed-off-by: Willem de Bruijn --- include/net/udp.h | 2 ++

Re: [PATCH net-next RFC 0/8] udp and configurable gro

2018-10-05 Thread Paolo Abeni
Hi, Thank you for the prompt reply! On Fri, 2018-10-05 at 10:41 -0400, Willem de Bruijn wrote: > On Fri, Oct 5, 2018 at 9:53 AM Paolo Abeni wrote: > > > > Hi all, > > > > On Fri, 2018-09-14 at 13:59 -0400, Willem de Bruijn wrote: > > > This is a *very rough* draft. Mainly for discussion while

[PATCH net-next] net: dsa: mc88e6xxx: Fix 88E6141/6341 2500mbps SERDES speed

2018-10-05 Thread Marek Behún
The port_set_speed method for the Topaz family must not be the same as for Peridot family, since on Topaz port 5 is the SERDES port and it can be set to 2500mbps speed mode. This patch adds a new method for the Topaz family, allowing the alt_bit mode only for port 0 and the 2500 mbps mode for port

Re: [PATCH net-next RFC 0/8] udp and configurable gro

2018-10-05 Thread Willem de Bruijn
On Fri, Oct 5, 2018 at 9:53 AM Paolo Abeni wrote: > > Hi all, > > On Fri, 2018-09-14 at 13:59 -0400, Willem de Bruijn wrote: > > This is a *very rough* draft. Mainly for discussion while we also > > look at another partially overlapping approach [1]. > > I'm wondering how we go on from this ? I'm

Re: [PATCH 0/3] bpf: allow zero-initialising hash map seed

2018-10-05 Thread Jann Horn
On Fri, Oct 5, 2018 at 4:27 PM Lorenz Bauer wrote: > > On Mon, 1 Oct 2018 at 20:12, Daniel Borkmann wrote: > > > > On 10/01/2018 12:45 PM, Lorenz Bauer wrote: > > > This patch set adds a new flag BPF_F_ZERO_SEED, which allows > > > forcing the seed used by hash maps to zero. This makes > > > it p

  1   2   >