* [PATCH v2] build: Fix errors of TCP_REPAIR_* undeclared
@ 2025-09-02 2:17 Yumei Huang
2025-09-02 17:06 ` Stefano Brivio
0 siblings, 1 reply; 3+ messages in thread
From: Yumei Huang @ 2025-09-02 2:17 UTC (permalink / raw)
To: passt-dev; +Cc: sbrivio, dgibson, yuhuang, dongsheng.song
Based on an original patch by Dongsheng, fix the following errors on systems with glibc < 2.29:
tcp.c: In function ‘tcp_flow_repair_on’:
tcp.c:2787:38: error: ‘TCP_REPAIR_ON’ undeclared (first use in this function); did you mean ‘TCP_REPAIR’?
if ((rc = repair_set(c, conn->sock, TCP_REPAIR_ON)))
^~~~~~~~~~~~~
TCP_REPAIR
tcp.c:2787:38: note: each undeclared identifier is reported only once for each function it appears in
tcp.c: In function ‘tcp_flow_repair_off’:
tcp.c:2807:38: error: ‘TCP_REPAIR_OFF’ undeclared (first use in this function); did you mean ‘TCP_REPAIR’?
if ((rc = repair_set(c, conn->sock, TCP_REPAIR_OFF)))
^~~~~~~~~~~~~~
TCP_REPAIR
make: *** [Makefile:94: passt] Error 1
Link: https://bugs.passt.top/show_bug.cgi?id=121
Reported-by: Dongsheng <dongsheng.song@gmail.com>
Signed-off-by: Yumei Huang <yuhuang@redhat.com>
---
linux_dep.h | 6 ++++++
passt-repair.c | 1 +
2 files changed, 7 insertions(+)
diff --git a/linux_dep.h b/linux_dep.h
index 240f50a..1d9e166 100644
--- a/linux_dep.h
+++ b/linux_dep.h
@@ -135,6 +135,12 @@ struct tcp_info_linux {
#define CLOSE_RANGE_UNSHARE (1U << 1)
#endif
+#ifndef TCP_REPAIR_ON
+#define TCP_REPAIR_ON 1
+#define TCP_REPAIR_OFF 0
+#define TCP_REPAIR_OFF_NO_WP -1 /* Turn off without window probes */
+#endif
+
__attribute__ ((weak))
/* cppcheck-suppress funcArgNamesDifferent */
int close_range(unsigned int first, unsigned int last, int flags) {
diff --git a/passt-repair.c b/passt-repair.c
index 8c59d7e..c3c140f 100644
--- a/passt-repair.c
+++ b/passt-repair.c
@@ -40,6 +40,7 @@
#include <linux/seccomp.h>
#include "seccomp_repair.h"
+#include "linux_dep.h"
#define SCM_MAX_FD 253 /* From Linux kernel (include/net/scm.h), not in UAPI */
#define REPAIR_EXT ".repair"
--
@@ -40,6 +40,7 @@
#include <linux/seccomp.h>
#include "seccomp_repair.h"
+#include "linux_dep.h"
#define SCM_MAX_FD 253 /* From Linux kernel (include/net/scm.h), not in UAPI */
#define REPAIR_EXT ".repair"
--
2.47.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v2] build: Fix errors of TCP_REPAIR_* undeclared
2025-09-02 2:17 [PATCH v2] build: Fix errors of TCP_REPAIR_* undeclared Yumei Huang
@ 2025-09-02 17:06 ` Stefano Brivio
2025-09-03 2:09 ` Yumei Huang
0 siblings, 1 reply; 3+ messages in thread
From: Stefano Brivio @ 2025-09-02 17:06 UTC (permalink / raw)
To: Yumei Huang; +Cc: passt-dev, dgibson, dongsheng.song
On Tue, 2 Sep 2025 10:17:28 +0800
Yumei Huang <yuhuang@redhat.com> wrote:
> Based on an original patch by Dongsheng, fix the following errors on systems with glibc < 2.29:
>
> tcp.c: In function ‘tcp_flow_repair_on’:
> tcp.c:2787:38: error: ‘TCP_REPAIR_ON’ undeclared (first use in this function); did you mean ‘TCP_REPAIR’?
> if ((rc = repair_set(c, conn->sock, TCP_REPAIR_ON)))
> ^~~~~~~~~~~~~
> TCP_REPAIR
> tcp.c:2787:38: note: each undeclared identifier is reported only once for each function it appears in
> tcp.c: In function ‘tcp_flow_repair_off’:
> tcp.c:2807:38: error: ‘TCP_REPAIR_OFF’ undeclared (first use in this function); did you mean ‘TCP_REPAIR’?
> if ((rc = repair_set(c, conn->sock, TCP_REPAIR_OFF)))
> ^~~~~~~~~~~~~~
> TCP_REPAIR
> make: *** [Makefile:94: passt] Error 1
>
> Link: https://bugs.passt.top/show_bug.cgi?id=121
> Reported-by: Dongsheng <dongsheng.song@gmail.com>
> Signed-off-by: Yumei Huang <yuhuang@redhat.com>
Applied, thanks, and welcome to the git log!
--
Stefano
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2] build: Fix errors of TCP_REPAIR_* undeclared
2025-09-02 17:06 ` Stefano Brivio
@ 2025-09-03 2:09 ` Yumei Huang
0 siblings, 0 replies; 3+ messages in thread
From: Yumei Huang @ 2025-09-03 2:09 UTC (permalink / raw)
To: Stefano Brivio; +Cc: passt-dev, dgibson, dongsheng.song
On Wed, Sep 3, 2025 at 1:07 AM Stefano Brivio <sbrivio@redhat.com> wrote:
>
> On Tue, 2 Sep 2025 10:17:28 +0800
> Yumei Huang <yuhuang@redhat.com> wrote:
>
> > Based on an original patch by Dongsheng, fix the following errors on systems with glibc < 2.29:
> >
> > tcp.c: In function ‘tcp_flow_repair_on’:
> > tcp.c:2787:38: error: ‘TCP_REPAIR_ON’ undeclared (first use in this function); did you mean ‘TCP_REPAIR’?
> > if ((rc = repair_set(c, conn->sock, TCP_REPAIR_ON)))
> > ^~~~~~~~~~~~~
> > TCP_REPAIR
> > tcp.c:2787:38: note: each undeclared identifier is reported only once for each function it appears in
> > tcp.c: In function ‘tcp_flow_repair_off’:
> > tcp.c:2807:38: error: ‘TCP_REPAIR_OFF’ undeclared (first use in this function); did you mean ‘TCP_REPAIR’?
> > if ((rc = repair_set(c, conn->sock, TCP_REPAIR_OFF)))
> > ^~~~~~~~~~~~~~
> > TCP_REPAIR
> > make: *** [Makefile:94: passt] Error 1
> >
> > Link: https://bugs.passt.top/show_bug.cgi?id=121
> > Reported-by: Dongsheng <dongsheng.song@gmail.com>
> > Signed-off-by: Yumei Huang <yuhuang@redhat.com>
>
> Applied, thanks, and welcome to the git log!
Thanks, I see it!
>
> --
> Stefano
>
--
Thanks,
Yumei Huang
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-09-03 2:09 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-09-02 2:17 [PATCH v2] build: Fix errors of TCP_REPAIR_* undeclared Yumei Huang
2025-09-02 17:06 ` Stefano Brivio
2025-09-03 2:09 ` Yumei Huang
Code repositories for project(s) associated with this public inbox
https://passt.top/passt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for IMAP folder(s).