Commit 7376419a authored by Wei Liu's avatar Wei Liu Committed by David S. Miller

xen-netback: rename functions

As we move to 1:1 model and melt xen_netbk and xenvif together, it would
be better to use single prefix for all functions in xen-netback.
Signed-off-by: default avatarWei Liu <wei.liu2@citrix.com>
Acked-by: default avatarIan Campbell <ian.campbell@citrix.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent b3f980bd
......@@ -190,21 +190,21 @@ void xenvif_xenbus_fini(void);
int xenvif_schedulable(struct xenvif *vif);
int xen_netbk_rx_ring_full(struct xenvif *vif);
int xenvif_rx_ring_full(struct xenvif *vif);
int xen_netbk_must_stop_queue(struct xenvif *vif);
int xenvif_must_stop_queue(struct xenvif *vif);
/* (Un)Map communication rings. */
void xen_netbk_unmap_frontend_rings(struct xenvif *vif);
int xen_netbk_map_frontend_rings(struct xenvif *vif,
grant_ref_t tx_ring_ref,
grant_ref_t rx_ring_ref);
void xenvif_unmap_frontend_rings(struct xenvif *vif);
int xenvif_map_frontend_rings(struct xenvif *vif,
grant_ref_t tx_ring_ref,
grant_ref_t rx_ring_ref);
/* Check for SKBs from frontend and schedule backend processing */
void xen_netbk_check_rx_xenvif(struct xenvif *vif);
void xenvif_check_rx_xenvif(struct xenvif *vif);
/* Queue an SKB for transmission to the frontend */
void xen_netbk_queue_tx_skb(struct xenvif *vif, struct sk_buff *skb);
void xenvif_queue_tx_skb(struct xenvif *vif, struct sk_buff *skb);
/* Notify xenvif that ring now has space to send an skb to the frontend */
void xenvif_notify_tx_completion(struct xenvif *vif);
......@@ -212,12 +212,12 @@ void xenvif_notify_tx_completion(struct xenvif *vif);
void xenvif_carrier_off(struct xenvif *vif);
/* Returns number of ring slots required to send an skb to the frontend */
unsigned int xen_netbk_count_skb_slots(struct xenvif *vif, struct sk_buff *skb);
unsigned int xenvif_count_skb_slots(struct xenvif *vif, struct sk_buff *skb);
int xen_netbk_tx_action(struct xenvif *vif, int budget);
void xen_netbk_rx_action(struct xenvif *vif);
int xenvif_tx_action(struct xenvif *vif, int budget);
void xenvif_rx_action(struct xenvif *vif);
int xen_netbk_kthread(void *data);
int xenvif_kthread(void *data);
extern bool separate_tx_rx_irq;
......
......@@ -48,7 +48,7 @@ int xenvif_schedulable(struct xenvif *vif)
static int xenvif_rx_schedulable(struct xenvif *vif)
{
return xenvif_schedulable(vif) && !xen_netbk_rx_ring_full(vif);
return xenvif_schedulable(vif) && !xenvif_rx_ring_full(vif);
}
static irqreturn_t xenvif_tx_interrupt(int irq, void *dev_id)
......@@ -66,7 +66,7 @@ static int xenvif_poll(struct napi_struct *napi, int budget)
struct xenvif *vif = container_of(napi, struct xenvif, napi);
int work_done;
work_done = xen_netbk_tx_action(vif, budget);
work_done = xenvif_tx_action(vif, budget);
if (work_done < budget) {
int more_to_do = 0;
......@@ -133,12 +133,12 @@ static int xenvif_start_xmit(struct sk_buff *skb, struct net_device *dev)
goto drop;
/* Reserve ring slots for the worst-case number of fragments. */
vif->rx_req_cons_peek += xen_netbk_count_skb_slots(vif, skb);
vif->rx_req_cons_peek += xenvif_count_skb_slots(vif, skb);
if (vif->can_queue && xen_netbk_must_stop_queue(vif))
if (vif->can_queue && xenvif_must_stop_queue(vif))
netif_stop_queue(dev);
xen_netbk_queue_tx_skb(vif, skb);
xenvif_queue_tx_skb(vif, skb);
return NETDEV_TX_OK;
......@@ -166,7 +166,7 @@ static void xenvif_up(struct xenvif *vif)
enable_irq(vif->tx_irq);
if (vif->tx_irq != vif->rx_irq)
enable_irq(vif->rx_irq);
xen_netbk_check_rx_xenvif(vif);
xenvif_check_rx_xenvif(vif);
}
static void xenvif_down(struct xenvif *vif)
......@@ -368,7 +368,7 @@ int xenvif_connect(struct xenvif *vif, unsigned long tx_ring_ref,
__module_get(THIS_MODULE);
err = xen_netbk_map_frontend_rings(vif, tx_ring_ref, rx_ring_ref);
err = xenvif_map_frontend_rings(vif, tx_ring_ref, rx_ring_ref);
if (err < 0)
goto err;
......@@ -405,7 +405,7 @@ int xenvif_connect(struct xenvif *vif, unsigned long tx_ring_ref,
}
init_waitqueue_head(&vif->wq);
vif->task = kthread_create(xen_netbk_kthread,
vif->task = kthread_create(xenvif_kthread,
(void *)vif, vif->dev->name);
if (IS_ERR(vif->task)) {
pr_warn("Could not allocate kthread for %s\n", vif->dev->name);
......@@ -433,7 +433,7 @@ int xenvif_connect(struct xenvif *vif, unsigned long tx_ring_ref,
unbind_from_irqhandler(vif->tx_irq, vif);
vif->tx_irq = 0;
err_unmap:
xen_netbk_unmap_frontend_rings(vif);
xenvif_unmap_frontend_rings(vif);
err:
module_put(THIS_MODULE);
return err;
......@@ -481,7 +481,7 @@ void xenvif_disconnect(struct xenvif *vif)
unregister_netdev(vif->dev);
xen_netbk_unmap_frontend_rings(vif);
xenvif_unmap_frontend_rings(vif);
free_netdev(vif->dev);
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment