From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E4AB6C001B0 for ; Tue, 8 Aug 2023 16:34:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233044AbjHHQeB (ORCPT ); Tue, 8 Aug 2023 12:34:01 -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 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