Преглед на файлове

[xen] Set the "feature-rx-notify" flag for netfront devices

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>
tags/v1.20.1
Michael Brown преди 10 години
родител
ревизия
3eb91209d9
променени са 1 файла, в които са добавени 8 реда и са изтрити 0 реда
  1. 8
    0
      src/drivers/net/netfront.c

+ 8
- 0
src/drivers/net/netfront.c Целия файл

597
 					  "feature-no-csum-offload" ) ) != 0 )
597
 					  "feature-no-csum-offload" ) ) != 0 )
598
 		goto err_feature_no_csum_offload;
598
 		goto err_feature_no_csum_offload;
599
 
599
 
600
+	/* Inform backend that we will send notifications for RX requests */
601
+	if ( ( rc = netfront_write_flag ( netfront,
602
+					  "feature-rx-notify" ) ) != 0 )
603
+		goto err_feature_rx_notify;
604
+
600
 	/* Set state to Connected */
605
 	/* Set state to Connected */
601
 	if ( ( rc = xenbus_set_state ( xendev, XenbusStateConnected ) ) != 0 ) {
606
 	if ( ( rc = xenbus_set_state ( xendev, XenbusStateConnected ) ) != 0 ) {
602
 		DBGC ( netfront, "NETFRONT %s could not set state=\"%d\": %s\n",
607
 		DBGC ( netfront, "NETFRONT %s could not set state=\"%d\": %s\n",
622
  err_backend_wait:
627
  err_backend_wait:
623
 	netfront_reset ( netfront );
628
 	netfront_reset ( netfront );
624
  err_set_state:
629
  err_set_state:
630
+	netfront_rm ( netfront, "feature-rx-notify" );
631
+ err_feature_rx_notify:
625
 	netfront_rm ( netfront, "feature-no-csum-offload" );
632
 	netfront_rm ( netfront, "feature-no-csum-offload" );
626
  err_feature_no_csum_offload:
633
  err_feature_no_csum_offload:
627
 	netfront_rm ( netfront, "request-rx-copy" );
634
 	netfront_rm ( netfront, "request-rx-copy" );
665
 	}
672
 	}
666
 
673
 
667
 	/* Delete flags */
674
 	/* Delete flags */
675
+	netfront_rm ( netfront, "feature-rx-notify" );
668
 	netfront_rm ( netfront, "feature-no-csum-offload" );
676
 	netfront_rm ( netfront, "feature-no-csum-offload" );
669
 	netfront_rm ( netfront, "request-rx-copy" );
677
 	netfront_rm ( netfront, "request-rx-copy" );
670
 
678
 

Loading…
Отказ
Запис