Re: [PATCH bpf-next] virtio_net: add XDP meta data support in receive_small()

2019-06-27 Thread Yuya Kusakabe
>> This adds XDP meta data support to the code path receive_small(). >> >> mrg_rxbuf=off is required on qemu, because receive_mergeable() still >> doesn't support XDP meta data. > > >What's the reason for this? I didn't have enough time to add support XDP meta data to receive_mergeable(). But I'll

[PATCH bpf-next] virtio_net: add XDP meta data support

2019-06-27 Thread Yuya Kusakabe
This adds XDP meta data support to both receive_small() and receive_mergeable(). Fixes: de8f3a83b0a0 ("bpf: add meta pointer for direct access") Signed-off-by: Yuya Kusakabe --- drivers/net/virtio_net.c | 40 +--- 1 file changed, 29 insertions(+), 11 deletions

[PATCH net-next v3 0/4] em_ipt: add support for addrtype

2019-06-27 Thread Nikolay Aleksandrov
Hi, We would like to be able to use the addrtype from tc for ACL rules and em_ipt seems the best place to add support for the already existing xt match. The biggest issue is that addrtype revision 1 (with ipv6 support) is NFPROTO_UNSPEC and currently em_ipt can't differentiate between v4/v6 if such

[PATCH net-next v3 1/4] net: sched: em_ipt: match only on ip/ipv6 traffic

2019-06-27 Thread Nikolay Aleksandrov
Restrict matching only to ip/ipv6 traffic and make sure we can use the headers, otherwise matches will be attempted on any protocol which can be unexpected by the xt matches. Currently policy supports only ipv4/6. Signed-off-by: Nikolay Aleksandrov --- v3: no change v2: no change net/sched/em_i

[PATCH net-next v3 2/4] net: sched: em_ipt: set the family based on the packet if it's unspecified

2019-06-27 Thread Nikolay Aleksandrov
Set the family based on the packet if it's unspecified otherwise protocol-neutral matches will have wrong information (e.g. NFPROTO_UNSPEC). In preparation for using NFPROTO_UNSPEC xt matches. v2: set the nfproto only when unspecified Suggested-by: Eyal Birger Signed-off-by: Nikolay Aleksandrov

[PATCH net-next v3 4/4] net: sched: em_ipt: add support for addrtype matching

2019-06-27 Thread Nikolay Aleksandrov
Allow em_ipt to use addrtype for matching. Restrict the use only to revision 1 which has IPv6 support. Since it's a NFPROTO_UNSPEC xt match we use the user-specified nfproto for matching, in case it's unspecified both v4/v6 will be matched by the rule. v2: no changes, was patch 5 in v1 Signed-off

[PATCH net-next v3 3/4] net: sched: em_ipt: keep the user-specified nfproto and dump it

2019-06-27 Thread Nikolay Aleksandrov
If we dump NFPROTO_UNSPEC as nfproto user-space libxtables can't handle it and would exit with an error like: "libxtables: unhandled NFPROTO in xtables_set_nfproto" In order to avoid the error return the user-specified nfproto. If we don't record it then the match family is used which can be NFPROT

[PATCH net] igmp: fix memory leak in igmpv3_del_delrec()

