netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Ahern <dsahern@gmail.com>
To: Jiri Benc <jbenc@redhat.com>
Cc: Roopa Prabhu <roopa@cumulusnetworks.com>,
	Girish Moodalbail <girish.moodalbail@oracle.com>,
	pravin shelar <pshelar@ovn.org>,
	"davem@davemloft.net" <davem@davemloft.net>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	Matthias Schiffer <mschiffer@universe-factory.net>
Subject: Re: [PATCH net-next v2] vxlan: change vxlan_[config_]validate() to use netlink_ext_ack for error reporting
Date: Fri, 11 Aug 2017 11:17:54 -0600	[thread overview]
Message-ID: <0af5e8f9-36cf-8aed-b431-ffc19eac4c8f@gmail.com> (raw)
In-Reply-To: <20170811191155.4906360a@griffin>

On 8/11/17 11:11 AM, Jiri Benc wrote:
> On Fri, 11 Aug 2017 10:56:57 -0600, David Ahern wrote:
>> I would argue none of those messages are sufficient. The message should
>> tell the user what is missing.
> 
> Good point.
> 
> I guess "The IFLA_INFO_DATA attribute is missing" would be a better
> message. It can happen only when you're implementing your own
> management tool, it's not that you'll get this message out of the ip
> tool, thus referring to netlink attributes should be okay.
> 
>> What is the point of the !data check anyway? Based on the rest of the
>> validate function neither IFLA_VXLAN_ID or IFLA_VXLAN_PORT_RANGE are
>> required attributes.
> 
> The newlink callback assumes data is not NULL, i.e. IFLA_INFO_DATA is
> present. It would crash otherwise.


What if a user adds IFLA_INFO_DATA but adds no vxlan attributes under
it? Still not a valid config, but it passes the !data check.

Whatever attributes are required but missing should be the message
returned.

  reply	other threads:[~2017-08-11 17:17 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-10 21:16 [PATCH net-next v2] vxlan: change vxlan_[config_]validate() to use netlink_ext_ack for error reporting Girish Moodalbail
2017-08-11 15:47 ` Jiri Benc
2017-08-11 16:19 ` Roopa Prabhu
2017-08-11 16:24   ` Matthias Schiffer
2017-08-11 16:39   ` Jiri Benc
2017-08-11 16:56     ` David Ahern
2017-08-11 17:11       ` Jiri Benc
2017-08-11 17:17         ` David Ahern [this message]
2017-08-11 17:28           ` Jiri Benc
2017-08-11 17:21     ` Girish Moodalbail
2017-08-12  2:24     ` Roopa Prabhu

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=0af5e8f9-36cf-8aed-b431-ffc19eac4c8f@gmail.com \
    --to=dsahern@gmail.com \
    --cc=davem@davemloft.net \
    --cc=girish.moodalbail@oracle.com \
    --cc=jbenc@redhat.com \
    --cc=mschiffer@universe-factory.net \
    --cc=netdev@vger.kernel.org \
    --cc=pshelar@ovn.org \
    --cc=roopa@cumulusnetworks.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).