DPDK patches and discussions
 help / color / mirror / Atom feed
From: Pavan Nikhilesh Bhagavatula <pbhagavatula@marvell.com>
To: Andrew Rybchenko <arybchenko@solarflare.com>,
	"ferruh.yigit@intel.com" <ferruh.yigit@intel.com>,
	Jerin Jacob Kollanukkaran <jerinj@marvell.com>,
	Ajit Khaparde <ajit.khaparde@broadcom.com>,
	Somnath Kotur <somnath.kotur@broadcom.com>,
	Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>,
	Hemant Agrawal <hemant.agrawal@nxp.com>,
	Sachin Saxena <sachin.saxena@nxp.com>,
	Wenzhuo Lu <wenzhuo.lu@intel.com>,
	John Daley <johndale@cisco.com>,
	Hyong Youb Kim <hyonkim@cisco.com>,
	Qi Zhang <qi.z.zhang@intel.com>,
	Xiao Wang <xiao.w.wang@intel.com>,
	Ziyang Xuan <xuanziyang2@huawei.com>,
	Xiaoyun Wang <cloud.wangxiaoyun@huawei.com>,
	Guoyang Zhou <zhouguoyang@huawei.com>,
	Beilei Xing <beilei.xing@intel.com>,
	Jingjing Wu <jingjing.wu@intel.com>,
	Qiming Yang <qiming.yang@intel.com>,
	Konstantin Ananyev <konstantin.ananyev@intel.com>,
	Shijith Thotton <sthotton@marvell.com>,
	Srisivasubramanian Srinivasan <srinivasan@marvell.com>,
	Matan Azrad <matan@mellanox.com>,
	Shahaf Shuler <shahafs@mellanox.com>,
	Viacheslav Ovsiienko <viacheslavo@mellanox.com>,
	Stephen Hemminger <sthemmin@microsoft.com>,
	"K. Y. Srinivasan" <kys@microsoft.com>,
	Haiyang Zhang <haiyangz@microsoft.com>,
	Alejandro Lucero <alejandro.lucero@netronome.com>,
	Nithin Kumar Dabilpuram <ndabilpuram@marvell.com>,
	Kiran Kumar Kokkilagadda <kirankumark@marvell.com>,
	Rasesh Mody <rmody@marvell.com>,
	Shahed Shaikh <shshaikh@marvell.com>,
	Maciej Czekaj <mczekaj@marvell.com>,
	Yong Wang <yongwang@vmware.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH v13 3/6] drivers/net: update Rx RSS hash offload capabilities
Date: Fri, 25 Oct 2019 16:10:33 +0000	[thread overview]
Message-ID: <CY4PR1801MB186349FD2CB6B2BD1901A56CDE650@CY4PR1801MB1863.namprd18.prod.outlook.com> (raw)

