diff options
Diffstat (limited to 'drivers/net/ethernet/intel/ice/ice_base.c')
| -rw-r--r-- | drivers/net/ethernet/intel/ice/ice_base.c | 22 | 
1 files changed, 2 insertions, 20 deletions
diff --git a/drivers/net/ethernet/intel/ice/ice_base.c b/drivers/net/ethernet/intel/ice/ice_base.c index 136d7911adb4..9e36f01dfa4f 100644 --- a/drivers/net/ethernet/intel/ice/ice_base.c +++ b/drivers/net/ethernet/intel/ice/ice_base.c @@ -7,18 +7,6 @@  #include "ice_dcb_lib.h"  #include "ice_sriov.h" -static bool ice_alloc_rx_buf_zc(struct ice_rx_ring *rx_ring) -{ -	rx_ring->xdp_buf = kcalloc(rx_ring->count, sizeof(*rx_ring->xdp_buf), GFP_KERNEL); -	return !!rx_ring->xdp_buf; -} - -static bool ice_alloc_rx_buf(struct ice_rx_ring *rx_ring) -{ -	rx_ring->rx_buf = kcalloc(rx_ring->count, sizeof(*rx_ring->rx_buf), GFP_KERNEL); -	return !!rx_ring->rx_buf; -} -  /**   * __ice_vsi_get_qs_contig - Assign a contiguous chunk of queues to VSI   * @qs_cfg: gathered variables needed for PF->VSI queues assignment @@ -142,8 +130,7 @@ static int ice_vsi_alloc_q_vector(struct ice_vsi *vsi, u16 v_idx)  	 * handler here (i.e. resume, reset/rebuild, etc.)  	 */  	if (vsi->netdev) -		netif_napi_add(vsi->netdev, &q_vector->napi, ice_napi_poll, -			       NAPI_POLL_WEIGHT); +		netif_napi_add(vsi->netdev, &q_vector->napi, ice_napi_poll);  out:  	/* tie q_vector and VSI together */ @@ -417,7 +404,7 @@ static int ice_setup_rx_ctx(struct ice_rx_ring *ring)  	/* Strip the Ethernet CRC bytes before the packet is posted to host  	 * memory.  	 */ -	rlan_ctx.crcstrip = 1; +	rlan_ctx.crcstrip = !(ring->flags & ICE_RX_FLAGS_CRC_STRIP_DIS);  	/* L2TSEL flag defines the reported L2 Tags in the receive descriptor  	 * and it needs to remain 1 for non-DVM capable configurations to not @@ -519,11 +506,8 @@ int ice_vsi_cfg_rxq(struct ice_rx_ring *ring)  			xdp_rxq_info_reg(&ring->xdp_rxq, ring->netdev,  					 ring->q_index, ring->q_vector->napi.napi_id); -		kfree(ring->rx_buf);  		ring->xsk_pool = ice_xsk_pool(ring);  		if (ring->xsk_pool) { -			if (!ice_alloc_rx_buf_zc(ring)) -				return -ENOMEM;  			xdp_rxq_info_unreg_mem_model(&ring->xdp_rxq);  			ring->rx_buf_len = @@ -538,8 +522,6 @@ int ice_vsi_cfg_rxq(struct ice_rx_ring *ring)  			dev_info(dev, "Registered XDP mem model MEM_TYPE_XSK_BUFF_POOL on Rx ring %d\n",  				 ring->q_index);  		} else { -			if (!ice_alloc_rx_buf(ring)) -				return -ENOMEM;  			if (!xdp_rxq_info_is_reg(&ring->xdp_rxq))  				/* coverity[check_return] */  				xdp_rxq_info_reg(&ring->xdp_rxq,  |