Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1f012279 authored by Anjali Singhai Jain's avatar Anjali Singhai Jain Committed by Jeff Kirsher
Browse files

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: default avatarAnjali Singhai Jain <anjali.singhai@intel.com>
Tested-by: default avatarAndrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
parent 3b6c2179
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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

+4 −0
Original line number Diff line number Diff line
@@ -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;
+1 −0
Original line number Diff line number Diff line
@@ -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

+5 −0
Original line number Diff line number Diff line
@@ -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);
+2 −1
Original line number Diff line number Diff line
@@ -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))