From: "Doherty, Declan" <declan.doherty@intel.com>
To: "Ananyev, Konstantin" <konstantin.ananyev@intel.com>,
"dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH 2/3] net/ixgbe: initialise nb_representor_ports value
Date: Tue, 1 May 2018 13:53:27 +0100 [thread overview]
Message-ID: <b59b9d68-ebcf-9297-1c5b-6f1ebe38c9db@intel.com> (raw)
In-Reply-To: <2601191342CEEE43887BDE71AB977258AEDC0C62@irsmsx105.ger.corp.intel.com>
On 01/05/2018 10:46 AM, Ananyev, Konstantin wrote:
>
>
>> -----Original Message-----
>> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Declan Doherty
>> Sent: Monday, April 30, 2018 4:33 PM
>> To: dev@dpdk.org
>> Cc: Doherty, Declan <declan.doherty@intel.com>
>> Subject: [dpdk-dev] [PATCH 2/3] net/ixgbe: initialise nb_representor_ports value
>>
>> Initialise rte_ethdev_args nb_representor_ports to zero to handle
>> the case where no devargs are passed to the IXGBE PF on
>> device probe, so that there is no invalid attempts to create
>> representor ports.
>>
>> Coverity Issue: 277231
>> Fixes: cf80ba6e2038 ("net/ixgbe: add support for representor ports")
>>
>> Signed-off-by: Declan Doherty <declan.doherty@intel.com>
>> ---
>> drivers/net/ixgbe/ixgbe_ethdev.c | 3 +--
>> 1 file changed, 1 insertion(+), 2 deletions(-)
>>
>> diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
>> index 0ccf55dc8..283dd7e49 100644
>> --- a/drivers/net/ixgbe/ixgbe_ethdev.c
>> +++ b/drivers/net/ixgbe/ixgbe_ethdev.c
>> @@ -1725,8 +1725,7 @@ eth_ixgbe_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
>> struct rte_pci_device *pci_dev)
>> {
>> char name[RTE_ETH_NAME_MAX_LEN];
>> -
>> - struct rte_eth_devargs eth_da;
>> + struct rte_eth_devargs eth_da = { .nb_representor_ports = 0 };
>> int i, retval;
>>
>> if (pci_dev->device.devargs) {
>
> Might be a bit better:
> If (pci_dev->device.devargs) { rte_eth_devargs_parse(...);...}
> else memset(ð_da, 0, sizeof(eth_da));
> to be more consistent.
> BTW, I think rte_eth_devargs_parse() need to add formal check for input parameters.
> Konstantin
>
Ok, thanks Konstantin, that makes sense, we're working on cleaning up
rte_eth_devargs_parse() to align with kvargs so I'll make sure to add
those checks.
>
>
>> --
>> 2.14.3
>
next prev parent reply other threads:[~2018-05-01 12:53 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-30 15:32 [dpdk-dev] [PATCH 1/3] net/ixgbe: revert default PF PMD device name Declan Doherty
2018-04-30 15:32 ` [dpdk-dev] [PATCH 2/3] net/ixgbe: initialise nb_representor_ports value Declan Doherty
2018-05-01 9:46 ` Ananyev, Konstantin
2018-05-01 12:53 ` Doherty, Declan [this message]
2018-04-30 15:32 ` [dpdk-dev] [PATCH 3/3] net/ixgbe: add null pointer check for pf_ethdev Declan Doherty
2018-05-01 9:47 ` Ananyev, Konstantin
2018-05-01 12:53 ` Doherty, Declan
2018-05-02 15:59 ` [dpdk-dev] [dpdk-dev 1/3][PATCH v2] net/ixgbe: revert default PF PMD device name Declan Doherty
2018-05-02 15:59 ` [dpdk-dev] [dpdk-dev 2/3][PATCH v2] net/ixgbe: default eth_da parameter Declan Doherty
2018-05-02 15:59 ` [dpdk-dev] [dpdk-dev 3/3][PATCH v2] net/ixgbe: add null pointer check for pf_ethdev Declan Doherty
2018-05-02 16:48 ` [dpdk-dev] [dpdk-dev 1/3][PATCH v2] net/ixgbe: revert default PF PMD device name Ferruh Yigit
2018-05-02 17:05 ` Ferruh Yigit
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=b59b9d68-ebcf-9297-1c5b-6f1ebe38c9db@intel.com \
--to=declan.doherty@intel.com \
--cc=dev@dpdk.org \
--cc=konstantin.ananyev@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).