Re: [PATCH net 1/9] net/tls: Bound time spent on no-data records in tls_sw_read_sock()

"Chuck Lever" <[email protected]>
Newsgroups org.kernel.vger.linux-kselftest,org.kernel.vger.netdev
Message-ID <[email protected]>

On Thu, Jul 30, 2026, at 5:12 AM, Sabrina Dubroca wrote:
> 2026-07-26, 20:33:29 -0400, Chuck Lever wrote:

>> Bound a run of such records, as net_rx_action() bounds a softirq
>> poll. The first record that delivers no bytes arms a deadline
>> TLS_RX_NODATA_NS ahead; any record that delivers bytes disarms it,
>> so a normal stream never trips it. Breaking out with nothing copied
>
> Another thought here: I think a peer that sends "some" 0-length data
> records followed by one (possibly very small) data record, and then
> repeats that sequence, will not hit this "rate-limiting" of no-data
> records. Is that right? And if so, is that a problem?

That occurred to me too. It's right on the cusp between still
making progress and gumming things up. Neither the packet-count
limit nor the time-bound address this case.

I don't have a good answer.


> [I'm guessing that the caller is doing something equivalent to
> recvmsg(WAITALL), so it could be stuck for a long time even with this
> new bound]

Still digesting your other feedback. I plan to send a v2 to
address it.


-- 
Chuck Lever
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.