Re: [PATCH net-next v6 1/5] net: hdlc_fr: Simpify fr_rx by using "goto rx_drop" to drop frames

From: Xie He
Date: Sat Oct 31 2020 - 18:32:12 EST


On Sat, Oct 31, 2020 at 12:48 PM Willem de Bruijn
<willemdebruijn.kernel@xxxxxxxxx> wrote:
>
> Returning code in branches vs an error jump label seems more of a
> personal preference, and to me does not pass the benefit/cost threshold.

This patch is necessary for the 2nd and 5th patch in this series,
because the 2nd and 5th patch would add a lot of places where we need
to "error out" and drop the frame. Without this patch, the 2nd and 5th
patch would add a lot of useless code.

The 2nd patch is also necessary for the 5th patch, because otherwise I
would not know how to produce the 5th patch. The logic is so
convoluted for me. And it seems to me that the simplest way for me
would make all code to follow the logic of eth_type_trans.

The patch series was actually a single patch previously:
http://patchwork.ozlabs.org/project/netdev/patch/20201017051951.363514-1-xie.he.0141@xxxxxxxxx/
I splitted it to make changes I do clearer. But really these patches
should be as a whole. It's really hard for me to do the 5th patch
without the 1st and 2nd patch.