From nobody Fri May 27 15:35:52 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 089881B46011 for ; Fri, 27 May 2022 15:36:13 +0000 (UTC) (envelope-from lutz@iks-jena.de) Received: from annwfn.iks-jena.de (annwfn.iks-jena.de [IPv6:2001:4bd8::19]) (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 4L8pmq6RxPz3mqq for ; Fri, 27 May 2022 15:36:11 +0000 (UTC) (envelope-from lutz@iks-jena.de) X-SMTP-Sender: IPv6:2001:4bd8:0:666:248:54ff:fe12:ee3f Received: from belenus.iks-jena.de (belenus.iks-jena.de [IPv6:2001:4bd8:0:666:248:54ff:fe12:ee3f]) by annwfn.iks-jena.de (8.15.2/8.15.2) with ESMTPS id 24RFZrFQ013079 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Fri, 27 May 2022 17:35:53 +0200 X-MSA-Host: belenus.iks-jena.de Received: (from lutz@localhost) by belenus.iks-jena.de (8.14.3/8.14.1/Submit) id 24RFZqZC028870; Fri, 27 May 2022 17:35:52 +0200 Date: Fri, 27 May 2022 17:35:52 +0200 From: Lutz Donnerhacke To: Michael Pounov Cc: cm@linktel.net, net@freebsd.org Subject: Re: LibAlias in FreeBSD Message-ID: <20220527153552.GA28822@belenus.iks-jena.de> References: <20220527161854.86fd52906c712221c71a7dc6@elwix.org> 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 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220527161854.86fd52906c712221c71a7dc6@elwix.org> X-message-flag: Please send plain text messages only. Thank you. User-Agent: Mutt/1.5.17 (2007-11-01) X-Rspamd-Queue-Id: 4L8pmq6RxPz3mqq X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of lutz@iks-jena.de designates 2001:4bd8::19 as permitted sender) smtp.mailfrom=lutz@iks-jena.de X-Spamd-Result: default: False [-3.10 / 15.00]; RCVD_TLS_ALL(0.00)[]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; RCPT_COUNT_THREE(0.00)[3]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2001:4bd8::/48]; FROM_HAS_DN(0.00)[]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[donnerhacke.de]; NEURAL_HAM_LONG(-1.00)[-1.000]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_HAM_SHORT(-1.00)[-1.000]; MLMMJ_DEST(0.00)[net]; FORGED_SENDER(0.30)[lutz@donnerhacke.de,lutz@iks-jena.de]; RCVD_IN_DNSWL_LOW(-0.10)[2001:4bd8:0:666:248:54ff:fe12:ee3f:received]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_COUNT_TWO(0.00)[2]; ASN(0.00)[asn:15725, ipnet:2001:4bd8::/29, country:DE]; FROM_NEQ_ENVFROM(0.00)[lutz@donnerhacke.de,lutz@iks-jena.de] X-ThisMailContainsUnwantedMimeParts: N On Fri, May 27, 2022 at 04:18:54PM +0300, Michael Pounov wrote: > Hello Charles Mott > > I wrote this mail about my work with IPFW firewall. > I am started my work over IPFW Sync driver and protocol similar like in PF firewall. > My primery goal is to do sync on NAT states in firewall router cluster. About it, I need to know when NAT driver add, readd or delete alias to be notify from libalias > I see one good approach to achieve this, but I must to asking if existing hidden drawbacks for such approach the author of libalias. As long as the callback is internal to the kernel, it might work. libalias is CPU bound, any additional work will slow down the system, especially when libalias is called from the interrupt level of network drivers. > What are you thinking about such approach, change and hook of the existing code? One can think about a ringbuffer which is filled by libalias and read by a different type of code. If the other code is too slow, the ringbuffer will override the entries. Please do not consider a dynamically allocated buffer.