]> git.ipfire.org Git - thirdparty/ipxe.git/commitdiff
[xen] Set the "feature-rx-notify" flag for netfront devices
authorMichael Brown <mcb30@ipxe.org>
Fri, 6 Mar 2015 17:19:09 +0000 (17:19 +0000)
committerMichael Brown <mcb30@ipxe.org>
Mon, 9 Mar 2015 08:52:03 +0000 (08:52 +0000)
iPXE already sends RX notifications to the backend when needed, but
does not set the "feature-rx-notify" flag.  As of XenServer 6.5, this
flag is mandatory and omitting it will cause the backend to fail.

Fix by setting the "feature-rx-notify" flag, to inform the backend
that we will send notifications.

Reported-by: Shalom Bhooshi <shalom.bhooshi@citrix.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/drivers/net/netfront.c

index 74c6d27ca17c3d80b3f5414b70efaef00ac93079..6a1e4fc1f4bdff30feb8115e93dd51b392ad6fe3 100644 (file)
@@ -597,6 +597,11 @@ static int netfront_open ( struct net_device *netdev ) {
                                          "feature-no-csum-offload" ) ) != 0 )
                goto err_feature_no_csum_offload;
 
+       /* Inform backend that we will send notifications for RX requests */
+       if ( ( rc = netfront_write_flag ( netfront,
+                                         "feature-rx-notify" ) ) != 0 )
+               goto err_feature_rx_notify;
+
        /* Set state to Connected */
        if ( ( rc = xenbus_set_state ( xendev, XenbusStateConnected ) ) != 0 ) {
                DBGC ( netfront, "NETFRONT %s could not set state=\"%d\": %s\n",
@@ -622,6 +627,8 @@ static int netfront_open ( struct net_device *netdev ) {
  err_backend_wait:
        netfront_reset ( netfront );
  err_set_state:
+       netfront_rm ( netfront, "feature-rx-notify" );
+ err_feature_rx_notify:
        netfront_rm ( netfront, "feature-no-csum-offload" );
  err_feature_no_csum_offload:
        netfront_rm ( netfront, "request-rx-copy" );
@@ -665,6 +672,7 @@ static void netfront_close ( struct net_device *netdev ) {
        }
 
        /* Delete flags */
+       netfront_rm ( netfront, "feature-rx-notify" );
        netfront_rm ( netfront, "feature-no-csum-offload" );
        netfront_rm ( netfront, "request-rx-copy" );