From: Stephen Hemminger <stephen@networkplumber.org>
To: Girish Moodalbail <girish.moodalbail@oracle.com>
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH iproute2] vxlan: Add support for modifying vxlan device attributes
Date: Fri, 5 May 2017 09:47:03 -0700 [thread overview]
Message-ID: <20170505094703.2b2eded0@xeon-e3> (raw)
In-Reply-To: <c5c7969d-9808-13a9-316b-afe590997127@oracle.com>
On Thu, 4 May 2017 17:26:23 -0700
Girish Moodalbail <girish.moodalbail@oracle.com> wrote:
> On 5/4/17 5:07 PM, Stephen Hemminger wrote:
> > On Thu, 4 May 2017 14:46:34 -0700
> > Girish Moodalbail <girish.moodalbail@oracle.com> wrote:
> >
> >> Ability to change vxlan device attributes was added to kernel through
> >> commit 8bcdc4f3a20b ("vxlan: add changelink support"), however one
> >> cannot do the same through ip(8) command. Changing the allowed vxlan
> >> device attributes using 'ip link set dev <vxlan_name> type vxlan
> >> <allowed_attributes>' currently fails with 'operation not supported'
> >> error. This failure is due to the incorrect rtnetlink message
> >> construction for the 'ip link set' operation.
> >>
> >> The vxlan_parse_opt() callback function is called for parsing options
> >> for both 'ip link add' and 'ip link set'. For the 'add' case, we pass
> >> down default values for those attributes that were not provided as CLI
> >> options. However, for the 'set' case we should be only passing down the
> >> explicitly provided attributes and not any other (default) attributes.
> >>
> >> Signed-off-by: Girish Moodalbail <girish.moodalbail@oracle.com>
> >> ---
> >
> > All these foo_set variables are ugly. This looks almost like machine
> > generated code. It doesn't read well.
>
> I thought about it, however I wasn't sure if refactoring that whole routine will
> be well received so I decided to follow the current model that already existed
> in iplink_vxlan.c. I will re-submit a patch cleaning up that whole routine.
>
> thanks,
> ~Girish
>
Thanks. This is one of those cases where something new gets added and additional
refactoring (that was overdue) is needed.
prev parent reply other threads:[~2017-05-05 16:47 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-04 21:46 [PATCH iproute2] vxlan: Add support for modifying vxlan device attributes Girish Moodalbail
2017-05-05 0:07 ` Stephen Hemminger
2017-05-05 0:26 ` Girish Moodalbail
2017-05-05 16:47 ` Stephen Hemminger [this message]
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=20170505094703.2b2eded0@xeon-e3 \
--to=stephen@networkplumber.org \
--cc=girish.moodalbail@oracle.com \
--cc=netdev@vger.kernel.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 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.