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

2019-08-26 Thread Steffen Klassert
On Mon, Aug 26, 2019 at 04:25:05PM +0800, Xin Long wrote: > 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 d

Re: [Xen-devel] Question on xen-netfront code to fix a potential ring buffer corruption

2019-08-26 Thread Dongli Zhang
Hi Juergen, On 8/27/19 2:13 PM, Juergen Gross wrote: > On 18.08.19 10:31, Dongli Zhang wrote: >> Hi, >> >> Would you please help confirm why the condition at line 908 is ">="? >> >> In my opinion, we would only hit "skb_shinfo(skb)->nr_frag == MAX_SKB_FRAGS" >> at >> line 908. >> >> 890 static RI

Re: Question on xen-netfront code to fix a potential ring buffer corruption

2019-08-26 Thread Juergen Gross
On 18.08.19 10:31, Dongli Zhang wrote: Hi, Would you please help confirm why the condition at line 908 is ">="? In my opinion, we would only hit "skb_shinfo(skb)->nr_frag == MAX_SKB_FRAGS" at line 908. 890 static RING_IDX xennet_fill_frags(struct netfront_queue *queue, 891

Re: [RFC PATCH net-next] net: phy: force phy suspend when calling phy_stop

2019-08-26 Thread Heiner Kallweit
On 27.08.2019 04:47, Jian Shen wrote: > Some ethernet drivers may call phy_start() and phy_stop() from > ndo_open and ndo_close() respectively. > > When network cable is unconnected, and operate like below: > step 1: ifconfig ethX up -> ndo_open -> phy_start ->start > autoneg, and phy is no link.

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

2019-08-26 Thread Pravin Shelar
On Mon, Aug 26, 2019 at 1:46 PM Greg Rose wrote: > > 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 datagra

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

2019-08-26 Thread Michal Kubecek
On Mon, Aug 26, 2019 at 06:17:08PM -0600, David Ahern wrote: > > Something a bit stand alone would be a better choice - like all of the > VF stuff, stats, per-device type configuration. Yes, that ship has > sailed, but as I recall that is where the overhead is. We are not so far from the point wh

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

2019-08-26 Thread Michal Kubecek
On Mon, Aug 26, 2019 at 03:46:43PM -0600, David Ahern wrote: > On 8/26/19 10:55 AM, Jakub Kicinski wrote: > > 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?

Re: [PATCH v5 net-next 04/18] ionic: Add basic lif support

2019-08-26 Thread Jakub Kicinski
On Mon, 26 Aug 2019 14:33:25 -0700, Shannon Nelson wrote: > +static inline bool ionic_is_pf(struct ionic *ionic) > +{ > + return ionic->pdev && > +ionic->pdev->device == PCI_DEVICE_ID_PENSANDO_IONIC_ETH_PF; > +} > + > +static inline bool ionic_is_vf(struct ionic *ionic) > +{ > +

Re: [PATCH v5 net-next 03/18] ionic: Add port management commands

2019-08-26 Thread Jakub Kicinski
On Mon, 26 Aug 2019 14:33:24 -0700, Shannon Nelson wrote: > The port management commands apply to the physical port > associated with the PCI device, which might be shared among > several logical interfaces. > > Signed-off-by: Shannon Nelson > --- > drivers/net/ethernet/pensando/ionic/ionic.h

Re: [PATCH v5 net-next 02/18] ionic: Add hardware init and device commands

2019-08-26 Thread Jakub Kicinski
On Tue, 27 Aug 2019 04:26:28 +0200, Andrew Lunn wrote: > > +int ionic_identify(struct ionic *ionic) > > +{ > > + struct ionic_identity *ident = &ionic->ident; > > + struct ionic_dev *idev = &ionic->idev; > > + size_t sz; > > + int err; > > + > > + memset(ident, 0, sizeof(*ident)); > > + >

Re: [PATCH v5 net-next 02/18] ionic: Add hardware init and device commands

2019-08-26 Thread Jakub Kicinski
On Mon, 26 Aug 2019 14:33:23 -0700, Shannon Nelson wrote: > The ionic device has a small set of PCI registers, including a > device control and data space, and a large set of message > commands. > > Signed-off-by: Shannon Nelson > diff --git a/drivers/net/ethernet/pensando/ionic/Makefile > b/dr

Re: [PATCH v5 net-next 01/18] ionic: Add basic framework for IONIC Network device driver

2019-08-26 Thread Jakub Kicinski
On Mon, 26 Aug 2019 14:33:22 -0700, Shannon Nelson wrote: > +struct ionic { > + struct pci_dev *pdev; > + struct device *dev; > + struct devlink *dl; No need for the dl pointer here. priv_to_devlink can be used to obtain the devlink pointer based on priv structure address. > +};

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

2019-08-26 Thread Ka-Cheong Poon
On 8/25/19 5:20 AM, David Miller wrote: From: Ka-Cheong Poon Date: Wed, 21 Aug 2019 20:18:24 -0700 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. F

[RFC PATCH net-next] net: phy: force phy suspend when calling phy_stop

2019-08-26 Thread Jian Shen
Some ethernet drivers may call phy_start() and phy_stop() from ndo_open and ndo_close() respectively. When network cable is unconnected, and operate like below: step 1: ifconfig ethX up -> ndo_open -> phy_start ->start autoneg, and phy is no link. step 2: ifconfig ethX down -> ndo_close -> phy_sto

Re: [PATCH v5 net-next 14/18] ionic: Add Tx and Rx handling

2019-08-26 Thread Yunsheng Lin
On 2019/8/27 5:33, Shannon Nelson wrote: > Add both the Tx and Rx queue setup and handling. The related > stats display comes later. Instead of using the generic napi > routines used by the slow-path commands, the Tx and Rx paths > are simplified and inlined in one file in order to get better > c

Re: [PATCH v5 net-next 02/18] ionic: Add hardware init and device commands

2019-08-26 Thread Andrew Lunn
On Mon, Aug 26, 2019 at 02:33:23PM -0700, Shannon Nelson wrote: > +void ionic_debugfs_add_dev(struct ionic *ionic) > +{ > + struct dentry *dentry; > + > + dentry = debugfs_create_dir(ionic_bus_info(ionic), ionic_dir); > + if (IS_ERR_OR_NULL(dentry)) > + return; > + > + i

Re: [PATCH net-next] nfp: add AMDA0058 boards to firmware list

2019-08-26 Thread David Miller
From: Jakub Kicinski Date: Mon, 26 Aug 2019 15:30:41 -0700 > Add MODULE_FIRMWARE entries for AMDA0058 boards. > > Signed-off-by: Jakub Kicinski > Reviewed-by: Dirk van der Merwe Applied.

Re: RFC: very rough draft of a bpf permission model

2019-08-26 Thread Alexei Starovoitov
On Mon, Aug 26, 2019 at 05:05:58PM -0700, Andy Lutomirski wrote: > >> > >> The BPF verifier and interpreter, taken in isolation, may be extremely > >> safe, but attaching BPF programs to various hooks can easily take down > >> the system, deliberately or by accident. A handler, especially if it >

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

2019-08-26 Thread David Ahern
On 8/26/19 4:25 PM, David Miller wrote: > From: David Ahern > Date: Mon, 26 Aug 2019 16:24:38 -0600 > >> On 8/26/19 4:18 PM, David Miller wrote: >>> I honestly think that the size of link dumps are out of hand as-is. >> >> so you are suggesting new alternate names should not appear in kernel >> g

Re: RFC: very rough draft of a bpf permission model

2019-08-26 Thread Andy Lutomirski
> On Aug 26, 2019, at 3:36 PM, Alexei Starovoitov > wrote: > >> On Fri, Aug 23, 2019 at 04:09:11PM -0700, Andy Lutomirski wrote: >> On Thu, Aug 22, 2019 at 4:26 PM Alexei Starovoitov >> wrote: >>> You're proposing all of the above in addition to CAP_BPF, right? >>> Otherwise I don't see how it a

[PATCH net] net/sched: pfifo_fast: fix wrong dereference when qdisc is reset

2019-08-26 Thread Davide Caratti
Now that 'TCQ_F_CPUSTATS' bit can be cleared, depending on the value of 'TCQ_F_NOLOCK' bit in the parent qdisc, we need to be sure that per-cpu counters are present when 'reset()' is called for pfifo_fast qdiscs. Otherwise, the following script: # tc q a dev lo handle 1: root htb default 100 # t

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

2019-08-26 Thread Saeed Mahameed
On Mon, 2019-08-26 at 13:39 -0700, Jakub Kicinski wrote: > 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 i

Re: [PATCH bpf-next 3/4] selftests/bpf: verifier precise tests

2019-08-26 Thread Song Liu
> On Aug 26, 2019, at 3:47 PM, Alexei Starovoitov > wrote: > > On Sun, Aug 25, 2019 at 10:22:13PM -0700, Song Liu wrote: >> On Fri, Aug 23, 2019 at 2:59 AM Alexei Starovoitov wrote: >>> >>> Use BPF_F_TEST_STATE_FREQ flag to check that precision >>> tracking works as expected by comparing ev

Re: [PATCH bpf-next 3/4] selftests/bpf: verifier precise tests

2019-08-26 Thread Alexei Starovoitov
On Sun, Aug 25, 2019 at 10:22:13PM -0700, Song Liu wrote: > On Fri, Aug 23, 2019 at 2:59 AM Alexei Starovoitov wrote: > > > > Use BPF_F_TEST_STATE_FREQ flag to check that precision > > tracking works as expected by comparing every step it takes. > > > > Signed-off-by: Alexei Starovoitov > > > > +

Re: [PATCH bpf-next] selftests/bpf: remove wrong nhoff in flow dissector test

2019-08-26 Thread Song Liu
On Mon, Aug 26, 2019 at 3:28 PM Stanislav Fomichev wrote: > > .nhoff = 0 is (correctly) reset to ETH_HLEN on the next line so let's > drop it. > > Signed-off-by: Stanislav Fomichev Acked-by: Song Liu > --- > tools/testing/selftests/bpf/prog_tests/flow_dissector.c | 1 - > 1 file changed, 1 de

Re: RFC: very rough draft of a bpf permission model

2019-08-26 Thread Alexei Starovoitov
On Fri, Aug 23, 2019 at 04:09:11PM -0700, Andy Lutomirski wrote: > On Thu, Aug 22, 2019 at 4:26 PM Alexei Starovoitov > wrote: > > You're proposing all of the above in addition to CAP_BPF, right? > > Otherwise I don't see how it addresses the use cases I kept > > explaining for the last few weeks.

[PATCH net-next] nfp: add AMDA0058 boards to firmware list

2019-08-26 Thread Jakub Kicinski
Add MODULE_FIRMWARE entries for AMDA0058 boards. Signed-off-by: Jakub Kicinski Reviewed-by: Dirk van der Merwe --- drivers/net/ethernet/netronome/nfp/nfp_main.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/ethernet/netronome/nfp/nfp_main.c b/drivers/net/ethernet/netronome/

[PATCH bpf-next] selftests/bpf: remove wrong nhoff in flow dissector test

2019-08-26 Thread Stanislav Fomichev
.nhoff = 0 is (correctly) reset to ETH_HLEN on the next line so let's drop it. Signed-off-by: Stanislav Fomichev --- tools/testing/selftests/bpf/prog_tests/flow_dissector.c | 1 - 1 file changed, 1 deletion(-) diff --git a/tools/testing/selftests/bpf/prog_tests/flow_dissector.c b/tools/testing

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

2019-08-26 Thread David Miller
From: David Ahern Date: Mon, 26 Aug 2019 16:24:38 -0600 > On 8/26/19 4:18 PM, David Miller wrote: >> I honestly think that the size of link dumps are out of hand as-is. > > so you are suggesting new alternate names should not appear in kernel > generated RTM_NEWLINK messages - be it a link dump

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

2019-08-26 Thread David Ahern
On 8/26/19 4:18 PM, David Miller wrote: > I honestly think that the size of link dumps are out of hand as-is. so you are suggesting new alternate names should not appear in kernel generated RTM_NEWLINK messages - be it a link dump or a notification on a change?

[PATCH] rtl_nic: add firmware rtl8125a-3

2019-08-26 Thread Heiner Kallweit
This adds firmware rtl8125a-3 for Realtek's 2.5Gbps chip RTL8125. Signed-off-by: Heiner Kallweit --- Firmware file was provided by Realtek and they asked me to submit it. The related extension to r8169 driver will be submitted in the next days. --- WHENCE| 3 +++ rtl_nic/rtl812

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

2019-08-26 Thread David Miller
From: Jakub Kicinski Date: Mon, 26 Aug 2019 15:15:52 -0700 > Weren't there multiple problems with the size of the RTM_NEWLINK > notification already? Adding multiple sizeable strings to it won't > help there either :S Indeed. We even had situations where we had to make the information provided

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

2019-08-26 Thread Vivien Didelot
Hi Marek, On Mon, 26 Aug 2019 23:31:52 +0200, Marek Behún wrote: > @@ -635,10 +660,10 @@ static irqreturn_t mv88e6390_serdes_thread_fn(int irq, > void *dev_id) > irqreturn_t ret = IRQ_NONE; > u8 cmode = port->cmode; > u16 status; > - int lane; > int err; > + u8 la

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 15:46:43 -0600, David Ahern wrote: > On 8/26/19 10:55 AM, Jakub Kicinski wrote: > > 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

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

2019-08-26 Thread Vivien Didelot
Hi Marek, On Mon, 26 Aug 2019 23:31:55 +0200, Marek Behún wrote: > 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 a

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

2019-08-26 Thread David Ahern
On 8/26/19 10:55 AM, Jakub Kicinski wrote: > 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 fee

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

2019-08-26 Thread Daniel Borkmann
On 8/24/19 4:00 AM, 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 current region, the local index needs to be updated. The update needs at least t

[PATCH v5 net-next 15/18] ionic: Add netdev-event handling

2019-08-26 Thread Shannon Nelson
When the netdev gets a new name from userland, pass that name down to the NIC for internal tracking. Signed-off-by: Shannon Nelson --- drivers/net/ethernet/pensando/ionic/ionic.h | 2 + .../net/ethernet/pensando/ionic/ionic_lif.c | 62 +++ 2 files changed, 64 insertions(+)

[PATCH v5 net-next 06/18] ionic: Add basic adminq support

2019-08-26 Thread Shannon Nelson
Most of the NIC configuration happens through the AdminQ message queue. NAPI is used for basic interrupt handling and message queue management. These routines are set up to be shared among different types of queues when used in slow-path handling. Signed-off-by: Shannon Nelson --- drivers/net/

[PATCH v5 net-next 13/18] ionic: Add initial ethtool support

2019-08-26 Thread Shannon Nelson
Add in the basic ethtool callbacks for device information and control. Signed-off-by: Shannon Nelson --- drivers/net/ethernet/pensando/ionic/Makefile | 2 +- .../net/ethernet/pensando/ionic/ionic_dev.h | 7 + .../ethernet/pensando/ionic/ionic_ethtool.c | 498 ++ .../ethe

[PATCH v5 net-next 04/18] ionic: Add basic lif support

2019-08-26 Thread Shannon Nelson
The LIF is the Logical Interface, which represents the external connections. The NIC can multiplex many LIFs to a single port, but in most setups, LIF0 is the primary control for the port. Signed-off-by: Shannon Nelson --- drivers/net/ethernet/pensando/ionic/Makefile | 2 +- drivers/net/ethe

[PATCH v5 net-next 08/18] ionic: Add notifyq support

2019-08-26 Thread Shannon Nelson
The AdminQ is fine for sending messages and requests to the NIC, but we also need to have events published from the NIC to the driver. The NotifyQ handles this for us, using the same interrupt as AdminQ. Signed-off-by: Shannon Nelson --- .../ethernet/pensando/ionic/ionic_debugfs.c | 16 ++ .

[PATCH v5 net-next 03/18] ionic: Add port management commands

2019-08-26 Thread Shannon Nelson
The port management commands apply to the physical port associated with the PCI device, which might be shared among several logical interfaces. Signed-off-by: Shannon Nelson --- drivers/net/ethernet/pensando/ionic/ionic.h | 4 + .../ethernet/pensando/ionic/ionic_bus_pci.c | 16 +++ .../ne

[PATCH v5 net-next 02/18] ionic: Add hardware init and device commands

2019-08-26 Thread Shannon Nelson
The ionic device has a small set of PCI registers, including a device control and data space, and a large set of message commands. Signed-off-by: Shannon Nelson --- drivers/net/ethernet/pensando/ionic/Makefile |3 +- drivers/net/ethernet/pensando/ionic/ionic.h | 21 + .../net/ethernet/p

[PATCH v5 net-next 18/18] ionic: Add coalesce and other features

2019-08-26 Thread Shannon Nelson
Interrupt coalescing, tunable copybreak value, and tx timeout. Signed-off-by: Shannon Nelson --- .../net/ethernet/pensando/ionic/ionic_dev.h | 1 + .../ethernet/pensando/ionic/ionic_ethtool.c | 108 ++ .../net/ethernet/pensando/ionic/ionic_lif.c | 28 - .../net/ether

[PATCH v5 net-next 14/18] ionic: Add Tx and Rx handling

2019-08-26 Thread Shannon Nelson
Add both the Tx and Rx queue setup and handling. The related stats display comes later. Instead of using the generic napi routines used by the slow-path commands, the Tx and Rx paths are simplified and inlined in one file in order to get better compiler optimizations. Signed-off-by: Shannon Nels

[PATCH v5 net-next 11/18] ionic: Add Rx filter and rx_mode ndo support

2019-08-26 Thread Shannon Nelson
Add the Rx filtering and rx_mode NDO callbacks. Also add the deferred work thread handling needed to manage the filter requests outside of the netif_addr_lock spinlock. Signed-off-by: Shannon Nelson --- .../net/ethernet/pensando/ionic/ionic_lif.c | 391 +- .../net/ethernet/pen

[PATCH v5 net-next 12/18] ionic: Add async link status check and basic stats

2019-08-26 Thread Shannon Nelson
Add code to handle the link status event, and wire up the basic netdev hardware stats. Signed-off-by: Shannon Nelson --- .../net/ethernet/pensando/ionic/ionic_lif.c | 116 +- .../net/ethernet/pensando/ionic/ionic_lif.h | 1 + 2 files changed, 111 insertions(+), 6 deletions(

[PATCH v5 net-next 09/18] ionic: Add the basic NDO callbacks for netdev support

2019-08-26 Thread Shannon Nelson
Set up the initial NDO structure and callbacks for netdev to use, and register the netdev. This will allow us to do a few basic operations on the device, but no traffic yet. Signed-off-by: Shannon Nelson --- drivers/net/ethernet/pensando/ionic/ionic.h | 1 + .../ethernet/pensando/ionic/ioni

[PATCH v5 net-next 17/18] ionic: Add RSS support

2019-08-26 Thread Shannon Nelson
Add code to manipulate through ethtool the RSS configuration used by the NIC. Signed-off-by: Shannon Nelson --- .../ethernet/pensando/ionic/ionic_ethtool.c | 73 .../net/ethernet/pensando/ionic/ionic_lif.c | 84 +++ .../net/ethernet/pensando/ionic/ionic_lif.h

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

2019-08-26 Thread Shannon Nelson
Add in the detailed statistics for ethtool -S that the driver keeps as it processes packets. Display of the additional debug statistics can be enabled through the ethtool priv-flags feature. Signed-off-by: Shannon Nelson --- drivers/net/ethernet/pensando/ionic/Makefile | 2 +- .../ethernet/p

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

[PATCH v5 net-next 07/18] ionic: Add adminq action

2019-08-26 Thread Shannon Nelson
Add AdminQ specific message requests and completion handling. Signed-off-by: Shannon Nelson --- drivers/net/ethernet/pensando/ionic/ionic.h | 7 ++ .../net/ethernet/pensando/ionic/ionic_main.c | 111 ++ 2 files changed, 118 insertions(+) diff --git a/drivers/net/ethernet/pe

[PATCH v5 net-next 01/18] ionic: Add basic framework for IONIC Network device driver

2019-08-26 Thread Shannon Nelson
This patch adds a basic driver framework for the Pensando IONIC network device. There is no functionality right now other than the ability to load and unload. Signed-off-by: Shannon Nelson --- .../networking/device_drivers/index.rst | 1 + .../device_drivers/pensando/ionic.rst |

[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

[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,

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 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

[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 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 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 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 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.

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

[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

[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

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

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: [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: [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 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 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 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 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 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 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

[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 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

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 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 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: 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 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: [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 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

[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

[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 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

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

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 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: 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 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: [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] 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

  1   2   >