~john-cabaj/ubuntu/+source/linux-gcp/+git/mantic-idpf:idpf

Last commit made on 2024-01-19
Get this branch:
git clone -b idpf https://git.launchpad.net/~john-cabaj/ubuntu/+source/linux-gcp/+git/mantic-idpf
Only John Cabaj can upload to this branch. If you are John Cabaj please log in for upload directions.

Branch merges

Branch information

Recent commits

7f248d3... by John Cabaj

UBUNTU: [Config] gcp: Adding support for IDPF driver

BugLink: https://bugs.launchpad.net/bugs/2039720

Signed-off-by: John Cabaj <email address hidden>

7fb48a9... by Bartosz Pawlowski <email address hidden>

PCI: Disable ATS for specific Intel IPU E2000 devices

BugLink: https://bugs.launchpad.net/bugs/2039720

Due to a hardware issue in A and B steppings of Intel IPU E2000, it expects
wrong endianness in ATS invalidation message body. This problem can lead to
outdated translations being returned as valid and finally cause system
instability.

To prevent such issues, add quirk_intel_e2000_no_ats() to disable ATS for
vulnerable IPU E2000 devices.

Link: https://<email address hidden>
Signed-off-by: Bartosz Pawlowski <email address hidden>
Signed-off-by: Bjorn Helgaas <email address hidden>
Reviewed-by: Andy Shevchenko <email address hidden>
Reviewed-by: Alexander Lobakin <email address hidden>
(cherry picked from commit a18615b1cfc04f00548c60eb9a77e0ce56e848fd)
Signed-off-by: John Cabaj <email address hidden>

ab2b9b5... by Bartosz Pawlowski <email address hidden>

PCI: Extract ATS disabling to a helper function

BugLink: https://bugs.launchpad.net/bugs/2039720

Introduce quirk_no_ats() helper function to provide a standard way to
disable ATS capability in PCI quirks.

Suggested-by: Andy Shevchenko <email address hidden>
Link: https://<email address hidden>
Signed-off-by: Bartosz Pawlowski <email address hidden>
Signed-off-by: Bjorn Helgaas <email address hidden>
Reviewed-by: Andy Shevchenko <email address hidden>
(cherry picked from commit f18b1137d38c091cc8c16365219f0a1d4a30b3d1)
Signed-off-by: John Cabaj <email address hidden>

6e638f4... by Jakub Kicinski <email address hidden>

eth: stmmac: let page recycling happen with skbs

BugLink: https://bugs.launchpad.net/bugs/2039720

stmmac removes pages from the page pool after attaching them
to skbs. Use page recycling instead.

skb heads are always copied, and pages are always from page
pool in this driver. We could as well mark all allocated skbs
for recycling.

Reviewed-by: Yunsheng Lin <email address hidden>
Link: https://<email address hidden>
Reviewed-by: Alexander Lobakin <email address hidden>
Signed-off-by: Jakub Kicinski <email address hidden>
(cherry picked from commit 98e2727c79d007d99a026eb66f481908e66af263)
Signed-off-by: John Cabaj <email address hidden>

5d1aa5e... by Jakub Kicinski <email address hidden>

eth: tsnep: let page recycling happen with skbs

BugLink: https://bugs.launchpad.net/bugs/2039720

tsnep builds an skb with napi_build_skb() and then calls
page_pool_release_page() for the page in which that skb's
head sits. Use recycling instead, recycling of heads works
just fine.

Reviewed-by: Yunsheng Lin <email address hidden>
Link: https://<email address hidden>
Reviewed-by: Alexander Lobakin <email address hidden>
Signed-off-by: Jakub Kicinski <email address hidden>
(cherry picked from commit b03f68ba26c85671c6734b14ea37a5955b0fb8d3)
Signed-off-by: John Cabaj <email address hidden>

35c0d6d... by Joshua Hay <email address hidden>

idpf: add SRIOV support and other ndo_ops

BugLink: https://bugs.launchpad.net/bugs/2039720

Add support for SRIOV: send the requested number of VFs
to the device Control Plane, via the virtchnl message
and then enable the VFs using 'pci_enable_sriov'.

Add other ndo ops supported by the driver such as features_check,
set_rx_mode, validate_addr, set_mac_address, change_mtu, get_stats64,
set_features, and tx_timeout. Initialize the statistics task which
requests the queue related statistics to the CP. Add loopback
and promiscuous mode support and the respective virtchnl messages.

