Re: [PATCH net-next,v5 2/4] net: flow_offload: bitwise AND on mangle action value field

2019-10-14 Thread Jiri Pirko
Tue, Oct 15, 2019 at 12:10:49AM CEST, pa...@netfilter.org wrote: >Drivers perform a bitwise AND on the value and the mask. Update >tc_setup_flow_action() to perform this operation so drivers do not need >to do this. > >Remove sanity check for sane value and mask values from the nfp driver, >the fro

Re: [PATCH net-next,v5 1/4] net: flow_offload: flip mangle action mask

2019-10-14 Thread Jiri Pirko
Tue, Oct 15, 2019 at 12:10:48AM CEST, pa...@netfilter.org wrote: >Userspace tc pedit action performs a bitwise NOT operation on the mask. >All of the existing drivers in the tree undo this operation. Prepare the >mangle mask in the way the drivers expect from the >tc_setup_flow_action() function. >

Re: [PATCH net] cxgb4: Fix panic when attaching to ULD fails

2019-10-14 Thread Simon Horman
On Mon, Oct 14, 2019 at 01:20:35PM +0530, Vishal Kulkarni wrote: > Release resources when attaching to ULD fail. Otherwise, data > mismatch is seen between LLD and ULD later on, which lead to > kernel panic when accessing resources that should not even > exist in the first place. > > Fixes: 94cdb8

Re: [PATCH] ss: allow dumping kTLS info

2019-10-14 Thread David Ahern
On 10/7/19 4:16 AM, Davide Caratti wrote: > now that INET_DIAG_INFO requests can dump TCP ULP information, extend 'ss' > to allow diagnosing kTLS when it is attached to a TCP socket. While at it, > import kTLS uAPI definitions from the latest net-next tree. > > CC: Andrea Claudi > Co-developed-by

Re: [PATCH net-next 2/3] vhost_net: user tap recvmsg api to access ptr ring

2019-10-14 Thread Prashant Bhole
Hi Michael, Thanks for reviewing. On 10/13/19 5:41 AM, Michael S. Tsirkin wrote: On Sat, Oct 12, 2019 at 10:53:56AM +0900, prashantbhole.li...@gmail.com wrote: From: Prashant Bhole Currently vhost_net directly accesses ptr ring of tap driver to fetch Rx packet pointers. In order to avoid it t

Re: [PATCH net-next 1/3] tuntap: reorganize tun_msg_ctl usage

2019-10-14 Thread Prashant Bhole
Hi Jason, Thanks for reviewing. On 10/12/19 4:44 PM, Jason Wang wrote: On 2019/10/12 上午9:53, prashantbhole.li...@gmail.com wrote: From: Prashant Bhole In order to extend the usage of tun_msg_ctl structure, this patch changes the member name from type to cmd. Also following definitions are ch

[PATCH bpf-next 1/5] libbpf: update BTF reloc support to latest Clang format

2019-10-14 Thread Andrii Nakryiko
BTF offset reloc was generalized in recent Clang into field relocation, capturing extra u32 field, specifying what aspect of captured field needs to be relocated. This changes .BTF.ext's record size for this relocation from 12 bytes to 16 bytes. Given these format changes happened in Clang before o

[PATCH bpf-next 4/5] libbpf: add BPF-side definitions of supported field relocation kinds

2019-10-14 Thread Andrii Nakryiko
Add enum definition for Clang's __builtin_preserve_field_info() second argument (info_kind). Currently only byte offset and existence are supported. Corresponding Clang changes introducing this built-in can be found at [0] [0] https://reviews.llvm.org/D67980 Signed-off-by: Andrii Nakryiko ---

[PATCH bpf-next 0/5] Add CO-RE support for field existence relos

2019-10-14 Thread Andrii Nakryiko
This patch set generalizes libbpf's CO-RE relocation support. It not supports field existence relocations, in addition to existing field's byte offset relocation. This patch set upgrades the format of .BTF.ext's relocation record to match latest Clang's format (12 -> 16 bytes). This is not a bre

[PATCH bpf-next 2/5] libbpf: refactor bpf_object__open APIs to use common opts

2019-10-14 Thread Andrii Nakryiko
Refactor all the various bpf_object__open variations to ultimately specify common bpf_object_open_opts struct. This makes it easy to keep extending this common struct w/ extra parameters without having to update all the legacy APIs. Signed-off-by: Andrii Nakryiko --- tools/lib/bpf/libbpf.c | 71

[PATCH bpf-next 5/5] selftests/bpf: add field existence CO-RE relocs tests

2019-10-14 Thread Andrii Nakryiko
Add a bunch of tests validating CO-RE is handling field existence relocation. Relaxed CO-RE relocation mode is activated for these new tests to prevent libbpf from rejecting BPF object for no-match relocation, even though test BPF program is not going to use that relocation, if field is missing. S

[PATCH bpf-next 3/5] libbpf: add support for field existance CO-RE relocation

2019-10-14 Thread Andrii Nakryiko
Add support for BPF_FRK_EXISTS relocation kind to detect existence of captured field in a destination BTF, allowing conditional logic to handle incompatible differences between kernels. Also introduce opt-in relaxed CO-RE relocation handling option, which makes libbpf emit warning for failed reloc

