From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751615AbdF1RZh (ORCPT ); Wed, 28 Jun 2017 13:25:37 -0400 Received: from mx1.redhat.com ([209.132.183.28]:41286 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751512AbdF1RZb (ORCPT ); Wed, 28 Jun 2017 13:25:31 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 9D4BEC05972E Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=jbenc@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 9D4BEC05972E Date: Wed, 28 Jun 2017 19:25:26 +0200 From: Jiri Benc To: Matthias Schiffer Cc: davem@davemloft.net, roopa@cumulusnetworks.com, pshelar@ovn.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH net-next 2/2] vxlan: add back error messages to vxlan_config_validate() as extended netlink acks Message-ID: <20170628192526.2b7e4958@griffin> In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Wed, 28 Jun 2017 17:25:31 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 27 Jun 2017 22:47:58 +0200, Matthias Schiffer wrote: > if ((conf->flags & ~VXLAN_F_ALLOWED_GPE) || > !(conf->flags & VXLAN_F_COLLECT_METADATA)) { > + NL_SET_ERR_MSG(extack, > + "unsupported combination of extensions"); Since we're redesigning this, let's be more helpful to the user. There's probably not going to be tremendous improvements here but let's try at least a bit. "VXLAN GPE does not support this combination of extensions" > if (local_type & IPV6_ADDR_LINKLOCAL) { > if (!(remote_type & IPV6_ADDR_LINKLOCAL) && > - (remote_type != IPV6_ADDR_ANY)) > + (remote_type != IPV6_ADDR_ANY)) { > + NL_SET_ERR_MSG(extack, > + "invalid combination of address scopes"); "invalid combination of local and remote address scopes" > return -EINVAL; > + } > > conf->flags |= VXLAN_F_IPV6_LINKLOCAL; > } else { > if (remote_type == > - (IPV6_ADDR_UNICAST | IPV6_ADDR_LINKLOCAL)) > + (IPV6_ADDR_UNICAST | IPV6_ADDR_LINKLOCAL)) { > + NL_SET_ERR_MSG(extack, > + "invalid combination of address scopes"); ditto The rest looks good to me. Thanks a lot for doing the work, Matthias! Jiri