ソースを参照

[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 9年前
コミット
3eb91209d9
1個のファイルの変更8行の追加0行の削除
  1. 8
    0
      src/drivers/net/netfront.c

+ 8
- 0
src/drivers/net/netfront.c ファイルの表示

@@ -597,6 +597,11 @@ static int netfront_open ( struct net_device *netdev ) {
597 597
 					  "feature-no-csum-offload" ) ) != 0 )
598 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 605
 	/* Set state to Connected */
601 606
 	if ( ( rc = xenbus_set_state ( xendev, XenbusStateConnected ) ) != 0 ) {
602 607
 		DBGC ( netfront, "NETFRONT %s could not set state=\"%d\": %s\n",
@@ -622,6 +627,8 @@ static int netfront_open ( struct net_device *netdev ) {
622 627
  err_backend_wait:
623 628
 	netfront_reset ( netfront );
624 629
  err_set_state:
630
+	netfront_rm ( netfront, "feature-rx-notify" );
631
+ err_feature_rx_notify:
625 632
 	netfront_rm ( netfront, "feature-no-csum-offload" );
626 633
  err_feature_no_csum_offload:
627 634
 	netfront_rm ( netfront, "request-rx-copy" );
@@ -665,6 +672,7 @@ static void netfront_close ( struct net_device *netdev ) {
665 672
 	}
666 673
 
667 674
 	/* Delete flags */
675
+	netfront_rm ( netfront, "feature-rx-notify" );
668 676
 	netfront_rm ( netfront, "feature-no-csum-offload" );
669 677
 	netfront_rm ( netfront, "request-rx-copy" );
670 678
 

読み込み中…
キャンセル
保存