[PATCH net] cxgb4: do not set needs_free_netdev for mgmt dev's

2018-03-06 Thread Ganesh Goudar
Do not set 'needs_free_netdev' as we do call free_netdev for mgmt net devices, doing both hits BUG_ON. Signed-off-by: Ganesh Goudar --- drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c b/drivers/ne

[PATCH net] cxgb4: copy adap index to PF0-3 adapter instances

2018-03-06 Thread Ganesh Goudar
instantiation of VF's on different adapters fails, copy adapter index and chip type to PF0-3 adapter instances to fix the issue. Signed-off-by: Ganesh Goudar --- drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/ethernet/chelsio/cxg

Re: Use of Indirect function calls

2018-03-06 Thread Rao Shoaib
On 03/06/2018 10:32 PM, Eric Dumazet wrote: On Tue, 2018-03-06 at 21:53 -0800, Rao Shoaib wrote: David, Thanks a lot for your prompt response. Do you have a specific solution in mind or will the calls be replaced with simple checks ? There is upcoming work for that, but not specific to TCP s

Re: [pci PATCH v3 0/3] Add support for unmanaged SR-IOV

2018-03-06 Thread Christoph Hellwig
On Tue, Mar 06, 2018 at 11:29:08AM -0800, Alexander Duyck wrote: > This series is meant to add support for SR-IOV on devices when the VFs are > not managed by the kernel. Examples of recent patches attempting to do this > include: > virto - https://patchwork.kernel.org/patch/10241225/ > pci-stub -

[for-next V2 12/13] {net,IB}/mlx5: Add flow steering helpers

2018-03-06 Thread Saeed Mahameed
From: Boris Pismenny Add helper functions that check if a protocol is part of a flow steering match criteria. Signed-off-by: Boris Pismenny Signed-off-by: Matan Barak Signed-off-by: Aviad Yehezkel Signed-off-by: Saeed Mahameed --- drivers/infiniband/hw/mlx5/main.c | 7 +- include/linux/ml

[for-next V2 13/13] net/mlx5: Flow steering cmd interface should get the fte when deleting

2018-03-06 Thread Saeed Mahameed
From: Aviad Yehezkel Previously, deleting a flow steering entry only got the index. Since the FPGA implementation of FTE's deletion might need to dig inside the FTE itself, we would like to get the FTE's context. Changing the interface to pass the FTE context. Signed-off-by: Aviad Yehezkel Sign

[for-next V2 11/13] net/mlx5: Embed mlx5_flow_act into fs_fte

2018-03-06 Thread Saeed Mahameed
From: Matan Barak fte objects contain the match value and action. Currently, extending the actions require in adding them both to the API and fs_fte. Signed-off-by: Matan Barak Signed-off-by: Aviad Yehezkel Signed-off-by: Saeed Mahameed --- .../mellanox/mlx5/core/diag/fs_tracepoint.h

[for-next V2 09/13] net/mlx5: Add shim layer between fs and cmd

2018-03-06 Thread Saeed Mahameed
From: Matan Barak The shim layer allows each namespace to define possibly different functionality for add/delete/update commands. The shim layer introduced here, will be used to support flow steering with the FPGA. Signed-off-by: Matan Barak Signed-off-by: Aviad Yehezkel Signed-off-by: Boris P

[for-next V2 07/13] IB/mlx5: Pass mlx5_flow_act struct instead of multiple arguments

2018-03-06 Thread Saeed Mahameed
From: Boris Pismenny Group and pass all function arguments of parse_flow_attr call in one common struct mlx5_flow_act. This patch passes all the action arguments of parse_flow_attr in one common struct mlx5_flow_act. It allows us to scale the number of actions without adding new arguments to the

[for-next V2 04/13] net/mlx5e: Fixed sleeping inside atomic context

2018-03-06 Thread Saeed Mahameed
From: Aviad Yehezkel We can't allocate with GFP_KERNEL inside spinlock. Actually ida_simple doesn't require spinlock so remove it. Fixes: 547eede070eb ("net/mlx5e: IPSec, Innova IPSec offload infrastructure") Signed-off-by: Aviad Yehezkel Signed-off-by: Saeed Mahameed --- drivers/net/ethernet

[for-next V2 10/13] net/mlx5: Add empty egress namespace to flow steering core

2018-03-06 Thread Saeed Mahameed
From: Aviad Yehezkel Currently, we don't support egress flow steering namespace in mlx5 flow steering core implementation. However, when we want to encrypt a packet, we model it as a flow steering rule in the egress path. To overcome this, we add an empty egress namespace to flow steering. This n

[for-next V2 08/13] {net,IB}/mlx5: Add has_tag to mlx5_flow_act

2018-03-06 Thread Saeed Mahameed
From: Matan Barak The has_tag member will indicate whether a tag action was specified in flow specification. A flow tag 0 = MLX5_FS_DEFAULT_FLOW_TAG is assumed a valid flow tag that is currently used by mlx5 RDMA driver, whereas in HW flow_tag = 0 means that the user doesn't care about flow_tag.

[for-next V2 06/13] net/mlx5: FPGA and IPSec initialization to be before flow steering

2018-03-06 Thread Saeed Mahameed
From: Matan Barak Some flow steering namespace initialization (i.e. egress namespace) might depend on FPGA capabilities. Changing the initialization order such that the FPGA will be initialized before flow steering. Flow steering fs cmds initialization might depend on IPSec capabilities. Changin

