Skip to content

Commit 1b53c2f

Browse files
mawilli1Jeff Kirsher
authored andcommitted
i40e: add VF capabilities to virtual channel interface
To prepare for the changes coming up in the X722 device and future devices, the virtual channel interface has to change slightly. The VF driver can now report what its capable of supporting, which then informs the PF driver when it sends the configuration information back to the VF. A 1.1 VF driver on a 1.0 PF driver should not send its capabilities. Likewise, a 1.1 PF driver controlling a 1.0 VF driver should not expect or depend upon receiving the VF capabilities. All other aspects of the API are unchanged. Change-ID: I530cc55f107edd1ee8bdf95830aa90b87854058a Signed-off-by: Mitch Williams <[email protected]> Acked-by: Shannon Nelson <[email protected]> Acked-by: Anjali Singhai <[email protected]> Tested-by: Jim Young <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
1 parent 3b104be commit 1b53c2f

File tree

2 files changed

+22
-10
lines changed

2 files changed

+22
-10
lines changed

drivers/net/ethernet/intel/i40e/i40e_virtchnl.h

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,9 @@ struct i40e_virtchnl_msg {
110110
* error regardless of version mismatch.
111111
*/
112112
#define I40E_VIRTCHNL_VERSION_MAJOR 1
113-
#define I40E_VIRTCHNL_VERSION_MINOR 0
113+
#define I40E_VIRTCHNL_VERSION_MINOR 1
114+
#define I40E_VIRTCHNL_VERSION_MINOR_NO_VF_CAPS 0
115+
114116
struct i40e_virtchnl_version_info {
115117
u32 major;
116118
u32 minor;
@@ -129,7 +131,8 @@ struct i40e_virtchnl_version_info {
129131
*/
130132

131133
/* I40E_VIRTCHNL_OP_GET_VF_RESOURCES
132-
* VF sends this request to PF with no parameters
134+
* Version 1.0 VF sends this request to PF with no parameters
135+
* Version 1.1 VF sends this request to PF with u32 bitmap of its capabilities
133136
* PF responds with an indirect message containing
134137
* i40e_virtchnl_vf_resource and one or more
135138
* i40e_virtchnl_vsi_resource structures.
@@ -143,9 +146,12 @@ struct i40e_virtchnl_vsi_resource {
143146
u8 default_mac_addr[ETH_ALEN];
144147
};
145148
/* VF offload flags */
146-
#define I40E_VIRTCHNL_VF_OFFLOAD_L2 0x00000001
147-
#define I40E_VIRTCHNL_VF_OFFLOAD_FCOE 0x00000004
148-
#define I40E_VIRTCHNL_VF_OFFLOAD_VLAN 0x00010000
149+
#define I40E_VIRTCHNL_VF_OFFLOAD_L2 0x00000001
150+
#define I40E_VIRTCHNL_VF_OFFLOAD_IWARP 0x00000002
151+
#define I40E_VIRTCHNL_VF_OFFLOAD_FCOE 0x00000004
152+
#define I40E_VIRTCHNL_VF_OFFLOAD_RSS_AQ 0x00000008
153+
#define I40E_VIRTCHNL_VF_OFFLOAD_RSS_REG 0x00000010
154+
#define I40E_VIRTCHNL_VF_OFFLOAD_VLAN 0x00010000
149155

150156
struct i40e_virtchnl_vf_resource {
151157
u16 num_vsis;

drivers/net/ethernet/intel/i40evf/i40e_virtchnl.h

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,9 @@ struct i40e_virtchnl_msg {
110110
* error regardless of version mismatch.
111111
*/
112112
#define I40E_VIRTCHNL_VERSION_MAJOR 1
113-
#define I40E_VIRTCHNL_VERSION_MINOR 0
113+
#define I40E_VIRTCHNL_VERSION_MINOR 1
114+
#define I40E_VIRTCHNL_VERSION_MINOR_NO_VF_CAPS 0
115+
114116
struct i40e_virtchnl_version_info {
115117
u32 major;
116118
u32 minor;
@@ -129,7 +131,8 @@ struct i40e_virtchnl_version_info {
129131
*/
130132

131133
/* I40E_VIRTCHNL_OP_GET_VF_RESOURCES
132-
* VF sends this request to PF with no parameters
134+
* Version 1.0 VF sends this request to PF with no parameters
135+
* Version 1.1 VF sends this request to PF with u32 bitmap of its capabilities
133136
* PF responds with an indirect message containing
134137
* i40e_virtchnl_vf_resource and one or more
135138
* i40e_virtchnl_vsi_resource structures.
@@ -143,9 +146,12 @@ struct i40e_virtchnl_vsi_resource {
143146
u8 default_mac_addr[ETH_ALEN];
144147
};
145148
/* VF offload flags */
146-
#define I40E_VIRTCHNL_VF_OFFLOAD_L2 0x00000001
147-
#define I40E_VIRTCHNL_VF_OFFLOAD_FCOE 0x00000004
148-
#define I40E_VIRTCHNL_VF_OFFLOAD_VLAN 0x00010000
149+
#define I40E_VIRTCHNL_VF_OFFLOAD_L2 0x00000001
150+
#define I40E_VIRTCHNL_VF_OFFLOAD_IWARP 0x00000002
151+
#define I40E_VIRTCHNL_VF_OFFLOAD_FCOE 0x00000004
152+
#define I40E_VIRTCHNL_VF_OFFLOAD_RSS_AQ 0x00000008
153+
#define I40E_VIRTCHNL_VF_OFFLOAD_RSS_REG 0x00000010
154+
#define I40E_VIRTCHNL_VF_OFFLOAD_VLAN 0x00010000
149155

150156
struct i40e_virtchnl_vf_resource {
151157
u16 num_vsis;

0 commit comments

Comments
 (0)