Skip to contentSkip to conversation

fix missing Tx multi segs capabilities

PATCH Applied Didier Pallard 3 participants 7 messages Sep 19, 2018 – Sep 21, 2018 Network drivers

lore
Share & tools
lore
#0 lore raw

cover fix missing Tx multi segs capabilities

In former API, ETH_TXQ_FLAGS_NOMULTSEGS was merely a hint indicating that application will never send multisegmented packets, allowing pmd to choose different tx methods accordingly.
In new API, DEV_TX_OFFLOAD_MULTI_SEGS became an offload capability that is advertised by pmds, some of them do not advertise it and expect to never receive fragmented packets (octeontx, axgbe) So an ethdev that supports multisegmented packets should properly advertise it.

Didier Pallard (4):
net/e1000: fix missing Tx multi segs capability
net/fm10k: fix missing Tx multi segs capability
net/i40e: fix missing Tx multi segs capability
net/ixgbe: fix missing Tx multi segs capability

 drivers/net/e1000/em_rxtx.c              | 1 +
 drivers/net/fm10k/fm10k_ethdev.c         | 1 +
 drivers/net/i40e/i40e_vf_representor.c   | 1 +
 drivers/net/ixgbe/ixgbe_vf_representor.c | 2 +-
 4 files changed, 4 insertions(+), 1 deletion(-)
Signature · 1 line
2.11.0
#1 lore raw

PATCH 1/4 net/e1000: fix missing Tx multi segs capability

In former API, ETH_TXQ_FLAGS_NOMULTSEGS was merely a hint indicating that application will never send multisegmented packets, allowing pmd to choose different tx methods accordingly.
In new API, DEV_TX_OFFLOAD_MULTI_SEGS became an offload capability that is advertised by pmds, some of them do not advertise it and expect to never receive fragmented packets (octeontx, axgbe) So an ethdev that supports multisegmented packets should properly advertise it.

Fixes e5c05e6590ea ("net/e1000: convert to new Tx offloads API")
---
 drivers/net/e1000/em_rxtx.c | 1 +
 1 file changed, 1 insertion(+)
drivers/net/e1000/em_rxtx.c +1 -0
index 1103a1839058..087e68304cc8 100644
@@ -1160,6 +1160,7 @@ em_get_tx_port_offloads_capa(struct rte_eth_dev *dev)
 
 	RTE_SET_USED(dev);
 	tx_offload_capa =
+		DEV_TX_OFFLOAD_MULTI_SEGS  |
 		DEV_TX_OFFLOAD_VLAN_INSERT |
 		DEV_TX_OFFLOAD_IPV4_CKSUM  |
 		DEV_TX_OFFLOAD_UDP_CKSUM   |
Signature · 1 line
2.11.0
#2 lore raw

PATCH 2/4 net/fm10k: fix missing Tx multi segs capability

In reply to Didier Pallard

In former API, ETH_TXQ_FLAGS_NOMULTSEGS was merely a hint indicating that application will never send multisegmented packets, allowing pmd to choose different tx methods accordingly.
In new API, DEV_TX_OFFLOAD_MULTI_SEGS became an offload capability that is advertised by pmds, some of them do not advertise it and expect to never receive fragmented packets (octeontx, axgbe) So an ethdev that supports multisegmented packets should properly advertise it.

Problem was spotted and tested on e1000, should be also present in fm10k.

Fixes 30f3ce999e6a ("net/fm10k: convert to new Tx offloads API")
---
 drivers/net/fm10k/fm10k_ethdev.c | 1 +
 1 file changed, 1 insertion(+)