[for-next V2 05/13] net/mlx5e: Removed not need synchronize_rcu

2018-03-06 Thread Saeed Mahameed
From: Aviad Yehezkel This is already done by xfrm layer between state_dev_del callback to state_dev_free callback. Signed-off-by: Aviad Yehezkel Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)

[for-next V2 03/13] net/mlx5e: Wait for FPGA command responses with a timeout

2018-03-06 Thread Saeed Mahameed
From: Aviad Yehezkel Generally, FPGA IPSec commands must always complete. We want to wait for one minute for them to complete gracefully also when killing a process. Signed-off-by: Aviad Yehezkel Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/fpga/ipsec.c | 9 ++

[for-next V2 02/13] net/mlx5: Fixed compilation issue when CONFIG_MLX5_ACCEL is disabled

2018-03-06 Thread Saeed Mahameed
From: Aviad Yehezkel IPSec init and cleanup functions also depends on linux/mlx5/driver.h. Signed-off-by: Aviad Yehezkel Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/accel/ipsec.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/

[for-next V2 01/13] IB/mlx5: Removed not used parameters

2018-03-06 Thread Saeed Mahameed
From: Aviad Yehezkel Signed-off-by: Aviad Yehezkel Signed-off-by: Saeed Mahameed Acked-by: Jason Gunthorpe --- drivers/infiniband/hw/mlx5/main.c | 2 -- drivers/infiniband/hw/mlx5/qp.c | 3 --- 2 files changed, 5 deletions(-) diff --git a/drivers/infiniband/hw/mlx5/main.c b/drivers/infini

[pull request][for-next V2 00/13] Mellanox, mlx5 IPSec updates 2018-02-28-1

2018-03-06 Thread Saeed Mahameed
Hi Dave and Doug, This series includes shared code updates for mlx5 core driver for both netdev and rdma subsystems. This series should be pulled to both trees so we can continue netdev and rdma specific submissions separately. For more information please see tag log below. The series doesn't c

Re: Use of Indirect function calls

2018-03-06 Thread Eric Dumazet
On Tue, 2018-03-06 at 21:53 -0800, Rao Shoaib wrote: > David, > > Thanks a lot for your prompt response. Do you have a specific > solution  > in mind or will the calls be replaced with simple checks ? There is upcoming work for that, but not specific to TCP stack. > > Also while I have your att

Re: [for-next 01/14] net/mlx5: Fixed sparse issues

2018-03-06 Thread Saeed Mahameed
On Mon, 2018-03-05 at 22:53 +0200, Or Gerlitz wrote: > On Mon, Mar 5, 2018 at 10:46 PM, Saeed Mahameed > wrote: > > From: Aviad Yehezkel > > > > 1. Local fucntions should be static. > > s/fucntions/functions/ > > > 2. Missing declarations warnings. > > > > Signed-off-by: Aviad Yehezkel > > S

Re: [for-next 09/14] {net,IB}/mlx5: Add has_tag to mlx5_flow_act

2018-03-06 Thread Saeed Mahameed
On Mon, 2018-03-05 at 14:07 -0700, Jason Gunthorpe wrote: > On Mon, Mar 05, 2018 at 12:46:32PM -0800, Saeed Mahameed wrote: > > From: Matan Barak > > > > The has_tag member will indicate whether a tag action was specified > > in flow specification. > > It would be good to describe in the commit

Re: [for-next 10/14] net/mlx5: Add shim layer between fs and cmd

