MCPcopy Create free account
hub / github.com/F-Stack/f-stack / validate_tx_req_id

Function validate_tx_req_id

dpdk/drivers/net/ena/ena_ethdev.c:738–759  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

736}
737
738static int validate_tx_req_id(struct ena_ring *tx_ring, u16 req_id)
739{
740 struct ena_tx_buffer *tx_info = NULL;
741
742 if (likely(req_id < tx_ring->ring_size)) {
743 tx_info = &tx_ring->tx_buffer_info[req_id];
744 if (likely(tx_info->mbuf))
745 return 0;
746 }
747
748 if (tx_info)
749 PMD_TX_LOG(ERR, "tx_info doesn't have valid mbuf. queue %d:%d req_id %u\n",
750 tx_ring->port_id, tx_ring->id, req_id);
751 else
752 PMD_TX_LOG(ERR, "Invalid req_id: %hu in queue %d:%d\n",
753 req_id, tx_ring->port_id, tx_ring->id);
754
755 /* Trigger device reset */
756 ++tx_ring->tx_stats.bad_req_id;
757 ena_trigger_reset(tx_ring->adapter, ENA_REGS_RESET_INV_TX_REQ_ID);
758 return -EFAULT;
759}
760
761static void ena_config_host_info(struct ena_com_dev *ena_dev)
762{

Callers 1

ena_tx_cleanupFunction · 0.85

Calls 1

ena_trigger_resetFunction · 0.85

Tested by

no test coverage detected