[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220506133111.1d4bebf3@hermes.local>
Date: Fri, 6 May 2022 13:31:11 -0700
From: Stephen Hemminger <stephen@...workplumber.org>
To: Peilin Ye <yepeilin.cs@...il.com>
Cc: "David S. Miller" <davem@...emloft.net>,
Eric Dumazet <eric.dumazet@...il.com>,
Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>,
Hideaki YOSHIFUJI <yoshfuji@...ux-ipv6.org>,
David Ahern <dsahern@...nel.org>,
Jamal Hadi Salim <jhs@...atatu.com>,
Cong Wang <xiyou.wangcong@...il.com>,
Jiri Pirko <jiri@...nulli.us>,
Peilin Ye <peilin.ye@...edance.com>, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org, Cong Wang <cong.wang@...edance.com>
Subject: Re: [PATCH RFC v1 net-next 1/4] net: Introduce Qdisc backpressure
infrastructure
On Fri, 6 May 2022 12:44:22 -0700
Peilin Ye <yepeilin.cs@...il.com> wrote:
> +static inline void qdisc_backpressure_overlimit(struct Qdisc *sch, struct sk_buff *skb)
> +{
> + struct sock *sk = skb->sk;
> +
> + if (!sk || !sk_fullsock(sk))
> + return;
> +
> + if (cmpxchg(&sk->sk_backpressure_status, SK_UNTHROTTLED, SK_OVERLIMIT) == SK_UNTHROTTLED) {
> + sock_hold(sk);
> + list_add_tail(&sk->sk_backpressure_node, &sch->backpressure_list);
> + }
> +}
What if socket is closed? You are holding reference but application maybe gone.
Or if output is stalled indefinitely?
Powered by blists - more mailing lists