From nobody Sun Sep 18 21:47:30 2022 X-Original-To: net@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4MW1cq0y88z4cMf8 for ; Sun, 18 Sep 2022 21:47:39 +0000 (UTC) (envelope-from kim@westryn.net) Received: from mail.westryn.net (mail.westryn.net [199.48.135.251]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4MW1cp3BfTz45wZ for ; Sun, 18 Sep 2022 21:47:38 +0000 (UTC) (envelope-from kim@westryn.net) Received: from smtpclient.apple (225x169.ouraynet.com [204.16.225.169]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.westryn.net (Postfix) with ESMTPSA id A23719432A1 for ; Sun, 18 Sep 2022 15:47:31 -0600 (MDT) From: Kim Shrier Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit List-Id: Networking and TCP/IP with FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-net List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-net@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.13\)) Subject: Forwarding packets to the host stack in net map lb app Message-Id: Date: Sun, 18 Sep 2022 15:47:30 -0600 To: "net@freebsd.org" X-Mailer: Apple Mail (2.3654.120.0.1.13) X-Rspamd-Queue-Id: 4MW1cp3BfTz45wZ X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of kim@westryn.net designates 199.48.135.251 as permitted sender) smtp.mailfrom=kim@westryn.net X-Spamd-Result: default: False [-2.80 / 15.00]; NEURAL_HAM_SHORT(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-0.999]; MV_CASE(0.50)[]; R_SPF_ALLOW(-0.20)[+ip4:199.48.135.251]; MIME_GOOD(-0.10)[text/plain]; R_DKIM_NA(0.00)[]; ASN(0.00)[asn:36236, ipnet:199.48.132.0/22, country:US]; TO_DN_EQ_ADDR_ALL(0.00)[]; MLMMJ_DEST(0.00)[net@FreeBSD.org]; MIME_TRACE(0.00)[0:+]; FROM_EQ_ENVFROM(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; MID_RHS_MATCH_FROM(0.00)[]; ARC_NA(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; FROM_HAS_DN(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[net@freebsd.org]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DMARC_NA(0.00)[westryn.net]; RCVD_TLS_ALL(0.00)[] X-ThisMailContainsUnwantedMimeParts: N I have a network monitoring program and I am using the lb app from netmap to distribute packets to netmap pipes. The monitor processes are successfully receiving packets. I would like to modify lb to send some packets to the host stack and have packets coming from the host stack go out on the monitoring ethernet interface. I am relatively new to using netmap and it is not obvious to me how to properly send/receive some packets to the host tx/rx rings while still letting the the netmap pipes forward packets to my monitoring application. I have looked at the bridge app from netmap which opens 2 netmap ports. It does not seem to me that that would be the right way to deal with the host stack in the context of lb. Should I just process the last tx/rx ring differently from the first ones that are forwarding packets to the netmap pipes? Thanks, Kim