diff options
author | Wei Liu <wei.liu2@citrix.com> | 2013-05-22 02:34:45 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-05-23 21:40:37 -0400 |
commit | e1f00a69ec26e3eb9847c61c665b8fb3f0c6b477 (patch) | |
tree | 5958617283d231a3a58229e0e78a4d4623a569a5 /drivers/net/xen-netback/common.h | |
parent | 8892475386e819aa50856947948c546ccc964d96 (diff) |
xen-netback: split event channels support for Xen backend driver
Netback and netfront only use one event channel to do TX / RX notification,
which may cause unnecessary wake-up of processing routines. This patch adds a
new feature called feature-split-event-channels to netback, enabling it to
handle TX and RX events separately.
Netback will use tx_irq to notify guest for TX completion, rx_irq for RX
notification.
If frontend doesn't support this feature, tx_irq equals to rx_irq.
Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/xen-netback/common.h')
-rw-r--r-- | drivers/net/xen-netback/common.h | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/drivers/net/xen-netback/common.h b/drivers/net/xen-netback/common.h index 6102a6c59f4e..8a4d77ee9c5b 100644 --- a/drivers/net/xen-netback/common.h +++ b/drivers/net/xen-netback/common.h | |||
@@ -57,8 +57,12 @@ struct xenvif { | |||
57 | 57 | ||
58 | u8 fe_dev_addr[6]; | 58 | u8 fe_dev_addr[6]; |
59 | 59 | ||
60 | /* Physical parameters of the comms window. */ | 60 | /* When feature-split-event-channels = 0, tx_irq = rx_irq. */ |
61 | unsigned int irq; | 61 | unsigned int tx_irq; |
62 | unsigned int rx_irq; | ||
63 | /* Only used when feature-split-event-channels = 1 */ | ||
64 | char tx_irq_name[IFNAMSIZ+4]; /* DEVNAME-tx */ | ||
65 | char rx_irq_name[IFNAMSIZ+4]; /* DEVNAME-rx */ | ||
62 | 66 | ||
63 | /* List of frontends to notify after a batch of frames sent. */ | 67 | /* List of frontends to notify after a batch of frames sent. */ |
64 | struct list_head notify_list; | 68 | struct list_head notify_list; |
@@ -113,7 +117,8 @@ struct xenvif *xenvif_alloc(struct device *parent, | |||
113 | unsigned int handle); | 117 | unsigned int handle); |
114 | 118 | ||
115 | int xenvif_connect(struct xenvif *vif, unsigned long tx_ring_ref, | 119 | int xenvif_connect(struct xenvif *vif, unsigned long tx_ring_ref, |
116 | unsigned long rx_ring_ref, unsigned int evtchn); | 120 | unsigned long rx_ring_ref, unsigned int tx_evtchn, |
121 | unsigned int rx_evtchn); | ||
117 | void xenvif_disconnect(struct xenvif *vif); | 122 | void xenvif_disconnect(struct xenvif *vif); |
118 | 123 | ||
119 | void xenvif_get(struct xenvif *vif); | 124 | void xenvif_get(struct xenvif *vif); |
@@ -158,4 +163,6 @@ void xenvif_carrier_off(struct xenvif *vif); | |||
158 | /* Returns number of ring slots required to send an skb to the frontend */ | 163 | /* Returns number of ring slots required to send an skb to the frontend */ |
159 | unsigned int xen_netbk_count_skb_slots(struct xenvif *vif, struct sk_buff *skb); | 164 | unsigned int xen_netbk_count_skb_slots(struct xenvif *vif, struct sk_buff *skb); |
160 | 165 | ||
166 | extern bool separate_tx_rx_irq; | ||
167 | |||
161 | #endif /* __XEN_NETBACK__COMMON_H__ */ | 168 | #endif /* __XEN_NETBACK__COMMON_H__ */ |