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

Commit 19b85e67 authored by Jesse Brandeburg's avatar Jesse Brandeburg Committed by Jeff Kirsher
Browse files

i40evf: Drop packet split receive routine



As part of preparation for the rx-refactor, remove the
packet split receive routine and ancillary code.

Some of the split related context set up code stays in
i40e_virtchnl_pf.c in case an older VF driver tries to load
and still wants to use packet split.

Signed-off-by: default avatarJesse Brandeburg <jesse.brandeburg@intel.com>
Tested-by: default avatarAndrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
parent 1a557afc
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -590,7 +590,7 @@ static int i40e_config_vsi_rx_queue(struct i40e_vf *vf, u16 vsi_id,
		}
		rx_ctx.hbuff = info->hdr_size >> I40E_RXQ_CTX_HBUFF_SHIFT;

		/* set splitalways mode 10b */
		/* set split mode 10b */
		rx_ctx.dtype = I40E_RX_DTYPE_HEADER_SPLIT;
	}

+1 −20
Original line number Diff line number Diff line
@@ -504,22 +504,6 @@ void i40evf_clean_rx_ring(struct i40e_ring *rx_ring)
	if (!rx_ring->rx_bi)
		return;

	if (ring_is_ps_enabled(rx_ring)) {
		int bufsz = ALIGN(rx_ring->rx_hdr_len, 256) * rx_ring->count;

		rx_bi = &rx_ring->rx_bi[0];
		if (rx_bi->hdr_buf) {
			dma_free_coherent(dev,
					  bufsz,
					  rx_bi->hdr_buf,
					  rx_bi->dma);
			for (i = 0; i < rx_ring->count; i++) {
				rx_bi = &rx_ring->rx_bi[i];
				rx_bi->dma = 0;
				rx_bi->hdr_buf = NULL;
			}
		}
	}
	/* Free all the Rx ring sk_buffs */
	for (i = 0; i < rx_ring->count; i++) {
		rx_bi = &rx_ring->rx_bi[i];
@@ -1435,9 +1419,6 @@ int i40evf_napi_poll(struct napi_struct *napi, int budget)
	i40e_for_each_ring(ring, q_vector->rx) {
		int cleaned;

		if (ring_is_ps_enabled(ring))
			cleaned = i40e_clean_rx_irq_ps(ring, budget_per_ring);
		else
		cleaned = i40e_clean_rx_irq_1buf(ring, budget_per_ring);

		work_done += cleaned;
+0 −7
Original line number Diff line number Diff line
@@ -244,16 +244,9 @@ struct i40e_rx_queue_stats {
enum i40e_ring_state_t {
	__I40E_TX_FDIR_INIT_DONE,
	__I40E_TX_XPS_INIT_DONE,
	__I40E_RX_PS_ENABLED,
	__I40E_RX_16BYTE_DESC_ENABLED,
};

#define ring_is_ps_enabled(ring) \
	test_bit(__I40E_RX_PS_ENABLED, &(ring)->state)
#define set_ring_ps_enabled(ring) \
	set_bit(__I40E_RX_PS_ENABLED, &(ring)->state)
#define clear_ring_ps_enabled(ring) \
	clear_bit(__I40E_RX_PS_ENABLED, &(ring)->state)
#define ring_is_16byte_desc_enabled(ring) \
	test_bit(__I40E_RX_16BYTE_DESC_ENABLED, &(ring)->state)
#define set_ring_16byte_desc_enabled(ring) \
+0 −2
Original line number Diff line number Diff line
@@ -209,8 +209,6 @@ struct i40evf_adapter {
	u32 flags;
#define I40EVF_FLAG_RX_CSUM_ENABLED              BIT(0)
#define I40EVF_FLAG_RX_1BUF_CAPABLE              BIT(1)
#define I40EVF_FLAG_RX_PS_CAPABLE                BIT(2)
#define I40EVF_FLAG_RX_PS_ENABLED                BIT(3)
#define I40EVF_FLAG_IMIR_ENABLED                 BIT(5)
#define I40EVF_FLAG_MQ_CAPABLE                   BIT(6)
#define I40EVF_FLAG_NEED_LINK_UPDATE             BIT(7)
+0 −14
Original line number Diff line number Diff line
@@ -527,12 +527,8 @@ static int i40evf_set_rxfh(struct net_device *netdev, const u32 *indir,
 **/
static u32 i40evf_get_priv_flags(struct net_device *dev)
{
	struct i40evf_adapter *adapter = netdev_priv(dev);
	u32 ret_flags = 0;

	ret_flags |= adapter->flags & I40EVF_FLAG_RX_PS_ENABLED ?
		I40EVF_PRIV_FLAGS_PS : 0;

	return ret_flags;
}

@@ -546,16 +542,6 @@ static int i40evf_set_priv_flags(struct net_device *dev, u32 flags)
	struct i40evf_adapter *adapter = netdev_priv(dev);
	bool reset_required = false;

	if ((flags & I40EVF_PRIV_FLAGS_PS) &&
	    !(adapter->flags & I40EVF_FLAG_RX_PS_ENABLED)) {
		adapter->flags |= I40EVF_FLAG_RX_PS_ENABLED;
		reset_required = true;
	} else if (!(flags & I40EVF_PRIV_FLAGS_PS) &&
		   (adapter->flags & I40EVF_FLAG_RX_PS_ENABLED)) {
		adapter->flags &= ~I40EVF_FLAG_RX_PS_ENABLED;
		reset_required = true;
	}

	/* if needed, issue reset to cause things to take effect */
	if (reset_required)
		i40evf_schedule_reset(adapter);
Loading