From: Vadim Fedorenko <vadim.fedorenko@linux.dev>
To: Mohsin Bashir <mohsin.bashr@gmail.com>, netdev@vger.kernel.org
Cc: kuba@kernel.org, alexanderduyck@fb.com, andrew+netdev@lunn.ch,
ast@kernel.org, bpf@vger.kernel.org, corbet@lwn.net,
daniel@iogearbox.net, davem@davemloft.net, edumazet@google.com,
hawk@kernel.org, horms@kernel.org, jdamato@fastly.com,
john.fastabend@gmail.com, kernel-team@meta.com,
pabeni@redhat.com, sdf@fomichev.me, aleksander.lobakin@intel.com
Subject: Re: [PATCH net-next V2 1/9] eth: fbnic: Add support for HDS configuration
Date: Tue, 12 Aug 2025 11:47:26 +0100 [thread overview]
Message-ID: <5a3ffacd-bae8-4ca6-85a4-4369b687e718@linux.dev> (raw)
In-Reply-To: <20250811211338.857992-2-mohsin.bashr@gmail.com>
On 11/08/2025 22:13, Mohsin Bashir wrote:
> diff --git a/drivers/net/ethernet/meta/fbnic/fbnic_txrx.c b/drivers/net/ethernet/meta/fbnic/fbnic_txrx.c
> index f9543d03485f..c80cbde50925 100644
> --- a/drivers/net/ethernet/meta/fbnic/fbnic_txrx.c
> +++ b/drivers/net/ethernet/meta/fbnic/fbnic_txrx.c
> @@ -2232,13 +2232,22 @@ static void fbnic_enable_rcq(struct fbnic_napi_vector *nv,
> {
> struct fbnic_net *fbn = netdev_priv(nv->napi.dev);
> u32 log_size = fls(rcq->size_mask);
> - u32 rcq_ctl;
> + u32 hds_thresh = fbn->hds_thresh;
> + u32 rcq_ctl = 0;
I don't think this initialization is needed ...
>
> fbnic_config_drop_mode_rcq(nv, rcq);
>
> + /* Force lower bound on MAX_HEADER_BYTES. Below this, all frames should
> + * be split at L4. It would also result in the frames being split at
> + * L2/L3 depending on the frame size.
> + */
> + if (fbn->hds_thresh < FBNIC_HDR_BYTES_MIN) {
> + rcq_ctl = FBNIC_QUEUE_RDE_CTL0_EN_HDR_SPLIT;
> + hds_thresh = FBNIC_HDR_BYTES_MIN;
> + }
> +
> rcq_ctl = FIELD_PREP(FBNIC_QUEUE_RDE_CTL1_PADLEN_MASK, FBNIC_RX_PAD) |
because you still unconditionally rewrite the value here. at the same
time FBNIC_QUEUE_RDE_CTL0_EN_HDR_SPLIT value will be lost, so I believe
it should be
rcq_ctl |= FIELD_PREP(FBNIC_QUEUE_RDE_CTL1_PADLEN_MASK, FBNIC_RX_PAD) |
and then the init code above makes sense.
> - FIELD_PREP(FBNIC_QUEUE_RDE_CTL1_MAX_HDR_MASK,
> - FBNIC_RX_MAX_HDR) |
> + FIELD_PREP(FBNIC_QUEUE_RDE_CTL1_MAX_HDR_MASK, hds_thresh) |
> FIELD_PREP(FBNIC_QUEUE_RDE_CTL1_PAYLD_OFF_MASK,
> FBNIC_RX_PAYLD_OFFSET) |
> FIELD_PREP(FBNIC_QUEUE_RDE_CTL1_PAYLD_PG_CL_MASK,
next prev parent reply other threads:[~2025-08-12 10:47 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-11 21:13 [PATCH net-next V2 0/9] eth: fbnic: Add XDP support for fbnic Mohsin Bashir
2025-08-11 21:13 ` [PATCH net-next V2 1/9] eth: fbnic: Add support for HDS configuration Mohsin Bashir
2025-08-12 10:47 ` Vadim Fedorenko [this message]
2025-08-12 13:52 ` Mohsin Bashir
2025-08-12 14:41 ` Jakub Kicinski
2025-08-11 21:13 ` [PATCH net-next V2 2/9] eth: fbnic: Update Headroom Mohsin Bashir
2025-08-11 21:49 ` [PATCH net-next V2 3/9] eth: fbnic: Use shinfo to track frags state on Rx Mohsin Bashir
2025-08-11 21:54 ` [PATCH net-next V2 4/9] eth: fbnic: Prefetch packet headers " Mohsin Bashir
2025-08-11 21:55 ` [PATCH net-next V2 5/9] eth: fbnic: Add XDP pass, drop, abort support Mohsin Bashir
2025-08-11 21:55 ` [PATCH net-next V2 6/9] eth: fbnic: Add support for XDP queues Mohsin Bashir
2025-08-11 21:56 ` [PATCH net-next V2 7/9] eth: fbnic: Add support for XDP_TX action Mohsin Bashir
2025-08-11 21:56 ` [PATCH net-next V2 8/9] eth: fbnic: Collect packet statistics for XDP Mohsin Bashir
2025-08-11 21:57 ` [PATCH net-next V2 9/9] eth: fbnic: Report XDP stats via ethtool Mohsin Bashir
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=5a3ffacd-bae8-4ca6-85a4-4369b687e718@linux.dev \
--to=vadim.fedorenko@linux.dev \
--cc=aleksander.lobakin@intel.com \
--cc=alexanderduyck@fb.com \
--cc=andrew+netdev@lunn.ch \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=corbet@lwn.net \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=hawk@kernel.org \
--cc=horms@kernel.org \
--cc=jdamato@fastly.com \
--cc=john.fastabend@gmail.com \
--cc=kernel-team@meta.com \
--cc=kuba@kernel.org \
--cc=mohsin.bashr@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=sdf@fomichev.me \
/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).