Re: [PATCH net-next 0/4] PTP driver refactoring for SJA1105 DSA

2019-10-14 Thread David Miller
From: Richard Cochran Date: Sat, 12 Oct 2019 12:14:54 -0700 > On Sat, Oct 12, 2019 at 02:18:12AM +0300, Vladimir Oltean wrote: >> This series creates a better separation between the driver core and the >> PTP portion. Therefore, users who are not interested in PTP can get a >> simpler and smaller

Re: taprio testing - Any help?

2019-10-14 Thread Vinicius Costa Gomes
Murali Karicheri writes: > > My expectation is as follows > > AABCDE > > Where A is traffic from TC0, B is udp stream for port 1 > C is stream for port 2, D for 3 and E for 4. > Each can be max of 4 msec. Is the expection correct? At least th

Re: taprio testing - Any help?

2019-10-14 Thread Vinicius Costa Gomes
Vladimir Oltean writes: > > What do you mean taprio doesn't support tc filter blocks? What do you > think there is to do in taprio to support that? > I don't think Murali is asking for filter offloading, but merely for a > way to direct frames to a certain traffic class on xmit from Linux. > Some

Re: [PATCH net-next v2 00/10] optimize openvswitch flow looking up

2019-10-14 Thread Gregory Rose
On 10/10/2019 1:42 AM, Tonghao Zhang wrote: On Wed, Oct 9, 2019 at 1:33 AM Gregory Rose wrote: [snip] Hi Tonghao, I've applied your patch series and built a 5.4.0-rc1 kernel with them. x@ubuntu-1604:~$ modinfo openvswitch filename: /lib/modules/5.4.0-rc1+/kernel/net/openvswitch/openv

[PATCH net-next 1/1] tc-testing: updated pedit test cases

2019-10-14 Thread Roman Mashak
Added TDC test cases for Ethernet LAYERED_OP operations: - set single source Ethernet MAC - set single destination Ethernet MAC - set single invalid destination Ethernet MAC - set Ethernet type - invert source/destination/type fields - add operation on Ethernet type field Signed-off-by: Roman Mash

Re: lan78xx and phy_state_machine

2019-10-14 Thread Russell King - ARM Linux admin
On Mon, Oct 14, 2019 at 10:20:15PM +0200, Heiner Kallweit wrote: > On 14.10.2019 21:51, Stefan Wahren wrote: > > [add more recipients] > > > > Am 14.10.19 um 21:25 schrieb Daniel Wagner: > >> Moving the phy_prepare_link() up in phy_connect_direct() ensures that > >> phydev->adjust_link is set when

[PATCH net-next,v5 1/4] net: flow_offload: flip mangle action mask

2019-10-14 Thread Pablo Neira Ayuso
Userspace tc pedit action performs a bitwise NOT operation on the mask. All of the existing drivers in the tree undo this operation. Prepare the mangle mask in the way the drivers expect from the tc_setup_flow_action() function. Signed-off-by: Pablo Neira Ayuso --- v5: no changes. drivers/net/e

[PATCH net-next,v5 4/4] netfilter: nft_payload: packet mangling offload support

2019-10-14 Thread Pablo Neira Ayuso
This patch allows for mangling packet fields using hardware offload infrastructure. Signed-off-by: Pablo Neira Ayuso --- v5: no changes. net/netfilter/nft_payload.c | 73 + 1 file changed, 73 insertions(+) diff --git a/net/netfilter/nft_payload.c b/n

[PATCH net-next,v5 2/4] net: flow_offload: bitwise AND on mangle action value field

2019-10-14 Thread Pablo Neira Ayuso
Drivers perform a bitwise AND on the value and the mask. Update tc_setup_flow_action() to perform this operation so drivers do not need to do this. Remove sanity check for sane value and mask values from the nfp driver, the front-end already guarantees this after this patch. Signed-off-by: Pablo

[PATCH net-next,v5 0/4] flow_offload: update mangle action representation

2019-10-14 Thread Pablo Neira Ayuso
This patch updates the mangle action representation: Patch 1) Undo bitwise NOT operation on the mangle mask (coming from tc pedit userspace). Patch 2) mangle value &= mask from the front-end side. Patch 3) adjust offset, length and coalesce consecutive pedit keys into one singl

[PATCH net-next,v5 3/4] net: flow_offload: mangle action at byte level

2019-10-14 Thread Pablo Neira Ayuso
The flow mangle action is originally modeled after the tc pedit action, this has a number of shortcomings: 1) The tc pedit offset must be set on the 32-bits boundaries. Many protocol header field offsets are not aligned to 32-bits, eg. port destination, port source and ethernet destination.

Re: [PATCH net-next,v4 0/4] flow_offload: update mangle action representation

2019-10-14 Thread Pablo Neira Ayuso
On Tue, Oct 15, 2019 at 12:00:23AM +0200, Pablo Neira Ayuso wrote: > This patch updates the mangle action representation: [...] Scratch this patchset, it is garbled. Sorry about this.

[PATCH net-next,v4 2/4] net: flow_offload: mangle action at byte level

