Re: Unable to create htb tc classes more than 64K

2019-08-26 Thread Toke Høiland-Jørgensen
Eric Dumazet writes: > On 8/25/19 7:52 PM, Cong Wang wrote: >> On Wed, Aug 21, 2019 at 11:00 PM Akshat Kakkar wrote: >>> >>> On Thu, Aug 22, 2019 at 3:37 AM Cong Wang wrote: > I am using ipset + iptables to classify and not filters. Besides, if > tc is allowing me to define qdisc -> cl

[PATCH net] xfrm: remove the unnecessary .net_exit for xfrmi

2019-08-26 Thread Xin Long
The xfrm_if(s) on each netns can be deleted when its xfrmi dev is deleted. xfrmi dev's removal can happen when: 1. Its phydev is being deleted and NETDEV_UNREGISTER event is processed in xfrmi_event() from my last patch. 2. netns is being removed and all xfrmi devs will be deleted. 3. r

[PATCH net] xfrm: add NETDEV_UNREGISTER event process for xfrmi

2019-08-26 Thread Xin Long
When creating a xfrmi dev, it always holds the phydev. The xfrmi dev should be deleted when the phydev is being unregistered, so that the phydev can be put on time. Otherwise the phydev's deleting will get stuck: # ip link add dummy10 type dummy # ip link add xfrmi10 type xfrm dev dummy10 #

[PATCH net-next 2/3] sctp: allow users to set netns ecn flag with sysctl

2019-08-26 Thread Xin Long
sysctl net.sctp.ecn_enable is added in this patch. It will allow users to change the default sctp ecn flag, net.sctp.ecn_enable. This feature was also required on this thread: http://lkml.iu.edu/hypermail/linux/kernel/0812.1/01858.html Signed-off-by: Xin Long --- net/sctp/sysctl.c | 7 ++

[PATCH net-next 0/3] sctp: add SCTP_ECN_SUPPORTED sockopt

2019-08-26 Thread Xin Long
This patchset is to make ecn flag per netns and endpoint and then add SCTP_ECN_SUPPORTED sockopt, as does for other feature flags. Xin Long (3): sctp: make ecn flag per netns and endpoint sctp: allow users to set netns ecn flag with sysctl sctp: allow users to set ep ecn flag by sockopt in

[PATCH net-next 3/3] sctp: allow users to set ep ecn flag by sockopt

2019-08-26 Thread Xin Long
SCTP_ECN_SUPPORTED sockopt will be added to allow users to change ep ecn flag, and it's similar with other feature flags. Signed-off-by: Xin Long --- include/uapi/linux/sctp.h | 1 + net/sctp/socket.c | 73 +++ 2 files changed, 74 insertions(+

[PATCH net-next 1/3] sctp: make ecn flag per netns and endpoint

2019-08-26 Thread Xin Long
This patch is to add ecn flag for both netns_sctp and sctp_endpoint, net->sctp.ecn_enable is set 1 by default, and ep->ecn_enable will be initialized with net->sctp.ecn_enable. asoc->peer.ecn_capable will be set during negotiation only when ep->ecn_enable is set on both sides. Signed-off-by: Xin

Aw: [PATCH net-next v4 0/3] net: ethernet: mediatek: convert to PHYLINK

2019-08-26 Thread Frank Wunderlich
Tested on Bananapi-R2 (mt7623+mt7530) and Bananapi-R64 v0.1 (mt7622+rtl8367) Tested-by: Frank Wunderlich regards Frank

[PATCH net] net/rds: Fix info leak in rds6_inc_info_copy()

