git: e4bc19b2faa7 - main - cxgbe tom: Fix jobtotid() compilation.
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 08 Nov 2022 19:29:42 UTC
The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=e4bc19b2faa7fdb433a685d6de2cc7571d129699 commit e4bc19b2faa7fdb433a685d6de2cc7571d129699 Author: John Baldwin <jhb@FreeBSD.org> AuthorDate: 2022-11-08 19:25:58 +0000 Commit: John Baldwin <jhb@FreeBSD.org> CommitDate: 2022-11-08 19:25:58 +0000 cxgbe tom: Fix jobtotid() compilation. The previous commit lost an implicit struct socket * cast. Use an inline function instead as the macro is already rather long. Fixes: e1401f75790f cxgbe: use standard sototcpcb() accessor macro to get socket's tcpcb Sponsored by: Chelsio Communications --- sys/dev/cxgbe/tom/t4_cpl_io.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/sys/dev/cxgbe/tom/t4_cpl_io.c b/sys/dev/cxgbe/tom/t4_cpl_io.c index 94b92dbf112b..7449029a7082 100644 --- a/sys/dev/cxgbe/tom/t4_cpl_io.c +++ b/sys/dev/cxgbe/tom/t4_cpl_io.c @@ -2052,8 +2052,20 @@ t4_uninit_cpl_io_handlers(void) #define aio_sent backend3 #define aio_refs backend4 -#define jobtotid(job) \ - (((struct toepcb *)(sototcpcb((job)->fd_file->f_data)->t_toe))->tid) +#ifdef VERBOSE_TRACES +static int +jobtotid(struct kaiocb *job) +{ + struct socket *so; + struct tcpcb *tp; + struct toepcb *toep; + + so = job->fd_file->f_data; + tp = sototcpcb(so); + toep = tp->t_toe; + return (toep->tid); +} +#endif static void aiotx_free_job(struct kaiocb *job)