[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <a3f637b9-2e65-909c-01a3-d5275007866c@gmail.com>
Date: Thu, 29 Jul 2021 21:30:15 +0300
From: Sergei Shtylyov <sergei.shtylyov@...il.com>
To: Biju Das <biju.das.jz@...renesas.com>,
"David S. Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>
Cc: Geert Uytterhoeven <geert+renesas@...der.be>,
Sergey Shtylyov <s.shtylyov@...russia.ru>,
Adam Ford <aford173@...il.com>, Andrew Lunn <andrew@...n.ch>,
Yuusuke Ashizuka <ashiduka@...itsu.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>,
Prabhakar Mahadev Lad <prabhakar.mahadev-lad.rj@...renesas.com>
Subject: Re: [PATCH net-next 10/18] ravb: Factorise ravb_ring_format function
On 7/22/21 5:13 PM, Biju Das wrote:
> The ravb_ring_format function uses extended descriptor in rx for
> R-Car where as it use normal descriptor for RZ/G2L. Factorise
> rx ring buffer buildup to extend the support for later SoC.
>
> Signed-off-by: Biju Das <biju.das.jz@...renesas.com>
> Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@...renesas.com>
> ---
> drivers/net/ethernet/renesas/ravb.h | 1 +
> drivers/net/ethernet/renesas/ravb_main.c | 34 +++++++++++++++---------
> 2 files changed, 23 insertions(+), 12 deletions(-)
>
> diff --git a/drivers/net/ethernet/renesas/ravb.h b/drivers/net/ethernet/renesas/ravb.h
> index 3a9cf6e8671a..a3258c5d0c3d 100644
> --- a/drivers/net/ethernet/renesas/ravb.h
> +++ b/drivers/net/ethernet/renesas/ravb.h
> @@ -990,6 +990,7 @@ enum ravb_chip_id {
>
> struct ravb_ops {
> void (*ring_free)(struct net_device *ndev, int q);
> + void (*ring_format)(struct net_device *ndev, int q);
Like I said, we don't need another indirection.... also both ops are for RX.
[...]
> diff --git a/drivers/net/ethernet/renesas/ravb_main.c b/drivers/net/ethernet/renesas/ravb_main.c
> index a3b8b243fd54..c23f0d420c70 100644
> --- a/drivers/net/ethernet/renesas/ravb_main.c
> +++ b/drivers/net/ethernet/renesas/ravb_main.c
> @@ -311,26 +311,15 @@ static void ravb_ring_free(struct net_device *ndev, int q)
> }
>
> /* Format skb and descriptor buffer for Ethernet AVB */
> -static void ravb_ring_format(struct net_device *ndev, int q)
> +static void ravb_ring_format_rx(struct net_device *ndev, int rxq)
How about ravb_rx_ring_format(struct net_device *ndev, int q)?
[...]
MBR, Sergei
Powered by blists - more mailing lists