From: Laurent Vivier <laurent@vivier.eu>
To: qemu-devel@nongnu.org
Cc: "Fam Zheng" <fam@euphon.net>,
"Peter Maydell" <peter.maydell@linaro.org>,
"Jason Wang" <jasowang@redhat.com>,
"Michael Tokarev" <mjt@tls.msk.ru>,
"Yuval Shaia" <yuval.shaia.ml@gmail.com>,
"Max Filippov" <jcmvbkbc@gmail.com>,
"Gerd Hoffmann" <kraxel@redhat.com>,
"Edgar E. Iglesias" <edgar.iglesias@gmail.com>,
"Marek Vasut" <marex@denx.de>,
qemu-block@nongnu.org, qemu-trivial@nongnu.org,
"Philippe Mathieu-Daudé" <philmd@redhat.com>,
"Laurent Vivier" <lvivier@redhat.com>,
"Thomas Huth" <thuth@redhat.com>, "Jiri Pirko" <jiri@resnulli.us>,
"Eduardo Habkost" <ehabkost@redhat.com>,
"Alistair Francis" <alistair@alistair23.me>,
"Alex Williamson" <alex.williamson@redhat.com>,
qemu-arm@nongnu.org, "Stefan Hajnoczi" <stefanha@redhat.com>,
"Richard Henderson" <rth@twiddle.net>,
"Kevin Wolf" <kwolf@redhat.com>,
"Thomas Huth" <huth@tuxfamily.org>,
"Chris Wulff" <crwulff@gmail.com>,
"Laurent Vivier" <laurent@vivier.eu>,
"Max Reitz" <mreitz@redhat.com>,
"Paolo Bonzini" <pbonzini@redhat.com>
Subject: [PULL 15/17] hw/net/rocker: Report unimplemented feature with qemu_log_mask(UNIMP)
Date: Wed, 19 Feb 2020 11:16:10 +0100 [thread overview]
Message-ID: <20200219101612.1033925-16-laurent@vivier.eu> (raw)
In-Reply-To: <20200219101612.1033925-1-laurent@vivier.eu>
From: Philippe Mathieu-Daudé <philmd@redhat.com>
Fix warnings reported by Clang static code analyzer:
CC hw/net/rocker/rocker.o
hw/net/rocker/rocker.c:213:9: warning: Value stored to 'tx_tso_mss' is never read
tx_tso_mss = rocker_tlv_get_le16(tlvs[ROCKER_TLV_TX_TSO_MSS]);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
hw/net/rocker/rocker.c:217:9: warning: Value stored to 'tx_tso_hdr_len' is never read
tx_tso_hdr_len = rocker_tlv_get_le16(tlvs[ROCKER_TLV_TX_TSO_HDR_LEN]);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
hw/net/rocker/rocker.c:255:9: warning: Value stored to 'tx_l3_csum_off' is never read
tx_l3_csum_off += tx_tso_mss = tx_tso_hdr_len = 0;
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Fixes: dc488f888
Reported-by: Clang Static Analyzer
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-Id: <20200217101637.27558-1-philmd@redhat.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
hw/net/rocker/rocker.c | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a/hw/net/rocker/rocker.c b/hw/net/rocker/rocker.c
index 81dd3b5f141d..15d66f6cbcf0 100644
--- a/hw/net/rocker/rocker.c
+++ b/hw/net/rocker/rocker.c
@@ -27,6 +27,7 @@
#include "qemu/iov.h"
#include "qemu/module.h"
#include "qemu/bitops.h"
+#include "qemu/log.h"
#include "rocker.h"
#include "rocker_hw.h"
@@ -207,14 +208,22 @@ static int tx_consume(Rocker *r, DescInfo *info)
if (tlvs[ROCKER_TLV_TX_L3_CSUM_OFF]) {
tx_l3_csum_off = rocker_tlv_get_le16(tlvs[ROCKER_TLV_TX_L3_CSUM_OFF]);
+ qemu_log_mask(LOG_UNIMP, "rocker %s: L3 not implemented"
+ " (cksum off: %u)\n",
+ __func__, tx_l3_csum_off);
}
if (tlvs[ROCKER_TLV_TX_TSO_MSS]) {
tx_tso_mss = rocker_tlv_get_le16(tlvs[ROCKER_TLV_TX_TSO_MSS]);
+ qemu_log_mask(LOG_UNIMP, "rocker %s: TSO not implemented (MSS: %u)\n",
+ __func__, tx_tso_mss);
}
if (tlvs[ROCKER_TLV_TX_TSO_HDR_LEN]) {
tx_tso_hdr_len = rocker_tlv_get_le16(tlvs[ROCKER_TLV_TX_TSO_HDR_LEN]);
+ qemu_log_mask(LOG_UNIMP, "rocker %s: TSO not implemented"
+ " (hdr length: %u)\n",
+ __func__, tx_tso_hdr_len);
}
rocker_tlv_for_each_nested(tlv_frag, tlvs[ROCKER_TLV_TX_FRAGS], rem) {
@@ -249,12 +258,6 @@ static int tx_consume(Rocker *r, DescInfo *info)
iovcnt++;
}
- if (iovcnt) {
- /* XXX perform Tx offloads */
- /* XXX silence compiler for now */
- tx_l3_csum_off += tx_tso_mss = tx_tso_hdr_len = 0;
- }
-
err = fp_port_eg(r->fp_port[port], iov, iovcnt);
err_too_many_frags:
--
2.24.1
next prev parent reply other threads:[~2020-02-19 10:24 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-19 10:15 [PULL 00/17] Trivial branch patches Laurent Vivier
2020-02-19 10:15 ` [PULL 01/17] mailmap: Add entry for Yu-Chen Lin Laurent Vivier
2020-02-19 10:15 ` [PULL 02/17] Report stringified errno in VFIO related errors Laurent Vivier
2020-02-19 10:15 ` [PULL 03/17] scripts/checkpatch.pl: Detect superfluous semicolon in C code Laurent Vivier
2020-02-19 10:15 ` [PULL 04/17] audio/alsaaudio: Remove superfluous semicolons Laurent Vivier
2020-02-19 10:16 ` [PULL 05/17] hw/arm/xlnx-versal: Remove superfluous semicolon Laurent Vivier
2020-02-19 10:16 ` [PULL 06/17] hw/m68k/next-cube: " Laurent Vivier
2020-02-19 10:16 ` [PULL 07/17] hw/scsi/esp: " Laurent Vivier
2020-02-19 10:16 ` [PULL 08/17] hw/vfio/display: " Laurent Vivier
2020-02-19 10:16 ` [PULL 09/17] ui/input-barrier: " Laurent Vivier
2020-02-19 10:16 ` [PULL 10/17] target/i386/whpx: " Laurent Vivier
2020-02-19 10:16 ` [PULL 11/17] tests/qtest/libqos/qgraph: Remove superfluous semicolons Laurent Vivier
2020-02-19 10:16 ` [PULL 12/17] contrib/rdmacm-mux: Remove superfluous semicolon Laurent Vivier
2020-02-19 10:16 ` [PULL 13/17] hw/display/qxl: Remove unneeded variable assignment Laurent Vivier
2020-02-19 10:16 ` [PULL 14/17] hw/block/pflash_cfi02: " Laurent Vivier
2020-02-19 10:16 ` Laurent Vivier [this message]
2020-02-19 10:16 ` [PULL 16/17] hw/nios2:fix leak of fdevice tree blob Laurent Vivier
2020-02-19 10:16 ` [PULL 17/17] hw/xtensa/xtfpga:fix " Laurent Vivier
2020-02-20 17:35 ` [PULL 00/17] Trivial branch 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=20200219101612.1033925-16-laurent@vivier.eu \
--to=laurent@vivier.eu \
--cc=alex.williamson@redhat.com \
--cc=alistair@alistair23.me \
--cc=crwulff@gmail.com \
--cc=edgar.iglesias@gmail.com \
--cc=ehabkost@redhat.com \
--cc=fam@euphon.net \
--cc=huth@tuxfamily.org \
--cc=jasowang@redhat.com \
--cc=jcmvbkbc@gmail.com \
--cc=jiri@resnulli.us \
--cc=kraxel@redhat.com \
--cc=kwolf@redhat.com \
--cc=lvivier@redhat.com \
--cc=marex@denx.de \
--cc=mjt@tls.msk.ru \
--cc=mreitz@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=philmd@redhat.com \
--cc=qemu-arm@nongnu.org \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-trivial@nongnu.org \
--cc=rth@twiddle.net \
--cc=stefanha@redhat.com \
--cc=thuth@redhat.com \
--cc=yuval.shaia.ml@gmail.com \
/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).