From: Martin Spinler <spinler@cesnet.cz>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: dev@dpdk.org
Subject: Re: [PATCH 5/7] net/nfb: support setting Rx MTU
Date: Thu, 19 Feb 2026 07:20:32 +0100 [thread overview]
Message-ID: <d6f174ffc3252d4cbfe5132bb0916ca3986a7492.camel@cesnet.cz> (raw)
In-Reply-To: <20260218102058.53296e9e@phoenix.local>
> Since mtu is 16 bit value, you need to use uint32_t to avoid
> overflow.
>
> Something like:
> + uint32_t frame_len = (uint32_t)mtu + RTE_ETHER_HDR_LEN + RTE_ETHER_CRC_LEN;
> + if (frame_len > priv->frame_len_max_cap)
> + return -EINVAL;
>
> + for (i = 0; i < intl->max_rxmac; ++i)
> + nc_rxmac_set_frame_length(intl->rxmac[i], frame_len, RXMAC_FRAME_LENGTH_MAX);
Thank you, this check is cleaner.
next prev parent reply other threads:[~2026-02-19 6:20 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-06 17:04 [PATCH 0/7] net/nfb: ethernet enhancements spinler
2026-02-06 17:04 ` [PATCH 1/7] net/nfb: use MAC address assigned to card spinler
2026-02-06 17:04 ` [PATCH 2/7] net/nfb: get correct link speed spinler
2026-02-06 17:04 ` [PATCH 3/7] net/nfb: support real link-up/down config spinler
2026-02-06 17:04 ` [PATCH 4/7] net/nfb: support setting RS-FEC mode spinler
2026-02-06 17:04 ` [PATCH 5/7] net/nfb: support setting Rx MTU spinler
2026-02-18 18:20 ` Stephen Hemminger
2026-02-19 6:20 ` Martin Spinler [this message]
2026-02-06 17:04 ` [PATCH 6/7] net/nfb: read total stats from macs spinler
2026-02-06 17:04 ` [PATCH 7/7] doc/nfb: update release notes for nfb driver spinler
2026-02-17 4:37 ` Stephen Hemminger
2026-02-10 0:33 ` [PATCH 0/7] net/nfb: ethernet enhancements Stephen Hemminger
2026-02-12 18:52 ` Stephen Hemminger
2026-02-17 11:03 ` [PATCH v2 0/6] " spinler
2026-02-17 11:03 ` [PATCH v2 1/6] net/nfb: use MAC address assigned to card spinler
2026-02-17 11:03 ` [PATCH v2 2/6] net/nfb: get correct link speed spinler
2026-02-17 11:03 ` [PATCH v2 3/6] net/nfb: support real link-up/down config spinler
2026-02-17 11:03 ` [PATCH v2 4/6] net/nfb: support setting RS-FEC mode spinler
2026-02-17 11:03 ` [PATCH v2 5/6] net/nfb: support setting Rx MTU spinler
2026-02-17 11:03 ` [PATCH v2 6/6] net/nfb: read total stats from macs spinler
2026-02-18 18:21 ` [PATCH v2 0/6] net/nfb: ethernet enhancements Stephen Hemminger
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=d6f174ffc3252d4cbfe5132bb0916ca3986a7492.camel@cesnet.cz \
--to=spinler@cesnet.cz \
--cc=dev@dpdk.org \
--cc=stephen@networkplumber.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