mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-09 16:47:18 +02:00
MINOR: quic: Iterate over all received datagrams
Make the listener datagram handler iterate over all received datagrams
This commit is contained in:
parent
1712b1df59
commit
df1c7c78c1
@ -5368,7 +5368,7 @@ struct task *quic_lstnr_dghdlr(struct task *t, void *ctx, unsigned int state)
|
|||||||
struct quic_dgram *dgram;
|
struct quic_dgram *dgram;
|
||||||
int first_pkt = 1;
|
int first_pkt = 1;
|
||||||
|
|
||||||
dgram = MT_LIST_POP(&dghdlr->dgrams, typeof(dgram), mt_list);
|
while ((dgram = MT_LIST_POP(&dghdlr->dgrams, typeof(dgram), mt_list))) {
|
||||||
if (!dgram)
|
if (!dgram)
|
||||||
goto err;
|
goto err;
|
||||||
|
|
||||||
@ -5391,6 +5391,7 @@ struct task *quic_lstnr_dghdlr(struct task *t, void *ctx, unsigned int state)
|
|||||||
/* If the packet length could not be found, we cannot continue. */
|
/* If the packet length could not be found, we cannot continue. */
|
||||||
break;
|
break;
|
||||||
} while (pos < end);
|
} while (pos < end);
|
||||||
|
|
||||||
/* Mark this datagram as consumed */
|
/* Mark this datagram as consumed */
|
||||||
HA_ATOMIC_STORE(&dgram->buf, NULL);
|
HA_ATOMIC_STORE(&dgram->buf, NULL);
|
||||||
|
|
||||||
@ -5399,6 +5400,7 @@ struct task *quic_lstnr_dghdlr(struct task *t, void *ctx, unsigned int state)
|
|||||||
*/
|
*/
|
||||||
if (dgram->qc)
|
if (dgram->qc)
|
||||||
dgram->qc->rx.bytes += dgram->len;
|
dgram->qc->rx.bytes += dgram->len;
|
||||||
|
}
|
||||||
|
|
||||||
return t;
|
return t;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user