patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] patch 'net/bonding: change link status check to no-wait' has been queued to LTS release 16.11.3
@ 2017-07-15 11:17 Yuanhan Liu
  2017-07-15 11:17 ` [dpdk-stable] patch 'net/ena: fix cleanup of the Tx bufs' " Yuanhan Liu
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Yuanhan Liu @ 2017-07-15 11:17 UTC (permalink / raw)
  To: Declan Doherty; +Cc: dpdk stable

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 0b7aebc7b297115da1a0b83b7984a0fafc4942fc Mon Sep 17 00:00:00 2001
From: Declan Doherty <declan.doherty@intel.com>
Date: Wed, 28 Jun 2017 11:15:50 +0100
Subject: [PATCH] net/bonding: change link status check to no-wait

[ upstream commit 8ae9c69a2b7d36ca9283748f37c4aa8da06a3b6c ]

In 2 modes (802.3ad and TLB) of the link bonding driver, monitoring of
link status is used to determine the active slaves to use. These
functions are currently using the rte_link_link_get which could block
for up to 9 seconds, depending on the slave device.

In the 802.3ad periodic callback and in the TLB slave callback the
link status of slaves are checked using rte_eth_link_get function.

This patch changes to the no-wait version of the link get function to
avoid the possible issues which could be introduced if this call was
to block for an extended period of time.

Fixes: 46fb43683679 ("bond: add mode 4")
Fixes: 7c76a747e68c ("bond: add mode 5")

Signed-off-by: Declan Doherty <declan.doherty@intel.com>
---
 drivers/net/bonding/rte_eth_bond_8023ad.c | 2 +-
 drivers/net/bonding/rte_eth_bond_pmd.c    | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/bonding/rte_eth_bond_8023ad.c b/drivers/net/bonding/rte_eth_bond_8023ad.c
index aa84b93..b4a1e72 100644
--- a/drivers/net/bonding/rte_eth_bond_8023ad.c
+++ b/drivers/net/bonding/rte_eth_bond_8023ad.c
@@ -758,7 +758,7 @@ bond_mode_8023ad_periodic_cb(void *arg)
 		uint16_t key;
 
 		slave_id = internals->active_slaves[i];
-		rte_eth_link_get(slave_id, &link_info);
+		rte_eth_link_get_nowait(slave_id, &link_info);
 		rte_eth_macaddr_get(slave_id, &slave_addr);
 
 		if (link_info.link_status != 0) {
diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c
index aa71e3f..71316b4 100644
--- a/drivers/net/bonding/rte_eth_bond_pmd.c
+++ b/drivers/net/bonding/rte_eth_bond_pmd.c
@@ -643,7 +643,7 @@ bandwidth_left(uint8_t port_id, uint64_t load, uint8_t update_idx,
 {
 	struct rte_eth_link link_status;
 
-	rte_eth_link_get(port_id, &link_status);
+	rte_eth_link_get_nowait(port_id, &link_status);
 	uint64_t link_bwg = link_status.link_speed * 1000000ULL / 8;
 	if (link_bwg == 0)
 		return;
-- 
2.7.4

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [dpdk-stable] patch 'net/ena: fix cleanup of the Tx bufs' has been queued to LTS release 16.11.3
  2017-07-15 11:17 [dpdk-stable] patch 'net/bonding: change link status check to no-wait' has been queued to LTS release 16.11.3 Yuanhan Liu
@ 2017-07-15 11:17 ` Yuanhan Liu
  2017-07-15 11:17 ` [dpdk-stable] patch 'net/bonding: fix number of bonding Tx/Rx queues' " Yuanhan Liu
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Yuanhan Liu @ 2017-07-15 11:17 UTC (permalink / raw)
  To: Michal Krawczyk; +Cc: dpdk stable

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 577a2e5599698a9d63721b5eacfbd73b83618155 Mon Sep 17 00:00:00 2001
From: Michal Krawczyk <mk@semihalf.com>
Date: Tue, 4 Jul 2017 15:51:52 +0200
Subject: [PATCH] net/ena: fix cleanup of the Tx bufs

[ upstream commit 207a514ce516f8ab3c1ad2b0f930f045b90b773c ]

After cleanup of the mbuf on Tx path, queue was still pointing to this
mbuf and upon cleanup of the Tx buffers, it was being freed second time.

Moreover, to make sure that upon interrupt all mbufs will be freed,
whole ring is being cleaned up instead of part of it - originally only
range between head and tail was being cleaned up.

Fixes: 1173fca25af9 ("ena: add polling-mode driver")

Signed-off-by: Michal Krawczyk <mk@semihalf.com>
---
 drivers/net/ena/ena_ethdev.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c
index 1fc3654..6efe0c3 100644
--- a/drivers/net/ena/ena_ethdev.c
+++ b/drivers/net/ena/ena_ethdev.c
@@ -677,11 +677,10 @@ static void ena_rx_queue_release_bufs(struct ena_ring *ring)
 
 static void ena_tx_queue_release_bufs(struct ena_ring *ring)
 {
-	unsigned int ring_mask = ring->ring_size - 1;
+	unsigned int i;
 
-	while (ring->next_to_clean != ring->next_to_use) {
-		struct ena_tx_buffer *tx_buf =
-			&ring->tx_buffer_info[ring->next_to_clean & ring_mask];
+	for (i = 0; i < ring->ring_size; ++i) {
+		struct ena_tx_buffer *tx_buf = &ring->tx_buffer_info[i];
 
 		if (tx_buf->mbuf)
 			rte_pktmbuf_free(tx_buf->mbuf);
@@ -1683,6 +1682,7 @@ static uint16_t eth_ena_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
 		/* Free whole mbuf chain  */
 		mbuf = tx_info->mbuf;
 		rte_pktmbuf_free(mbuf);
+		tx_info->mbuf = NULL;
 
 		/* Put back descriptor to the ring for reuse */
 		tx_ring->empty_tx_reqs[next_to_clean & ring_mask] = req_id;
-- 
2.7.4

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [dpdk-stable] patch 'net/bonding: fix number of bonding Tx/Rx queues' has been queued to LTS release 16.11.3
  2017-07-15 11:17 [dpdk-stable] patch 'net/bonding: change link status check to no-wait' has been queued to LTS release 16.11.3 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 ` Yuanhan Liu
  2017-07-15 11:17 ` [dpdk-stable] patch 'vhost: fix TCP checksum' " Yuanhan Liu
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Yuanhan Liu @ 2017-07-15 11:17 UTC (permalink / raw)
  To: Declan Doherty; +Cc: dpdk stable

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 a553b4971cef88f214485c97868b8231893721e5 Mon Sep 17 00:00:00 2001
From: Declan Doherty <declan.doherty@intel.com>
Date: Tue, 4 Jul 2017 17:46:24 +0100
Subject: [PATCH] net/bonding: fix number of bonding Tx/Rx queues

[ upstream commit acfb51e2fe96c27a042248ee32930cbd78f36cd7 ]

This patch fixes the maximum number of Tx an Rx queues supported by a
bonding device return by the rte_eth_dev_info_get function.

The bonding device now calculates the maximum number of supported Tx
and Rx queues based on the slaves bound to the bonded device, with the
minimum values of Tx and Rx queues from the device slaves being the
bonded devices maximum, as each slave must be able to support the same
number of Tx and Rx queues.

Fixes: 2efb58cbab6e ("bond: new link bonding library")

Signed-off-by: Declan Doherty <declan.doherty@intel.com>
---
 drivers/net/bonding/rte_eth_bond_pmd.c | 27 +++++++++++++++++++++++++--
 1 file changed, 25 insertions(+), 2 deletions(-)

diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c
index 71316b4..7811a5a 100644
--- a/drivers/net/bonding/rte_eth_bond_pmd.c
+++ b/drivers/net/bonding/rte_eth_bond_pmd.c
@@ -1667,6 +1667,8 @@ static void
 bond_ethdev_info(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
 {
 	struct bond_dev_private *internals = dev->data->dev_private;
+	uint16_t max_nb_rx_queues = UINT16_MAX;
+	uint16_t max_nb_tx_queues = UINT16_MAX;
 
 	dev_info->max_mac_addrs = 1;
 
@@ -1674,8 +1676,29 @@ bond_ethdev_info(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
 				  ? internals->candidate_max_rx_pktlen
 				  : ETHER_MAX_JUMBO_FRAME_LEN;
 
-	dev_info->max_rx_queues = (uint16_t)128;
-	dev_info->max_tx_queues = (uint16_t)512;
+	if (internals->slave_count > 0) {
+		/* Max number of tx/rx queues that the bonded device can
+		 * support is the minimum values of the bonded slaves, as
+		 * all slaves must be capable of supporting the same number
+		 * of tx/rx queues.
+		 */
+		struct rte_eth_dev_info slave_info;
+		uint8_t idx;
+
+		for (idx = 0; idx < internals->slave_count; idx++) {
+			rte_eth_dev_info_get(internals->slaves[idx].port_id,
+					&slave_info);
+
+			if (slave_info.max_rx_queues < max_nb_rx_queues)
+				max_nb_rx_queues = slave_info.max_rx_queues;
+
+			if (slave_info.max_tx_queues < max_nb_tx_queues)
+				max_nb_tx_queues = slave_info.max_tx_queues;
+		}
+	}
+
+	dev_info->max_rx_queues = max_nb_rx_queues;
+	dev_info->max_tx_queues = max_nb_tx_queues;
 
 	dev_info->min_rx_bufsize = 0;
 	dev_info->pci_dev = NULL;
-- 
2.7.4

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [dpdk-stable] patch 'vhost: fix TCP checksum' has been queued to LTS release 16.11.3
  2017-07-15 11:17 [dpdk-stable] patch 'net/bonding: change link status check to no-wait' has been queued to LTS release 16.11.3 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 ` Yuanhan Liu
  2017-07-15 11:17 ` [dpdk-stable] patch 'vhost: fix IP " Yuanhan Liu
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Yuanhan Liu @ 2017-07-15 11:17 UTC (permalink / raw)
  To: Jianfeng Tan; +Cc: Maxime Coquelin, dpdk stable

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 310bd050e94476991a2a627d6e4a83081b55d50c Mon Sep 17 00:00:00 2001
From: Jianfeng Tan <jianfeng.tan@intel.com>
Date: Wed, 7 Jun 2017 06:41:36 +0000
Subject: [PATCH] vhost: fix TCP checksum

[ upstream commit 46b7a8372d42506c6ed5e2a3940e7881090c3c90 ]

As PKT_TX_TCP_SEG flag in mbuf->ol_flags implies PKT_TX_TCP_CKSUM,
applications, e.g., testpmd, don't set PKT_TX_TCP_CKSUM when TSO
is set.

This leads to that packets get dropped in VM tcp stack layer because
of bad TCP csum.

To fix this, we make sure TCP NEEDS_CSUM info is set into virtio net
header when PKT_TX_TCP_SEG is set, so that VM tcp stack will not
check the TCP csum.

Fixes: 859b480d5afd ("vhost: add guest offload setting")

Signed-off-by: Jianfeng Tan <jianfeng.tan@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
---
 lib/librte_vhost/virtio_net.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/lib/librte_vhost/virtio_net.c b/lib/librte_vhost/virtio_net.c
index ea027f1..5d793de 100644
--- a/lib/librte_vhost/virtio_net.c
+++ b/lib/librte_vhost/virtio_net.c
@@ -144,11 +144,16 @@ update_shadow_used_ring(struct vhost_virtqueue *vq,
 static void
 virtio_enqueue_offload(struct rte_mbuf *m_buf, struct virtio_net_hdr *net_hdr)
 {
-	if (m_buf->ol_flags & PKT_TX_L4_MASK) {
+	uint64_t csum_l4 = m_buf->ol_flags & PKT_TX_L4_MASK;
+
+	if (m_buf->ol_flags & PKT_TX_TCP_SEG)
+		csum_l4 |= PKT_TX_TCP_CKSUM;
+
+	if (csum_l4) {
 		net_hdr->flags = VIRTIO_NET_HDR_F_NEEDS_CSUM;
 		net_hdr->csum_start = m_buf->l2_len + m_buf->l3_len;
 
-		switch (m_buf->ol_flags & PKT_TX_L4_MASK) {
+		switch (csum_l4) {
 		case PKT_TX_TCP_CKSUM:
 			net_hdr->csum_offset = (offsetof(struct tcp_hdr,
 						cksum));
-- 
2.7.4

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [dpdk-stable] patch 'vhost: fix IP checksum' has been queued to LTS release 16.11.3
  2017-07-15 11:17 [dpdk-stable] patch 'net/bonding: change link status check to no-wait' has been queued to LTS release 16.11.3 Yuanhan Liu
                   ` (2 preceding siblings ...)
  2017-07-15 11:17 ` [dpdk-stable] patch 'vhost: fix TCP checksum' " Yuanhan Liu
@ 2017-07-15 11:17 ` Yuanhan Liu
  2017-07-15 11:17 ` [dpdk-stable] patch 'net/virtio: do not falsely claim to do " Yuanhan Liu
  2017-07-15 11:17 ` [dpdk-stable] patch 'net/virtio: do not claim to support LRO' " Yuanhan Liu
  5 siblings, 0 replies; 7+ messages in thread
