From nobody Thu Nov 14 17:05:02 2024 X-Original-To: freebsd-arch@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 4Xq63n3CNcz5cv9w; Thu, 14 Nov 2024 17:05:41 +0000 (UTC) (envelope-from ccfreebsd@gmail.com) Received: from mail-lf1-f54.google.com (mail-lf1-f54.google.com [209.85.167.54]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xq63n2c6Zz4wCd; Thu, 14 Nov 2024 17:05:41 +0000 (UTC) (envelope-from ccfreebsd@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-lf1-f54.google.com with SMTP id 2adb3069b0e04-539e83daa12so94550e87.1; Thu, 14 Nov 2024 09:05:41 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731603939; x=1732208739; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=vGMvjL/bcMEGlLvd8masr8zw6x7onMkk1OMGeSCr8e0=; b=dbkur40uDeuG8oNG4ff/iOPdxzvm7Y1i64wSc4VAl2Id7pZmzslcyxKI/N8+ip8bRb ekicEvvoPRPLCByDYTar5SJGhhGUbAjhYQxOryVqTk2Z4Vgy42kxzeNp4y+JlTA/D77m x2EBwsLvQcZjdfst0N7QJflGyPYcAw989uZrSp4nTRI/sYOOGAoBsBfxlgEbEG4Bge9c iI+hm4AyTE0QL3lA9NYrJ2UI1p+FsknV6CP8LsZowPr2jvkvdk8cE+yyMebuIhJ2wNUS +hUI2Kcfjve7dvddJzlBKBPHv4NXwUVZ04PF0M2Sj73UgGv3LRszYkXkcawoH5G7o32C kgWQ== X-Forwarded-Encrypted: i=1; AJvYcCXPrbiPX2kYbzpMO9ypEOyCr5ZNyjuYMH1VJNj+6jvPaR6vUYxFQ/UUn/CwigYSpKbh8pJHOV4g8XSApA==@freebsd.org X-Gm-Message-State: AOJu0YwxVp/0rZWIekSl8doCe63nm7MTrh+ccK7N5z21BxbyYXTRLQaJ Qh/nRm0cXldbsgJ8VYQwfZ9KZbM5/VurOE4YFkfo8BcaJNoOrAiEFreWD+Ww X-Gm-Gg: ASbGnct0p1VllfzBAQlMKYp2lUfr+8oIGVzMhZVYNRWDIYMAWW4chCdqnuIO+FNE9Sp p77KxCpSvNZd8CP7R5j5VrD9DSetR3e62XRtIPnp2eiPi1FMwaK4AoEVDS7KBfPZRhRt5Df8f5Q iJcH47dgZBk4xtRVouhSHydocCULWpTjtR0RZCpQFFwmLoNnl184MWaVmD8lbwPDTiKfuPFjpmv WDIgkgPswH7sIcikVdFQFJXMLYzGKkDZSpf25W8gToOqBpAeDDBy9o7TiiURUYavejNbVOrqLZo Sby6 X-Google-Smtp-Source: AGHT+IGh+etZ7NhGSgFdJJuQknjTghxglRj9tsEGhptB4hQpdtY5PEEj26+1UIKoFjXvJYnvcHTd/w== X-Received: by 2002:a05:6512:12cc:b0:53d:a95f:2d71 with SMTP id 2adb3069b0e04-53da95f2dc8mr267210e87.12.1731603939173; Thu, 14 Nov 2024 09:05:39 -0800 (PST) Received: from mail-lf1-f48.google.com (mail-lf1-f48.google.com. [209.85.167.48]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-53da6d3d62dsm221614e87.13.2024.11.14.09.05.38 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 14 Nov 2024 09:05:38 -0800 (PST) Received: by mail-lf1-f48.google.com with SMTP id 2adb3069b0e04-539e83daa12so94547e87.1; Thu, 14 Nov 2024 09:05:38 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCXDFlID5V9dU+1QS0W4iR/fd1bG5loNISPVvejczZAcNMjU8mrVoIFMf3jsdb8pJQ+gVL+u+BoV2OAlGA==@freebsd.org X-Received: by 2002:a05:651c:1596:b0:2fc:ae45:3137 with SMTP id 38308e7fff4ca-2ff202becacmr31683471fa.11.1731603938489; Thu, 14 Nov 2024 09:05:38 -0800 (PST) List-Id: Discussion related to FreeBSD architecture List-Archive: https://lists.freebsd.org/archives/freebsd-arch List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-arch@FreeBSD.org MIME-Version: 1.0 References: <20241113143829.68bfbf8c@ralga.knownspace> In-Reply-To: <20241113143829.68bfbf8c@ralga.knownspace> From: Cheng Cui Date: Thu, 14 Nov 2024 12:05:02 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: struct ifnet is now hidden To: Justin Hibbits Cc: freebsd-arch@freebsd.org, freebsd-net@freebsd.org Content-Type: multipart/alternative; boundary="000000000000a545f10626e275b3" X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US] X-Rspamd-Queue-Id: 4Xq63n2c6Zz4wCd X-Spamd-Bar: ---- --000000000000a545f10626e275b3 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable =F0=9F=91=8D=F0=9F=91=8D You have my thumbs up! cc On Wed, Nov 13, 2024 at 2:38=E2=80=AFPM Justin Hibbits wrote: > Hi everyone, > > Many thanks to everyone involved, either fixing ports, reviewing > changes, or assisting with the API, struct ifnet is now hidden from > drivers and userspace. This means drivers now use the IfAPI, currently > largely consisting of just getters and setters in place of direct > access, with tools/ifnet/convert_ifapi.sh being a good starting point > for adapting drivers. > > In struct ifnet's place is if_t, an opaque pointer. "Blessed" parts of > the kernel, effectively anything sys/net*, modulo sys/netlink, can > directly access it, as those directories comprise the network stack, so > need direct access, as they manage the interfaces. Manpage updates > will be coming "soon", I'm hoping in the next few weeks, and will > likely need lots of review and editing. > > Again, thanks for everyone's help. I hope the road forward with this > is not too bumpy. > > - Justin > > --=20 Best Regards, Cheng Cui --000000000000a545f10626e275b3 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
=F0=9F=91=8D=F0=9F=91=8D=C2=A0You have my thumbs up!<= br>

cc

On Wed, Nov 13, 2024 at 2:38=E2=80=AFPM Just= in Hibbits <jhibbits@freebsd.org= > wrote:
Hi everyone,

Many thanks to everyone involved, either fixing ports, reviewing
changes, or assisting with the API, struct ifnet is now hidden from
drivers and userspace.=C2=A0 This means drivers now use the IfAPI, currentl= y
largely consisting of just getters and setters in place of direct
access, with tools/ifnet/convert_ifapi.sh being a good starting point
for adapting drivers.

In struct ifnet's place is if_t, an opaque pointer.=C2=A0 "Blessed= " parts of
the kernel, effectively anything sys/net*, modulo sys/netlink, can
directly access it, as those directories comprise the network stack, so
need direct access, as they manage the interfaces.=C2=A0 Manpage updates will be coming "soon", I'm hoping in the next few weeks, and = will
likely need lots of review and editing.

Again, thanks for everyone's help.=C2=A0 I hope the road forward with t= his
is not too bumpy.

- Justin



--
Best Regards,
Cheng Cui
--000000000000a545f10626e275b3--