digimer

Untitled

Apr 15th, 2011
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.38 KB | None | 0 0
  1. [root@xenmaster003 linux-2.6.18.x86_64]# cat drivers/xen/netback/xenbus.c.rej
  2. ***************
  3. *** 375,418 ****
  4. dev->otherend);
  5. return err;
  6. }
  7. - be->netif->copying_receiver = !!rx_copy;
  8.  
  9. - if (be->netif->dev->tx_queue_len != 0) {
  10. if (xenbus_scanf(XBT_NIL, dev->otherend,
  11. "feature-rx-notify", "%d", &val) < 0)
  12. val = 0;
  13. if (val)
  14. - be->netif->can_queue = 1;
  15. else
  16. /* Must be non-zero for pfifo_fast to work. */
  17. - be->netif->dev->tx_queue_len = 1;
  18. }
  19.  
  20. if (xenbus_scanf(XBT_NIL, dev->otherend, "feature-sg", "%d", &val) < 0)
  21. val = 0;
  22. - if (val) {
  23. - be->netif->features |= NETIF_F_SG;
  24. - be->netif->dev->features |= NETIF_F_SG;
  25. - }
  26.  
  27. if (xenbus_scanf(XBT_NIL, dev->otherend, "feature-gso-tcpv4", "%d",
  28. &val) < 0)
  29. val = 0;
  30. - if (val) {
  31. - be->netif->features |= NETIF_F_TSO;
  32. - be->netif->dev->features |= NETIF_F_TSO;
  33. - }
  34.  
  35. if (xenbus_scanf(XBT_NIL, dev->otherend, "feature-no-csum-offload",
  36. "%d", &val) < 0)
  37. val = 0;
  38. - if (val) {
  39. - be->netif->features &= ~NETIF_F_IP_CSUM;
  40. - be->netif->dev->features &= ~NETIF_F_IP_CSUM;
  41. - }
  42.  
  43. /* Map the shared frame, irq etc. */
  44. - err = netif_map(be->netif, tx_ring_ref, rx_ring_ref, evtchn);
  45. if (err) {
  46. xenbus_dev_fatal(dev, err,
  47. "mapping shared-frames %lu/%lu port %u",
  48. --- 376,413 ----
  49. dev->otherend);
  50. return err;
  51. }
  52. + netif->copying_receiver = !!rx_copy;
  53.  
  54. + if (netif->dev->tx_queue_len != 0) {
  55. if (xenbus_scanf(XBT_NIL, dev->otherend,
  56. "feature-rx-notify", "%d", &val) < 0)
  57. val = 0;
  58. if (val)
  59. + netif->can_queue = 1;
  60. else
  61. /* Must be non-zero for pfifo_fast to work. */
  62. + netif->dev->tx_queue_len = 1;
  63. }
  64.  
  65. if (xenbus_scanf(XBT_NIL, dev->otherend, "feature-sg", "%d", &val) < 0)
  66. val = 0;
  67. + netif->can_sg = !!val;
  68.  
  69. if (xenbus_scanf(XBT_NIL, dev->otherend, "feature-gso-tcpv4", "%d",
  70. &val) < 0)
  71. val = 0;
  72. + netif->gso = !!val;
  73.  
  74. if (xenbus_scanf(XBT_NIL, dev->otherend, "feature-no-csum-offload",
  75. "%d", &val) < 0)
  76. val = 0;
  77. + netif->csum = !val;
  78. +
  79. + /* Set dev->features */
  80. + netif_set_features(netif);
  81.  
  82. /* Map the shared frame, irq etc. */
  83. + err = netif_map(netif, tx_ring_ref, rx_ring_ref, evtchn);
  84. if (err) {
  85. xenbus_dev_fatal(dev, err,
  86. "mapping shared-frames %lu/%lu port %u",
Advertisement
Add Comment
Please, Sign In to add comment