net/liquidio: add API to release Rx queue
Signed-off-by: Shijith Thotton <shijith.thotton@caviumnetworks.com> Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com> Signed-off-by: Derek Chickles <derek.chickles@caviumnetworks.com> Signed-off-by: Venkat Koppula <venkat.koppula@caviumnetworks.com> Signed-off-by: Srisivasubramanian S <ssrinivasan@caviumnetworks.com> Signed-off-by: Mallesham Jatharakonda <mjatharakonda@oneconvergence.com>
This commit is contained in:
parent
3e4b5980e2
commit
9a30013b98
@ -121,6 +121,33 @@ lio_dev_rx_queue_setup(struct rte_eth_dev *eth_dev, uint16_t q_no,
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Release the receive queue/ringbuffer. Called by
|
||||
* the upper layers.
|
||||
*
|
||||
* @param rxq
|
||||
* Opaque pointer to the receive queue to release
|
||||
*
|
||||
* @return
|
||||
* - nothing
|
||||
*/
|
||||
static void
|
||||
lio_dev_rx_queue_release(void *rxq)
|
||||
{
|
||||
struct lio_droq *droq = rxq;
|
||||
struct lio_device *lio_dev = droq->lio_dev;
|
||||
int oq_no;
|
||||
|
||||
/* Run time queue deletion not supported */
|
||||
if (lio_dev->port_configured)
|
||||
return;
|
||||
|
||||
if (droq != NULL) {
|
||||
oq_no = droq->q_no;
|
||||
lio_delete_droq_queue(droq->lio_dev, oq_no);
|
||||
}
|
||||
}
|
||||
|
||||
static int lio_dev_configure(struct rte_eth_dev *eth_dev)
|
||||
{
|
||||
struct lio_device *lio_dev = LIO_DEV(eth_dev);
|
||||
@ -266,6 +293,7 @@ nic_config_fail:
|
||||
static const struct eth_dev_ops liovf_eth_dev_ops = {
|
||||
.dev_configure = lio_dev_configure,
|
||||
.rx_queue_setup = lio_dev_rx_queue_setup,
|
||||
.rx_queue_release = lio_dev_rx_queue_release,
|
||||
};
|
||||
|
||||
static void
|
||||
|
@ -706,6 +706,16 @@ lio_dev_recv_pkts(void *rx_queue,
|
||||
return pkts_processed;
|
||||
}
|
||||
|
||||
void
|
||||
lio_delete_droq_queue(struct lio_device *lio_dev,
|
||||
int oq_no)
|
||||
{
|
||||
lio_delete_droq(lio_dev, oq_no);
|
||||
lio_dev->num_oqs--;
|
||||
rte_free(lio_dev->droq[oq_no]);
|
||||
lio_dev->droq[oq_no] = NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
* lio_init_instr_queue()
|
||||
* @param lio_dev - pointer to the lio device structure.
|
||||
|
@ -546,6 +546,7 @@ int lio_setup_droq(struct lio_device *lio_dev, int q_no, int num_descs,
|
||||
unsigned int socket_id);
|
||||
uint16_t lio_dev_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
|
||||
uint16_t budget);
|
||||
void lio_delete_droq_queue(struct lio_device *lio_dev, int oq_no);
|
||||
|
||||
/** Setup instruction queue zero for the device
|
||||
* @param lio_dev which lio device to setup
|
||||
|
Loading…
x
Reference in New Issue
Block a user