All global functions should use a common prefix. For netvsc all globals start with hn_. Rename get_vmbus_device to hn_nvs_get_vmbus_device to follow pattern used in this code.
Fixes: 11c0663c9445 ("net/netvsc: add function to get vmbus device") Cc: lon...@microsoft.com Signed-off-by: Stephen Hemminger <step...@networkplumber.org> --- drivers/net/netvsc/hn_nvs.c | 10 +++++----- drivers/net/netvsc/hn_nvs.h | 6 +++--- drivers/net/netvsc/hn_rxtx.c | 4 ++-- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/drivers/net/netvsc/hn_nvs.c b/drivers/net/netvsc/hn_nvs.c index 0b7e6c0264..c6bd60dbda 100644 --- a/drivers/net/netvsc/hn_nvs.c +++ b/drivers/net/netvsc/hn_nvs.c @@ -44,7 +44,7 @@ static const uint32_t hn_nvs_version[] = { NVS_VERSION_1 }; -struct rte_vmbus_device *get_vmbus_device(struct hn_data *hv) +struct rte_vmbus_device *hn_nvs_get_vmbus_device(struct hn_data *hv) { struct rte_vmbus_device *vmbus = hv->vmbus; @@ -62,7 +62,7 @@ struct rte_vmbus_device *get_vmbus_device(struct hn_data *hv) static int hn_nvs_req_send(struct hn_data *hv, void *req, uint32_t reqlen) { - return rte_vmbus_chan_send(get_vmbus_device(hv), hn_primary_chan(hv), + return rte_vmbus_chan_send(hn_nvs_get_vmbus_device(hv), hn_primary_chan(hv), VMBUS_CHANPKT_TYPE_INBAND, req, reqlen, 0, VMBUS_CHANPKT_FLAG_NONE, NULL); @@ -82,7 +82,7 @@ __hn_nvs_execute(struct hn_data *hv, int ret; /* Send request to ring buffer */ - ret = rte_vmbus_chan_send(get_vmbus_device(hv), chan, + ret = rte_vmbus_chan_send(hn_nvs_get_vmbus_device(hv), chan, VMBUS_CHANPKT_TYPE_INBAND, req, reqlen, 0, VMBUS_CHANPKT_FLAG_RC, NULL); @@ -93,7 +93,7 @@ __hn_nvs_execute(struct hn_data *hv, retry: len = sizeof(buffer); - ret = rte_vmbus_chan_recv(get_vmbus_device(hv), chan, buffer, &len, &xactid); + ret = rte_vmbus_chan_recv(hn_nvs_get_vmbus_device(hv), chan, buffer, &len, &xactid); if (ret == -EAGAIN) { rte_delay_us(HN_CHAN_INTERVAL_US); goto retry; @@ -530,7 +530,7 @@ hn_nvs_ack_rxbuf(struct hn_data *hv, struct vmbus_channel *chan, uint64_t tid) PMD_RX_LOG(DEBUG, "ack RX id %" PRIu64, tid); again: - error = rte_vmbus_chan_send(get_vmbus_device(hv), chan, + error = rte_vmbus_chan_send(hn_nvs_get_vmbus_device(hv), chan, VMBUS_CHANPKT_TYPE_COMP, &ack, sizeof(ack), tid, VMBUS_CHANPKT_FLAG_NONE, NULL); diff --git a/drivers/net/netvsc/hn_nvs.h b/drivers/net/netvsc/hn_nvs.h index b7691a5dc2..bf10621927 100644 --- a/drivers/net/netvsc/hn_nvs.h +++ b/drivers/net/netvsc/hn_nvs.h @@ -222,14 +222,14 @@ void hn_nvs_handle_vfassoc(struct rte_eth_dev *dev, const struct vmbus_chanpkt_hdr *hdr, const void *data); -struct rte_vmbus_device *get_vmbus_device(struct hn_data *hv); +struct rte_vmbus_device *hn_nvs_get_vmbus_device(struct hn_data *hv); static inline int hn_nvs_send(struct hn_data *hv, struct vmbus_channel *chan, uint16_t flags, void *nvs_msg, int nvs_msglen, uintptr_t sndc, bool *need_sig) { - return rte_vmbus_chan_send(get_vmbus_device(hv), chan, VMBUS_CHANPKT_TYPE_INBAND, + return rte_vmbus_chan_send(hn_nvs_get_vmbus_device(hv), chan, VMBUS_CHANPKT_TYPE_INBAND, nvs_msg, nvs_msglen, (uint64_t)sndc, flags, need_sig); } @@ -240,6 +240,6 @@ hn_nvs_send_sglist(struct hn_data *hv, struct vmbus_channel *chan, void *nvs_msg, int nvs_msglen, uintptr_t sndc, bool *need_sig) { - return rte_vmbus_chan_send_sglist(get_vmbus_device(hv), chan, sg, sglen, nvs_msg, + return rte_vmbus_chan_send_sglist(hn_nvs_get_vmbus_device(hv), chan, sg, sglen, nvs_msg, nvs_msglen, (uint64_t)sndc, need_sig); } diff --git a/drivers/net/netvsc/hn_rxtx.c b/drivers/net/netvsc/hn_rxtx.c index 0764d5b319..72dab26ede 100644 --- a/drivers/net/netvsc/hn_rxtx.c +++ b/drivers/net/netvsc/hn_rxtx.c @@ -1176,7 +1176,7 @@ uint32_t hn_process_events(struct hn_data *hv, uint16_t queue_id, } if (bytes_read > 0) - rte_vmbus_chan_signal_read(get_vmbus_device(hv), rxq->chan, bytes_read); + rte_vmbus_chan_signal_read(hn_nvs_get_vmbus_device(hv), rxq->chan, bytes_read); rte_spinlock_unlock(&rxq->ring_lock); @@ -1641,7 +1641,7 @@ hn_xmit_pkts(void *ptxq, struct rte_mbuf **tx_pkts, uint16_t nb_pkts) fail: if (need_sig) - rte_vmbus_chan_signal_tx(get_vmbus_device(hv), txq->chan); + rte_vmbus_chan_signal_tx(hn_nvs_get_vmbus_device(hv), txq->chan); return nb_tx; } -- 2.47.3