From: Yuanhan Liu @ 2017-07-15 11:17 UTC (permalink / raw)
  To: Jianfeng Tan; +Cc: Maxime Coquelin, dpdk stable

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 a492f24ce1507c56a6ad9a605571a0ac7390c39e Mon Sep 17 00:00:00 2001
From: Jianfeng Tan <jianfeng.tan@intel.com>
Date: Wed, 7 Jun 2017 06:41:37 +0000
Subject: [PATCH] vhost: fix IP checksum

[ upstream commit b08b8cfeb2aea2a703d201ad8c4b258e8a0bde12 ]

There is no way to bypass IP checksum verification in Linux
kernel, no matter skb->ip_summed is assigned as CHECKSUM_UNNECESSARY
or CHECKSUM_PARTIAL.

So any packets with bad IP checksum will be dropped at VM IP layer.

To correct, we check this flag PKT_TX_IP_CKSUM to calculate IP csum.

Fixes: 859b480d5afd ("vhost: add guest offload setting")

Signed-off-by: Jianfeng Tan <jianfeng.tan@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
---
 lib/librte_vhost/virtio_net.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/lib/librte_vhost/virtio_net.c b/lib/librte_vhost/virtio_net.c
index 5d793de..7d5b04c 100644
--- a/lib/librte_vhost/virtio_net.c
+++ b/lib/librte_vhost/virtio_net.c
@@ -169,6 +169,15 @@ virtio_enqueue_offload(struct rte_mbuf *m_buf, struct virtio_net_hdr *net_hdr)
 		}
 	}
 