2019-06-27 Thread Eric Dumazet
im->tomb and/or im->sources might not be NULL, but we currently overwrite their values blindly. Using swap() will make sure the following call to kfree_pmc(pmc) will properly free the psf structures. Tested with the C repro provided by syzbot, which basically does : socket(PF_INET, SOCK_DGRAM,

Re: [RFC, PATCH 1/2, net-next] net: netsec: Use page_pool API

2019-06-27 Thread Jesper Dangaard Brouer
On Tue, 25 Jun 2019 18:06:18 +0300 Ilias Apalodimas wrote: > @@ -1059,7 +1059,23 @@ static void netsec_setup_tx_dring(struct netsec_priv > *priv) > static int netsec_setup_rx_dring(struct netsec_priv *priv) > { > struct netsec_desc_ring *dring = &priv->desc_ring[NETSEC_RING_RX]; > -

Re: [RFC, PATCH 1/2, net-next] net: netsec: Use page_pool API

2019-06-27 Thread Ilias Apalodimas
Hi Jepser, > On Tue, 25 Jun 2019 18:06:18 +0300 > Ilias Apalodimas wrote: > > > @@ -1059,7 +1059,23 @@ static void netsec_setup_tx_dring(struct netsec_priv > > *priv) > > static int netsec_setup_rx_dring(struct netsec_priv *priv) > > { > > struct netsec_desc_ring *dring = &priv->desc_rin

[RFC] longer netdev names proposal

2019-06-27 Thread Jiri Pirko
Hi all. In the past, there was repeatedly discussed the IFNAMSIZ (16) limit for netdevice name length. Now when we have PF and VF representors with port names like "pfXvfY", it became quite common to hit this limit: 0123456789012345 enp131s0f1npf0vf6 enp131s0f1npf0vf22 Since IFLA_NAME is just a s

Re: [PATCH net] igmp: fix memory leak in igmpv3_del_delrec()

2019-06-27 Thread Hangbin Liu
On Thu, Jun 27, 2019 at 01:27:01AM -0700, Eric Dumazet wrote: > im->tomb and/or im->sources might not be NULL, but we > currently overwrite their values blindly. > > Using swap() will make sure the following call to kfree_pmc(pmc) > will properly free the psf structures. > > Tested with the C rep

Re: [PATCH net-next v3 0/4] em_ipt: add support for addrtype

2019-06-27 Thread Eyal Birger
On Thu, 27 Jun 2019 11:10:43 +0300 Nikolay Aleksandrov wrote: > Hi, > We would like to be able to use the addrtype from tc for ACL rules and > em_ipt seems the best place to add support for the already existing xt > match. The biggest issue is that addrtype revision 1 (with ipv6 > support) is NFP

RE: [EXT] [PATCH net-next 07/16] qlge: Deduplicate rx buffer queue management

2019-06-27 Thread Manish Chopra
> while (curr_idx != clean_idx) { > - lbq_desc = &rx_ring->lbq[curr_idx]; > + struct qlge_bq_desc *lbq_desc = &rx_ring- > >lbq.queue[curr_idx]; > > if (lbq_desc->p.pg_chunk.offset == last_offset) > - pci_unmap_page(qdev->pdev, lbq_des

RE: [EXT] [PATCH V3] bnx2x: Prevent ptp_task to be rescheduled indefinitely

2019-06-27 Thread Sudarsana Reddy Kalluru
> -Original Message- > From: Guilherme G. Piccoli > Sent: Thursday, June 27, 2019 1:49 AM > To: GR-everest-linux-l2 ; > netdev@vger.kernel.org; Sudarsana Reddy Kalluru > Cc: Ariel Elior ; gpicc...@canonical.com; > jay.vosbu...@canonical.com > Subject: [EXT] [PATCH V3] bnx2x: Prevent ptp

[RFC PATCH 0/1] Document the configuration of b53

2019-06-27 Thread Benedikt Spranger
Hi, my comment about the configuration got misunderstood. I apologize for that. I try to update the Debian ifupdown util to handle DSA capable configurations. To avoid bafflement and frayed nerves I would like to get some conclusion about the configuration of the b53. I would like to know if this

[RFC PATCH 1/1] Documentation: net: dsa: b53: Describe b53 configuration

2019-06-27 Thread Benedikt Spranger
Document the different needs of documentation for the b53 driver. Signed-off-by: Benedikt Spranger --- Documentation/networking/dsa/b53.rst | 300 +++ 1 file changed, 300 insertions(+) create mode 100644 Documentation/networking/dsa/b53.rst diff --git a/Documentation/ne

RE: [PATCH net-next 11/16] qlge: Remove qlge_bq.len & size

2019-06-27 Thread Manish Chopra
> > - for (i = 0; i < qdev->rx_ring_count; i++) { > + for (i = 0; i < qdev->rss_ring_count; i++) { > struct rx_ring *rx_ring = &qdev->rx_ring[i]; > > - if (rx_ring->lbq.queue) > - ql_free_lbq_buffers(qdev, rx_ring); > - if (rx_ring

Re: [PATCH 00/11] XDP unaligned chunk placement support

2019-06-27 Thread Laatz, Kevin
On 25/06/2019 19:44, Jonathan Lemon wrote: On 20 Jun 2019, at 1:39, Kevin Laatz wrote: This patchset adds the ability to use unaligned chunks in the XDP umem. Currently, all chunk addresses passed to the umem are masked to be chunk size aligned (default is 2k, max is PAGE_SIZE). This limits

Re: [PATCH 1/2 nf-next] netfilter: nft_meta: add NFT_META_BRI_VLAN_PROTO support

2019-06-27 Thread Pablo Neira Ayuso
On Thu, Jun 27, 2019 at 10:09:16AM +0800, we...@ucloud.cn wrote: > From: wenxu > > This patch provide a meta to get the bridge vlan proto > > nft add rule bridge firewall zones counter meta br_vlan_proto 0x8100 > > Signed-off-by: wenxu > --- > include/uapi/linux/netfilter/nf_tables.h | 2 ++ >

Re: samples/bpf compilation failures - 5.2.0

2019-06-27 Thread Joel Fernandes
> > On 5/28/2019 2:27 PM, Srinivas Ramana wrote: > > > Hello, > > > > > > I am trying to build samples/bpf in kernel(5.2.0-rc1) but unsuccessful > > > with below errors. Can you help to point what i am missing or if there > > > is some known issue? By the way have you just tried building it on an

[PATCH net-next 0/2] net: ipv4: fix circular-list infinite loop

2019-06-27 Thread Florian Westphal
Tariq and Ran reported a regression caused by net-next commit 2638eb8b50cf ("net: ipv4: provide __rcu annotation for ifa_list"). This happens when net.ipv4.conf.$dev.promote_secondaries sysctl is enabled -- we can arrange for ifa->next to point at ifa, so next process that tries to walk the list l

[PATCH net-next 2/2] selftests: rtnetlink: add small test case with 'promote_secondaries' enabled

2019-06-27 Thread Florian Westphal
This exercises the 'promote_secondaries' code path. Without previous fix, this triggers infinite loop/soft lockup: ifconfig process spinning at 100%, never to return. Signed-off-by: Florian Westphal --- tools/testing/selftests/net/rtnetlink.sh | 20 1 file changed, 20 inser

[PATCH net-next 1/2] net: ipv4: fix infinite loop on secondary addr promotion

2019-06-27 Thread Florian Westphal
secondary address promotion causes infinite loop -- it arranges for ifa->ifa_next to point back to itself. Problem is that 'prev_prom' and 'last_prim' might point at the same entry, so 'last_sec' pointer must be obtained after prev_prom->next update. Fixes: 2638eb8b50cf ("net: ipv4: provide __rcu

Re: [RFC iproute2 1/1] ip: netns: add mounted state file for each netns

2019-06-27 Thread Nicolas Dichtel
Le 26/06/2019 à 21:03, Alexander Aring a écrit : > This patch adds a state file for each generated namespace to ensure the > namespace is mounted. There exists no way to tell another programm that > the namespace is mounted when iproute is creating one. An example > application would be an inotify

Re: [RFC, PATCH 2/2, net-next] net: netsec: add XDP support

2019-06-27 Thread Jesper Dangaard Brouer
On Tue, 25 Jun 2019 18:06:19 +0300 Ilias Apalodimas wrote: > @@ -609,6 +639,9 @@ static bool netsec_clean_tx_dring(struct netsec_priv > *priv) > int tail = dring->tail; > int cnt = 0; > > + if (dring->is_xdp) > + spin_lock(&dring->lock); > + > pkts = 0; >

Re: [RFC, PATCH 2/2, net-next] net: netsec: add XDP support

2019-06-27 Thread Ilias Apalodimas
On Thu, Jun 27, 2019 at 02:23:05PM +0200, Jesper Dangaard Brouer wrote: > On Tue, 25 Jun 2019 18:06:19 +0300 > Ilias Apalodimas wrote: > > > @@ -609,6 +639,9 @@ static bool netsec_clean_tx_dring(struct netsec_priv > > *priv) > > int tail = dring->tail; > > int cnt = 0; > > > > + if (

Re: [PATCH 2/2 nf-next] netfilter:nft_meta: add NFT_META_VLAN support

2019-06-27 Thread Pablo Neira Ayuso
On Thu, Jun 27, 2019 at 10:09:17AM +0800, we...@ucloud.cn wrote: > From: wenxu > > This patch provide a meta vlan to set the vlan tag of the packet. > > for q-in-q vlan id 20: > meta vlan set 0x88a8:20 Actually, I think this is not very useful for stacked vlan since this just sets/mangles the e

Re: [PATCH 2/3 nf-next] netfilter:nf_flow_table: Support bridge type flow offload

2019-06-27 Thread Pablo Neira Ayuso
On Thu, Jun 27, 2019 at 02:22:36PM +0800, wenxu wrote: > On 6/27/2019 3:19 AM, Florian Westphal wrote: > > Florian Westphal wrote: [...] > >> Whats the idea with this patch? > >> > >> Do you see a performance improvement when bypassing bridge layer? If so, > >> how much? > >> > >> I just wonder if

[PATCH 2/2 nf-next v2] netfilter:nft_meta: add NFT_META_VLAN support

2019-06-27 Thread wenxu
From: wenxu This patch provide a meta vlan to set the vlan tag of the packet. for q-in-q vlan id 20: meta vlan set 0x88a8:20 set the default 0x8100 vlan type with vlan id 20 meta vlan set 20 Signed-off-by: wenxu --- include/uapi/linux/netfilter/nf_tables.h | 4 net/netfilter/nft_meta.c

[PATCH] net/smc: common release code for non-accepted sockets

2019-06-27 Thread Karsten Graul
From: Ursula Braun There are common steps when releasing an accepted or unaccepted socket. Move this code into a common routine. Signed-off-by: Ursula Braun Signed-off-by: Karsten Graul --- net/smc/af_smc.c | 73 +--- 1 file changed, 32 insertions(+

[PATCH 1/2 nf-next v2] netfilter: nft_meta: add NFT_META_BRI_O/IIFVPROTO support

2019-06-27 Thread wenxu
From: wenxu This patch provide a meta to get the bridge vlan proto nft add rule bridge firewall zones counter meta br_iifvproto 0x8100 Signed-off-by: wenxu --- include/uapi/linux/netfilter/nf_tables.h | 4 net/netfilter/nft_meta.c | 18 ++ 2 files changed

Re: [PATCH] net: dsa: mv88e6xxx: wait after reset deactivation

2019-06-27 Thread Andrew Lunn
On Thu, Jun 27, 2019 at 07:29:46AM +0300, Baruch Siach wrote: > Add a 1ms delay after reset deactivation. Otherwise the chip returns > bogus ID value. This is observed with 88E6390 (Peridot) chip. > > Signed-off-by: Baruch Siach > --- > drivers/net/dsa/mv88e6xxx/chip.c | 1 + > 1 file changed, 1

Re: [PATCH] net/smc: common release code for non-accepted sockets

2019-06-27 Thread Karsten Graul
Hi Dave, I forgot to add that this patch is intended for the net-next tree. On 27/06/2019 15:04, Karsten Graul wrote: > From: Ursula Braun > > There are common steps when releasing an accepted or unaccepted socket. > Move this code into a common routine. > > Signed-off-by: Ursula Braun > Sig

[PATCH net 1/1] net: openvswitch: fix csum updates for MPLS actions

2019-06-27 Thread John Hurley
Skbs may have their checksum value populated by HW. If this is a checksum calculated over the entire packet then the CHECKSUM_COMPLETE field is marked. Changes to the data pointer on the skb throughout the network stack still try to maintain this complete csum value if it is required through functi

Re: [PATCH 2/2 nf-next] netfilter:nft_meta: add NFT_META_VLAN support

2019-06-27 Thread wenxu
在 2019/6/27 20:35, Pablo Neira Ayuso 写道: > On Thu, Jun 27, 2019 at 10:09:17AM +0800, we...@ucloud.cn wrote: >> From: wenxu >> >> This patch provide a meta vlan to set the vlan tag of the packet. >> >> for q-in-q vlan id 20: >> meta vlan set 0x88a8:20 > Actually, I think this is not very useful f

Re: [RFC PATCH 1/1] Documentation: net: dsa: b53: Describe b53 configuration

2019-06-27 Thread Andrew Lunn
On Thu, Jun 27, 2019 at 12:15:06PM +0200, Benedikt Spranger wrote: Hi Benedikt > +Configuration with tagging support > +-- > + > +The tagging based configuration is desired. > + > +To use the b53 DSA driver some configuration need to be performed. As > +example con

[PATCH net-next 10/16] mlxsw: spectrum: PTP: Add PTP initialization / finalization

2019-06-27 Thread Ido Schimmel
From: Petr Machata Add two ptp_ops: init and fini, to initialize and finalize the PTP subsystem. Call as appropriate from mlxsw_sp_init() and _fini(). Lay the groundwork for Spectrum-1 support. On Spectrum-1, the received timestamped packets and their corresponding timestamps arrive independentl

[PATCH net-next 03/16] mlxsw: reg: Add Time Precision Packet Timestamping Reading

2019-06-27 Thread Ido Schimmel
From: Petr Machata The MTPPTR is used for reading the per port PTP timestamp FIFO. Signed-off-by: Petr Machata Acked-by: Jiri Pirko Signed-off-by: Ido Schimmel --- drivers/net/ethernet/mellanox/mlxsw/reg.h | 110 ++ 1 file changed, 110 insertions(+) diff --git a/drivers/

[PATCH net-next 02/16] mlxsw: reg: Add Monitoring Precision Time Protocol Trap Register

2019-06-27 Thread Ido Schimmel
From: Petr Machata This register is used for configuring under which trap to deliver PTP packets depending on type of the packet. Signed-off-by: Petr Machata Acked-by: Jiri Pirko Signed-off-by: Ido Schimmel --- drivers/net/ethernet/mellanox/mlxsw/reg.h | 39 +++ 1 file ch

[PATCH net-next 00/16] mlxsw: PTP timestamping support

2019-06-27 Thread Ido Schimmel
From: Ido Schimmel This is the second patchset adding PTP support in mlxsw. Next patchset will add PTP shapers which are required to maintain accuracy under rates lower than 40Gb/s, while subsequent patchsets will add tracepoints and selftests. Petr says: This patch set introduces support for r

[PATCH net-next 09/16] mlxsw: pci: PTP: Hook into packet transmit path

2019-06-27 Thread Ido Schimmel
From: Petr Machata On Spectrum-1, timestamps are delivered separately from the packets, and need to paired up. Therefore, at some point after mlxsw_sp_port_xmit() is invoked, it is necessary to involve the chip-specific driver code to allow it to do the necessary bookkeeping and matching. On Spe

[PATCH net-next 05/16] mlxsw: spectrum: Extract a helper for trap registration

2019-06-27 Thread Ido Schimmel
From: Petr Machata On Spectrum-1, timestamps for PTP packets are delivered through queues of ingress and egress timestamps. There are two event traps corresponding to activity on each of those queues. This mechanism is absent on Spectrum-2, and therefore the traps should only be registered on Spe

[PATCH net-next 04/16] mlxsw: reg: Add Monitoring Global Configuration Register

2019-06-27 Thread Ido Schimmel
From: Petr Machata This register serves to configure global parameters of certain monitoring operations. The following patches will use it to configure that when PTP timestamps are delivered through the PTP FIFO traps, the FIFO in question is cleared as well. Signed-off-by: Petr Machata Acked-b

[PATCH net-next 11/16] mlxsw: spectrum: PTP: Disable BH when working with PHC

2019-06-27 Thread Ido Schimmel
From: Petr Machata Up until now, the PTP hardware clock code was only invoked in the process context (SYS_clock_adjtime -> do_clock_adjtime -> k_clock::clock_adj -> pc_clock_adjtime -> posix_clock_operations::clock_adjtime -> ptp_clock_info::adjtime -> mlxsw_spectrum). In order to enable HW time

[PATCH net-next 01/16] mlxsw: reg: Add Monitoring Time Precision Packet Port Configuration Register

2019-06-27 Thread Ido Schimmel
From: Petr Machata This register serves for configuration of which PTP messages should be timestamped. This is a global configuration, despite the register name. Signed-off-by: Petr Machata Acked-by: Jiri Pirko Signed-off-by: Ido Schimmel --- drivers/net/ethernet/mellanox/mlxsw/reg.h | 38 ++

[PATCH net-next 13/16] mlxsw: spectrum: PTP: Garbage-collect unmatched entries

2019-06-27 Thread Ido Schimmel
From: Petr Machata On Spectrum-1, timestamped PTP packets and the corresponding timestamps need to be kept in caches until both are available, at which point they are matched up and packets forwarded as appropriate. However, not all packets will ever see their timestamp, and not all timestamps wi

[PATCH net-next 06/16] mlxsw: spectrum: Add support for traps specific to Spectrum-1

2019-06-27 Thread Ido Schimmel
From: Petr Machata On Spectrum-1, timestamps for PTP packets are delivered through queues of ingress and egress timestamps. There are two event traps corresponding to activity on each of those queues. This mechanism is absent on Spectrum-2, and therefore the traps should only be registered on Spe

[PATCH net-next 08/16] mlxsw: core: Add support for using SKB control buffer

2019-06-27 Thread Ido Schimmel
From: Petr Machata The SKB control buffer is useful (and used) for bookkeeping of information related to that SKB. Add helpers so that the mlxsw driver(s) can safely use the buffer as well. The structure is currently empty, individual users will add members to it as necessary. Note that SKB allo

[PATCH net-next 14/16] mlxsw: spectrum: PTP: Configure PTP traps and FIFO events

2019-06-27 Thread Ido Schimmel
From: Petr Machata Configure MTPTPT to set which message types should arrive under which PTP trap, and MOGCR to clear the timestamp queue after its contents are reported through PTP_ING_FIFO or PTP_EGR_FIFO. With this configuration, PTP packets start arriving through the PTP traps. However since

[PATCH net-next 07/16] mlxsw: spectrum: PTP: Hook into packet receive path

2019-06-27 Thread Ido Schimmel
From: Petr Machata When configured, the Spectrum hardware can recognize PTP packets and trap them to the CPU using dedicated traps, PTP0 and PTP1. One reason to get PTP packets under dedicated traps is to have a separate policer suitable for the amount of PTP traffic expected when switch is oper

[PATCH net-next 15/16] mlxsw: spectrum: PTP: Support SIOCGHWTSTAMP, SIOCSHWTSTAMP ioctls

2019-06-27 Thread Ido Schimmel
From: Petr Machata The SIOCSHWTSTAMP ioctl configures HW timestamping on a given port. Dispatch the ioctls to per-chip handler (which add to ptp_ops). Find which PTP messages need to be timestamped and configure MTPPPC accordingly. The SIOCGHWTSTAMP ioctl is getter for the current configuration.

[PATCH net-next 12/16] mlxsw: spectrum: PTP: Support timestamping on Spectrum-1

2019-06-27 Thread Ido Schimmel
From: Petr Machata On Spectrum-1, timestamps arrive through a pair of dedicated events: MLXSW_TRAP_ID_PTP_ING_FIFO and _EGR_FIFO. The payload delivered with those traps is contents of the timestamp FIFO at a given port in a given direction. Add a Spectrum-1-specific handler for these two events w

[PATCH net-next 16/16] mlxsw: spectrum: PTP: Support ethtool get_ts_info

2019-06-27 Thread Ido Schimmel
From: Petr Machata The get_ts_info callback is used for obtaining information about timestamping capabilities of a network device. On Spectrum-1, implement it to advertise the PHC and the capability to do HW timestamping, and the supported RX and TX filters. Signed-off-by: Petr Machata Acked-by

Re: [RFC, PATCH 2/2, net-next] net: netsec: add XDP support

2019-06-27 Thread Maciej Fijalkowski
On Tue, 25 Jun 2019 18:06:19 +0300 Ilias Apalodimas wrote: Hi Ilias, > +/* The current driver only supports 1 Txq, this should run under spin_lock() > */ > +static u32 netsec_xdp_queue_one(struct netsec_priv *priv, > + struct xdp_frame *xdpf, bool is_ndo) > + > +{ >

RE: [EXT] [PATCH net-next 16/16] qlge: Refill empty buffer queues from wq

2019-06-27 Thread Manish Chopra
> -Original Message- > From: Benjamin Poirier > Sent: Monday, June 17, 2019 1:19 PM > To: Manish Chopra ; GR-Linux-NIC-Dev nic-...@marvell.com>; netdev@vger.kernel.org > Subject: [EXT] [PATCH net-next 16/16] qlge: Refill empty buffer queues from > wq > > External Email > > -

[PATCH iproute2] tc: netem: fix r parameter in Bernoulli loss model

2019-06-27 Thread Andrea Claudi
As the man page for tc netem states: To use the Bernoulli model, the only needed parameter is p while the others will be set to the default values r=1-p, 1-h=1 and 1-k=0. However r parameter is erroneusly set to 1, and not to 1-p. Fix this using the same approach of the 4-state loss model

[PATCH net v2] vxlan: do not destroy fdb if register_netdevice() is failed

2019-06-27 Thread Taehee Yoo
__vxlan_dev_create() destroys FDB using specific pointer which indicates a fdb when error occurs. But that pointer should not be used when register_netdevice() fails because register_netdevice() internally destroys fdb when error occurs. This patch makes vxlan_fdb_create() to do not link fdb entry

Re: [RFC PATCH 1/1] Documentation: net: dsa: b53: Describe b53 configuration

2019-06-27 Thread Benedikt Spranger
Am Thu, 27 Jun 2019 15:49:29 +0200 schrieb Andrew Lunn : > On Thu, Jun 27, 2019 at 12:15:06PM +0200, Benedikt Spranger wrote: > > Hi Benedikt > > > +Configuration with tagging support > > +-- > > + > > +The tagging based configuration is desired. > > + > > +To use

[PATCH net-next 09/12] s390/qeth: consolidate pm code

2019-06-27 Thread Julian Wiedmann
De-duplicate the pm callback implementations from the two sub-drivers, replacing them with core helpers that delegate to the .set_online and .set_offline callbacks. Signed-off-by: Julian Wiedmann --- drivers/s390/net/qeth_core.h | 3 --- drivers/s390/net/qeth_core_main.c | 36 +

[PATCH net-next 10/12] s390/qeth: consolidate skb RX processing in L3 driver

2019-06-27 Thread Julian Wiedmann
Use napi_gro_receive() to pass up all types of packets that a L3 device may receive. 1) For proper L2 packets received by the IQD sniffer, this is the obvious thing to do. 2) For af_iucv (which doesn't provide a GRO assist), the GRO code will transparently fall back to netif_receive_skb(). So

[PATCH net-next 01/12] s390/qeth: dynamically allocate simple IPA cmds

2019-06-27 Thread Julian Wiedmann
This patch reduces the usage of the write channel's static cmd buffers, by dynamically allocating all simple IPA cmds (eg. STARTLAN, SETVMAC). It also converts the OSN path. Doing so requires some changes to how we calculate the cmd length. Currently when building IPA cmds, we're quite generous in

[PATCH net-next 03/12] s390/qeth: dynamically allocate various cmds with sub-types

2019-06-27 Thread Julian Wiedmann
This patch converts the adapter, assist and bridgeport cmd paths to dynamic allocation. Most of the work is about re-organizing the cmd headers, calculating the correct cmd length, and filling in the right value in the sub-cmd's length field. Since we now also set the correct length for cmds that

[PATCH net-next 08/12] s390/qeth: streamline SNMP cmd code

2019-06-27 Thread Julian Wiedmann
Apply some cleanups to qeth_snmp_command() and its callback: 1. when accessing the user data, use the proper struct instead of hard-coded offsets. Also copy the request data straight into the allocated cmd, skipping the extra memdup_user() to a tmp buffer. 2. capping the request length is no

[PATCH net-next 04/12] s390/qeth: dynamically allocate diag cmds

2019-06-27 Thread Julian Wiedmann
Add a new wrapper that allocates DIAG cmds of the right size, and fills in the common fields. Signed-off-by: Julian Wiedmann --- drivers/s390/net/qeth_core.h | 3 +++ drivers/s390/net/qeth_core_main.c | 29 + drivers/s390/net/qeth_core_mpc.h | 5 + drivers

[PATCH net-next 05/12] s390/qeth: dynamically allocate vnicc cmds

2019-06-27 Thread Julian Wiedmann
The VNICC code is somewhat quirky in that it defers the whole cmd setup to a common helper qeth_l2_vnicc_request(). Some of the cmd specifics are then passed in via parameter, while others are simply hard-coded. Split the whole machinery up into the usual format: one helper that allocates the cmd

[PATCH net-next 00/12] s390/qeth: updates 2019-06-27

2019-06-27 Thread Julian Wiedmann
Hi Dave, please apply another round of qeth updates for net-next. This completes the conversion of the control path to use dynamically allocated cmd buffers, along with some fine-tuning for the route validation fix that recently went into -net. Thanks, Julian Julian Wiedmann (12): s390/qeth: d

[PATCH net-next 11/12] s390/qeth: extract helper for route validation

2019-06-27 Thread Julian Wiedmann
As follow-up to commit 0cd6783d3c7d ("s390/qeth: check dst entry before use"), consolidate the dst_check() logic into a single helper and add a wrapper around the cast type selection. Signed-off-by: Julian Wiedmann --- drivers/s390/net/qeth_core.h| 13 + drivers/s390/net/qeth_l3_main

[PATCH net-next 12/12] s390/qeth: move cast type selection into fill_header()

2019-06-27 Thread Julian Wiedmann
The cast type currently gets selected in .ndo_start_xmit, and is then piped through several layers until it's stored into the HW header. Push the selection down into qeth_l?_fill_header() to (1) reduce the number of xmit-wide parameters, and (2) merge the two route validation checks into just one.

[PATCH net-next 07/12] s390/qeth: remove static cmd buffer infrastructure

2019-06-27 Thread Julian Wiedmann
Now that all cmds are dynamically allocated, the code for static cmd buffers can go away entirely. Resulting in a nice reduction of code/data size & complexity, while removing the risk that qeth_clear_cmd_buffers() releases cmds that are still in-flight. Signed-off-by: Julian Wiedmann --- driver

[PATCH net-next 06/12] s390/qeth: dynamically allocate MPC cmds

2019-06-27 Thread Julian Wiedmann
The base MPC cmds are the last remaining user of the static cmd buffers. Port them over to use dynamic allocation, and stop backing the write channel's cmd buffers with pages. Signed-off-by: Julian Wiedmann --- drivers/s390/net/qeth_core_main.c | 36 --- 1 file change

[PATCH net-next 02/12] s390/qeth: clarify parameter for simple assist cmds

2019-06-27 Thread Julian Wiedmann
For code that uses qeth_send_simple_setassparms_prot(), we currently can't differentiate whether the cmd should contain (1) no parameter, or (2) a 4-byte parameter with value 0. At the moment this doesn't cause any trouble. But when using dynamically allocated cmds, we need to know whether to alloc

Re: [PATCH v2 bpf-next 04/11] libbpf: refactor map initialization

2019-06-27 Thread Matt Hart
On Wed, 26 Jun 2019 at 19:29, Andrii Nakryiko wrote: > > On Wed, Jun 26, 2019 at 7:48 AM Matt Hart wrote: > > > > Hi all, > > > > I noticed perf fails to build for armv7 on linux next, due to this > > compile error: > > $ make -C tools/perf ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- > > > > CC

[PATCH net] selftests: rtnetlink: skip ipsec offload tests if netdevsim isn't present

2019-06-27 Thread Florian Westphal
running the script on systems without netdevsim now prints: SKIP: ipsec_offload can't load netdevsim instead of error message & failed status. Signed-off-by: Florian Westphal --- Feel free to apply to -next, its not a bug fix per se. tools/testing/selftests/net/rtnetlink.sh | 16 ++--

Re: [RFC] longer netdev names proposal

2019-06-27 Thread Stephen Hemminger
On Thu, 27 Jun 2019 11:43:27 +0200 Jiri Pirko wrote: > Hi all. > > In the past, there was repeatedly discussed the IFNAMSIZ (16) limit for > netdevice name length. Now when we have PF and VF representors > with port names like "pfXvfY", it became quite common to hit this limit: > 012345678901234

[PATCH v4 07/13] dt-bindings: net: sun4i-mdio: Convert the binding to a schemas

2019-06-27 Thread Maxime Ripard
Switch our Allwinner A10 MDIO controller binding to a YAML schema to enable the DT validation. Reviewed-by: Rob Herring Signed-off-by: Maxime Ripard --- Documentation/devicetree/bindings/net/allwinner,sun4i-a10-mdio.yaml | 70

[PATCH v4 05/13] dt-bindings: net: phy: The interrupt property is not mandatory

2019-06-27 Thread Maxime Ripard
Unlike what was initially claimed in the PHY binding, the interrupt property of a PHY can be omitted, and the OS will turn to polling instead. Document that. Reviewed-by: Andrew Lunn Reviewed-by: Rob Herring Signed-off-by: Maxime Ripard --- Documentation/devicetree/bindings/net/ethernet-phy.y

[PATCH v4 04/13] MAINTAINERS: Add Ethernet PHY YAML file

2019-06-27 Thread Maxime Ripard
While the Ethernet PHY framework was marked as maintained, the device tree bindings associated to that framework was not listed under the maintained files. Fix that. Reviewed-by: Andrew Lunn Signed-off-by: Maxime Ripard --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAI

[PATCH v4 00/13] net: Add generic and Allwinner YAML bindings

2019-06-27 Thread Maxime Ripard
Hi, This is an attempt at getting the main generic DT bindings for the ethernet (and related) devices, and convert some DT bindings for the Allwinner DTs to YAML as well. This should provide some DT validation coverage. Let me know if you have any questions, Maxime Changes from v3: - Added a

[PATCH v4 01/13] dt-bindings: net: Add YAML schemas for the generic Ethernet options

2019-06-27 Thread Maxime Ripard
The Ethernet controllers have a good number of generic options that can be needed in a device tree. Add a YAML schemas for those. Reviewed-by: Rob Herring Signed-off-by: Maxime Ripard --- Documentation/devicetree/bindings/net/ethernet-controller.yaml | 204 +++- Documentation/devicetree/bin

[PATCH v4 09/13] dt-bindings: net: sun7i-gmac: Convert the binding to a schemas

2019-06-27 Thread Maxime Ripard
Switch our Allwinner A20 GMAC controller binding to a YAML schema to enable the DT validation. Since that controller is based on a Synopsys IP, let's add the validation to that schemas with a bunch of conditionals. Reviewed-by: Rob Herring Signed-off-by: Maxime Ripard --- Documentation/devicetr

[PATCH v4 08/13] dt-bindings: net: stmmac: Convert the binding to a schemas

2019-06-27 Thread Maxime Ripard
Switch the STMMAC / Synopsys DesignWare MAC controller binding to a YAML schema to enable the DT validation. Reviewed-by: Rob Herring Signed-off-by: Maxime Ripard --- Documentation/devicetree/bindings/net/snps,dwmac.yaml | 389 +++- Documentation/devicetree/bindings/net/stmmac.txt

[PATCH v4 03/13] dt-bindings: net: Add a YAML schemas for the generic MDIO options

2019-06-27 Thread Maxime Ripard
The MDIO buses have a number of available device tree properties that can be used in their device tree node. Add a YAML schemas for those. Suggested-by: Andrew Lunn Signed-off-by: Maxime Ripard --- Documentation/devicetree/bindings/net/mdio.txt | 38 +- Documentation/devicetree/bin

[PATCH v4 13/13] ARM: dts: sunxi: Switch from phy to phy-handle

2019-06-27 Thread Maxime Ripard
The phy device tree property has been deprecated in favor of phy-handle, let's replace it. Signed-off-by: Maxime Ripard --- arch/arm/boot/dts/sun4i-a10-a1000.dts| 2 +- arch/arm/boot/dts/sun4i-a10-ba10-tvbox.dts | 2 +- arch/arm/boot/dts/sun4i-a10-cubieboard.dts

[PATCH v4 06/13] dt-bindings: net: sun4i-emac: Convert the binding to a schemas

2019-06-27 Thread Maxime Ripard
Switch our Allwinner A10 EMAC controller binding to a YAML schema to enable the DT validation. Reviewed-by: Rob Herring Signed-off-by: Maxime Ripard --- Documentation/devicetree/bindings/net/allwinner,sun4i-a10-emac.yaml | 55 +++ Documentati

[PATCH v4 02/13] dt-bindings: net: Add a YAML schemas for the generic PHY options

2019-06-27 Thread Maxime Ripard
The networking PHYs have a number of available device tree properties that can be used in their device tree node. Add a YAML schemas for those. Reviewed-by: Andrew Lunn Reviewed-by: Rob Herring Signed-off-by: Maxime Ripard --- Documentation/devicetree/bindings/net/ethernet-phy.yaml | 179 +

[PATCH v4 10/13] dt-bindings: net: sun8i-emac: Convert the binding to a schemas

2019-06-27 Thread Maxime Ripard
Switch our Allwinner H3 EMAC controller binding to a YAML schema to enable the DT validation. Since that controller is based on a Synopsys IP, let's add the validation to that schemas with a bunch of conditionals. Reviewed-by: Rob Herring Signed-off-by: Maxime Ripard --- Documentation/devicetre

[PATCH v4 12/13] ARM: dts: sunxi: Switch to the generic PHY properties

2019-06-27 Thread Maxime Ripard
The DWMAC specific properties to manage the PHY have been superseeded by the generic PHY properties. Let's move to it. Reviewed-by: Andrew Lunn Tested-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard --- arch/arm/boot/dts/sun6i-a31-hummingbird.dts | 6 +++--- arch/arm/boot/dts/sun6i-a31s-s

[PATCH v4 11/13] dt-bindings: net: dwmac: Deprecate the PHY reset properties

2019-06-27 Thread Maxime Ripard
Even though the DWMAC driver uses some driver specific properties, the PHY core has a bunch of generic properties and can deal with them nicely. Let's deprecate our specific properties. Reviewed-by: Martin Blumenstingl Reviewed-by: Rob Herring Signed-off-by: Maxime Ripard --- Documentation/de

Fw: [Bug 204005] New: Code in __mkroute_input isn't full correct

2019-06-27 Thread Stephen Hemminger
This is on a very old kernel, and looks like not a valid bug. But forwarding to list anyway since others may want to provide input. Begin forwarded message: Date: Thu, 27 Jun 2019 09:33:27 + From: bugzilla-dae...@bugzilla.kernel.org To: step...@networkplumber.org Subject: [Bug 204005] New: Co

Re: [PATCH v4 01/13] dt-bindings: net: Add YAML schemas for the generic Ethernet options

2019-06-27 Thread Andrew Lunn
On Thu, Jun 27, 2019 at 05:31:43PM +0200, Maxime Ripard wrote: > The Ethernet controllers have a good number of generic options that can be > needed in a device tree. Add a YAML schemas for those. > > Reviewed-by: Rob Herring > Signed-off-by: Maxime Ripard Reviewed-by: Andrew Lunn Andrew

Re: [PATCH v4 03/13] dt-bindings: net: Add a YAML schemas for the generic MDIO options

2019-06-27 Thread Andrew Lunn
On Thu, Jun 27, 2019 at 05:31:45PM +0200, Maxime Ripard wrote: > The MDIO buses have a number of available device tree properties that can > be used in their device tree node. Add a YAML schemas for those. > > Suggested-by: Andrew Lunn > Signed-off-by: Maxime Ripard Reviewed-by: Andrew Lunn

Re: [PATCH v4 11/13] dt-bindings: net: dwmac: Deprecate the PHY reset properties

2019-06-27 Thread Andrew Lunn
On Thu, Jun 27, 2019 at 05:31:53PM +0200, Maxime Ripard wrote: > Even though the DWMAC driver uses some driver specific properties, the PHY > core has a bunch of generic properties and can deal with them nicely. > > Let's deprecate our specific properties. > > Reviewed-by: Martin Blumenstingl >

Re: [PATCH v4 13/13] ARM: dts: sunxi: Switch from phy to phy-handle

2019-06-27 Thread Andrew Lunn
On Thu, Jun 27, 2019 at 05:31:55PM +0200, Maxime Ripard wrote: > The phy device tree property has been deprecated in favor of phy-handle, > let's replace it. > > Signed-off-by: Maxime Ripard Reviewed-by: Andrew Lunn Andrew

Re: 4.19: Traced deadlock during xfrm_user module load

2019-06-27 Thread Thomas Jarosch
Hi Florian, You wrote on Tue, Jun 25, 2019 at 06:53:44PM +0200: > Thanks for this detailed analysis. > In this specific case I think this is enough: > > diff --git a/net/netfilter/nfnetlink.c b/net/netfilter/nfnetlink.c > index 92077d459109..61ba92415480 100644 > --- a/net/netfilter/nfnetlink.c >

Re: [PATCH v4 03/13] dt-bindings: net: Add a YAML schemas for the generic MDIO options

2019-06-27 Thread Rob Herring
On Thu, Jun 27, 2019 at 9:32 AM Maxime Ripard wrote: > > The MDIO buses have a number of available device tree properties that can > be used in their device tree node. Add a YAML schemas for those. > > Suggested-by: Andrew Lunn > Signed-off-by: Maxime Ripard > --- > Documentation/devicetree/bin

Re: 4.19: Traced deadlock during xfrm_user module load

2019-06-27 Thread Florian Westphal
Thomas Jarosch wrote: > You wrote on Tue, Jun 25, 2019 at 06:53:44PM +0200: > > Thanks for this detailed analysis. > > In this specific case I think this is enough: > > > > diff --git a/net/netfilter/nfnetlink.c b/net/netfilter/nfnetlink.c > > index 92077d459109..61ba92415480 100644 > > --- a/net

Re: [PATCH v4 03/13] dt-bindings: net: Add a YAML schemas for the generic MDIO options

2019-06-27 Thread Maxime Ripard
Hi Rob, On Thu, Jun 27, 2019 at 09:48:06AM -0600, Rob Herring wrote: > On Thu, Jun 27, 2019 at 9:32 AM Maxime Ripard > wrote: > > > > The MDIO buses have a number of available device tree properties that can > > be used in their device tree node. Add a YAML schemas for those. > > > > Suggested-b

Re: [PATCH net-next 10/18] ionic: Add management of rx filters

2019-06-27 Thread Shannon Nelson
On 6/26/19 8:52 AM, Shannon Nelson wrote: On 6/25/19 4:37 PM, Jakub Kicinski wrote: On Thu, 20 Jun 2019 13:24:16 -0700, Shannon Nelson wrote: +int ionic_rx_filter_save(struct lif *lif, u32 flow_id, u16 rxq_index, + u32 hash, struct ionic_admin_ctx *ctx) +{ +    struct device *dev =

Re: [PATCH net-next v3 1/4] net: sched: em_ipt: match only on ip/ipv6 traffic

2019-06-27 Thread Eyal Birger
Hi Nik, On Thu, 27 Jun 2019 11:10:44 +0300 Nikolay Aleksandrov wrote: > Restrict matching only to ip/ipv6 traffic and make sure we can use the > headers, otherwise matches will be attempted on any protocol which can > be unexpected by the xt matches. Currently policy supports only > ipv4/6. > >

  1   2   3   >