+
+/*
+ * Execute one control command and get the response.
+ * Only one command can be active on a channel at once
+ * Unlike BSD, DPDK does not have an interrupt context
+ * so the polling is required to wait for response.
+ */
+static int
+hn_nvs_execute(struct hn_data *hv,
+ void *req, uint32_t reqlen,
+ void *resp, uint32_t resplen,
+ uint32_t type)
+{
+ struct hn_rx_queue *rxq = hv->primary;
+ int ret;
+
+ rte_spinlock_lock(&rxq->ring_lock);
+ ret = __hn_nvs_execute(hv, req, reqlen, resp, resplen, type);
+ rte_spinlock_unlock(&rxq->ring_lock);
+
+ return ret;
+}
+