From: Stefan Hajnoczi <stefanha@redhat.com>
To: qemu-devel@nongnu.org
Cc: Peter Maydell <peter.maydell@linaro.org>,
Anthony Liguori <aliguori@amazon.com>
Subject: [Qemu-devel] [PULL 06/11] net: make tap offloading callbacks static
Date: Tue, 25 Feb 2014 14:33:44 +0100 [thread overview]
Message-ID: <1393335229-607-7-git-send-email-stefanha@redhat.com> (raw)
In-Reply-To: <1393335229-607-1-git-send-email-stefanha@redhat.com>
From: Vincenzo Maffione <v.maffione@gmail.com>
Since TAP offloadings are manipulated through a new API, it's
not necessary to export them in include/net/tap.h anymore.
Signed-off-by: Vincenzo Maffione <v.maffione@gmail.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
---
include/net/tap.h | 6 ------
net/tap-win32.c | 12 ++++++------
net/tap.c | 12 ++++++------
3 files changed, 12 insertions(+), 18 deletions(-)
diff --git a/include/net/tap.h b/include/net/tap.h
index a3490a9..6daeb42 100644
--- a/include/net/tap.h
+++ b/include/net/tap.h
@@ -29,12 +29,6 @@
#include "qemu-common.h"
#include "qapi-types.h"
-bool tap_has_ufo(NetClientState *nc);
-bool tap_has_vnet_hdr(NetClientState *nc);
-bool tap_has_vnet_hdr_len(NetClientState *nc, int len);
-void tap_using_vnet_hdr(NetClientState *nc, bool using_vnet_hdr);
-void tap_set_offload(NetClientState *nc, int csum, int tso4, int tso6, int ecn, int ufo);
-void tap_set_vnet_hdr_len(NetClientState *nc, int len);
int tap_enable(NetClientState *nc);
int tap_disable(NetClientState *nc);
diff --git a/net/tap-win32.c b/net/tap-win32.c
index 924ca55..8aee611 100644
--- a/net/tap-win32.c
+++ b/net/tap-win32.c
@@ -669,12 +669,12 @@ static void tap_win32_send(void *opaque)
}
}
-bool tap_has_ufo(NetClientState *nc)
+static bool tap_has_ufo(NetClientState *nc)
{
return false;
}
-bool tap_has_vnet_hdr(NetClientState *nc)
+static bool tap_has_vnet_hdr(NetClientState *nc)
{
return false;
}
@@ -688,11 +688,11 @@ void tap_fd_set_vnet_hdr_len(int fd, int len)
{
}
-void tap_using_vnet_hdr(NetClientState *nc, bool using_vnet_hdr)
+static void tap_using_vnet_hdr(NetClientState *nc, bool using_vnet_hdr)
{
}
-void tap_set_offload(NetClientState *nc, int csum, int tso4,
+static void tap_set_offload(NetClientState *nc, int csum, int tso4,
int tso6, int ecn, int ufo)
{
}
@@ -702,12 +702,12 @@ struct vhost_net *tap_get_vhost_net(NetClientState *nc)
return NULL;
}
-bool tap_has_vnet_hdr_len(NetClientState *nc, int len)
+static bool tap_has_vnet_hdr_len(NetClientState *nc, int len)
{
return false;
}
-void tap_set_vnet_hdr_len(NetClientState *nc, int len)
+static void tap_set_vnet_hdr_len(NetClientState *nc, int len)
{
abort();
}
diff --git a/net/tap.c b/net/tap.c
index d34ec88..2d5099b 100644
--- a/net/tap.c
+++ b/net/tap.c
@@ -210,7 +210,7 @@ static void tap_send(void *opaque)
} while (size > 0 && qemu_can_send_packet(&s->nc));
}
-bool tap_has_ufo(NetClientState *nc)
+static bool tap_has_ufo(NetClientState *nc)
{
TAPState *s = DO_UPCAST(TAPState, nc, nc);
@@ -219,7 +219,7 @@ bool tap_has_ufo(NetClientState *nc)
return s->has_ufo;
}
-bool tap_has_vnet_hdr(NetClientState *nc)
+static bool tap_has_vnet_hdr(NetClientState *nc)
{
TAPState *s = DO_UPCAST(TAPState, nc, nc);
@@ -228,7 +228,7 @@ bool tap_has_vnet_hdr(NetClientState *nc)
return !!s->host_vnet_hdr_len;
}
-bool tap_has_vnet_hdr_len(NetClientState *nc, int len)
+static bool tap_has_vnet_hdr_len(NetClientState *nc, int len)
{
TAPState *s = DO_UPCAST(TAPState, nc, nc);
@@ -237,7 +237,7 @@ bool tap_has_vnet_hdr_len(NetClientState *nc, int len)
return !!tap_probe_vnet_hdr_len(s->fd, len);
}
-void tap_set_vnet_hdr_len(NetClientState *nc, int len)
+static void tap_set_vnet_hdr_len(NetClientState *nc, int len)
{
TAPState *s = DO_UPCAST(TAPState, nc, nc);
@@ -249,7 +249,7 @@ void tap_set_vnet_hdr_len(NetClientState *nc, int len)
s->host_vnet_hdr_len = len;
}
-void tap_using_vnet_hdr(NetClientState *nc, bool using_vnet_hdr)
+static void tap_using_vnet_hdr(NetClientState *nc, bool using_vnet_hdr)
{
TAPState *s = DO_UPCAST(TAPState, nc, nc);
@@ -259,7 +259,7 @@ void tap_using_vnet_hdr(NetClientState *nc, bool using_vnet_hdr)
s->using_vnet_hdr = using_vnet_hdr;
}
-void tap_set_offload(NetClientState *nc, int csum, int tso4,
+static void tap_set_offload(NetClientState *nc, int csum, int tso4,
int tso6, int ecn, int ufo)
{
TAPState *s = DO_UPCAST(TAPState, nc, nc);
--
1.8.5.3
next prev parent reply other threads:[~2014-02-25 13:34 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-25 13:33 [Qemu-devel] [PULL 00/11] Net patches Stefan Hajnoczi
2014-02-25 13:33 ` [Qemu-devel] [PULL 01/11] opencores_eth: flush queue whenever can_receive can go from false to true Stefan Hajnoczi
2014-02-25 13:33 ` [Qemu-devel] [PULL 02/11] net: change vnet-hdr TAP prototypes Stefan Hajnoczi
2014-02-25 13:33 ` [Qemu-devel] [PULL 03/11] net: extend NetClientInfo for offloading Stefan Hajnoczi
2014-02-25 13:33 ` [Qemu-devel] [PULL 04/11] net: TAP uses NetClientInfo offloading callbacks Stefan Hajnoczi
2014-02-25 13:33 ` [Qemu-devel] [PULL 05/11] net: virtio-net and vmxnet3 use offloading API Stefan Hajnoczi
2014-02-25 13:33 ` Stefan Hajnoczi [this message]
2014-02-25 13:33 ` [Qemu-devel] [PULL 07/11] net: add offloading support to netmap backend Stefan Hajnoczi
2014-02-25 13:33 ` [Qemu-devel] [PULL 08/11] net: Disable netmap backend when not supported Stefan Hajnoczi
2014-02-25 13:33 ` [Qemu-devel] [PULL 09/11] net: remove implicit peer from offload API Stefan Hajnoczi
2014-02-25 13:33 ` [Qemu-devel] [PULL 10/11] vhost_net: use offload API instead of bypassing it Stefan Hajnoczi
2014-02-25 13:33 ` [Qemu-devel] [PULL 11/11] virtio-net: use qemu_get_queue() where possible Stefan Hajnoczi
2014-02-26 20:52 ` [Qemu-devel] [PULL 00/11] Net patches Peter Maydell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1393335229-607-7-git-send-email-stefanha@redhat.com \
--to=stefanha@redhat.com \
--cc=aliguori@amazon.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).