History log of /linux-master/drivers/net/ethernet/sfc/ef100_nic.h
Revision Date Author Comments
# fa78b017 15-Feb-2023 Alejandro Lucero <alejandro.lucero-palau@amd.com>

sfc: add support for devlink port_function_hw_addr_get in ef100

Using the builtin client handle id infrastructure, add support for
obtaining the mac address linked to mports in ef100. This implies
to execute an MCDI command for getting the data from the firmware
for each devlink port.

Signed-off-by: Alejandro Lucero <alejandro.lucero-palau@amd.com>
Reviewed-by: Jiri Pirko <jiri@nvidia.com>
Acked-by: Martin Habets <habetsm.xilinx@gmail.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>


# 7e056e23 15-Feb-2023 Alejandro Lucero <alejandro.lucero-palau@amd.com>

sfc: obtain device mac address based on firmware handle for ef100

Getting device mac address is currently based on a specific MCDI command
only available for the PF. This patch changes the MCDI command to a
generic one for PFs and VFs based on a client handle. This allows both
PFs and VFs to ask for their mac address during initialization using the
CLIENT_HANDLE_SELF.

Moreover, the patch allows other client handles which will be used by
the PF to ask for mac addresses linked to VFs. This is necessary for
suporting the port_function_hw_addr_get devlink function in further
patches.

Signed-off-by: Alejandro Lucero <alejandro.lucero-palau@amd.com>
Acked-by: Martin Habets <habetsm.xilinx@gmail.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>


# a6a15aca 15-Feb-2023 Alejandro Lucero <alejandro.lucero-palau@amd.com>

sfc: enumerate mports in ef100

MAE ports (mports) are the ports on the EF100 embedded switch such
as networking PCIe functions, the physical port, and potentially
others.

Signed-off-by: Alejandro Lucero <alejandro.lucero-palau@amd.com>
Acked-by: Martin Habets <habetsm.xilinx@gmail.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>


# 6f6838aa 28-Jul-2022 Edward Cree <ecree.xilinx@gmail.com>

sfc: determine wire m-port at EF100 PF probe time

Traffic delivered to the (MAE admin) PF could be from either the wire
or a VF. The INGRESS_MPORT field of the RX prefix distinguishes these;
base_mport is the value this field will have for traffic from the wire
(which should be delivered to the PF's netdevice, not a representor).

Signed-off-by: Edward Cree <ecree.xilinx@gmail.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>


# 95287e1b 20-Jul-2022 Edward Cree <ecree.xilinx@gmail.com>

sfc: detect ef100 MAE admin privilege/capability at probe time

One PCIe function per network port (more precisely, per m-port group) is
responsible for configuring the Match-Action Engine which performs
switching and packet modification in the slice to support flower/OVS
offload. The GRP_MAE bit in the privilege mask indicates whether a
given function has this capability.
At probe time, call MCDIs to read the calling function's privilege mask,
and store the GRP_MAE bit in a new ef100_nic_data member.

Signed-off-by: Edward Cree <ecree.xilinx@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


# 98ff4c7c 28-Jun-2022 Jonathan Cooper <jonathan.s.cooper@amd.com>

sfc: Separate netdev probe/remove from PCI probe/remove

The netdev probe will be used when moving from vDPA to EF100 BAR config.
The netdev remove will be used when moving from EF100 to vDPA BAR config.

In the process, change several log messages to pci_ instead of netif_
to remove the "(unregistered net_device)" text.

Signed-off-by: Jonathan Cooper <jonathan.s.cooper@amd.com>
Co-developed-by: Martin Habets <habetsm.xilinx@gmail.com>
Signed-off-by: Martin Habets <habetsm.xilinx@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


# d61592a1 03-Aug-2020 Edward Cree <ecree@solarflare.com>

sfc_ef100: add nic-type for VFs, and bind to them

We don't yet have a .sriov_configure() to create them, though.

Signed-off-by: Edward Cree <ecree@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


# ef2c57b9 03-Aug-2020 Edward Cree <ecree@solarflare.com>

sfc_ef100: read pf_index at probe time

We'll need it later, for VF representors.

Signed-off-by: Edward Cree <ecree@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


# b593b6f1 03-Aug-2020 Edward Cree <ecree@solarflare.com>

sfc_ef100: statistics gathering

MAC stats work much the same as on EF10, with a periodic DMA to a region
specified via an MCDI.

Signed-off-by: Edward Cree <ecree@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


# adcfc348 03-Aug-2020 Edward Cree <ecree@solarflare.com>

sfc_ef100: read Design Parameters at probe time

Several parts of the EF100 architecture are parameterised (to allow
varying capabilities on FPGAs according to resource constraints), and
these parameters are exposed to the driver through a TLV-encoded
region of the BAR.
For the most part we either don't care about these values at all or
just need to sanity-check them against the driver's assumptions, but
there are a number of TSO limits which we record so that we will be
able to check against them in the TX path when handling GSO skbs.

Signed-off-by: Edward Cree <ecree@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


# 29ec1b27 27-Jul-2020 Edward Cree <ecree@solarflare.com>

sfc_ef100: read device MAC address at probe time

Signed-off-by: Edward Cree <ecree@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


# d802b0ae 26-Jul-2020 Edward Cree <ecree@solarflare.com>

sfc_ef100: extend ef100_check_caps to cover datapath_caps3

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 <ecree@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


# f6573120 26-Jul-2020 Edward Cree <ecree@solarflare.com>

sfc_ef100: read datapath caps, implement check_caps

Signed-off-by: Edward Cree <ecree@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


# 965b549f 26-Jul-2020 Edward Cree <ecree@solarflare.com>

sfc_ef100: implement ndo_open/close and EVQ probing

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 <ecree@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


# 2200e6d9 26-Jul-2020 Edward Cree <ecree@solarflare.com>

sfc_ef100: implement MCDI transport

Signed-off-by: Edward Cree <ecree@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


# 51b35a45 26-Jul-2020 Edward Cree <ecree@solarflare.com>

sfc: skeleton EF100 PF driver

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.

Though in the same module, EF100 has its own struct pci_driver,
which is named sfc_ef100.

A small number of additional nic_type methods are added; those in the
TX (tx_enqueue) and RX (rx_packet) paths are called through indirect
call wrappers to minimise the performance impact.

Signed-off-by: Edward Cree <ecree@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>