Re: [PATCH net v4 2/3] net: ethernet: oa_tc6: Improvements to error recovery
From: Parthiban Veerasooran
Date: Wed Jul 22 2026 - 06:11:14 EST
Imperative mood for the subject: "Improve error recovery" (netdev convention).
On 21/07/26 7:50 am, Selvamani Rajagopal via B4 Relay wrote:
static int oa_tc6_prcs_rx_chunk_payload(struct oa_tc6 *tc6, u8 *data,oa_tc6_prcs_rx_frame_end() now returns int, but this drops the return — every other call in this patch propagates it. Is it deliberate?
@@ -931,8 +966,7 @@ static int oa_tc6_prcs_rx_chunk_payload(struct oa_tc6 *tc6, u8 *data,
/* Process the chunk with only rx frame end */
if (end_valid && !start_valid) {
size = end_byte_offset + 1;
- oa_tc6_prcs_rx_frame_end(tc6, data, size);
- return 0;
+ return oa_tc6_prcs_rx_frame_end(tc6, data, size);
}
/* Process the chunk with previous rx frame end and next rx frame
@@ -946,6 +980,14 @@ static int oa_tc6_prcs_rx_chunk_payload(struct oa_tc6 *tc6, u8 *data,
if (tc6->rx_skb) {
size = end_byte_offset + 1;
oa_tc6_prcs_rx_frame_end(tc6, data, size);
+footer is unused here. Either drop the unused parameter or a note why it
+ /* Purpose of rx_buf_overflow is make the
+ * code to look for new frame. At this
+ * stage, we have a new frame to process.
+ * So, making it false, in case it is set
+ * to true by oa_tc6_prcs_rx_frame_end.
+ */
+ tc6->rx_buf_overflow = false;
}
size = OA_TC6_CHUNK_PAYLOAD_SIZE - start_byte_offset;
return oa_tc6_prcs_rx_frame_start(tc6,
@@ -954,9 +996,7 @@ static int oa_tc6_prcs_rx_chunk_payload(struct oa_tc6 *tc6, u8 *data,
}
/* Process the chunk with ongoing rx frame data */
- oa_tc6_prcs_ongoing_rx_frame(tc6, data, footer);
-
- return 0;
+ return oa_tc6_prcs_ongoing_rx_frame(tc6, data, footer);
stays.
Best regards,
Parthiban V
}