Re: [PATCH v3 net-next 04/16] sfc_ef100: skeleton EF100 PF driver

2020-07-21 Thread Edward Cree
On 21/07/2020 17:45, Jakub Kicinski wrote: > On Tue, 21 Jul 2020 15:48:00 +0100 Edward Cree wrote: >> Argh; does anyone have any bright ideas? > No bright ideas. Why do you want the driver to be modular in the first > place? Well, 'sfc' already is, and I'm not s

Re: [PATCH v3 net-next 04/16] sfc_ef100: skeleton EF100 PF driver

2020-07-21 Thread Edward Cree
On 16/07/2020 18:39, kernel test robot wrote: > [auto build test ERROR on net-next/master] ... > config: mips-allyesconfig (attached as .config) ... >mips-linux-ld: drivers/net/ethernet/sfc/ef100_nic.o: in function > `efx_mcdi_sensor_event': >>> ef100_nic.c:(.text.efx_mcdi_sensor_event+0x0): m

Re: [PATCH net-next] efx: convert to new udp_tunnel infrastructure

2020-07-21 Thread Edward Cree
On 20/07/2020 18:21, Jakub Kicinski wrote: > On Mon, 20 Jul 2020 12:45:54 +0100 Edward Cree wrote: >> I think I'd prefer to keep the switch() that explicitlychecks >>  for UDP_TUNNEL_TYPE_GENEVE; even though the infrastructure >>  makes sure it won't ever not be,

Re: [PATCH net-next] efx: convert to new udp_tunnel infrastructure

2020-07-20 Thread Edward Cree
Subject line prefix should probably be sfc:, that's what we  usually use for this driver. On 18/07/2020 00:53, Jakub Kicinski wrote: > Check MC_CMD_DRV_ATTACH_EXT_OUT_FLAG_TRUSTED, before setting > the info, which will hopefully protect us from -EPERM errors Sorry, I forgot to pass on the answer I

[PATCH v3 net-next 16/16] sfc_ef100: implement ndo_get_phys_port_{id,name}

2020-07-16 Thread Edward Cree
Signed-off-by: Edward Cree --- drivers/net/ethernet/sfc/ef100_netdev.c | 2 ++ drivers/net/ethernet/sfc/ef100_nic.c| 21 + 2 files changed, 23 insertions(+) diff --git a/drivers/net/ethernet/sfc/ef100_netdev.c b/drivers/net/ethernet/sfc/ef100_netdev.c index

[PATCH v3 net-next 15/16] sfc_ef100: read device MAC address at probe time

2020-07-16 Thread Edward Cree
Signed-off-by: Edward Cree --- drivers/net/ethernet/sfc/ef100_nic.c | 40 +++- drivers/net/ethernet/sfc/ef100_nic.h | 1 + 2 files changed, 40 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/sfc/ef100_nic.c b/drivers/net/ethernet/sfc/ef100_nic.c index

[PATCH v3 net-next 14/16] sfc_ef100: probe the PHY and configure the MAC

2020-07-16 Thread Edward Cree
Signed-off-by: Edward Cree --- drivers/net/ethernet/sfc/ef100_nic.c | 42 +++- 1 file changed, 41 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/sfc/ef100_nic.c b/drivers/net/ethernet/sfc/ef100_nic.c index f449960e5b02..aced682a7b08 100644 --- a/drivers

[PATCH v3 net-next 13/16] sfc_ef100: actually perform resets

2020-07-16 Thread Edward Cree
In ef100_reset(), make the MCDI call to do the reset. Also, do a reset at start-of-day during probe, to put the function in a clean state. Signed-off-by: Edward Cree --- drivers/net/ethernet/sfc/ef100_nic.c | 9 + 1 file changed, 9 insertions(+) diff --git a/drivers/net/ethernet/sfc

[PATCH v3 net-next 12/16] sfc_ef100: extend ef100_check_caps to cover datapath_caps3

2020-07-16 Thread Edward Cree
MC_CMD_GET_CAPABILITIES now has a third word of flags; extend the efx_has_cap() machinery to cover it. Signed-off-by: Edward Cree --- drivers/net/ethernet/sfc/ef100_nic.c | 9 - drivers/net/ethernet/sfc/ef100_nic.h | 1 + drivers/net/ethernet/sfc/mcdi.h | 4 ++-- 3 files changed

[PATCH v3 net-next 09/16] sfc_ef100: implement ndo_open/close and EVQ probing

2020-07-16 Thread Edward Cree
Channels are probed, but actual event handling is still stubbed out. Stub implementation of check_caps is needed because ptp.c will call into it from efx_ptp_use_mac_tx_timestamps() to decide if it wants TXQs. Signed-off-by: Edward Cree --- drivers/net/ethernet/sfc/ef100_netdev.c | 143

[PATCH v3 net-next 11/16] sfc_ef100: read datapath caps, implement check_caps

2020-07-16 Thread Edward Cree
Signed-off-by: Edward Cree --- drivers/net/ethernet/sfc/ef100_nic.c | 58 +++- drivers/net/ethernet/sfc/ef100_nic.h | 2 + 2 files changed, 58 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/sfc/ef100_nic.c b/drivers/net/ethernet/sfc/ef100_nic.c index

[PATCH v3 net-next 08/16] sfc_ef100: implement MCDI transport

2020-07-16 Thread Edward Cree
Signed-off-by: Edward Cree --- drivers/net/ethernet/sfc/ef100_nic.c | 106 +++ drivers/net/ethernet/sfc/ef100_nic.h | 1 + 2 files changed, 107 insertions(+) diff --git a/drivers/net/ethernet/sfc/ef100_nic.c b/drivers/net/ethernet/sfc/ef100_nic.c index 27e00b003039

[PATCH v3 net-next 10/16] sfc_ef100: process events for MCDI completions

2020-07-16 Thread Edward Cree
Currently RX and TX-completion events are unhandled, as neither the RX nor the TX path has been implemented yet. Signed-off-by: Edward Cree --- drivers/net/ethernet/sfc/ef100_nic.c | 57 +++- 1 file changed, 56 insertions(+), 1 deletion(-) diff --git a/drivers/net

[PATCH v3 net-next 06/16] sfc_ef100: PHY probe stub

2020-07-16 Thread Edward Cree
We can't actually do the MCDI to probe it fully until we have working MCDI, which comes later, but we need efx->phy_data to be allocated so that when we get MCDI events the link-state change handler doesn't NULL-dereference. Signed-off-by: Edward Cree --- drivers/net/ethernet/sf

[PATCH v3 net-next 07/16] sfc_ef100: don't call efx_reset_down()/up() on EF100

2020-07-16 Thread Edward Cree
We handle everything ourselves in ef100_reset(), rather than relying on the generic down/up routines. Signed-off-by: Edward Cree --- drivers/net/ethernet/sfc/efx_common.c | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/sfc/efx_common.c b

[PATCH v3 net-next 04/16] sfc_ef100: skeleton EF100 PF driver

2020-07-16 Thread Edward Cree
No TX or RX path, no MCDI, not even an ifup/down handler. Besides stubs, the bulk of the patch deals with reading the Xilinx extended PCIe capability, which tells us where to find our BAR. Signed-off-by: Edward Cree --- drivers/net/ethernet/sfc/Kconfig | 10 + drivers/net/ethernet/sfc

[PATCH v3 net-next 05/16] sfc_ef100: reset-handling stub

2020-07-16 Thread Edward Cree
We don't actually do the efx_mcdi_reset() because we don't have MCDI yet. Signed-off-by: Edward Cree --- drivers/net/ethernet/sfc/ef100_nic.c | 50 1 file changed, 50 insertions(+) diff --git a/drivers/net/ethernet/sfc/ef100_nic.c b/drivers/net/et

[PATCH v3 net-next 03/16] sfc_ef100: register accesses on EF100

2020-07-16 Thread Edward Cree
EF100 adds a few new valid addresses for efx_writed_page(), as well as a Function Control Window in the BAR whose location is variable. Signed-off-by: Edward Cree --- drivers/net/ethernet/sfc/io.h | 16 +--- drivers/net/ethernet/sfc/net_driver.h | 2 ++ 2 files changed, 15

[PATCH v3 net-next 02/16] sfc_ef100: add EF100 register definitions

2020-07-16 Thread Edward Cree
Signed-off-by: Edward Cree --- drivers/net/ethernet/sfc/ef100_regs.h | 693 ++ 1 file changed, 693 insertions(+) create mode 100644 drivers/net/ethernet/sfc/ef100_regs.h diff --git a/drivers/net/ethernet/sfc/ef100_regs.h b/drivers/net/ethernet/sfc/ef100_regs.h new file

[PATCH v3 net-next 01/16] sfc: remove efx_ethtool_nway_reset()

2020-07-16 Thread Edward Cree
.) Signed-off-by: Edward Cree --- drivers/net/ethernet/sfc/ethtool.c| 1 - drivers/net/ethernet/sfc/ethtool_common.c | 8 drivers/net/ethernet/sfc/ethtool_common.h | 1 - 3 files changed, 10 deletions(-) diff --git a/drivers/net/ethernet/sfc/ethtool.c b/drivers/net/ethernet/sfc

[PATCH v3 net-next 00/16] sfc_ef100: driver for EF100 family NICs, part 1

2020-07-16 Thread Edward Cree
s driver. * fix undeclared symbols in patch #4 by shuffling around prototypes and #includes and adding 'static' where appropriate. * fix uninitialised variable 'rc2' in patch #7. Edward Cree (16): sfc: remove efx_ethtool_nway_reset() sfc_ef100: add EF100 register definitio

Re: [RFC] bonding driver terminology change proposal

2020-07-15 Thread Edward Cree
Once again, the opinions below are my own and definitely do not  represent anything my employer would be seen dead in the same  room as. On 13/07/2020 23:41, Stephen Hemminger wrote: > As far as userspace, maybe keep the old API's but provide deprecation nags. Why would you need to deprecate the o

Re: [PATCH v2 net-next 04/16] sfc_ef100: skeleton EF100 PF driver

2020-07-14 Thread Edward Cree
On 14/07/2020 00:02, Jakub Kicinski wrote: > On Mon, 13 Jul 2020 12:32:16 +0100 Edward Cree wrote: >> +MODULE_VERSION(EFX_DRIVER_VERSION); > We got rid of driver versions upstream, no? The sfc driver still has a MODULE_VERSION(), I just made this do  the same.  Should I instead remove

[PATCH v2 net-next 16/16] sfc_ef100: implement ndo_get_phys_port_{id,name}

2020-07-13 Thread Edward Cree
Signed-off-by: Edward Cree --- drivers/net/ethernet/sfc/ef100_netdev.c | 2 ++ drivers/net/ethernet/sfc/ef100_nic.c| 21 + 2 files changed, 23 insertions(+) diff --git a/drivers/net/ethernet/sfc/ef100_netdev.c b/drivers/net/ethernet/sfc/ef100_netdev.c index

[PATCH v2 net-next 15/16] sfc_ef100: read device MAC address at probe time

2020-07-13 Thread Edward Cree
Signed-off-by: Edward Cree --- drivers/net/ethernet/sfc/ef100_nic.c | 40 +++- drivers/net/ethernet/sfc/ef100_nic.h | 1 + 2 files changed, 40 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/sfc/ef100_nic.c b/drivers/net/ethernet/sfc/ef100_nic.c index

[PATCH v2 net-next 13/16] sfc_ef100: actually perform resets

2020-07-13 Thread Edward Cree
In ef100_reset(), make the MCDI call to do the reset. Also, do a reset at start-of-day during probe, to put the function in a clean state. Signed-off-by: Edward Cree --- drivers/net/ethernet/sfc/ef100_nic.c | 9 + 1 file changed, 9 insertions(+) diff --git a/drivers/net/ethernet/sfc

[PATCH v2 net-next 14/16] sfc_ef100: probe the PHY and configure the MAC

2020-07-13 Thread Edward Cree
Signed-off-by: Edward Cree --- drivers/net/ethernet/sfc/ef100_nic.c | 42 +++- 1 file changed, 41 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/sfc/ef100_nic.c b/drivers/net/ethernet/sfc/ef100_nic.c index f449960e5b02..aced682a7b08 100644 --- a/drivers

[PATCH v2 net-next 12/16] sfc_ef100: extend ef100_check_caps to cover datapath_caps3

2020-07-13 Thread Edward Cree
MC_CMD_GET_CAPABILITIES now has a third word of flags; extend the efx_has_cap() machinery to cover it. Signed-off-by: Edward Cree --- drivers/net/ethernet/sfc/ef100_nic.c | 9 - drivers/net/ethernet/sfc/ef100_nic.h | 1 + drivers/net/ethernet/sfc/mcdi.h | 4 ++-- 3 files changed

[PATCH v2 net-next 11/16] sfc_ef100: read datapath caps, implement check_caps

2020-07-13 Thread Edward Cree
Signed-off-by: Edward Cree --- drivers/net/ethernet/sfc/ef100_nic.c | 58 +++- drivers/net/ethernet/sfc/ef100_nic.h | 2 + 2 files changed, 58 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/sfc/ef100_nic.c b/drivers/net/ethernet/sfc/ef100_nic.c index

[PATCH v2 net-next 10/16] sfc_ef100: process events for MCDI completions

2020-07-13 Thread Edward Cree
Currently RX and TX-completion events are unhandled, as neither the RX nor the TX path has been implemented yet. Signed-off-by: Edward Cree --- drivers/net/ethernet/sfc/ef100_nic.c | 57 +++- 1 file changed, 56 insertions(+), 1 deletion(-) diff --git a/drivers/net

[PATCH v2 net-next 09/16] sfc_ef100: implement ndo_open/close and EVQ probing

2020-07-13 Thread Edward Cree
Channels are probed, but actual event handling is still stubbed out. Stub implementation of check_caps is needed because ptp.c will call into it from efx_ptp_use_mac_tx_timestamps() to decide if it wants TXQs. Signed-off-by: Edward Cree --- drivers/net/ethernet/sfc/ef100_netdev.c | 143

[PATCH v2 net-next 07/16] sfc_ef100: don't call efx_reset_down()/up() on EF100

2020-07-13 Thread Edward Cree
We handle everything ourselves in ef100_reset(), rather than relying on the generic down/up routines. Signed-off-by: Edward Cree --- drivers/net/ethernet/sfc/efx_common.c | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/sfc/efx_common.c b

[PATCH v2 net-next 08/16] sfc_ef100: implement MCDI transport

2020-07-13 Thread Edward Cree
Signed-off-by: Edward Cree --- drivers/net/ethernet/sfc/ef100_nic.c | 106 +++ drivers/net/ethernet/sfc/ef100_nic.h | 1 + 2 files changed, 107 insertions(+) diff --git a/drivers/net/ethernet/sfc/ef100_nic.c b/drivers/net/ethernet/sfc/ef100_nic.c index 27e00b003039

[PATCH v2 net-next 06/16] sfc_ef100: PHY probe stub

2020-07-13 Thread Edward Cree
We can't actually do the MCDI to probe it fully until we have working MCDI, which comes later, but we need efx->phy_data to be allocated so that when we get MCDI events the link-state change handler doesn't NULL-dereference. Signed-off-by: Edward Cree --- drivers/net/ethernet/sf

[PATCH v2 net-next 04/16] sfc_ef100: skeleton EF100 PF driver

2020-07-13 Thread Edward Cree
No TX or RX path, no MCDI, not even an ifup/down handler. Besides stubs, the bulk of the patch deals with reading the Xilinx extended PCIe capability, which tells us where to find our BAR. Signed-off-by: Edward Cree --- drivers/net/ethernet/sfc/Kconfig | 10 + drivers/net/ethernet/sfc

[PATCH v2 net-next 05/16] sfc_ef100: reset-handling stub

2020-07-13 Thread Edward Cree
We don't actually do the efx_mcdi_reset() because we don't have MCDI yet. Signed-off-by: Edward Cree --- drivers/net/ethernet/sfc/ef100_nic.c | 50 1 file changed, 50 insertions(+) diff --git a/drivers/net/ethernet/sfc/ef100_nic.c b/drivers/net/et

[PATCH v2 net-next 03/16] sfc_ef100: register accesses on EF100

2020-07-13 Thread Edward Cree
EF100 adds a few new valid addresses for efx_writed_page(), as well as a Function Control Window in the BAR whose location is variable. Signed-off-by: Edward Cree --- drivers/net/ethernet/sfc/io.h | 16 +--- drivers/net/ethernet/sfc/net_driver.h | 2 ++ 2 files changed, 15

[PATCH v2 net-next 02/16] sfc_ef100: add EF100 register definitions

2020-07-13 Thread Edward Cree
Signed-off-by: Edward Cree --- drivers/net/ethernet/sfc/ef100_regs.h | 693 ++ 1 file changed, 693 insertions(+) create mode 100644 drivers/net/ethernet/sfc/ef100_regs.h diff --git a/drivers/net/ethernet/sfc/ef100_regs.h b/drivers/net/ethernet/sfc/ef100_regs.h new file

[PATCH v2 net-next 01/16] sfc: remove efx_ethtool_nway_reset()

2020-07-13 Thread Edward Cree
.) Signed-off-by: Edward Cree --- drivers/net/ethernet/sfc/ethtool.c| 1 - drivers/net/ethernet/sfc/ethtool_common.c | 8 drivers/net/ethernet/sfc/ethtool_common.h | 1 - 3 files changed, 10 deletions(-) diff --git a/drivers/net/ethernet/sfc/ethtool.c b/drivers/net/ethernet/sfc

[PATCH v2 net-next 00/16] sfc_ef100: driver for EF100 family NICs, part 1

2020-07-13 Thread Edward Cree
ut Falcon, so new patch #1 removes it from this driver. * fix undeclared symbols in patch #4 by shuffling around prototypes and #includes and adding 'static' where appropriate. * fix uninitialised variable 'rc2' in patch #7. Edward Cree (16): sfc: remove efx_ethtoo

Re: [PATCH net-next 03/15] sfc_ef100: skeleton EF100 PF driver

2020-07-08 Thread Edward Cree
On 03/07/2020 18:46, kernel test robot wrote: >In file included from include/linux/skbuff.h:31, > from include/linux/if_ether.h:19, > from include/uapi/linux/ethtool.h:19, > from include/linux/ethtool.h:18, > from i

Re: [PATCH net-next 03/15] sfc_ef100: skeleton EF100 PF driver

2020-07-07 Thread Edward Cree
On 04/07/2020 05:16, kernel test robot wrote: >>> drivers/net/ethernet/sfc/ptp.c:1442:1-4: alloc with no test, possible model >>> on line 1457 This one's a false positive, see below: > vim +1442 drivers/net/ethernet/sfc/ptp.c > > 5d0dab01175bff0 Ben Hutchings 2013-10-16 1434 > ac36baf817c39fc

[PATCH net-next 15/15] sfc_ef100: implement ndo_get_phys_port_{id,name}

2020-07-03 Thread Edward Cree
Signed-off-by: Edward Cree --- drivers/net/ethernet/sfc/ef100_netdev.c | 2 ++ drivers/net/ethernet/sfc/ef100_nic.c| 21 + 2 files changed, 23 insertions(+) diff --git a/drivers/net/ethernet/sfc/ef100_netdev.c b/drivers/net/ethernet/sfc/ef100_netdev.c index

[PATCH net-next 14/15] sfc_ef100: read device MAC address at probe time

2020-07-03 Thread Edward Cree
Signed-off-by: Edward Cree --- drivers/net/ethernet/sfc/ef100_nic.c | 40 +++- drivers/net/ethernet/sfc/ef100_nic.h | 1 + 2 files changed, 40 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/sfc/ef100_nic.c b/drivers/net/ethernet/sfc/ef100_nic.c index

[PATCH net-next 12/15] sfc_ef100: actually perform resets

2020-07-03 Thread Edward Cree
In ef100_reset(), make the MCDI call to do the reset. Also, do a reset at start-of-day during probe, to put the function in a clean state. Signed-off-by: Edward Cree --- drivers/net/ethernet/sfc/ef100_nic.c | 9 + 1 file changed, 9 insertions(+) diff --git a/drivers/net/ethernet/sfc

[PATCH net-next 13/15] sfc_ef100: probe the PHY and configure the MAC

2020-07-03 Thread Edward Cree
Signed-off-by: Edward Cree --- drivers/net/ethernet/sfc/ef100_nic.c | 42 +++- 1 file changed, 41 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/sfc/ef100_nic.c b/drivers/net/ethernet/sfc/ef100_nic.c index f449960e5b02..aced682a7b08 100644 --- a/drivers

[PATCH net-next 11/15] sfc_ef100: extend ef100_check_caps to cover datapath_caps3

2020-07-03 Thread Edward Cree
MC_CMD_GET_CAPABILITIES now has a third word of flags; extend the efx_has_cap() machinery to cover it. Signed-off-by: Edward Cree --- drivers/net/ethernet/sfc/ef100_nic.c | 9 - drivers/net/ethernet/sfc/ef100_nic.h | 1 + drivers/net/ethernet/sfc/mcdi.h | 4 ++-- 3 files changed

[PATCH net-next 09/15] sfc_ef100: process events for MCDI completions

2020-07-03 Thread Edward Cree
Currently RX and TX-completion events are unhandled, as neither the RX nor the TX path has been implemented yet. Signed-off-by: Edward Cree --- drivers/net/ethernet/sfc/ef100_nic.c | 57 +++- 1 file changed, 56 insertions(+), 1 deletion(-) diff --git a/drivers/net

[PATCH net-next 10/15] sfc_ef100: read datapath caps, implement check_caps

2020-07-03 Thread Edward Cree
Signed-off-by: Edward Cree --- drivers/net/ethernet/sfc/ef100_nic.c | 58 +++- drivers/net/ethernet/sfc/ef100_nic.h | 2 + 2 files changed, 58 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/sfc/ef100_nic.c b/drivers/net/ethernet/sfc/ef100_nic.c index

[PATCH net-next 08/15] sfc_ef100: implement ndo_open/close and EVQ probing

2020-07-03 Thread Edward Cree
Channels are probed, but actual event handling is still stubbed out. Stub implementation of check_caps is needed because ptp.c will call into it from efx_ptp_use_mac_tx_timestamps() to decide if it wants TXQs. Signed-off-by: Edward Cree --- drivers/net/ethernet/sfc/ef100_netdev.c | 143

[PATCH net-next 07/15] sfc_ef100: implement MCDI transport

2020-07-03 Thread Edward Cree
Signed-off-by: Edward Cree --- drivers/net/ethernet/sfc/ef100_nic.c | 106 +++ drivers/net/ethernet/sfc/ef100_nic.h | 1 + 2 files changed, 107 insertions(+) diff --git a/drivers/net/ethernet/sfc/ef100_nic.c b/drivers/net/ethernet/sfc/ef100_nic.c index 27e00b003039

[PATCH net-next 06/15] sfc_ef100: don't call efx_reset_down()/up() on EF100

2020-07-03 Thread Edward Cree
We handle everything ourselves in ef100_reset(), rather than relying on the generic down/up routines. Signed-off-by: Edward Cree --- drivers/net/ethernet/sfc/efx_common.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/sfc/efx_common.c b

[PATCH net-next 05/15] sfc_ef100: PHY probe stub

2020-07-03 Thread Edward Cree
We can't actually do the MCDI to probe it fully until we have working MCDI, which comes later, but we need efx->phy_data to be allocated so that when we get MCDI events the link-state change handler doesn't NULL-dereference. Signed-off-by: Edward Cree --- drivers/net/ethernet/sf

[PATCH net-next 04/15] sfc_ef100: reset-handling stub

2020-07-03 Thread Edward Cree
We don't actually do the efx_mcdi_reset() because we don't have MCDI yet. Signed-off-by: Edward Cree --- drivers/net/ethernet/sfc/ef100_nic.c | 50 1 file changed, 50 insertions(+) diff --git a/drivers/net/ethernet/sfc/ef100_nic.c b/drivers/net/et

[PATCH net-next 03/15] sfc_ef100: skeleton EF100 PF driver

2020-07-03 Thread Edward Cree
No TX or RX path, no MCDI, not even an ifup/down handler. Besides stubs, the bulk of the patch deals with reading the Xilinx extended PCIe capability, which tells us where to find our BAR. Signed-off-by: Edward Cree --- drivers/net/ethernet/sfc/Kconfig | 10 + drivers/net/ethernet/sfc

[PATCH net-next 02/15] sfc_ef100: register accesses on EF100

2020-07-03 Thread Edward Cree
EF100 adds a few new valid addresses for efx_writed_page(), as well as a Function Control Window in the BAR whose location is variable. Signed-off-by: Edward Cree --- drivers/net/ethernet/sfc/io.h | 16 +--- drivers/net/ethernet/sfc/net_driver.h | 2 ++ 2 files changed, 15

[PATCH net-next 01/15] sfc_ef100: add EF100 register definitions

2020-07-03 Thread Edward Cree
Signed-off-by: Edward Cree --- drivers/net/ethernet/sfc/ef100_regs.h | 693 ++ 1 file changed, 693 insertions(+) create mode 100644 drivers/net/ethernet/sfc/ef100_regs.h diff --git a/drivers/net/ethernet/sfc/ef100_regs.h b/drivers/net/ethernet/sfc/ef100_regs.h new file

[PATCH net-next 00/15] sfc_ef100: driver for EF100 family NICs, part 1

2020-07-03 Thread Edward Cree
ew other things like ethtool). (Would folks prefer the whole thing submitted in one series? It's 27 patches in total.) Edward Cree (15): sfc_ef100: add EF100 register definitions sfc_ef100: register accesses on EF100 sfc_ef100: skeleton EF100 PF driver sfc_ef100: reset-handling stub

[PATCH v2 net-next 15/16] sfc_ef100: NVRAM selftest support code

2020-07-02 Thread Edward Cree
We have yet another new scheme for NVRAM, and a corresponding new MCDI. Signed-off-by: Edward Cree --- drivers/net/ethernet/sfc/mcdi.c | 62 + drivers/net/ethernet/sfc/mcdi.h | 1 + 2 files changed, 63 insertions(+) diff --git a/drivers/net/ethernet/sfc/mcdi.c

[PATCH v2 net-next 16/16] sfc_ef100: helper function to set default RSS table of given size

2020-07-02 Thread Edward Cree
Signed-off-by: Edward Cree --- drivers/net/ethernet/sfc/mcdi_filters.c | 21 + drivers/net/ethernet/sfc/mcdi_filters.h | 2 ++ 2 files changed, 23 insertions(+) diff --git a/drivers/net/ethernet/sfc/mcdi_filters.c b/drivers/net/ethernet/sfc/mcdi_filters.c index

[PATCH v2 net-next 13/16] sfc_ef100: add EF100 to NIC-revision enumeration

2020-07-02 Thread Edward Cree
Signed-off-by: Edward Cree --- drivers/net/ethernet/sfc/nic_common.h | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/ethernet/sfc/nic_common.h b/drivers/net/ethernet/sfc/nic_common.h index 813f288ab3fe..e04b6817cde3 100644 --- a/drivers/net/ethernet/sfc/nic_common.h +++ b

[PATCH v2 net-next 14/16] sfc_ef100: populate BUFFER_SIZE_BYTES in INIT_RXQ

2020-07-02 Thread Edward Cree
The QDMA subsystem on EF100 needs this information. Signed-off-by: Edward Cree --- drivers/net/ethernet/sfc/mcdi_functions.c | 15 --- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/drivers/net/ethernet/sfc/mcdi_functions.c b/drivers/net/ethernet/sfc/mcdi_functions.c

[PATCH v2 net-next 12/16] sfc: get drvinfo driver name from outside the common code

2020-07-02 Thread Edward Cree
Since ethtool_common.o will be built into both sfc and sfc_ef100 drivers, it can't use KBUILD_MODNAME directly. Instead, make it reference a string provided by the individual driver code. Signed-off-by: Edward Cree --- drivers/net/ethernet/sfc/ethtool.c| 2 ++ drivers/net/eth

[PATCH v2 net-next 10/16] sfc: commonise efx_fini_dmaq

2020-07-02 Thread Edward Cree
Signed-off-by: Edward Cree --- drivers/net/ethernet/sfc/ef10.c | 42 ++- drivers/net/ethernet/sfc/mcdi_functions.c | 38 drivers/net/ethernet/sfc/mcdi_functions.h | 1 + 3 files changed, 41 insertions(+), 40 deletions(-) diff --git a/drivers

[PATCH v2 net-next 11/16] sfc: initialise RSS context ID to 'no RSS context' in efx_init_struct()

2020-07-02 Thread Edward Cree
Previously this was only happening in ef10-specific code. Signed-off-by: Edward Cree --- drivers/net/ethernet/sfc/ef10.c | 2 -- drivers/net/ethernet/sfc/efx_common.c | 1 + 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/ethernet/sfc/ef10.c b/drivers/net

[PATCH v2 net-next 07/16] sfc: assign TXQs without gaps

2020-07-02 Thread Edward Cree
y things, rather than changing tx_queues_per_channel after setting up TXQs, make Siena always probe its HIGHPRI queues at start of day, rather than deferring it until tc mqprio enables them. Signed-off-by: Edward Cree --- drivers/net/ethernet/sfc/ef10.c | 2 +- drivers/net/ethe

[PATCH v2 net-next 08/16] sfc: don't call tx_limit_len if NIC type doesn't have one

2020-07-02 Thread Edward Cree
EF100 doesn't need to split up large DMAs. Signed-off-by: Edward Cree --- drivers/net/ethernet/sfc/tx_common.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/sfc/tx_common.c b/drivers/net/ethernet/sfc/tx_common.c index 2a058b76d1f0..11b64c6

[PATCH v2 net-next 09/16] sfc: factor out efx_mcdi_filter_table_down() from _remove()

2020-07-02 Thread Edward Cree
_down() merely removes all our filters and VLANs, it doesn't free efx->filter_state itself. Signed-off-by: Edward Cree --- drivers/net/ethernet/sfc/mcdi_filters.c | 37 - drivers/net/ethernet/sfc/mcdi_filters.h | 1 + 2 files changed, 25 insertions(+), 13 d

[PATCH v2 net-next 04/16] sfc: move modparam 'rss_cpus' out of common channel code

2020-07-02 Thread Edward Cree
Instead of exposing this old module parameter on the new driver (thus having to keep it forever after for compatibility), let's confine it to the old one; if we find later that we need the feature, we ought to support it properly, with ethtool set-channels. Signed-off-by: Edward

[PATCH v2 net-next 05/16] sfc: make tx_queues_per_channel variable at runtime

2020-07-02 Thread Edward Cree
has in one place. Signed-off-by: Edward Cree --- drivers/net/ethernet/sfc/ef10.c | 13 +- drivers/net/ethernet/sfc/efx_channels.c | 4 +-- drivers/net/ethernet/sfc/efx_common.c | 1 + drivers/net/ethernet/sfc/net_driver.h | 34 ++--- drivers/net/ethernet

[PATCH v2 net-next 06/16] sfc: commonise netif_set_real_num[tr]x_queues calls

2020-07-02 Thread Edward Cree
While we're at it, also check them for failure. Signed-off-by: Edward Cree --- drivers/net/ethernet/sfc/efx.c | 3 --- drivers/net/ethernet/sfc/efx_channels.c | 7 ++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/net/ethernet/sfc/efx.c b/driver

[PATCH v2 net-next 02/16] sfc: remove max_interrupt_mode

2020-07-02 Thread Edward Cree
overrode it). Signed-off-by: Edward Cree --- drivers/net/ethernet/sfc/ef10.c | 2 -- drivers/net/ethernet/sfc/efx_channels.c | 6 -- drivers/net/ethernet/sfc/net_driver.h | 3 --- drivers/net/ethernet/sfc/siena.c| 1 - 4 files changed, 12 deletions(-) diff --git a/d

[PATCH v2 net-next 03/16] sfc: move modparam 'interrupt_mode' out of common channel code

2020-07-02 Thread Edward Cree
EF100 only supports MSI-X, so there's no need for the new driver to expose this old module parameter. Since it's now visible to the linker, we have to rename it internally to efx_interrupt_mode to avoid symbol collisions in non-modular builds. Signed-off-by: Edward Cree --- d

[PATCH v2 net-next 01/16] sfc: support setting MTU even if not privileged to configure MAC fully

2020-07-02 Thread Edward Cree
ther than efx_mcdi_set_mac(). Signed-off-by: Edward Cree --- drivers/net/ethernet/sfc/ef10.c | 15 ++- drivers/net/ethernet/sfc/efx.c| 4 drivers/net/ethernet/sfc/efx_common.c | 12 ++-- drivers/net/ethernet/sfc/efx_common.h | 2 +- drivers/net/et

[PATCH v2 net-next 00/16] sfc: prerequisites for EF100 driver, part 3

2020-07-02 Thread Edward Cree
.net/T/ Edward Cree (16): sfc: support setting MTU even if not privileged to configure MAC fully sfc: remove max_interrupt_mode sfc: move modparam 'interrupt_mode' out of common channel code sfc: move modparam 'rss_cpus' out of common channel code sfc: make tx_queues

Re: [PATCH net-next 01/15] sfc: support setting MTU even if not privileged to configure MAC fully

2020-07-02 Thread Edward Cree
On 02/07/2020 00:16, Jakub Kicinski wrote: > I see. I'm actually asking because of efx_ef10_set_udp_tnl_ports(). > I'd like to rewrite the UDP tunnel code so that > NETIF_F_RX_UDP_TUNNEL_PORT only appears on the interface if it > _really_ can do the offload. ef10 is the only driver I've seen wher

Re: [PATCH net-next 12/15] sfc_ef100: add EF100 to NIC-revision enumeration

2020-07-01 Thread Edward Cree
On 01/07/2020 20:44, David Miller wrote: > Or is this code used as a library by two "drivers"? Yes, it is; there will be a second module 'sfc_ef100.ko'which this  file will be linked into and which will set efx->type to one with  an EF100 revision. Although tbh I have been wondering about another

Re: [PATCH net-next 06/15] sfc: commonise netif_set_real_num[tr]x_queues calls

2020-07-01 Thread Edward Cree
On 01/07/2020 20:05, Jakub Kicinski wrote: > On Wed, 1 Jul 2020 15:53:15 +0100 Edward Cree wrote: >> +netif_set_real_num_tx_queues(efx->net_dev, efx->n_tx_channels); >> +netif_set_real_num_rx_queues(efx->net_dev, efx->n_rx_channels); > For a third time i

Re: [PATCH net-next 01/15] sfc: support setting MTU even if not privileged to configure MAC fully

2020-07-01 Thread Edward Cree
On 01/07/2020 20:03, Jakub Kicinski wrote: > On Wed, 1 Jul 2020 15:51:25 +0100 Edward Cree wrote: >> Unprivileged functions (such as VFs) may set their MTU by use of the >> 'control' field of MC_CMD_SET_MAC_EXT, as used in efx_mcdi_set_mtu(). >> If calling

Re: [PATCH net-next] sfc: remove udp_tnl_has_port

2020-07-01 Thread Edward Cree
On 01/07/2020 19:43, Jakub Kicinski wrote: > There's a number of drivers which try to match the UDP ports. That > seems fragile to me. Is it actually required for HW to operate > correctly? For EF10 hardware, yes, because the hardware parses the packet headers  to find for itself the offsets at wh

[PATCH net-next 14/15] sfc_ef100: NVRAM selftest support code

2020-07-01 Thread Edward Cree
We have yet another new scheme for NVRAM, and a corresponding new MCDI. Signed-off-by: Edward Cree --- drivers/net/ethernet/sfc/mcdi.c | 62 + drivers/net/ethernet/sfc/mcdi.h | 1 + 2 files changed, 63 insertions(+) diff --git a/drivers/net/ethernet/sfc/mcdi.c

[PATCH net-next 15/15] sfc_ef100: helper function to set default RSS table of given size

2020-07-01 Thread Edward Cree
Signed-off-by: Edward Cree --- drivers/net/ethernet/sfc/mcdi_filters.c | 21 + drivers/net/ethernet/sfc/mcdi_filters.h | 2 ++ 2 files changed, 23 insertions(+) diff --git a/drivers/net/ethernet/sfc/mcdi_filters.c b/drivers/net/ethernet/sfc/mcdi_filters.c index

[PATCH net-next 11/15] sfc: initialise RSS context ID to 'no RSS context' in efx_init_struct()

2020-07-01 Thread Edward Cree
Previously this was only happening in ef10-specific code. Signed-off-by: Edward Cree --- drivers/net/ethernet/sfc/ef10.c | 2 -- drivers/net/ethernet/sfc/efx_common.c | 1 + 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/ethernet/sfc/ef10.c b/drivers/net

[PATCH net-next 13/15] sfc_ef100: populate BUFFER_SIZE_BYTES in INIT_RXQ

2020-07-01 Thread Edward Cree
The QDMA subsystem on EF100 needs this information. Signed-off-by: Edward Cree --- drivers/net/ethernet/sfc/mcdi_functions.c | 15 --- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/drivers/net/ethernet/sfc/mcdi_functions.c b/drivers/net/ethernet/sfc/mcdi_functions.c

[PATCH net-next 12/15] sfc_ef100: add EF100 to NIC-revision enumeration

2020-07-01 Thread Edward Cree
Also, condition on revision in ethtool drvinfo: if rev is EF100, then we must be the sfc_ef100 driver. (We can't rely on KBUILD_MODNAME any more, because ethtool_common.o gets linked into both drivers.) Signed-off-by: Edward Cree --- drivers/net/ethernet/sfc/ethtool_common.

[PATCH net-next 10/15] sfc: commonise efx_fini_dmaq

2020-07-01 Thread Edward Cree
Signed-off-by: Edward Cree --- drivers/net/ethernet/sfc/ef10.c | 42 ++- drivers/net/ethernet/sfc/mcdi_functions.c | 38 drivers/net/ethernet/sfc/mcdi_functions.h | 1 + 3 files changed, 41 insertions(+), 40 deletions(-) diff --git a/drivers

[PATCH net-next 09/15] sfc: factor out efx_mcdi_filter_table_down() from _remove()

2020-07-01 Thread Edward Cree
_down() merely removes all our filters and VLANs, it doesn't free efx->filter_state itself. Signed-off-by: Edward Cree --- drivers/net/ethernet/sfc/mcdi_filters.c | 37 - drivers/net/ethernet/sfc/mcdi_filters.h | 1 + 2 files changed, 25 insertions(+), 13 d

[PATCH net-next 08/15] sfc: don't call tx_limit_len if NIC type doesn't have one

2020-07-01 Thread Edward Cree
EF100 doesn't need to split up large DMAs. Signed-off-by: Edward Cree --- drivers/net/ethernet/sfc/tx_common.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/sfc/tx_common.c b/drivers/net/ethernet/sfc/tx_common.c index 2a058b76d1f0..11b64c6

[PATCH net-next 07/15] sfc: assign TXQs without gaps

2020-07-01 Thread Edward Cree
y things, rather than changing tx_queues_per_channel after setting up TXQs, make Siena always probe its HIGHPRI queues at start of day, rather than deferring it until tc mqprio enables them. Signed-off-by: Edward Cree --- drivers/net/ethernet/sfc/ef10.c | 2 +- drivers/net/ethe

[PATCH net-next 06/15] sfc: commonise netif_set_real_num[tr]x_queues calls

2020-07-01 Thread Edward Cree
Signed-off-by: Edward Cree --- drivers/net/ethernet/sfc/efx.c | 3 --- drivers/net/ethernet/sfc/efx_channels.c | 4 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/sfc/efx.c b/drivers/net/ethernet/sfc/efx.c index f4173f855438..9f659cc34252 100644

[PATCH net-next 05/15] sfc: make tx_queues_per_channel variable at runtime

2020-07-01 Thread Edward Cree
has in one place. Signed-off-by: Edward Cree --- drivers/net/ethernet/sfc/ef10.c | 13 +- drivers/net/ethernet/sfc/efx_channels.c | 4 +-- drivers/net/ethernet/sfc/efx_common.c | 1 + drivers/net/ethernet/sfc/net_driver.h | 34 ++--- drivers/net/ethernet

[PATCH net-next 04/15] sfc: move modparam 'rss_cpus' out of common channel code

2020-07-01 Thread Edward Cree
Instead of exposing this old module parameter on the new driver (thus having to keep it forever after for compatibility), let's confine it to the old one; if we find later that we need the feature, we ought to support it properly, with ethtool set-channels. Signed-off-by: Edward

[PATCH net-next 02/15] sfc: remove max_interrupt_mode

2020-07-01 Thread Edward Cree
overrode it). Signed-off-by: Edward Cree --- drivers/net/ethernet/sfc/ef10.c | 2 -- drivers/net/ethernet/sfc/efx_channels.c | 6 -- drivers/net/ethernet/sfc/net_driver.h | 3 --- drivers/net/ethernet/sfc/siena.c| 1 - 4 files changed, 12 deletions(-) diff --git a/d

[PATCH net-next 03/15] sfc: move modparam 'interrupt_mode' out of common channel code

2020-07-01 Thread Edward Cree
EF100 only supports MSI-X, so there's no need for the new driver to expose this old module parameter. Signed-off-by: Edward Cree --- drivers/net/ethernet/sfc/efx.c | 4 drivers/net/ethernet/sfc/efx_channels.c | 5 + drivers/net/ethernet/sfc/efx_channels.h | 2 ++ 3

[PATCH net-next 01/15] sfc: support setting MTU even if not privileged to configure MAC fully

2020-07-01 Thread Edward Cree
ac() fails EPERM, then fall back to efx_mcdi_set_mtu(). Signed-off-by: Edward Cree --- drivers/net/ethernet/sfc/ef10.c | 16 drivers/net/ethernet/sfc/efx.c| 4 drivers/net/ethernet/sfc/efx_common.c | 12 ++-- drivers/net/ethernet/sfc/ef

[PATCH net-next 00/15] sfc: prerequisites for EF100 driver, part 3

2020-07-01 Thread Edward Cree
e of the existing sfc driver) been. [1]: https://lore.kernel.org/netdev/20200629.173812.1532344417590172093.da...@davemloft.net/T/ [2]: https://lore.kernel.org/netdev/20200630.130923.402514193016248355.da...@davemloft.net/T/ Edward Cree (15): sfc: support setting MTU even if not privilege

Re: [PATCH net-next] sfc: remove udp_tnl_has_port

2020-07-01 Thread Edward Cree
ethod would be called from our ndo_features_check(). I'll try to get to upstreaming that support after ef100 is in, hopefully  within this cycle, but if you don't want this dead code lying around in  the meantime then have an Acked-by: Edward Cree  and I can revert it when I add the code t

[PATCH net-next 14/14] sfc: don't call tx_remove if there isn't one

2020-06-30 Thread Edward Cree
EF100 won't have an efx->type->tx_remove method, because there's nothing for it to do. So make the call conditional. Signed-off-by: Edward Cree --- drivers/net/ethernet/sfc/nic_common.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/

[PATCH net-next 13/14] sfc: commonise initialisation of efx->vport_id

2020-06-30 Thread Edward Cree
Signed-off-by: Edward Cree --- drivers/net/ethernet/sfc/ef10.c | 2 -- drivers/net/ethernet/sfc/efx_common.c | 1 + 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/ethernet/sfc/ef10.c b/drivers/net/ethernet/sfc/ef10.c index a3bf9d8023d7..5faf2f0e4d62 100644 --- a

[PATCH net-next 12/14] sfc: commonise efx->[rt]xq_entries initialisation

2020-06-30 Thread Edward Cree
Signed-off-by: Edward Cree --- drivers/net/ethernet/sfc/efx.c| 1 - drivers/net/ethernet/sfc/efx_common.c | 3 +++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/sfc/efx.c b/drivers/net/ethernet/sfc/efx.c index 41a2c972323e..028d826ab147 100644 --- a

<    1   2   3   4   5   6   7   8   9   10   >