X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=drivers%2Fnet%2Fsfc%2Fsfc_repr.c;h=64753f2f19024e257e52d26e50824aba7f345285;hb=a3fbef19674bca994ea0341bcfca1bb96549375b;hp=fc3229a436cf6086726fbce766f9b9122a47165e;hpb=788dedcfcbdefe4f0d43c80c11ce611fb7a237f8;p=dpdk.git diff --git a/drivers/net/sfc/sfc_repr.c b/drivers/net/sfc/sfc_repr.c index fc3229a436..64753f2f19 100644 --- a/drivers/net/sfc/sfc_repr.c +++ b/drivers/net/sfc/sfc_repr.c @@ -160,6 +160,16 @@ sfc_repr_tx_queue_stop(void *queue) rte_ring_reset(txq->ring); } +static uint16_t +sfc_repr_rx_burst(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts) +{ + struct sfc_repr_rxq *rxq = rx_queue; + void **objs = (void *)&rx_pkts[0]; + + /* mbufs port is already filled correctly by representors proxy */ + return rte_ring_sc_dequeue_burst(rxq->ring, objs, nb_pkts, NULL); +} + static uint16_t sfc_repr_tx_burst(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts) { @@ -803,6 +813,7 @@ sfc_repr_dev_close(struct rte_eth_dev *dev) (void)sfc_repr_proxy_del_port(srs->pf_port_id, srs->repr_id); + dev->rx_pkt_burst = NULL; dev->tx_pkt_burst = NULL; dev->dev_ops = NULL; @@ -924,6 +935,7 @@ sfc_repr_eth_dev_init(struct rte_eth_dev *dev, void *init_params) goto fail_mac_addrs; } + dev->rx_pkt_burst = sfc_repr_rx_burst; dev->tx_pkt_burst = sfc_repr_tx_burst; dev->dev_ops = &sfc_repr_dev_ops;