DPDK patches and discussions
 help / color / mirror / Atom feed
From: Andrew Rybchenko <arybchenko@solarflare.com>
To: Rasesh Mody <rasesh.mody@cavium.com>, <dev@dpdk.org>
Cc: Harish Patil <harish.patil@cavium.com>, <ferruh.yigit@intel.com>,
	<Dept-EngDPDKDev@cavium.com>
Subject: Re: [dpdk-dev] [PATCH 1/5] net/qede: convert to new Rx/Tx offloads API
Date: Fri, 11 May 2018 12:16:56 +0300	[thread overview]
Message-ID: <729baae1-5b98-d09b-a38b-b18d886cd976@solarflare.com> (raw)
In-Reply-To: <1522196155-30972-1-git-send-email-rasesh.mody@cavium.com>

On 03/28/2018 03:15 AM, Rasesh Mody wrote:
> From: Harish Patil <harish.patil@cavium.com>
>
> Ethdev RX/TX offloads API has changed since:
> commit ce17eddefc20 ("ethdev: introduce Rx queue offloads API")
> commit cba7f53b717d ("ethdev: introduce Tx queue offloads API")
>
> This patch makes use of new offload flags as suggested and fix
> the default RX/TX configuration. Also indent the code properly
> around those changes.
>
> Signed-off-by: Harish Patil <harish.patil@cavium.com>
> Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
> ---
>   drivers/net/qede/qede_ethdev.c |  103 ++++++++++++++++++++++------------------
>   drivers/net/qede/qede_rxtx.c   |    2 +-
>   drivers/net/qede/qede_rxtx.h   |    2 -
>   3 files changed, 59 insertions(+), 48 deletions(-)
>
> diff --git a/drivers/net/qede/qede_ethdev.c b/drivers/net/qede/qede_ethdev.c
> index a91f436..6a51e3d 100644
> --- a/drivers/net/qede/qede_ethdev.c
> +++ b/drivers/net/qede/qede_ethdev.c

[...]

> @@ -1534,26 +1527,46 @@ static int qede_dev_configure(struct rte_eth_dev *eth_dev)
>   	dev_info->reta_size = ECORE_RSS_IND_TABLE_SIZE;
>   	dev_info->hash_key_size = ECORE_RSS_KEY_SIZE * sizeof(uint32_t);
>   	dev_info->flow_type_rss_offloads = (uint64_t)QEDE_RSS_OFFLOAD_ALL;
> -
> -	dev_info->default_txconf = (struct rte_eth_txconf) {
> -		.txq_flags = QEDE_TXQ_FLAGS,
> -	};
> -
> -	dev_info->rx_offload_capa = (DEV_RX_OFFLOAD_VLAN_STRIP	|
> -				     DEV_RX_OFFLOAD_IPV4_CKSUM	|
> +	dev_info->rx_offload_capa = (DEV_RX_OFFLOAD_IPV4_CKSUM	|
>   				     DEV_RX_OFFLOAD_UDP_CKSUM	|
>   				     DEV_RX_OFFLOAD_TCP_CKSUM	|
>   				     DEV_RX_OFFLOAD_OUTER_IPV4_CKSUM |
> -				     DEV_RX_OFFLOAD_TCP_LRO);
> -
> +				     DEV_RX_OFFLOAD_TCP_LRO	|
> +				     DEV_RX_OFFLOAD_CRC_STRIP	|
> +				     DEV_RX_OFFLOAD_SCATTER	|
> +				     DEV_RX_OFFLOAD_JUMBO_FRAME |
> +				     DEV_RX_OFFLOAD_VLAN_FILTER |
> +				     DEV_RX_OFFLOAD_VLAN_STRIP);
> +	dev_info->rx_queue_offload_capa = 0;
> +
> +	/* TX offloads are on a per-packet basis, so it is applicable
> +	 * to both at port and queue levels.
> +	 */
>   	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_OUTER_IPV4_CKSUM |
> -				     DEV_TX_OFFLOAD_TCP_TSO |
> +				     DEV_TX_OFFLOAD_QINQ_INSERT |
> +				     DEV_TX_OFFLOAD_MULTI_SEGS  |
> +				     DEV_TX_OFFLOAD_TCP_TSO	|
>   				     DEV_TX_OFFLOAD_VXLAN_TNL_TSO |
>   				     DEV_TX_OFFLOAD_GENEVE_TNL_TSO);
> +	dev_info->tx_queue_offload_capa = dev_info->tx_offload_capa;
> +
> +	dev_info->default_txconf = (struct rte_eth_txconf) {
> +		.txq_flags = DEV_TX_OFFLOAD_MULTI_SEGS,

It is incorrect to initialize TxQ flags using Tx offload define.

> +	};
> +
> +	dev_info->default_rxconf = (struct rte_eth_rxconf) {
> +		/* Packets are always dropped if no descriptors are available */
> +		.rx_drop_en = 1,
> +		/* The below RX offloads are always enabled */
> +		.offloads = (DEV_RX_OFFLOAD_CRC_STRIP  |
> +			     DEV_RX_OFFLOAD_IPV4_CKSUM |
> +			     DEV_RX_OFFLOAD_TCP_CKSUM  |
> +			     DEV_RX_OFFLOAD_UDP_CKSUM),
> +	};
>   
>   	memset(&link, 0, sizeof(struct qed_link_output));
>   	qdev->ops->common->get_link(edev, &link);

  parent reply	other threads:[~2018-05-11  9:17 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-28  0:15 Rasesh Mody
2018-03-28  0:15 ` [dpdk-dev] [PATCH 2/5] net/qede: enable IPGRE offload support Rasesh Mody
2018-03-28  0:15 ` [dpdk-dev] [PATCH 3/5] net/qede: add devarg to disable NPAR Tx switching Rasesh Mody
2018-03-28  0:15 ` [dpdk-dev] [PATCH 4/5] net/qede: fix device stop to remove primary MAC Rasesh Mody
2018-03-28  0:15 ` [dpdk-dev] [PATCH 5/5] net/qede: fix to prevent overwriting packet type Rasesh Mody
2018-03-30 10:39 ` [dpdk-dev] [PATCH 1/5] net/qede: convert to new Rx/Tx offloads API Ferruh Yigit
2018-05-11  9:16 ` Andrew Rybchenko [this message]
2018-05-14 12:53   ` Ferruh Yigit
2018-05-15 19:47     ` Mody, Rasesh

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=729baae1-5b98-d09b-a38b-b18d886cd976@solarflare.com \
    --to=arybchenko@solarflare.com \
    --cc=Dept-EngDPDKDev@cavium.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=harish.patil@cavium.com \
    --cc=rasesh.mody@cavium.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).