[<prev] [next>] [day] [month] [year] [list]
Message-ID:
<DM6PR02MB527577F56A616EED992C1F2E9433A@DM6PR02MB5275.namprd02.prod.outlook.com>
Date: Wed, 20 Aug 2025 23:43:09 +0000
From: Vedhachala Shanmugam <vedhachala.shanmugam@...anix.com>
To: "bpf@...r.kernel.org" <bpf@...r.kernel.org>,
"netdev@...r.kernel.org"
<netdev@...r.kernel.org>
CC: Aditya Jaltade <aditya.jaltade@...anix.com>,
Glenn Chen
<glenn.chen@...anix.com>,
Tejas Sangol <tejas.sangol@...anix.com>,
Arun
Olappamanna Vasudevan <Arun.Vasudev@...anix.com>
Subject: BPF - Inquiry on Handling Backpressure with sockhash and
bpf_msg_redirect_hash
Hi Maintainers,
I have a question regarding the use of sockhash for localhost socket redirection, specifically when using bpf_msg_redirect_hash with the BPF_F_INGRESS flag in the sk_msg program.
Since this redirection path bypasses the TCP stack, we’ve observed that backpressure is not applied. Our servers are designed to pause reading from the socket under high load conditions. However, with this redirection mechanism, the client-side socket remains writable, and sendmsg eventually fails with an ENOMEM error.
To address this, we experimented with using probes to determine the unread msgs on ingress and once it exceeds a configured threshold, we fall back to routing packets through the TCP stack within the sk_msg program, allowing TCP to apply backpressure.
We’re reaching out to seek any insights or alternative approaches that might help us handle this scenario more effectively. Looking forward to your thoughts.
Thanks,
Vedhachala Shanmugam,
Nutanix, INC.
Powered by blists - more mailing lists