Netdev List
 help / color / mirror / Atom feed
From: Parthiban Veerasooran <parthiban.veerasooran@microchip.com>
To: <Selvamani.Rajagopal@onsemi.com>
Cc: <netdev@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	Andrew Lunn <andrew@lunn.ch>, Andrew Lunn <andrew+netdev@lunn.ch>,
	Piergiorgio Beruto <pier.beruto@onsemi.com>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>
Subject: Re: [PATCH net v4 2/3] net: ethernet: oa_tc6: Improvements to error recovery
Date: Wed, 22 Jul 2026 15:39:11 +0530	[thread overview]
Message-ID: <419bb6ee-297c-4b88-8306-bc6a286c2e54@microchip.com> (raw)
In-Reply-To: <20260720-fix-race-condition-and-crash-v4-2-8273e2f38a1f@onsemi.com>

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,
> @@ -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);
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?
> +
> +                       /* 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);
footer is unused here. Either drop the unused parameter or a note why it
stays.

Best regards,
Parthiban V
>   }
> 

  reply	other threads:[~2026-07-22 10:09 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-21  2:20 [PATCH net v4 0/3] Fix to possible skb leak due to race condtion in tx path Selvamani Rajagopal via B4 Relay
2026-07-21  2:20 ` [PATCH net v4 1/3] net: ethernet: oa_tc6: Protect skb pointer used by two different kernel instances Selvamani Rajagopal via B4 Relay
2026-07-22 10:08   ` Parthiban Veerasooran
2026-07-21  2:20 ` [PATCH net v4 2/3] net: ethernet: oa_tc6: Improvements to error recovery Selvamani Rajagopal via B4 Relay
2026-07-22 10:09   ` Parthiban Veerasooran [this message]
2026-07-21  2:20 ` [PATCH net v4 3/3] net: ethernet: oa_tc6: Disabled tx queues when disable_traffic is set Selvamani Rajagopal via B4 Relay
2026-07-22 10:09   ` Parthiban Veerasooran

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=419bb6ee-297c-4b88-8306-bc6a286c2e54@microchip.com \
    --to=parthiban.veerasooran@microchip.com \
    --cc=Selvamani.Rajagopal@onsemi.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=pier.beruto@onsemi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox