From: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
To: Michal Kubiak <michal.kubiak@intel.com>
Cc: <intel-wired-lan@lists.osuosl.org>, <netdev@vger.kernel.org>,
<przemyslaw.kitszel@intel.com>,
Michal Swiatkowski <michal.swiatkowski@intel.com>
Subject: Re: [PATCH iwl-next] ice: add a separate Rx handler for flow director commands
Date: Wed, 14 May 2025 12:26:40 +0200 [thread overview]
Message-ID: <aCRv4Bqi1+9BeBK4@boxer> (raw)
In-Reply-To: <20250321151357.28540-1-michal.kubiak@intel.com>
On Fri, Mar 21, 2025 at 04:13:57PM +0100, Michal Kubiak wrote:
> The "ice" driver implementation uses the control VSI to handle
> the flow director configuration for PFs and VFs.
>
> Unfortunately, although a separate VSI type was created to handle flow
> director queues, the Rx queue handler was shared between the flow
> director and a standard NAPI Rx handler.
>
> Such a design approach was not very flexible. First, it mixed hotpath
> and slowpath code, blocking their further optimization. It also created
> a huge overkill for the flow director command processing, which is
> descriptor-based only, so there is no need to allocate Rx data buffers.
>
> For the above reasons, implement a separate Rx handler for the control
> VSI. Also, remove from the NAPI handler the code dedicated to
> configuring the flow director rules on VFs.
> Do not allocate Rx data buffers to the flow director queues because
> their processing is descriptor-based only.
> Finally, allow Rx data queues to be allocated only for VSIs that have
> netdev assigned to them.
>
> This handler splitting approach is the first step in converting the
> driver to use the Page Pool (which can only be used for data queues).
>
> Test hints:
> 1. Create a VF for any PF managed by the ice driver.
> 2. In a loop, add and delete flow director rules for the VF, e.g.:
>
> for i in {1..128}; do
> q=$(( i % 16 ))
> ethtool -N ens802f0v0 flow-type tcp4 dst-port "$i" action "$q"
> done
>
> for i in {0..127}; do
> ethtool -N ens802f0v0 delete "$i"
> done
>
> Suggested-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
> Suggested-by: Michal Swiatkowski <michal.swiatkowski@intel.com>
> Acked-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
> Signed-off-by: Michal Kubiak <michal.kubiak@intel.com>
> ---
(...)
> diff --git a/drivers/net/ethernet/intel/ice/ice_txrx.h b/drivers/net/ethernet/intel/ice/ice_txrx.h
> index 4b63081629d0..041768df0b23 100644
> --- a/drivers/net/ethernet/intel/ice/ice_txrx.h
> +++ b/drivers/net/ethernet/intel/ice/ice_txrx.h
> @@ -492,6 +492,7 @@ static inline unsigned int ice_rx_pg_order(struct ice_rx_ring *ring)
>
> union ice_32b_rx_flex_desc;
>
> +void ice_init_ctrl_rx_descs(struct ice_rx_ring *rx_ring, u32 num_descs);
> bool ice_alloc_rx_bufs(struct ice_rx_ring *rxr, unsigned int cleaned_count);
> netdev_tx_t ice_start_xmit(struct sk_buff *skb, struct net_device *netdev);
> u16
> @@ -512,4 +513,5 @@ ice_prgm_fdir_fltr(struct ice_vsi *vsi, struct ice_fltr_desc *fdir_desc,
> u8 *raw_packet);
> int ice_clean_rx_irq(struct ice_rx_ring *rx_ring, int budget);
this can now become static as it's not called from ice_lib.c anymore.
can you address this in v2 if this patch got lost and has not been merged
yet?
> void ice_clean_ctrl_tx_irq(struct ice_tx_ring *tx_ring);
> +void ice_clean_ctrl_rx_irq(struct ice_rx_ring *rx_ring);
> #endif /* _ICE_TXRX_H_ */
> --
> 2.45.2
>
next prev parent reply other threads:[~2025-05-14 10:27 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-21 15:13 [PATCH iwl-next] ice: add a separate Rx handler for flow director commands Michal Kubiak
2025-03-21 22:52 ` [Intel-wired-lan] " Keller, Jacob E
2025-03-24 10:07 ` Przemek Kitszel
2025-04-09 19:14 ` Simon Horman
2025-05-14 10:26 ` Maciej Fijalkowski [this message]
2025-05-14 12:33 ` Michal Kubiak
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=aCRv4Bqi1+9BeBK4@boxer \
--to=maciej.fijalkowski@intel.com \
--cc=intel-wired-lan@lists.osuosl.org \
--cc=michal.kubiak@intel.com \
--cc=michal.swiatkowski@intel.com \
--cc=netdev@vger.kernel.org \
--cc=przemyslaw.kitszel@intel.com \
/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;
as well as URLs for NNTP newsgroup(s).