Re: [patch net-next v6 5/5] selftests: virtio_net: add initial tests

2024-04-24 Thread Benjamin Poirier
un this, do: > $ make -C tools/testing/selftests/ TARGETS=drivers/net/virtio_net/ run_tests > > Run it on a system with 2 virtio_net devices connected back-to-back > on the hypervisor. > > Signed-off-by: Jiri Pirko > Reviewed-by: Petr Machata > --- Tested-by: Benjamin Poirier

Re: [patch net-next v6 4/5] selftests: forwarding: add wait_for_dev() helper

2024-04-24 Thread Benjamin Poirier
; > Signed-off-by: Jiri Pirko > Reviewed-by: Petr Machata > --- Reviewed-by: Benjamin Poirier

Re: [patch net-next v6 3/5] selftests: forwarding: add check_driver() helper

2024-04-24 Thread Benjamin Poirier
On 2024-04-24 12:40 +0200, Jiri Pirko wrote: > From: Jiri Pirko > > Add a helper to be used to check if the netdevice is backed by specified > driver. > > Signed-off-by: Jiri Pirko > --- Reviewed-by: Benjamin Poirier

Re: [patch net-next v6 2/5] selftests: forwarding: add ability to assemble NETIFS array by driver name

2024-04-24 Thread Benjamin Poirier
NETIF_FIND_DRIVER variable. > > Note that user overrides this either by passing netdevice names on the > command line or by declaring NETIFS array in custom forwarding.config > configuration file. > > Signed-off-by: Jiri Pirko > Reviewed-by: Petr Machata > --- Reviewed-by: Benjamin Poirier

Re: [patch net-next v5 3/5] selftests: forwarding: add check_driver() helper

2024-04-22 Thread Benjamin Poirier
On 2024-04-22 17:32 +0200, Jiri Pirko wrote: > From: Jiri Pirko > > Add a helper to be used to check if the netdevice is backed by specified > driver. > > Signed-off-by: Jiri Pirko > Reviewed-by: Petr Machata > --- > tools/testing/selftests/net/forwarding/lib.sh | 15 +++ > 1 file

Re: [patch net-next v4 2/6] selftests: forwarding: move initial root check to the beginning

2024-04-18 Thread Benjamin Poirier
On 2024-04-18 18:08 +0200, Jiri Pirko wrote: > From: Jiri Pirko > > This check can be done at the very beginning of the script. > As the follow up patch needs to add early code that needs to be executed > after the check, move it. > > Signed-off-by: Jiri Pirko > --- > v3->v4: > - removed NUM_NE

Re: [patch net-next v3 2/6] selftests: forwarding: move couple of initial check to the beginning

2024-04-17 Thread Benjamin Poirier
On 2024-04-17 18:45 +0200, Jiri Pirko wrote: > From: Jiri Pirko > > These two check can be done at he very beginning of the script. > As the follow up patch needs to add early code that needs to be executed > after the checks, move them. > > Signed-off-by: Jiri Pirko > --- > tools/testing/self

Re: [patch net-next v2 5/6] selftests: forwarding: add wait_for_dev() helper

2024-04-15 Thread Benjamin Poirier
On 2024-04-15 18:25 +0200, Jiri Pirko wrote: > From: Jiri Pirko > > The existing setup_wait*() helper family check the status of the > interface to be up. Introduce wait_for_dev() to wait for the netdevice > to appear, for example after test script does manual device bind. > > Signed-off-by: Jir

Re: [patch net-next 3/6] selftests: forwarding: add ability to assemble NETIFS array by driver name

2024-04-14 Thread Benjamin Poirier
On 2024-04-13 15:27 +0200, Jiri Pirko wrote: > Fri, Apr 12, 2024 at 10:38:30PM CEST, benjamin.poir...@gmail.com wrote: > >On 2024-04-12 17:13 +0200, Jiri Pirko wrote: > >> From: Jiri Pirko > >> > >> Allow driver tests to work without specifying the netdevice names. > >> Introduce a possibility to

Re: [patch net-next 6/6] selftests: virtio_net: add initial tests

2024-04-12 Thread Benjamin Poirier
On 2024-04-12 17:13 +0200, Jiri Pirko wrote: > From: Jiri Pirko > > Introduce initial tests for virtio_net driver. Focus on feature testing > leveraging previously introduced debugfs feature filtering > infrastructure. Add very basic ping and F_MAC feature tests. > > To run this, do: > $ make -C

Re: [patch net-next 5/6] selftests: forwarding: add wait_for_dev() helper

2024-04-12 Thread Benjamin Poirier
On 2024-04-12 17:13 +0200, Jiri Pirko wrote: > From: Jiri Pirko > > The existing setup_wait*() helper family check the status of the > interface to be up. Introduce wait_for_dev() to wait for the netdevice > to appear, for example after test script does manual device bind. > > Signed-off-by: Jir

Re: [patch net-next 3/6] selftests: forwarding: add ability to assemble NETIFS array by driver name

2024-04-12 Thread Benjamin Poirier
On 2024-04-12 17:13 +0200, Jiri Pirko wrote: > From: Jiri Pirko > > Allow driver tests to work without specifying the netdevice names. > Introduce a possibility to search for available netdevices according to > set driver name. Allow test to specify the name by setting > NETIF_FIND_DRIVER variabl

Re: [PATCH 127/141] staging: qlge: Fix fall-through warnings for Clang

2020-11-24 Thread Benjamin Poirier
On 2020-11-20 12:39 -0600, Gustavo A. R. Silva wrote: > In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning > by explicitly adding a break statement instead of letting the code fall > through to the next case. > > Link: https://github.com/KSPP/linux/issues/115 > Signed-off-by:

Re: [PATCH v2 1/7] staging: qlge: replace ql_* with qlge_* to avoid namespace clashes with other qlogic drivers

2020-10-18 Thread Benjamin Poirier
On 2020-10-17 07:16 +0800, Coiby Xu wrote: > On Thu, Oct 15, 2020 at 10:01:36AM +0900, Benjamin Poirier wrote: > > On 2020-10-14 18:43 +0800, Coiby Xu wrote: > > > To avoid namespace clashes with other qlogic drivers and also for the > > > sake of naming consistency

Re: [PATCH v1 1/6] staging: qlge: Initialize devlink health dump framework for the dlge driver

2020-10-15 Thread Benjamin Poirier
On 2020-10-15 11:37 +0800, Coiby Xu wrote: > On Tue, Oct 13, 2020 at 09:37:04AM +0900, Benjamin Poirier wrote: > > On 2020-10-12 19:24 +0800, Coiby Xu wrote: > > [...] > > > > I think, but didn't check in depth, that in those drivers, the devlink > > > &

Re: [PATCH v2 1/7] staging: qlge: replace ql_* with qlge_* to avoid namespace clashes with other qlogic drivers

2020-10-14 Thread Benjamin Poirier
On 2020-10-14 18:43 +0800, Coiby Xu wrote: > To avoid namespace clashes with other qlogic drivers and also for the > sake of naming consistency, use the "qlge_" prefix as suggested in > drivers/staging/qlge/TODO. > > Suggested-by: Benjamin Poirier > Signed-off-by

Re: [PATCH v1 2/6] staging: qlge: coredump via devlink health reporter

