Commit 9964e96d authored by Stefan Hajnoczi's avatar Stefan Hajnoczi
Browse files

Merge remote-tracking branch 'jasowang/tags/net-pull-request' into staging



# gpg: Signature made Tue 23 May 2017 03:27:37 AM BST
# gpg:                using RSA key 0xEF04965B398D6211
# gpg: Good signature from "Jason Wang (Jason Wang on RedHat) <jasowang@redhat.com>"
# Primary key fingerprint: 215D 46F4 8246 689E C77F  3562 EF04 965B 398D 6211

* jasowang/tags/net-pull-request:
  e1000e: Fix ICR "Other" causes clear logic
  net/filter-rewriter: Remove unused option in filter-rewriter
  net/filter-mirror.c: Rename filter_mirror_send() and fix codestyle
  net/filter-mirror.c: Remove duplicate check code.
  hmp / net: Mark host_net_add/remove as deprecated
  COLO-compare: Improve tcp compare trace event readability
  virtio-net: fix wild pointer when remove virtio-net queues
  net/dump: Issue a warning for the deprecated "-net dump"
  net/tap: Replace tap-haiku.c and tap-aix.c by a generic tap-stub.c

Signed-off-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
parents 730a6e87 82342e91
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -1296,7 +1296,7 @@ ETEXI
        .name       = "host_net_add",
        .args_type  = "device:s,opts:s?",
        .params     = "tap|user|socket|vde|netmap|bridge|vhost-user|dump [options]",
        .help       = "add host VLAN client",
        .help       = "add host VLAN client (deprecated, use netdev_add instead)",
        .cmd        = hmp_host_net_add,
        .command_completion = host_net_add_completion,
    },
@@ -1304,14 +1304,14 @@ ETEXI
STEXI
@item host_net_add
@findex host_net_add
Add host VLAN client.
Add host VLAN client. Deprecated, please use @code{netdev_add} instead.
ETEXI

    {
        .name       = "host_net_remove",
        .args_type  = "vlan_id:i,device:s",
        .params     = "vlan_id name",
        .help       = "remove host VLAN client",
        .help       = "remove host VLAN client (deprecated, use netdev_del instead)",
        .cmd        = hmp_host_net_remove,
        .command_completion = host_net_remove_completion,
    },
@@ -1319,7 +1319,7 @@ ETEXI
STEXI
@item host_net_remove
@findex host_net_remove
Remove host VLAN client.
Remove host VLAN client. Deprecated, please use @code{netdev_del} instead.
ETEXI

    {
+8 −2
Original line number Diff line number Diff line
@@ -2454,14 +2454,20 @@ e1000e_set_ics(E1000ECore *core, int index, uint32_t val)
static void
e1000e_set_icr(E1000ECore *core, int index, uint32_t val)
{
    uint32_t icr = 0;
    if ((core->mac[ICR] & E1000_ICR_ASSERTED) &&
        (core->mac[CTRL_EXT] & E1000_CTRL_EXT_IAME)) {
        trace_e1000e_irq_icr_process_iame();
        e1000e_clear_ims_bits(core, core->mac[IAM]);
    }

    trace_e1000e_irq_icr_write(val, core->mac[ICR], core->mac[ICR] & ~val);
    core->mac[ICR] &= ~val;
    icr = core->mac[ICR] & ~val;
    /* Windows driver expects that the "receive overrun" bit and other
     * ones to be cleared when the "Other" bit (#24) is cleared.
     */
    icr = (val & E1000_ICR_OTHER) ? (icr & ~E1000_ICR_OTHER_CAUSES) : icr;
    trace_e1000e_irq_icr_write(val, core->mac[ICR], icr);
    core->mac[ICR] = icr;
    e1000e_update_interrupt_state(core);
}

+3 −0
Original line number Diff line number Diff line
@@ -1522,9 +1522,12 @@ static void virtio_net_del_queue(VirtIONet *n, int index)
    if (q->tx_timer) {
        timer_del(q->tx_timer);
        timer_free(q->tx_timer);
        q->tx_timer = NULL;
    } else {
        qemu_bh_delete(q->tx_bh);
        q->tx_bh = NULL;
    }
    q->tx_waiting = 0;
    virtio_del_queue(vdev, index * 2 + 1);
}

