diff mbox series

[iproute2-next,01/20] bridge: vni: Accept 'del' command

Message ID 20231211140732.11475-2-bpoirier@nvidia.com (mailing list archive)
State Accepted
Commit e8177094d51566f1eeed76fd2dae74601618dfdb
Delegated to: Stephen Hemminger
Headers show
Series bridge: vni: UI fixes | expand

Checks

Context Check Description
netdev/tree_selection success Not a local patch

Commit Message

Benjamin Poirier Dec. 11, 2023, 2:07 p.m. UTC
`bridge vni help` shows "bridge vni { add | del } ..." but currently
`bridge vni del ...` errors out unexpectedly:
	# bridge vni del
	Command "del" is unknown, try "bridge vni help".

Recognize 'del' as a synonym of the original 'delete' command.

Fixes: 45cd32f9f7d5 ("bridge: vxlan device vnifilter support")
Reviewed-by: Petr Machata <petrm@nvidia.com>
Tested-by: Petr Machata <petrm@nvidia.com>
Signed-off-by: Benjamin Poirier <bpoirier@nvidia.com>
---
 bridge/vni.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Stephen Hemminger Dec. 21, 2023, 3:57 a.m. UTC | #1
On Mon, 11 Dec 2023 09:07:13 -0500
Benjamin Poirier <bpoirier@nvidia.com> wrote:

> `bridge vni help` shows "bridge vni { add | del } ..." but currently
> `bridge vni del ...` errors out unexpectedly:
> 	# bridge vni del
> 	Command "del" is unknown, try "bridge vni help".
> 
> Recognize 'del' as a synonym of the original 'delete' command.
> 
> Fixes: 45cd32f9f7d5 ("bridge: vxlan device vnifilter support")
> Reviewed-by: Petr Machata <petrm@nvidia.com>
> Tested-by: Petr Machata <petrm@nvidia.com>
> Signed-off-by: Benjamin Poirier <bpoirier@nvidia.com>

Please no.
We are blocking uses of matches() and now other commands will want more synonyms
Instead fix the help and doc.
Stephen Hemminger Dec. 21, 2023, 4:06 p.m. UTC | #2
On Wed, 20 Dec 2023 19:57:08 -0800
Stephen Hemminger <stephen@networkplumber.org> wrote:

> On Mon, 11 Dec 2023 09:07:13 -0500
> Benjamin Poirier <bpoirier@nvidia.com> wrote:
> 
> > `bridge vni help` shows "bridge vni { add | del } ..." but currently
> > `bridge vni del ...` errors out unexpectedly:
> > 	# bridge vni del
> > 	Command "del" is unknown, try "bridge vni help".
> > 
> > Recognize 'del' as a synonym of the original 'delete' command.
> > 
> > Fixes: 45cd32f9f7d5 ("bridge: vxlan device vnifilter support")
> > Reviewed-by: Petr Machata <petrm@nvidia.com>
> > Tested-by: Petr Machata <petrm@nvidia.com>
> > Signed-off-by: Benjamin Poirier <bpoirier@nvidia.com>  
> 
> Please no.
> We are blocking uses of matches() and now other commands will want more synonyms
> Instead fix the help and doc.

I changed my mind. This is fine. The commands in iproute2 are inconsistent (no surprise)
and plenty of places take del (and not delete??)
Benjamin Poirier Dec. 21, 2023, 4:54 p.m. UTC | #3
On 2023-12-21 08:06 -0800, Stephen Hemminger wrote:
> On Wed, 20 Dec 2023 19:57:08 -0800
> Stephen Hemminger <stephen@networkplumber.org> wrote:
> 
> > On Mon, 11 Dec 2023 09:07:13 -0500
> > Benjamin Poirier <bpoirier@nvidia.com> wrote:
> > 
> > > `bridge vni help` shows "bridge vni { add | del } ..." but currently
> > > `bridge vni del ...` errors out unexpectedly:
> > > 	# bridge vni del
> > > 	Command "del" is unknown, try "bridge vni help".
> > > 
> > > Recognize 'del' as a synonym of the original 'delete' command.
> > > 
> > > Fixes: 45cd32f9f7d5 ("bridge: vxlan device vnifilter support")
> > > Reviewed-by: Petr Machata <petrm@nvidia.com>
> > > Tested-by: Petr Machata <petrm@nvidia.com>
> > > Signed-off-by: Benjamin Poirier <bpoirier@nvidia.com>  
> > 
> > Please no.
> > We are blocking uses of matches() and now other commands will want more synonyms
> > Instead fix the help and doc.
> 
> I changed my mind. This is fine. The commands in iproute2 are inconsistent (no surprise)
> and plenty of places take del (and not delete??)

