From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <ferruh.yigit@intel.com>
Received: from mga05.intel.com (mga05.intel.com [192.55.52.43])
 by dpdk.org (Postfix) with ESMTP id 12171376C
 for <dev@dpdk.org>; Mon, 17 Jul 2017 18:22:21 +0200 (CEST)
Received: from orsmga005.jf.intel.com ([10.7.209.41])
 by fmsmga105.fm.intel.com with ESMTP; 17 Jul 2017 09:22:20 -0700
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="5.40,375,1496127600"; d="scan'208";a="126094415"
Received: from fyigit-mobl1.ger.corp.intel.com (HELO [10.249.74.32])
 ([10.249.74.32])
 by orsmga005.jf.intel.com with ESMTP; 17 Jul 2017 09:22:18 -0700
To: Gaetan Rivet <gaetan.rivet@6wind.com>, dev@dpdk.org
References: <cover.1500130634.git.gaetan.rivet@6wind.com>
 <b822c60f9c1f2d1e4a7538b9b5a77a7a259aa514.1500130635.git.gaetan.rivet@6wind.com>
From: Ferruh Yigit <ferruh.yigit@intel.com>
Message-ID: <5d9f75d9-a7a6-1035-fb05-a87f1b071e0a@intel.com>
Date: Mon, 17 Jul 2017 17:22:15 +0100
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101
 Thunderbird/52.2.1
MIME-Version: 1.0
In-Reply-To: <b822c60f9c1f2d1e4a7538b9b5a77a7a259aa514.1500130635.git.gaetan.rivet@6wind.com>
Content-Type: text/plain; charset=utf-8
Content-Language: en-US
Content-Transfer-Encoding: 8bit
Subject: Re: [dpdk-dev] [PATCH v10 07/11] net/failsafe: support offload
 capabilities
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <http://dpdk.org/ml/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://dpdk.org/ml/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <http://dpdk.org/ml/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
X-List-Received-Date: Mon, 17 Jul 2017 16:22:22 -0000

On 7/15/2017 6:57 PM, Gaetan Rivet wrote:
> Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
> Acked-by: Olga Shern <olgas@mellanox.com>
> ---
>  doc/guides/nics/features/failsafe.ini |   6 ++
>  drivers/net/failsafe/failsafe_ops.c   | 131 +++++++++++++++++++++++++++++++++-
>  2 files changed, 135 insertions(+), 2 deletions(-)
> 
> diff --git a/doc/guides/nics/features/failsafe.ini b/doc/guides/nics/features/failsafe.ini
> index 9167b59..257f579 100644
> --- a/doc/guides/nics/features/failsafe.ini
> +++ b/doc/guides/nics/features/failsafe.ini
> @@ -14,6 +14,12 @@ Unicast MAC filter   = Y
>  Multicast MAC filter = Y
>  VLAN filter          = Y
>  Flow API             = Y
> +VLAN offload         = Y
> +QinQ offload         = Y
> +L3 checksum offload  = Y
> +L4 checksum offload  = Y
> +Inner L3 checksum    = Y
> +Inner L4 checksum    = Y

As previous comment on features, these are advertised as supported but
depends on sub-devices.

Overall I don't know what does these mean for failsafe like abstract device.

>  Packet type parsing  = Y
>  Basic stats          = Y
>  Stats per queue      = Y
> diff --git a/drivers/net/failsafe/failsafe_ops.c b/drivers/net/failsafe/failsafe_ops.c
> index 0c8aa35..654b411 100644
> --- a/drivers/net/failsafe/failsafe_ops.c
> +++ b/drivers/net/failsafe/failsafe_ops.c
> @@ -64,22 +64,149 @@ static struct rte_eth_dev_info default_infos = {
>  		.nb_seg_max = UINT16_MAX,
>  		.nb_mtu_seg_max = UINT16_MAX,
>  	},
> -	/* Set of understood capabilities */
> -	.rx_offload_capa = 0x0,
> +	/*
> +	 * Set of capabilities that can be verified upon
> +	 * configuring a sub-device.
> +	 */
> +	.rx_offload_capa =
> +		DEV_RX_OFFLOAD_VLAN_STRIP |
> +		DEV_RX_OFFLOAD_QINQ_STRIP |
> +		DEV_RX_OFFLOAD_IPV4_CKSUM |
> +		DEV_RX_OFFLOAD_UDP_CKSUM |
> +		DEV_RX_OFFLOAD_TCP_CKSUM |
> +		DEV_RX_OFFLOAD_TCP_LRO,

These are not dynamic, even though some may be disabled via
fs_port_disable_offload() same these values will be returned to the
application, which is wrong.

>  	.tx_offload_capa = 0x0,

Claiming support for most of the offloads means supporting it both for
Rx and Tx path. This patch only takes account the Rx ones.

>  	.flow_type_rss_offloads = 0x0,
>  };
> 

<...>