From: Martin Weiser <martin.weiser@allegro-packets.com>
To: "Van Haaren, Harry" <harry.van.haaren@intel.com>,
"rahul.lakkireddy@chelsio.com" <rahul.lakkireddy@chelsio.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH v2] cxgbe: report 100G link speed capability for Chelsio T6 adapters
Date: Thu, 22 Jun 2017 11:59:15 +0200 [thread overview]
Message-ID: <08f7632b-e6d5-35ad-9a8c-fc17160890d3@allegro-packets.com> (raw)
In-Reply-To: <E923DB57A917B54B9182A2E928D00FA640C30BE7@IRSMSX102.ger.corp.intel.com>
>> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Martin Weiser
>> Sent: Thursday, June 22, 2017 9:58 AM
>> To: rahul.lakkireddy@chelsio.com
>> Cc: dev@dpdk.org; Martin Weiser <martin.weiser@allegro-packets.com>
>> Subject: [dpdk-dev] [PATCH v2] cxgbe: report 100G link speed capability for Chelsio T6
>> adapters
>>
>> These adapters support 100G link speed but the speed_capa bitmask in the
>> device info did not reflect that.
>>
>> Signed-off-by: Martin Weiser <martin.weiser@allegro-packets.com>
>> ---
>> drivers/net/cxgbe/cxgbe_ethdev.c | 6 +++++-
>> 1 file changed, 5 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/net/cxgbe/cxgbe_ethdev.c b/drivers/net/cxgbe/cxgbe_ethdev.c
>> index b622d25..b0d5ed7 100644
>> --- a/drivers/net/cxgbe/cxgbe_ethdev.c
>> +++ b/drivers/net/cxgbe/cxgbe_ethdev.c
>> @@ -175,7 +175,11 @@ static void cxgbe_dev_info_get(struct rte_eth_dev *eth_dev,
>>
>> device_info->rx_desc_lim = cxgbe_desc_lim;
>> device_info->tx_desc_lim = cxgbe_desc_lim;
>> - device_info->speed_capa = ETH_LINK_SPEED_10G | ETH_LINK_SPEED_40G;
>> + if (CHELSIO_CHIP_VERSION(adapter->params.chip) == CHELSIO_T6)
>> + device_info->speed_capa = ETH_LINK_SPEED_10G | ETH_LINK_SPEED_40G |
>> + ETH_LINK_SPEED_100G;
>> + else
>> + device_info->speed_capa = ETH_LINK_SPEED_10G | ETH_LINK_SPEED_40G;
>> }
>
> I think the following code is simpler and shows intent clearer?
> No objection to the patch above from me, just a suggestion :)
>
>
> device_info->speed_capa = ETH_LINK_SPEED_10G | ETH_LINK_SPEED_40G;
>
> if (CHELSIO_CHIP_VERSION(adapter->params.chip) == CHELSIO_T6)
> device_info->speed_capa |= ETH_LINK_SPEED_100G;
Yes, that looks better :). I will send a v3.
prev parent reply other threads:[~2017-06-22 9:59 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-22 8:57 Martin Weiser
2017-06-22 9:35 ` Van Haaren, Harry
2017-06-22 9:59 ` Martin Weiser [this message]
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=08f7632b-e6d5-35ad-9a8c-fc17160890d3@allegro-packets.com \
--to=martin.weiser@allegro-packets.com \
--cc=dev@dpdk.org \
--cc=harry.van.haaren@intel.com \
--cc=rahul.lakkireddy@chelsio.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).