+	/* IP cksum verification cannot be bypassed, then calculate here */
+	if (m_buf->ol_flags & PKT_TX_IP_CKSUM) {
+		struct ipv4_hdr *ipv4_hdr;
+
+		ipv4_hdr = rte_pktmbuf_mtod_offset(m_buf, struct ipv4_hdr *,
+						   m_buf->l2_len);
+		ipv4_hdr->hdr_checksum = rte_ipv4_cksum(ipv4_hdr);
+	}
+
 	if (m_buf->ol_flags & PKT_TX_TCP_SEG) {
 		if (m_buf->ol_flags & PKT_TX_IPV4)
 			net_hdr->gso_type = VIRTIO_NET_HDR_GSO_TCPV4;
-- 
2.7.4

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [dpdk-stable] patch 'net/virtio: do not falsely claim to do IP checksum' has been queued to LTS release 16.11.3
  2017-07-15 11:17 [dpdk-stable] patch 'net/bonding: change link status check to no-wait' has been queued to LTS release 16.11.3 Yuanhan Liu
                   ` (3 preceding siblings ...)
  2017-07-15 11:17 ` [dpdk-stable] patch 'vhost: fix IP " Yuanhan Liu
@ 2017-07-15 11:17 ` Yuanhan Liu
  2017-07-15 11:17 ` [dpdk-stable] patch 'net/virtio: do not claim to support LRO' " Yuanhan Liu
  5 siblings, 0 replies; 7+ messages in thread
From: Yuanhan Liu @ 2017-07-15 11:17 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: dpdk stable

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [dpdk-stable] patch 'net/virtio: do not claim to support LRO' has been queued to LTS release 16.11.3
  2017-07-15 11:17 [dpdk-stable] patch 'net/bonding: change link status check to no-wait' has been queued to LTS release 16.11.3 Yuanhan Liu
                   ` (4 preceding siblings ...)
  2017-07-15 11:17 ` [dpdk-stable] patch 'net/virtio: do not falsely claim to do " Yuanhan Liu
@ 2017-07-15 11:17 ` Yuanhan Liu
  5 siblings, 0 replies; 7+ messages in thread
From: Yuanhan Liu @ 2017-07-15 11:17 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: dpdk stable

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 0bf3bae65540f7fd662630722986d9a3e356498d Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Fri, 7 Jul 2017 12:52:50 -0700
Subject: [PATCH] net/virtio: do not claim to support LRO

[ backported from upstream commit 701a64622c2653c0736042d2f790081db79afdc7 ]

The current virtio supports Transmit Segmentation Offload, but
does not really support Large Receive Offload. The driver was confusing
the two offloads.

Fixes: 86d59b21468a ("net/virtio: support LRO")

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
---
 drivers/net/virtio/virtio_ethdev.c | 24 ++++--------------------
 1 file changed, 4 insertions(+), 20 deletions(-)

diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c
index e86d12e..67ebb1e 100644
--- a/drivers/net/virtio/virtio_ethdev.c
+++ b/drivers/net/virtio/virtio_ethdev.c
@@ -1477,11 +1477,8 @@ virtio_dev_configure(struct rte_eth_dev *dev)
 {
 	const struct rte_eth_rxmode *rxmode = &dev->data->dev_conf.rxmode;
 	struct virtio_hw *hw = dev->data->dev_private;
-	uint64_t req_features;
-	int ret;
 
 	PMD_INIT_LOG(DEBUG, "configure");
-	req_features = VIRTIO_PMD_DEFAULT_GUEST_FEATURES;
 
 	/* Virtio does L4 checksum but not L3! */
 	if (rxmode->hw_ip_checksum) {
@@ -1489,23 +1486,10 @@ virtio_dev_configure(struct rte_eth_dev *dev)
 			    "virtio does not support IP checksum");
 		return -ENOTSUP;
 	}
-	if (rxmode->enable_lro)
-		req_features |=
-			(1ULL << VIRTIO_NET_F_GUEST_TSO4) |
-			(1ULL << VIRTIO_NET_F_GUEST_TSO6);
-
-	/* if request features changed, reinit the device */
-	if (req_features != hw->req_guest_features) {
-		ret = virtio_init_device(dev, req_features);
-		if (ret < 0)
-			return ret;
-	}
 
-	if (rxmode->enable_lro &&
-		(!vtpci_with_feature(hw, VIRTIO_NET_F_GUEST_TSO4) ||
-			!vtpci_with_feature(hw, VIRTIO_NET_F_GUEST_TSO4))) {
+	if (rxmode->enable_lro) {
 		PMD_DRV_LOG(NOTICE,
-			"lro not available on this host");
+			    "virtio does not support Large Receive Offload");
 		return -ENOTSUP;
 	}
 
@@ -1712,8 +1696,8 @@ virtio_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
 	};
 	dev_info->rx_offload_capa =
 		DEV_RX_OFFLOAD_TCP_CKSUM |
-		DEV_RX_OFFLOAD_UDP_CKSUM |
-		DEV_RX_OFFLOAD_TCP_LRO;
+		DEV_RX_OFFLOAD_UDP_CKSUM;
+
 	dev_info->tx_offload_capa = 0;
 
 	if (hw->guest_features & (1ULL << VIRTIO_NET_F_CSUM)) {
-- 
2.7.4

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2017-07-15 11:18 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-15 11:17 [dpdk-stable] patch 'net/bonding: change link status check to no-wait' has been queued to LTS release 16.11.3 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 ` [dpdk-stable] patch 'net/virtio: do not falsely claim to do " Yuanhan Liu
2017-07-15 11:17 ` [dpdk-stable] patch 'net/virtio: do not claim to support LRO' " Yuanhan Liu

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).