Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp927052pxf; Thu, 8 Apr 2021 16:47:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzYxMlriz97UTLUQAeIVraCO/9XDDqBdC5Dhkov7TfFKxhf99K9WocM/MtvT3xUxBKl3RsV X-Received: by 2002:a17:906:3b81:: with SMTP id u1mr13953008ejf.49.1617925660678; Thu, 08 Apr 2021 16:47:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617925660; cv=none; d=google.com; s=arc-20160816; b=betk3lV1SYpL4iNMv1nUypQafqiKlEGa1FLq3LFGxU9h7lmSBunk0NK05VIPjx3uCs 8Becb5IOmkxwqAdKLMBB0+W4LeerqashD+pF/j4EIRJAYDs9NxRsbOWiKNXzJd+XtlmV weopMjYBkXo4F329Rk67KrxcXieMk5F/3I3ljeS7ZqWe5irzVK1rGnC5EoWrwAWhJEaO Q9R0/JX+vE2e42bdYGHN6d/l8Ee10qSBdKTyFzMwAWmJ743FpgT52sn+rY9jKqjmnkT9 rU9xgNGqM1P4uGwbTQv3ZJosdPus26MPvCrKxfh9jEYHYvRPS7ctXGxyBx5L0f/eLyRS v4wg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:from:subject:cc:to:message-id:date; bh=aPWn3+lCJVA/oFguHbwgB8XuBKIShhGxr1K71Az/a90=; b=HEM71g4Ot2X6wtW1BBFOpR3Yv/6h0rBIoWVdg+fbHZQE5VGPXqTN4UYnlRabx0lvde oRb3vPiRrIM21QYIJ3A50sHVhhaeBoePfSEs3RaNV4NfPPRlfptZSg/k4zEwF9r3u4tq RnrY8ENBHF+do0P5Jv2b0vgCNTqYu/ReQzw5pciX3EkE/kWHkOJX4Bfj1M+DPDUV9jPt 3PA15CC9Qs2xTwQz7GdrRCvy3kLlpjsy1TOlY73cS/3i3zUTiXKcb6kx9YOTC+BjObiY xMrdDP7y8nL/Gcty4wekVInIQ0U3iKInZ3IohKaycUkohMWYm1UIzFOevFNjlHashpPR uI8Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ox5si635549ejb.324.2021.04.08.16.47.17; Thu, 08 Apr 2021 16:47:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232991AbhDHXqh (ORCPT + 99 others); Thu, 8 Apr 2021 19:46:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33042 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232488AbhDHXqg (ORCPT ); Thu, 8 Apr 2021 19:46:36 -0400 Received: from mail.monkeyblade.net (shards.monkeyblade.net [IPv6:2620:137:e000::1:9]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B98B2C061760; Thu, 8 Apr 2021 16:46:24 -0700 (PDT) Received: from localhost (unknown [IPv6:2601:601:9f00:477::3d5]) by mail.monkeyblade.net (Postfix) with ESMTPSA id D2E474D24927D; Thu, 8 Apr 2021 16:46:22 -0700 (PDT) Date: Thu, 08 Apr 2021 16:46:18 -0700 (PDT) Message-Id: <20210408.164618.597563844564989065.davem@davemloft.net> To: decui@microsoft.com Cc: kuba@kernel.org, kys@microsoft.com, haiyangz@microsoft.com, sthemmin@microsoft.com, wei.liu@kernel.org, liuwe@microsoft.com, netdev@vger.kernel.org, leon@kernel.org, andrew@lunn.ch, bernd@petrovitsch.priv.at, rdunlap@infradead.org, linux-kernel@vger.kernel.org, linux-hyperv@vger.kernel.org Subject: Re: [PATCH v3 net-next] net: mana: Add a driver for Microsoft Azure Network Adapter (MANA) From: David Miller In-Reply-To: <20210408225840.26304-1-decui@microsoft.com> References: <20210408225840.26304-1-decui@microsoft.com> X-Mailer: Mew version 6.8 on Emacs 27.1 Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.6.2 (mail.monkeyblade.net [0.0.0.0]); Thu, 08 Apr 2021 16:46:23 -0700 (PDT) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Dexuan Cui Date: Thu, 8 Apr 2021 15:58:40 -0700 > +struct gdma_msg_hdr { > + u32 hdr_type; > + u32 msg_type; > + u16 msg_version; > + u16 hwc_msg_id; > + u32 msg_size; > +} __packed; > + > +struct gdma_dev_id { > + union { > + struct { > + u16 type; > + u16 instance; > + }; > + > + u32 as_uint32; > + }; > +} __packed; Please don't use __packed unless absolutely necessary. It generates suboptimal code (byte at a time accesses etc.) and for many of these you don't even need it. Thank you.