All of lore.kernel.org
 help / color / mirror / Atom feed
From: gowrishankar muthukrishnan <gowrishankar.m@linux.vnet.ibm.com>
To: Declan Doherty <declan.doherty@intel.com>
Cc: dev@dpdk.org, Thomas Monjalon <thomas@monjalon.net>,
	Ferruh Yigit <ferruh.yigit@intel.com>
Subject: Re: [PATCH v2] net/bonding: support bifurcated driver in eal cli using --vdev
Date: Mon, 10 Jul 2017 12:02:24 +0530	[thread overview]
Message-ID: <deaa1793-9e48-aa47-70fe-b81a704f7b5f@linux.vnet.ibm.com> (raw)
In-Reply-To: <2115e096-6c7f-08a1-bec2-1860b5ff11ae@intel.com>

On Friday 07 July 2017 09:08 PM, Declan Doherty wrote:
> On 04/07/2017 12:57 PM, Gowrishankar wrote:
>> From: Gowrishankar Muthukrishnan <gowrishankar.m@linux.vnet.ibm.com>
>>
>> At present, creating bonding devices using --vdev is broken for PMD like
>> mlx5 as it is neither UIO nor VFIO based and hence PMD driver is unknown
>> to find_port_id_by_pci_addr(), as below.
>>
>> testpmd <EAL args> --vdev 'net_bonding0,mode=1,slave=<PCI>,socket_id=0'
>>
>> PMD: bond_ethdev_parse_slave_port_kvarg(150) - Invalid slave port value
>>  (<PCI ID>) specified
>> EAL: Failed to parse slave ports for bonded device net_bonding0
>>
>> This patch fixes parsing PCI ID from bonding device params by verifying
>> it in RTE PCI bus, rather than checking dev->kdrv.
>>
>> Changes:
>>   v2 - revisit fix by iterating rte_pci_bus
>>
>> Signed-off-by: Gowrishankar Muthukrishnan 
>> <gowrishankar.m@linux.vnet.ibm.com>
>> ---
> ...
>>
>
> Hey Gowrishankar,
>
> I was having a look at this patch and there is the following 
> checkpatch error.
>
> _coding style issues_
>
>
> WARNING:AVOID_EXTERNS: externs should be avoided in .c files
> #48: FILE: drivers/net/bonding/rte_eth_bond_args.c:43:
> +extern struct rte_pci_bus rte_pci_bus;
>
Hi Declan,
Thank you for your review.
Yes, but I also saw some references like above in older code.

>
> Looking at bit closer at the issue I think there is a simpler 
> solution, the bonding driver really shouldn't be parsing the PCI bus 
> directly, and since PCI devices use the PCI DBF as their name we can 
> simply replace the all the scanning code with a simple call to 
> rte_eth_dev_get_port_by_name API.
>

But you are removing an option to mention ports by PCI addresses right  
(as I see parse_port_id() completely removed in your patch) ?.
IMO, we just need to check if given eth pci id (incase we mention ports 
ib PCI ID) is one of what EAL scanned in PCI. Also, slaves should not be 
from any blacklisted PCI ids (as we test with -b or -w).

With your patch, it failed to parse params as below.

testpmd -l 0,8,16 --socket-mem 512,512 --vdev 
'net_bonding0,mode=1,slave=0002:01:00.0,slave=0002:01:00.1,primary=0002:01:00.0,socket_id=0' 


Configuring Port 0 (socket 1)
PMD: net_mlx5: 0x4a7f8f80: TX queues number update: 0 -> 1
PMD: net_mlx5: 0x4a7f8f80: RX queues number update: 0 -> 1
Port 0: E4:1D:2D:C9:C7:56
Configuring Port 1 (socket 1)
PMD: net_mlx5: 0x4a7fd000: TX queues number update: 0 -> 1
PMD: net_mlx5: 0x4a7fd000: RX queues number update: 0 -> 1
Port 1: E4:1D:2D:C9:C7:57
Configuring Port 2 (socket 0)
EAL: Failed to parse slave ports for bonded device net_bonding0
Fail to configure port 2
EAL: Error - exiting with code: 1
   Cause: Start ports failed

With my patch, I have tested with -w and -b options in testpmd as well.

Please let me know if I am wrong on anything of above.

Thanks,
Gowrishankar

  reply	other threads:[~2017-07-10  6:32 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-14 10:49 [PATCH] net/bonding: support bifurcated driver in eal cli using --vdev Gowrishankar
2017-06-15 13:54 ` Ferruh Yigit
2017-06-16 14:34 ` Thomas Monjalon
2017-07-04 11:57 ` [PATCH v2] " Gowrishankar
2017-07-07 15:38   ` Declan Doherty
2017-07-10  6:32     ` gowrishankar muthukrishnan [this message]
2017-07-31 14:34       ` Gaëtan Rivet
2017-09-05  9:13         ` Thomas Monjalon
2017-09-06  8:59           ` gowrishankar muthukrishnan
2017-10-02  8:41             ` [Suspected-Phishing]Re: " Raslan Darawsheh
2017-10-02  8:44               ` gowrishankar muthukrishnan
2017-10-03  8:38                 ` [Suspected-Phishing]Re: " Raslan Darawsheh
2017-09-20 18:04   ` [PATCH v3] " Gowrishankar
2017-10-02 11:06     ` Doherty, Declan
2017-10-02 23:32       ` Ferruh Yigit
2017-10-02 12:09     ` Gaëtan Rivet

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=deaa1793-9e48-aa47-70fe-b81a704f7b5f@linux.vnet.ibm.com \
    --to=gowrishankar.m@linux.vnet.ibm.com \
    --cc=declan.doherty@intel.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=thomas@monjalon.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.