const __m128i pkttype_msk = _mm_set_epi16(
0x0000, 0x0000, 0x0000, 0x0000,
- PKT_RX_VLAN, PKT_RX_VLAN,
- PKT_RX_VLAN, PKT_RX_VLAN);
+ PKT_RX_VLAN | PKT_RX_VLAN_STRIPPED,
+ PKT_RX_VLAN | PKT_RX_VLAN_STRIPPED,
+ PKT_RX_VLAN | PKT_RX_VLAN_STRIPPED,
+ PKT_RX_VLAN | PKT_RX_VLAN_STRIPPED);
/* mask everything except rss type */
const __m128i rsstype_msk = _mm_set_epi16(
#define fm10k_desc_to_pktype_v(desc, rx_pkts) do {} while (0)
#endif
-int __attribute__((cold))
+int __rte_cold
fm10k_rx_vec_condition_check(struct rte_eth_dev *dev)
{
#ifndef RTE_LIBRTE_IEEE1588
#endif
}
-int __attribute__((cold))
+int __rte_cold
fm10k_rxq_vec_setup(struct fm10k_rx_queue *rxq)
{
uintptr_t p;
FM10K_PCI_REG_WRITE(rxq->tail_ptr, rx_id);
}
-void __attribute__((cold))
+void __rte_cold
fm10k_rx_queue_release_mbufs_vec(struct fm10k_rx_queue *rxq)
{
const unsigned mask = rxq->nb_desc - 1;
return;
/* free all mbufs that are valid in the ring */
- for (i = rxq->next_dd; i != rxq->rxrearm_start; i = (i + 1) & mask)
- rte_pktmbuf_free_seg(rxq->sw_ring[i]);
+ if (rxq->rxrearm_nb == 0) {
+ for (i = 0; i < rxq->nb_desc; i++)
+ if (rxq->sw_ring[i] != NULL)
+ rte_pktmbuf_free_seg(rxq->sw_ring[i]);
+ } else {
+ for (i = rxq->next_dd; i != rxq->rxrearm_start;
+ i = (i + 1) & mask)
+ rte_pktmbuf_free_seg(rxq->sw_ring[i]);
+ }
rxq->rxrearm_nb = rxq->nb_desc;
/* set all entries to NULL */
i++;
if (i == nb_bufs)
return nb_bufs;
+ rxq->pkt_first_seg = rx_pkts[i];
}
return i + fm10k_reassemble_packets(rxq, &rx_pkts[i], nb_bufs - i,
&split_flags[i]);
.reset = fm10k_reset_tx_queue,
};
-void __attribute__((cold))
+void __rte_cold
fm10k_txq_vec_setup(struct fm10k_tx_queue *txq)
{
txq->ops = &vec_txq_ops;
}
-int __attribute__((cold))
+int __rte_cold
fm10k_tx_vec_condition_check(struct fm10k_tx_queue *txq)
{
/* Vector TX can't offload any features yet */
struct rte_mbuf *pkt, uint64_t flags)
{
__m128i descriptor = _mm_set_epi64x(flags << 56 |
- pkt->vlan_tci << 16 | pkt->data_len,
+ (uint64_t)pkt->vlan_tci << 16 | (uint64_t)pkt->data_len,
MBUF_DMA_ADDR(pkt));
_mm_store_si128((__m128i *)txdp, descriptor);
}
return nb_pkts;
}
-static void __attribute__((cold))
+static void __rte_cold
fm10k_reset_tx_queue(struct fm10k_tx_queue *txq)
{
static const struct fm10k_tx_desc zeroed_desc = {0};