From: Yuanhan Liu <yliu@fridaylinux.org>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: dpdk stable <stable@dpdk.org>
Subject: [dpdk-stable] patch 'net/virtio: do not falsely claim to do IP checksum' has been queued to LTS release 16.11.3
Date: Sat, 15 Jul 2017 19:17:12 +0800 [thread overview]
Message-ID: <1500117433-28932-6-git-send-email-yliu@fridaylinux.org> (raw)
In-Reply-To: <1500117433-28932-1-git-send-email-yliu@fridaylinux.org>
Hi,
FYI, your patch has been queued to LTS release 16.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/19/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From 8a20d34f959d56f8a83867fe70fd8941a912d20a Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Fri, 7 Jul 2017 12:52:49 -0700
Subject: [PATCH] net/virtio: do not falsely claim to do IP checksum
[ upstream commit 4dab342b752222c6e248dae5ec9de2302aacd746 ]
The virtio driver is confused about the meaning of the ip_checksum
flag. In DPDK, ip_checksum means the hardware is capable of checking
the Layer 3 IP checksum. But KVM/QEMU does not do that. The flag
VIRTIO_NET_F_GUEST_CSUM controls whether the receive side does
Layer 4 (TCP/UDP) checksum offload.
Fix by erroring out any requests to do IP checksum.
Fixes: 96cb6711939e ("net/virtio: support Rx checksum offload")
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
---
drivers/net/virtio/virtio_ethdev.c | 16 +++++++---------
1 file changed, 7 insertions(+), 9 deletions(-)
diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c
index 1d2b8e4..e86d12e 100644
--- a/drivers/net/virtio/virtio_ethdev.c
+++ b/drivers/net/virtio/virtio_ethdev.c
@@ -1482,8 +1482,13 @@ virtio_dev_configure(struct rte_eth_dev *dev)
PMD_INIT_LOG(DEBUG, "configure");
req_features = VIRTIO_PMD_DEFAULT_GUEST_FEATURES;
- if (rxmode->hw_ip_checksum)
- req_features |= (1ULL << VIRTIO_NET_F_GUEST_CSUM);
+
+ /* Virtio does L4 checksum but not L3! */
+ if (rxmode->hw_ip_checksum) {
+ PMD_DRV_LOG(NOTICE,
+ "virtio does not support IP checksum");
+ return -ENOTSUP;
+ }
if (rxmode->enable_lro)
req_features |=
(1ULL << VIRTIO_NET_F_GUEST_TSO4) |
@@ -1496,13 +1501,6 @@ virtio_dev_configure(struct rte_eth_dev *dev)
return ret;
}
- if (rxmode->hw_ip_checksum &&
- !vtpci_with_feature(hw, VIRTIO_NET_F_GUEST_CSUM)) {
- PMD_DRV_LOG(NOTICE,
- "rx ip checksum not available on this host");
- return -ENOTSUP;
- }
-
if (rxmode->enable_lro &&
(!vtpci_with_feature(hw, VIRTIO_NET_F_GUEST_TSO4) ||
!vtpci_with_feature(hw, VIRTIO_NET_F_GUEST_TSO4))) {
--
2.7.4
next prev parent reply other threads:[~2017-07-15 11:18 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-15 11:17 [dpdk-stable] patch 'net/bonding: change link status check to no-wait' " Yuanhan Liu
2017-07-15 11:17 ` [dpdk-stable] patch 'net/ena: fix cleanup of the Tx bufs' " Yuanhan Liu
2017-07-15 11:17 ` [dpdk-stable] patch 'net/bonding: fix number of bonding Tx/Rx queues' " Yuanhan Liu
2017-07-15 11:17 ` [dpdk-stable] patch 'vhost: fix TCP checksum' " Yuanhan Liu
2017-07-15 11:17 ` [dpdk-stable] patch 'vhost: fix IP " Yuanhan Liu
2017-07-15 11:17 ` Yuanhan Liu [this message]
2017-07-15 11:17 ` [dpdk-stable] patch 'net/virtio: do not claim to support LRO' " Yuanhan Liu
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=1500117433-28932-6-git-send-email-yliu@fridaylinux.org \
--to=yliu@fridaylinux.org \
--cc=stable@dpdk.org \
--cc=stephen@networkplumber.org \
/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).