[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <d9bac72cf3c7ee92ad399fff5dcaae85903adda5.camel@redhat.com>
Date: Thu, 20 Oct 2022 11:09:31 +0200
From: Paolo Abeni <pabeni@...hat.com>
To: Cai Huoqing <cai.huoqing@...ux.dev>, kuba@...nel.org
Cc: "David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Qiao Ma <mqaio@...ux.alibaba.com>,
Zhengchao Shao <shaozhengchao@...wei.com>,
Christophe JAILLET <christophe.jaillet@...adoo.fr>,
"Gustavo A. R. Silva" <gustavoars@...nel.org>,
netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3] net: hinic: Set max_mtu/min_mtu directly to simplify
the code.
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@...ux.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
Powered by blists - more mailing lists