From nobody Tue Jun 3 18:37:42 2025 X-Original-To: dev-commits-src-main@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 4bBfbC15H2z5y1F5; Tue, 03 Jun 2025 18:37:43 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bBfbB6shsz3bGX; Tue, 03 Jun 2025 18:37:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1748975863; 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=WPDODTclQ7AQguijT609US4jQ4Su/f/YdqtzsmsRPp4=; b=oK6fz61I9dz3WNfnmoi7lve9rKe8LkvNyKb3Ik044GpraG8JzE0wRoFWzQpfwocCYlP/Uy 4rmKuN0nHXOAS1K5hBlZmQUPAaV2AnXnWBMfE0QskREtRW5IKCDOqdJkfmdyTUe994efzB 81rhOWPY8EF413G4Mxj8+mvdSGLjnNcH4XbLvmcPICn/2ryXVYXF3cRoKvSuog30vkmYq/ dktHePrjEK8dV8otP0/gJ9su0lRbWaWcasO4MSD7FBZPdYz5jJGaGua9qgt3xeCbhXcIKe wu6FYCQq1U0d4woqeTz4sAV1B1Y/BnxgDQsg3GkDSoK5B0fopDZTYh2VToh3dA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1748975863; 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=WPDODTclQ7AQguijT609US4jQ4Su/f/YdqtzsmsRPp4=; b=VWN7JJlkqFOBYiJgALpJPM+rq57LlMsxy8uVFIy4NBHDlYXamjSHrA/2Ng1yBoWBDlRl6l ovr3W36loyVSI34uDKhyZiATYaVXISrwsphyUnpnpj8wav9DMY5djXPZhojpvhcv4urwax 4MKoZnnB8GdwzW6V2bRUmdjXY/dfvwN2z6Aku/lN1WEe+SXiuK2hFxPLKKZC6d9d+Oa1dL sTGB74A2UiCuRBnUO3UTGcXHy+ciJ4bSuc99rxgLb9OBcFeC/tQCtL/FGZivL08DHVeu/8 huiYv0r4ZjDqK4TjH6WjgGS3FpeIhxD3nam2d6Sn7NsrQq7Z3fbcmwgUQHwLwQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1748975863; a=rsa-sha256; cv=none; b=MDHE1zEAE0tsrY7efSBfPVbCV1P2lkUO/ujDrAedoICfuynS80W6+ugqouSlbxFgGhHBr4 uoIvZJ9ci9htz81bdk0gLZSlznEteNxoi7v40Prdu7Dzq/xxwEJJfEh57saLyvm+AbY4ZL t9HtbFYI1KdiHXIsmj4cTY/BL9wshNjGYfEZYVChbCrIQ91EuoaY9C5ZTfnRbP9QbGLAsD JSkcHg4Jvb3ejg78rGvSysKwOy1D/NfFsiQEhP8bGOgx8X2wy7IcLy9dLgwYfwzz+RnDUt Jv4Gjv8ohs6VFIZtTb3uu5qXEx4k4fYY//OSJWuI74Z0obvlNnCf0ITMd2VaCA== 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 4bBfbB5yqHzqWV; Tue, 03 Jun 2025 18:37:42 +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 553IbgrS000532; Tue, 3 Jun 2025 18:37:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 553IbgGu000529; Tue, 3 Jun 2025 18:37:42 GMT (envelope-from git) Date: Tue, 3 Jun 2025 18:37:42 GMT Message-Id: <202506031837.553IbgGu000529@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 4b6b9c1368b3 - main - LinuxKPI: netdev features style, annotate, and add %b decoding mask List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4b6b9c1368b346f7093153d14e7931403ac3202d Auto-Submitted: auto-generated The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=4b6b9c1368b346f7093153d14e7931403ac3202d commit 4b6b9c1368b346f7093153d14e7931403ac3202d Author: Bjoern A. Zeeb AuthorDate: 2025-05-10 01:41:12 +0000 Commit: Bjoern A. Zeeb CommitDate: 2025-06-03 18:35:10 +0000 LinuxKPI: netdev features style, annotate, and add %b decoding mask Start to sort through the netdevice features to match them with FreeBSD. Annotate them a bit more verbose though the names are pretty telling already. While here adjust style(9) as well. Lastly add the bit definitions for use with printf(9) %b as names read easier than bitmasks. We will use that in LinuxKPI 802.11. No functional changes. Sponsored by: The FreeBSD Foundation MFC after: 3 days --- .../common/include/linux/netdev_features.h | 24 +++++++++++++--------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/linux/netdev_features.h b/sys/compat/linuxkpi/common/include/linux/netdev_features.h index 51d2586e8aac..fae82776b071 100644 --- a/sys/compat/linuxkpi/common/include/linux/netdev_features.h +++ b/sys/compat/linuxkpi/common/include/linux/netdev_features.h @@ -33,16 +33,20 @@ typedef uint32_t netdev_features_t; -#define NETIF_F_HIGHDMA BIT(0) -#define NETIF_F_SG BIT(1) -#define NETIF_F_IP_CSUM BIT(2) -#define NETIF_F_IPV6_CSUM BIT(3) -#define NETIF_F_TSO BIT(4) -#define NETIF_F_TSO6 BIT(5) -#define NETIF_F_RXCSUM BIT(6) -#define NETIF_F_HW_CSUM BIT(7) -#define NETIF_F_HW_TC BIT(8) +#define NETIF_F_HIGHDMA BIT(0) /* Can DMA to high memory. */ +#define NETIF_F_SG BIT(1) /* Can do scatter/gather I/O. */ +#define NETIF_F_IP_CSUM BIT(2) /* Can csum TCP/UDP on IPv4. */ +#define NETIF_F_IPV6_CSUM BIT(3) /* Can csum TCP/UDP on IPv6. */ +#define NETIF_F_TSO BIT(4) /* Can do TCP over IPv4 segmentation. */ +#define NETIF_F_TSO6 BIT(5) /* Can do TCP over IPv6 segmentation. */ +#define NETIF_F_RXCSUM BIT(6) /* Can do receive csum offload. */ +#define NETIF_F_HW_CSUM BIT(7) /* Can csum packets (which?). */ +#define NETIF_F_HW_TC BIT(8) /* Can offload TC. */ -#define NETIF_F_CSUM_MASK (NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM) +#define NETIF_F_CSUM_MASK (NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM) + +#define NETIF_F_BITS \ + "\20\1HIGHDMA\2SG\3IP_CSUM\4IPV6_CSUM\5TSO\6TSO6\7RXCSUM" \ + "\10HW_CSUM\11HW_TC" #endif /* _LINUXKPI_LINUX_NETDEV_FEATURES_H_ */