[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CA+FuTSdeP7n1eQU2L2qSCEdJVc=Ezs+PvCof+YJfDjiEFZeH_w@mail.gmail.com>
Date: Fri, 30 Oct 2020 12:34:25 -0400
From: Willem de Bruijn <willemdebruijn.kernel@...il.com>
To: Xie He <xie.he.0141@...il.com>
Cc: Jakub Kicinski <kuba@...nel.org>,
"David S. Miller" <davem@...emloft.net>,
Network Development <netdev@...r.kernel.org>,
linux-kernel <linux-kernel@...r.kernel.org>,
Willem de Bruijn <willemdebruijn.kernel@...il.com>,
Krzysztof Halasa <khc@...waw.pl>
Subject: Re: [PATCH net-next v4 1/5] net: hdlc_fr: Simpify fr_rx by using
"goto rx_drop" to drop frames
On Thu, Oct 29, 2020 at 10:31 PM Xie He <xie.he.0141@...il.com> wrote:
>
> 1.
> When the fr_rx function drops a received frame (because the protocol type
> is not supported, or because the PVC virtual device that corresponds to
> the DLCI number and the protocol type doesn't exist), the function frees
> the skb and returns.
>
> The code for freeing the skb and returning is repeated several times, this
> patch uses "goto rx_drop" to replace them so that the code looks cleaner.
>
> 2.
> Add code to increase the stats.rx_dropped count whenever we drop a frame.
> Increase the stats.rx_dropped count both after "goto rx_drop" and after
> "goto rx_error" because I think we should increase this value whenever an
> skb is dropped.
In general we try to avoid changing counter behavior like that, as
existing users
may depend on current behavior, e.g., in dashboards or automated monitoring.
I don't know how realistic that is in this specific case, no strong
objections. Use
good judgment.
Powered by blists - more mailing lists