Finally, add documentation and build support for the driver.

Signed-off-by: Joshua Hay <email address hidden>
Co-developed-by: Alan Brady <email address hidden>
Signed-off-by: Alan Brady <email address hidden>
Co-developed-by: Madhu Chittim <email address hidden>
Signed-off-by: Madhu Chittim <email address hidden>
Co-developed-by: Phani Burra <email address hidden>
Signed-off-by: Phani Burra <email address hidden>
Reviewed-by: Sridhar Samudrala <email address hidden>
Reviewed-by: Willem de Bruijn <email address hidden>
Co-developed-by: Pavan Kumar Linga <email address hidden>
Signed-off-by: Pavan Kumar Linga <email address hidden>
Signed-off-by: Tony Nguyen <email address hidden>
(cherry picked from commit a251eee62133774cf35ff829041377e721ef9c8c)
Signed-off-by: John Cabaj <email address hidden>

291c86e... by Alan Brady <email address hidden>

idpf: add ethtool callbacks

BugLink: https://bugs.launchpad.net/bugs/2039720

Initialize all the ethtool ops that are supported by the driver and
add the necessary support for the ethtool callbacks. Also add
asynchronous link notification virtchnl support where the device
Control Plane sends the link status and link speed as an
asynchronous event message. Driver report the link speed on
ethtool .idpf_get_link_ksettings query.

Introduce soft reset function which is used by some of the ethtool
callbacks such as .set_channels, .set_ringparam etc. to change the
existing queue configuration. It deletes the existing queues by sending
delete queues virtchnl message to the CP and calls the 'vport_stop' flow
which disables the queues, vport etc. New set of queues are requested to
the CP and reconfigure the queue context by calling the 'vport_open'
flow. Soft reset flow also adjusts the number of vectors associated to a
vport if .set_channels is called.

Signed-off-by: Alan Brady <email address hidden>
Co-developed-by: Alice Michael <email address hidden>
Signed-off-by: Alice Michael <email address hidden>
Co-developed-by: Joshua Hay <email address hidden>
Signed-off-by: Joshua Hay <email address hidden>
Co-developed-by: Phani Burra <email address hidden>
Signed-off-by: Phani Burra <email address hidden>
Reviewed-by: Sridhar Samudrala <email address hidden>
Reviewed-by: Willem de Bruijn <email address hidden>
Co-developed-by: Pavan Kumar Linga <email address hidden>
Signed-off-by: Pavan Kumar Linga <email address hidden>
Signed-off-by: Tony Nguyen <email address hidden>
(cherry picked from commit 02cbfba1add5bd9088c7d14c6b93b77a6ea8f3bb)
Signed-off-by: John Cabaj <email address hidden>

7dc1018... by Joshua Hay <email address hidden>

idpf: add singleq start_xmit and napi poll

BugLink: https://bugs.launchpad.net/bugs/2039720

Add the start_xmit, TX and RX napi poll support for the single queue
model. Unlike split queue model, single queue uses same queue to post
buffer descriptors and completed descriptors.

Signed-off-by: Joshua Hay <email address hidden>
Co-developed-by: Alan Brady <email address hidden>
Signed-off-by: Alan Brady <email address hidden>
Co-developed-by: Madhu Chittim <email address hidden>
Signed-off-by: Madhu Chittim <email address hidden>
Co-developed-by: Phani Burra <email address hidden>
Signed-off-by: Phani Burra <email address hidden>
Reviewed-by: Sridhar Samudrala <email address hidden>
Reviewed-by: Willem de Bruijn <email address hidden>
Co-developed-by: Pavan Kumar Linga <email address hidden>
Signed-off-by: Pavan Kumar Linga <email address hidden>
Signed-off-by: Tony Nguyen <email address hidden>
(cherry picked from commit a5ab9ee0df0be82aefb099d29b707d2b106e1c87)
Signed-off-by: John Cabaj <email address hidden>

d09b405... by Alan Brady <email address hidden>

idpf: add RX splitq napi poll support

BugLink: https://bugs.launchpad.net/bugs/2039720

Add support to handle interrupts for the RX completion queue and
RX buffer queue. When the interrupt fires on RX completion queue,
process the RX descriptors that are received. Allocate and prepare
the SKB with the RX packet info, for both data and header buffer.