+8 −7
Original line number Diff line number Diff line
@@ -3,13 +3,7 @@ common-obj-y += socket.o
common-obj-y += dump.o
common-obj-y += eth.o
common-obj-$(CONFIG_L2TPV3) += l2tpv3.o
common-obj-$(CONFIG_POSIX) += tap.o vhost-user.o
common-obj-$(CONFIG_LINUX) += tap-linux.o
common-obj-$(CONFIG_WIN32) += tap-win32.o
common-obj-$(CONFIG_BSD) += tap-bsd.o
common-obj-$(CONFIG_SOLARIS) += tap-solaris.o
common-obj-$(CONFIG_AIX) += tap-aix.o
common-obj-$(CONFIG_HAIKU) += tap-haiku.o
common-obj-$(CONFIG_POSIX) += vhost-user.o
common-obj-$(CONFIG_SLIRP) += slirp.o
common-obj-$(CONFIG_VDE) += vde.o
common-obj-$(CONFIG_NETMAP) += netmap.o
@@ -20,3 +14,10 @@ common-obj-y += colo-compare.o
common-obj-y += colo.o
common-obj-y += filter-rewriter.o
common-obj-y += filter-replay.o

tap-obj-$(CONFIG_LINUX) = tap-linux.o
tap-obj-$(CONFIG_BSD) = tap-bsd.o
tap-obj-$(CONFIG_SOLARIS) = tap-solaris.o
tap-obj-y ?= tap-stub.o
common-obj-$(CONFIG_POSIX) += tap.o $(tap-obj-y)
common-obj-$(CONFIG_WIN32) += tap-win32.o
+22 −11
Original line number Diff line number Diff line
@@ -265,18 +265,29 @@ static int colo_packet_compare_tcp(Packet *spkt, Packet *ppkt)
    }

    if (res != 0 && trace_event_get_state(TRACE_COLO_COMPARE_MISCOMPARE)) {
        trace_colo_compare_pkt_info_src(inet_ntoa(ppkt->ip->ip_src),
                                        ntohl(stcp->th_seq),
                                        ntohl(stcp->th_ack),
                                        res, stcp->th_flags,
                                        spkt->size);
        char pri_ip_src[20], pri_ip_dst[20], sec_ip_src[20], sec_ip_dst[20];

        strcpy(pri_ip_src, inet_ntoa(ppkt->ip->ip_src));
        strcpy(pri_ip_dst, inet_ntoa(ppkt->ip->ip_dst));
        strcpy(sec_ip_src, inet_ntoa(spkt->ip->ip_src));
        strcpy(sec_ip_dst, inet_ntoa(spkt->ip->ip_dst));

        trace_colo_compare_pkt_info_dst(inet_ntoa(ppkt->ip->ip_dst),
        trace_colo_compare_ip_info(ppkt->size, pri_ip_src,
                                   pri_ip_dst, spkt->size,
                                   sec_ip_src, sec_ip_dst);

        trace_colo_compare_tcp_info("pri tcp packet",
                                    ntohl(ptcp->th_seq),
                                    ntohl(ptcp->th_ack),
                                    res, ptcp->th_flags,
                                    ppkt->size);

        trace_colo_compare_tcp_info("sec tcp packet",
                                    ntohl(stcp->th_seq),
                                    ntohl(stcp->th_ack),
                                    res, stcp->th_flags,
                                    spkt->size);

        qemu_hexdump((char *)ppkt->data, stderr,
                     "colo-compare ppkt", ppkt->size);
        qemu_hexdump((char *)spkt->data, stderr,
Loading