#endif
static inline void
-ixgbe_rxq_rearm(struct igb_rx_queue *rxq)
+ixgbe_rxq_rearm(struct ixgbe_rx_queue *rxq)
{
int i;
uint16_t rx_id;
volatile union ixgbe_adv_rx_desc *rxdp;
- struct igb_rx_entry *rxep = &rxq->sw_ring[rxq->rxrearm_start];
+ struct ixgbe_rx_entry *rxep = &rxq->sw_ring[rxq->rxrearm_start];
struct rte_mbuf *mb0, *mb1;
__m128i hdr_room = _mm_set_epi64x(RTE_PKTMBUF_HEADROOM,
RTE_PKTMBUF_HEADROOM);
* - don't support ol_flags for rss and csum err
*/
static inline uint16_t
-_recv_raw_pkts_vec(struct igb_rx_queue *rxq, struct rte_mbuf **rx_pkts,
+_recv_raw_pkts_vec(struct ixgbe_rx_queue *rxq, struct rte_mbuf **rx_pkts,
uint16_t nb_pkts, uint8_t *split_packet)
{
volatile union ixgbe_adv_rx_desc *rxdp;
- struct igb_rx_entry *sw_ring;
+ struct ixgbe_rx_entry *sw_ring;
uint16_t nb_pkts_recd;
int pos;
uint64_t var;
}
static inline uint16_t
-reassemble_packets(struct igb_rx_queue *rxq, struct rte_mbuf **rx_bufs,
+reassemble_packets(struct ixgbe_rx_queue *rxq, struct rte_mbuf **rx_bufs,
uint16_t nb_bufs, uint8_t *split_flags)
{
struct rte_mbuf *pkts[RTE_IXGBE_VPMD_RX_BURST]; /*finished pkts*/
struct rte_mbuf *start = rxq->pkt_first_seg;
struct rte_mbuf *end = rxq->pkt_last_seg;
- unsigned pkt_idx = 0, buf_idx = 0;
+ unsigned pkt_idx, buf_idx;
- while (buf_idx < nb_bufs) {
+ for (buf_idx = 0, pkt_idx = 0; buf_idx < nb_bufs; buf_idx++) {
if (end != NULL) {
/* processing a split packet */
end->next = rx_bufs[buf_idx];
rx_bufs[buf_idx]->data_len += rxq->crc_len;
rx_bufs[buf_idx]->pkt_len += rxq->crc_len;
}
- buf_idx++;
}
/* save the partial packet for next time */
ixgbe_recv_scattered_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
uint16_t nb_pkts)
{
- struct igb_rx_queue *rxq = rx_queue;
+ struct ixgbe_rx_queue *rxq = rx_queue;
uint8_t split_flags[RTE_IXGBE_VPMD_RX_BURST] = {0};
/* get some new buffers */
unsigned i = 0;
if (rxq->pkt_first_seg == NULL) {
/* find the first split flag, and only reassemble then*/
- while (!split_flags[i] && i < nb_bufs)
+ while (i < nb_bufs && !split_flags[i])
i++;
if (i == nb_bufs)
return nb_bufs;
}
static inline int __attribute__((always_inline))
-ixgbe_tx_free_bufs(struct igb_tx_queue *txq)
+ixgbe_tx_free_bufs(struct ixgbe_tx_queue *txq)
{
- struct igb_tx_entry_v *txep;
+ struct ixgbe_tx_entry_v *txep;
uint32_t status;
uint32_t n;
uint32_t i;
* first buffer to free from S/W ring is at index
* tx_next_dd - (tx_rs_thresh-1)
*/
- txep = &((struct igb_tx_entry_v *)txq->sw_ring)[txq->tx_next_dd -
+ txep = &((struct ixgbe_tx_entry_v *)txq->sw_ring)[txq->tx_next_dd -
(n - 1)];
-#ifdef RTE_MBUF_REFCNT
m = __rte_pktmbuf_prefree_seg(txep[0].mbuf);
-#else
- m = txep[0].mbuf;
-#endif
if (likely(m != NULL)) {
free[0] = m;
nb_free = 1;
for (i = 1; i < n; i++) {
-#ifdef RTE_MBUF_REFCNT
m = __rte_pktmbuf_prefree_seg(txep[i].mbuf);
-#else
- m = txep[i].mbuf;
-#endif
if (likely(m != NULL)) {
if (likely(m->pool == free[0]->pool))
free[nb_free++] = m;
}
static inline void __attribute__((always_inline))
-tx_backlog_entry(struct igb_tx_entry_v *txep,
+tx_backlog_entry(struct ixgbe_tx_entry_v *txep,
struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
{
int i;
ixgbe_xmit_pkts_vec(void *tx_queue, struct rte_mbuf **tx_pkts,
uint16_t nb_pkts)
{
- struct igb_tx_queue *txq = (struct igb_tx_queue *)tx_queue;
+ struct ixgbe_tx_queue *txq = (struct ixgbe_tx_queue *)tx_queue;
volatile union ixgbe_adv_tx_desc *txdp;
- struct igb_tx_entry_v *txep;
+ struct ixgbe_tx_entry_v *txep;
uint16_t n, nb_commit, tx_id;
uint64_t flags = DCMD_DTYP_FLAGS;
uint64_t rs = IXGBE_ADVTXD_DCMD_RS|DCMD_DTYP_FLAGS;
tx_id = txq->tx_tail;
txdp = &txq->tx_ring[tx_id];
- txep = &((struct igb_tx_entry_v *)txq->sw_ring)[tx_id];
+ txep = &((struct ixgbe_tx_entry_v *)txq->sw_ring)[tx_id];
txq->nb_tx_free = (uint16_t)(txq->nb_tx_free - nb_pkts);
/* avoid reach the end of ring */
txdp = &(txq->tx_ring[tx_id]);
- txep = &(((struct igb_tx_entry_v *)txq->sw_ring)[tx_id]);
+ txep = &(((struct ixgbe_tx_entry_v *)txq->sw_ring)[tx_id]);
}
tx_backlog_entry(txep, tx_pkts, nb_commit);
}
static void
-ixgbe_tx_queue_release_mbufs(struct igb_tx_queue *txq)
+ixgbe_tx_queue_release_mbufs(struct ixgbe_tx_queue *txq)
{
unsigned i;
- struct igb_tx_entry_v *txe;
+ struct ixgbe_tx_entry_v *txe;
uint16_t nb_free, max_desc;
if (txq->sw_ring != NULL) {
for (i = txq->tx_next_dd - (txq->tx_rs_thresh - 1);
nb_free < max_desc && i != txq->tx_tail;
i = (i + 1) & max_desc) {
- txe = (struct igb_tx_entry_v *)&txq->sw_ring[i];
+ txe = (struct ixgbe_tx_entry_v *)&txq->sw_ring[i];
if (txe->mbuf != NULL)
rte_pktmbuf_free_seg(txe->mbuf);
}
/* reset tx_entry */
for (i = 0; i < txq->nb_tx_desc; i++) {
- txe = (struct igb_tx_entry_v *)&txq->sw_ring[i];
+ txe = (struct ixgbe_tx_entry_v *)&txq->sw_ring[i];
txe->mbuf = NULL;
}
}
}
static void
-ixgbe_tx_free_swring(struct igb_tx_queue *txq)
+ixgbe_tx_free_swring(struct ixgbe_tx_queue *txq)
{
if (txq == NULL)
return;
if (txq->sw_ring != NULL) {
- rte_free((struct igb_rx_entry *)txq->sw_ring - 1);
+ rte_free((struct ixgbe_rx_entry *)txq->sw_ring - 1);
txq->sw_ring = NULL;
}
}
static void
-ixgbe_reset_tx_queue(struct igb_tx_queue *txq)
+ixgbe_reset_tx_queue(struct ixgbe_tx_queue *txq)
{
static const union ixgbe_adv_tx_desc zeroed_desc = { .read = {
.buffer_addr = 0} };
- struct igb_tx_entry_v *txe = (struct igb_tx_entry_v *)txq->sw_ring;
+ struct ixgbe_tx_entry_v *txe = (struct ixgbe_tx_entry_v *)txq->sw_ring;
uint16_t i;
/* Zero out HW ring memory */
IXGBE_CTX_NUM * sizeof(struct ixgbe_advctx_info));
}
-static struct ixgbe_txq_ops vec_txq_ops = {
+static const struct ixgbe_txq_ops vec_txq_ops = {
.release_mbufs = ixgbe_tx_queue_release_mbufs,
.free_swring = ixgbe_tx_free_swring,
.reset = ixgbe_reset_tx_queue,
};
int
-ixgbe_rxq_vec_setup(struct igb_rx_queue *rxq)
+ixgbe_rxq_vec_setup(struct ixgbe_rx_queue *rxq)
{
uintptr_t p;
struct rte_mbuf mb_def = { .buf_addr = 0 }; /* zeroed mbuf */
return 0;
}
-int ixgbe_txq_vec_setup(struct igb_tx_queue *txq)
+int ixgbe_txq_vec_setup(struct ixgbe_tx_queue *txq)
{
if (txq->sw_ring == NULL)
return -1;
/* leave the first one for overflow */
- txq->sw_ring = (struct igb_tx_entry *)
- ((struct igb_tx_entry_v *)txq->sw_ring + 1);
+ txq->sw_ring = (struct ixgbe_tx_entry *)
+ ((struct ixgbe_tx_entry_v *)txq->sw_ring + 1);
txq->ops = &vec_txq_ops;
return 0;
}
-int ixgbe_rx_vec_condition_check(struct rte_eth_dev *dev)
+int ixgbe_rx_vec_dev_conf_condition_check(struct rte_eth_dev *dev)
{
#ifndef RTE_LIBRTE_IEEE1588
struct rte_eth_rxmode *rxmode = &dev->data->dev_conf.rxmode;