Lines Matching +full:convert +full:- +full:rate
1 /* SPDX-License-Identifier: GPL-2.0 */
2 /* Copyright(c) 2013 - 2018 Intel Corporation. */
10 /* Interrupt Throttling and Rate Limiting Goodies */
32 /* 0x40 is the enable bit for interrupt rate limiting, and must be set if
33 * the value of the rate limit is non-zero
40 * i40e_intrl_usec_to_reg - convert interrupt rate limit to register
41 * @intrl: interrupt rate limit to convert
43 * This function converts a decimal interrupt rate limit to the appropriate
44 * register format expected by the firmware when setting interrupt rate limit.
96 (test_bit(I40E_HW_CAP_MULTI_TCP_UDP_RSS_PCTYPE, (pf)->hw.caps) ? \
110 * i.e. RXBUFFER_256 --> 960 byte skb (size-1024 slab)
111 * i.e. RXBUFFER_512 --> 1216 byte skb (size-2048 slab)
139 pad_size = SKB_WITH_OVERHEAD(page_size) - rx_buf_len; in i40e_compute_pad()
153 * cache-line alignment. in i40e_skb_pad()
161 rx_buf_len -= NET_IP_ALIGN; in i40e_skb_pad()
173 * i40e_test_staterr - tests bits in Rx descriptor status and error fields
185 return !!(rx_desc->wb.qword1.status_error_len & in i40e_test_staterr()
195 if ((i) == (r)->count) \
204 /* The size limit for a transmit buffer in a descriptor is (16K - 1).
209 #define I40E_MAX_DATA_PER_TXD (16 * 1024 - 1)
211 (I40E_MAX_DATA_PER_TXD & ~(I40E_MAX_READ_REQ_SIZE - 1))
214 * i40e_txd_use_count - estimate the number of descriptors needed for Tx
219 * though each descriptor can take up to 16K - 1 bytes of aligned memory.
230 * accurate as we have 4K - 1 of wiggle room that we can fit into the last
406 return !!(ring->flags & I40E_RXR_FLAGS_BUILD_SKB_ENABLED); in ring_uses_build_skb()
411 ring->flags |= I40E_RXR_FLAGS_BUILD_SKB_ENABLED; in set_ring_build_skb_enabled()
416 ring->flags &= ~I40E_RXR_FLAGS_BUILD_SKB_ENABLED; in clear_ring_build_skb_enabled()
421 return !!(ring->flags & I40E_TXR_FLAGS_XDP); in ring_is_xdp()
426 ring->flags |= I40E_TXR_FLAGS_XDP; in set_ring_xdp()
447 for (pos = (head).ring; pos != NULL; pos = pos->next)
452 if (ring->rx_buf_len > (PAGE_SIZE / 2)) in i40e_rx_pg_order()
482 * i40e_get_head - Retrieve head from head writeback
486 * in head write-back location
490 void *head = (struct i40e_tx_desc *)tx_ring->desc + tx_ring->count; in i40e_get_head()
496 * i40e_xmit_descriptor_count - calculate number of Tx descriptors needed
505 const skb_frag_t *frag = &skb_shinfo(skb)->frags[0]; in i40e_xmit_descriptor_count()
506 unsigned int nr_frags = skb_shinfo(skb)->nr_frags; in i40e_xmit_descriptor_count()
512 if (!nr_frags--) in i40e_xmit_descriptor_count()
522 * i40e_maybe_stop_tx - 1st level check for Tx stop conditions
536 * i40e_chk_linearize - Check if there are more than 8 fragments per packet
540 * Note: Our HW can't scatter-gather more than 8 fragments to build
558 * txring_txq - Find the netdev Tx ring based on the i40e Tx ring
563 return netdev_get_tx_queue(ring->netdev, ring->queue_index); in txring_txq()