[dpdk-dev,v1] net/tap: fix report on multi segments capability

Message ID 1517828348-488-1-git-send-email-ophirmu@mellanox.com (mailing list archive)
State Accepted, archived
Delegated to: Ferruh Yigit
Headers

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Ophir Munk Feb. 5, 2018, 10:59 a.m. UTC
  TAP device is supporting multi segments Tx, however this capability is
not reported when querying the TAP device.
This commit adds this capability report.

Fixes: 818fe14a9891 ("net/tap: use new Tx offloads API")
Cc: stable@dpdk.org

Signed-off-by: Ophir Munk <ophirmu@mellanox.com>
---
 drivers/net/tap/rte_eth_tap.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
  

Comments

Pascal Mazon Feb. 5, 2018, 2:53 p.m. UTC | #1
Acked-by: Pascal Mazon <pascal.mazon@6wind.com>

On 05/02/2018 11:59, Ophir Munk wrote:
> TAP device is supporting multi segments Tx, however this capability is
> not reported when querying the TAP device.
> This commit adds this capability report.
>
> Fixes: 818fe14a9891 ("net/tap: use new Tx offloads API")
> Cc: stable@dpdk.org
>
> Signed-off-by: Ophir Munk <ophirmu@mellanox.com>
> ---
>  drivers/net/tap/rte_eth_tap.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c
> index dc3847e..ac43db4 100644
> --- a/drivers/net/tap/rte_eth_tap.c
> +++ b/drivers/net/tap/rte_eth_tap.c
> @@ -390,7 +390,8 @@ tap_tx_offload_get_port_capa(void)
>  	 * In order to support legacy apps,
>  	 * report capabilities also as port capabilities.
>  	 */
> -	return DEV_TX_OFFLOAD_IPV4_CKSUM |
> +	return DEV_TX_OFFLOAD_MULTI_SEGS |
> +	       DEV_TX_OFFLOAD_IPV4_CKSUM |
>  	       DEV_TX_OFFLOAD_UDP_CKSUM |
>  	       DEV_TX_OFFLOAD_TCP_CKSUM;
>  }
> @@ -398,7 +399,8 @@ tap_tx_offload_get_port_capa(void)
>  static uint64_t
>  tap_tx_offload_get_queue_capa(void)
>  {
> -	return DEV_TX_OFFLOAD_IPV4_CKSUM |
> +	return DEV_TX_OFFLOAD_MULTI_SEGS |
> +	       DEV_TX_OFFLOAD_IPV4_CKSUM |
>  	       DEV_TX_OFFLOAD_UDP_CKSUM |
>  	       DEV_TX_OFFLOAD_TCP_CKSUM;
>  }
  
Ferruh Yigit Feb. 5, 2018, 6:02 p.m. UTC | #2
On 2/5/2018 2:53 PM, Pascal Mazon wrote:

> 
> On 05/02/2018 11:59, Ophir Munk wrote:
>> TAP device is supporting multi segments Tx, however this capability is
>> not reported when querying the TAP device.
>> This commit adds this capability report.
>>
>> Fixes: 818fe14a9891 ("net/tap: use new Tx offloads API")
>> Cc: stable@dpdk.org
>>
>> Signed-off-by: Ophir Munk <ophirmu@mellanox.com>

> Acked-by: Pascal Mazon <pascal.mazon@6wind.com>

Applied to dpdk-next-net/master, thanks.
  

Patch

diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c
index dc3847e..ac43db4 100644
--- a/drivers/net/tap/rte_eth_tap.c
+++ b/drivers/net/tap/rte_eth_tap.c
@@ -390,7 +390,8 @@  tap_tx_offload_get_port_capa(void)
 	 * In order to support legacy apps,
 	 * report capabilities also as port capabilities.
 	 */
-	return DEV_TX_OFFLOAD_IPV4_CKSUM |
+	return DEV_TX_OFFLOAD_MULTI_SEGS |
+	       DEV_TX_OFFLOAD_IPV4_CKSUM |
 	       DEV_TX_OFFLOAD_UDP_CKSUM |
 	       DEV_TX_OFFLOAD_TCP_CKSUM;
 }
@@ -398,7 +399,8 @@  tap_tx_offload_get_port_capa(void)
 static uint64_t
 tap_tx_offload_get_queue_capa(void)
 {
-	return DEV_TX_OFFLOAD_IPV4_CKSUM |
+	return DEV_TX_OFFLOAD_MULTI_SEGS |
+	       DEV_TX_OFFLOAD_IPV4_CKSUM |
 	       DEV_TX_OFFLOAD_UDP_CKSUM |
 	       DEV_TX_OFFLOAD_TCP_CKSUM;
 }