Dor Laor
2008-Mar-03 15:28 UTC
[PATCH 1/3] Backward compat to replace napi in *rx_schedule*
Signed-off-by: Dor Laor <dor.laor at qumranet.com> --- hack-module.awk | 28 +++++++++++++++++++++++++++- 1 files changed, 27 insertions(+), 1 deletions(-) diff --git a/hack-module.awk b/hack-module.awk index 580090b..bd63fb9 100644 --- a/hack-module.awk +++ b/hack-module.awk @@ -45,8 +45,8 @@ print " return 1;"; print " }"; print ""; - print " no_work = vi->rvq->vq_ops->enable_cb(vi->rvq);"; print " netif_rx_complete(vi->dev);"; + print " no_work = vi->rvq->vq_ops->enable_cb(vi->rvq);"; print ""; print " if (!no_work && netif_rx_reschedule(vi->dev, received)) {"; print " skb = NULL;"; @@ -62,6 +62,32 @@ virtnet_poll = 1 } +/\tnetif_rx_schedule\(/ { + print "#ifdef COMPAT_napi"; + print " vi->rvq->vq_ops->enable_cb(vi->rvq);"; + print " if (netif_rx_schedule_prep(vi->dev)) {"; + print " vi->rvq->vq_ops->disable_cb(vi->rvq);"; + print " __netif_rx_schedule(vi->dev);"; + print " } else"; + print " vi->rvq->vq_ops->enable_cb(vi->rvq);"; + print "#else"; + need_endif = 1 +} + +/netif_rx_schedule_prep/ { + print "#ifdef COMPAT_napi"; + print "\tif (netif_rx_schedule_prep(vi->dev)) {"; + print "#else"; + need_endif = 1 +} + +/__netif_rx_schedule/ { + print "#ifdef COMPAT_napi"; + print "\t\t__netif_rx_schedule(vi->dev);"; + print "#else"; + need_endif = 1 +} + /dev->stats/ { print "#ifndef COMPAT_net_stats"; need_endif = 1 -- 1.5.4.1 --=-GX8nzkmESIKGfVphMk3E Content-Disposition: attachment; filename=0002-Move-COMPAT_csum_offset-to-kernels-.24-Also-add-e.patch Content-Type: application/mbox; name=0002-Move-COMPAT_csum_offset-to-kernels-.24-Also-add-e.patch Content-Transfer-Encoding: 7bit