drivers/net/fm10k/fm10k_ethdev.c +1 -0
index 3359df3c8b9c..7cf5b0314c75 100644
@@ -1975,6 +1975,7 @@ static uint64_t fm10k_get_tx_port_offloads_capa(struct rte_eth_dev *dev)
 	RTE_SET_USED(dev);
 
 	return (uint64_t)(DEV_TX_OFFLOAD_VLAN_INSERT |
+			  DEV_TX_OFFLOAD_MULTI_SEGS  |
 			  DEV_TX_OFFLOAD_IPV4_CKSUM  |
 			  DEV_TX_OFFLOAD_UDP_CKSUM   |
 			  DEV_TX_OFFLOAD_TCP_CKSUM   |
Signature · 1 line
2.11.0
#3 lore raw

PATCH 3/4 net/i40e: fix missing Tx multi segs capability

In reply to Didier Pallard

In former API, ETH_TXQ_FLAGS_NOMULTSEGS was merely a hint indicating that application will never send multisegmented packets, allowing pmd to choose different tx methods accordingly.
In new API, DEV_TX_OFFLOAD_MULTI_SEGS became an offload capability that is advertised by pmds, some of them do not advertise it and expect to never receive fragmented packets (octeontx, axgbe) So an ethdev that supports multisegmented packets should properly advertise it.

Problem was spotted and tested on e1000, should be also present in i40e_vf representor.

Fixes e0cb96204b71 ("net/i40e: add support for representor ports")
---
 drivers/net/i40e/i40e_vf_representor.c | 1 +
 1 file changed, 1 insertion(+)
drivers/net/i40e/i40e_vf_representor.c +1 -0
index f9f131611016..0bfbb4f6011f 100644
@@ -48,6 +48,7 @@ i40e_vf_representor_dev_infos_get(struct rte_eth_dev *ethdev,
 		DEV_RX_OFFLOAD_UDP_CKSUM |
 		DEV_RX_OFFLOAD_TCP_CKSUM;
 	dev_info->tx_offload_capa =
+		DEV_TX_OFFLOAD_MULTI_SEGS  |
 		DEV_TX_OFFLOAD_VLAN_INSERT |
 		DEV_TX_OFFLOAD_QINQ_INSERT |
 		DEV_TX_OFFLOAD_IPV4_CKSUM |
Signature · 1 line
2.11.0
#4 lore raw

PATCH 4/4 net/ixgbe: fix missing Tx multi segs capability

In reply to Didier Pallard

In former API, ETH_TXQ_FLAGS_NOMULTSEGS was merely a hint indicating that application will never send multisegmented packets, allowing pmd to choose different tx methods accordingly.
In new API, DEV_TX_OFFLOAD_MULTI_SEGS became an offload capability that is advertised by pmds, some of them do not advertise it and expect to never receive fragmented packets (octeontx, axgbe) So an ethdev that supports multisegmented packets should properly advertise it.

Problem was spotted and tested on e1000, should be also present in ixgbe_vf representor.

Fixes cf80ba6e2038 ("net/ixgbe: add support for representor ports")
---
 drivers/net/ixgbe/ixgbe_vf_representor.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ixgbe/ixgbe_vf_representor.c +1 -1
index db516d9910b8..b0fbbc49f6ed 100644
@@ -65,7 +65,7 @@ ixgbe_vf_representor_dev_infos_get(struct rte_eth_dev *ethdev,
 	dev_info->tx_offload_capa = DEV_TX_OFFLOAD_VLAN_INSERT |
 		DEV_TX_OFFLOAD_IPV4_CKSUM | DEV_TX_OFFLOAD_UDP_CKSUM |
 		DEV_TX_OFFLOAD_TCP_CKSUM | DEV_TX_OFFLOAD_SCTP_CKSUM |
-		DEV_TX_OFFLOAD_TCP_TSO;
+		DEV_TX_OFFLOAD_TCP_TSO | DEV_TX_OFFLOAD_MULTI_SEGS;
 	/**< Device TX offload capabilities. */
 
 	dev_info->speed_capa =
Signature · 1 line
2.11.0
Acked-by on the v1 series
#5 lore raw
In reply to Didier Pallard
Quoted 23 lines

-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Didier Pallard
Sent: Wednesday, September 19, 2018 4:04 PM
To: [email protected]
Subject: [dpdk-dev] [PATCH 0/4] fix missing Tx multi segs capabilities

In former API, ETH_TXQ_FLAGS_NOMULTSEGS was merely a hint indicating that application will never send multisegmented packets, allowing pmd to choose different tx methods accordingly.
In new API, DEV_TX_OFFLOAD_MULTI_SEGS became an offload capability that is advertised by pmds, some of them do not advertise it and expect to never receive fragmented packets (octeontx, axgbe) So an ethdev that supports multisegmented packets should properly advertise it.

Didier Pallard (4):
net/e1000: fix missing Tx multi segs capability
net/fm10k: fix missing Tx multi segs capability
net/i40e: fix missing Tx multi segs capability
net/ixgbe: fix missing Tx multi segs capability

Quoted 7 lines
 drivers/net/e1000/em_rxtx.c              | 1 +
 drivers/net/fm10k/fm10k_ethdev.c         | 1 +
 drivers/net/i40e/i40e_vf_representor.c   | 1 +
 drivers/net/ixgbe/ixgbe_vf_representor.c | 2 +-
 4 files changed, 4 insertions(+), 1 deletion(-)

--

Quoted 1 line

2.11.0

Applied
#6 lore raw
Quoted 37 lines

-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Ananyev, Konstantin
Sent: Thursday, September 20, 2018 7:30 AM
To: Didier Pallard <[email protected]>; [email protected]
Subject: Re: [dpdk-dev] [PATCH 0/4] fix missing Tx multi segs capabilities

Quoted 27 lines

-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Didier Pallard
Sent: Wednesday, September 19, 2018 4:04 PM
To: [email protected]
Subject: [dpdk-dev] [PATCH 0/4] fix missing Tx multi segs capabilities

In former API, ETH_TXQ_FLAGS_NOMULTSEGS was merely a hint indicating that application will never send multisegmented packets, allowing pmd to choose different tx methods accordingly.
In new API, DEV_TX_OFFLOAD_MULTI_SEGS became an offload capability that is advertised by pmds, some of them do not advertise it and expect to never receive fragmented packets (octeontx, axgbe) So an ethdev that supports multisegmented packets should properly advertise it.

Didier Pallard (4):
net/e1000: fix missing Tx multi segs capability
net/fm10k: fix missing Tx multi segs capability
net/i40e: fix missing Tx multi segs capability
net/ixgbe: fix missing Tx multi segs capability

 drivers/net/e1000/em_rxtx.c              | 1 +
 drivers/net/fm10k/fm10k_ethdev.c         | 1 +
 drivers/net/i40e/i40e_vf_representor.c   | 1 +
 drivers/net/ixgbe/ixgbe_vf_representor.c | 2 +-
 4 files changed, 4 insertions(+), 1 deletion(-)
Quoted 3 lines
Quoted 1 line

--

Applied to dpdk-next-net-intel.

Thanks
Qi

Quoted 2 lines
Quoted 2 lines

2.11.0