Re: [PATCH net-next v2 1/3] net: ethernet: ti: RPMsg based shared memory ethernet driver

From: Andrew Lunn
Date: Mon Jun 03 2024 - 08:55:24 EST


On Mon, Jun 03, 2024 at 02:26:06PM +0530, Yojana Mallik wrote:
> Hi Andrew,
>
> On 6/2/24 21:51, Andrew Lunn wrote:
> >> +struct request_message {
> >> + u32 type; /* Request Type */
> >> + u32 id; /* Request ID */
> >> +} __packed;
> >> +
> >> +struct response_message {
> >> + u32 type; /* Response Type */
> >> + u32 id; /* Response ID */
> >> +} __packed;
> >> +
> >> +struct notify_message {
> >> + u32 type; /* Notify Type */
> >> + u32 id; /* Notify ID */
> >> +} __packed;
> >
> > These are basically identical.
> >
>
> The first patch introduces only the RPMsg-based driver.
> The RPMsg driver is registered as a network device in the second patch.
> struct icve_mac_addr mac_addr is added as a member to
> struct request_message in the second patch. Similarly struct icve_shm shm_info
> is added as a member to struct response_message in the second patch. From
> second patch onward struct request_message and struct response_message are not
> identical. These members are used for the network device driver. As this patch
> introduces only RPMsg-based ethernet driver these members were not used in this
> patch and hence not mentioned in this patch. I understand this has led to the
> confusion of the structures looking similar in this patch. Kindly suggest if I
> should add these members in this patch itself instead of introducing them in
> the next patch.

I think your first patch should add documentation of the whole
protocol. With a clear understanding of what the end goal is, it
becomes easier to understand the step by step implementation stages.

Andrew