Commit c014817e authored by Peter Maydell's avatar Peter Maydell
Browse files

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



# gpg: Signature made Mon 20 Nov 2017 03:28:54 GMT
# gpg:                using RSA key 0xEF04965B398D6211
# gpg: Good signature from "Jason Wang (Jason Wang on RedHat) <jasowang@redhat.com>"
# gpg: WARNING: This key is not certified with sufficiently trusted signatures!
# gpg:          It is not certain that the signature belongs to the owner.
# Primary key fingerprint: 215D 46F4 8246 689E C77F  3562 EF04 965B 398D 6211

* remotes/jasowang/tags/net-pull-request:
  hw/net/vmxnet3: Fix code to work on big endian hosts, too
  net: Transmit zero UDP checksum as 0xFFFF
  MAINTAINERS: Add missing entry for eepro100 emulation
  hw/net/eepro100: Fix endianness problem on big endian hosts
  Revert "Add new PCI ID for i82559a"
  colo-compare: fix the dangerous assignment

Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
parents b11ce33f c527e0af
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -1183,6 +1183,11 @@ M: Dmitry Fleytman <dmitry@daynix.com>
S: Maintained
F: hw/net/e1000e*

eepro100
M: Stefan Weil <sw@weilnetz.de>
S: Maintained
F: hw/net/eepro100.c

Generic Loader
M: Alistair Francis <alistair.francis@xilinx.com>
S: Maintained
+1 −1
Original line number Diff line number Diff line
@@ -503,7 +503,7 @@ putsum(uint8_t *data, uint32_t n, uint32_t sloc, uint32_t css, uint32_t cse)
        n = cse + 1;
    if (sloc < n-1) {
        sum = net_checksum_add(n-css, data+css);
        stw_be_p(data + sloc, net_checksum_finish(sum));
        stw_be_p(data + sloc, net_checksum_finish_nozero(sum));
    }
}

+2 −15
Original line number Diff line number Diff line
@@ -132,7 +132,6 @@ typedef struct {
    const char *name;
    const char *desc;
    uint16_t device_id;
    uint16_t alt_device_id;
    uint8_t revision;
    uint16_t subsystem_vendor_id;
    uint16_t subsystem_id;
@@ -277,7 +276,6 @@ typedef struct {
    /* Quasi static device properties (no need to save them). */
    uint16_t stats_size;
    bool has_extended_tcb_support;
    bool use_alt_device_id;
} EEPRO100State;

/* Word indices in EEPROM. */
@@ -756,8 +754,8 @@ static void read_cb(EEPRO100State *s)

static void tx_command(EEPRO100State *s)
{
    uint32_t tbd_array = le32_to_cpu(s->tx.tbd_array_addr);
    uint16_t tcb_bytes = (le16_to_cpu(s->tx.tcb_bytes) & 0x3fff);
    uint32_t tbd_array = s->tx.tbd_array_addr;
    uint16_t tcb_bytes = s->tx.tcb_bytes & 0x3fff;
    /* Sends larger than MAX_ETH_FRAME_SIZE are allowed, up to 2600 bytes. */
    uint8_t buf[2600];
    uint16_t size = 0;
@@ -1857,14 +1855,6 @@ static void e100_nic_realize(PCIDevice *pci_dev, Error **errp)

    TRACE(OTHER, logout("\n"));

    /* By default, the i82559a adapter uses the legacy PCI ID (for the
     * i82557). This allows the PCI ID to be changed to the alternate
     * i82559 ID if needed.
     */
    if (s->use_alt_device_id && strcmp(info->name, "i82559a") == 0) {
        pci_config_set_device_id(s->dev.config, info->alt_device_id);
    }

    s->device = info->device;

    e100_pci_reset(s, &local_err);
@@ -1984,7 +1974,6 @@ static E100PCIDeviceInfo e100_devices[] = {
        .desc = "Intel i82559A Ethernet",
        .device = i82559A,
        .device_id = PCI_DEVICE_ID_INTEL_82557,
        .alt_device_id = PCI_DEVICE_ID_INTEL_82559,
        .revision = 0x06,
        .stats_size = 80,
        .has_extended_tcb_support = true,
@@ -2078,8 +2067,6 @@ static E100PCIDeviceInfo *eepro100_get_class(EEPRO100State *s)

static Property e100_properties[] = {
    DEFINE_NIC_PROPERTIES(EEPRO100State, conf),
    DEFINE_PROP_BOOL("x-use-alt-device-id", EEPRO100State, use_alt_device_id,
                     true),
    DEFINE_PROP_END_OF_LIST(),
};

+1 −1
Original line number Diff line number Diff line
@@ -518,7 +518,7 @@ _net_rx_pkt_calc_l4_csum(struct NetRxPkt *pkt)
    cntr += net_checksum_add_iov(pkt->vec, pkt->vec_len,
                                 pkt->l4hdr_off, csl, cso);

    csum = net_checksum_finish(cntr);
    csum = net_checksum_finish_nozero(cntr);

    trace_net_rx_pkt_l4_csum_calc_csum(pkt->l4hdr_off, csl, cntr, csum);

+1 −1
Original line number Diff line number Diff line
@@ -486,7 +486,7 @@ static void net_tx_pkt_do_sw_csum(struct NetTxPkt *pkt)
        net_checksum_add_iov(iov, iov_len, pkt->virt_hdr.csum_start, csl, cso);

    /* Put the checksum obtained into the packet */
    csum = cpu_to_be16(net_checksum_finish(csum_cntr));
    csum = cpu_to_be16(net_checksum_finish_nozero(csum_cntr));
    iov_from_buf(iov, iov_len, csum_offset, &csum, sizeof csum);
}

Loading