From: "Romanowski, Rafal" <rafal.romanowski@intel.com>
To: "Polchlopek, Mateusz" <mateusz.polchlopek@intel.com>,
"intel-wired-lan@lists.osuosl.org"
<intel-wired-lan@lists.osuosl.org>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"Keller, Jacob E" <jacob.e.keller@intel.com>,
"Polchlopek, Mateusz" <mateusz.polchlopek@intel.com>
Subject: Re: [Intel-wired-lan] [PATCH iwl-next v12 11/14] iavf: refactor iavf_clean_rx_irq to support legacy and flex descriptors
Date: Mon, 4 Nov 2024 11:04:27 +0000 [thread overview]
Message-ID: <SJ0PR11MB5865582655B88ADFDFB4393D8F512@SJ0PR11MB5865.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20241022114121.61284-12-mateusz.polchlopek@intel.com>
> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@osuosl.org> On Behalf Of
> Mateusz Polchlopek
> Sent: Tuesday, October 22, 2024 1:41 PM
> To: intel-wired-lan@lists.osuosl.org
> Cc: netdev@vger.kernel.org; Keller, Jacob E <jacob.e.keller@intel.com>;
> Polchlopek, Mateusz <mateusz.polchlopek@intel.com>
> Subject: [Intel-wired-lan] [PATCH iwl-next v12 11/14] iavf: refactor
> iavf_clean_rx_irq to support legacy and flex descriptors
>
> From: Jacob Keller <jacob.e.keller@intel.com>
>
> Using VIRTCHNL_VF_OFFLOAD_FLEX_DESC, the iAVF driver is capable of
> negotiating to enable the advanced flexible descriptor layout. Add the flexible
> NIC layout (RXDID=2) as a member of the Rx descriptor union.
>
> Also add bit position definitions for the status and error indications that are
> needed.
>
> The iavf_clean_rx_irq function needs to extract a few fields from the Rx
> descriptor, including the size, rx_ptype, and vlan_tag.
> Move the extraction to a separate function that decodes the fields into a
> structure. This will reduce the burden for handling multiple descriptor types by
> keeping the relevant extraction logic in one place.
>
> To support handling an additional descriptor format with minimal code
> duplication, refactor Rx checksum handling so that the general logic is separated
> from the bit calculations. Introduce an iavf_rx_desc_decoded structure which
> holds the relevant bits decoded from the Rx descriptor.
> This will enable implementing flexible descriptor handling without duplicating the
> general logic twice.
>
> Introduce an iavf_extract_flex_rx_fields, iavf_flex_rx_hash, and
> iavf_flex_rx_csum functions which operate on the flexible NIC descriptor format
> instead of the legacy 32 byte format. Based on the negotiated RXDID, select the
> correct function for processing the Rx descriptors.
>
> With this change, the Rx hot path should be functional when using either the
> default legacy 32byte format or when we switch to the flexible NIC layout.
>
> Modify the Rx hot path to add support for the flexible descriptor format and add
> request enabling Rx timestamps for all queues.
>
> As in ice, make sure we bump the checksum level if the hardware detected a
> packet type which could have an outer checksum. This is important because
> hardware only verifies the inner checksum.
>
> Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
> Co-developed-by: Mateusz Polchlopek <mateusz.polchlopek@intel.com>
> Signed-off-by: Mateusz Polchlopek <mateusz.polchlopek@intel.com>
> ---
> drivers/net/ethernet/intel/iavf/iavf_txrx.c | 354 ++++++++++++++------
> drivers/net/ethernet/intel/iavf/iavf_type.h | 127 ++++---
> 2 files changed, 327 insertions(+), 154 deletions(-)
>
> diff --git a/drivers/net/ethernet/intel/iavf/iavf_txrx.c
> b/drivers/net/ethernet/intel/iavf/iavf_txrx.c
> index 46745ebc9c1f..89b71509e521 100644
> --- a/drivers/net/ethernet/intel/iavf/iavf_txrx.c
> +++ b/drivers/net/ethernet/intel/iavf/iavf_txrx.c
> @@ -896,59 +896,43 @@ bool iavf_alloc_rx_buffers(struct iavf_ring *rx_ring,
Tested-by: Rafal Romanowski <rafal.romanowski@intel.com>
next prev parent reply other threads:[~2024-11-04 11:04 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-22 11:41 [Intel-wired-lan] [PATCH iwl-next v12 00/14] Add support for Rx timestamping for both ice and iavf drivers Mateusz Polchlopek
2024-10-22 11:41 ` [Intel-wired-lan] [PATCH iwl-next v12 01/14] virtchnl: add support for enabling PTP on iAVF Mateusz Polchlopek
2024-11-04 10:50 ` Romanowski, Rafal
2024-10-22 11:41 ` [Intel-wired-lan] [PATCH iwl-next v12 02/14] ice: support Rx timestamp on flex descriptor Mateusz Polchlopek
2024-11-04 10:51 ` Romanowski, Rafal
2024-10-22 11:41 ` [Intel-wired-lan] [PATCH iwl-next v12 03/14] virtchnl: add enumeration for the rxdid format Mateusz Polchlopek
2024-11-04 10:52 ` Romanowski, Rafal
2024-10-22 11:41 ` [Intel-wired-lan] [PATCH iwl-next v12 04/14] iavf: add support for negotiating flexible RXDID format Mateusz Polchlopek
2024-11-04 10:53 ` Romanowski, Rafal
2024-10-22 11:41 ` [Intel-wired-lan] [PATCH iwl-next v12 05/14] iavf: negotiate PTP capabilities Mateusz Polchlopek
2024-11-04 10:54 ` Romanowski, Rafal
2024-10-22 11:41 ` [Intel-wired-lan] [PATCH iwl-next v12 06/14] iavf: add initial framework for registering PTP clock Mateusz Polchlopek
2024-11-04 11:00 ` Romanowski, Rafal
2024-10-22 11:41 ` [Intel-wired-lan] [PATCH iwl-next v12 07/14] iavf: add support for indirect access to PHC time Mateusz Polchlopek
2024-11-04 11:01 ` Romanowski, Rafal
2024-10-22 11:41 ` [Intel-wired-lan] [PATCH iwl-next v12 08/14] iavf: periodically cache " Mateusz Polchlopek
2024-11-04 11:01 ` Romanowski, Rafal
2024-10-22 11:41 ` [Intel-wired-lan] [PATCH iwl-next v12 09/14] libeth: move idpf_rx_csum_decoded and idpf_rx_extracted Mateusz Polchlopek
2024-11-04 11:02 ` Romanowski, Rafal
2024-10-22 11:41 ` [Intel-wired-lan] [PATCH iwl-next v12 10/14] iavf: define Rx descriptors as qwords Mateusz Polchlopek
2024-11-04 11:03 ` Romanowski, Rafal
2024-10-22 11:41 ` [Intel-wired-lan] [PATCH iwl-next v12 11/14] iavf: refactor iavf_clean_rx_irq to support legacy and flex descriptors Mateusz Polchlopek
2024-11-04 11:04 ` Romanowski, Rafal [this message]
2024-10-22 11:41 ` [Intel-wired-lan] [PATCH iwl-next v12 12/14] iavf: Implement checking DD desc field Mateusz Polchlopek
2024-11-04 11:05 ` Romanowski, Rafal
2024-10-22 11:41 ` [Intel-wired-lan] [PATCH iwl-next v12 13/14] iavf: handle set and get timestamps ops Mateusz Polchlopek
2024-11-04 11:05 ` Romanowski, Rafal
2024-10-22 11:41 ` [Intel-wired-lan] [PATCH iwl-next v12 14/14] iavf: add support for Rx timestamps to hotpath Mateusz Polchlopek
2024-11-04 11:06 ` Romanowski, Rafal
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=SJ0PR11MB5865582655B88ADFDFB4393D8F512@SJ0PR11MB5865.namprd11.prod.outlook.com \
--to=rafal.romanowski@intel.com \
--cc=intel-wired-lan@lists.osuosl.org \
--cc=jacob.e.keller@intel.com \
--cc=mateusz.polchlopek@intel.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox