[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87imtafioc.fsf@intel.com>
Date: Wed, 12 Jun 2019 17:11:31 -0700
From: Vinicius Costa Gomes <vinicius.gomes@...el.com>
To: Eric Dumazet <edumazet@...gle.com>,
"David S . Miller" <davem@...emloft.net>,
Willem de Bruijn <willemb@...gle.com>,
Mahesh Bandewar <maheshb@...gle.com>
Cc: netdev <netdev@...r.kernel.org>,
Eric Dumazet <edumazet@...gle.com>,
Eric Dumazet <eric.dumazet@...il.com>
Subject: Re: [PATCH net-next 8/8] net/packet: introduce packet_rcv_try_clear_pressure() helper
Hi,
Eric Dumazet <edumazet@...gle.com> writes:
> There are two places where we want to clear the pressure
> if possible, add a helper to make it more obvious.
>
> Signed-off-by: Eric Dumazet <edumazet@...gle.com>
> Suggested-by: Willem de Bruijn <willemb@...gle.com>
> ---
> net/packet/af_packet.c | 13 +++++++++----
> 1 file changed, 9 insertions(+), 4 deletions(-)
>
> diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c
> index d409e2fdaa7ee8ddf261354f91b682e403f40e9e..8c27e198268ab5148daa8e90aa2f53546623b9ed 100644
> --- a/net/packet/af_packet.c
> +++ b/net/packet/af_packet.c
> @@ -1271,6 +1271,13 @@ static int packet_rcv_has_room(struct packet_sock *po, struct sk_buff *skb)
> return ret;
> }
>
> +static void packet_rcv_try_clear_pressure(struct packet_sock *po)
> +{
> + if (READ_ONCE(po->pressure) &&
> + __packet_rcv_has_room(po, NULL) == ROOM_NORMAL)
> + WRITE_ONCE(po->pressure, 0);
Just a couple of (microscopical?) nitpicks, double space here and on the
commit message of patch 1/8.
Series look good.
Acked-by: Vinicius Costa Gomes <vinicius.gomes@...el.com>
Cheers,
--
Vinicius
Powered by blists - more mailing lists