2020-10-12 Thread Benjamin Poirier
On 2020-10-12 19:51 +0800, Coiby Xu wrote: > On Sat, Oct 10, 2020 at 10:22:30PM +0900, Benjamin Poirier wrote: > > On 2020-10-10 18:02 +0800, Coiby Xu wrote: > > [...] > > > > > + do { \ > > >

Re: [PATCH v1 1/6] staging: qlge: Initialize devlink health dump framework for the dlge driver

2020-10-12 Thread Benjamin Poirier
On 2020-10-12 19:24 +0800, Coiby Xu wrote: [...] > > I think, but didn't check in depth, that in those drivers, the devlink > > device is tied to the pci device and can exist independently of the > > netdev, at least in principle. > > > You are right. Take drivers/net/ethernet/mellanox/mlxsw as an

Re: [PATCH v1 2/6] staging: qlge: coredump via devlink health reporter

2020-10-10 Thread Benjamin Poirier
On 2020-10-10 18:02 +0800, Coiby Xu wrote: [...] > > > + do { \ > > > + err = fill_seg_(fmsg, &dump->seg_hdr, dump->seg_regs); \ > > > + if (err) { \ > > > + kvfree(

Re: [PATCH v1 5/6] staging: qlge: clean up debugging code in the QL_ALL_DUMP ifdef land

2020-10-10 Thread Benjamin Poirier
On 2020-10-10 18:00 +0800, Coiby Xu wrote: [...] > > > > Please also update drivers/staging/qlge/TODO accordingly. There is still > > a lot of debugging code IMO (the netif_printk statements - kernel > > tracing can be used instead of those) but this patch is a substantial > > improvement. > > Th

Re: [PATCH v1 1/6] staging: qlge: Initialize devlink health dump framework for the dlge driver

2020-10-10 Thread Benjamin Poirier
On 2020-10-10 18:24 +0800, Coiby Xu wrote: > On Sat, Oct 10, 2020 at 04:35:14PM +0900, Benjamin Poirier wrote: > > On 2020-10-08 19:58 +0800, Coiby Xu wrote: > > > Initialize devlink health dump framework for the dlge driver so the > > > coredump could be done via devli

Re: [PATCH v1 5/6] staging: qlge: clean up debugging code in the QL_ALL_DUMP ifdef land

2020-10-10 Thread Benjamin Poirier
ers can be obtained by ethtool. > - Coredump can be done via devlink health reporter. > - Structure related to the hardware (struct ql_adapter) can be obtained > by crash or drgn. > > Suggested-by: Benjamin Poirier > Signed-off-by: Coiby Xu > --- > drivers/staging/

Re: [PATCH v1 2/6] staging: qlge: coredump via devlink health reporter

2020-10-10 Thread Benjamin Poirier
On 2020-10-08 19:58 +0800, Coiby Xu wrote: > $ devlink health dump show DEVICE reporter coredump -p -j > { > "Core Registers": { > "segment": 1, > "values": [ > 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0

Re: [PATCH v1 1/6] staging: qlge: Initialize devlink health dump framework for the dlge driver

2020-10-10 Thread Benjamin Poirier
On 2020-10-08 19:58 +0800, Coiby Xu wrote: > Initialize devlink health dump framework for the dlge driver so the > coredump could be done via devlink. > > Signed-off-by: Coiby Xu > --- > drivers/staging/qlge/Kconfig| 1 + > drivers/staging/qlge/Makefile | 2 +- > drivers/staging/

Re: [PATCH v4] staging: qlge: fix build breakage with dumping enabled

2020-10-04 Thread Benjamin Poirier
On 2020-10-04 23:22 +0800, Coiby Xu wrote: > On Sat, Oct 03, 2020 at 02:53:48PM +0900, Benjamin Poirier wrote: > > On 2020-10-03 07:59 +0800, Coiby Xu wrote: > > > This fixes commit 0107635e15ac > > > ("staging: qlge: replace pr_err with netdev_err") which

Re: [PATCH v4] staging: qlge: fix build breakage with dumping enabled

2020-10-02 Thread Benjamin Poirier
unsigned int > > Note that now ql_dump_rx_ring/ql_dump_tx_ring won't check if the passed > parameter is a null pointer. > > Fixes: 0107635e15ac ("staging: qlge: replace pr_err with netdev_err") > Reported-by: Benjamin Poirier > Suggested-by: Benjamin Poirier > Signed-off-by: Coiby Xu > --- Reviewed-by: Benjamin Poirier

Re: [PATCH v3] staging: qlge: fix build breakage with dumping enabled

2020-09-02 Thread Benjamin Poirier
:37: warning: format ‘%x’ expects a matching ‘unsigned int’ > argument [-Wformat=] > 1435 |"%s: Routing Mask %d = 0x%.08x\n", > | ^ > | | > |

Re: [PATCH v2] staging: qlge: fix build breakage with dumping enabled

2020-08-26 Thread Benjamin Poirier
:37: warning: format ‘%x’ expects a matching ‘unsigned int’ > argument [-Wformat=] > 1435 |"%s: Routing Mask %d = 0x%.08x\n", > | ^ > | | > |

Re: [PATCH] staging: qlge: fix build breakage with dumping enabled

2020-08-25 Thread Benjamin Poirier
On 2020-08-25 19:16 +0800, Coiby Xu wrote: [...] > > > @@ -1630,7 +1630,7 @@ void ql_dump_wqicb(struct wqicb *wqicb) > > > (unsigned long long)le64_to_cpu(wqicb->cnsmr_idx_addr)); > > > } > > > > > > -void ql_dump_tx_ring(struct tx_ring *tx_ring) > > > +void ql_dump_tx_ring(struct ql

Re: [PATCH] staging: qlge: fix build breakage with dumping enabled

2020-08-21 Thread Benjamin Poirier
QL_IB_DUMP=1 QL_DEV_DUMP=1 make M=drivers/staging/qlge > > Fixes: 0107635e15ac ("taging: qlge: replace pr_err with netdev_err") ^ staging > Reported-by: Benjamin Poirier > Signed-off-by: Coiby Xu > --- > drivers/staging/qlge/qlge.h | 42

Re: [RFC 1/3] Initialize devlink health dump framework for the dlge driver

2020-08-20 Thread Benjamin Poirier
On 2020-08-21 11:08 +0800, Coiby Xu wrote: [...] > > > diff --git a/drivers/staging/qlge/qlge_health.h > > > b/drivers/staging/qlge/qlge_health.h > > > new file mode 100644 > > > index ..07d3bafab845 > > > --- /dev/null > > > +++ b/drivers/staging/qlge/qlge_health.h > > > @@ -0,0 +1,2

Re: [RFC 3/3] staging: qlge: clean up code that dump info to dmesg

2020-08-15 Thread Benjamin Poirier
On 2020-08-15 00:06 +0800, Coiby Xu wrote: > The related code are not necessary because, > - Device status and general registers can be obtained by ethtool. > - Coredump can be done via devlink health reporter. > - Structure related to the hardware (struct ql_adapter) can be obtained > by crash o

Re: [RFC 1/3] Initialize devlink health dump framework for the dlge driver

2020-08-15 Thread Benjamin Poirier
On 2020-08-15 00:05 +0800, Coiby Xu wrote: > Initialize devlink health dump framework for the dlge driver so the > coredump could be done via devlink. > > Signed-off-by: Coiby Xu > --- > drivers/staging/qlge/Makefile | 2 +- > drivers/staging/qlge/qlge.h| 9 +++ > drivers/stag

Re: [PATCH 4/6] staging: qlge: qlge_main: Simplify while statements.

2020-07-13 Thread Benjamin Poirier
On 2020-07-13 17:50 +0530, Suraj Upadhyay wrote: > Simplify while loops into more readable and simple for loops. > > Signed-off-by: Suraj Upadhyay > --- [...] > @@ -1824,7 +1821,7 @@ static struct sk_buff *ql_build_rx_skb(struct > ql_adapter *qdev, > sbq_desc->p.skb = NULL;

Re: [PATCH] staging: qlge: Remove pci-dma-compat wrapper APIs.

2020-07-12 Thread Benjamin Poirier
On 2020-07-13 11:14 +0530, Suraj Upadhyay wrote: > On Mon, Jul 13, 2020 at 01:59:59PM +0900, Benjamin Poirier wrote: > > On 2020-07-11 18:16 +0530, Suraj Upadhyay wrote: > > > The legacy API wrappers in include/linux/pci-dma-compat.h > > > should go away as it crea

Re: [PATCH] staging: qlge: Remove pci-dma-compat wrapper APIs.

2020-07-12 Thread Benjamin Poirier
On 2020-07-11 18:16 +0530, Suraj Upadhyay wrote: > The legacy API wrappers in include/linux/pci-dma-compat.h > should go away as it creates unnecessary midlayering > for include/linux/dma-mapping.h APIs, instead use dma-mapping.h > APIs directly. > > The patch has been generated with the coccinell

Re: [PATCH v2 4/4] staging: qlge: replace pr_err with netdev_err

2020-06-29 Thread Benjamin Poirier
On 2020-06-30 01:43 +0800, Coiby Xu wrote: > On Mon, Jun 29, 2020 at 02:30:04PM +0900, Benjamin Poirier wrote: > > On 2020-06-27 22:58 +0800, Coiby Xu wrote: > > [...] > > > void ql_dump_qdev(struct ql_adapter *qdev) > > > { > > > @@ -1611,99 +1618,

Re: [PATCH v2 4/4] staging: qlge: replace pr_err with netdev_err

2020-06-29 Thread Benjamin Poirier
On 2020-06-27 22:58 +0800, Coiby Xu wrote: [...] > void ql_dump_qdev(struct ql_adapter *qdev) > { > @@ -1611,99 +1618,100 @@ void ql_dump_qdev(struct ql_adapter *qdev) > #ifdef QL_CB_DUMP > void ql_dump_wqicb(struct wqicb *wqicb) > { > - pr_err("Dumping wqicb stuff...\n"); > - pr_err("

Re: [PATCH] staging: qlge: qlge_main.c: fixed spaces coding style issues

2020-05-31 Thread Benjamin Poirier
On 2020-05-29 17:17 +0200, Jil Rouceau wrote: > Fixed the missing spaces before and after binary operators. > > Signed-off-by: Jil Rouceau This patch does not apply cleanly. I think your base tree is missing commit ec269f1250c6 ("staging: qlge: Remove unnecessary spaces in qlge_main.c").

Re: [PATCH net-next] net: Avoid spurious rx_dropped increases with tap and rx_handler

2020-05-25 Thread Benjamin Poirier
On 2020-05-24 22:41 -0700, Eric Dumazet wrote: > On Sun, May 24, 2020 at 10:02 PM Benjamin Poirier > wrote: > > > > Consider an skb which doesn't match a ptype_base/ptype_specific handler. If > > this skb is delivered to a ptype_all handler, it does not count as a dro

[PATCH net-next] net: Avoid spurious rx_dropped increases with tap and rx_handler

2020-05-24 Thread Benjamin Poirier
ter") Message-Id: <20200522011420.263574-1-bpoir...@cumulusnetworks.com> Signed-off-by: Benjamin Poirier --- net/core/dev.c | 14 +- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/net/core/dev.c b/net/core/dev.c index ae37586f6ee8..07957a0f57e6 100644 --- a/net/core

[PATCH RFC] net: Avoid spurious rx_dropped increases with tap and rx_handler

2020-05-21 Thread Benjamin Poirier
") Signed-off-by: Benjamin Poirier --- The main problem (described above) involves RX_HANDLER_PASS and I think it's clear that it needs fixing but I'm wondering if there are different views on what the behavior should be in related cases. For RX_HANDLER_ANOTHER, Considering an example

Re: [PATCH] staging: qlge: unmap dma when lock failed

2020-05-17 Thread Benjamin Poirier
On 2020-05-17 13:46 +0800, Xiangyang Zhang wrote: > DMA not unmapped when lock failed, this patch fixed it. > Fixes: 4322c5bee85e ("qlge: Expand coverage of hw lock for config register.") > Signed-off-by: Xiangyang Zhang > --- > drivers/staging/qlge/qlge_main.c | 3 ++- > 1 file changed, 2 ins

Re: [PATCH v2] doc: document danger of applying REJECT to INVALID CTs

2020-05-12 Thread Benjamin Poirier
On 2020-05-12 23:00 +0200, Jan Engelhardt wrote: > Signed-off-by: Jan Engelhardt > --- > > Simplify the trigger case by dropping mentions of P_3. > New -A commands as proposed. > > extensions/libip6t_REJECT.man | 20 > extensions/libipt_REJECT.man | 20

[PATCH iproute2 v2 0/6] bridge vlan output fixes

2020-05-01 Thread Benjamin Poirier
uot;ifname": "vx2", "tunnels": [ { "vlan": 2, "tunid": 2 },{ "vlan": 1010, "vlanEnd": 1020, "tunid": 1010,

[PATCH iproute2 v2 2/6] bridge: Fix typo

2020-05-01 Thread Benjamin Poirier
Fixes: 7abf5de677e3 ("bridge: vlan: add support to display per-vlan statistics") Signed-off-by: Benjamin Poirier --- bridge/vlan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bridge/vlan.c b/bridge/vlan.c index ac0796f6..37ff2973 100644 --- a/bridge/vlan.c ++

[PATCH iproute2 v2 5/6] bridge: Align output columns

2020-05-01 Thread Benjamin Poirier
tunnelshow port vlan-idtunnel-id vx0 2 2 1010-1020 1010-1020 1030 65556 vx-longname 2 2 Signed-off-by: Benjamin Poirier --- bridge/vlan.c | 73 --- 1

[PATCH iproute2 v2 6/6] Replace open-coded instances of print_nl()

2020-05-01 Thread Benjamin Poirier
Signed-off-by: Benjamin Poirier --- bridge/vlan.c | 4 ++-- tc/m_action.c | 14 +++--- tc/m_connmark.c | 4 ++-- tc/m_ctinfo.c | 4 ++-- tc/m_ife.c| 4 ++-- tc/m_mpls.c | 2 +- tc/m_nat.c| 4 ++-- tc/m_sample.c | 4 ++-- tc/m_skbedit.c

[PATCH iproute2 v2 4/6] json_print: Return number of characters printed

2020-05-01 Thread Benjamin Poirier
When outputting in normal mode, forward the return value from color_fprintf(). Signed-off-by: Benjamin Poirier --- include/json_print.h | 24 ++- lib/json_print.c | 95 +++- 2 files changed, 73 insertions(+), 46 deletions(-) diff --git a

[PATCH iproute2 v2 3/6] bridge: Fix output with empty vlan lists

2020-05-01 Thread Benjamin Poirier
values. This makes the behavior consistent with other iproute2 commands, for example `ip -6 addr`: if an interface doesn't have any ipv6 addresses, it is not part of the listing. Fixes: 8652eeb3ab12 ("bridge: vlan: support for per vlan tunnel info") Signed-off-by: Benjamin Poirier

[PATCH iproute2 v2 1/6] bridge: Use consistent column names in vlan output

2020-05-01 Thread Benjamin Poirier
Fix singular vs plural. Add a hyphen to clarify that each of those are single fields. Signed-off-by: Benjamin Poirier --- bridge/vlan.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bridge/vlan.c b/bridge/vlan.c index 205851e4..ac0796f6 100644 --- a/bridge/vlan.c

Re: [PATCH iproute2 1/7] bridge: Use the same flag names in input and output

2020-04-29 Thread Benjamin Poirier
On 2020-04-29 08:12 -0700, Roopa Prabhu wrote: > On Mon, Apr 27, 2020 at 4:51 PM Benjamin Poirier > wrote: > > > > Output the same names for vlan flags as the ones accepted in command input. > > > > Signed-off-by: Benjamin Poirier > > --- > > Benjamin

[PATCH net-next] qlge: Move drivers/net/ethernet/qlogic/qlge/ to drivers/staging/qlge/

2019-07-22 Thread Benjamin Poirier
The hardware has been declared EOL by the vendor more than 5 years ago. What's more relevant to the Linux kernel is that the quality of this driver is not on par with many other mainline drivers. Cc: Manish Chopra Message-id: <20190617074858.32467-1-bpoir...@suse.com> Signed-off-b

Re: [PATCH net] be2net: Synchronize be_update_queues with dev_watchdog

2019-07-18 Thread Benjamin Poirier
On 2019/07/18 10:23, Florian Fainelli wrote: > On 7/17/19 6:42 PM, Benjamin Poirier wrote: > > As pointed out by Firo Yang, a netdev tx timeout may trigger just before an > > ethtool set_channels operation is started. be_tx_timeout(), which dumps > > some queue structures,

[PATCH net] be2net: Synchronize be_update_queues with dev_watchdog

2019-07-17 Thread Benjamin Poirier
synchronization between the two. Message-id: Signed-off-by: Benjamin Poirier --- drivers/net/ethernet/emulex/benet/be_main.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/net/ethernet/emulex/benet/be_main.c b/drivers/net/ethernet/emulex/benet/be_main.c index b7a246b33599..2edb86ec9fe9

Re: [PATCH] qlge: Move drivers/net/ethernet/qlogic/qlge/ to drivers/staging/qlge/

2019-07-17 Thread Benjamin Poirier
On 2019/07/17 12:02, David Miller wrote: > From: Benjamin Poirier > Date: Tue, 16 Jul 2019 11:34:59 +0900 > > > The hardware has been declared EOL by the vendor more than 5 years ago. > > What's more relevant to the Linux kernel is that the quality of this driver &

Re: [PATCH net] be2net: Signal that the device cannot transmit during reconfiguration

2019-07-17 Thread Benjamin Poirier
On 2019/07/17 17:56, Firo Yang wrote: > I don't think this change could fix this problem because if SMP, > dev_watchdog() could run on a different CPU. hmm, SMP is clearly part of the picture here. The change I proposed revolves around the synchronization offered by dev->tx_global_lock: we have

Re: [PATCH net] be2net: Signal that the device cannot transmit during reconfiguration

2019-07-17 Thread Benjamin Poirier
On 2019/07/17 13:23, Firo Yang wrote: > I think there is a problem if dev_watchdog() is triggered before > netif_carrier_off(). dev_watchdog() might call ->ndo_tx_timeout(), i.e. > be_tx_timeout(), if txq timeout happens. Thus be_tx_timeout() could still be > able to access the memory which is

[PATCH net] be2net: Signal that the device cannot transmit during reconfiguration

2019-07-16 Thread Benjamin Poirier
used in many other drivers. netif_carrier_on() is already taken care of in be_open(). Signed-off-by: Benjamin Poirier --- drivers/net/ethernet/emulex/benet/be_main.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/emulex/benet/be_main.c b/driver

[PATCH] qlge: Move drivers/net/ethernet/qlogic/qlge/ to drivers/staging/qlge/

2019-07-15 Thread Benjamin Poirier
The hardware has been declared EOL by the vendor more than 5 years ago. What's more relevant to the Linux kernel is that the quality of this driver is not on par with many other mainline drivers. Cc: Manish Chopra Message-id: <20190617074858.32467-1-bpoir...@suse.com> Signed-off-b

Re: [PATCH net-next 01/16] qlge: Remove irq_cnt

2019-07-14 Thread Benjamin Poirier
On 2019/06/17 16:48, Benjamin Poirier wrote: > qlge uses an irq enable/disable refcounting scheme that is: > * poorly implemented > Uses a spin_lock to protect accesses to the irq_cnt atomic variable > * buggy > Breaks when there is not a 1:1 sequence of irq - nap

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

2019-07-09 Thread Benjamin Poirier
On 2019/06/27 14:18, Manish Chopra wrote: > > -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-n

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

2019-07-08 Thread Benjamin Poirier
On 2019/06/27 10:47, Manish Chopra wrote: > > > > - 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_buffe

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

2019-07-08 Thread Benjamin Poirier
On 2019/06/27 10:02, Manish Chopra wrote: > > 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) > > -

Re: [PATCH net-next 01/16] qlge: Remove irq_cnt

2019-07-05 Thread Benjamin Poirier
On 2019/06/26 13:21, Manish Chopra wrote: > > In msix mode there's no need to explicitly disable completion interrupts, > > they > > are reliably auto-masked, according to my observations. > > I tested this on two QLE8142 adapters. > > > > Do you have reason to believe this might not always be th

Re: [EXT] [PATCH net-next 03/16] qlge: Deduplicate lbq_buf_size

2019-06-28 Thread Benjamin Poirier
On 2019/06/26 11:42, Willem de Bruijn wrote: > On Wed, Jun 26, 2019 at 7:37 AM Benjamin Poirier wrote: > > > > On 2019/06/26 09:24, Manish Chopra wrote: > > > > -Original Message----- > > > > From: Benjamin Poirier > > > > Sent: Monday, J

Re: [PATCH net-next 10/16] qlge: Factor out duplicated expression

2019-06-28 Thread Benjamin Poirier
On 2019/06/25 18:32, Manish Chopra wrote: [...] > > > > What I inferred from the presence of that expression though is that in the > > places where it is used, the device interprets a value of 0 as 65536. > > Manish, > > can you confirm that? As David points out, the expression is useless. A > >

Re: [EXT] [PATCH net-next 05/16] qlge: Remove rx_ring.sbq_buf_size

2019-06-26 Thread Benjamin Poirier
On 2019/06/26 09:36, Manish Chopra wrote: > > -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]

Re: [EXT] [PATCH net-next 03/16] qlge: Deduplicate lbq_buf_size

2019-06-26 Thread Benjamin Poirier
On 2019/06/26 09:24, Manish Chopra wrote: > > -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] [PAT

Re: [PATCH net-next 01/16] qlge: Remove irq_cnt

2019-06-26 Thread Benjamin Poirier
On 2019/06/26 08:59, Manish Chopra wrote: > > -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: [PATCH

Re: [PATCH net-next 10/16] qlge: Factor out duplicated expression

2019-06-24 Thread Benjamin Poirier
On 2019/06/23 10:59, David Miller wrote: > From: Benjamin Poirier > Date: Mon, 17 Jun 2019 16:48:52 +0900 > > > Signed-off-by: Benjamin Poirier > > --- > > drivers/net/ethernet/qlogic/qlge/qlge.h | 6 ++ > > drivers/net/ethernet/qlogic/qlge/qlge_main

Re: [EXT] [PATCH net-next 06/16] qlge: Remove useless dma synchronization calls

2019-06-17 Thread Benjamin Poirier
On 2019/06/17 09:44, Manish Chopra wrote: [...] > > --- a/drivers/net/ethernet/qlogic/qlge/qlge_main.c > > +++ b/drivers/net/ethernet/qlogic/qlge/qlge_main.c > > @@ -1110,9 +1110,6 @@ static void ql_update_lbq(struct ql_adapter *qdev, > > struct rx_ring *rx_ring) > > dma_unmap_a

[PATCH net-next 12/16] qlge: Remove useless memset

2019-06-17 Thread Benjamin Poirier
This just repeats what the other memset a few lines above did. Signed-off-by: Benjamin Poirier --- drivers/net/ethernet/qlogic/qlge/qlge_main.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/net/ethernet/qlogic/qlge/qlge_main.c b/drivers/net/ethernet/qlogic/qlge/qlge_main.c index

[PATCH net-next 05/16] qlge: Remove rx_ring.sbq_buf_size

2019-06-17 Thread Benjamin Poirier
Tx rings have sbq_buf_size = 0 but there's no case where the code actually tests on that value. We can remove sbq_buf_size and use a constant instead. Signed-off-by: Benjamin Poirier --- drivers/net/ethernet/qlogic/qlge/qlge.h | 1 - drivers/net/ethernet/qlogic/qlge/qlge_dbg.c

[PATCH net-next 13/16] qlge: Replace memset with assignment

2019-06-17 Thread Benjamin Poirier
Instead of clearing the structure wholesale, it is sufficient to initialize the skb member which is used to manage sbq instances. lbq instances are managed according to curr_idx and clean_idx. Signed-off-by: Benjamin Poirier --- drivers/net/ethernet/qlogic/qlge/qlge_main.c | 3 +-- 1 file

[PATCH net-next 08/16] qlge: Fix dma_sync_single calls

2019-06-17 Thread Benjamin Poirier
Fixes: 2c9a266afefe ("qlge: Fix receive packets drop.") Signed-off-by: Benjamin Poirier --- drivers/net/ethernet/qlogic/qlge/qlge.h | 5 +-- drivers/net/ethernet/qlogic/qlge/qlge_main.c | 47 2 files changed, 19 insertions(+), 33 deletions(-) diff --git a/dr

[PATCH net-next 14/16] qlge: Update buffer queue prod index despite oom

2019-06-17 Thread Benjamin Poirier
ome associated bookkeeping variables. Signed-off-by: Benjamin Poirier --- drivers/net/ethernet/qlogic/qlge/qlge.h | 8 +- drivers/net/ethernet/qlogic/qlge/qlge_dbg.c | 10 +- drivers/net/ethernet/qlogic/qlge/qlge_main.c | 109 +-- 3 files changed, 60 insertions(+),

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

2019-06-17 Thread Benjamin Poirier
27;t lock up if there are allocation failures. Signed-off-by: Benjamin Poirier --- drivers/net/ethernet/qlogic/qlge/qlge.h | 8 ++ drivers/net/ethernet/qlogic/qlge/qlge_main.c | 80 2 files changed, 72 insertions(+), 16 deletions(-) diff --git a/drivers/net/ethernet/qlogic

[PATCH net-next 01/16] qlge: Remove irq_cnt

2019-06-17 Thread Benjamin Poirier
% ) After: 636300 634106 634984 638555 634188 [...] 259,237,291,449 cycles ( +- 0.19% ) Signed-off-by: Benjamin Poirier --- drivers/net/ethernet/qlogic/qlge/qlge.h | 7 -- drivers/net/ethernet/qlogic/qlge/qlge_main.c | 98 ++-- drivers/net/ethernet

[PATCH net-next 04/16] qlge: Remove bq_desc.maplen

2019-06-17 Thread Benjamin Poirier
The size of the mapping is known statically in all cases, there's no need to save it at runtime. Remove this member. Signed-off-by: Benjamin Poirier --- drivers/net/ethernet/qlogic/qlge/qlge.h | 1 - drivers/net/ethernet/qlogic/qlge/qlge_main.c | 43 +++- 2 files ch

[PATCH net-next 02/16] qlge: Remove page_chunk.last_flag

2019-06-17 Thread Benjamin Poirier
As already done in ql_get_curr_lchunk(), this member can be replaced by a simple test. Signed-off-by: Benjamin Poirier --- drivers/net/ethernet/qlogic/qlge/qlge.h | 1 - drivers/net/ethernet/qlogic/qlge/qlge_main.c | 13 + 2 files changed, 5 insertions(+), 9 deletions(-) diff

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

2019-06-17 Thread Benjamin Poirier
required adjustments to code and dedup the most obvious cases of copy/paste. This patch should not introduce any functional change other than to some of the printk format strings. Signed-off-by: Benjamin Poirier --- drivers/net/ethernet/qlogic/qlge/qlge.h | 96 ++-- drivers/net/ethernet/ql

[PATCH net-next 09/16] qlge: Remove rx_ring.type

2019-06-17 Thread Benjamin Poirier
This field is redundant, the type can be determined from the index, cq_id. Signed-off-by: Benjamin Poirier --- drivers/net/ethernet/qlogic/qlge/qlge.h | 10 --- drivers/net/ethernet/qlogic/qlge/qlge_dbg.c | 16 +++--- drivers/net/ethernet/qlogic/qlge/qlge_main.c | 31

[PATCH net-next 06/16] qlge: Remove useless dma synchronization calls

2019-06-17 Thread Benjamin Poirier
This is unneeded for two reasons: 1) the mapping is not written by the cpu 2) calls like ..._sync_..._for_device(..., ..._FROMDEVICE) are nonsensical, see commit 3f0fb4e85b38 ("Documentation/DMA-API-HOWTO.txt: fix misleading example") Signed-off-by: Benjamin Poirier --- d

[PATCH net-next 15/16] qlge: Refill rx buffers up to multiple of 16

2019-06-17 Thread Benjamin Poirier
no longer guarantees prod_idx values aligned on multiples of 16. While it appears that we can write unaligned values to prod_idx without ill effects on device operation, it makes more sense to change qlge_refill_bq() to refill up to a limit that corresponds with the device's behavior. Signed-of

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

2019-06-17 Thread Benjamin Poirier
Given the way the driver currently works, these values are always known at compile time. Signed-off-by: Benjamin Poirier --- drivers/net/ethernet/qlogic/qlge/qlge.h | 17 +++-- drivers/net/ethernet/qlogic/qlge/qlge_dbg.c | 4 - drivers/net/ethernet/qlogic/qlge/qlge_main.c | 79

[PATCH net-next 10/16] qlge: Factor out duplicated expression

2019-06-17 Thread Benjamin Poirier
Signed-off-by: Benjamin Poirier --- drivers/net/ethernet/qlogic/qlge/qlge.h | 6 ++ drivers/net/ethernet/qlogic/qlge/qlge_main.c | 18 ++ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/drivers/net/ethernet/qlogic/qlge/qlge.h b/drivers/net/ethernet

[PATCH net-next 03/16] qlge: Deduplicate lbq_buf_size

2019-06-17 Thread Benjamin Poirier
lbq_buf_size is duplicated to every rx_ring structure whereas lbq_buf_order is present once in the ql_adapter structure. All rings use the same buf size, keep only one copy of it. Also factor out the calculation of lbq_buf_size instead of having two copies. Signed-off-by: Benjamin Poirier

[PATCH v3 bpf-next 2/2] bpftool: Improve handling of ENOSPC on reuseport_array map dumps

2019-04-15 Thread Benjamin Poirier
from reuseport_sockarray map with value_size != 8 key: 00 00 00 00 value: key: 01 00 00 00 value: key: 02 00 00 00 value: Found 0 elements Signed-off-by: Benjamin Poirier --- tools/bpf/bpftool/map.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/tools/bpf/bpftool/map.c b/tools/bpf/bp

[PATCH v3 bpf-next 1/2] bpftool: Use print_entry_error() in case of ENOENT when dumping

2019-04-15 Thread Benjamin Poirier
ntry and others don't. The truth is that ENOENT is an error case. Use print_entry_error() to output the desired message. That function's "value" parameter is also renamed to indicate that we never use it for an actual map value. The output format is unchanged. Signed-off-b

Re: [PATCH v2 bpf-next 1/2] bpftool: Use print_entry_error() in case of ENOENT when dumping

2019-04-14 Thread Benjamin Poirier
On 2019/04/12 16:53, Jakub Kicinski wrote: > On Sat, 13 Apr 2019 07:49:24 +0900, Benjamin Poirier wrote: > > To be honest, I don't think the formatting in those print_entry_* > > functions should change according to the length in any case. I think the > > key and value fo

Re: [PATCH v2 bpf-next 1/2] bpftool: Use print_entry_error() in case of ENOENT when dumping

2019-04-12 Thread Benjamin Poirier
On 2019/04/12 11:28, Quentin Monnet wrote: [...] > > > { > > - int value_size = strlen(value); > > - bool single_line, break_names; > > + bool break_names; > > - break_names = info->key_size > 16 || value_size > 16; > > - single_line = info->key_size + value_size <= 24 && !break_names;

[PATCH v2 bpf-next 2/2] bpftool: Improve handling of ENOSPC on reuseport_array map dumps

2019-04-11 Thread Benjamin Poirier
from reuseport_sockarray map with value_size != 8 key: 00 00 00 00 value: key: 01 00 00 00 value: key: 02 00 00 00 value: Found 0 elements Signed-off-by: Benjamin Poirier --- tools/bpf/bpftool/map.c | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/tools/bpf/bpftool/

[PATCH v2 bpf-next 1/2] bpftool: Use print_entry_error() in case of ENOENT when dumping

2019-04-11 Thread Benjamin Poirier
re: key: 00 00 00 00 value: No space left on device [...] example after: key: 00 00 00 00 value: No space left on device [...] The ENOENT case is unchanged: key: 00 00 00 00 value: 14 5b 00 00 00 00 00 00 key: 01 00 00 00 value: [...] Signed-off-by: Benjamin Poirier --- tools/bp

[PATCH bpf-next] bpftool: Exit early when it's not possible to dump a REUSEPORT_SOCKARRAY map

2019-04-11 Thread Benjamin Poirier
y key in the map, print the error once, print an explanatory message and exit. Signed-off-by: Benjamin Poirier --- Note that this will lead to a merge conflict if the patch "bpftool: Fix errno variable usage" is merged in the bpf branch: <<<<<<< HEAD

[PATCH bpf] bpftool: Fix errno variable usage

2019-04-11 Thread Benjamin Poirier
The test meant to use the saved value of errno. Given the current code, it makes no practical difference however. Fixes: bf598a8f0f77 ("bpftool: Improve handling of ENOENT on map dumps") Signed-off-by: Benjamin Poirier --- tools/bpf/bpftool/map.c | 2 +- 1 file changed, 1 inser

Re: Re: [Bug] net/ipv6: skb_over_panic in mld_newpack

2018-12-05 Thread Benjamin Poirier
On 2018/12/05 16:57, Nicolas Belouin wrote: [...] > > Thanks for your help, using your debug patch I got the value of > needed_headroom: > USHRT_MAX - 64 > And tracked it down to a legacy out of tree patch of ours I then fixed. > The patch was increasing/decreasing the needed_headroom without che

Re: Re: [Bug] net/ipv6: skb_over_panic in mld_newpack

2018-12-04 Thread Benjamin Poirier
On 2018/12/04 11:52, Nicolas Belouin wrote: > On 03/12 07:59, Eric Dumazet wrote: > > > > > > On 12/03/2018 07:20 AM, Nicolas Belouin wrote: > > > Hi, > > > I ran into a panic while adding an interface to a bridge with a vxlan > > > interface already attached to it, as it seems related mtu=9000.

[PATCH] xfrm: Fix bucket count reported to userspace

2018-11-05 Thread Benjamin Poirier
sadhcnt is reported by `ip -s xfrm state count` as "buckets count", not the hash mask. Fixes: 28d8909bc790 ("[XFRM]: Export SAD info.") Signed-off-by: Benjamin Poirier --- net/xfrm/xfrm_state.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/xfrm/xfr

Re: [RFC PATCH net-next v1 00/14] rename and shrink i40evf

2018-09-13 Thread Benjamin Poirier
On 2018/09/13 15:31, Jesse Brandeburg wrote: [...] > > --- > v1: initial RFC > > Jesse Brandeburg (14): > intel-ethernet: rename i40evf to iavf Seems like patch 1 didn't make it to netdev https://lists.osuosl.org/pipermail/intel-wired-lan/Week-of-Mon-20180910/014025.html > iavf: diet and re

  1   2   >