Re: [PATCH][net-next] net: increase MAX_GRO_SKBS to 64

2018-07-03 Thread Li RongQing
On 7/2/18, David Miller wrote: > From: Li RongQing > Date: Mon, 2 Jul 2018 19:41:43 +0800 > >> After 07d78363dcffd [net: Convert NAPI gro list into a small hash table] >> there is 8 hash buckets, which allow more flows to be held for merging. >> >> keep each as original list length, so increase

Re: [PATCH v4 net-next 0/9] Handle multiple received packets at each stage

2018-07-03 Thread Paolo Abeni
On Mon, 2018-07-02 at 09:40 -0600, David Ahern wrote: > On 7/2/18 9:11 AM, Edward Cree wrote: > > This patch series adds the capability for the network stack to receive a > > list of packets and process them as a unit, rather than handling each > > packet singly in sequence. This is done by

[PATCHv2 net] sctp: fix the issue that pathmtu may be set lower than MINSEGMENT

2018-07-03 Thread Xin Long
After commit b6c5734db070 ("sctp: fix the handling of ICMP Frag Needed for too small MTUs"), sctp_transport_update_pmtu would refetch pathmtu from the dst and set it to transport's pathmtu without any check. The new pathmtu may be lower than MINSEGMENT if the dst is obsolete and updated by

Re: [PATCH net] r8169: fix mac address change

2018-07-03 Thread Corinna Vinschen
On Jul 2 22:49, Heiner Kallweit wrote: > Network core refuses to change mac address because flag > IFF_LIVE_ADDR_CHANGE isn't set. Set this missing flag. > > Fixes: 1f7aa2bc268e ("r8169: simplify rtl_set_mac_address") > Reported-by: Corinna Vinschen > Signed-off-by: Heiner Kallweit > --- >

[PATCH net-next 0/2] bridge: iproute2 isolated port and selftests

2018-07-03 Thread Nikolay Aleksandrov
Add support to iproute2 for port isolation config and selftests for it. Nikolay Aleksandrov (2): selftests: forwarding: lib: extract ping and ping6 so they can be reused selftests: forwarding: test for bridge port isolation .../net/forwarding/bridge_port_isolation.sh| 151

Re: [PATCH v4 net-next 7/9] net: ipv4: listified version of ip_rcv

2018-07-03 Thread Pablo Neira Ayuso
On Mon, Jul 02, 2018 at 04:14:12PM +0100, Edward Cree wrote: > Also involved adding a way to run a netfilter hook over a list of packets. > Rather than attempting to make netfilter know about lists (which would be > a major project in itself) we just let it call the regular okfn (in this > case

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

2018-07-03 Thread Xin Long
On Mon, Jul 2, 2018 at 11:12 PM, David Ahern wrote: > On 7/2/18 12:30 AM, Xin Long wrote: >> +ping_ipv4() >> +{ >> + sysctl_set net.ipv4.icmp_echo_ignore_broadcasts 0 >> + bc_forwarding_disable >> + ping_test $h1 198.51.100.255 >> + >> + iptables -A INPUT -i vrf-r1 -p icmp -j DROP

Re: [PATCHv2 net-next 0/5] sctp: fully support for dscp and flowlabel per transport

2018-07-03 Thread Neil Horman
On Mon, Jul 02, 2018 at 06:21:10PM +0800, Xin Long wrote: > Now dscp and flowlabel are set from sock when sending the packets, > but being multi-homing, sctp also supports for dscp and flowlabel > per transport, which is described in section 8.1.12 in RFC6458. > > v1->v2: > - define

Re: [PATCHv2 net-next 1/2] route: add support for directed broadcast forwarding

2018-07-03 Thread Xin Long
On Mon, Jul 2, 2018 at 11:05 PM, David Ahern wrote: > On 7/2/18 12:30 AM, Xin Long wrote: >> @@ -2143,6 +2149,10 @@ static int devinet_conf_proc(struct ctl_table *ctl, >> int write, >> if ((new_value == 0) && (old_value != 0)) >>

[PATCH net-next 1/2] selftests: forwarding: lib: extract ping and ping6 so they can be reused

2018-07-03 Thread Nikolay Aleksandrov
Extract ping and ping6 command execution so the return value can be checked by the caller, this is needed for port isolation tests that are intended to fail. Signed-off-by: Nikolay Aleksandrov --- tools/testing/selftests/net/forwarding/lib.sh | 22 -- 1 file changed, 16

[PATCH iproute2 net-next] bridge: add support for isolated option

2018-07-03 Thread Nikolay Aleksandrov
This patch adds support for the new isolated port option which, if set, would allow the isolated ports to communicate only with non-isolated ports and the bridge device. The option can be set via the bridge or ip link type bridge_slave commands, e.g.: $ ip link set dev eth0 type bridge_slave

[PATCH net-next 2/2] selftests: forwarding: test for bridge port isolation

2018-07-03 Thread Nikolay Aleksandrov
This test checks if the bridge port isolation feature works as expected by performing ping/ping6 tests between hosts that are isolated (should not work) and between an isolated and non-isolated hosts (should work). Same test is performed for flooding from and to isolated and non-isolated ports.

[PATCH iproute2] tc: Fix output of ip attributes

2018-07-03 Thread Roi Dayan
Example output is of tos and ttl. Befoe this fix the format used %x caused output of the pointer instead of the intended string created in the out variable. Fixes: e28b88a464c4 ("tc: jsonify flower filter") Signed-off-by: Roi Dayan --- tc/f_flower.c | 2 +- 1 file changed, 1 insertion(+), 1

Re: [PATCH v4 net-next 7/9] net: ipv4: listified version of ip_rcv

2018-07-03 Thread Florian Westphal
Pablo Neira Ayuso wrote: > On Mon, Jul 02, 2018 at 04:14:12PM +0100, Edward Cree wrote: > > Also involved adding a way to run a netfilter hook over a list of packets. > > Rather than attempting to make netfilter know about lists (which would be > > a major project in itself) we just let it call

pull-request: bpf-next 2018-07-03

2018-07-03 Thread Daniel Borkmann
Hi David, The following pull-request contains BPF updates for your *net-next* tree. The main changes are: 1) Various improvements to bpftool and libbpf, that is, bpftool build speed improvements, missing BPF program types added for detection by section name, ability to load programs from

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

2018-07-03 Thread Alexei Starovoitov
On Tue, Jun 26, 2018 at 07:46:11PM -0700, Saeed Mahameed wrote: > The idea from this patch is to define a well known structure for XDP meta > data fields format and offset placement inside the xdp data meta buffer. > > For that driver will need some static information to know what to > provide

Re: [PATCHv2 net] sctp: fix the issue that pathmtu may be set lower than MINSEGMENT

2018-07-03 Thread Marcelo Ricardo Leitner
On Tue, Jul 03, 2018 at 04:30:47PM +0800, Xin Long wrote: > After commit b6c5734db070 ("sctp: fix the handling of ICMP Frag Needed > for too small MTUs"), sctp_transport_update_pmtu would refetch pathmtu > from the dst and set it to transport's pathmtu without any check. > > The new pathmtu may

Re: [PATCH] rhashtable: add restart routine in rhashtable_free_and_destroy()

2018-07-03 Thread Herbert Xu
On Tue, Jul 03, 2018 at 10:19:09PM +0900, Taehee Yoo wrote: > > diff --git a/lib/rhashtable.c b/lib/rhashtable.c > index 0e04947..8ea27fa 100644 > --- a/lib/rhashtable.c > +++ b/lib/rhashtable.c > @@ -1134,6 +1134,7 @@ void rhashtable_free_and_destroy(struct rhashtable *ht, >

[BUG] mlx5 have problems with ipv4-ipv6 tunnels in linux 4.4

2018-07-03 Thread Konstantin Khlebnikov
I'm seeing problems with tunnelled traffic with Mellanox Technologies MT27710 Family [ConnectX-4 Lx] using vanilla driver from linux 4.4.y Packets with payload bigger than 116 bytes are not exmited. Smaller packets and normal ipv6 works fine. In linux 4.9, 4.14 and out-of-tree driver

Re: [PATCH v4 net-next 0/9] Handle multiple received packets at each stage

2018-07-03 Thread David Miller
From: Edward Cree Date: Mon, 2 Jul 2018 16:11:36 +0100 > This patch series adds the capability for the network stack to receive a > list of packets and process them as a unit, rather than handling each > packet singly in sequence. This is done by factoring out the existing > datapath code at

[PATCH iproute2] tc: Fix the bug not to display prio and quantum options of htb

2018-07-03 Thread fumihiko kakuma
A commandline like 'tc -d class show dev dev-name' does not display value of prio and quantum option when we use htb qdisc. This patch fixes the bug. Signed-off-by: Fumihiko Kakuma --- tc/q_htb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tc/q_htb.c b/tc/q_htb.c

Re: QDisc Implementation: Setting bit rate and getting RTT

2018-07-03 Thread Cong Wang
On Tue, Jul 3, 2018 at 4:14 PM Taran Lynn wrote: > > Hello, > I'm new to linux development and am working on creating a qdisc module, > similar to those under net/sched/sch_*.c. Currently I'm stuck on two > things. > > 1. What's the best way to set the maximum bit rate? > 2. How do I determine

Re: [PATCH][net-next] net: increase MAX_GRO_SKBS to 64

2018-07-03 Thread David Miller
From: Li RongQing Date: Tue, 3 Jul 2018 14:21:48 +0800 > On 7/2/18, David Miller wrote: >> From: Li RongQing >> Date: Mon, 2 Jul 2018 19:41:43 +0800 >> >>> After 07d78363dcffd [net: Convert NAPI gro list into a small hash table] >>> there is 8 hash buckets, which allow more flows to be held

Re: [PATCH net-next] net: sched: act_pedit: fix possible memory leak in tcf_pedit_init()

2018-07-03 Thread Cong Wang
On Tue, Jul 3, 2018 at 6:36 AM Wei Yongjun wrote: > > 'keys_ex' is malloced by tcf_pedit_keys_ex_parse() in tcf_pedit_init() > but not all of the error handle path free it, this may cause memory > leak. This patch fix it. > > Fixes: 71d0ed7079df ("net/act_pedit: Support using offset relative to

Re: [PATCH iproute2] tc: Fix the bug not to display prio and quantum options of htb

2018-07-03 Thread Cong Wang
On Tue, Jul 3, 2018 at 8:33 PM fumihiko kakuma wrote: > > A commandline like 'tc -d class show dev dev-name' does not > display value of prio and quantum option when we use htb qdisc. > This patch fixes the bug. > > Signed-off-by: Fumihiko Kakuma Good catch! Acked-by: Cong Wang

[PATCH bpf-next 09/11] tools: bpftool: reimplement bpf_prog_load() for prog load

2018-07-03 Thread Jakub Kicinski
bpf_prog_load() is a very useful helper but it doesn't give us full flexibility of modifying the BPF objects before loading. Open code bpf_prog_load() in bpftool so we can add extra logic in following commits. Signed-off-by: Jakub Kicinski Reviewed-by: Quentin Monnet ---

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

2018-07-03 Thread Jakub Kicinski
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 --- .../bpftool/Documentation/bpftool-prog.rst| 20 ++- tools/bpf/bpftool/bash-completion/bpftool | 67 +++-

[PATCH bpf-next 07/11] tools: libbpf: recognize offload neutral maps

2018-07-03 Thread Jakub Kicinski
Add helper to libbpf for recognizing maps which should not have ifindex set when program is loaded. These maps only contain host metadata and therefore are not marked for offload, e.g. the perf event map. Use this helper in bpf_prog_load_xattr(). Signed-off-by: Jakub Kicinski Reviewed-by:

[PATCH bpf-next 10/11] tools: libbpf: allow map reuse

2018-07-03 Thread Jakub Kicinski
More advanced applications may want to only replace programs without destroying associated maps. Allow libbpf users to achieve that. Instead of always creating all of the maps at load time, expose to users an API to reconstruct the map object from already existing map. The map parameters are

[PATCH bpf-next 02/11] selftests/bpf: add Error: prefix in check_extack helper

2018-07-03 Thread Jakub Kicinski
Currently the test only checks errors, not warnings, so save typing and prefix the extack messages with "Error:" inside the check helper. Signed-off-by: Jakub Kicinski Reviewed-by: Quentin Monnet --- tools/testing/selftests/bpf/test_offload.py | 8 1 file changed, 4 insertions(+), 4

[PATCH bpf-next 03/11] tools: bpftool: refactor argument parsing for prog load

2018-07-03 Thread Jakub Kicinski
Add a new macro for printing more informative message than straight usage() when parameters are missing, and use it for prog do_load(). Save the object and pin path argument to variables for clarity. Signed-off-by: Jakub Kicinski Reviewed-by: Quentin Monnet --- tools/bpf/bpftool/main.h | 15

[PATCH bpf-next 04/11] tools: bpftool: add support for loading programs for offload

2018-07-03 Thread Jakub Kicinski
Extend the bpftool prog load command to also accept "dev" parameter, which will allow us to load programs onto devices. Signed-off-by: Jakub Kicinski Reviewed-by: Quentin Monnet --- .../bpftool/Documentation/bpftool-prog.rst| 6 ++-- tools/bpf/bpftool/bash-completion/bpftool | 23

[PATCH bpf-next 05/11] tools: libbpf: expose the prog type guessing from section name logic

2018-07-03 Thread Jakub Kicinski
libbpf can guess program type based on ELF section names. As libbpf becomes more popular its association between section name strings and types becomes more of a standard. Allow libbpf users to use the same logic for matching strings to types, e.g. when the string originates from command line.

[PATCH bpf-next 01/11] selftests/bpf: remove duplicated word from test offloads

2018-07-03 Thread Jakub Kicinski
Trivial removal of duplicated "mode" in error message. Signed-off-by: Jakub Kicinski Reviewed-by: Quentin Monnet --- tools/testing/selftests/bpf/test_offload.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/bpf/test_offload.py

[PATCH bpf-next 08/11] tools: libbpf: add extended attributes version of bpf_object__open()

2018-07-03 Thread Jakub Kicinski
Similarly to bpf_prog_load() users of bpf_object__open() may need to specify the expected program type. Program type is needed at open to avoid the kernel version check for program types which don't require it. Signed-off-by: Jakub Kicinski Reviewed-by: Quentin Monnet ---

[PATCH bpf-next 00/11] tools: bpf: extend bpftool prog load

2018-07-03 Thread Jakub Kicinski
Hi! This series starts with two minor clean ups to test_offload.py selftest script. The next 9 patches extend the abilities of bpftool prog load beyond the simple cgroup use cases. Three new parameters are added: - type - allows specifying program type, independent of how code

[PATCH bpf-next 06/11] tools: bpftool: allow users to specify program type for prog load

2018-07-03 Thread Jakub Kicinski
Sometimes program section names don't match with libbpf's expectation. In particular XDP's default section names differ between libbpf and iproute2. Allow users to pass program type on command line. Name the types like the libbpf expected section names. Signed-off-by: Jakub Kicinski

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

2018-07-03 Thread Saeed Mahameed
On Tue, 2018-07-03 at 16:01 -0700, Alexei Starovoitov wrote: > On Tue, Jun 26, 2018 at 07:46:11PM -0700, Saeed Mahameed wrote: > > The idea from this patch is to define a well known structure for > > XDP meta > > data fields format and offset placement inside the xdp data meta > > buffer. > > > >

Re: [PATCH] net: phy: marvell: change default m88e1510 LED configuration

2018-07-03 Thread David Miller
From: Wang Dongsheng Date: Sun, 1 Jul 2018 23:15:46 -0700 > The m88e1121 LED default configuration does not apply m88e151x. > So add a function to relpace m88e1121 LED configuration. > > Signed-off-by: Wang Dongsheng Applid, thank you.

Re: [PATCH net-next 0/2] More mirror-to-gretap tests with bridge in UL

2018-07-03 Thread David Miller
From: Petr Machata Date: Mon, 02 Jul 2018 19:58:44 +0200 > This patchset adds two more tests where the mirror-to-gretap has a > bridge in underlay packet path, without a VLAN above or below that > bridge. > > In patch #1, a non-VLAN-filtering bridge is tested. > > In patch #2, a VLAN-filtering

Re: [PATCH bpf] bpf: hash_map: decrement counter on error

2018-07-03 Thread Daniel Borkmann
On 07/03/2018 10:28 PM, Alexei Starovoitov wrote: > On Sun, Jul 01, 2018 at 11:33:58AM -0500, Mauricio Vasquez wrote: >> On 06/30/2018 06:20 PM, Daniel Borkmann wrote: >>> On 06/29/2018 02:48 PM, Mauricio Vasquez B wrote: Decrement the number of elements in the map in case the allocation

[PATCH v2 net-next 09/14] igb: Refactor igb_configure_cbs()

2018-07-03 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

[PATCH v2 net-next 11/14] igb: Refactor igb_offload_cbs()

2018-07-03 Thread Jesus Sanchez-Palencia
Split code into a separate function (igb_offload_apply()) that will be used by ETF 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

[PATCH v2 net-next 13/14] igb: Add support for ETF offload

2018-07-03 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_ETF and configuring i210 so time based transmit arbitration is enabled. The FQTSS transmission mode added before is extended so strict priority (SP)

[PATCH v2 net-next 10/14] igb: Only change Tx arbitration when CBS is on

2018-07-03 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

[PATCH v2 net-next 08/14] net/sched: Add HW offloading capability to ETF

2018-07-03 Thread Jesus Sanchez-Palencia
Add infra so etf qdisc supports HW offload of time-based transmission. For hw offload, the time sorted list is still used, so packets are dequeued always in order of txtime. Example: $ tc qdisc replace dev enp2s0 parent root handle 100 mqprio num_tc 3 \ map 2 2 1 0 2 2 2 2 2 2 2 2 2

[PATCH v2 net-next 07/14] net/sched: Introduce the ETF Qdisc

2018-07-03 Thread Jesus Sanchez-Palencia
From: Vinicius Costa Gomes The ETF (Earliest TxTime First) qdisc uses the information added earlier in this series (the socket option SO_TXTIME and the new role of sk_buff->tstamp) to schedule packets transmission based on absolute time. For some workloads, just bandwidth enforcement is not

[PATCH v2 net-next 05/14] net: packet: Hook into time based transmission.

2018-07-03 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

[PATCH v2 net-next 14/14] net/sched: Make etf report drops on error_queue

2018-07-03 Thread Jesus Sanchez-Palencia
Use the socket error queue for reporting dropped packets if the socket has enabled that feature through the SO_TXTIME API. Packets are dropped either on enqueue() if they aren't accepted by the qdisc or on dequeue() if the system misses their deadline. Those are reported as different errors so

[PATCH v2 net-next 01/14] net: Clear skb->tstamp only on the forwarding path

2018-07-03 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() before the early return would break our feature

[PATCH v2 net-next 04/14] net: ipv6: Hook into time based transmission

2018-07-03 Thread Jesus Sanchez-Palencia
Add a struct sockcm_cookie parameter to ip6_setup_cork() so we can easily re-use the transmit_time field from struct inet_cork for most paths, by copying the timestamp from the CMSG cookie. This is later copied into the skb during __ip6_make_skb(). For the raw fast path, also pass the

[PATCH v2 net-next 12/14] igb: Only call skb_tx_timestamp after descriptors are ready

2018-07-03 Thread Jesus Sanchez-Palencia
Currently, skb_tx_timestamp() is being called before the Tx descriptors are prepared in igb_xmit_frame_ring(), which happens during either the igb_tso() or igb_tx_csum() calls. Given that now the skb->tstamp might be used to carry the timestamp for SO_TXTIME, we must only call skb_tx_timestamp()

[PATCH v2 net-next 06/14] net/sched: Allow creating a Qdisc watchdog with other clocks

2018-07-03 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

[PATCH net] net: phy: fix flag masking in __set_phy_supported

2018-07-03 Thread Heiner Kallweit
Currently also the pause flags are removed from phydev->supported because they're not included in PHY_DEFAULT_FEATURES. I don't think this is intended, especially when considering that this function can be called via phy_set_max_speed() anywhere in a driver. Change the masking to mask out only the

Re: [PATCH bpf] bpf: hash_map: decrement counter on error

2018-07-03 Thread Alexei Starovoitov
On Sun, Jul 01, 2018 at 11:33:58AM -0500, Mauricio Vasquez wrote: > > On 06/30/2018 06:20 PM, Daniel Borkmann wrote: > > On 06/29/2018 02:48 PM, Mauricio Vasquez B wrote: > > > Decrement the number of elements in the map in case the allocation > > > of a new node fails. > > > > > >

[PATCH v2 net] net/ipv6: Revert attempt to simplify route replace and append

2018-07-03 Thread dsahern
From: David Ahern NetworkManager likes to manage linklocal prefix routes and does so with the NLM_F_APPEND flag, breaking attempts to simplify the IPv6 route code and by extension enable multipath routes with device only nexthops. Revert f34436a43092 and these followup patches: 6eba08c3626b

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

2018-07-03 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 v2 iproute2 1/2] uapi pkt_sched: Add etf info - DO NOT COMMIT

2018-07-03 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

[PATCH v2 net-next 02/14] net: Add a new socket option for a future transmit time.

2018-07-03 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). The argument to this socket option is a 8-bytes long struct provided by the uapi header net_tstamp.h defined as: struct

[PATCH v2 net-next 00/14] Scheduled packet Transmission: ETF

2018-07-03 Thread Jesus Sanchez-Palencia
Changes since v1: - moved struct sock_txtime from socket.h to uapi net_tstamp.h; - sk_clockid was changed from u16 to u8; - sk_txtime_flags was changed from u16 to a u8 bit field in struct sock; - the socket option flags are now validated in sock_setsockopt(); - added

[PATCH v2 net-next 03/14] net: ipv4: Hook into time based transmission

2018-07-03 Thread Jesus Sanchez-Palencia
Add a transmit_time field to struct inet_cork, then copy the timestamp from the CMSG cookie at ip_setup_cork() so we can safely copy it into the skb later during __ip_make_skb(). For the raw fast path, just perform the copy at raw_send_hdrinc(). Signed-off-by: Richard Cochran Signed-off-by:

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

2018-07-03 Thread Saeed Mahameed
On Mon, 2018-07-02 at 10:01 +0200, Daniel Borkmann wrote: > On 06/27/2018 07:55 PM, Saeed Mahameed wrote: > > On Wed, 2018-06-27 at 16:15 +0200, Jesper Dangaard Brouer wrote: > > > On Tue, 26 Jun 2018 19:46:11 -0700 > > > Saeed Mahameed wrote: > > > > > > > diff --git a/include/net/xdp.h

QDisc Implementation: Setting bit rate and getting RTT

2018-07-03 Thread Taran Lynn
Hello, I'm new to linux development and am working on creating a qdisc module, similar to those under net/sched/sch_*.c. Currently I'm stuck on two things. 1. What's the best way to set the maximum bit rate? 2. How do I determine the RTT for packets? For (1) I'm currently tracking the number of

Re: [PATCH net] net/ipv6: Revert attempt to simplify route replace and append

2018-07-03 Thread David Ahern
On 7/3/18 7:43 AM, Ido Schimmel wrote: > On Mon, Jul 02, 2018 at 03:03:12PM -0700, dsah...@kernel.org wrote: >> From: David Ahern >> >> NetworkManager likes to manage linklocal prefix routes and does so with >> the NLM_F_APPEND flag, breaking attempts to simplify the IPv6 route >> code and by

Re: pull-request: bpf-next 2018-07-03

2018-07-03 Thread David Miller
From: Daniel Borkmann Date: Tue, 3 Jul 2018 23:18:13 +0200 > The following pull-request contains BPF updates for your *net-next* tree. > > The main changes are: ... > Please consider pulling these changes from: > > git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git Pulled,

Re: [PATCH net] net/ipv6: Revert attempt to simplify route replace and append

2018-07-03 Thread Ido Schimmel
On Mon, Jul 02, 2018 at 03:03:12PM -0700, dsah...@kernel.org wrote: > From: David Ahern > > NetworkManager likes to manage linklocal prefix routes and does so with > the NLM_F_APPEND flag, breaking attempts to simplify the IPv6 route > code and by extension enable multipath routes with device

Re: [PATCH net-next v3 0/5] net: aquantia: various ethtool ops implementation

2018-07-03 Thread David Miller
From: Igor Russkikh Date: Mon, 2 Jul 2018 17:03:34 +0300 > In this patchset Anton Mikaev and I added some useful ethtool operations: > - ring size changes > - link renegotioation > - flow control management > > The patch also improves init/deinit sequence. > > V3 changes: > - After review and

Re: [PATCH net] r8169: fix mac address change

2018-07-03 Thread David Miller
From: Heiner Kallweit Date: Mon, 2 Jul 2018 22:49:35 +0200 > Network core refuses to change mac address because flag > IFF_LIVE_ADDR_CHANGE isn't set. Set this missing flag. > > Fixes: 1f7aa2bc268e ("r8169: simplify rtl_set_mac_address") > Reported-by: Corinna Vinschen > Signed-off-by: Heiner

[PATCH net] smsc75xx: Add workaround for gigabit link up hardware errata.

2018-07-03 Thread Yuiko Oshino
In certain conditions, the device may not be able to link in gigabit mode. This software workaround ensures that the device will not enter the failure state. Fixes: d0cad871703b898a442e4049c532ec39168e5b57 ("SMSC75XX USB 2.0 Gigabit Ethernet Devices") Signed-off-by: Yuiko Oshino ---

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

2018-07-03 Thread Ka-Cheong Poon
On 06/30/2018 04:50 PM, David Miller wrote: From: Ka-Cheong Poon Date: Wed, 27 Jun 2018 03:23:27 -0700 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

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

2018-07-03 Thread Daniel Borkmann
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 happens early > in the error path we may have never

Re: [PATCH net-next v2 1/2] tcp: notify when a delayed ack is sent

2018-07-03 Thread Neal Cardwell
On Mon, Jul 2, 2018 at 7:49 PM Yuchung Cheng wrote: > > On Mon, Jul 2, 2018 at 2:39 PM, Lawrence Brakmo wrote: > > > > DCTCP depends on the CA_EVENT_NON_DELAYED_ACK and CA_EVENT_DELAYED_ACK > > notifications to keep track if it needs to send an ACK for packets that > > were received with a

[PATCH] rhashtable: add restart routine in rhashtable_free_and_destroy()

2018-07-03 Thread Taehee Yoo
rhashtable_free_and_destroy() cancels re-hash deferred work then walks and destroys elements. at this moment, some elements can be still in future_tbl. that elements are not destroyed. test case: nft_rhash_destroy() calls rhashtable_free_and_destroy() to destroy all elements of sets before

Re: [PATCH] lib: rhashtable: Correct self-assignment in rhashtable.c

2018-07-03 Thread David Miller
From: Rishabh Bhatnagar Date: Mon, 2 Jul 2018 09:35:34 -0700 > In file lib/rhashtable.c line 777, skip variable is assigned to > itself. The following error was observed: > > lib/rhashtable.c:777:41: warning: explicitly assigning value of > variable of type 'int' to itself [-Wself-assign]

Re: [PATCH net-next v2 0/2] tcp: fix high tail latencies in DCTCP

2018-07-03 Thread Lawrence Brakmo
On 7/2/18, 5:52 PM, "netdev-ow...@vger.kernel.org on behalf of Neal Cardwell" wrote: On Mon, Jul 2, 2018 at 5:39 PM Lawrence Brakmo wrote: > > When have observed high tail latencies when using DCTCP for RPCs as > compared to using Cubic. For example, in one setup there are 2

[PATCH net-next] net: sched: act_pedit: fix possible memory leak in tcf_pedit_init()

2018-07-03 Thread Wei Yongjun
'keys_ex' is malloced by tcf_pedit_keys_ex_parse() in tcf_pedit_init() but not all of the error handle path free it, this may cause memory leak. This patch fix it. Fixes: 71d0ed7079df ("net/act_pedit: Support using offset relative to the conventional network headers") Signed-off-by: Wei Yongjun

Re: [PATCH net-next v2 1/2] tcp: notify when a delayed ack is sent

2018-07-03 Thread Lawrence Brakmo
On 7/2/18, 4:50 PM, "Yuchung Cheng" wrote: On Mon, Jul 2, 2018 at 2:39 PM, Lawrence Brakmo wrote: > > DCTCP depends on the CA_EVENT_NON_DELAYED_ACK and CA_EVENT_DELAYED_ACK > notifications to keep track if it needs to send an ACK for packets that > were received with a

Re: [PATCH net-next 07/10] r8169: migrate speed_down function to phylib

2018-07-03 Thread Florian Fainelli
On 07/02/2018 02:31 PM, Heiner Kallweit wrote: > On 02.07.2018 23:20, Andrew Lunn wrote: >> On Mon, Jul 02, 2018 at 09:37:08PM +0200, Heiner Kallweit wrote: >>> Change rtl_speed_down() to use phylib. >>> >>> Signed-off-by: Heiner Kallweit >>> --- >>> drivers/net/ethernet/realtek/r8169.c | 33

Re: [PATCH net-next 01/10] r8169: add basic phylib support

2018-07-03 Thread Florian Fainelli
On 07/02/2018 02:15 PM, Heiner Kallweit wrote: > On 02.07.2018 23:02, Andrew Lunn wrote: >>> +static int r8169_mdio_read_reg(struct mii_bus *mii_bus, int phyaddr, int >>> phyreg) >>> +{ >>> + struct rtl8169_private *tp = mii_bus->priv; >>> + >>> + return rtl_readphy(tp, phyreg); >> >> So

Re: [PATCH net-next 02/10] r8169: use phy_resume/phy_suspend

2018-07-03 Thread Florian Fainelli
On 07/02/2018 02:24 PM, Heiner Kallweit wrote: > On 02.07.2018 23:06, Andrew Lunn wrote: >>> static void r8168_pll_power_down(struct rtl8169_private *tp) >>> { >>> if (r8168_check_dash(tp)) >>> @@ -4510,7 +4469,8 @@ static void r8168_pll_power_down(struct >>> rtl8169_private *tp) >>>

Re: [PATCH net-next v2 0/2] tcp: fix high tail latencies in DCTCP

2018-07-03 Thread Neal Cardwell
On Tue, Jul 3, 2018 at 11:10 AM Lawrence Brakmo wrote: > > On 7/2/18, 5:52 PM, "netdev-ow...@vger.kernel.org on behalf of Neal Cardwell" > wrote: > > On Mon, Jul 2, 2018 at 5:39 PM Lawrence Brakmo wrote: > > > > When have observed high tail latencies when using DCTCP for RPCs as >

Re: [PATCH net-next v2 1/2] tcp: notify when a delayed ack is sent

2018-07-03 Thread Lawrence Brakmo
On 7/3/18, 6:15 AM, "Neal Cardwell" wrote: On Mon, Jul 2, 2018 at 7:49 PM Yuchung Cheng wrote: > > On Mon, Jul 2, 2018 at 2:39 PM, Lawrence Brakmo wrote: > > > > DCTCP depends on the CA_EVENT_NON_DELAYED_ACK and CA_EVENT_DELAYED_ACK > > notifications to keep track if it

Re: [Intel-wired-lan] [jkirsher/next-queue PATCH v2 0/7] Add support for L2 Fwd Offload w/o ndo_select_queue

2018-07-03 Thread Jeff Kirsher
On Tue, Jun 12, 2018 at 8:18 AM, Alexander Duyck wrote: > This patch series is meant to allow support for the L2 forward offload, aka > MACVLAN offload without the need for using ndo_select_queue. > > The existing solution currently requires that we use ndo_select_queue in > the transmit path if

[PATCH net-next v3 0/2] tcp: fix high tail latencies in DCTCP

2018-07-03 Thread Lawrence Brakmo
When have observed high tail latencies when using DCTCP for RPCs as compared to using Cubic. For example, in one setup there are 2 hosts sending to a 3rd one, with each sender having 3 flows (1 stream, 1 1MB back-to-back RPCs and 1 10KB back-to-back RPCs). The following table shows the 99% and

[PATCH net-next v3 2/2] tcp: ack immediately when a cwr packet arrives

2018-07-03 Thread Lawrence Brakmo
We observed high 99 and 99.9% latencies when doing RPCs with DCTCP. The problem is triggered when the last packet of a request arrives CE marked. The reply will carry the ECE mark causing TCP to shrink its cwnd to 1 (because there are no packets in flight). When the 1st packet of the next request

[PATCH net-next v3 1/2] tcp: notify when a delayed ack is sent

2018-07-03 Thread Lawrence Brakmo
DCTCP depends on the CA_EVENT_NON_DELAYED_ACK and CA_EVENT_DELAYED_ACK notifications to keep track if it needs to send an ACK for packets that were received with a particular ECN state but whose ACK was delayed. Under some circumstances, for example when a delayed ACK is sent with a data packet,

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

2018-07-03 Thread David Ahern
On 7/3/18 5:36 AM, Xin Long wrote: > On Mon, Jul 2, 2018 at 11:12 PM, David Ahern wrote: >> On 7/2/18 12:30 AM, Xin Long wrote: >>> +ping_ipv4() >>> +{ >>> + sysctl_set net.ipv4.icmp_echo_ignore_broadcasts 0 >>> + bc_forwarding_disable >>> + ping_test $h1 198.51.100.255 >>> + >>> +

Re: [PATCH net-next 01/10] r8169: add basic phylib support

2018-07-03 Thread Heiner Kallweit
On 03.07.2018 18:42, Florian Fainelli wrote: > > > On 07/02/2018 02:15 PM, Heiner Kallweit wrote: >> On 02.07.2018 23:02, Andrew Lunn wrote: +static int r8169_mdio_read_reg(struct mii_bus *mii_bus, int phyaddr, int phyreg) +{ + struct rtl8169_private *tp = mii_bus->priv;

Re: [PATCH net-next 02/10] r8169: use phy_resume/phy_suspend

2018-07-03 Thread Heiner Kallweit
On 03.07.2018 18:44, Florian Fainelli wrote: > > > On 07/02/2018 02:24 PM, Heiner Kallweit wrote: >> On 02.07.2018 23:06, Andrew Lunn wrote: static void r8168_pll_power_down(struct rtl8169_private *tp) { if (r8168_check_dash(tp)) @@ -4510,7 +4469,8 @@ static void