From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f68.google.com ([74.125.82.68]:50394 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753676AbeCVLuB (ORCPT ); Thu, 22 Mar 2018 07:50:01 -0400 Received: by mail-wm0-f68.google.com with SMTP id f19so15434892wmc.0 for ; Thu, 22 Mar 2018 04:50:00 -0700 (PDT) Date: Thu, 22 Mar 2018 12:49:58 +0100 From: Simon Horman To: Jiri Benc Cc: Jiri Pirko , Jamal Hadi Salim , Cong Wang , netdev@vger.kernel.org, oss-drivers@netronome.com, Pieter Jansen van Vuuren Subject: Re: [PATCH/RFC 2/3] net/sched: act_tunnel_key: add extended ack support Message-ID: <20180322114957.rtnlyix6ppu36jir@netronome.com> References: <20180306170805.19500-1-simon.horman@netronome.com> <20180306170805.19500-3-simon.horman@netronome.com> <20180309122248.1979e00f@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180309122248.1979e00f@redhat.com> Sender: netdev-owner@vger.kernel.org List-ID: On Fri, Mar 09, 2018 at 12:22:48PM +0100, Jiri Benc wrote: > On Tue, 6 Mar 2018 18:08:04 +0100, Simon Horman wrote: > > - if (!tb[TCA_TUNNEL_KEY_PARMS]) > > + if (!tb[TCA_TUNNEL_KEY_PARMS]) { > > + NL_SET_ERR_MSG(extack, "Missing tunnel key parameter"); > > "parameters" (it's not just one parameter) > > > @@ -107,6 +109,7 @@ static int tunnel_key_init(struct net *net, struct nlattr *nla, > > break; > > case TCA_TUNNEL_KEY_ACT_SET: > > if (!tb[TCA_TUNNEL_KEY_ENC_KEY_ID]) { > > + NL_SET_ERR_MSG(extack, "Missing tunnel key enc id"); > > This is not much helpful to the user. What's "enc"? I guess "Missing > tunnel key id" would be enough and better. > > > @@ -144,6 +147,7 @@ static int tunnel_key_init(struct net *net, struct nlattr *nla, > > 0, flags, > > key_id, 0); > > } else { > > + NL_SET_ERR_MSG(extack, "Missing both ipv4 and ipv6 enc src and dst"); > > We don't need both but only one of them. And again, "enc" does not have > a clear meaning. > > "Missing either IPv4 or IPv6 source and destination address"? Sure, I'll work on making the messages clearer. > In addition, it makes little sense to me to add extacks to just some of > the errors in the tunnel_key_init function. Please add extacks to all > of them. At the time I wrote the patch I tried to cover those errors that could result from user-input. I can extend the coverage if that is preferred.