netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alexander H Duyck <alexander.duyck@gmail.com>
To: Jason Xing <kerneljasonxing@gmail.com>,
	jesse.brandeburg@intel.com, anthony.l.nguyen@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 v2 2/3] i40e: add double of VLAN header when computing the max MTU
Date: Wed, 08 Feb 2023 07:41:14 -0800	[thread overview]
Message-ID: <c33e26364b18039e3632218d8e2a76f3b6a08577.camel@gmail.com> (raw)
In-Reply-To: <20230208024333.10465-2-kerneljasonxing@gmail.com>

On Wed, 2023-02-08 at 10:43 +0800, 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>
> ---
> v2: drop the duplicate definition
> ---
>  drivers/net/ethernet/intel/i40e/i40e_main.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c
> index 53d0083e35da..d039928f3646 100644
> --- a/drivers/net/ethernet/intel/i40e/i40e_main.c
> +++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
> @@ -2921,7 +2921,7 @@ static int i40e_change_mtu(struct net_device *netdev, int new_mtu)
>  	struct i40e_pf *pf = vsi->back;
>  
>  	if (i40e_enabled_xdp_vsi(vsi)) {
> -		int frame_size = new_mtu + ETH_HLEN + ETH_FCS_LEN + VLAN_HLEN;
> +		int frame_size = new_mtu + I40E_PACKET_HDR_PAD;
>  
>  		if (frame_size > i40e_max_xdp_frame_size(vsi))
>  			return -EINVAL;

Looks good to me.

Reviewed-by: Alexander Duyck <alexanderduyck@fb.com>

  reply	other threads:[~2023-02-08 15:41 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-08  2:43 [PATCH net v4 1/3] ixgbe: allow to increase MTU to 3K with XDP enabled Jason Xing
2023-02-08  2:43 ` [PATCH net v2 2/3] i40e: add double of VLAN header when computing the max MTU Jason Xing
2023-02-08 15:41   ` Alexander H Duyck [this message]
2023-02-14  2:13   ` [Intel-wired-lan] " Rout, ChandanX
2023-02-08 15:37 ` [PATCH net v4 1/3] ixgbe: allow to increase MTU to 3K with XDP enabled Alexander H Duyck
2023-02-08 16:27   ` Maciej Fijalkowski
2023-02-08 18:57     ` Alexander H Duyck
2023-02-08 19:02       ` Maciej Fijalkowski
2023-02-14  2:23 ` [Intel-wired-lan] " Rout, ChandanX

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=c33e26364b18039e3632218d8e2a76f3b6a08577.camel@gmail.com \
    --to=alexander.duyck@gmail.com \
    --cc=alexandr.lobakin@intel.com \
    --cc=anthony.l.nguyen@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).