IDPF uses software maintained refill queues to manage buffers between
RX queue producer and the buffer queue consumer. They are required in
order to maintain a lockless buffer management system and are strictly
software only constructs. Instead of updating the RX buffer queue tail
with available buffers right after the clean routine, it posts the
buffer ids to the refill queues, only to post them to the HW later.

If the generic receive offload (GRO) is enabled in the capabilities
and turned on by default or via ethtool, then HW performs the
packet coalescing if certain criteria are met by the incoming
packets and updates the RX descriptor. Similar to GRO, if generic
checksum is enabled, HW computes the checksum and updates the
respective fields in the descriptor. Add support to update the
SKB fields with the GRO and the generic checksum received.

Signed-off-by: Alan Brady <email address hidden>
Co-developed-by: Joshua Hay <email address hidden>
Signed-off-by: Joshua Hay <email address hidden>
Co-developed-by: Madhu Chittim <email address hidden>
Signed-off-by: Madhu Chittim <email address hidden>
Co-developed-by: Phani Burra <email address hidden>
Signed-off-by: Phani Burra <email address hidden>
Reviewed-by: Sridhar Samudrala <email address hidden>
Reviewed-by: Willem de Bruijn <email address hidden>
Acked-by: Jakub Kicinski <email address hidden>
Co-developed-by: Pavan Kumar Linga <email address hidden>
Signed-off-by: Pavan Kumar Linga <email address hidden>
Signed-off-by: Tony Nguyen <email address hidden>
(cherry picked from commit 3a8845af66edb340ba9210bb8a0da040c7d6e590)
Signed-off-by: John Cabaj <email address hidden>

27c396f... by Joshua Hay <email address hidden>

idpf: add TX splitq napi poll support

BugLink: https://bugs.launchpad.net/bugs/2039720

Add support to handle the interrupts for the TX completion queue and
process the various completion types.

In the flow scheduling mode, the driver processes primarily buffer
completions as well as descriptor completions occasionally. This mode
supports out of order TX completions. To do so, HW generates one buffer
completion per packet. Each of those completions contains the unique tag
provided during the TX encoding which is used to locate the packet either
on the TX buffer ring or in a hash table. The hash table is used to track
TX buffer information so the descriptor(s) for a given packet can be
reused while the driver is still waiting on the buffer completion(s).

Packets end up in the hash table in one of 2 ways: 1) a packet was
stashed during descriptor completion cleaning, or 2) because an out of
order buffer completion was processed. A descriptor completion arrives
only every so often and is primarily used to guarantee the TX descriptor
ring can be reused without having to wait on the individual buffer
completions. E.g. a descriptor completion for N+16 guarantees HW read all
of the descriptors for packets N through N+15, therefore all of the
buffers for packets N through N+15 are stashed into the hash table and the
descriptors can be reused for more TX packets. Similarly, a packet can be
stashed in the hash table because an out an order buffer completion was
processed. E.g. processing a buffer completion for packet N+3 implies that
HW read all of the descriptors for packets N through N+3 and they can be
reused. However, the HW did not do the DMA yet. The buffers for packets N
through N+2 cannot be freed, so they are stashed in the hash table.
In either case, the buffer completions will eventually be processed for
all of the stashed packets, and all of the buffers will be cleaned from
the hash table.

In queue based scheduling mode, the driver processes primarily descriptor
completions and cleans the TX ring the conventional way.

Finally, the driver triggers a TX queue drain after sending the disable
queues virtchnl message. When the HW completes the queue draining, it
sends the driver a queue marker packet completion. The driver determines
when all TX queues have been drained and proceeds with the disable flow.

With this, the driver can send TX packets and clean up the resources
properly.

Signed-off-by: Joshua Hay <email address hidden>
Co-developed-by: Alan Brady <email address hidden>
Signed-off-by: Alan Brady <email address hidden>
Co-developed-by: Madhu Chittim <email address hidden>
Signed-off-by: Madhu Chittim <email address hidden>
Co-developed-by: Phani Burra <email address hidden>
Signed-off-by: Phani Burra <email address hidden>
Reviewed-by: Sridhar Samudrala <email address hidden>
Reviewed-by: Willem de Bruijn <email address hidden>
Co-developed-by: Pavan Kumar Linga <email address hidden>
Signed-off-by: Pavan Kumar Linga <email address hidden>
Signed-off-by: Tony Nguyen <email address hidden>
(cherry picked from commit c2d548cad1508d334517bcbd7cd5c915cc831fc0)
Signed-off-by: John Cabaj <email address hidden>