[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <08405c60-fd9c-cc9b-0256-eb3ce80f7372@omp.ru>
Date: Wed, 25 Aug 2021 17:30:17 +0300
From: Sergey Shtylyov <s.shtylyov@....ru>
To: Biju Das <biju.das.jz@...renesas.com>,
"David S. Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>
CC: Lad Prabhakar <prabhakar.mahadev-lad.rj@...renesas.com>,
Andrew Lunn <andrew@...n.ch>,
Sergei Shtylyov <sergei.shtylyov@...il.com>,
"Geert Uytterhoeven" <geert+renesas@...der.be>,
Adam Ford <aford173@...il.com>,
Yoshihiro Shimoda <yoshihiro.shimoda.uh@...esas.com>,
<netdev@...r.kernel.org>, <linux-renesas-soc@...r.kernel.org>,
Chris Paterson <Chris.Paterson2@...esas.com>,
Biju Das <biju.das@...renesas.com>
Subject: Re: [PATCH net-next 01/13] ravb: Remove the macros
NUM_TX_DESC_GEN[23]
Hello!
On 8/25/21 10:01 AM, Biju Das wrote:
> For addressing 4 bytes alignment restriction on transmission
> buffer for R-Car Gen2 we use 2 descriptors whereas it is a single
> descriptor for other cases.
> Replace the macros NUM_TX_DESC_GEN[23] with magic number and
> add a comment to explain it.
>
> Signed-off-by: Biju Das <biju.das.jz@...renesas.com>
> Suggested-by: Geert Uytterhoeven <geert+renesas@...der.be>
> Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@...renesas.com>
[...]
> diff --git a/drivers/net/ethernet/renesas/ravb_main.c b/drivers/net/ethernet/renesas/ravb_main.c
> index 02842b980a7f..073e690ab830 100644
> --- a/drivers/net/ethernet/renesas/ravb_main.c
> +++ b/drivers/net/ethernet/renesas/ravb_main.c
> @@ -2160,8 +2160,12 @@ static int ravb_probe(struct platform_device *pdev)
> ndev->max_mtu = 2048 - (ETH_HLEN + VLAN_HLEN + ETH_FCS_LEN);
> ndev->min_mtu = ETH_MIN_MTU;
>
> - priv->num_tx_desc = info->aligned_tx ?
> - NUM_TX_DESC_GEN2 : NUM_TX_DESC_GEN3;
> + /* FIXME: R-Car Gen2 has 4byte alignment restriction for tx buffer
Mhm, what are you going to fix here?
> + * Use two descriptor to handle such situation. First descriptor to
> + * handle aligned data buffer and second descriptor to handle the
> + * overflow data because of alignment.
> + */
> + priv->num_tx_desc = info->aligned_tx ? 2 : 1;
>
> /* Set function */
> ndev->netdev_ops = &ravb_netdev_ops;
Other than that:
Reviewed-by: Sergey Shtylyov <s.shtylyov@....ru>
[...]
MBR, Sergey
Powered by blists - more mailing lists