From mboxrd@z Thu Jan 1 00:00:00 1970 Received: by passt.top (Postfix, from userid 1000) id C1CCE5A026A; Mon, 10 Oct 2022 10:35:48 +0200 (CEST) From: Stefano Brivio To: passt-dev@passt.top Subject: [PATCH v3 0/7] Add support for log file and version display Date: Mon, 10 Oct 2022 10:35:41 +0200 Message-Id: <20221010083548.831309-1-sbrivio@redhat.com> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-ID-Hash: B2UBPKDPKZ3VONP4M2HBGAPLBLUFGQ46 X-Message-ID-Hash: B2UBPKDPKZ3VONP4M2HBGAPLBLUFGQ46 X-MailFrom: sbrivio@passt.top 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: David Gibson X-Mailman-Version: 3.3.3 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: Patches 1/7 to 4/7 add support for logging to a file, via -l/--log-file, with mandatory size limit and rotation. Patches 5/7 and 7/7 fix two minor details that came up while implementing the feature itself. Patch 6/7 adds a --version option with a version string generated by the Makefile using git, if available, and includes the version string in the log header. v3: - Further changes for 4/7 and 6/7 reported in change messages v2: - Drop patch adding new test from the series (8/8), subject to further discussion - Changes for 4/7 and 6/7 reported in change messages Stefano Brivio (7): Move logging functions to a new file, log.c conf: Drop duplicate, diverging optstring assignments passt.h: Include netinet/if_ether.h before struct ctx declaration log, conf: Add support for logging to file log: Add missing function comment for trace_init() conf, log, Makefile: Add versioning information util: Check return value of lseek() while reading bound ports from procfs Makefile | 22 ++- README.md | 2 +- conf.c | 74 ++++++-- contrib/fedora/passt.spec | 1 + dhcp.c | 1 + dhcpv6.c | 1 + icmp.c | 1 + isolation.c | 1 + log.c | 369 ++++++++++++++++++++++++++++++++++++++ log.h | 32 ++++ ndp.c | 1 + netlink.c | 1 + packet.c | 1 + passt.1 | 18 +- passt.c | 2 + passt.h | 2 + pasta.c | 1 + pcap.c | 1 + tap.c | 1 + tcp.c | 1 + tcp_splice.c | 1 + udp.c | 1 + util.c | 131 +------------- util.h | 22 +-- 24 files changed, 525 insertions(+), 163 deletions(-) create mode 100644 log.c create mode 100644 log.h -- 2.35.1