forked from Minki/linux
i40e/i40evf: Add WB_ON_ITR offload support
X722 has a way to work around the descriptor WB issue, this offload helps turn that feature on. Change-ID: I7ffa67622426bfca5a651417b63e3afcfeb60412 Signed-off-by: Anjali Singhai Jain <anjali.singhai@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
This commit is contained in:
parent
3b6c2179ee
commit
1f01227916
@ -150,6 +150,7 @@ struct i40e_virtchnl_vsi_resource {
|
||||
#define I40E_VIRTCHNL_VF_OFFLOAD_FCOE 0x00000004
|
||||
#define I40E_VIRTCHNL_VF_OFFLOAD_RSS_AQ 0x00000008
|
||||
#define I40E_VIRTCHNL_VF_OFFLOAD_RSS_REG 0x00000010
|
||||
#define I40E_VIRTCHNL_VF_OFFLOAD_WB_ON_ITR 0x00000020
|
||||
#define I40E_VIRTCHNL_VF_OFFLOAD_VLAN 0x00010000
|
||||
#define I40E_VIRTCHNL_VF_OFFLOAD_RX_POLLING 0x00020000
|
||||
|
||||
|
@ -1203,6 +1203,10 @@ static int i40e_vc_get_vf_resources_msg(struct i40e_vf *vf, u8 *msg)
|
||||
} else {
|
||||
vfres->vf_offload_flags |= I40E_VIRTCHNL_VF_OFFLOAD_RSS_REG;
|
||||
}
|
||||
|
||||
if (vf->driver_caps & I40E_VIRTCHNL_VF_OFFLOAD_RX_POLLING)
|
||||
vfres->vf_offload_flags |= I40E_VIRTCHNL_VF_OFFLOAD_RX_POLLING;
|
||||
|
||||
vfres->num_vsis = num_vsis;
|
||||
vfres->num_queue_pairs = vf->num_queue_pairs;
|
||||
vfres->max_vectors = pf->hw.func_caps.num_msix_vectors_vf;
|
||||
|
@ -150,6 +150,7 @@ struct i40e_virtchnl_vsi_resource {
|
||||
#define I40E_VIRTCHNL_VF_OFFLOAD_FCOE 0x00000004
|
||||
#define I40E_VIRTCHNL_VF_OFFLOAD_RSS_AQ 0x00000008
|
||||
#define I40E_VIRTCHNL_VF_OFFLOAD_RSS_REG 0x00000010
|
||||
#define I40E_VIRTCHNL_VF_OFFLOAD_WB_ON_ITR 0x00000020
|
||||
#define I40E_VIRTCHNL_VF_OFFLOAD_VLAN 0x00010000
|
||||
#define I40E_VIRTCHNL_VF_OFFLOAD_RX_POLLING 0x00020000
|
||||
|
||||
|
@ -1123,6 +1123,8 @@ static int i40evf_alloc_queues(struct i40evf_adapter *adapter)
|
||||
tx_ring->netdev = adapter->netdev;
|
||||
tx_ring->dev = &adapter->pdev->dev;
|
||||
tx_ring->count = adapter->tx_desc_count;
|
||||
if (adapter->flags & I40E_FLAG_WB_ON_ITR_CAPABLE)
|
||||
tx_ring->flags |= I40E_TXR_FLAGS_WB_ON_ITR;
|
||||
adapter->tx_rings[i] = tx_ring;
|
||||
|
||||
rx_ring = &tx_ring[1];
|
||||
@ -2275,6 +2277,9 @@ static void i40evf_init_task(struct work_struct *work)
|
||||
if (err)
|
||||
goto err_sw_init;
|
||||
i40evf_map_rings_to_vectors(adapter);
|
||||
if (adapter->vf_res->vf_offload_flags &
|
||||
I40E_VIRTCHNL_VF_OFFLOAD_WB_ON_ITR)
|
||||
adapter->flags |= I40EVF_FLAG_WB_ON_ITR_CAPABLE;
|
||||
if (!RSS_AQ(adapter))
|
||||
i40evf_configure_rss(adapter);
|
||||
err = i40evf_request_misc_irq(adapter);
|
||||
|
@ -156,7 +156,8 @@ int i40evf_send_vf_config_msg(struct i40evf_adapter *adapter)
|
||||
caps = I40E_VIRTCHNL_VF_OFFLOAD_L2 |
|
||||
I40E_VIRTCHNL_VF_OFFLOAD_RSS_AQ |
|
||||
I40E_VIRTCHNL_VF_OFFLOAD_RSS_REG |
|
||||
I40E_VIRTCHNL_VF_OFFLOAD_VLAN;
|
||||
I40E_VIRTCHNL_VF_OFFLOAD_VLAN |
|
||||
I40E_VIRTCHNL_VF_OFFLOAD_WB_ON_ITR;
|
||||
adapter->current_op = I40E_VIRTCHNL_OP_GET_VF_RESOURCES;
|
||||
adapter->aq_required &= ~I40EVF_FLAG_AQ_GET_CONFIG;
|
||||
if (PF_IS_V11(adapter))
|
||||
|
Loading…
Reference in New Issue
Block a user