2019-08-26 Thread Ka-Cheong Poon
The rds6_inc_info_copy() function has a couple struct members which are leaking stack information. The ->tos field should hold actual information and the ->flags field needs to be zeroed out. Fixes: 3eb450367d08 ("rds: add type of service(tos) infrastructure") Fixes: b7ff8b1036f0 ("rds: Extend RD

[PATCH] samples: bpf: add max_pckt_size option at xdp_adjust_tail

2019-08-26 Thread Daniel T. Lee
Currently, at xdp_adjust_tail_kern.c, MAX_PCKT_SIZE is limited to 600. To make this size flexible, a new map 'pcktsz' is added. By updating new packet size to this map from the userland, xdp_adjust_tail_kern.o will use this value as a new max_pckt_size. If no '-P ' option is used, the size of max

Re: [PATCH 29/38] cls_flower: Convert handle_idr to XArray

2019-08-26 Thread Vlad Buslov
On Sun 25 Aug 2019 at 21:32, Cong Wang wrote: > On Wed, Aug 21, 2019 at 11:27 AM Vlad Buslov wrote: >> At first I was confused why you bring up rtnl lock in commit message >> (flower classifier has 'unlocked' flag set and can't rely on it anymore) >> but looking at the code I see that we lost r

Re: [PATCH net-next 0/3] sctp: add SCTP_ECN_SUPPORTED sockopt

2019-08-26 Thread Neil Horman
On Mon, Aug 26, 2019 at 04:30:01PM +0800, Xin Long wrote: > This patchset is to make ecn flag per netns and endpoint and then > add SCTP_ECN_SUPPORTED sockopt, as does for other feature flags. > > Xin Long (3): > sctp: make ecn flag per netns and endpoint > sctp: allow users to set netns ecn f

[PATCH net-next v4 4/6] net: dsa: mv88e6xxx: simplify SERDES code for Topaz and Peridot

2019-08-26 Thread Marek Behún
By adding an additional serdes_get_lane implementation (for Topaz), we can merge the implementations of other SERDES functions (powering and IRQs). We can skip checking port numbers, since the serdes_get_lane() methods inform if there is no lane on a port or if the lane cannot be used for given cmo

Re: [PATCH net-next v3 3/6] net: dsa: mv88e6xxx: create serdes_get_lane chip operation

2019-08-26 Thread Marek Behun
On Sun, 25 Aug 2019 12:12:14 -0400 Vivien Didelot wrote: > In fact you're also relying on -ENODEV, which is what you return here (and in > other places) instead of 0. So I'm afraid you have to address my comment > now... Vivien, you are right. I returned -ENODEV for Peridot when no lane was to

[PATCH net-next v4 3/6] net: dsa: mv88e6xxx: create serdes_get_lane chip operation

2019-08-26 Thread Marek Behún
Create a serdes_get_lane() method in the mv88e6xxx operations structure. Use it instead of calling the different implementations. Also change the methods so that their return value is used only for error. The lane number is put into a place referred to by a pointer given as argument. If the port do

[PATCH net-next v4 6/6] net: dsa: mv88e6xxx: fully support SERDES on Topaz family

2019-08-26 Thread Marek Behún
Currently we support SERDES on the Topaz family in a limited way: no IRQs and the cmode is not writable, thus the mode is determined by strapping pins. Marvell's examples though show how to make cmode writable on port 5 and support SGMII autonegotiation. It is done by writing hidden registers, for

[PATCH net-next v4 2/6] net: dsa: mv88e6xxx: update code operating on hidden registers

2019-08-26 Thread Marek Behún
This patch moves the functions operating on the hidden debug registers into it's own file, port_hidden.c. The functions prefix is renamed from mv88e6390_hidden_ to mv88e6xxx_port_hidden_, to be consistent with the rest of this driver. The macros are prefixed with MV88E6XXX_ prefix, and are changed

[PATCH net-next v4 1/6] net: dsa: mv88e6xxx: support 2500base-x in SGMII IRQ handler

2019-08-26 Thread Marek Behún
The mv88e6390_serdes_irq_link_sgmii IRQ handler reads the SERDES PHY status register to determine speed, among other things. If cmode of the port is set to 2500base-x, though, the PHY still reports 1000 Mbps (the PHY register itself does not differentiate between 1000 Mbps and 2500 Mbps - it thinks

[PATCH net-next v4 0/6] net: dsa: mv88e6xxx: Peridot/Topaz SERDES changes

2019-08-26 Thread Marek Behún
Hello, this is the fourth version of changes for the Topaz/Peridot family of switches. The patches apply on net-next. Changes since v3: - there was a mistake in the serdes_get_lane implementations for 6390 (patch 3/6). These methods returned -ENODEV if no lane was to be on port, but they sh

[PATCH net-next v4 5/6] net: dsa: mv88e6xxx: rename port cmode macro

2019-08-26 Thread Marek Behún
This is a cosmetic update. We are removing the last underscore from macros MV88E6XXX_PORT_STS_CMODE_100BASE_X and MV88E6XXX_PORT_STS_CMODE_1000BASE_X. The 2500base-x version does not have that underscore. Also PHY_INTERFACE_MODE_ macros do not have it there. Signed-off-by: Marek Behún Reviewed-by

RE: [PATCH net-next] dpaa2-eth: Add pause frame support

2019-08-26 Thread Ioana Ciocoi Radulescu
> -Original Message- > From: Andrew Lunn > Sent: Friday, August 23, 2019 7:31 PM > To: Ioana Ciocoi Radulescu > Cc: netdev@vger.kernel.org; da...@davemloft.net; Ioana Ciornei > > Subject: Re: [PATCH net-next] dpaa2-eth: Add pause frame support > > > --- a/drivers/net/ethernet/freescale/

[PATCH net-next v3 09/10] net: sched: copy tunnel info when setting flow_action entry->tunnel

2019-08-26 Thread Vlad Buslov
In order to remove dependency on rtnl lock, modify tc_setup_flow_action() to copy tunnel info, instead of just saving pointer to tunnel_key action tunnel info. This is necessary to prevent concurrent action overwrite from releasing tunnel info while it is being used by rtnl-unlocked driver. Implem

[PATCH net-next v3 03/10] net: sched: refactor block offloads counter usage

2019-08-26 Thread Vlad Buslov
Without rtnl lock protection filters can no longer safely manage block offloads counter themselves. Refactor cls API to protect block offloadcnt with tcf_block->cb_lock that is already used to protect driver callback list and nooffloaddevcnt counter. The counter can be modified by concurrent tasks

[PATCH net-next v3 00/10] Refactor cls hardware offload API to support rtnl-independent drivers

2019-08-26 Thread Vlad Buslov
Currently, all cls API hardware offloads driver callbacks require caller to hold rtnl lock when calling them. This patch set introduces new API that allows drivers to register callbacks that are not dependent on rtnl lock and unlocked classifiers to offload filters without obtaining rtnl lock first

[PATCH net-next v3 05/10] net: sched: add API for registering unlocked offload block callbacks

2019-08-26 Thread Vlad Buslov
Extend struct flow_block_offload with "unlocked_driver_cb" flag to allow registering and unregistering block hardware offload callbacks that do not require caller to hold rtnl lock. Extend tcf_block with additional lockeddevcnt counter that is incremented for each non-unlocked driver callback attac

[PATCH net-next v3 07/10] net: sched: take rtnl lock in tc_setup_flow_action()

2019-08-26 Thread Vlad Buslov
In order to allow using new flow_action infrastructure from unlocked classifiers, modify tc_setup_flow_action() to accept new 'rtnl_held' argument. Take rtnl lock before accessing tc_action data. This is necessary to protect from concurrent action replace. Signed-off-by: Vlad Buslov Acked-by: Jir

[PATCH net-next v3 01/10] net: sched: protect block offload-related fields with rw_semaphore

2019-08-26 Thread Vlad Buslov
In order to remove dependency on rtnl lock, extend tcf_block with 'cb_lock' rwsem and use it to protect flow_block->cb_list and related counters from concurrent modification. The lock is taken in read mode for read-only traversal of cb_list in tc_setup_cb_call() and write mode in all other cases. T

[PATCH net-next v3 04/10] net: sched: notify classifier on successful offload add/delete

2019-08-26 Thread Vlad Buslov
To remove dependency on rtnl lock, extend classifier ops with new ops->hw_add() and ops->hw_del() callbacks. Call them from cls API while holding cb_lock every time filter if successfully added to or deleted from hardware. Implement the new API in flower classifier. Use it to manage hw_filters lis

[PATCH net-next v3 10/10] net: sched: flower: don't take rtnl lock for cls hw offloads API

2019-08-26 Thread Vlad Buslov
Don't manually take rtnl lock in flower classifier before calling cls hardware offloads API. Instead, pass rtnl lock status via 'rtnl_held' parameter. Signed-off-by: Vlad Buslov Acked-by: Jiri Pirko --- net/sched/cls_flower.c | 53 +- 1 file changed, 16 i

[PATCH net-next v3 06/10] net: sched: conditionally obtain rtnl lock in cls hw offloads API

2019-08-26 Thread Vlad Buslov
In order to remove dependency on rtnl lock from offloads code of classifiers, take rtnl lock conditionally before executing driver callbacks. Only obtain rtnl lock if block is bound to devices that require it. Block bind/unbind code is rtnl-locked and obtains block->cb_lock while holding rtnl lock

[PATCH net-next v3 08/10] net: sched: take reference to action dev before calling offloads

2019-08-26 Thread Vlad Buslov
In order to remove dependency on rtnl lock when calling hardware offload API, take reference to action mirred dev when initializing flow_action structure in tc_setup_flow_action(). Implement function tc_cleanup_flow_action(), use it to release the device after hardware offload API is done using it.

[PATCH net-next v3 02/10] net: sched: change tcf block offload counter type to atomic_t

2019-08-26 Thread Vlad Buslov
As a preparation for running proto ops functions without rtnl lock, change offload counter type to atomic. This is necessary to allow updating the counter by multiple concurrent users when offloading filters to hardware from unlocked classifiers. Signed-off-by: Vlad Buslov Acked-by: Jiri Pirko -

BUG_ON in skb_segment, after bpf_skb_change_proto was applied

2019-08-26 Thread Shmulik Ladkani
Hi, In our production systems, running v4.19.y longterm kernels, we hit a BUG_ON in 'skb_segment()'. It occurs rarely and although tried, couldn't synthetically reproduce. In v4.19.41 it crashes at net/core/skbuff.c:3711 while (pos < offset + len) { if (i

Re: [PATCH net-next v4 0/6] net: dsa: mv88e6xxx: Peridot/Topaz SERDES changes

2019-08-26 Thread Vivien Didelot
Hi Marek, On Mon, 26 Aug 2019 14:21:03 +0200, Marek Behún wrote: > Hello, > > this is the fourth version of changes for the Topaz/Peridot family of > switches. The patches apply on net-next. > Changes since v3: > - there was a mistake in the serdes_get_lane implementations for >6390 (patch

Re: [PATCH net-next v4 1/6] net: dsa: mv88e6xxx: support 2500base-x in SGMII IRQ handler

2019-08-26 Thread Andrew Lunn
On Mon, Aug 26, 2019 at 02:21:04PM +0200, Marek Behún wrote: > The mv88e6390_serdes_irq_link_sgmii IRQ handler reads the SERDES PHY > status register to determine speed, among other things. If cmode of the > port is set to 2500base-x, though, the PHY still reports 1000 Mbps (the > PHY register itse

Re: [PATCH net-next v4 2/6] net: dsa: mv88e6xxx: update code operating on hidden registers

2019-08-26 Thread Andrew Lunn
On Mon, Aug 26, 2019 at 02:21:05PM +0200, Marek Behún wrote: > This patch moves the functions operating on the hidden debug registers > into it's own file, port_hidden.c. The functions prefix is renamed from > mv88e6390_hidden_ to mv88e6xxx_port_hidden_, to be consistent with the > rest of this dri

Re: [PATCH v2 net-next 2/2] net: dsa: tag_8021q: Restore bridge VLANs when enabling vlan_filtering

2019-08-26 Thread Vivien Didelot
Hi Vladimir, On Sun, 25 Aug 2019 21:44:54 +0300, Vladimir Oltean wrote: > - if (enabled) > - err = dsa_port_vid_add(upstream_dp, tx_vid, 0); > - else > - err = dsa_port_vid_del(upstream_dp, tx_vid); > + err = dsa_8021q_vid_apply(ds, upstream, tx_vid, 0, enabled

Re: [PATCH bpf-next v2 2/4] xsk: add proper barriers and {READ, WRITE}_ONCE-correctness for state

2019-08-26 Thread Ilya Maximets
On 26.08.2019 9:10, Björn Töpel wrote: > From: Björn Töpel > > The state variable was read, and written outside the control mutex > (struct xdp_sock, mutex), without proper barriers and {READ, > WRITE}_ONCE correctness. > > In this commit this issue is addressed, and the state member is now > us

Re: [PATCH net-next v4 3/6] net: dsa: mv88e6xxx: create serdes_get_lane chip operation

2019-08-26 Thread Andrew Lunn
> -int mv88e6390x_serdes_get_lane(struct mv88e6xxx_chip *chip, int port) > +int mv88e6390x_serdes_get_lane(struct mv88e6xxx_chip *chip, int port, s8 > *lane) > { > u8 cmode_port9, cmode_port10, cmode_port; > > @@ -323,76 +320,80 @@ int mv88e6390x_serdes_get_lane(struct mv88e6xxx_chip > *

Re: [PATCH net-next v4 4/6] net: dsa: mv88e6xxx: simplify SERDES code for Topaz and Peridot

2019-08-26 Thread Andrew Lunn
On Mon, Aug 26, 2019 at 02:21:07PM +0200, Marek Behún wrote: > By adding an additional serdes_get_lane implementation (for Topaz), we > can merge the implementations of other SERDES functions (powering and > IRQs). We can skip checking port numbers, since the serdes_get_lane() > methods inform if t

Re: [PATCH net-next v4 6/6] net: dsa: mv88e6xxx: fully support SERDES on Topaz family

2019-08-26 Thread Andrew Lunn
> +static int mv88e6xxx_port_set_cmode(struct mv88e6xxx_chip *chip, int port, > + phy_interface_t mode, bool allow_over_2500, > + bool make_cmode_writable) I don't like these two parameters. The caller of this function can do the chec

Re: [PATCH net-next v3 01/10] net: sched: protect block offload-related fields with rw_semaphore

2019-08-26 Thread Jiri Pirko
Mon, Aug 26, 2019 at 03:44:57PM CEST, vla...@mellanox.com wrote: >In order to remove dependency on rtnl lock, extend tcf_block with 'cb_lock' >rwsem and use it to protect flow_block->cb_list and related counters from >concurrent modification. The lock is taken in read mode for read-only >traversal

Re: [PATCH net-next v3 03/10] net: sched: refactor block offloads counter usage

2019-08-26 Thread Jiri Pirko
Mon, Aug 26, 2019 at 03:44:59PM CEST, vla...@mellanox.com wrote: >Without rtnl lock protection filters can no longer safely manage block >offloads counter themselves. Refactor cls API to protect block offloadcnt >with tcf_block->cb_lock that is already used to protect driver callback >list and noof

Re: [PATCH net-next v3 04/10] net: sched: notify classifier on successful offload add/delete

2019-08-26 Thread Jiri Pirko
Mon, Aug 26, 2019 at 03:45:00PM CEST, vla...@mellanox.com wrote: >To remove dependency on rtnl lock, extend classifier ops with new >ops->hw_add() and ops->hw_del() callbacks. Call them from cls API while >holding cb_lock every time filter if successfully added to or deleted from >hardware. > >Impl

Re: [PATCH] samples: bpf: add max_pckt_size option at xdp_adjust_tail

2019-08-26 Thread Maciej Fijalkowski
On Mon, 26 Aug 2019 18:57:22 +0900 "Daniel T. Lee" wrote: > Currently, at xdp_adjust_tail_kern.c, MAX_PCKT_SIZE is limited > to 600. To make this size flexible, a new map 'pcktsz' is added. > > By updating new packet size to this map from the userland, > xdp_adjust_tail_kern.o will use this valu

Re: [PATCH bpf] nfp: bpf: fix latency bug when updating stack index register

2019-08-26 Thread Jakub Kicinski
On Sun, Aug 25, 2019 at 10:37 PM Song Liu wrote: > On Fri, Aug 23, 2019 at 7:04 PM Jakub Kicinski wrote: > > From: Jiong Wang > > > > NFP is using Local Memory to model stack. LM_addr could be used as base of > > a 16 32-bit word region of Local Memory. Then, if the stack offset is > > beyond the

Re: [PATCH net-next v3 4/6] net: dsa: mv88e6xxx: simplify SERDES code for Topaz and Peridot

2019-08-26 Thread Vivien Didelot
Hi Marek, On Sun, 25 Aug 2019 18:36:09 +0200, Marek Behun wrote: > > Aren't you relying on -ENODEV as well? > > Vivien, I am not relying o -ENODEV. I changed the serdes_get_lane > semantics: > - previously: >- if port has a lane for current cmode, return given lane number >- otherwise r

Re: [patch net-next rfc 3/7] net: rtnetlink: add commands to add and delete alternative ifnames

2019-08-26 Thread Jiri Pirko
Tue, Aug 13, 2019 at 08:56:17AM CEST, j...@resnulli.us wrote: >Mon, Aug 12, 2019 at 06:01:59PM CEST, dsah...@gmail.com wrote: >>On 8/12/19 2:31 AM, Jiri Pirko wrote: >>> Mon, Aug 12, 2019 at 03:37:26AM CEST, dsah...@gmail.com wrote: On 8/11/19 7:34 PM, David Ahern wrote: > On 8/10/19 12:30

Re: [PATCH v2 net-next 2/2] net: dsa: tag_8021q: Restore bridge VLANs when enabling vlan_filtering

2019-08-26 Thread Vladimir Oltean
Hi Vivien, On Mon, 26 Aug 2019 at 18:20, Vivien Didelot wrote: > > Hi Vladimir, > > On Sun, 25 Aug 2019 21:44:54 +0300, Vladimir Oltean wrote: > > - if (enabled) > > - err = dsa_port_vid_add(upstream_dp, tx_vid, 0); > > - else > > - err = dsa_port_vid_del(upstream

Re: [PATCH bpf] nfp: bpf: fix latency bug when updating stack index register

2019-08-26 Thread Alexei Starovoitov
On Mon, Aug 26, 2019 at 8:57 AM Jakub Kicinski wrote: > > On Sun, Aug 25, 2019 at 10:37 PM Song Liu wrote: > > On Fri, Aug 23, 2019 at 7:04 PM Jakub Kicinski wrote: > > > From: Jiong Wang > > > > > > NFP is using Local Memory to model stack. LM_addr could be used as base of > > > a 16 32-bit wor

[PATCH net] tcp: remove empty skb from write queue in error cases

2019-08-26 Thread Eric Dumazet
Vladimir Rutsky reported stuck TCP sessions after memory pressure events. Edge Trigger epoll() user would never receive an EPOLLOUT notification allowing them to retry a sendmsg(). Jason tested the case of sk_stream_alloc_skb() returning NULL, but there are other paths that could lead both sendmsg

Re: [PATCH bpf] nfp: bpf: fix latency bug when updating stack index register

2019-08-26 Thread Daniel Borkmann
On 8/26/19 6:18 PM, Alexei Starovoitov wrote: On Mon, Aug 26, 2019 at 8:57 AM Jakub Kicinski wrote: On Sun, Aug 25, 2019 at 10:37 PM Song Liu wrote: On Fri, Aug 23, 2019 at 7:04 PM Jakub Kicinski wrote: From: Jiong Wang NFP is using Local Memory to model stack. LM_addr could be used as bas

[bpf-next, v2] samples: bpf: add max_pckt_size option at xdp_adjust_tail

2019-08-26 Thread Daniel T. Lee
Currently, at xdp_adjust_tail_kern.c, MAX_PCKT_SIZE is limited to 600. To make this size flexible, a new map 'pcktsz' is added. By updating new packet size to this map from the userland, xdp_adjust_tail_kern.o will use this value as a new max_pckt_size. If no '-P ' option is used, the size of max

Re: [PATCH] samples: bpf: add max_pckt_size option at xdp_adjust_tail

2019-08-26 Thread Daniel T. Lee
On Tue, Aug 27, 2019 at 12:54 AM Maciej Fijalkowski wrote: > > On Mon, 26 Aug 2019 18:57:22 +0900 > "Daniel T. Lee" wrote: > > > Currently, at xdp_adjust_tail_kern.c, MAX_PCKT_SIZE is limited > > to 600. To make this size flexible, a new map 'pcktsz' is added. > > > > By updating new packet size

Re: [PATCH bpf-next v2 2/4] xsk: add proper barriers and {READ, WRITE}_ONCE-correctness for state

2019-08-26 Thread Björn Töpel
On 2019-08-26 17:24, Ilya Maximets wrote: This changes the error code a bit. Previously: umem exists + xs unbound--> EINVAL no umem + xs unbound--> EBADF xs bound to different dev/q --> EINVAL With this change: umem exists + xs unbound--> EBADF no umem + x

Re: [PATCH bpf] nfp: bpf: fix latency bug when updating stack index register

2019-08-26 Thread Jakub Kicinski
On Mon, 26 Aug 2019 18:25:10 +0200, Daniel Borkmann wrote: > On 8/26/19 6:18 PM, Alexei Starovoitov wrote: > > On Mon, Aug 26, 2019 at 8:57 AM Jakub Kicinski > > wrote: > >> On Sun, Aug 25, 2019 at 10:37 PM Song Liu wrote: > >>> On Fri, Aug 23, 2019 at 7:04 PM Jakub Kicinski wrote: > F

Re: Unable to create htb tc classes more than 64K

2019-08-26 Thread Jesper Dangaard Brouer
On Sun, 18 Aug 2019 00:34:33 +0530 Akshat Kakkar wrote: > My goal is not just to make as many classes as possible, but also to > use them to do rate limiting per ip per server. Say, I have a list of > 1 IPs and more than 100 servers. So simply if I want few IPs to > get speed of says 1Mbps pe

Re: [PATCH net] tcp: remove empty skb from write queue in error cases

2019-08-26 Thread Soheil Hassas Yeganeh
On Mon, Aug 26, 2019 at 12:19 PM Eric Dumazet wrote: > > Vladimir Rutsky reported stuck TCP sessions after memory pressure > events. Edge Trigger epoll() user would never receive an EPOLLOUT > notification allowing them to retry a sendmsg(). > > Jason tested the case of sk_stream_alloc_skb() retur

Re: [patch net-next rfc 3/7] net: rtnetlink: add commands to add and delete alternative ifnames

2019-08-26 Thread Jakub Kicinski
On Mon, 26 Aug 2019 18:09:16 +0200, Jiri Pirko wrote: > DaveA, Roopa. Do you insist on doing add/remove of altnames in the > existing setlist command using embedded message op attrs? I'm asking > because after some time thinking about it, it still feels wrong to me :/ > > If this would be a generi

Re: [PATCH net] tcp: remove empty skb from write queue in error cases

2019-08-26 Thread Neal Cardwell
On Mon, Aug 26, 2019 at 12:19 PM Eric Dumazet wrote: > > Vladimir Rutsky reported stuck TCP sessions after memory pressure > events. Edge Trigger epoll() user would never receive an EPOLLOUT > notification allowing them to retry a sendmsg(). > > Jason tested the case of sk_stream_alloc_skb() retur

[PATCH v1 1/3] can: mcp251x: Use devm_clk_get_optional() to get the input clock

2019-08-26 Thread Andy Shevchenko
Simplify the code which fetches the input clock by using devm_clk_get_optional(). This comes with a small functional change: previously all errors were ignored when platform data is present. Now all errors are treated as errors. If no input clock is present devm_clk_get_optional() will return NULL

[PATCH v1 3/3] can: mcp251x: Call wrapper instead of regulator_disable()

2019-08-26 Thread Andy Shevchenko
There is no need to check for regulator presence in the ->suspend() since a wrapper does it for us. Due to this we may unconditionally set AFTER_SUSPEND_POWER flag. Signed-off-by: Andy Shevchenko --- drivers/net/can/spi/mcp251x.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff

[PATCH v1 2/3] can: mcp251x: Make use of device property API

2019-08-26 Thread Andy Shevchenko
Make use of device property API in this driver so that both OF based system and ACPI based system can use this driver. Signed-off-by: Andy Shevchenko --- drivers/net/can/spi/mcp251x.c | 12 +--- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/drivers/net/can/spi/mcp251x.c b

Re: [PATCH net-next v4 6/6] net: dsa: mv88e6xxx: fully support SERDES on Topaz family

2019-08-26 Thread Marek Behun
On Mon, 26 Aug 2019 17:38:30 +0200 Andrew Lunn wrote: > > +static int mv88e6xxx_port_set_cmode(struct mv88e6xxx_chip *chip, int port, > > + phy_interface_t mode, bool allow_over_2500, > > + bool make_cmode_writable) > > I don't like t

Re: [PATCH net-next v4 6/6] net: dsa: mv88e6xxx: fully support SERDES on Topaz family

2019-08-26 Thread Marek Behun
On Mon, 26 Aug 2019 17:38:30 +0200 Andrew Lunn wrote: > > +static int mv88e6xxx_port_set_cmode(struct mv88e6xxx_chip *chip, int port, > > + phy_interface_t mode, bool allow_over_2500, > > + bool make_cmode_writable) > > I don't like t

Re: [PATCH net-next v4 6/6] net: dsa: mv88e6xxx: fully support SERDES on Topaz family

2019-08-26 Thread Vivien Didelot
On Mon, 26 Aug 2019 19:27:17 +0200, Marek Behun wrote: > On Mon, 26 Aug 2019 17:38:30 +0200 > Andrew Lunn wrote: > > > > +static int mv88e6xxx_port_set_cmode(struct mv88e6xxx_chip *chip, int > > > port, > > > + phy_interface_t mode, bool allow_over_2500, > > > +

Re: [PATCH net-next v3 00/10] Refactor cls hardware offload API to support rtnl-independent drivers

2019-08-26 Thread Jakub Kicinski
On Mon, 26 Aug 2019 16:44:56 +0300, Vlad Buslov wrote: > Currently, all cls API hardware offloads driver callbacks require caller > to hold rtnl lock when calling them. This patch set introduces new API > that allows drivers to register callbacks that are not dependent on rtnl > lock and unlocked c

Re: BUG_ON in skb_segment, after bpf_skb_change_proto was applied

2019-08-26 Thread Eric Dumazet
On 8/26/19 4:07 PM, Shmulik Ladkani wrote: > Hi, > > In our production systems, running v4.19.y longterm kernels, we hit a > BUG_ON in 'skb_segment()'. It occurs rarely and although tried, couldn't > synthetically reproduce. > > In v4.19.41 it crashes at net/core/skbuff.c:3711 > >

Re: [PATCH net-next v4 6/6] net: dsa: mv88e6xxx: fully support SERDES on Topaz family

2019-08-26 Thread Vivien Didelot
On Mon, 26 Aug 2019 19:31:25 +0200, Marek Behun wrote: > On Mon, 26 Aug 2019 17:38:30 +0200 > Andrew Lunn wrote: > > > > +static int mv88e6xxx_port_set_cmode(struct mv88e6xxx_chip *chip, int > > > port, > > > + phy_interface_t mode, bool allow_over_2500, > > > +

Re: [PATCH net-next v4 6/6] net: dsa: mv88e6xxx: fully support SERDES on Topaz family

2019-08-26 Thread Marek Behun
On Mon, 26 Aug 2019 13:44:18 -0400 Vivien Didelot wrote: > > It can be done once at probe. At first I thought about doing this in > > setup_errata, but this is not an erratum. So shall I create a new > > method for this in chip operations structure? Something like > > port_additional_setup() ?

Re: [PATCH bpf-next v2 2/4] xsk: add proper barriers and {READ, WRITE}_ONCE-correctness for state

2019-08-26 Thread Jonathan Lemon
On 25 Aug 2019, at 23:10, Björn Töpel wrote: From: Björn Töpel The state variable was read, and written outside the control mutex (struct xdp_sock, mutex), without proper barriers and {READ, WRITE}_ONCE correctness. In this commit this issue is addressed, and the state member is now used a

Re: [PATCH bpf-next v2 2/4] xsk: add proper barriers and {READ, WRITE}_ONCE-correctness for state

2019-08-26 Thread Jonathan Lemon
On 26 Aug 2019, at 9:34, Björn Töpel wrote: > On 2019-08-26 17:24, Ilya Maximets wrote: >> This changes the error code a bit. >> Previously: >> umem exists + xs unbound--> EINVAL >> no umem + xs unbound--> EBADF >> xs bound to different dev/q --> EINVAL >> >> With this c

[PATCH RFC] net: dsa: mv88e6xxx: fully support SERDES on Topaz family

2019-08-26 Thread Marek Behún
Currently we support SERDES on the Topaz family in a limited way: no IRQs and the cmode is not writable, thus the mode is determined by strapping pins. Marvell's examples though show how to make cmode writable on port 5 and support SGMII autonegotiation. It is done by writing hidden registers, for

Re: [PATCH RFC] net: dsa: mv88e6xxx: fully support SERDES on Topaz family

2019-08-26 Thread Marek Behun
What about this? It adds a new chip operation (I know Vivien said not to, but I was doing it already) port_setup_extra, and implements it for Topaz. Also it changes the mv88e6xxx_port_set_cmode so that it does not use those 2 additional parameters. Should I rewrite it so that only the second cha

Re: [PATCH net-next v3 06/10] net: sched: conditionally obtain rtnl lock in cls hw offloads API

2019-08-26 Thread Jiri Pirko
Mon, Aug 26, 2019 at 03:45:02PM CEST, vla...@mellanox.com wrote: >In order to remove dependency on rtnl lock from offloads code of >classifiers, take rtnl lock conditionally before executing driver >callbacks. Only obtain rtnl lock if block is bound to devices that require >it. > >Block bind/unbind

Re: [PATCH RFC] net: dsa: mv88e6xxx: fully support SERDES on Topaz family

2019-08-26 Thread Vivien Didelot
On Mon, 26 Aug 2019 20:03:15 +0200, Marek Behun wrote: > What about this? > > It adds a new chip operation (I know Vivien said not to, but I was > doing it already) port_setup_extra, and implements it for Topaz. So what feedback do you expect exactly? That is *exactly* what I told you I did not

Re: [PATCH RFC] net: dsa: mv88e6xxx: fully support SERDES on Topaz family

2019-08-26 Thread Marek Behun
On Mon, 26 Aug 2019 14:28:09 -0400 Vivien Didelot wrote: > Ask yourself what is the single task achieved by this function, and name this > operation accordingly. It seems to change the CMODE to be writable, only > supported by certain switch models right? So in addition to port_get_cmode > and po

Re: [PATCH net 1/2] openvswitch: Properly set L4 keys on "later" IP fragments.

2019-08-26 Thread Justin Pettit
> On Aug 25, 2019, at 1:40 PM, Pravin Shelar wrote: > > Actually I am not sure about this change. caller of this function > (ovs_ct_execute()) does skb-pull and push of L2 header, calling > ovs_flow_key_update() is not safe here, it expect skb data to point to > L2 header. Thanks for the feedb

Re: [PATCH RFC] net: dsa: mv88e6xxx: fully support SERDES on Topaz family

2019-08-26 Thread Vivien Didelot
On Mon, 26 Aug 2019 20:36:14 +0200, Marek Behun wrote: > > Ask yourself what is the single task achieved by this function, and name > > this > > operation accordingly. It seems to change the CMODE to be writable, only > > supported by certain switch models right? So in addition to port_get_cmode

Re: [PATCH net] tcp: remove empty skb from write queue in error cases

2019-08-26 Thread Jason Baron
On 8/26/19 12:19 PM, Eric Dumazet wrote: > Vladimir Rutsky reported stuck TCP sessions after memory pressure > events. Edge Trigger epoll() user would never receive an EPOLLOUT > notification allowing them to retry a sendmsg(). > > Jason tested the case of sk_stream_alloc_skb() returning NULL,

Re: [PATCH net] tcp: remove empty skb from write queue in error cases

2019-08-26 Thread Eric Dumazet
On 8/26/19 9:56 PM, Jason Baron wrote: > > > On 8/26/19 12:19 PM, Eric Dumazet wrote: >> Vladimir Rutsky reported stuck TCP sessions after memory pressure >> events. Edge Trigger epoll() user would never receive an EPOLLOUT >> notification allowing them to retry a sendmsg(). >> >> Jason tested

Re: [net-next 4/8] net/mlx5e: Add device out of buffer counter

2019-08-26 Thread Saeed Mahameed
On Fri, 2019-08-23 at 11:16 -0700, Jakub Kicinski wrote: > On Fri, 23 Aug 2019 06:00:45 +, Saeed Mahameed wrote: > > On Thu, 2019-08-22 at 18:33 -0700, Jakub Kicinski wrote: > > > On Thu, 22 Aug 2019 23:35:52 +, Saeed Mahameed wrote: > > > > From: Moshe Shemesh > > > > > > > > Added the

Re: [net-next 4/8] net/mlx5e: Add device out of buffer counter

2019-08-26 Thread Jakub Kicinski
On Mon, 26 Aug 2019 20:14:47 +, Saeed Mahameed wrote: > > I see thanks for the explanation and sorry for the delayed response. > > Would it perhaps make sense to indicate the hairpin in the name? > > We had some internal discussion and we couldn't come up with the > perfect name :) > > hair

[PATCH V2 net 2/2] openvswitch: Clear the L4 portion of the key for "later" fragments.

2019-08-26 Thread Greg Rose
From: Justin Pettit Only the first fragment in a datagram contains the L4 headers. When the Open vSwitch module parses a packet, it always sets the IP protocol field in the key, but can only set the L4 fields on the first fragment. The original behavior would not clear the L4 portion of the key,

[PATCH V2 net 1/2] openvswitch: Properly set L4 keys on "later" IP fragments

2019-08-26 Thread Greg Rose
When IP fragments are reassembled before being sent to conntrack, the key from the last fragment is used. Unless there are reordering issues, the last fragment received will not contain the L4 ports, so the key for the reassembled datagram won't contain them. This patch updates the key once we ha

[PATCH net-next] r8169: improve DMA handling in rtl_rx

2019-08-26 Thread Heiner Kallweit
Move the call to dma_sync_single_for_cpu after calling napi_alloc_skb. This avoids calling dma_sync_single_for_cpu w/o handing control back to device if the memory allocation should fail. Signed-off-by: Heiner Kallweit --- drivers/net/ethernet/realtek/r8169_main.c | 7 +++ 1 file changed, 3

Re: [PATCH net-next v4 6/6] net: dsa: mv88e6xxx: fully support SERDES on Topaz family

2019-08-26 Thread David Miller
From: Andrew Lunn Date: Mon, 26 Aug 2019 17:38:30 +0200 >> +static int mv88e6xxx_port_set_cmode(struct mv88e6xxx_chip *chip, int port, >> +phy_interface_t mode, bool allow_over_2500, >> +bool make_cmode_writable) > > I don't like th

Re: [PATCH net-next v3 00/10] Refactor cls hardware offload API to support rtnl-independent drivers

2019-08-26 Thread David Miller
From: Vlad Buslov Date: Mon, 26 Aug 2019 16:44:56 +0300 > Implement following cls API changes: > > - Introduce new "unlocked_driver_cb" flag to struct flow_block_offload > to allow registering and unregistering block hardware offload > callbacks that do not require caller to hold rtnl lock.

[PATCH net-next v5 1/6] net: dsa: mv88e6xxx: support 2500base-x in SGMII IRQ handler

2019-08-26 Thread Marek Behún
The mv88e6390_serdes_irq_link_sgmii IRQ handler reads the SERDES PHY status register to determine speed, among other things. If cmode of the port is set to 2500base-x, though, the PHY still reports 1000 Mbps (the PHY register itself does not differentiate between 1000 Mbps and 2500 Mbps - it thinks

[PATCH net-next v5 6/6] net: dsa: mv88e6xxx: fully support SERDES on Topaz family

2019-08-26 Thread Marek Behún
Currently we support SERDES on the Topaz family in a limited way: no IRQs and the cmode is not writable, thus the mode is determined by strapping pins. Marvell's examples though show how to make cmode writable on port 5 and support SGMII autonegotiation. It is done by writing hidden registers, for

[PATCH net-next v5 5/6] net: dsa: mv88e6xxx: rename port cmode macro

2019-08-26 Thread Marek Behún
This is a cosmetic update. We are removing the last underscore from macros MV88E6XXX_PORT_STS_CMODE_100BASE_X and MV88E6XXX_PORT_STS_CMODE_1000BASE_X. The 2500base-x version does not have that underscore. Also PHY_INTERFACE_MODE_ macros do not have it there. Signed-off-by: Marek Behún Reviewed-by

[PATCH net-next v5 3/6] net: dsa: mv88e6xxx: create serdes_get_lane chip operation

2019-08-26 Thread Marek Behún
Create a serdes_get_lane() method in the mv88e6xxx operations structure. Use it instead of calling the different implementations. Also change the methods so that their return value is used only for error. The lane number is put into a place referred to by a pointer given as argument. If the port do

[PATCH net-next v5 4/6] net: dsa: mv88e6xxx: simplify SERDES code for Topaz and Peridot

2019-08-26 Thread Marek Behún
By adding an additional serdes_get_lane implementation (for Topaz), we can merge the implementations of other SERDES functions (powering and IRQs). We can skip checking port numbers, since the serdes_get_lane() methods inform if there is no lane on a port or if the lane cannot be used for given cmo

[PATCH net-next v5 2/6] net: dsa: mv88e6xxx: update code operating on hidden registers

2019-08-26 Thread Marek Behún
This patch moves the functions operating on the hidden debug registers into it's own file, port_hidden.c. The functions prefix is renamed from mv88e6390_hidden_ to mv88e6xxx_port_hidden_, to be consistent with the rest of this driver. The macros are prefixed with MV88E6XXX_ prefix, and are changed

[PATCH net-next v5 0/6] net: dsa: mv88e6xxx: Peridot/Topaz SERDES changes

2019-08-26 Thread Marek Behún
Hello, this is the fifth version of changes for the Topaz/Peridot family of switches. The patches apply on net-next. Changes since v4: - added Reviewed-by and Tested-by tags on first 2 patches, the others are changed are affected by changes in patch 3/6, so I did not add the tags, except fo

Re: TLS record double free

2019-08-26 Thread Jakub Kicinski
Thank you for the report. On Sun, 25 Aug 2019 22:21:50 +0530, Mallesham Jatharakonda wrote: > Hi All, > > Am facing one tls double while using the Nitrox(cavium) card and n5pf > driver over the TLS module. > > Please see the below details: > > TLS module is crashing While running SSL record enc

[PATCH v5 net-next 00/18] ionic: Add ionic driver

2019-08-26 Thread Shannon Nelson
This is a patch series that adds the ionic driver, supporting the Pensando ethernet device. In this initial patchset we implement basic transmit and receive. Later patchsets will add more advanced features. Our thanks to Saeed Mahameed, David Miller, Andrew Lunn, Michal Kubecek, Jacub Kicinski,

[PATCH v5 net-next 05/18] ionic: Add interrupts and doorbells

2019-08-26 Thread Shannon Nelson
The ionic interrupt model is based on interrupt control blocks accessed through the PCI BAR. Doorbell registers are used by the driver to signal to the NIC that requests are waiting on the message queues. Interrupts are used by the NIC to signal to the driver that answers are waiting on the compl

Re: [PATCH net-next] r8169: improve DMA handling in rtl_rx

2019-08-26 Thread David Miller
From: Heiner Kallweit Date: Mon, 26 Aug 2019 22:52:36 +0200 > Move the call to dma_sync_single_for_cpu after calling napi_alloc_skb. > This avoids calling dma_sync_single_for_cpu w/o handing control back > to device if the memory allocation should fail. > > Signed-off-by: Heiner Kallweit Appli

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

2019-08-26 Thread Shannon Nelson
Set up the infrastructure for managing Rx filters. We can't ask the hardware for what filters it has, so we keep a local list of filters that we've pushed into the HW. Signed-off-by: Shannon Nelson --- drivers/net/ethernet/pensando/ionic/Makefile | 2 +- .../net/ethernet/pensando/ionic/ionic

  1   2   >