From owner-freebsd-hackers@freebsd.org Thu Jan 16 15:32:19 2020 Return-Path: Delivered-To: freebsd-hackers@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6BDFA1EC6C3 for ; Thu, 16 Jan 2020 15:32:19 +0000 (UTC) (envelope-from alexpro.ewr@gmail.com) Received: from mail-ed1-x543.google.com (mail-ed1-x543.google.com [IPv6:2a00:1450:4864:20::543]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 47z7VB3X2yz4BCq for ; Thu, 16 Jan 2020 15:32:18 +0000 (UTC) (envelope-from alexpro.ewr@gmail.com) Received: by mail-ed1-x543.google.com with SMTP id t17so19285137eds.6 for ; Thu, 16 Jan 2020 07:32:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=to:from:subject:message-id:date:user-agent:mime-version :content-language; bh=8XbqbRvxpA8RNgJbc0ROvUQ2LRSBVPqa10DvraA+5NQ=; b=M0AO8kri27G5yETs4X06XA33IjuFNiK9jKY50qGR5islubFkYNio+dZb8pvnT2D7md nqGZ5wsj7ScwtxCy2AnMfhclNFbrKr5ZUTO7o636lQIaJG6AkuI9Cl3K+4bc5/muLtRk C4XLTKNQcy38CIQQglI+agkYy+M6KVa/e/kBQTLdk72+g4rodb8RtKw7SL0zPT1IpTg2 9plXX9F4UzTXRAvNiGWpiWOvuI6J3+g3wTW/IssCn3KImf1yxxRs5gQeb3nd0yQAtj39 baP1he+IZB5fauc88oOZiBlEHp51dNZIWY5d4PjTFOHxuJQkpCeetsN8JyZ10jB6wM+j xFgw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:from:subject:message-id:date:user-agent :mime-version:content-language; bh=8XbqbRvxpA8RNgJbc0ROvUQ2LRSBVPqa10DvraA+5NQ=; b=tCd4nb/Ff+xLLBR8aewFbR57FMkI/hu/pGQWTQefxhRsChZsl3doyxtYMBdMbB7Cks Pso6BxDsgFZhabLunETimSxr/BCxLQsKQlsaXYqsHHzODplfBrqWZYO5XtsnBmDRlvSx TUjPr/cTwk4Ae9YbDI+FheDp5VkZsekXl9pMwwoKCjxLRWZfoTeyIWXAJJNsS0PL+vCM ignZwvP6CgunDDnOET1AN/itiPtHmf+1gCZfY5ax2j/yaOwMSOsgXOHorRvJJxJRmZGL QfGV9q720d3lzHACAp52zXHbh6dH+CEMDzgwyVIznTH9Fhg+h7mWOOGpdhQoA68Gxx3Z aL4g== X-Gm-Message-State: APjAAAWfMzw/1rI87eKZFEQNKznYrZuucfkVPeeTUXf9XmSBWsK7Ubur 0k1K2k88+fHkJFfkx2gkvB81hZ88 X-Google-Smtp-Source: APXvYqw0dk2fTcrG08bROMnVIKcPjJVV1+cmhgpYk9l6CDbWq+zJFLk4JCxWiJO/f6r6FlfRi33PXQ== X-Received: by 2002:a2e:95c4:: with SMTP id y4mr2699987ljh.38.1579188369176; Thu, 16 Jan 2020 07:26:09 -0800 (PST) Received: from [192.168.200.55] (city-gw.homelan.lg.ua. [194.0.206.33]) by smtp.googlemail.com with ESMTPSA id i197sm10810339lfi.56.2020.01.16.07.26.08 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 16 Jan 2020 07:26:08 -0800 (PST) To: freebsd-hackers@freebsd.org From: =?UTF-8?B?0JDQu9C10LrRgdC10Lkg0J/RgNC+0LrQvtC/0YfRg9C6?= Subject: Porting pf from current OpenBSD to FreeBSD Message-ID: <8f975ad7-e326-1472-e8e0-88cf69dd9131@gmail.com> Date: Thu, 16 Jan 2020 17:25:57 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.1 MIME-Version: 1.0 Content-Language: ru-RU X-Rspamd-Queue-Id: 47z7VB3X2yz4BCq X-Spamd-Bar: +++++ Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=M0AO8kri; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of alexproewr@gmail.com designates 2a00:1450:4864:20::543 as permitted sender) smtp.mailfrom=alexproewr@gmail.com X-Spamd-Result: default: False [5.83 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_SPF_ALLOW(0.00)[+ip6:2a00:1450:4000::/36:c]; FREEMAIL_FROM(0.00)[gmail.com]; TO_DN_NONE(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(0.00)[gmail.com,none]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; TAGGED_FROM(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com.dwl.dnswl.org : 127.0.5.0]; ARC_NA(0.00)[]; RECEIVED_SPAMHAUS_XBL(5.00)[33.206.0.194.khpj7ygk5idzvmvt5x4ziurxhy.zen.dq.spamhaus.net : 127.0.0.4]; R_DKIM_ALLOW(0.00)[gmail.com:s=20161025]; NEURAL_HAM_MEDIUM(-0.06)[-0.063,0]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-hackers@freebsd.org]; IP_SCORE_FREEMAIL(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; BAD_REP_POLICIES(0.10)[]; IP_SCORE(0.00)[ip: (0.15), ipnet: 2a00:1450::/32(-2.59), asn: 15169(-1.83), country: US(-0.05)]; NEURAL_SPAM_LONG(0.90)[0.895,0]; RCVD_IN_DNSWL_NONE(0.00)[3.4.5.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.5.4.1.0.0.a.2.list.dnswl.org : 127.0.5.0]; RCVD_TLS_ALL(0.00)[]; GREYLIST(0.00)[pass,body] Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Jan 2020 15:32:19 -0000 Greetings! Now I'm trying to port the current pf from OpenBSD to current FreeBSD. As a separate module this time, without any changes in the FreeBSD kernel code. There are quite lot of inconsistencies - counters, tasks, crypto, routing domains, mbuf, inpcb and others. In your opinion, what is the best way to solve the inconsistencies with the current kernel? In case of inpcb I've created a structure containing the inpcb itself and additional members, which are OpenBSD - specific. In case of routing domains I've decided to always use the default value 0 and make a function stub rtable_l2(), which returns 0 in all cases. In case of the tasks I intend to use tasqueue "swi" for the enqueue task. I have almost no experience in the development of the FreeBSD kernel, perhaps you could give me the cue as to where I'm making mistakes.