test suite reviews and discussions
 help / color / mirror / Atom feed
From: Radoslaw Biernacki <radoslaw.biernacki@linaro.org>
To: "Verma, Ayuj" <Ayuj.Verma@cavium.com>
Cc: "dts@dpdk.org" <dts@dpdk.org>,
	"Jogarao, Nartu" <Nartu.Jogarao@cavium.com>,
	Herbert Guan <herbert.guan@linaro.org>,
	"Czubak, Angela" <Angela.Czubak@cavium.com>,
	 "Liu, Yong" <yong.liu@intel.com>,
	"Desai, Arvind" <Arvind.Desai@cavium.com>,
	 "Athreya, Narayana Prasad" <NarayanaPrasad.Athreya@cavium.com>
Subject: Re: [dts] [PATCH 1/4] framework/crb: Fixing ThunderX ethernet controler detection
Date: Mon, 4 Dec 2017 14:57:43 +0100	[thread overview]
Message-ID: <CAEK-wK=VP8n+GbNkRMmefNR8efpD4eb_wYnGRLQFBEN4mSzpNA@mail.gmail.com> (raw)
In-Reply-To: <CY4PR07MB2920B4D6EB1565292042CC4CF43C0@CY4PR07MB2920.namprd07.prod.outlook.com>

[-- Attachment #1: Type: text/plain, Size: 3793 bytes --]

Hi,

I didn't noticed previously that this might be connected to my change so
thank for giving the feedback.

I need to spend some time and think about it, but is seems that "wirespeed"
function should be function of a nic or rather a port, not test class.
And I'm surprised that it didn't check the actual speed of a port since
even ThunderX NIC 10G can work either 1G or 10G.

So in general please give me some time I should came up with some more
elegant solution which possibly I can add as V2 of this patch.

On 4 December 2017 at 13:12, Verma, Ayuj <Ayuj.Verma@cavium.com> wrote:

> Hi Biernacki,
>
>
> Thanks for the heads up.
>
> The reason for us to put this check is ThunderX Ethernet controllers 1G,
> 10G and 40G NIC devices have same device-id which make it difficult to
> recognize correct device being tested, which is required in ./framework/
> test_case.py  "wirespeed" to provide bitrate for particular NIC.
>
>
> Initially we added support for 10G only but, we planed to have support for
> our 40G NIC also.
>
>
> More acceptable way to do this might be having a global variable for
> linkspeed and using it further in
> ./framework/test_case.py or elsewhere.
> User can provide linkspeed.
>
> Let us know your thoughts on this.
>
> Thanks and regards
> Ayuj Verma
>
>
>
>
>
> ------------------------------
> *From:* Radoslaw Biernacki <radoslaw.biernacki@linaro.org>
> *Sent:* 04 December 2017 16:14
> *To:* dts@dpdk.org; Verma, Ayuj; Jogarao, Nartu
> *Cc:* Herbert Guan; Radoslaw Biernacki; Czubak, Angela; Liu, Yong
> *Subject:* Re: [PATCH 1/4] framework/crb: Fixing ThunderX ethernet
> controler detection
>
> Ayuj and Jogarao you might also be interested to look at this one.
>
> On 1 December 2017 at 22:20, Radoslaw Biernacki <
> radoslaw.biernacki@linaro.org> wrote:
>
> Asking for link speed for ThunderX Ethernet controller is not reliable
> since driver report error when the link is down. In fact we dont need
> to ask for link speed as Ethernet controllers can be easily identified
> by device name from lspci. The mapping will fuhrer filter out the PF
> and VF interfaces which does not have the interface name assigned.
>
> Fixes: 150716d93f5e ("framework crb: Appending only 10G devices for
> cavium")
>
> Signed-off-by: Radoslaw Biernacki <radoslaw.biernacki@linaro.org>
> ---
>  framework/crb.py | 11 ++---------
>  1 file changed, 2 insertions(+), 9 deletions(-)
>
> diff --git a/framework/crb.py b/framework/crb.py
> index dd29a8b..36b1ffe 100644
> --- a/framework/crb.py
> +++ b/framework/crb.py
> @@ -268,20 +268,13 @@ class Crb(object):
>          Look for the NIC's information (PCI Id and card type).
>          """
>          out = self.send_expect(
> -            "lspci -Dnn | grep -i eth", "# ", alt_session=True)
> +            "lspci -Dnn | grep -i 'Ethernet controller'", "# ",
> alt_session=True)
>          rexp = r"([\da-f]{4}:[\da-f]{2}:[\da-f]{2}.\d{1}) .*Eth.*?ernet
> .*?([\da-f]{4}:[\da-f]{4})"
>          pattern = re.compile(rexp)
>          match = pattern.findall(out)
>          self.pci_devices_info = []
>          for i in range(len(match)):
> -            #check if device is cavium and check its linkspeed, append
> only if it is 10G
> -            if "177d:" in match[i][1]:
> -                linkspeed = "10000"
> -                nic_linkspeed = self.send_command("cat
> /sys/bus/pci/devices/%s/net/*/speed" % match[i][0])
> -                if nic_linkspeed == linkspeed:
> -                    self.pci_devices_info.append((match[i][0],
> match[i][1]))
> -            else:
> -                self.pci_devices_info.append((match[i][0], match[i][1]))
> +            self.pci_devices_info.append((match[i][0], match[i][1]))
>
>      def pci_devices_information_uncached_freebsd(self):
>          """
> --
> 2.7.4
>
>
>

[-- Attachment #2: Type: text/html, Size: 6585 bytes --]

  parent reply	other threads:[~2017-12-04 13:58 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-01 21:20 [dts] [PATCH 0/4] ThunderX DTS initialization phase fixes Radoslaw Biernacki
2017-12-01 21:20 ` [dts] [PATCH 1/4] framework/crb: Fixing ThunderX ethernet controler detection Radoslaw Biernacki
2017-12-04 10:44   ` Radoslaw Biernacki
     [not found]     ` <CY4PR07MB2920B4D6EB1565292042CC4CF43C0@CY4PR07MB2920.namprd07.prod.outlook.com>
2017-12-04 13:57       ` Radoslaw Biernacki [this message]
2017-12-05  1:45         ` Liu, Yong
2017-12-01 21:20 ` [dts] [PATCH 2/4] framework: Fixing unnamed interface detection Radoslaw Biernacki
2017-12-01 21:20 ` [dts] [PATCH 3/4] framework/dut: fixing mixed tab and space python indention Radoslaw Biernacki
2017-12-01 21:20 ` [dts] [PATCH 4/4] framework/dut: Adding exception in case ports_map is empty Radoslaw Biernacki

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='CAEK-wK=VP8n+GbNkRMmefNR8efpD4eb_wYnGRLQFBEN4mSzpNA@mail.gmail.com' \
    --to=radoslaw.biernacki@linaro.org \
    --cc=Angela.Czubak@cavium.com \
    --cc=Arvind.Desai@cavium.com \
    --cc=Ayuj.Verma@cavium.com \
    --cc=NarayanaPrasad.Athreya@cavium.com \
    --cc=Nartu.Jogarao@cavium.com \
    --cc=dts@dpdk.org \
    --cc=herbert.guan@linaro.org \
    --cc=yong.liu@intel.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).