diff mbox

[net-next,v1,11/13] virtchnl: Add pad fields to a couple of structures

Message ID 1493663091-27870-12-git-send-email-jesse.brandeburg@intel.com
State Superseded
Headers show

Commit Message

Jesse Brandeburg May 1, 2017, 6:24 p.m. UTC
From: Sridhar Samudrala <sridhar.samudrala@intel.com>

This removes holes and makes structure sizes consistent across
32 and 64 bit builds.

Signed-off-by: Sridhar Samudrala <sridhar.samudrala@intel.com>
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>

Comments

Shannon Nelson May 2, 2017, 5:18 a.m. UTC | #1
On 5/1/2017 11:24 AM, Jesse Brandeburg wrote:
> From: Sridhar Samudrala <sridhar.samudrala@intel.com>
>
> This removes holes and makes structure sizes consistent across
> 32 and 64 bit builds.
>
> Signed-off-by: Sridhar Samudrala <sridhar.samudrala@intel.com>
> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
>
> diff --git a/include/linux/avf/virtchnl.h b/include/linux/avf/virtchnl.h
> index 3f15d6a..ea34154 100644
> --- a/include/linux/avf/virtchnl.h
> +++ b/include/linux/avf/virtchnl.h
> @@ -275,8 +275,10 @@ struct virtchnl_rxq_info {
>  	u16 splithdr_enabled; /* deprecated with AVF 1.0 */

Isn't there a 2 byte hole here as well?
sln

>  	u32 databuffer_size;
>  	u32 max_pkt_size;
> +	u32 pad1;
>  	u64 dma_ring_addr;
>  	enum virtchnl_rx_hsplit rx_split_pos; /* deprecated with AVF 1.0 */
> +	u32 pad2;
>  };
>
>  /* VIRTCHNL_OP_CONFIG_VSI_QUEUES
> @@ -295,6 +297,7 @@ struct virtchnl_queue_pair_info {
>  struct virtchnl_vsi_queue_config_info {
>  	u16 vsi_id;
>  	u16 num_queue_pairs;
> +	u32 pad;
>  	struct virtchnl_queue_pair_info qpair[1];
>  };
>
>
Shannon Nelson May 2, 2017, 5:20 a.m. UTC | #2
On 5/1/2017 10:18 PM, Shannon Nelson wrote:
> On 5/1/2017 11:24 AM, Jesse Brandeburg wrote:
>> From: Sridhar Samudrala <sridhar.samudrala@intel.com>
>>
>> This removes holes and makes structure sizes consistent across
>> 32 and 64 bit builds.
>>
>> Signed-off-by: Sridhar Samudrala <sridhar.samudrala@intel.com>
>> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
>>
>> diff --git a/include/linux/avf/virtchnl.h b/include/linux/avf/virtchnl.h
>> index 3f15d6a..ea34154 100644
>> --- a/include/linux/avf/virtchnl.h
>> +++ b/include/linux/avf/virtchnl.h
>> @@ -275,8 +275,10 @@ struct virtchnl_rxq_info {
>>      u16 splithdr_enabled; /* deprecated with AVF 1.0 */
>
> Isn't there a 2 byte hole here as well?
> sln

Oh, nevermind, I misread the diff.
sln

>
>>      u32 databuffer_size;
>>      u32 max_pkt_size;
>> +    u32 pad1;
>>      u64 dma_ring_addr;
>>      enum virtchnl_rx_hsplit rx_split_pos; /* deprecated with AVF 1.0 */
>> +    u32 pad2;
>>  };
>>
>>  /* VIRTCHNL_OP_CONFIG_VSI_QUEUES
>> @@ -295,6 +297,7 @@ struct virtchnl_queue_pair_info {
>>  struct virtchnl_vsi_queue_config_info {
>>      u16 vsi_id;
>>      u16 num_queue_pairs;
>> +    u32 pad;
>>      struct virtchnl_queue_pair_info qpair[1];
>>  };
>>
>>
> _______________________________________________
> Intel-wired-lan mailing list
> Intel-wired-lan@lists.osuosl.org
> http://lists.osuosl.org/mailman/listinfo/intel-wired-lan
diff mbox

Patch

diff --git a/include/linux/avf/virtchnl.h b/include/linux/avf/virtchnl.h
index 3f15d6a..ea34154 100644
--- a/include/linux/avf/virtchnl.h
+++ b/include/linux/avf/virtchnl.h
@@ -275,8 +275,10 @@  struct virtchnl_rxq_info {
 	u16 splithdr_enabled; /* deprecated with AVF 1.0 */
 	u32 databuffer_size;
 	u32 max_pkt_size;
+	u32 pad1;
 	u64 dma_ring_addr;
 	enum virtchnl_rx_hsplit rx_split_pos; /* deprecated with AVF 1.0 */
+	u32 pad2;
 };
 
 /* VIRTCHNL_OP_CONFIG_VSI_QUEUES
@@ -295,6 +297,7 @@  struct virtchnl_queue_pair_info {
 struct virtchnl_vsi_queue_config_info {
 	u16 vsi_id;
 	u16 num_queue_pairs;
+	u32 pad;
 	struct virtchnl_queue_pair_info qpair[1];
 };