Loading net/colo-compare.c +6 −2 Original line number Diff line number Diff line Loading @@ -121,9 +121,13 @@ static int packet_enqueue(CompareState *s, int mode) Connection *conn; if (mode == PRIMARY_IN) { pkt = packet_new(s->pri_rs.buf, s->pri_rs.packet_len); pkt = packet_new(s->pri_rs.buf, s->pri_rs.packet_len, s->pri_rs.vnet_hdr_len); } else { pkt = packet_new(s->sec_rs.buf, s->sec_rs.packet_len); pkt = packet_new(s->sec_rs.buf, s->sec_rs.packet_len, s->sec_rs.vnet_hdr_len); } if (parse_packet_early(pkt)) { Loading net/colo.c +2 −1 Original line number Diff line number Diff line Loading @@ -153,13 +153,14 @@ void connection_destroy(void *opaque) g_slice_free(Connection, conn); } Packet *packet_new(const void *data, int size) Packet *packet_new(const void *data, int size, int vnet_hdr_len) { Packet *pkt = g_slice_new(Packet); pkt->data = g_memdup(data, size); pkt->size = size; pkt->creation_ms = qemu_clock_get_ms(QEMU_CLOCK_HOST); pkt->vnet_hdr_len = vnet_hdr_len; return pkt; } Loading net/colo.h +3 −1 Original line number Diff line number Diff line Loading @@ -43,6 +43,8 @@ typedef struct Packet { int size; /* Time of packet creation, in wall clock ms */ int64_t creation_ms; /* Get vnet_hdr_len from filter */ uint32_t vnet_hdr_len; } Packet; typedef struct ConnectionKey { Loading Loading @@ -82,7 +84,7 @@ Connection *connection_get(GHashTable *connection_track_table, ConnectionKey *key, GQueue *conn_list); void connection_hashtable_reset(GHashTable *connection_track_table); Packet *packet_new(const void *data, int size); Packet *packet_new(const void *data, int size, int vnet_hdr_len); void packet_destroy(void *opaque, void *user_data); #endif /* QEMU_COLO_PROXY_H */ net/filter-rewriter.c +1 −1 Original line number Diff line number Diff line Loading @@ -158,7 +158,7 @@ static ssize_t colo_rewriter_receive_iov(NetFilterState *nf, char *buf = g_malloc0(size); iov_to_buf(iov, iovcnt, 0, buf, size); pkt = packet_new(buf, size); pkt = packet_new(buf, size, 0); g_free(buf); /* Loading Loading
net/colo-compare.c +6 −2 Original line number Diff line number Diff line Loading @@ -121,9 +121,13 @@ static int packet_enqueue(CompareState *s, int mode) Connection *conn; if (mode == PRIMARY_IN) { pkt = packet_new(s->pri_rs.buf, s->pri_rs.packet_len); pkt = packet_new(s->pri_rs.buf, s->pri_rs.packet_len, s->pri_rs.vnet_hdr_len); } else { pkt = packet_new(s->sec_rs.buf, s->sec_rs.packet_len); pkt = packet_new(s->sec_rs.buf, s->sec_rs.packet_len, s->sec_rs.vnet_hdr_len); } if (parse_packet_early(pkt)) { Loading
net/colo.c +2 −1 Original line number Diff line number Diff line Loading @@ -153,13 +153,14 @@ void connection_destroy(void *opaque) g_slice_free(Connection, conn); } Packet *packet_new(const void *data, int size) Packet *packet_new(const void *data, int size, int vnet_hdr_len) { Packet *pkt = g_slice_new(Packet); pkt->data = g_memdup(data, size); pkt->size = size; pkt->creation_ms = qemu_clock_get_ms(QEMU_CLOCK_HOST); pkt->vnet_hdr_len = vnet_hdr_len; return pkt; } Loading
net/colo.h +3 −1 Original line number Diff line number Diff line Loading @@ -43,6 +43,8 @@ typedef struct Packet { int size; /* Time of packet creation, in wall clock ms */ int64_t creation_ms; /* Get vnet_hdr_len from filter */ uint32_t vnet_hdr_len; } Packet; typedef struct ConnectionKey { Loading Loading @@ -82,7 +84,7 @@ Connection *connection_get(GHashTable *connection_track_table, ConnectionKey *key, GQueue *conn_list); void connection_hashtable_reset(GHashTable *connection_track_table); Packet *packet_new(const void *data, int size); Packet *packet_new(const void *data, int size, int vnet_hdr_len); void packet_destroy(void *opaque, void *user_data); #endif /* QEMU_COLO_PROXY_H */
net/filter-rewriter.c +1 −1 Original line number Diff line number Diff line Loading @@ -158,7 +158,7 @@ static ssize_t colo_rewriter_receive_iov(NetFilterState *nf, char *buf = g_malloc0(size); iov_to_buf(iov, iovcnt, 0, buf, size); pkt = packet_new(buf, size); pkt = packet_new(buf, size, 0); g_free(buf); /* Loading