On Fri, Oct 17, 2025 at 12:31:27PM +0200, Laurent Vivier wrote: > Store the thread number in the flow_common structure for ICMP ping > flows using flow_epollfd_set() and retrieve the corresponding epoll > file descriptor with flow_epollfd_get() instead of passing c->epollfd > directly. This makes ICMP consistent with the recent TCP changes and > follows the pattern established in previous commit. > > Signed-off-by: Laurent Vivier Reviewed-by: David Gibson > --- > icmp.c | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) > > diff --git a/icmp.c b/icmp.c > index 56dfac6c958e..baddd8e5aacb 100644 > --- a/icmp.c > +++ b/icmp.c > @@ -149,7 +149,7 @@ unexpected: > static void icmp_ping_close(const struct ctx *c, > const struct icmp_ping_flow *pingf) > { > - epoll_del(c->epollfd, pingf->sock); > + epoll_del(flow_epollfd(&pingf->f), pingf->sock); > close(pingf->sock); > flow_hash_remove(c, FLOW_SIDX(pingf, INISIDE)); > } > @@ -206,11 +206,13 @@ static struct icmp_ping_flow *icmp_ping_new(const struct ctx *c, > if (pingf->sock > FD_REF_MAX) > goto cancel; > > + flow_thread_set(&pingf->f, 0); > + > ref.type = EPOLL_TYPE_PING; > ref.flowside = FLOW_SIDX(flow, TGTSIDE); > ref.fd = pingf->sock; > > - if (epoll_add(c->epollfd, EPOLLIN, &ref) < 0) { > + if (epoll_add(flow_epollfd(&pingf->f), EPOLLIN, &ref) < 0) { > close(pingf->sock); > goto cancel; > } > -- > 2.51.0 > -- David Gibson (he or they) | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you, not the other way | around. http://www.ozlabs.org/~dgibson