[SRU][N:linux-gcp/N:linux-gke/N:linux-gkeop][PATCH v2 1/7] idpf: make virtchnl2.h self-contained
Ian Whitfield
ian.whitfield at canonical.com
Thu Mar 27 23:41:53 UTC 2025
From: Alexander Lobakin <aleksander.lobakin at intel.com>
BugLink: https://bugs.launchpad.net/bugs/2093622
To ease maintaining of virtchnl2.h, which already is messy enough,
make it self-contained by adding missing if_ether.h include due to
%ETH_ALEN usage.
At the same time, virtchnl2_lan_desc.h is not used anywhere in the
file, so move this include to idpf_txrx.h to speed up C preprocessing.
Acked-by: Kees Cook <keescook at chromium.org>
Acked-by: Gustavo A. R. Silva <gustavoars at kernel.org>
Signed-off-by: Alexander Lobakin <aleksander.lobakin at intel.com>
Reviewed-by: Przemek Kitszel <przemyslaw.kitszel at intel.com>
Link: https://lore.kernel.org/r/20240327142241.1745989-3-aleksander.lobakin@intel.com
Signed-off-by: Jakub Kicinski <kuba at kernel.org>
(backported from commit c00d33f1fc7958e6e7f461c994fa025aa2273c13)
[ijwhitfield: Context adjusted due to having already applied commit
66c27e3b19d5 ("idpf: stop using macros for accessing queue descriptors")]
Signed-off-by: Ian Whitfield <ian.whitfield at canonical.com>
---
drivers/net/ethernet/intel/idpf/idpf_txrx.h | 1 +
drivers/net/ethernet/intel/idpf/virtchnl2.h | 4 ++--
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/intel/idpf/idpf_txrx.h b/drivers/net/ethernet/intel/idpf/idpf_txrx.h
index 4a5f0ea87ef1..6dce14483215 100644
--- a/drivers/net/ethernet/intel/idpf/idpf_txrx.h
+++ b/drivers/net/ethernet/intel/idpf/idpf_txrx.h
@@ -9,6 +9,7 @@
#include <net/netdev_queues.h>
#include "idpf_lan_txrx.h"
+#include "virtchnl2_lan_desc.h"
#define IDPF_LARGE_MAX_Q 256
#define IDPF_MAX_Q 16
diff --git a/drivers/net/ethernet/intel/idpf/virtchnl2.h b/drivers/net/ethernet/intel/idpf/virtchnl2.h
index 4a3c4454d25a..29419211b3d9 100644
--- a/drivers/net/ethernet/intel/idpf/virtchnl2.h
+++ b/drivers/net/ethernet/intel/idpf/virtchnl2.h
@@ -4,6 +4,8 @@
#ifndef _VIRTCHNL2_H_
#define _VIRTCHNL2_H_
+#include <linux/if_ether.h>
+
/* All opcodes associated with virtchnl2 are prefixed with virtchnl2 or
* VIRTCHNL2. Any future opcodes, offloads/capabilities, structures,
* and defines must be prefixed with virtchnl2 or VIRTCHNL2 to avoid confusion.
@@ -17,8 +19,6 @@
* must remain unchanged over time, so we specify explicit values for all enums.
*/
-#include "virtchnl2_lan_desc.h"
-
/* This macro is used to generate compilation errors if a structure
* is not exactly the correct length.
*/
--
2.43.0
More information about the kernel-team
mailing list