From: Tony Nguyen <anthony.l.nguyen@intel.com>
To: Jason Xing <kerneljasonxing@gmail.com>,
<jesse.brandeburg@intel.com>, <davem@davemloft.net>,
<edumazet@google.com>, <kuba@kernel.org>, <pabeni@redhat.com>,
<richardcochran@gmail.com>, <ast@kernel.org>,
<daniel@iogearbox.net>, <hawk@kernel.org>,
<john.fastabend@gmail.com>, <alexandr.lobakin@intel.com>,
<maciej.fijalkowski@intel.com>
Cc: <intel-wired-lan@lists.osuosl.org>, <netdev@vger.kernel.org>,
<linux-kernel@vger.kernel.org>, <bpf@vger.kernel.org>,
Jason Xing <kernelxing@tencent.com>
Subject: Re: [PATCH net 2/3] i40e: add double of VLAN header when computing the max MTU
Date: Tue, 7 Feb 2023 11:03:24 -0800 [thread overview]
Message-ID: <a8677175-0d4f-af01-23d4-ad014697bee7@intel.com> (raw)
In-Reply-To: <20230204133535.99921-3-kerneljasonxing@gmail.com>
On 2/4/2023 5:35 AM, Jason Xing wrote:
> From: Jason Xing <kernelxing@tencent.com>
>
> Include the second VLAN HLEN into account when computing the maximum
> MTU size as other drivers do.
>
> Fixes: 0c8493d90b6b ("i40e: add XDP support for pass and drop actions")
> Signed-off-by: Jason Xing <kernelxing@tencent.com>
> ---
> drivers/net/ethernet/intel/i40e/i40e.h | 2 ++
> drivers/net/ethernet/intel/i40e/i40e_main.c | 2 +-
> 2 files changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/intel/i40e/i40e.h b/drivers/net/ethernet/intel/i40e/i40e.h
> index 60e351665c70..e03853d3c706 100644
> --- a/drivers/net/ethernet/intel/i40e/i40e.h
> +++ b/drivers/net/ethernet/intel/i40e/i40e.h
> @@ -107,6 +107,8 @@
> #define I40E_BW_MBPS_DIVISOR 125000 /* rate / (1000000 / 8) Mbps */
> #define I40E_MAX_BW_INACTIVE_ACCUM 4 /* accumulate 4 credits max */
>
> +#define I40E_PACKET_HDR_PAD (ETH_HLEN + ETH_FCS_LEN + (VLAN_HLEN * 2))
This already exists:
https://elixir.bootlin.com/linux/latest/source/drivers/net/ethernet/intel/i40e/i40e_txrx.h#L112
next prev parent reply other threads:[~2023-02-07 19:03 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-04 13:35 [PATCH net 0/3] Fix MTU related issues Jason Xing
2023-02-04 13:35 ` [PATCH net v3 1/3] ixgbe: allow to increase MTU to 3K with XDP enabled Jason Xing
2023-02-07 19:03 ` Tony Nguyen
2023-02-08 2:09 ` Jason Xing
2023-02-04 13:35 ` [PATCH net 2/3] i40e: add double of VLAN header when computing the max MTU Jason Xing
2023-02-07 19:03 ` Tony Nguyen [this message]
2023-02-08 2:03 ` Jason Xing
2023-02-04 13:35 ` [PATCH net 3/3] ixgbe: " Jason Xing
2023-02-09 0:47 ` Jason Xing
2023-02-09 1:08 ` Alexander Duyck
2023-02-09 2:22 ` Jason Xing
2023-02-09 2:57 ` Jakub Kicinski
-- strict thread matches above, loose matches on Subject: below --
2023-02-14 18:51 [PATCH net 0/3][pull request] Intel Wired LAN Driver Updates 2023-02-14 (ixgbe, i40e) Tony Nguyen
2023-02-14 18:51 ` [PATCH net 2/3] i40e: add double of VLAN header when computing the max MTU Tony Nguyen
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=a8677175-0d4f-af01-23d4-ad014697bee7@intel.com \
--to=anthony.l.nguyen@intel.com \
--cc=alexandr.lobakin@intel.com \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=hawk@kernel.org \
--cc=intel-wired-lan@lists.osuosl.org \
--cc=jesse.brandeburg@intel.com \
--cc=john.fastabend@gmail.com \
--cc=kerneljasonxing@gmail.com \
--cc=kernelxing@tencent.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maciej.fijalkowski@intel.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=richardcochran@gmail.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).