X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;ds=sidebyside;f=drivers%2Fnet%2Fixgbe%2Fixgbe_vf_representor.c;h=db516d9910b889cc921789d26007ac8784f89892;hb=9db3087f4f77f559090ba8228fbc4840d811c007;hp=8f8af4965d4a67975328af8e7cb44cc3875b5dc8;hpb=cf80ba6e2038a54b6c5ba62ce4200234f5aa3880;p=dpdk.git diff --git a/drivers/net/ixgbe/ixgbe_vf_representor.c b/drivers/net/ixgbe/ixgbe_vf_representor.c index 8f8af4965d..db516d9910 100644 --- a/drivers/net/ixgbe/ixgbe_vf_representor.c +++ b/drivers/net/ixgbe/ixgbe_vf_representor.c @@ -153,6 +153,20 @@ struct eth_dev_ops ixgbe_vf_representor_dev_ops = { .mac_addr_set = ixgbe_vf_representor_mac_addr_set, }; +static uint16_t +ixgbe_vf_representor_rx_burst(__rte_unused void *rx_queue, + __rte_unused struct rte_mbuf **rx_pkts, __rte_unused uint16_t nb_pkts) +{ + return 0; +} + +static uint16_t +ixgbe_vf_representor_tx_burst(__rte_unused void *tx_queue, + __rte_unused struct rte_mbuf **tx_pkts, __rte_unused uint16_t nb_pkts) +{ + return 0; +} + int ixgbe_vf_representor_init(struct rte_eth_dev *ethdev, void *init_params) { @@ -182,9 +196,11 @@ ixgbe_vf_representor_init(struct rte_eth_dev *ethdev, void *init_params) /* Set representor device ops */ ethdev->dev_ops = &ixgbe_vf_representor_dev_ops; - /* No data-path so no RX/TX functions */ - ethdev->rx_pkt_burst = NULL; - ethdev->tx_pkt_burst = NULL; + /* No data-path, but need stub Rx/Tx functions to avoid crash + * when testing with the likes of testpmd. + */ + ethdev->rx_pkt_burst = ixgbe_vf_representor_rx_burst; + ethdev->tx_pkt_burst = ixgbe_vf_representor_tx_burst; /* Setting the number queues allocated to the VF */ ethdev->data->nb_rx_queues = IXGBE_VF_MAX_RX_QUEUES;