filter-rewriter: Rename FILTER_COLO_REWRITER to FILTER_REWRITER

Make the type checking macro name consistent with the TYPE_*
constant.

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Reviewed-by: Zhang Chen <chen.zhang@intel.com>
Message-Id: <20200902224311.1321159-41-ehabkost@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
This commit is contained in:
Eduardo Habkost 2020-09-02 18:42:48 -04:00
parent 0056d51bf7
commit 50cd7d54db
1 changed files with 9 additions and 9 deletions

View File

@ -25,7 +25,7 @@
#define TYPE_FILTER_REWRITER "filter-rewriter"
typedef struct RewriterState RewriterState;
DECLARE_INSTANCE_CHECKER(RewriterState, FILTER_COLO_REWRITER,
DECLARE_INSTANCE_CHECKER(RewriterState, FILTER_REWRITER,
TYPE_FILTER_REWRITER)
#define FAILOVER_MODE_ON true
@ -47,7 +47,7 @@ static void filter_rewriter_failover_mode(RewriterState *s)
static void filter_rewriter_flush(NetFilterState *nf)
{
RewriterState *s = FILTER_COLO_REWRITER(nf);
RewriterState *s = FILTER_REWRITER(nf);
if (!qemu_net_queue_flush(s->incoming_queue)) {
/* Unable to empty the queue, purge remaining packets */
@ -252,7 +252,7 @@ static ssize_t colo_rewriter_receive_iov(NetFilterState *nf,
int iovcnt,
NetPacketSent *sent_cb)
{
RewriterState *s = FILTER_COLO_REWRITER(nf);
RewriterState *s = FILTER_REWRITER(nf);
Connection *conn;
ConnectionKey key;
Packet *pkt;
@ -350,7 +350,7 @@ static gboolean offset_is_nonzero(gpointer key,
static void colo_rewriter_handle_event(NetFilterState *nf, int event,
Error **errp)
{
RewriterState *rs = FILTER_COLO_REWRITER(nf);
RewriterState *rs = FILTER_REWRITER(nf);
switch (event) {
case COLO_EVENT_CHECKPOINT:
@ -370,7 +370,7 @@ static void colo_rewriter_handle_event(NetFilterState *nf, int event,
static void colo_rewriter_cleanup(NetFilterState *nf)
{
RewriterState *s = FILTER_COLO_REWRITER(nf);
RewriterState *s = FILTER_REWRITER(nf);
/* flush packets */
if (s->incoming_queue) {
@ -381,7 +381,7 @@ static void colo_rewriter_cleanup(NetFilterState *nf)
static void colo_rewriter_setup(NetFilterState *nf, Error **errp)
{
RewriterState *s = FILTER_COLO_REWRITER(nf);
RewriterState *s = FILTER_REWRITER(nf);
s->connection_track_table = g_hash_table_new_full(connection_key_hash,
connection_key_equal,
@ -392,7 +392,7 @@ static void colo_rewriter_setup(NetFilterState *nf, Error **errp)
static bool filter_rewriter_get_vnet_hdr(Object *obj, Error **errp)
{
RewriterState *s = FILTER_COLO_REWRITER(obj);
RewriterState *s = FILTER_REWRITER(obj);
return s->vnet_hdr;
}
@ -401,14 +401,14 @@ static void filter_rewriter_set_vnet_hdr(Object *obj,
bool value,
Error **errp)
{
RewriterState *s = FILTER_COLO_REWRITER(obj);
RewriterState *s = FILTER_REWRITER(obj);
s->vnet_hdr = value;
}
static void filter_rewriter_init(Object *obj)
{
RewriterState *s = FILTER_COLO_REWRITER(obj);
RewriterState *s = FILTER_REWRITER(obj);
s->vnet_hdr = false;
s->failover_mode = FAILOVER_MODE_OFF;