>On 10/25/19 5:33 PM, pbhagavatula@marvell.com wrote:
>> From: Pavan Nikhilesh <pbhagavatula@marvell.com>
>>
>> Add DEV_RX_OFFLOAD_RSS_HASH flag for all PMDs that support RSS
>hash
>> delivery.
>>
>> Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
>> Reviewed-by: Andrew Rybchenko <arybchenko@solarflare.com>
>> Reviewed-by: Hemant Agrawal <hemant.agrawal@nxp.com>
>> Acked-by: Jerin Jacob <jerinj@marvell.com>
>> Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
>
>[snip]
>
>> diff --git a/drivers/net/bnxt/bnxt_ethdev.c
>b/drivers/net/bnxt/bnxt_ethdev.c
>> index e7ec99e15..d4f8cc92a 100644
>> --- a/drivers/net/bnxt/bnxt_ethdev.c
>> +++ b/drivers/net/bnxt/bnxt_ethdev.c
>> @@ -117,7 +117,8 @@ static const struct rte_pci_id
>bnxt_pci_id_map[] = {
>>   				     DEV_RX_OFFLOAD_KEEP_CRC | \
>>   				     DEV_RX_OFFLOAD_VLAN_EXTEND |
>\
>>   				     DEV_RX_OFFLOAD_TCP_LRO | \
>> -				     DEV_RX_OFFLOAD_SCATTER)
>> +				     DEV_RX_OFFLOAD_SCATTER | \
>> +				     DEV_RX_OFFLOAD_RSS_HASH)
>>
>>   static int bnxt_vlan_offload_set_op(struct rte_eth_dev *dev, int
>mask);
>>   static void bnxt_print_link_info(struct rte_eth_dev *eth_dev);
>> @@ -681,6 +682,12 @@ static int bnxt_dev_configure_op(struct
>rte_eth_dev *eth_dev)
>>   	bp->rx_cp_nr_rings = bp->rx_nr_rings;
>>   	bp->tx_cp_nr_rings = bp->tx_nr_rings;
>>
>> +	if (!(rx_offloads & DEV_RX_OFFLOAD_RSS_HASH)) {
>> +		PMD_DRV_LOG(INFO, "RX_OFFLOAD_RSS_HASH
>cannot be disabled\n");
>
>Shouldn't logging be done from rte_eth_dev_configure()?
>I.e. a generic function which is called after dev_configure callback and
>take a look at dev_conf->rx_mode.offloads and
>dev->data->dev_conf.rxmode.offloads and for each bit which differs
>log message using rte_eth_dev_rx_offload_name().
>Same for Tx while we are on the page. I.e. two more patch just before
>this one.
>

Just to be clear this log would effect all offloads which can't be disabled for
a give PMD.

>> +		rx_offloads |= DEV_RX_OFFLOAD_RSS_HASH;
>> +		eth_dev->data->dev_conf.rxmode.offloads =
>rx_offloads;
>> +	}
>> +
>>   	if (rx_offloads & DEV_RX_OFFLOAD_JUMBO_FRAME) {
>>   		eth_dev->data->mtu =
>>   			eth_dev->data-
>>dev_conf.rxmode.max_rx_pkt_len -
>
>[snip]
>
>> diff --git a/drivers/net/sfc/sfc_ef10_essb_rx.c
>b/drivers/net/sfc/sfc_ef10_essb_rx.c
>> index 63da807ea..220ef0e47 100644
>> --- a/drivers/net/sfc/sfc_ef10_essb_rx.c
>> +++ b/drivers/net/sfc/sfc_ef10_essb_rx.c
>> @@ -716,7 +716,7 @@ struct sfc_dp_rx sfc_ef10_essb_rx = {
>>   	.features		= SFC_DP_RX_FEAT_FLOW_FLAG |
>>   				  SFC_DP_RX_FEAT_FLOW_MARK,
>>   	.dev_offload_capa	= DEV_RX_OFFLOAD_CHECKSUM,
>> -	.queue_offload_capa	= 0,
>> +	.queue_offload_capa	= DEV_RX_OFFLOAD_RSS_HASH,
>
>Please, move it dev_offload_capa to be sure that it cannot
>be requested on queue level and no checks are required
>on queue level that the offload cannot be disabled.
>We'll move to queue level when/if it is really supported on queue level.
>

Sure will fix all sfc related comments in v14.

>>   	.get_dev_info		= sfc_ef10_essb_rx_get_dev_info,
>>   	.pool_ops_supported	=
>sfc_ef10_essb_rx_pool_ops_supported,
>>   	.qsize_up_rings		=
>sfc_ef10_essb_rx_qsize_up_rings,
>> diff --git a/drivers/net/sfc/sfc_ef10_rx.c
>b/drivers/net/sfc/sfc_ef10_rx.c
>> index f2fc6e70a..85b5df466 100644
>> --- a/drivers/net/sfc/sfc_ef10_rx.c
>> +++ b/drivers/net/sfc/sfc_ef10_rx.c
>> @@ -797,7 +797,8 @@ struct sfc_dp_rx sfc_ef10_rx = {
>>   				  SFC_DP_RX_FEAT_INTR,
>>   	.dev_offload_capa	= DEV_RX_OFFLOAD_CHECKSUM |
>>
>DEV_RX_OFFLOAD_OUTER_IPV4_CKSUM,
>> -	.queue_offload_capa	= DEV_RX_OFFLOAD_SCATTER,
>> +	.queue_offload_capa	= DEV_RX_OFFLOAD_SCATTER |
>> +				  DEV_RX_OFFLOAD_RSS_HASH,
>
>Same here
>
>>   	.get_dev_info		= sfc_ef10_rx_get_dev_info,
>>   	.qsize_up_rings		= sfc_ef10_rx_qsize_up_rings,
>>   	.qcreate		= sfc_ef10_rx_qcreate,
>> diff --git a/drivers/net/sfc/sfc_ethdev.c
>b/drivers/net/sfc/sfc_ethdev.c
>> index 454b8956a..403711ca0 100644
>> --- a/drivers/net/sfc/sfc_ethdev.c
>> +++ b/drivers/net/sfc/sfc_ethdev.c
>> @@ -206,6 +206,11 @@ sfc_dev_configure(struct rte_eth_dev *dev)
>>   	sfc_log_init(sa, "entry n_rxq=%u n_txq=%u",
>>   		     dev_data->nb_rx_queues, dev_data-
>>nb_tx_queues);
>>
>> +	if (!(dev_data->dev_conf.rxmode.offloads &
>DEV_RX_OFFLOAD_RSS_HASH)) {
>> +		sfc_info(sa, "RX_OFFLOAD_RSS_HASH cannot be
>disabled");
>> +		dev_data->dev_conf.rxmode.offloads |=
>DEV_RX_OFFLOAD_RSS_HASH;
>> +	}
>> +
>
>It should be in drivers/net/sfc/sfc_rx.c sfc_rx_check_mode() close to
>the
>end of the function and similar to DEV_RX_OFFLOAD_CHECKSUM.
>
>>   	sfc_adapter_lock(sa);
>>   	switch (sa->state) {
>>   	case SFC_ADAPTER_CONFIGURED:
>> diff --git a/drivers/net/sfc/sfc_rx.c b/drivers/net/sfc/sfc_rx.c
>> index e6809bb64..695580b22 100644
>> --- a/drivers/net/sfc/sfc_rx.c
>> +++ b/drivers/net/sfc/sfc_rx.c
>> @@ -618,7 +618,8 @@ struct sfc_dp_rx sfc_efx_rx = {
>>   	},
>>   	.features		= SFC_DP_RX_FEAT_INTR,
>>   	.dev_offload_capa	= DEV_RX_OFFLOAD_CHECKSUM,
>> -	.queue_offload_capa	= DEV_RX_OFFLOAD_SCATTER,
>> +	.queue_offload_capa	= DEV_RX_OFFLOAD_SCATTER |
>> +				  DEV_RX_OFFLOAD_RSS_HASH,
>
>Please, move to dev_offload_capa.
>
>>   	.qsize_up_rings		= sfc_efx_rx_qsize_up_rings,
>>   	.qcreate		= sfc_efx_rx_qcreate,
>>   	.qdestroy		= sfc_efx_rx_qdestroy,
>
>[snip]


             reply	other threads:[~2019-10-25 16:10 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-25 16:10 Pavan Nikhilesh Bhagavatula [this message]
2019-10-28 15:50 ` Andrew Rybchenko
  -- strict thread matches above, loose matches on Subject: below --
2019-10-28 15:53 Pavan Nikhilesh Bhagavatula
2019-10-17 12:02 [dpdk-dev] [PATCH v12 0/7] ethdev: add new Rx offload flags pbhagavatula
2019-10-25 14:33 ` [dpdk-dev] [PATCH v13 0/6] " pbhagavatula
2019-10-25 14:33   ` [dpdk-dev] [PATCH v13 3/6] drivers/net: update Rx RSS hash offload capabilities pbhagavatula
2019-10-25 14:56     ` Andrew Rybchenko

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=CY4PR1801MB186349FD2CB6B2BD1901A56CDE650@CY4PR1801MB1863.namprd18.prod.outlook.com \
    --to=pbhagavatula@marvell.com \
    --cc=ajit.khaparde@broadcom.com \
    --cc=alejandro.lucero@netronome.com \
    --cc=arybchenko@solarflare.com \
    --cc=beilei.xing@intel.com \
    --cc=cloud.wangxiaoyun@huawei.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=haiyangz@microsoft.com \
    --cc=hemant.agrawal@nxp.com \
    --cc=hyonkim@cisco.com \
    --cc=jerinj@marvell.com \
    --cc=jingjing.wu@intel.com \
    --cc=johndale@cisco.com \
    --cc=kirankumark@marvell.com \
    --cc=konstantin.ananyev@intel.com \
    --cc=kys@microsoft.com \
    --cc=matan@mellanox.com \
    --cc=mczekaj@marvell.com \
    --cc=ndabilpuram@marvell.com \
    --cc=qi.z.zhang@intel.com \
    --cc=qiming.yang@intel.com \
    --cc=rahul.lakkireddy@chelsio.com \
    --cc=rmody@marvell.com \
    --cc=sachin.saxena@nxp.com \
    --cc=shahafs@mellanox.com \
    --cc=shshaikh@marvell.com \
    --cc=somnath.kotur@broadcom.com \
    --cc=srinivasan@marvell.com \
    --cc=sthemmin@microsoft.com \
    --cc=sthotton@marvell.com \
    --cc=viacheslavo@mellanox.com \
    --cc=wenzhuo.lu@intel.com \
    --cc=xiao.w.wang@intel.com \
    --cc=xuanziyang2@huawei.com \
    --cc=yongwang@vmware.com \
    --cc=zhouguoyang@huawei.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).