2018-03-06 Thread Saeed Mahameed
On Mon, 2018-03-05 at 14:03 -0700, Jason Gunthorpe wrote: > On Mon, Mar 05, 2018 at 12:46:33PM -0800, Saeed Mahameed wrote: > > > +static struct mlx5_flow_cmds mlx5_flow_cmds = { > > 'static const' on these new static structs? > Yes, Will fix. > Jason

Re: Use of Indirect function calls

2018-03-06 Thread Rao Shoaib
David, Thanks a lot for your prompt response. Do you have a specific solution in mind or will the calls be replaced with simple checks ? Also while I have your attention can I ask your opinion about breaking up some TCP functions, mostly control functions into smaller units so that if a litt

Re: [RFC v3 net-next 00/18] Time based packet transmission

2018-03-06 Thread Richard Cochran
On Tue, Mar 06, 2018 at 05:12:12PM -0800, Jesus Sanchez-Palencia wrote: > Design changes since v2: > - Now on the dequeue() path, tbs only drops an expired packet if it has the >skb->tc_drop_if_late flag set. In practical terms, this will define if >the semantics of txtime on a system is "

Re: [RFC v3 net-next 08/18] net: SO_TXTIME: Add clockid and drop_if_late params

2018-03-06 Thread Richard Cochran
On Tue, Mar 06, 2018 at 06:53:29PM -0800, Eric Dumazet wrote: > This is adding 32+1 bits to sk_buff, and possibly holes in this very > very hot (and already too fat) structure. > > Do we really need 32 bits for a clockid_t ? Probably we can live with fewer bits. For clock IDs with a positive sig

Re: [PATCH net v2 RESEND] ipv6: Reflect MTU changes on PMTU of exceptions for MTU-less routes

2018-03-06 Thread David Ahern
On 3/6/18 3:10 AM, Stefano Brivio wrote: > Currently, administrative MTU changes on a given netdevice are > not reflected on route exceptions for MTU-less routes, with a > set PMTU value, for that device: > > # ip -6 route get 2001:db8::b > 2001:db8::b from :: dev vti_a proto kernel src 2001:db8

Re: [PATCH net-next v3] selftests: net: Introduce first PMTU test

2018-03-06 Thread David Ahern
On 3/6/18 2:16 PM, Stefano Brivio wrote: > One single test implemented so far: test_pmtu_vti6_exception > checks that the PMTU of a route exception, caused by a tunnel > exceeding the link layer MTU, is affected by administrative > changes of the tunnel MTU. Creation of the route exception is > che

[PATCH] hv_netvsc: fix multicast flags and sync

2018-03-06 Thread Stephen Hemminger
This addresses two problems with recent multicast flags synchronization. The wrong filter value was being computed (and therefore ARP would not work on WS2016). And the uc/mc sync logic had locking issues because it would be called with irq disabled (reported by lockdep). Fixes: bee9d41b37ea ("hv_

Re: Use of Indirect function calls

2018-03-06 Thread David Miller
From: Rao Shoaib Date: Tue, 6 Mar 2018 19:35:46 -0800 > I do not expect any measurable overhead as modern CPU's use > pre-fetching and multiple parallel execution engines. Please see Spectre and retpolines, all of this parallel execution and prefetching is essentially disabled to address those v

Re: [bpf-next PATCH 05/16] bpf: create tcp_bpf_ulp allowing BPF to monitor socket TX/RX data

2018-03-06 Thread David Miller
From: John Fastabend Date: Tue, 6 Mar 2018 19:25:01 -0800 > What do you think? Sounds good from your description, I can't wait to see it :-)

[PATCH v3 net-next 4/5] selftests: fib_tests: Allow user to run a specific test

2018-03-06 Thread David Ahern
Allow a user to run just a specific fib test by setting the TEST environment variable. Signed-off-by: David Ahern --- tools/testing/selftests/net/fib_tests.sh | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/tools/testing/selftests/net/fib_tests.sh b/tools/testing/

[PATCH v3 net-next 2/5] net/ipv6: Address checks need to consider the L3 domain

2018-03-06 Thread David Ahern
ipv6_chk_addr_and_flags determines if an address is a local address. It is called by ip6_route_info_create to validate a gateway address is not a local address. It currently does not consider L3 domains and as a result does not allow a route to be added in one VRF if the nexthop points to an addres

[PATCH v3 net-next 5/5] selftests: fib_tests: Add IPv6 nexthop spec tests

2018-03-06 Thread David Ahern
Add series of tests for valid and invalid nexthop specs for IPv6. $ TEST=fib_nexthop_test ./fib_tests.sh ... IPv6 nexthop tests TEST: Directly connected nexthop, unicast address [ OK ] TEST: Directly connected nexthop, unicast address with device [ OK ] TEST: Gateway is l

[PATCH v3 net-next 3/5] selftests: fib_tests: Use an alias for ip command

2018-03-06 Thread David Ahern
Replace 'ip -netns testns' with the alias IP. Shortens the line lengths and makes running the commands manually a bit easier. Signed-off-by: David Ahern --- tools/testing/selftests/net/fib_tests.sh | 169 --- 1 file changed, 85 insertions(+), 84 deletions(-) diff --g

[PATCH v3 net-next 1/5] net/ipv6: Refactor gateway validation on route add

2018-03-06 Thread David Ahern
Move gateway validation code from ip6_route_info_create into ip6_validate_gw. Code move plus adjustments to handle the potential reset of dev and idev and to make checkpatch happy. Signed-off-by: David Ahern --- net/ipv6/route.c | 120 ++- 1 fi

[PATCH v3 net-next 0/5] net/ipv6: Address checks need to consider the L3 domain

2018-03-06 Thread David Ahern
IPv6 prohibits a local address from being used as a gateway for a route. However, it is ok for the local address to be in a different L3 domain (e.g., VRF); this allows, for example, veth pairs to connect VRFs. ip6_route_info_create calls ipv6_chk_addr_and_flags for gateway addresses to determine

Use of Indirect function calls

2018-03-06 Thread Rao Shoaib
I am working on a change which introduces a couple of indirect function calls in the fast path. I used indirect function calls instead of "if/else" as it keeps the code cleaner and more readable and provides for extensibility. I do not expect any measurable overhead as modern CPU's use pre-fet

Re: [bpf-next PATCH 05/16] bpf: create tcp_bpf_ulp allowing BPF to monitor socket TX/RX data

2018-03-06 Thread John Fastabend
On 03/06/2018 10:18 AM, John Fastabend wrote: > On 03/06/2018 07:47 AM, David Miller wrote: >> From: John Fastabend >> Date: Mon, 5 Mar 2018 23:06:01 -0800 >> >>> On 03/05/2018 10:42 PM, David Miller wrote: From: John Fastabend Date: Mon, 5 Mar 2018 22:22:21 -0800 > All I meant

Re: [PATCH net-next] modules: allow modprobe load regular elf binaries

2018-03-06 Thread Greg KH
On Tue, Mar 06, 2018 at 05:07:45PM -0800, Alexei Starovoitov wrote: > combining multiple answers... > > On 3/6/18 3:05 AM, Greg KH wrote: > > > > Any chance you can add a field to your "umh module" type such that a > > normal 'modinfo' program will be able to notice it is different easily? > > o

Re: [RFC v3 net-next 08/18] net: SO_TXTIME: Add clockid and drop_if_late params

2018-03-06 Thread Eric Dumazet
On Tue, 2018-03-06 at 17:12 -0800, Jesus Sanchez-Palencia wrote: > Extend SO_TXTIME APIs with new per-packet parameters: a clockid_t and > a drop_if_late flag. With this commit the API becomes: > > * diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h * index d8340e6e8814..951969ceaf6

Re: [PATCH iproute2 net-next v3] iprule: support for ip_proto, sport and dport match options

2018-03-06 Thread Stephen Hemminger
On Tue, 6 Mar 2018 18:07:59 -0800 Roopa Prabhu wrote: > + if (tb[FRA_IP_PROTO]) { > + SPRINT_BUF(pbuf); > + fprintf(fp, "ip_proto %s ", > + inet_proto_n2a(rta_getattr_u8(tb[FRA_IP_PROTO]), pbuf, > +sizeof(pbuf)))

Re: [PATCH v4 2/2] virtio_net: Extend virtio to use VF datapath when available

2018-03-06 Thread Michael S. Tsirkin
On Tue, Mar 06, 2018 at 03:27:46PM -0800, Alexander Duyck wrote: > > I definitelly vote for a separate common shared code for both netvsc and > > virtio_net - even if you use 2 and 3 netdev model, you could share the > > common code. Strict checks and limitation should be in place. > > Noted. But

[PATCH iproute2 net-next v3] iprule: support for ip_proto, sport and dport match options

2018-03-06 Thread Roopa Prabhu
From: Roopa Prabhu add support to match on ip_proto, sport and dport ranges. For ip_proto, this patch currently enumerates, tcp, udp and sctp. This list can be extended in the future. example: $ip rule add sport 666-777 dport 999 ip_proto tcp table 100 $ip rule show 0: from all lookup local

Re: Investment

2018-03-06 Thread James Tyler
Thank you for your time, We are looking for clients in your country with good business or project that requires financing to execute. Please get back to me if you are interested in this or you know anybody who has good business ideas but lack the necessary capital to fund his projects so we can e

[PATCH net-next] openvswitch: fix vport packet length check.

2018-03-06 Thread William Tu
When sending a packet to a tunnel device, the dev's hard_header_len could be larger than the skb->len in function packet_length(). In the case of ip6gretap/erspan, hard_header_len = LL_MAX_HEADER + t_hlen, which is around 180, and an ARP packet sent to this tunnel has skb->len = 42. This causes th

Re: [RFC v3 iproute2 3/3] tc: Add support for the TBS Qdisc

2018-03-06 Thread Stephen Hemminger
On Tue, 6 Mar 2018 17:16:08 -0800 Jesus Sanchez-Palencia wrote: > atic int tbs_print_opt(struct qdisc_util *qu, FILE *f, struct rtattr *opt) > +{ > + struct rtattr *tb[TCA_TBS_MAX+1]; > + struct tc_tbs_qopt *qopt; > + > + if (opt == NULL) > + return 0; > + > + parse_r

[next-queue PATCH v3 3/8] igb: Enable the hardware traffic class feature bit for igb models

2018-03-06 Thread Vinicius Costa Gomes
This will allow functionality depending on the hardware being traffic class aware to work. In particular the tc-flower offloading checks verifies that this bit is set. Signed-off-by: Vinicius Costa Gomes --- drivers/net/ethernet/intel/igb/igb_main.c | 3 +++ 1 file changed, 3 insertions(+) diff

[next-queue PATCH v3 1/8] igb: Fix not adding filter elements to the list

2018-03-06 Thread Vinicius Costa Gomes
Because the order of the parameters passes to 'hlist_add_behind()' was inverted, the 'parent' node was added "behind" the 'input', as input is not in the list, this causes the 'input' node to be lost. Fixes: 0e71def25281 ("igb: add support of RX network flow classification") Signed-off-by: Viniciu

[next-queue PATCH v3 6/8] igb: Add MAC address support for ethtool nftuple filters

2018-03-06 Thread Vinicius Costa Gomes
This adds the capability of configuring the queue steering of arriving packets based on their source and destination MAC addresses. In practical terms this adds support for the following use cases, characterized by these examples: $ ethtool -N eth0 flow-type ether dst aa:aa:aa:aa:aa:aa action 0 (

[next-queue PATCH v3 7/8] igb: Add the skeletons for tc-flower offloading

2018-03-06 Thread Vinicius Costa Gomes
This adds basic functions needed to implement offloading for filters created by tc-flower. Signed-off-by: Vinicius Costa Gomes --- drivers/net/ethernet/intel/igb/igb_main.c | 66 +++ 1 file changed, 66 insertions(+) diff --git a/drivers/net/ethernet/intel/igb/igb_mai

[next-queue PATCH v3 0/8] igb: offloading of receive filters

2018-03-06 Thread Vinicius Costa Gomes
Hi, Changes from v2: - Addressed review comments from Jakub Kicinski, mostly about coding style adjustments and more consistent error reporting; Changes from v1: - Addressed review comments from Alexander Duyck and Florian Fainelli; - Adding and removing cls_flower filters are now propos

[next-queue PATCH v3 4/8] igb: Add support for MAC address filters specifying source addresses

2018-03-06 Thread Vinicius Costa Gomes
Makes it possible to direct packets to queues based on their source address. Documents the expected usage of the 'flags' parameter. Signed-off-by: Vinicius Costa Gomes --- drivers/net/ethernet/intel/igb/e1000_defines.h | 1 + drivers/net/ethernet/intel/igb/igb.h | 1 + drivers/net/et

[next-queue PATCH v3 8/8] igb: Add support for adding offloaded clsflower filters

2018-03-06 Thread Vinicius Costa Gomes
This allows filters added by tc-flower and specifying MAC addresses, Ethernet types, and the VLAN priority field, to be offloaded to the controller. This reuses most of the infrastructure used by ethtool, but clsflower filters are kept in a separated list, so they are invisible to ethtool. Signed

[next-queue PATCH v3 2/8] igb: Fix queue selection on MAC filters on i210 and i211

2018-03-06 Thread Vinicius Costa Gomes
On the RAH registers there are semantic differences on the meaning of the "queue" parameter for traffic steering depending on the controller model: there is the 82575 meaning, which "queue" means a RX Hardware Queue, and the i350 meaning, where it is a reception pool. The previous behaviour was ha

[next-queue PATCH v3 5/8] igb: Enable nfc filters to specify MAC addresses

2018-03-06 Thread Vinicius Costa Gomes
This allows igb_add_filter()/igb_erase_filter() to work on filters that include MAC addresses (both source and destination). For now, this only exposes the functionality, the next commit glues ethtool into this. Later in this series, these APIs are used to allow offloading of cls_flower filters.

Re: "wrong" ifindex on received VLAN tagged packet?

2018-03-06 Thread Lawrence Kreeger
Using ETH_P_ALL instead of ETH_P_802_2, is causing mstpd to get 3 copies of the same BPDU. One from eth0, one from eth0.100, and another from vlan100 (the bridge). mstpd will drop the one from vlan100, but since there is also an instance of spanning tree running on the native VLAN, there is now no

Re: [PATCH bpf-next v8 00/11] Landlock LSM: Toward unprivileged sandboxing

2018-03-06 Thread Andy Lutomirski
On Tue, Mar 6, 2018 at 11:06 PM, Mickaël Salaün wrote: > > On 06/03/2018 23:46, Tycho Andersen wrote: >> On Tue, Mar 06, 2018 at 10:33:17PM +, Andy Lutomirski wrote: > Suppose I'm writing a container manager. I want to run "mount" in the > container, but I don't want to allow moun() i

[RFC v3 iproute2 2/3] uapi pkt_sched: Add tbs info - DO NOT COMMIT

2018-03-06 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 tbs support. Signed-off-by: Jesus Sanchez-Palencia --- include/uapi/linux/pkt_sched.h | 18 ++ 1 file changed, 18 insertions(+) diff --git a/include/uapi/linux/pk

[RFC v3 iproute2 3/3] tc: Add support for the TBS Qdisc

2018-03-06 Thread Jesus Sanchez-Palencia
From: Vinicius Costa Gomes The Time Based Scheduler (TBS) queueing discipline allows precise control of the transmission time of packets. The syntax is: tc qdisc add dev DEV parent NODE tbs delta clockid [offload] [sorting] Signed-off-by: Vinicius Costa Gomes Signed-off

[RFC v3 iproute2 1/3] include: Add ptp_clock.h to linux uapi

2018-03-06 Thread Jesus Sanchez-Palencia
This header will be used by the new tc-tbs qdisc. It was copied from kernel tag 4.16.0-rc2. Signed-off-by: Jesus Sanchez-Palencia --- include/uapi/linux/ptp_clock.h | 147 + 1 file changed, 147 insertions(+) create mode 100644 include/uapi/linux/ptp_clock

[RFC v3 net-next 05/18] net: ipv4: raw: Hook into time based transmission.

2018-03-06 Thread Jesus Sanchez-Palencia
From: Richard Cochran For raw packets, copy the desired future transmit time from the CMSG cookie into the skb. Signed-off-by: Richard Cochran Signed-off-by: Jesus Sanchez-Palencia --- net/ipv4/raw.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/net/ipv4/raw.c b/net/ipv4/raw.c index 5

[RFC v3 net-next 03/18] posix-timers: Add CLOCKID_INVALID mask

2018-03-06 Thread Jesus Sanchez-Palencia
posix-timers.h states that a clockid_t value is invalid if bits 0, 1 and 2 are all set. Add a mask that can be safely used elsewhere even if this implicit rule's implementation is changed. This is done in preparation for the upcoming time based transmission patchset. Signed-off-by: Jesus Sanchez-

[RFC v3 net-next 00/18] Time based packet transmission

2018-03-06 Thread Jesus Sanchez-Palencia
This series is the v3 of the Time based packet transmission RFC, which was originally proposed by Richard Cochran (v1: https://lwn.net/Articles/733962/ ) and further developed by us with the addition of the tbs qdisc (v2: https://lwn.net/Articles/744797/ ). It introduces a new socket option (SO_TX

[RFC v3 net-next 02/18] net: Clear skb->tstamp only on the forwarding path

2018-03-06 Thread Jesus Sanchez-Palencia
This is done in preparation for the upcoming time based transmission patchset. Now that skb->tstamp will be used to hold packet's txtime, we must ensure that it is being cleared when traversing namespaces. Also, doing that from skb_scrub_packet() would break our feature when tunnels are used. Sign

[RFC v3 net-next 06/18] net: ipv4: udp: Hook into time based transmission.

2018-03-06 Thread Jesus Sanchez-Palencia
From: Richard Cochran For udp packets, copy the desired future transmit time from the CMSG cookie into the skb. Signed-off-by: Richard Cochran Signed-off-by: Jesus Sanchez-Palencia --- net/ipv4/udp.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/net/ipv4/udp.c b/net/

[RFC v3 net-next 04/18] net: Add a new socket option for a future transmit time.

2018-03-06 Thread Jesus Sanchez-Palencia
From: Richard Cochran This patch introduces SO_TXTIME. User space enables this option in order to pass a desired future transmit time in a CMSG when calling sendmsg(2). A new field is added to struct sockcm_cookie, and the tstamp from skbuffs will be used later on. Signed-off-by: Richard Cochr

[RFC v3 net-next 17/18] igb: Refactor igb_offload_cbs()

2018-03-06 Thread Jesus Sanchez-Palencia
Split code into a separate function (igb_offload_apply()) that will be used by TBS offload implementation. Signed-off-by: Jesus Sanchez-Palencia --- drivers/net/ethernet/intel/igb/igb_main.c | 23 ++- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/drivers/net/

[RFC v3 net-next 07/18] net: packet: Hook into time based transmission.

2018-03-06 Thread Jesus Sanchez-Palencia
From: Richard Cochran For raw layer-2 packets, copy the desired future transmit time from the CMSG cookie into the skb. Signed-off-by: Richard Cochran Signed-off-by: Jesus Sanchez-Palencia --- net/packet/af_packet.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/net/packet/af_packe

[RFC v3 net-next 12/18] net/sched: Allow creating a Qdisc watchdog with other clocks

2018-03-06 Thread Jesus Sanchez-Palencia
From: Vinicius Costa Gomes This adds 'qdisc_watchdog_init_clockid()' that allows a clockid to be passed, this allows other time references to be used when scheduling the Qdisc to run. Signed-off-by: Vinicius Costa Gomes --- include/net/pkt_sched.h | 2 ++ net/sched/sch_api.c | 11

[RFC v3 net-next 18/18] igb: Add support for TBS offload

2018-03-06 Thread Jesus Sanchez-Palencia
Implement HW offload support for SO_TXTIME through igb's Launchtime feature. This is done by extending igb_setup_tc() so it supports TC_SETUP_QDISC_TBS and configuring i210 so time based transmit arbitration is enabled. The FQTSS transmission mode added before is extended so strict priority (SP) q

[RFC v3 net-next 08/18] net: SO_TXTIME: Add clockid and drop_if_late params

2018-03-06 Thread Jesus Sanchez-Palencia
Extend SO_TXTIME APIs with new per-packet parameters: a clockid_t and a drop_if_late flag. With this commit the API becomes: - use SO_TXTIME to enable the feature on a socket; - pass the per-packet arguments through the cmsg header using: * SCM_CLOCKID for the clockid to be used as the txtime cl

[RFC v3 net-next 16/18] igb: Only change Tx arbitration when CBS is on

2018-03-06 Thread Jesus Sanchez-Palencia
Currently the data transmission arbitration algorithm - DataTranARB field on TQAVCTRL reg - is always set to CBS when the Tx mode is changed from legacy to 'Qav' mode. Make that configuration a bit more granular in preparation for the upcoming Launchtime enabling patches, since CBS and Launchtime

[RFC v3 net-next 11/18] net: packet: Handle remaining txtime parameters

2018-03-06 Thread Jesus Sanchez-Palencia
Initialize clockid to CLOCKID_INVALID instead of 0 (i.e. CLOCK_REALTIME), and copy both drop_if_late and clockid from CMSG cookie into skb. Signed-off-by: Jesus Sanchez-Palencia --- net/packet/af_packet.c | 13 + 1 file changed, 13 insertions(+) diff --git a/net/packet/af_packet.c b

[RFC v3 net-next 14/18] net/sched: Add HW offloading capability to TBS

2018-03-06 Thread Jesus Sanchez-Palencia
Add new queueing modes to tbs qdisc so HW offload is supported. For hw offload, if sorting is on, then the time sorted list will still be used, but when sorting is disabled the enqueue / dequeue flow will be based on a 'raw' FIFO through the usage of qdisc_enqueue_tail() and qdisc_dequeue_head().

[RFC v3 net-next 13/18] net/sched: Introduce the TBS Qdisc

2018-03-06 Thread Jesus Sanchez-Palencia
From: Vinicius Costa Gomes TBS (Time Based Scheduler) uses the information added earlier in this series (the socket option SO_TXTIME and the new role of sk_buff->tstamp) to schedule traffic transmission based on absolute time. For some workloads, just bandwidth enforcement is not enough, and pre

[RFC v3 net-next 09/18] net: ipv4: raw: Handle remaining txtime parameters

2018-03-06 Thread Jesus Sanchez-Palencia
Initialize clockid to CLOCKID_INVALID instead of 0 (i.e. CLOCK_REALTIME), and copy both drop_if_late and clockid from CMSG cookie into skb. Signed-off-by: Jesus Sanchez-Palencia --- net/ipv4/raw.c | 5 + 1 file changed, 5 insertions(+) diff --git a/net/ipv4/raw.c b/net/ipv4/raw.c index 8e05

[RFC v3 net-next 10/18] net: ipv4: udp: Handle remaining txtime parameters

2018-03-06 Thread Jesus Sanchez-Palencia
Initialize clockid to CLOCKID_INVALID instead of 0 (i.e. CLOCK_REALTIME), and copy both drop_if_late and clockid from CMSG cookie into skb. Signed-off-by: Jesus Sanchez-Palencia --- net/ipv4/udp.c | 5 + 1 file changed, 5 insertions(+) diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c index d683

[RFC v3 net-next 01/18] sock: Fix SO_ZEROCOPY switch case

2018-03-06 Thread Jesus Sanchez-Palencia
Fix the SO_ZEROCOPY switch case on sock_setsockopt() avoiding the ret values to be overwritten by the one set on the default case. Fixes: 28190752c7092 ("sock: permit SO_ZEROCOPY on PF_RDS socket") Signed-off-by: Jesus Sanchez-Palencia --- net/core/sock.c | 3 ++- 1 file changed, 2 insertions(+)

[RFC v3 net-next 15/18] igb: Refactor igb_configure_cbs()

2018-03-06 Thread Jesus Sanchez-Palencia
Make this function retrieve what it needs from the Tx ring being addressed since it already relies on what had been saved on it before. Also, since this function will be used by the upcoming Launchtime patches rename it to better reflect its intention. Note that Launchtime is not part of what 802.1

Re: [PATCH net-next] modules: allow modprobe load regular elf binaries

2018-03-06 Thread Alexei Starovoitov
combining multiple answers... On 3/6/18 3:05 AM, Greg KH wrote: Any chance you can add a field to your "umh module" type such that a normal 'modinfo' program will be able to notice it is different easily? ok. handling of modinfo turned out to be straightforward. kmod tooling worked fine with

[PATCH iproute2-next 3/3] ipmroute: convert to output JSON

2018-03-06 Thread Stephen Hemminger
From: Stephen Hemminger Should be no change for non-json case except putting color on address if desired. Signed-off-by: Stephen Hemminger --- ip/ipmroute.c | 117 ++ 1 file changed, 77 insertions(+), 40 deletions(-) diff --git a/ip/ipmr

[PATCH iproute2-next 2/3] ipmroute: don't complain about unicast routes

2018-03-06 Thread Stephen Hemminger
From: Stephen Hemminger Every non-multicast route prints an error message. Kernel doesn't filter out unicast routes, it is up to filter function to do this. Signed-off-by: Stephen Hemminger --- ip/ipmroute.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/ip/ipmroute

[PATCH iproute2-next 0/3] ip multicast command JSON support

2018-03-06 Thread Stephen Hemminger
From: Stephen Hemminger Update maddr and mroute to support JSON. Fix bug in ipmroute that causes it print error on every unicast route. Stephen Hemminger (3): ipmaddr: json and color support ipmroute: don't complain about unicast routes ipmroute: convert to output JSON ip/ipmaddr.c | 6

[PATCH iproute2-next 1/3] ipmaddr: json and color support

2018-03-06 Thread Stephen Hemminger
From: Stephen Hemminger Support printing mulitcast addresses in json and color mode. Output format is unchanged for normal use. Signed-off-by: Stephen Hemminger --- ip/ipmaddr.c | 69 +--- 1 file changed, 43 insertions(+), 26 deletions(-)

Re: [PATCH net-next 2/2] rds: use list structure to track information for zerocopy completion notification

2018-03-06 Thread Willem de Bruijn
On Tue, Mar 6, 2018 at 10:22 AM, Sowmini Varadhan wrote: > Commit 401910db4cd4 ("rds: deliver zerocopy completion notification > with data") removes support fo r zerocopy completion notification > on the sk_error_queue, thus we no longer need to track the cookie > information in sk_buff structures

Re: [PATCH net-next 1/2] rds: refactor zcopy code into rds_message_zcopy_from_user

2018-03-06 Thread Willem de Bruijn
On Tue, Mar 6, 2018 at 10:22 AM, Sowmini Varadhan wrote: > Move the large block of code predicated on zcopy from > rds_message_copy_from_user into a new function, > rds_message_zcopy_from_user() > > Signed-off-by: Sowmini Varadhan Acked-by: Willem de Bruijn > +int rds_message_copy_from_user(st

Re: "wrong" ifindex on received VLAN tagged packet?

2018-03-06 Thread David Ahern
On 3/6/18 3:02 PM, Lawrence Kreeger wrote: > Hello, > > I'm trying to run mstpd on a per VLAN basis using one traditional > linux bridge per VLAN. I'm running it on kernel version 4.12.4. It > works fine for untagged frames, but I'm having a problem with VLAN > tagged BPDUs arriving on the socke

Re: [PATCH] pci-iov: Add support for unmanaged SR-IOV

2018-03-06 Thread Alexander Duyck
On Tue, Mar 6, 2018 at 12:19 PM, Don Dutile wrote: > On 03/05/2018 04:41 PM, Alexander Duyck wrote: >> >> On Mon, Mar 5, 2018 at 12:57 PM, Don Dutile wrote: >>> >>> On 03/01/2018 03:22 PM, Alex Williamson wrote: On Wed, 28 Feb 2018 16:36:38 -0800 Alexander Duyck wrote: >

Re: [PATCH] net: don't unnecessarily load kernel modules in dev_ioctl()

2018-03-06 Thread Stephen Hemminger
On Tue, 06 Mar 2018 17:27:44 -0500 Paul Moore wrote: > From: Paul Moore > > Starting with v4.16-rc1 we've been seeing a higher than usual number > of requests for the kernel to load networking modules, even on events > which shouldn't trigger a module load (e.g. ioctl(TCGETS)). Stephen > Small

Re: [PATCH iproute2-next v2 00/12] ip more JSON

2018-03-06 Thread David Ahern
On 3/6/18 2:07 PM, Stephen Hemminger wrote: > From: Stephen Hemminger > > The ip command implementation of JSON was very spotty. Only address > and link were originally implemented. After doing route for next, > went ahead and implemented it for a bunch of the other sub commands. > > Hopefully w

Re: [PATCH net-next] modules: allow modprobe load regular elf binaries

2018-03-06 Thread Chris Mason
On 6 Mar 2018, at 11:12, Linus Torvalds wrote: On Mon, Mar 5, 2018 at 5:34 PM, Alexei Starovoitov wrote: As the first step in development of bpfilter project [1] the request_module() code is extended to allow user mode helpers to be invoked. Idea is that user mode helpers are built as part of

Re: [PATCH v4 2/2] virtio_net: Extend virtio to use VF datapath when available

2018-03-06 Thread Alexander Duyck
On Tue, Mar 6, 2018 at 2:59 PM, Jiri Pirko wrote: > Tue, Mar 06, 2018 at 08:08:21PM CET, alexander.du...@gmail.com wrote: >>On Mon, Mar 5, 2018 at 7:15 PM, Stephen Hemminger >> wrote: >>> On Mon, 5 Mar 2018 14:47:20 -0800 >>> Alexander Duyck wrote: >>> On Mon, Mar 5, 2018 at 2:30 PM, Jiri Pi

[PATCH v3.18] net: fec: introduce fec_ptp_stop and use in probe fail path

2018-03-06 Thread Guenter Roeck
From: Lucas Stach [ upstream commit 32cba57ba74be58589aeb4cb6496183e46a5e3e5 ] This function frees resources and cancels delayed work item that have been initialized in fec_ptp_init(). Use this to do proper error handling if something goes wrong in probe function after fec_ptp_init has been cal

Re: [PATCH bpf-next v8 00/11] Landlock LSM: Toward unprivileged sandboxing

2018-03-06 Thread Mickaël Salaün
On 06/03/2018 23:46, Tycho Andersen wrote: > On Tue, Mar 06, 2018 at 10:33:17PM +, Andy Lutomirski wrote: Suppose I'm writing a container manager. I want to run "mount" in the container, but I don't want to allow moun() in general and I want to emulate certain mount() actions.

Re: [PATCH v4 2/2] virtio_net: Extend virtio to use VF datapath when available

2018-03-06 Thread Jiri Pirko
Tue, Mar 06, 2018 at 08:08:21PM CET, alexander.du...@gmail.com wrote: >On Mon, Mar 5, 2018 at 7:15 PM, Stephen Hemminger > wrote: >> On Mon, 5 Mar 2018 14:47:20 -0800 >> Alexander Duyck wrote: >> >>> On Mon, Mar 5, 2018 at 2:30 PM, Jiri Pirko wrote: >>> > Mon, Mar 05, 2018 at 05:11:32PM CET, step

[PATCH net] macvlan: filter out xfrm feature flags

2018-03-06 Thread Shannon Nelson
Adding a macvlan device on top of a lowerdev that supports the xfrm offloads fails. # ip link add link ens1f0 mv0 type macvlan RTNETLINK answers: Operation not permitted Tracing down the failure shows that the macvlan device inherits the NETIF_F_HW_ESP and NETIF_F_HW_ESP_TX_CSUM feature fl

Re: [PATCH bpf-next v8 00/11] Landlock LSM: Toward unprivileged sandboxing

2018-03-06 Thread Tycho Andersen
On Tue, Mar 06, 2018 at 10:33:17PM +, Andy Lutomirski wrote: > >> Suppose I'm writing a container manager. I want to run "mount" in the > >> container, but I don't want to allow moun() in general and I want to > >> emulate certain mount() actions. I can write a filter that catches > >> mount

Re: [PATCH bpf-next v8 00/11] Landlock LSM: Toward unprivileged sandboxing

2018-03-06 Thread Andy Lutomirski
On Tue, Mar 6, 2018 at 10:25 PM, Mickaël Salaün wrote: > > > On 28/02/2018 00:09, Andy Lutomirski wrote: >> On Tue, Feb 27, 2018 at 10:03 PM, Mickaël Salaün wrote: >>> >>> On 27/02/2018 05:36, Andy Lutomirski wrote: On Tue, Feb 27, 2018 at 12:41 AM, Mickaël Salaün wrote: > Hi, > >>

Re: [PATCH] net: don't unnecessarily load kernel modules in dev_ioctl()

2018-03-06 Thread Paul Moore
On Tue, Mar 6, 2018 at 5:27 PM, Paul Moore wrote: > From: Paul Moore > > Starting with v4.16-rc1 we've been seeing a higher than usual number > of requests for the kernel to load networking modules, even on events > which shouldn't trigger a module load (e.g. ioctl(TCGETS)). Stephen > Smalley su

Re: [PATCH bpf-next v8 08/11] landlock: Add ptrace restrictions

2018-03-06 Thread Mickaël Salaün
On 28/02/2018 01:09, Andy Lutomirski wrote: > On Wed, Feb 28, 2018 at 12:00 AM, Mickaël Salaün wrote: >> >> On 28/02/2018 00:23, Andy Lutomirski wrote: >>> On Tue, Feb 27, 2018 at 11:02 PM, Andy Lutomirski wrote: On Tue, Feb 27, 2018 at 10:14 PM, Mickaël Salaün wrote: > I thi

  1   2   3   >