From patchwork Fri Jan 5 01:32:32 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pavan Kumar Linga X-Patchwork-Id: 1882689 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=osuosl.org header.i=@osuosl.org header.a=rsa-sha256 header.s=default header.b=3tHoemY5; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=osuosl.org (client-ip=140.211.166.137; helo=smtp4.osuosl.org; envelope-from=intel-wired-lan-bounces@osuosl.org; receiver=patchwork.ozlabs.org) Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4T5mDp36NKz23dJ for ; Fri, 5 Jan 2024 12:33:12 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 11F1841F5D; Fri, 5 Jan 2024 01:33:10 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 11F1841F5D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org; s=default; t=1704418390; bh=nLamign5f8zWTCNfx13liWvB0meTZnYlF3U4t2qEtkw=; h=From:To:Date:Subject:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:Cc:From; b=3tHoemY5OcqnznUYQKtG823jo5Nh4pCW9aSZDSrKyLTvbih9Wcaz3Gqe1pWnAe6ZT 9+jRLU+lYVHI8pM/bjdeXdF7i3bLRTqTn6ifoqNaWuhJOjUGmFWHuGMKeI70T80H9d qu8e1X6Y26doYslY3IeS6vg5GP8FimusmPxPhXRkzmbOwBEVlegcYg2i4yPUw2/sIg sydpV7sOsujlX0DJzQhN2MjykMGIr4HJSnvwkQf+LKA5NKd+mJ9rOLmm/yl3uRvH7q hN6xXK/RVdwuRMsqMrATCYAuvXpjVhG8XY7kyiadZWDZM5fcrqk/qy1YUNN8smIZMm grl0KuVwKrolg== X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id hzJNEi_ZTBdp; Fri, 5 Jan 2024 01:33:09 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp4.osuosl.org (Postfix) with ESMTP id 19AB742EC2; Fri, 5 Jan 2024 01:33:09 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 19AB742EC2 X-Original-To: intel-wired-lan@lists.osuosl.org Delivered-To: intel-wired-lan@lists.osuosl.org Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id 4489B1BF3DC for ; Fri, 5 Jan 2024 01:33:07 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 141196148F for ; Fri, 5 Jan 2024 01:33:07 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 141196148F X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Gkqa1FiGSscE for ; Fri, 5 Jan 2024 01:33:05 +0000 (UTC) Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.136]) by smtp3.osuosl.org (Postfix) with ESMTPS id BBE8461488 for ; Fri, 5 Jan 2024 01:33:05 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org BBE8461488 X-IronPort-AV: E=McAfee;i="6600,9927,10943"; a="376891826" X-IronPort-AV: E=Sophos;i="6.04,332,1695711600"; d="scan'208";a="376891826" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Jan 2024 17:33:04 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10943"; a="846428134" X-IronPort-AV: E=Sophos;i="6.04,332,1695711600"; d="scan'208";a="846428134" Received: from unknown (HELO localhost.jf.intel.com) ([10.166.80.24]) by fmsmga008.fm.intel.com with ESMTP; 04 Jan 2024 17:33:04 -0800 From: Pavan Kumar Linga To: intel-wired-lan@lists.osuosl.org Date: Thu, 4 Jan 2024 17:32:32 -0800 Message-ID: <20240105013232.44996-1-pavan.kumar.linga@intel.com> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1704418385; x=1735954385; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=MhCUNnNwd5R0RWrXybkC6PZ1LjTOpSei8tg3aM99Dis=; b=nkpDMVy3/vqTfDViAxk8lXeBxHNUkDOwbCoJaqiTRfm0xSsqjUNqX9C9 iTFU3FEk949/VTLqQQcFUlmPtTLWtgBXz8+z2X2GJ4PPulOQbfmBw96xv YlQe0m1xjP4hOxe2XfQ6vtgmq7D7Xr+0iIgPiT7u7ufWEhcw57dZxWeBb VVN/BeyfF+XPwEbDbG9j/m4CGUFwcrn6BTixKdgoRrqHN2sEqluC3Twvp QiPVEn9bXi8lLLVQm31Kb7WcD2lqS8N02JVaepgPSZ9QXS4qMa13foLVF 4mXKCpRZwT/w5sybtEibtpoAkCdZ0ks4i6gvn+nZ6mpUrCHbDvLwUtu0Z g==; X-Mailman-Original-Authentication-Results: smtp3.osuosl.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=nkpDMVy3 Subject: [Intel-wired-lan] [PATCH iwl-net v2] idpf: avoid compiler padding in virtchnl2_ptype struct X-BeenThere: intel-wired-lan@osuosl.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel Wired Ethernet Linux Kernel Driver Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: pmenzel@molgen.mpg.de, netdev@vger.kernel.org, Pavan Kumar Linga , przemyslaw.kitszel@intel.com, emil.s.tantilov@intel.com Errors-To: intel-wired-lan-bounces@osuosl.org Sender: "Intel-wired-lan" In the arm random config file, kconfig option 'CONFIG_AEABI' is disabled which results in adding the compiler flag '-mabi=apcs-gnu'. This causes the compiler to add padding in virtchnl2_ptype structure to align it to 8 bytes, resulting in the following size check failure: include/linux/build_bug.h:78:41: error: static assertion failed: "(6) == sizeof(struct virtchnl2_ptype)" 78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg) | ^~~~~~~~~~~~~~ include/linux/build_bug.h:77:34: note: in expansion of macro '__static_assert' 77 | #define static_assert(expr, ...) __static_assert(expr, ##__VA_ARGS__, #expr) | ^~~~~~~~~~~~~~~ drivers/net/ethernet/intel/idpf/virtchnl2.h:26:9: note: in expansion of macro 'static_assert' 26 | static_assert((n) == sizeof(struct X)) | ^~~~~~~~~~~~~ drivers/net/ethernet/intel/idpf/virtchnl2.h:982:1: note: in expansion of macro 'VIRTCHNL2_CHECK_STRUCT_LEN' 982 | VIRTCHNL2_CHECK_STRUCT_LEN(6, virtchnl2_ptype); | ^~~~~~~~~~~~~~~~~~~~~~~~~~ Avoid the compiler padding by using "__packed" structure attribute for the virtchnl2_ptype struct. Fixes: 0d7502a9b4a7 ("virtchnl: add virtchnl version 2 ops") Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202312220250.ufEm8doQ-lkp@intel.com Reviewed-by: Przemek Kitszel Reviewed-by: Paul Menzel Signed-off-by: Pavan Kumar Linga Reviewed-by: Simon Horman --- v2: - add the kconfig option causing the compile failure to the commit message --- drivers/net/ethernet/intel/idpf/virtchnl2.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/intel/idpf/virtchnl2.h b/drivers/net/ethernet/intel/idpf/virtchnl2.h index 8dc83788972..dd750e6dcd0 100644 --- a/drivers/net/ethernet/intel/idpf/virtchnl2.h +++ b/drivers/net/ethernet/intel/idpf/virtchnl2.h @@ -978,7 +978,7 @@ struct virtchnl2_ptype { u8 proto_id_count; __le16 pad; __le16 proto_id[]; -}; +} __packed; VIRTCHNL2_CHECK_STRUCT_LEN(6, virtchnl2_ptype); /**