2019-10-14 Thread Pablo Neira Ayuso
The flow mangle action is originally modeled after the tc pedit action, this has a number of shortcomings: 1) The tc pedit offset must be set on the 32-bits boundaries. Many protocol header field offsets are not aligned to 32-bits, eg. port destination, port source and ethernet destination.

[PATCH net-next,v4 4/4] net: flow_offload: add flow_rule_print()

2019-10-14 Thread Pablo Neira Ayuso
Signed-off-by: Pablo Neira Ayuso --- include/net/flow_offload.h| 3 ++ net/core/flow_offload.c | 85 +++ net/netfilter/nf_tables_offload.c | 6 ++- net/sched/cls_flower.c| 4 ++ 4 files changed, 97 insertions(+), 1 deletion(-)

[PATCH net-next,v4 1/4] net: flow_offload: bitwise AND on mangle action value field

2019-10-14 Thread Pablo Neira Ayuso
Drivers perform a bitwise AND on the value and the mask. Update tc_setup_flow_action() to perform this operation so drivers do not need to do this. Remove sanity check for sane value and mask values from the nfp driver, the front-end already guarantees this after this patch. Signed-off-by: Pablo

[PATCH net-next,v4 0/4] flow_offload: update mangle action representation

2019-10-14 Thread Pablo Neira Ayuso
This patch updates the mangle action representation: Patch 1) Undo bitwise NOT operation on the mangle mask (coming from tc pedit userspace). Patch 2) mangle value &= mask from the front-end side. Patch 3) adjust offset, length and coalesce consecutive pedit keys into one singl

[PATCH net-next,v4 3/4] netfilter: nft_payload: packet mangling offload support

2019-10-14 Thread Pablo Neira Ayuso
This patch allows for mangling packet fields using hardware offload infrastructure. Signed-off-by: Pablo Neira Ayuso --- net/netfilter/nft_payload.c | 73 + 1 file changed, 73 insertions(+) diff --git a/net/netfilter/nft_payload.c b/net/netfilter/nft_

[PATCH net v1] sched: etf: Fix ordering of packets with same txtime

2019-10-14 Thread Vinicius Costa Gomes
When a application sends many packets with the same txtime, they may be transmitted out of order (different from the order in which they were enqueued). This happens because when inserting elements into the tree, when the txtime of two packets are the same, the new packet is inserted at the left s

Re: lan78xx and phy_state_machine

2019-10-14 Thread Heiner Kallweit
On 14.10.2019 21:51, Stefan Wahren wrote: > [add more recipients] > > Am 14.10.19 um 21:25 schrieb Daniel Wagner: >> On Mon, Oct 14, 2019 at 05:30:04PM +0100, Russell King - ARM Linux admin >> wrote: >>> On Mon, Oct 14, 2019 at 04:06:04PM +0200, Daniel Wagner wrote: Hi, I've trying

Re: [PATCH iproute2] ipnetns: enable to dump nsid conversion table

2019-10-14 Thread Stephen Hemminger
On Mon, 7 Oct 2019 15:44:47 +0200 Nicolas Dichtel wrote: > This patch enables to dump/get nsid from a netns into another netns. > > Example: > $ ./test.sh > + ip netns add foo > + ip netns add bar > + touch /var/run/netns/init_net > + mount --bind /proc/1/ns/net /var/run/netns/init_net > + ip n

Re: pull-request: bpf-next 2019-10-14

2019-10-14 Thread Alexei Starovoitov
On Mon, Oct 14, 2019 at 12:18 PM David Miller wrote: > > From: Alexei Starovoitov > Date: Mon, 14 Oct 2019 12:06:20 -0700 > > > The following pull-request contains BPF updates for your *net-next* tree. > > > > 12 days of development and > > 85 files changed, 1889 insertions(+), 1020 deletions(-)

Re: lan78xx and phy_state_machine

2019-10-14 Thread Stefan Wahren
[add more recipients] Am 14.10.19 um 21:25 schrieb Daniel Wagner: > On Mon, Oct 14, 2019 at 05:30:04PM +0100, Russell King - ARM Linux admin > wrote: >> On Mon, Oct 14, 2019 at 04:06:04PM +0200, Daniel Wagner wrote: >>> Hi, >>> >>> I've trying to boot a RPi 3 Model B+ in 64 bit mode. While I can

Re: pull-request: bpf-next 2019-10-14

2019-10-14 Thread David Miller
From: Alexei Starovoitov Date: Mon, 14 Oct 2019 12:06:20 -0700 > The following pull-request contains BPF updates for your *net-next* tree. > > 12 days of development and > 85 files changed, 1889 insertions(+), 1020 deletions(-) This is nice, do you have a script which generates this? > The mai

pull-request: bpf-next 2019-10-14

