lkml.org 
[lkml]   [2021]   [Apr]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v3 net-next] net: mana: Add a driver for Microsoft Azure Network Adapter (MANA)
From
From: Dexuan Cui <decui@microsoft.com>
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.

\
 
 \ /
  Last update: 2021-04-09 01:46    [W:0.916 / U:0.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site