From nobody Thu Aug 21 18:45:25 2025 X-Original-To: dev-commits-src-all@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 4c7C1d5HFgz65WC0; Thu, 21 Aug 2025 18:45:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c7C1d43nRz3klR; Thu, 21 Aug 2025 18:45:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755801925; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8SG9z98wt+7v9ykDVUjQ9rAh1lDjh+gwnaKxLmI6P0Y=; b=F3Cije/KBMx+QX3RvYxbyaKBrcOlGtvR+5fOPNvis01WW5UjuZV1inpnTwBY9G9FPjA0yf 48QFUN4Ujdx5306hZ1VAWLPC2U+Mvj/jfMAJkP9bECF21hCQR6ATubHKoHsamDHUyMHQZK 4WzD2DTwaM7LLpR/OJvBUuyvSeuB0dsrAkXPdecPm7kqJ0QaWUhVgNCZmhXqJrfZvshC0u tpF2cSEYbTEx8qkFwtq9F89YQh57jLzLRhvzOjvBKQEOzOK4UwIoKYiIpOpou6wdqbdAV9 OcUKtNKi+C6kcXL4kCSjA1UWj381pNMarwQkavS0KreW2lLB1fTCs1rfYU1Agw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755801925; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8SG9z98wt+7v9ykDVUjQ9rAh1lDjh+gwnaKxLmI6P0Y=; b=GWydRqhV7YVFrPRp/UfgGHtnRpos6YNGxF67PiMORf1M7slZaG+9XI8NcHD6ulYVWYPyu6 MJ80kbkX8O0sdu/aqbmpB2bErKdn2AP3YkfPEZTa1nWLDI+f43+FXHiDCUR2W62fT/fOWp v6VLnHxbXRZcB+1rHBCNLaQXQhc+dllymKU7SthRAzo+STBORnsRMPZ84lBFI/iPzkquwS QHnx9LKMv8X60zEKdZ/ZDyMcCY74gnm0mxsi5XGvQgiswMt256suhn2PW1rFMrtVz2n2fx Dnkciyhcx3kcdS3gK+q82b6964xjoozwRKqFVcuYaMFeritEjtkcQ9dz9Tooxw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1755801925; a=rsa-sha256; cv=none; b=tjjwOkn5r8Tj5Rzcib8XoQvdFXl40PaJ6YB54L9FiaBAAw0Ac+kjQf8oFt5qhgARWyIwAM Ws9MEOUNSuREJo09TTO0Ko2SVOrU5/zeZk5q/7BGKK85xxEEdmdjSFGrgF7DVsadQkqx0y wcikjmOYTHv7G8BkW1Kp4nd27tV1aiFrY4FWVhCEU7s/Zw7RO7AkAshG0sCK72S2A6HSCe wXga6inpTo3GmRHbuUNUAJmUNUjPq5qLlTIqhx4hhowr+U+6+lrfXBk8FjD8XnLKwUWLdc 1qFuEGa89xN4WDLSyM1b6aExO8Nvrr0it7n4WUghaFFnJ7U9T04RrTFlTtjazg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4c7C1d2mr3z19k4; Thu, 21 Aug 2025 18:45:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 57LIjPtR083030; Thu, 21 Aug 2025 18:45:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 57LIjP8j083027; Thu, 21 Aug 2025 18:45:25 GMT (envelope-from git) Date: Thu, 21 Aug 2025 18:45:25 GMT Message-Id: <202508211845.57LIjP8j083027@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michael Tuexen Subject: git: 3077532b1bb2 - main - vtnet, ptnet: include opt_*.h files early List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3077532b1bb2911d3012ee90bae9d9499c960569 Auto-Submitted: auto-generated The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=3077532b1bb2911d3012ee90bae9d9499c960569 commit 3077532b1bb2911d3012ee90bae9d9499c960569 Author: Michael Tuexen AuthorDate: 2025-08-21 15:18:07 +0000 Commit: Michael Tuexen CommitDate: 2025-08-21 15:18:07 +0000 vtnet, ptnet: include opt_*.h files early Include opt_inet.h and opt_inet6.h early in the files including virtio_net.h, since they use INET and/or INET6. While there, remove redundant inclusion of sys/types.h, since it is included already by sys/param.h. There was a discussion to include opt_inet.h and opt_inet6.h also in virtio_net.h. glebius suggested to add a mechanism for files to check, if required opt_*.h files were included. virtio_net.h will be the first consumer of this mechanism. Reviewed by: glebius, Peter Lei MFC after: 3 days Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D52046 --- sys/dev/netmap/if_ptnet.c | 6 ++---- sys/dev/virtio/network/if_vtnet.c | 6 +++--- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/sys/dev/netmap/if_ptnet.c b/sys/dev/netmap/if_ptnet.c index bf14bfdb73ea..9c06f7fec530 100644 --- a/sys/dev/netmap/if_ptnet.c +++ b/sys/dev/netmap/if_ptnet.c @@ -27,8 +27,9 @@ /* Driver for ptnet paravirtualized network device. */ #include +#include "opt_inet.h" +#include "opt_inet6.h" -#include #include #include #include @@ -75,9 +76,6 @@ #include #include -#include "opt_inet.h" -#include "opt_inet6.h" - #include #include #include diff --git a/sys/dev/virtio/network/if_vtnet.c b/sys/dev/virtio/network/if_vtnet.c index 2ff9be9680b8..ecb3dbb370e5 100644 --- a/sys/dev/virtio/network/if_vtnet.c +++ b/sys/dev/virtio/network/if_vtnet.c @@ -28,6 +28,9 @@ /* Driver for VirtIO network devices. */ +#include "opt_inet.h" +#include "opt_inet6.h" + #include #include #include @@ -82,9 +85,6 @@ #include #include "virtio_if.h" -#include "opt_inet.h" -#include "opt_inet6.h" - #if defined(INET) || defined(INET6) #include #endif