From: Mark McLoughlin Subject: [PATCH 3/3] virtio_net: support ethtool offload queries Date: Wed, 22 Oct 2008 16:20:30 +0100 Message-ID: <1224688830-26216-4-git-send-email-markmc@redhat.com> References: <> <1224688830-26216-1-git-send-email-markmc@redhat.com> <1224688830-26216-2-git-send-email-markmc@redhat.com> <1224688830-26216-3-git-send-email-markmc@redhat.com> Cc: kvm@vger.kernel.org, Mark McLoughlin To: Avi Kivity Return-path: Received: from mail09.svc.cra.dublin.eircom.net ([159.134.118.25]:38308 "HELO mail09.svc.cra.dublin.eircom.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1751233AbYJVPWQ (ORCPT ); Wed, 22 Oct 2008 11:22:16 -0400 In-Reply-To: <1224688830-26216-3-git-send-email-markmc@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: Since 2.6.24, if get_tx_csum, get_sg or get_tso are NULL then the default ethtool_op_get_xxx functions are called. Before 2.6.24, however, these need to be manually hooked in. Signed-off-by: Mark McLoughlin --- hack-module.awk | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/hack-module.awk b/hack-module.awk index b401aae..4bb5317 100644 --- a/hack-module.awk +++ b/hack-module.awk @@ -148,6 +148,12 @@ need_endif = 1; } +/.set_tx_csum = virtnet_set_tx_csum,/ { + print "\t.get_tx_csum = ethtool_op_get_tx_csum,"; + print "\t.get_sg = ethtool_op_get_sg,"; + print "\t.get_tso = ethtool_op_get_tso,"; +} + { sub(/\revision\>/, "pci_dev_revision(pci_dev)") } { print } -- 1.5.5.1