2019-10-14 Thread Alexei Starovoitov
Hi David, The following pull-request contains BPF updates for your *net-next* tree. 12 days of development and 85 files changed, 1889 insertions(+), 1020 deletions(-) The main changes are: 1) auto-generation of bpf_helper_defs.h, from Andrii. 2) split of bpf_helpers.h into bpf_{helpers, helper

Re: [PATCH bpf-next v3 1/5] bpf: Support chain calling multiple BPF programs after each other

2019-10-14 Thread Toke Høiland-Jørgensen
John Fastabend writes: > Toke Høiland-Jørgensen wrote: >> Alexei Starovoitov writes: >> >> > On Wed, Oct 09, 2019 at 10:03:43AM +0200, Toke Høiland-Jørgensen wrote: >> >> Alexei Starovoitov writes: >> >> >> >> > Please implement proper indirect calls and jumps. >> >> >> >> I am still not con

Re: [PATCH bpf] bpf: lwtunnel: fix reroute supplying invalid dst

2019-10-14 Thread Alexei Starovoitov
On Mon, Oct 14, 2019 at 10:39 AM Peter Oskolkov wrote: > > On Sat, Oct 12, 2019 at 9:59 AM Alexei Starovoitov > wrote: > > > > On Wed, Oct 9, 2019 at 1:31 AM Jiri Benc wrote: > > > > > > The dst in bpf_input() has lwtstate field set. As it is of the > > > LWTUNNEL_ENCAP_BPF type, lwtstate->data

Re: [PATCH net-next v4 0/6] ipsec: add TCP encapsulation support (RFC 8229)

2019-10-14 Thread David Miller
From: Sabrina Dubroca Date: Fri, 11 Oct 2019 16:57:23 +0200 > This patchset introduces support for TCP encapsulation of IKE and ESP > messages, as defined by RFC 8229 [0]. It is an evolution of what > Herbert Xu proposed in January 2018 [1] that addresses the main > criticism against it, by not i

[PATCH net] net: avoid potential infinite loop in tc_ctl_action()

2019-10-14 Thread Eric Dumazet
tc_ctl_action() has the ability to loop forever if tcf_action_add() returns -EAGAIN. This special case has been done in case a module needed to be loaded, but it turns out that tcf_add_notify() could also return -EAGAIN if the socket sk_rcvbuf limit is hit. We need to separate the two cases, and

[PATCH net-next] net_sched: sch_fq: remove one obsolete check in fq_dequeue()

2019-10-14 Thread Eric Dumazet
After commit eeb84aa0d0aff ("net_sched: sch_fq: do not assume EDT packets are ordered"), all skbs get a non zero time_to_send in flow_queue_add() This means @time_next_packet variable in fq_dequeue() can no longer be zero. Signed-off-by: Eric Dumazet --- net/sched/sch_fq.c | 3 +-- 1 file chang

Re: [PATCH bpf] bpf: lwtunnel: fix reroute supplying invalid dst

2019-10-14 Thread Peter Oskolkov
On Sat, Oct 12, 2019 at 9:59 AM Alexei Starovoitov wrote: > > On Wed, Oct 9, 2019 at 1:31 AM Jiri Benc wrote: > > > > The dst in bpf_input() has lwtstate field set. As it is of the > > LWTUNNEL_ENCAP_BPF type, lwtstate->data is struct bpf_lwt. When the bpf > > program returns BPF_LWT_REROUTE, ip_

Re: Strange routing with VRF and 5.2.7+

2019-10-14 Thread Ben Greear
On 9/30/19 11:45 AM, Ben Greear wrote: On 9/22/19 12:23 PM, David Ahern wrote: On 9/20/19 9:57 AM, Ben Greear wrote: On 9/10/19 6:08 PM, Ben Greear wrote: On 9/10/19 3:17 PM, Ben Greear wrote: Today we were testing creating 200 virtual station vdevs on ath9k, and using VRF for the routing.

Re: Race condition in route lookup

2019-10-14 Thread Martin Lau
On Sun, Oct 13, 2019 at 05:23:01PM -0700, Wei Wang wrote: > On Fri, Oct 11, 2019 at 11:56 PM Martin Lau wrote: > > > > On Fri, Oct 11, 2019 at 10:54:13AM -0700, Wei Wang wrote: > > > On Fri, Oct 11, 2019 at 8:42 AM Ido Schimmel wrote: > > > > > > > > On Fri, Oct 11, 2019 at 09:36:51AM -0500, Jess

RE: [net-next v3 3/7] mv88e6xxx: reject unsupported external timestamp flags

2019-10-14 Thread Keller, Jacob E
> -Original Message- > From: Richard Cochran > Sent: Saturday, October 12, 2019 4:27 PM > To: Keller, Jacob E > Cc: netdev@vger.kernel.org; Intel Wired LAN > ; > Kirsher, Jeffrey T ; Brandon Streiff > > Subject: Re: [net-next v3 3/7] mv88e6xxx: reject unsupported external > timestamp fl

Re: [PATCH bpf-next v3 1/5] bpf: Support chain calling multiple BPF programs after each other

2019-10-14 Thread John Fastabend
Toke Høiland-Jørgensen wrote: > Alexei Starovoitov writes: > > > On Wed, Oct 09, 2019 at 10:03:43AM +0200, Toke Høiland-Jørgensen wrote: > >> Alexei Starovoitov writes: > >> > >> > Please implement proper indirect calls and jumps. > >> > >> I am still not convinced this will actually solve our

Re: IPv6 addr and route is gone after adding port to vrf (5.2.0+)

2019-10-14 Thread Ben Greear
On 10/11/19 1:35 PM, David Ahern wrote: On 10/11/19 7:57 AM, Ben Greear wrote: The down-up cycling is done on purpose - to clear out neigh entries and routes associated with the device under the old VRF. All entries must be created with the device in the new VRF. I believe I found another thin

Re: [PATCH v2 net-next 06/12] net: aquantia: implement data PTP datapath

2019-10-14 Thread Andrew Lunn
> --- a/drivers/net/ethernet/aquantia/atlantic/aq_ptp.c > +++ b/drivers/net/ethernet/aquantia/atlantic/aq_ptp.c > @@ -8,12 +8,24 @@ > */ > > +static inline int aq_ptp_tm_offset_egress_get(struct aq_ptp_s *aq_ptp) > +{ > + return atomic_read(&aq_ptp->offset_egress); > +} > + > +static inline

Re: [PATCH v2 net-next 08/12] net: aquantia: add support for ptp ioctls

2019-10-14 Thread Andrew Lunn
> +static int aq_ndev_config_hwtstamp(struct aq_nic_s *aq_nic, > +struct hwtstamp_config *config) > +{ > + if (config->flags) > + return -EINVAL; > + > + switch (config->tx_type) { > + case HWTSTAMP_TX_OFF: > + case HWTSTAMP_TX_ON: > +

Re: [PATCH v2 net-next 05/12] net: aquantia: styling fixes on ptp related functions

2019-10-14 Thread Andrew Lunn
On Tue, Oct 08, 2019 at 10:56:45AM +, Igor Russkikh wrote: > From: Dmitry Bezrukov > > Checkpatch and styling fixes on parts of code touched by ptp > > Signed-off-by: Dmitry Bezrukov > Signed-off-by: Igor Russkikh Reviewed-by: Andrew Lunn Andrew

Re: [PATCH v2 net-next 04/12] net: aquantia: add PTP rings infrastructure

2019-10-14 Thread Andrew Lunn
> @@ -978,7 +992,9 @@ void aq_nic_deinit(struct aq_nic_s *self) > self->aq_vecs > i; ++i, aq_vec = self->aq_vec[i]) > aq_vec_deinit(aq_vec); > > + aq_ptp_ring_deinit(self); > aq_ptp_unregister(self); > + aq_ptp_ring_free(self); > aq_ptp_free(self);

taprio testing with multiple streams

2019-10-14 Thread Murali Karicheri
Hi Vinicius, Would like to branch off to a separate discussion on taprio testing with multiple streams. Below is what I have discussed earlier in the context of the other thread on 'Re: taprio testing - Any help?' Could you please review the below and let me know if I am doing anything wrong to c

Re: [PATCH net-next] Change in Openvswitch to support MPLS label depth of 3 in ingress direction

2019-10-14 Thread Martin Varghese
On Sat, Oct 12, 2019 at 01:08:26PM -0700, Pravin Shelar wrote: > On Wed, Oct 9, 2019 at 9:31 PM Martin Varghese > wrote: > > > > On Wed, Oct 09, 2019 at 08:29:51AM -0700, Pravin Shelar wrote: > > > On Mon, Oct 7, 2019 at 9:41 PM Martin Varghese > > > wrote: > > > > > > > > From: Martin Varghese

Re: [PATCH v2 net-next 02/12] net: aquantia: unify styling of bit enums

2019-10-14 Thread Andrew Lunn
On Tue, Oct 08, 2019 at 10:56:38AM +, Igor Russkikh wrote: > From: Dmitry Bezrukov > > Make some other bit-enums more clear about positioning, > this helps on debugging and development > > Signed-off-by: Dmitry Bezrukov > Signed-off-by: Igor Russkikh Reviewed-by: Andrew Lunn Andrew

Re: AW: big ICMP requests get disrupted on IPSec tunnel activation

2019-10-14 Thread Eric Dumazet
On 10/14/19 7:02 AM, Bartschies, Thomas wrote: > Hello, > > it took a while to build a testsystem for bisecting the issue. Finally I've > identified the patch that causes my problems. > BTW. The fq packet network scheduler is in use. > > It's > [PATCH net-next] tcp/fq: move back to CLOCK_MON

Re: taprio testing - Any help?

2019-10-14 Thread Murali Karicheri
On 10/13/2019 05:10 PM, Vladimir Oltean wrote: Hi Vinicius, On Sat, 12 Oct 2019 at 00:28, Vinicius Costa Gomes wrote: Hi, Murali Karicheri writes: Hi Vinicius, On 10/11/2019 04:12 PM, Vinicius Costa Gomes wrote: Hi Murali, Murali Karicheri writes: Hi, I am testing the taprio (802.1

[PATCH net] cxgb4: Fix panic when attaching to ULD fails

2019-10-14 Thread Vishal Kulkarni
Release resources when attaching to ULD fail. Otherwise, data mismatch is seen between LLD and ULD later on, which lead to kernel panic when accessing resources that should not even exist in the first place. Fixes: 94cdb8bb993a ("cxgb4: Add support for dynamic allocation of resources for ULD") Si

Re: [PATCH net V4 2/2] net: phy: micrel: Update KSZ87xx PHY name

2019-10-14 Thread Andrew Lunn
On Sun, Oct 13, 2019 at 11:24:04PM +0200, Marek Vasut wrote: > The KSZ8795 PHY ID is in fact used by KSZ8794/KSZ8795/KSZ8765 switches. > Update the PHY ID and name to reflect that, as this family of switches > is commonly refered to as KSZ87xx > > Signed-off-by: Marek Vasut Reviewed-by: Andrew L

Re: [PATCH net V4 1/2] net: phy: micrel: Discern KSZ8051 and KSZ8795 PHYs

2019-10-14 Thread Andrew Lunn
On Sun, Oct 13, 2019 at 11:24:03PM +0200, Marek Vasut wrote: > The KSZ8051 PHY and the KSZ8794/KSZ8795/KSZ8765 switch share exactly the > same PHY ID. Since KSZ8051 is higher in the ksphy_driver[] list of PHYs > in the micrel PHY driver, it is used even with the KSZ87xx switch. This > is wrong, sin

AW: big ICMP requests get disrupted on IPSec tunnel activation

2019-10-14 Thread Bartschies, Thomas
Hello, it took a while to build a testsystem for bisecting the issue. Finally I've identified the patch that causes my problems. BTW. The fq packet network scheduler is in use. It's [PATCH net-next] tcp/fq: move back to CLOCK_MONOTONIC In the recent TCP/EDT patch series, I switched TCP and sch

RE: [PATCHv2 net-next 3/5] sctp: add SCTP_EXPOSE_POTENTIALLY_FAILED_STATE sockopt

2019-10-14 Thread David Laight
From: Neil Horman > Sent: 14 October 2019 13:42 > To: Xin Long > Cc: David Laight ; network dev > ; linux-s...@vger.kernel.org; Marcelo > Ricardo Leitner ; da...@davemloft.net > Subject: Re: [PATCHv2 net-next 3/5] sctp: add > SCTP_EXPOSE_POTENTIALLY_FAILED_STATE sockopt > > On Mon, Oct 14, 201

[PATCH net] tcp: fix a possible lockdep splat in tcp_done()

2019-10-14 Thread Eric Dumazet
syzbot found that if __inet_inherit_port() returns an error, we call tcp_done() after inet_csk_prepare_forced_close(), meaning the socket lock is no longer held. We might fix this in a different way in net-next, but for 5.4 it seems safer to relax the lockdep check. Fixes: d983ea6f16b8 ("tcp: add

Re: [PATCH v3 net-next 5/8] net: mvneta: add basic XDP support

2019-10-14 Thread Lorenzo Bianconi
> On Mon, 14 Oct 2019 12:49:52 +0200 > Lorenzo Bianconi wrote: > > > Add basic XDP support to mvneta driver for devices that rely on software > > buffer management. Currently supported verdicts are: > > - XDP_DROP > > - XDP_PASS > > - XDP_REDIRECT > > - XDP_ABORTED > > > > - iptables drop: > > $

[PATCH net] rxrpc: use rcu protection while reading sk->sk_user_data

2019-10-14 Thread Eric Dumazet
We need to extend the rcu_read_lock() section in rxrpc_error_report() and use rcu_dereference_sk_user_data() instead of plain access to sk->sk_user_data to make sure all rules are respected. The compiler wont reload sk->sk_user_data at will, and RCU rules prevent memory beeing freed too soon. Fix

Re: [PATCH v3 net-next 5/8] net: mvneta: add basic XDP support

2019-10-14 Thread Jesper Dangaard Brouer
On Mon, 14 Oct 2019 12:49:52 +0200 Lorenzo Bianconi wrote: > Add basic XDP support to mvneta driver for devices that rely on software > buffer management. Currently supported verdicts are: > - XDP_DROP > - XDP_PASS > - XDP_REDIRECT > - XDP_ABORTED > > - iptables drop: > $iptables -t raw -I PRERO

Re: [PATCHv3 net-next 0/5] sctp: update from rfc7829

2019-10-14 Thread Neil Horman
On Mon, Oct 14, 2019 at 02:14:43PM +0800, Xin Long wrote: > SCTP-PF was implemented based on a Internet-Draft in 2012: > > https://tools.ietf.org/html/draft-nishida-tsvwg-sctp-failover-05 > > It's been updated quite a few by rfc7829 in 2016. > > This patchset adds the following features: > >

Re: [PATCHv2 net-next 3/5] sctp: add SCTP_EXPOSE_POTENTIALLY_FAILED_STATE sockopt

2019-10-14 Thread Neil Horman
On Mon, Oct 14, 2019 at 04:36:34PM +0800, Xin Long wrote: > On Thu, Oct 10, 2019 at 12:18 AM Neil Horman wrote: > > > > On Tue, Oct 08, 2019 at 11:28:32PM +0800, Xin Long wrote: > > > On Tue, Oct 8, 2019 at 9:02 PM David Laight > > > wrote: > > > > > > > > From: Xin Long > > > > > Sent: 08 Octob

Re: [PATCH bpf-next v3 1/5] bpf: Support chain calling multiple BPF programs after each other

2019-10-14 Thread Toke Høiland-Jørgensen
Alexei Starovoitov writes: > On Wed, Oct 09, 2019 at 10:03:43AM +0200, Toke Høiland-Jørgensen wrote: >> Alexei Starovoitov writes: >> >> > Please implement proper indirect calls and jumps. >> >> I am still not convinced this will actually solve our problem; but OK, I >> can give it a shot. > >

Re: [PATCH v2 net-next 09/12] net: aquantia: implement get_ts_info ethtool

2019-10-14 Thread Igor Russkikh
>> + >> +if (aq_nic->aq_ptp) > > Shouldn't the test for (aq_nic->aq_ptp) also effect > info->so_timestamping and info->tx_types ? You are right, it should. It should also fallback to software ethtool_op_get_ts_info in case HW is not PTP capable. Will fix that. Regards, Igor

Re: [PATCH v2 net-next 03/12] net: aquantia: add basic ptp_clock callbacks

2019-10-14 Thread Igor Russkikh
Hi Richard, Thanks for your review, will update the patchset after the comments. >> +{ >> +struct aq_ptp_s *aq_ptp = container_of(ptp, struct aq_ptp_s, ptp_info); >> +struct aq_nic_s *aq_nic = aq_ptp->aq_nic; >> + >> +mutex_lock(&aq_nic->fwreq_mutex); > > Here you use a different lo

Re: [PATCHv2 net-next 2/6] lwtunnel: add LWTUNNEL_IP_OPTS support for lwtunnel_ip

2019-10-14 Thread Xin Long
On Fri, Oct 11, 2019 at 1:31 PM Simon Horman wrote: > > On Thu, Oct 10, 2019 at 05:45:14PM +0800, Xin Long wrote: > > On Wed, Oct 9, 2019 at 3:55 PM Simon Horman > > wrote: > > > > > > On Tue, Oct 08, 2019 at 11:16:12PM +0800, Xin Long wrote: > > > > This patch is to add LWTUNNEL_IP_OPTS into lw

[PATCH v3 net-next 2/8] net: mvneta: introduce page pool API for sw buffer manager

2019-10-14 Thread Lorenzo Bianconi
Use the page_pool api for allocations and DMA handling instead of __dev_alloc_page()/dma_map_page() and free_page()/dma_unmap_page(). Pages are unmapped using page_pool_release_page before packets go into the network stack. The page_pool API offers buffer recycling capabilities for XDP but allocat

[PATCH v3 net-next 6/8] net: mvneta: move header prefetch in mvneta_swbm_rx_frame

2019-10-14 Thread Lorenzo Bianconi
Move data buffer prefetch in mvneta_swbm_rx_frame after dma_sync_single_range_for_cpu Signed-off-by: Ilias Apalodimas Signed-off-by: Jesper Dangaard Brouer Signed-off-by: Lorenzo Bianconi --- drivers/net/ethernet/marvell/mvneta.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) di

[PATCH v3 net-next 4/8] net: mvneta: sync dma buffers before refilling hw queues

2019-10-14 Thread Lorenzo Bianconi
mvneta driver can run on not cache coherent devices so it is necessary to sync DMA buffers before sending them to the device in order to avoid memory corruptions. Running perf analysis we can see a performance cost associated with this DMA-sync (anyway it is already there in the original driver cod

[PATCH v3 net-next 7/8] net: mvneta: make tx buffer array agnostic

2019-10-14 Thread Lorenzo Bianconi
Allow tx buffer array to contain both skb and xdp buffers in order to enable xdp frame recycling adding XDP_TX verdict support Signed-off-by: Lorenzo Bianconi --- drivers/net/ethernet/marvell/mvneta.c | 66 +-- 1 file changed, 43 insertions(+), 23 deletions(-) diff --git

[PATCH v3 net-next 8/8] net: mvneta: add XDP_TX support

2019-10-14 Thread Lorenzo Bianconi
Implement XDP_TX verdict and ndo_xdp_xmit net_device_ops function pointer Signed-off-by: Lorenzo Bianconi --- drivers/net/ethernet/marvell/mvneta.c | 126 -- 1 file changed, 119 insertions(+), 7 deletions(-) diff --git a/drivers/net/ethernet/marvell/mvneta.c b/drivers/n

[PATCH v3 net-next 5/8] net: mvneta: add basic XDP support

2019-10-14 Thread Lorenzo Bianconi
Add basic XDP support to mvneta driver for devices that rely on software buffer management. Currently supported verdicts are: - XDP_DROP - XDP_PASS - XDP_REDIRECT - XDP_ABORTED - iptables drop: $iptables -t raw -I PREROUTING -p udp --dport 9 -j DROP $nstat -n && sleep 1 && nstat IpInReceives

[PATCH v3 net-next 1/8] net: mvneta: introduce mvneta_update_stats routine

2019-10-14 Thread Lorenzo Bianconi
Introduce mvneta_update_stats routine to collect {rx/tx} statistics (packets and bytes). This is a preliminary patch to add XDP support to mvneta driver Signed-off-by: Lorenzo Bianconi --- drivers/net/ethernet/marvell/mvneta.c | 41 +-- 1 file changed, 20 insertions(+), 2

[PATCH v3 net-next 3/8] net: mvneta: rely on build_skb in mvneta_rx_swbm poll routine

2019-10-14 Thread Lorenzo Bianconi
Refactor mvneta_rx_swbm code introducing mvneta_swbm_rx_frame and mvneta_swbm_add_rx_fragment routines. Rely on build_skb in oreder to allocate skb since the previous patch introduced buffer recycling using the page_pool API. This patch fixes even an issue in the original driver where dma buffers a

[PATCH v3 net-next 0/8] add XDP support to mvneta driver

2019-10-14 Thread Lorenzo Bianconi
Add XDP support to mvneta driver for devices that rely on software buffer management. Supported verdicts are: - XDP_DROP - XDP_PASS - XDP_REDIRECT - XDP_TX Moreover set ndo_xdp_xmit net_device_ops function pointer in order to support redirecting from other device (e.g. virtio-net). Convert mvneta d

Re: [PATCH net v2 0/2] ipv6: fix neighbour resolution with raw socket

2019-10-14 Thread Nicolas Dichtel
Le 26/06/2019 à 22:26, David Miller a écrit : > From: Nicolas Dichtel > Date: Mon, 24 Jun 2019 16:01:07 +0200 > >> The first patch prepares the fix, it constify rt6_nexthop(). >> The detail of the bug is explained in the second patch. >> >> v1 -> v2: >> - fix compilation warnings >> - split the

Re: pull request (net): ipsec 2019-09-05

2019-10-14 Thread Nicolas Dichtel
Le 05/09/2019 à 12:21, Steffen Klassert a écrit : > 1) Several xfrm interface fixes from Nicolas Dichtel: >- Avoid an interface ID corruption on changelink. >- Fix wrong intterface names in the logs. >- Fix a list corruption when changing network namespaces. >- Fix unregistation of

[PATCH v2 net 0/2] dpaa2-eth: misc fixes

2019-10-14 Thread Ioana Ciornei
This patch set adds a couple of fixes around updating configuration on MAC change. Depending on when MC connects the DPNI to a MAC, both the MAC address and TX FQIDs should be updated everytime there is a change in configuration. Changes in v2: - used reverse christmas tree ordering in patch 2/2

[PATCH v2 net 2/2] dpaa2-eth: Fix TX FQID values

2019-10-14 Thread Ioana Ciornei
From: Ioana Radulescu Depending on when MC connects the DPNI to a MAC, Tx FQIDs may not be available during probe time. Read the FQIDs each time the link goes up to avoid using invalid values. In case an error occurs or an invalid value is retrieved, fall back to QDID-based enqueueing. Fixes: 1

[PATCH v2 net 1/2] dpaa2-eth: add irq for the dpmac connect/disconnect event

2019-10-14 Thread Ioana Ciornei
From: Florin Chiculita Add IRQ for the DPNI endpoint change event, resolving the issue when a dynamically created DPNI gets a randomly generated hw address when the endpoint is a DPMAC object. Signed-off-by: Florin Chiculita Signed-off-by: Ioana Ciornei --- Changes in v2: - none drivers/net

RE: [PATCHv2 net-next 3/5] sctp: add SCTP_EXPOSE_POTENTIALLY_FAILED_STATE sockopt

2019-10-14 Thread David Laight
From: Xin Long > Sent: 14 October 2019 09:37 ... > RFC actually keeps adding new notifications, That RFC keeps moving the goalposts. Even the structures are guaranteed to have holes. > and a user shouldn't expect > the specific notifications coming in some exact orders. They should just > ignore

Re: [PATCHv2 net-next 3/5] sctp: add SCTP_EXPOSE_POTENTIALLY_FAILED_STATE sockopt

2019-10-14 Thread Xin Long
On Thu, Oct 10, 2019 at 12:18 AM Neil Horman wrote: > > On Tue, Oct 08, 2019 at 11:28:32PM +0800, Xin Long wrote: > > On Tue, Oct 8, 2019 at 9:02 PM David Laight wrote: > > > > > > From: Xin Long > > > > Sent: 08 October 2019 12:25 > > > > > > > > This is a sockopt defined in section 7.3 of rfc78

Re: [PATCH bpf] libbpf: fix compatibility for kernels without need_wakeup

2019-10-14 Thread Magnus Karlsson
On Sat, Oct 12, 2019 at 6:55 PM Alexei Starovoitov wrote: > > On Fri, Oct 11, 2019 at 1:58 PM John Fastabend > wrote: > > > > Magnus Karlsson wrote: > > > On Tue, Oct 8, 2019 at 9:29 PM John Fastabend > > > wrote: > > > > > > > > Magnus Karlsson wrote: > > > > > When the need_wakeup flag was a

Re: [PATCH net-next v3 05/10] net: openvswitch: optimize flow-mask looking up

2019-10-14 Thread Pravin Shelar
On Fri, Oct 11, 2019 at 7:05 AM wrote: > > From: Tonghao Zhang > > The full looking up on flow table traverses all mask array. > If mask-array is too large, the number of invalid flow-mask > increase, performance will be drop. > > This patch optimizes mask-array operation: > > * Inserting, insert