[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH net-next V2 1/2] xen-netback: split event channels support for Xen backend driver



On Wed, May 22, 2013 at 11:40:41AM -0400, annie li wrote:
> 
> On 2013-5-21 14:35, Wei Liu wrote:
> >[....]
> >+
> >  static int xenvif_start_xmit(struct sk_buff *skb, struct net_device *dev)
> >  {
> >     struct xenvif *vif = netdev_priv(dev);
> >@@ -125,13 +143,15 @@ static struct net_device_stats 
> >*xenvif_get_stats(struct net_device *dev)
> >  static void xenvif_up(struct xenvif *vif)
> >  {
> >     xen_netbk_add_xenvif(vif);
> >-    enable_irq(vif->irq);
> >+    enable_irq(vif->tx_irq);
> >+    enable_irq(vif->rx_irq);
> 
> enable_irq are called twice in one event channel situation. How
> about adding if condition here to differ one event channel and split
> event channel?
> 

Sure, if this makes code better comprehensible.

> >+    /* Try split event channels first, then single event channel. */
> >+    err = xenbus_gather(XBT_NIL, dev->otherend,
> >+                        "event-channel-tx", "%u", &tx_evtchn,
> >+                        "event-channel-rx", "%u", &rx_evtchn, NULL);
> >+    if (err) {
> >+            err = xenbus_gather(XBT_NIL, dev->otherend,
> >+                                "event-channel", "%u", &tx_evtchn, NULL);
> >+            if (err) {
> >+                    xenbus_dev_fatal(dev, err,
> >+                                     "reading %s/event-channel(-tx/rx)",
> >+                                     dev->otherend);
> 
> This err really comes from reading original implementation(one event
> channel), right? So it is better to not use (-tx/rx) here?
> Or using two xenbus_dev_fatal to print log: one for reading tx/rx
> failure, the other for one event channel failure.
> 

The failure of reading split event channels doesn't imply a fatal error.
Here the fatal error is trying to read both split event channels and
single event channel and fail.

If people really want to debug this problem, they should look at
xenstore entries instead of relying on this log message.


Wei.

> Thanks
> Annie

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.