X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=drivers%2Fnet%2Fnetvsc%2Fhn_rxtx.c;h=028f176c7e9dcadefaab529915e20c21bb0cb9e9;hb=d61138d4f0e2927cc1d0fef6d810fa7f5d1161a1;hp=c6bf7cc132335438ea44c074a533185149fc912c;hpb=924e6b76342aeb60bd33a7c7a6071ec0aa0dce41;p=dpdk.git diff --git a/drivers/net/netvsc/hn_rxtx.c b/drivers/net/netvsc/hn_rxtx.c index c6bf7cc132..028f176c7e 100644 --- a/drivers/net/netvsc/hn_rxtx.c +++ b/drivers/net/netvsc/hn_rxtx.c @@ -356,9 +356,9 @@ static void hn_txd_put(struct hn_tx_queue *txq, struct hn_txdesc *txd) } void -hn_dev_tx_queue_release(void *arg) +hn_dev_tx_queue_release(struct rte_eth_dev *dev, uint16_t qid) { - struct hn_tx_queue *txq = arg; + struct hn_tx_queue *txq = dev->data->tx_queues[qid]; PMD_INIT_FUNC_TRACE(); @@ -615,7 +615,7 @@ static void hn_rxpkt(struct hn_rx_queue *rxq, struct hn_rx_bufinfo *rxb, if (info->vlan_info != HN_NDIS_VLAN_INFO_INVALID) { m->vlan_tci = info->vlan_info; - m->ol_flags |= PKT_RX_VLAN_STRIPPED | PKT_RX_VLAN; + m->ol_flags |= RTE_MBUF_F_RX_VLAN_STRIPPED | RTE_MBUF_F_RX_VLAN; /* NDIS always strips tag, put it back if necessary */ if (!hv->vlan_strip && rte_vlan_insert(&m)) { @@ -630,18 +630,18 @@ static void hn_rxpkt(struct hn_rx_queue *rxq, struct hn_rx_bufinfo *rxb, if (info->csum_info != HN_NDIS_RXCSUM_INFO_INVALID) { if (info->csum_info & NDIS_RXCSUM_INFO_IPCS_OK) - m->ol_flags |= PKT_RX_IP_CKSUM_GOOD; + m->ol_flags |= RTE_MBUF_F_RX_IP_CKSUM_GOOD; if (info->csum_info & (NDIS_RXCSUM_INFO_UDPCS_OK | NDIS_RXCSUM_INFO_TCPCS_OK)) - m->ol_flags |= PKT_RX_L4_CKSUM_GOOD; + m->ol_flags |= RTE_MBUF_F_RX_L4_CKSUM_GOOD; else if (info->csum_info & (NDIS_RXCSUM_INFO_TCPCS_FAILED | NDIS_RXCSUM_INFO_UDPCS_FAILED)) - m->ol_flags |= PKT_RX_L4_CKSUM_BAD; + m->ol_flags |= RTE_MBUF_F_RX_L4_CKSUM_BAD; } if (info->hash_info != HN_NDIS_HASH_INFO_INVALID) { - m->ol_flags |= PKT_RX_RSS_HASH; + m->ol_flags |= RTE_MBUF_F_RX_RSS_HASH; m->hash.rss = info->hash_value; } @@ -1004,9 +1004,9 @@ hn_rx_queue_free(struct hn_rx_queue *rxq, bool keep_primary) } void -hn_dev_rx_queue_release(void *arg) +hn_dev_rx_queue_release(struct rte_eth_dev *dev, uint16_t qid) { - struct hn_rx_queue *rxq = arg; + struct hn_rx_queue *rxq = dev->data->rx_queues[qid]; PMD_INIT_FUNC_TRACE(); @@ -1018,9 +1018,9 @@ hn_dev_rx_queue_release(void *arg) * For this device that means how many packets are pending in the ring. */ uint32_t -hn_dev_rx_queue_count(struct rte_eth_dev *dev, uint16_t queue_id) +hn_dev_rx_queue_count(void *rx_queue) { - struct hn_rx_queue *rxq = dev->data->rx_queues[queue_id]; + struct hn_rx_queue *rxq = rx_queue; return rte_ring_count(rxq->rx_ring); } @@ -1331,17 +1331,17 @@ static void hn_encap(struct rndis_packet_msg *pkt, NDIS_PKTINFO_TYPE_HASHVAL); *pi_data = queue_id; - if (m->ol_flags & PKT_TX_VLAN_PKT) { + if (m->ol_flags & RTE_MBUF_F_TX_VLAN) { pi_data = hn_rndis_pktinfo_append(pkt, NDIS_VLAN_INFO_SIZE, NDIS_PKTINFO_TYPE_VLAN); *pi_data = m->vlan_tci; } - if (m->ol_flags & PKT_TX_TCP_SEG) { + if (m->ol_flags & RTE_MBUF_F_TX_TCP_SEG) { pi_data = hn_rndis_pktinfo_append(pkt, NDIS_LSO2_INFO_SIZE, NDIS_PKTINFO_TYPE_LSO); - if (m->ol_flags & PKT_TX_IPV6) { + if (m->ol_flags & RTE_MBUF_F_TX_IPV6) { *pi_data = NDIS_LSO2_INFO_MAKEIPV6(hlen, m->tso_segsz); } else { @@ -1349,23 +1349,23 @@ static void hn_encap(struct rndis_packet_msg *pkt, m->tso_segsz); } } else if (m->ol_flags & - (PKT_TX_TCP_CKSUM | PKT_TX_UDP_CKSUM | PKT_TX_IP_CKSUM)) { + (RTE_MBUF_F_TX_TCP_CKSUM | RTE_MBUF_F_TX_UDP_CKSUM | RTE_MBUF_F_TX_IP_CKSUM)) { pi_data = hn_rndis_pktinfo_append(pkt, NDIS_TXCSUM_INFO_SIZE, NDIS_PKTINFO_TYPE_CSUM); *pi_data = 0; - if (m->ol_flags & PKT_TX_IPV6) + if (m->ol_flags & RTE_MBUF_F_TX_IPV6) *pi_data |= NDIS_TXCSUM_INFO_IPV6; - if (m->ol_flags & PKT_TX_IPV4) { + if (m->ol_flags & RTE_MBUF_F_TX_IPV4) { *pi_data |= NDIS_TXCSUM_INFO_IPV4; - if (m->ol_flags & PKT_TX_IP_CKSUM) + if (m->ol_flags & RTE_MBUF_F_TX_IP_CKSUM) *pi_data |= NDIS_TXCSUM_INFO_IPCS; } - if (m->ol_flags & PKT_TX_TCP_CKSUM) + if (m->ol_flags & RTE_MBUF_F_TX_TCP_CKSUM) *pi_data |= NDIS_TXCSUM_INFO_MKTCPCS(hlen); - else if (m->ol_flags & PKT_TX_UDP_CKSUM) + else if (m->ol_flags & RTE_MBUF_F_TX_UDP_CKSUM) *pi_data |= NDIS_TXCSUM_INFO_MKUDPCS(hlen); } @@ -1648,7 +1648,7 @@ hn_dev_free_queues(struct rte_eth_dev *dev) dev->data->nb_rx_queues = 0; for (i = 0; i < dev->data->nb_tx_queues; i++) { - hn_dev_tx_queue_release(dev->data->tx_queues[i]); + hn_dev_tx_queue_release(dev, i); dev->data->tx_queues[i] = NULL; } dev->data->nb_tx_queues = 0;