From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: passt.top; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: passt.top; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=cmUX6Dqt; dkim-atps=neutral Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by passt.top (Postfix) with ESMTPS id E6BB35A0278 for ; Mon, 01 Sep 2025 23:02:25 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1756760544; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=vY7f9agdaMgcZC6pfcsNgiWTZK1jof3m4OcvA4VPOjE=; b=cmUX6Dqt8A0CuSR3ytBZTfr1OXJd8fKlGtZUHzZnLK2FOHez6BPcxUcm8qqXjFbaFhQJF2 fTOWFxi6/AulwpNK+d8rT/LJnzH9VqFVmwV/yU+6va9r2ABMVAn9zLmrNZ78JLQydnFFWl +tAIl25Gr+fhMmrMjg15/hm9owMLeq8= Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-672-u39GykdmNWWY4Oxdx6SWJQ-1; Mon, 01 Sep 2025 17:02:23 -0400 X-MC-Unique: u39GykdmNWWY4Oxdx6SWJQ-1 X-Mimecast-MFC-AGG-ID: u39GykdmNWWY4Oxdx6SWJQ_1756760543 Received: by mail-wr1-f71.google.com with SMTP id ffacd0b85a97d-3cf48ec9fc1so2235367f8f.0 for ; Mon, 01 Sep 2025 14:02:23 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1756760541; x=1757365341; h=content-transfer-encoding:mime-version:organization:references :in-reply-to:message-id:subject:cc:to:from:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=ruqG4OKEAgjqQHhzQGf3nsl+kHrb99Ijzr360WpJl2Q=; b=AtW9aDLDLL1ekwtt5Ap8ZNBEPviXJq9p7I94ZQjq5KsVqRFtr1/NPVGzf7EQDEF0+L WJmyQ2j2QgE1w/IYw2rFYz+trFsUhzF58giAY9W152bkKwTIhmQpdtNF0XBRcQCQ5aZn A1fUAuJm/pV/m5ajRJ7JMyuPWjueqGd7tX/2jgx0Ya/CnN24DKeqULRfnRahxK/8hTgs 9j3+3Y4ZZxy1IWg6i/zFeMFw83vOHKPpGDbYWxtTfUl2rIEIx9SdBTTBqiNIV7oD+Yre WIb9GL/FmjpsMx9Cvc5i14I9yt1Xgvq38b00rqpNt8AFkDEAh0HBJe84LZ0v+Fd9b23+ W6XQ== X-Gm-Message-State: AOJu0Yz/R1+nw3TPgzzujfxVm90VtGqg9ala8L4DQqN+CKzxnTbZAQFb xGgNGi75/BeAKbH/kW4ajCsrvVBB60b6nFawjHmXgUe+D2mJjOncBWoecLYFb9cwiRU/m0ayoLP hXZ/pGkl/V7mIYH42LcK4JNswyAoNQvMepTqoED36aLbXSrzYr1eQemyTAmGgwejf6kW1Klhf8h yH3lWPumXyTkWpI3JNevJsVqD0OVj5q1zmiOwi X-Gm-Gg: ASbGncvXSZYx9gnsQ8qfTfrRknejPj7A72gi2qcmmpXb9fB5cD5xTjeFKWjupuDpRWV 4qHSp4VB5t3vMz/q7IYAewEdmostYzo/Xd3kcW7i/HBPAh/yQH2aOVCFK5kIrV9ElY5AaN/nmEE aaS7GTeXCYrnxmBlVO3AhrnAP0pRn4DtG9s/wr80xGhxyXqxv1+9H06TYvgJXVt0yBX9cFghxpv u63ssQYdBUA9MMWU/9g7gxwBN/rRLnaYWMDGJR0cyo/2yX0Twmp6timbjKP37NDyhiV5EbITV+P B/GVHRzwGWNyMpHfeus64KXXFCUSi4rD/KIQN6yi06FnC1rR+9k= X-Received: by 2002:a5d:5d0c:0:b0:3d8:7c6e:8af7 with SMTP id ffacd0b85a97d-3d87c6e8efemr1961831f8f.29.1756760541481; Mon, 01 Sep 2025 14:02:21 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG4RHwqkS8/krEJCsxeKWuEiEGw/1JlKdRVbPxeThWDq0muMYa9qG0o8k0GAGeUdm+Hi3BzxQ== X-Received: by 2002:a5d:5d0c:0:b0:3d8:7c6e:8af7 with SMTP id ffacd0b85a97d-3d87c6e8efemr1961817f8f.29.1756760540944; Mon, 01 Sep 2025 14:02:20 -0700 (PDT) Received: from maya.myfinge.rs (ifcgrfdd.trafficplex.cloud. [2a10:fc81:a806:d6a9::1]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-45b6f30fe02sm246117395e9.18.2025.09.01.14.02.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 Sep 2025 14:02:20 -0700 (PDT) Date: Mon, 1 Sep 2025 23:02:19 +0200 From: Stefano Brivio To: Yumei Huang Subject: Re: [PATCH] build: Fix errors of TCP_REPAIR_* undeclared Message-ID: <20250901230219.679a9f27@elisabeth> In-Reply-To: <20250901094510.27813-1-yuhuang@redhat.com> References: <20250901094510.27813-1-yuhuang@redhat.com> Organization: Red Hat X-Mailer: Claws Mail 4.2.0 (GTK 3.24.49; x86_64-pc-linux-gnu) MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: inAHODpxxnAvv-arooOKO7Tfk1vh8_x49n2cfa6W83w_1756760543 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Message-ID-Hash: ARVZ2Q2EP7RRPCGITLLNDWDJK4ESWLXJ X-Message-ID-Hash: ARVZ2Q2EP7RRPCGITLLNDWDJK4ESWLXJ X-MailFrom: sbrivio@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: passt-dev@passt.top, dgibson@redhat.com X-Mailman-Version: 3.3.8 Precedence: list List-Id: Development discussion and patches for passt Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Thanks for the patch! A couple of comments, all minor: On Mon, 1 Sep 2025 17:45:10 +0800 Yumei Huang wrote: > Fix the following errors on systems with glibc < 2.29: Before anything, it's customary to credit the original author of a patch, even if it was (very) different. Something like: Based on an original patch by Dongsheng, fix ... and I think you should also Cc: them (they might want to test / comment / review), you can fetch the contact from https://bugs.passt.top/show_bug.cgi?id=3D121. >=20 > tcp.c: In function =E2=80=98tcp_flow_repair_on=E2=80=99: > tcp.c:2787:38: error: =E2=80=98TCP_REPAIR_ON=E2=80=99 undeclared (first u= se in this function); did you mean =E2=80=98TCP_REPAIR=E2=80=99? > if ((rc =3D 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 =E2=80=98tcp_flow_repair_off=E2=80=99: > tcp.c:2807:38: error: =E2=80=98TCP_REPAIR_OFF=E2=80=99 undeclared (first = use in this function); did you mean =E2=80=98TCP_REPAIR=E2=80=99? > if ((rc =3D repair_set(c, conn->sock, TCP_REPAIR_OFF))) > ^~~~~~~~~~~~~~ > TCP_REPAIR > make: *** [Makefile:94: passt] Error 1 >=20 > Signed-off-by: Yumei Huang Just before this tag, we typically add any references, always using the "Link:" tag for simplicity. Many other projects use separate tags such as "Bug:", "Bugzilla:", "Closes:" and so on, but we don't, so that it's a bit easier to automate parsing, if needed. In this case that would be: Link: https://bugs.passt.top/show_bug.cgi?id=3D121 and perhaps a Reported-by: tag would also be good to have, here. > --- > linux_dep.h | 6 ++++++ > passt-repair.c | 1 + > 2 files changed, 7 insertions(+) >=20 > diff --git a/linux_dep.h b/linux_dep.h > index 240f50a..c200444 100644 > --- a/linux_dep.h > +++ b/linux_dep.h > @@ -135,6 +135,12 @@ struct tcp_info_linux { > #define CLOSE_RANGE_UNSHARE=09(1U << 1) > #endif > =20 > +#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 probe= s */ We use tabs for indentation, and a full tab is displayed as 8 characters wide. For example: #define TCP_REPAIR_ON=09=091 ^^ two tabs here, so that TCP_REPAIR_OFF_NO_WP is aligned too If you need a suggestion for editor showing whitespace (marking tabs and spaces separately), I use Geany and it does that. I think others use Emacs, I'm not sure how it works there. > +#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 > =20 > #include "seccomp_repair.h" > +#include "linux_dep.h" > =20 > #define SCM_MAX_FD 253 /* From Linux kernel (include/net/scm.h), not in = UAPI */ > #define REPAIR_EXT=09=09".repair" The rest looks good to me! --=20 Stefano