From: "Nélio Laranjeiro" <nelio.laranjeiro@6wind.com>
To: Shahaf Shuler <shahafs@mellanox.com>
Cc: adrien.mazarguil@6wind.com, dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH 2/2] net/mlx5: add hardware TSO support for VXLAN and GRE
Date: Wed, 1 Mar 2017 15:51:24 +0100 [thread overview]
Message-ID: <20170301145124.GY22756@autoinstall.dev.6wind.com> (raw)
In-Reply-To: <1488297228-45713-3-git-send-email-shahafs@mellanox.com>
On Tue, Feb 28, 2017 at 05:53:48PM +0200, Shahaf Shuler wrote:
> This commit adds support for hardware TSO for tunneled packets.
>
> Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
> ---
> drivers/net/mlx5/mlx5_ethdev.c | 4 +++-
> drivers/net/mlx5/mlx5_rxtx.c | 9 +++++++++
> 2 files changed, 12 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/mlx5/mlx5_ethdev.c b/drivers/net/mlx5/mlx5_ethdev.c
> index 3edfd49..4de3595 100644
> --- a/drivers/net/mlx5/mlx5_ethdev.c
> +++ b/drivers/net/mlx5/mlx5_ethdev.c
> @@ -696,7 +696,9 @@ struct priv *
> if (priv->tso)
> info->tx_offload_capa |= DEV_TX_OFFLOAD_TCP_TSO;
> if (priv->tunnel_en)
> - info->tx_offload_capa |= DEV_TX_OFFLOAD_OUTER_IPV4_CKSUM;
> + info->tx_offload_capa |= (DEV_TX_OFFLOAD_OUTER_IPV4_CKSUM |
> + DEV_TX_OFFLOAD_VXLAN_TNL_TSO |
> + DEV_TX_OFFLOAD_GRE_TNL_TSO);
> if (priv_get_ifname(priv, &ifname) == 0)
> info->if_index = if_nametoindex(ifname);
> /* FIXME: RETA update/query API expects the callee to know the size of
> diff --git a/drivers/net/mlx5/mlx5_rxtx.c b/drivers/net/mlx5/mlx5_rxtx.c
> index 145daa0..98e7205 100644
> --- a/drivers/net/mlx5/mlx5_rxtx.c
> +++ b/drivers/net/mlx5/mlx5_rxtx.c
> @@ -488,9 +488,18 @@
> (1 << txq->wqe_n) *
> MLX5_WQE_SIZE);
> unsigned int copy_b;
> + const uint64_t is_tunneled =
> + buf->ol_flags &
> + (PKT_TX_TUNNEL_GRE |
> + PKT_TX_TUNNEL_VXLAN);
>
> tso_header_sz = buf->l2_len + buf->l3_len +
> buf->l4_len;
> +
> + if (is_tunneled && txq->tunnel_en) {
> + tso_header_sz += buf->outer_l2_len +
> + buf->outer_l3_len;
> + }
> if (unlikely(tso_header_sz >
> MLX5_MAX_TSO_HEADER))
> break;
> --
> 1.8.3.1
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
--
Nélio Laranjeiro
6WIND
next prev parent reply other threads:[~2017-03-01 14:51 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-28 15:53 [dpdk-dev] [PATCH 0/2] net/mlx5: add Tx offloads for tunneled packets Shahaf Shuler
2017-02-28 15:53 ` [dpdk-dev] [PATCH 1/2] net/mlx5: add hardware checksum offload for tunnel packets Shahaf Shuler
2017-03-01 14:47 ` Nélio Laranjeiro
2017-02-28 15:53 ` [dpdk-dev] [PATCH 2/2] net/mlx5: add hardware TSO support for VXLAN and GRE Shahaf Shuler
2017-03-01 14:51 ` Nélio Laranjeiro [this message]
2017-03-01 9:23 ` [dpdk-dev] [PATCH 0/2] net/mlx5: add Tx offloads for tunneled packets Shahaf Shuler
2017-03-01 11:26 ` Shahaf Shuler
2017-03-02 9:05 ` [dpdk-dev] [PATCH v2 1/2] net/mlx5: add hardware checksum offload for tunnel packets Shahaf Shuler
2017-03-02 9:05 ` [dpdk-dev] [PATCH v2 2/2] net/mlx5: add hardware TSO support for VXLAN and GRE Shahaf Shuler
2017-03-02 9:17 ` [dpdk-dev] [PATCH v2 1/2] net/mlx5: add hardware checksum offload for tunnel packets Nélio Laranjeiro
2017-03-06 9:35 ` Ferruh Yigit
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=20170301145124.GY22756@autoinstall.dev.6wind.com \
--to=nelio.laranjeiro@6wind.com \
--cc=adrien.mazarguil@6wind.com \
--cc=dev@dpdk.org \
--cc=shahafs@mellanox.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).