linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Abeni <pabeni@redhat.com>
To: Cai Huoqing <cai.huoqing@linux.dev>, kuba@kernel.org
Cc: "David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Qiao Ma <mqaio@linux.alibaba.com>,
	Zhengchao Shao <shaozhengchao@huawei.com>,
	Christophe JAILLET <christophe.jaillet@wanadoo.fr>,
	"Gustavo A. R. Silva" <gustavoars@kernel.org>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3] net: hinic: Set max_mtu/min_mtu directly to simplify the code.
Date: Thu, 20 Oct 2022 11:09:31 +0200	[thread overview]
Message-ID: <d9bac72cf3c7ee92ad399fff5dcaae85903adda5.camel@redhat.com> (raw)
In-Reply-To: <20221018110701.3958-1-cai.huoqing@linux.dev>

On Tue, 2022-10-18 at 19:06 +0800, Cai Huoqing wrote:
> Set max_mtu/min_mtu directly to avoid making the validity judgment
> when set mtu, because the judgment is made in net/core: dev_validate_mtu,
> so to simplify the code.
> 
> Signed-off-by: Cai Huoqing <cai.huoqing@linux.dev>
> ---
> v1->v2:
> 	1.Update changelog.
> 	2.Reverse MAX_MTU to max jumbo frame size.
> 
> v2->v3:
> 	1.Update signature
> 
> 	v1 link: https://lore.kernel.org/lkml/20221012082945.10353-1-cai.huoqing@linux.dev/
>         v2 link: https://lore.kernel.org/lkml/20220429033733.GA15753@chq-T47/
> 
> 
>  drivers/net/ethernet/huawei/hinic/hinic_dev.h  |  4 ++++
>  drivers/net/ethernet/huawei/hinic/hinic_main.c |  3 ++-
>  drivers/net/ethernet/huawei/hinic/hinic_port.c | 17 +----------------
>  3 files changed, 7 insertions(+), 17 deletions(-)
> 
> diff --git a/drivers/net/ethernet/huawei/hinic/hinic_dev.h b/drivers/net/ethernet/huawei/hinic/hinic_dev.h
> index a4fbf44f944c..2bbc94c0a9c1 100644
> --- a/drivers/net/ethernet/huawei/hinic/hinic_dev.h
> +++ b/drivers/net/ethernet/huawei/hinic/hinic_dev.h
> @@ -22,6 +22,10 @@
>  
>  #define LP_PKT_CNT		64
>  
> +#define HINIC_MAX_JUMBO_FRAME_SIZE 	15872
> +#define HINIC_MAX_MTU_SIZE 	(HINIC_MAX_JUMBO_FRAME_SIZE - ETH_HLEN - ETH_FCS_LEN)
> +#define HINIC_MIN_MTU_SIZE 	256

I'm sorry for the nit pick, but the above is whitespace-damaged: you
are mixing spaces and tabs.

Cheers,

Paolo


      reply	other threads:[~2022-10-20  9:09 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-18 11:06 [PATCH v3] net: hinic: Set max_mtu/min_mtu directly to simplify the code Cai Huoqing
2022-10-20  9:09 ` Paolo Abeni [this message]

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=d9bac72cf3c7ee92ad399fff5dcaae85903adda5.camel@redhat.com \
    --to=pabeni@redhat.com \
    --cc=cai.huoqing@linux.dev \
    --cc=christophe.jaillet@wanadoo.fr \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=gustavoars@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mqaio@linux.alibaba.com \
    --cc=netdev@vger.kernel.org \
    --cc=shaozhengchao@huawei.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).