Subject: Re: [EXT] Re: [PATCH v2 net 2/2] net: fec: restructuring the functions to avoid forward declarations

From: Simon Horman <[email-masked]>
Date: Wed, 3 May 2023 17:34:12 +0200

On Wed, May 03, 2023 at 12:53:57PM +0000, Shenwei Wang wrote:
> 
> 
> > -----Original Message-----
> > From: Andrew Lunn <[email-masked]>
> > Sent: Tuesday, May 2, 2023 6:19 PM
> > To: Shenwei Wang <[email-masked]>
> > Cc: Wei Fang <[email-masked]>; David S. Miller <[email-masked]>;
> > Eric Dumazet <[email-masked]>; Jakub Kicinski <[email-masked]>;
> > Paolo Abeni <[email-masked]>; Clark Wang <[email-masked]>; dl-
> > linux-imx <[email-masked]>; Alexei Starovoitov <[email-masked]>; Daniel
> > Borkmann <[email-masked]>; Jesper Dangaard Brouer
> > <[email-masked]>; John Fastabend <[email-masked]>; Alexander
> > Lobakin <[email-masked]>; [email-masked]; linux-
> > [email-masked]; [email-masked]
> > Subject: [EXT] Re: [PATCH v2 net 2/2] net: fec: restructuring the functions to
> > avoid forward declarations
> > 
> > Caution: This is an external email. Please take care when clicking links or
> > opening attachments. When in doubt, report the message using the 'Report this
> > email' button
> > 
> > 
> > On Tue, May 02, 2023 at 05:08:18PM -0500, Shenwei Wang wrote:
> > > The patch reorganizes functions related to XDP frame transmission,
> > > moving them above the fec_enet_run_xdp implementation. This eliminates
> > > the need for forward declarations of these functions.
> > 
> > I'm confused. Are these two patches in the wrong order?
> > 
> > The reason that i asked you to fix the forward declaration in net-next is that it
> > makes your fix two patches. Sometimes that is not obvious to people back
> > porting patches, and one gets lost, causing build problems. So it is better to have
> > a single patch which is maybe not 100% best practice merged to stable, and then
> > a cleanup patch merged to the head of development.
> > 
> 
> If that is the case, we should forgo the second patch. Its purpose was to
> reorganize function order such that the subsequent patch to net-next
> enabling XDP_TX would not encounter forward declaration issues.

I think a good plan would be, as I understood Andrew's original suggestion,
to:

1. Only have patch 2/2, targeted at 'net', for now
2. Later, once that patch has been accepted into 'net', 'net-next' has
   reopened, and that patch is present in 'net-next', then follow-up
   with patch 1/2, which is a cleanup.