Re: [PATCH net-next v2 2/3] net: ethernet: ti: Register the RPMsg driver as network device
From: Andrew Lunn <andrew@lunn.ch>
Date: 2024-06-02 15:54:18
Also in:
lkml
From: Andrew Lunn <andrew@lunn.ch>
Date: 2024-06-02 15:54:18
Also in:
lkml
quoted
+#define ICVE_MIN_PACKET_SIZE ETH_ZLEN +#define ICVE_MAX_PACKET_SIZE 1540 //(ETH_FRAME_LEN + ETH_FCS_LEN)Is the commented portion above required?
I would actually say the comment part is better, since it gives an idea where the number comes from. However, 1514 + 4 != 1540. So there is something missing here.
quoted
struct icve_port { + struct icve_shared_mem *tx_buffer; /* Write buffer for data to be consumed remote side */ + struct icve_shared_mem *rx_buffer; /* Read buffer for data to be consumed by this driver */ + struct timer_list rx_timer; struct icve_common *common; -} __packed;Is the "__packed" attribute no longer required, or was it overlooked?
Why is packed even needed? This is not a message structure to be passed over the RPC is it? I think this is the second time code has been added in one patch, and then removed in the next. That is bad practice and suggests the overall code quality is not good. Please do some internal reviews. Andrew