Indeed. Thank you for the update. In that case, can you take the series
as-is or should I still reduce the overall patch count and resubmit?
Stephen Hemminger Dec. 21, 2023, 5:24 p.m. UTC | #4
On Thu, 21 Dec 2023 11:54:49 -0500
Benjamin Poirier <bpoirier@nvidia.com> wrote:

> On 2023-12-21 08:06 -0800, Stephen Hemminger wrote:
> > On Wed, 20 Dec 2023 19:57:08 -0800
> > Stephen Hemminger <stephen@networkplumber.org> wrote:
> >   
> > > On Mon, 11 Dec 2023 09:07:13 -0500
> > > Benjamin Poirier <bpoirier@nvidia.com> wrote:
> > >   
> > > > `bridge vni help` shows "bridge vni { add | del } ..." but currently
> > > > `bridge vni del ...` errors out unexpectedly:
> > > > 	# bridge vni del
> > > > 	Command "del" is unknown, try "bridge vni help".
> > > > 
> > > > Recognize 'del' as a synonym of the original 'delete' command.
> > > > 
> > > > Fixes: 45cd32f9f7d5 ("bridge: vxlan device vnifilter support")
> > > > Reviewed-by: Petr Machata <petrm@nvidia.com>
> > > > Tested-by: Petr Machata <petrm@nvidia.com>
> > > > Signed-off-by: Benjamin Poirier <bpoirier@nvidia.com>    
> > > 
> > > Please no.
> > > We are blocking uses of matches() and now other commands will want more synonyms
> > > Instead fix the help and doc.  
> > 
> > I changed my mind. This is fine. The commands in iproute2 are inconsistent (no surprise)
> > and plenty of places take del (and not delete??)  
> 
> Indeed. Thank you for the update. In that case, can you take the series
> as-is or should I still reduce the overall patch count and resubmit?

I will take it as is. Ok for me to squash a few patches together?
Benjamin Poirier Dec. 21, 2023, 5:46 p.m. UTC | #5
On 2023-12-21 09:24 -0800, Stephen Hemminger wrote:
[...]
> > > > 
> > > > Please no.
> > > > We are blocking uses of matches() and now other commands will want more synonyms
> > > > Instead fix the help and doc.  
> > > 
> > > I changed my mind. This is fine. The commands in iproute2 are inconsistent (no surprise)
> > > and plenty of places take del (and not delete??)  
> > 
> > Indeed. Thank you for the update. In that case, can you take the series
> > as-is or should I still reduce the overall patch count and resubmit?
> 
> I will take it as is. Ok for me to squash a few patches together?

Yes, that's ok. Thank you for taking care of it.
diff mbox series

Patch

diff --git a/bridge/vni.c b/bridge/vni.c
index e804cb3f..6c0e35cd 100644
--- a/bridge/vni.c
+++ b/bridge/vni.c
@@ -419,7 +419,8 @@  int do_vni(int argc, char **argv)
 	if (argc > 0) {
 		if (strcmp(*argv, "add") == 0)
 			return vni_modify(RTM_NEWTUNNEL, argc-1, argv+1);
-		if (strcmp(*argv, "delete") == 0)
+		if (strcmp(*argv, "delete") == 0 ||
+		    strcmp(*argv, "del") == 0)
 			return vni_modify(RTM_DELTUNNEL, argc-1, argv+1);
 		if (strcmp(*argv, "show") == 0 ||
 		    strcmp(*argv, "lst") == 0 ||