[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20161219064303.GA94834@knc-06.sc.intel.com>
Date: Sun, 18 Dec 2016 22:43:03 -0800
From: "Vishwanathapura, Niranjana" <niranjana.vishwanathapura@...el.com>
To: Jason Gunthorpe <jgunthorpe@...idianresearch.com>
Cc: dledford@...hat.com, linux-rdma@...r.kernel.org,
netdev@...r.kernel.org, dennis.dalessandro@...el.com,
ira.weiny@...el.com, Sadanand Warrier <sadanand.warrier@...el.com>,
Sudeep Dutt <sudeep.dutt@...el.com>,
Tanya K Jajodia <tanya.k.jajodia@...el.com>,
Andrzej Kacprowski <andrzej.kacprowski@...el.com>
Subject: Re: [RFC v2 03/10] IB/hfi-vnic: Virtual Network Interface Controller
(VNIC) netdev
On Thu, Dec 15, 2016 at 09:24:20PM -0700, Jason Gunthorpe wrote:
>> >>+struct __hfi_vesw_info {
>> >>+ u16 fabric_id;
>> >>+ u16 vesw_id;
>> >>+
>> >>+ u8 rsvd0[6];
>> >>+ u16 def_port_mask;
>> >>+
>> >>+ u8 rsvd1[2];
>> >>+ u16 pkey;
>> >>+
>> >>+ u8 rsvd2[4];
>> >>+ u32 u_mcast_dlid;
>> >>+ u32 u_ucast_dlid[HFI_VESW_MAX_NUM_DEF_PORT];
>> >>+
>> >>+ u8 rsvd3[44];
>> >>+ u16 eth_mtu[HFI_VNIC_MAX_NUM_PCP];
>> >>+ u16 eth_mtu_non_vlan;
>> >>+ u8 rsvd4[2];
>> >>+} __packed;
>> >
>> >This goes on the network too? Also looks like it has endian problems.
>> >
>> >Ditto for all the __packed structures.
>> >
>>
>> This is in CPU format. There is a separate big endian version of
>> this
>
>Why are CPU handled structures packed and full of reserved fields?
>Don't pack them if they are not pushed out to the network..
>
>There were lots of __packed structures, any that go on the network
>need be/le annoations.
>
Well, driver treats the reserved fields to be sticky. ie., information
block returned (upon GET) to EM is not changed (from SET) except few fields
which driver is expected to modify.
Structures that go on wire are big endian __packed structures in
hfi_vnic_encap.h. Ok, I will remove the __packed attribute from CPU handled
structures here.
Niranjana
>Jason
Powered by blists - more mailing lists