Thread (42 messages) 42 messages, 6 authors, 2021-08-20

RE: [PATCH net-next 10/18] ravb: Factorise ravb_ring_format function

flat view

From: Biju Das <biju.das.jz@bp.renesas.com>
Date: 2021-07-30 06:24:16
Also in: linux-renesas-soc

HI Sergei,

Thanks for the feedback.
Subject: Re: [PATCH net-next 10/18] ravb: Factorise ravb_ring_format
function

On 7/22/21 5:13 PM, Biju Das wrote:
quoted
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@bp.renesas.com>
Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.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.
OK. Will add this as part of ravb_drv_data.
[...]
quoted
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)?
Agreed.

Cheers,
Biju
[...]

MBR, Sergei
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help