DPDK patches and discussions
 help / color / mirror / Atom feed
From: Maxime Coquelin <maxime.coquelin@redhat.com>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: dev@dpdk.org, david.marchand@redhat.com, chenbox@nvidia.com
Subject: Re: [PATCH v3 2/5] vhost: make use of FD manager init function
Date: Wed, 10 Apr 2024 08:22:27 +0200	[thread overview]
Message-ID: <0f3e1f06-9c4c-4927-86e4-cf208c396737@redhat.com> (raw)
In-Reply-To: <20240409093816.6065254b@hermes.local>



On 4/9/24 18:38, Stephen Hemminger wrote:
> On Tue,  9 Apr 2024 13:48:42 +0200
> Maxime Coquelin <maxime.coquelin@redhat.com> wrote:
> 
>> -void
>> +int
>>   fdset_init(struct fdset *pfdset)
>>   {
>>   	int i;
>>   
>>   	if (pfdset == NULL)
>> -		return;
>> +		return -1;
> 
> This test is unnecessary. The function is not exported, and therefore
> can only be called from vhost library. And all call sites are passing
> a pointer to local data.
> 
> Adding extra parameter checks to internal functions bloats code
> and creates lots of untestable paths. Coverity might even be
> smart enough to detect these.
> 

Agree. I will remove the test in next revision.

Thanks,
Maxime


  reply	other threads:[~2024-04-10  6:22 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-09 11:48 [PATCH v3 0/5] vhost: FD manager improvements Maxime Coquelin
2024-04-09 11:48 ` [PATCH v3 1/5] vhost: rename polling mutex Maxime Coquelin
2024-04-09 11:48 ` [PATCH v3 2/5] vhost: make use of FD manager init function Maxime Coquelin
2024-04-09 16:38   ` Stephen Hemminger
2024-04-10  6:22     ` Maxime Coquelin [this message]
2024-04-09 11:48 ` [PATCH v3 3/5] vhost: hide synchronization within FD manager Maxime Coquelin
2024-04-09 11:48 ` [PATCH v3 4/5] vhost: improve fdset initialization Maxime Coquelin
2024-04-26  7:40   ` Chenbo Xia
2024-04-26  7:46     ` Maxime Coquelin
2024-04-09 11:48 ` [PATCH v3 5/5] vhost: manage FD with epoll Maxime Coquelin
2024-04-28  3:22   ` Chenbo Xia

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=0f3e1f06-9c4c-4927-86e4-cf208c396737@redhat.com \
    --to=maxime.coquelin@redhat.com \
    --cc=chenbox@nvidia.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=stephen@networkplumber.org \
    /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).