From: sashiko-bot@kernel.org
To: "Jason Gunthorpe" <jgg@nvidia.com>
Cc: kvm@vger.kernel.org
Subject: Re: [PATCH v4 03/10] net/mlx5: Extract MLX5_SET/GET macros into mlx5_ifc_macros.h
Date: Thu, 13 Aug 2026 15:00:06 +0000 [thread overview]
Message-ID: <20260813150006.EA3091F000E9@smtp.kernel.org> (raw)
In-Reply-To: <3-v4-021df3fb5a3f+98e-mlx5st_jgg@nvidia.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] The newly extracted `mlx5_ifc_macros.h` header lacks necessary include directives for the types and macros it uses, violating the kernel's self-contained header rule.
--
--- Patch [3]: [PATCH v4 03/10] net/mlx5: Extract MLX5_SET/GET macros into mlx5_ifc_macros.h ---
commit 76e6552b0716c94811acb9f5971adc7809d4dee0
Author: Jason Gunthorpe <jgg@ziepe.ca>
net/mlx5: Extract MLX5_SET/GET macros into mlx5_ifc_macros.h
This commit extracts the MLX5_SET/GET macro family from device.h into a new
standalone header, mlx5_ifc_macros.h. The extraction allows VFIO selftests
to use these macros without pulling in the dependencies of device.h.
[ ... ]
> diff --git a/include/linux/mlx5/mlx5_ifc_macros.h b/include/linux/mlx5/mlx5_ifc_macros.h
> new file mode 100644
> index 0000000000000..d357acfd351de
> --- /dev/null
> +++ b/include/linux/mlx5/mlx5_ifc_macros.h
> @@ -0,0 +1,133 @@
> +/* SPDX-License-Identifier: GPL-2.0 OR Linux-OpenIB */
> +/*
> + * Copyright (c) 2013-2026, Mellanox Technologies. All rights reserved.
> + *
> + * Accessor macros for mlx5 IFC structures.
> + *
> + * Extracted from device.h so that code which cannot include device.h
> + * (e.g. selftests) can still use the MLX5_SET/GET family directly.
> + */
> +
> +#ifndef MLX5_IFC_MACROS_H
> +#define MLX5_IFC_MACROS_H
[Severity: Low]
Does this new header need to include its dependencies such as <linux/types.h>,
<linux/stddef.h>, <linux/build_bug.h>, and <asm/byteorder.h>?
Since the commit message mentions this header is intended for independent use
by VFIO selftests, without these includes, files that include this header
directly might fail to compile due to missing definitions for u32, offsetof,
BUILD_BUG_ON, and cpu_to_be32.
> +
> +/* Internal helpers -- 32-bit */
> +#define __mlx5_nullp(typ) ((struct mlx5_ifc_##typ##_bits *)0)
> +#define __mlx5_bit_sz(typ, fld) sizeof(__mlx5_nullp(typ)->fld)
[ ... ]
--
Sashiko AI review · https://sashiko.dev/#/patchset/0-v4-021df3fb5a3f+98e-mlx5st_jgg@nvidia.com?part=3
next prev parent reply other threads:[~2026-08-13 15:00 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-12 14:58 [PATCH v4 00/10] mlx5 support for VFIO self test Jason Gunthorpe
2026-08-12 14:58 ` [PATCH v4 01/10] net/mlx5: Add IFC structures for CQE and WQE Jason Gunthorpe
2026-08-12 14:59 ` [PATCH v4 02/10] net/mlx5: Move HW constant groups from device.h/cq.h to mlx5_ifc.h Jason Gunthorpe
2026-08-12 14:59 ` [PATCH v4 03/10] net/mlx5: Extract MLX5_SET/GET macros into mlx5_ifc_macros.h Jason Gunthorpe
2026-08-13 15:00 ` sashiko-bot [this message]
2026-08-12 14:59 ` [PATCH v4 04/10] net/mlx5: Add ONCE and MMIO accessor variants to mlx5_ifc_macros.h Jason Gunthorpe
2026-08-12 14:59 ` [PATCH v4 05/10] selftests: Add additional kernel functions to tools/include/ Jason Gunthorpe
2026-08-12 14:59 ` [PATCH v4 06/10] vfio: selftests: Allow drivers to specify required region size Jason Gunthorpe
2026-08-12 22:11 ` David Matlack
2026-08-12 22:13 ` David Matlack
2026-08-12 23:44 ` Jason Gunthorpe
2026-08-13 15:00 ` sashiko-bot
2026-08-12 14:59 ` [PATCH v4 07/10] vfio: selftests: Add dev_dbg Jason Gunthorpe
2026-08-12 14:59 ` [PATCH v4 08/10] vfio: selftests: Add mlx5 driver - HW init and command interface Jason Gunthorpe
2026-08-12 21:41 ` David Matlack
2026-08-12 23:32 ` Jason Gunthorpe
2026-08-13 15:40 ` David Matlack
2026-08-13 15:00 ` sashiko-bot
2026-08-12 14:59 ` [PATCH v4 09/10] vfio: selftests: Add mlx5 driver - data path and memcpy ops Jason Gunthorpe
2026-08-13 15:00 ` sashiko-bot
2026-08-12 14:59 ` [PATCH v4 10/10] vfio: selftests: mlx5 driver - add send_msi support Jason Gunthorpe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260813150006.EA3091F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=jgg@nvidia.com \
--cc=kvm@vger.kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox