Received: by 2002:a05:6359:6284:b0:131:369:b2a3 with SMTP id se4csp4617999rwb; Tue, 8 Aug 2023 11:02:15 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEAsjNnY9v752WZXleOHHlR3AtBZGyF+V3XkgTg7qVmmX5bnrFUZA9OGzDF9JAkSh8fz5/i X-Received: by 2002:a17:902:d512:b0:1bb:c7b6:493a with SMTP id b18-20020a170902d51200b001bbc7b6493amr496576plg.21.1691517735024; Tue, 08 Aug 2023 11:02:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691517735; cv=none; d=google.com; s=arc-20160816; b=lG6bEsu4J2ALTC64l+yX8+DqtquSeSic9WMrxm0MB3SJJOrYC2rc8Iai/1T7oBcMjr Ng+6AG/WBJ+Dp4LDFb3xbzqYHztajt9e4pp6Ta0HF3rtO0t8VIuIupNfysgNNoQAjV7X Zm5txA1CqRSvxdFiZU0S/C9QKhFW3AaojLf2wn0+HI5zoUswnLZXT6E69dLAnidzkGSy lkFqnW8Hi/moaycE39u65QrzXH37Aub0RZus2OPORT5McBN7fUm854WXoOvxMKhYBzfK HQQUGd3uloWvHI+zfWQsx6T3drGkXXCkuHdtAtQdfnritJhWbFxiOwA3aYob16PI64x5 xXcQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:mime-version:date :dkim-signature:message-id; bh=Z/lIaGaMy4aD0ASgIkzR9MKyiCWlm3ct+3qApo5JH54=; fh=TaSHdFTeE+qPWyH4b/9J2FDlJghHS2tiwp0vBMIGoF8=; b=eiTA+KUt03NX99DqVxXexEKEU8W9U9jF0rdt5brqPgF6nPow6OZVlFf+hQjr4QJF5I 4d98C8uFKmUV8qvK0kjlazVu8FZQ3voHVkNsVdE3yRBXiELFfSnbqEV/ombkXef/fKmy DJAGnf8BwGfAWLC16rhKUONxt8ZfO0X9KjDVR2zsDYSpjnrETkuTUN5sX02vKH8/lxwA MS/C5jVNFv/yOgGo4oubP+shBMudbwIegxfwIwIkTt23Z3U9XYgxS+lRyx9yo27NffKC Gpec7d/0I/RnMZ21DQsJroD76HBvlkpgQbRuh2kgU0EZKA/a1Uk7fodBtCCbuyO6NokZ ZLhw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=WR0ktPZv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g3-20020a170902e38300b001b000b3f132si7327793ple.298.2023.08.08.11.01.47; Tue, 08 Aug 2023 11:02:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=WR0ktPZv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232937AbjHHQeA (ORCPT + 99 others); Tue, 8 Aug 2023 12:34:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58080 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232932AbjHHQcz (ORCPT ); Tue, 8 Aug 2023 12:32:55 -0400 Received: from out-66.mta1.migadu.com (out-66.mta1.migadu.com [95.215.58.66]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C773673C6 for ; Tue, 8 Aug 2023 08:52:05 -0700 (PDT) Message-ID: <1591f6c8-f346-83da-f4f5-abdd7d0c0bd4@linux.dev> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1691500286; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Z/lIaGaMy4aD0ASgIkzR9MKyiCWlm3ct+3qApo5JH54=; b=WR0ktPZvEmEl5N39254FTQWH+skmrzfpOSuswr5kLbplNopwYJKoazBPF3QGUK4b8P+BaO bZRp6seoxUGwn4MKBjnwNcwH96DxlfT2dlAhuMikf3kEebqNQ9CuZKDWHPSMnO6iKtNu6w Wi71nghvkj7PwcS+TFXkDASf6jsysJA= Date: Tue, 8 Aug 2023 14:11:19 +0100 MIME-Version: 1.0 Subject: Re: [PATCH linux-next v2] net/ipv4: return the real errno instead of -EINVAL Content-Language: en-US To: xu.xin.sc@gmail.com Cc: dsahern@kernel.org, kuba@kernel.org, pabeni@redhat.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, xu xin , Yang Yang , Si Hao , davem@davemloft.net References: <20230807015408.248237-1-xu.xin16@zte.com.cn> X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Vadim Fedorenko In-Reply-To: <20230807015408.248237-1-xu.xin16@zte.com.cn> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_OUT X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 07/08/2023 02:54, xu.xin.sc@gmail.com wrote: > From: xu xin > > For now, No matter what error pointer ip_neigh_for_gw() returns, > ip_finish_output2() always return -EINVAL, which may mislead the upper > users. > > For exemple, an application uses sendto to send an UDP packet, but when the > neighbor table overflows, sendto() will get a value of -EINVAL, and it will > cause users to waste a lot of time checking parameters for errors. > > Return the real errno instead of -EINVAL. > > Signed-off-by: xu xin > Reviewed-by: Yang Yang > Cc: Si Hao > --- Reviewed-by: Vadim Fedorenko