Re: [PATCH RESEND net-next v5 1/4] net: sock: introduce sock_queue_rcv_skb_reason()

From: David Ahern
Date: Fri Apr 08 2022 - 23:50:02 EST


On 4/7/22 12:20 AM, menglong8.dong@xxxxxxxxx wrote:
> From: Menglong Dong <imagedong@xxxxxxxxxxx>
>
> In order to report the reasons of skb drops in 'sock_queue_rcv_skb()',
> introduce the function 'sock_queue_rcv_skb_reason()'.
>
> As the return value of 'sock_queue_rcv_skb()' is used as the error code,
> we can't make it as drop reason and have to pass extra output argument.
> 'sock_queue_rcv_skb()' is used in many places, so we can't change it
> directly.
>
> Introduce the new function 'sock_queue_rcv_skb_reason()' and make
> 'sock_queue_rcv_skb()' an inline call to it.
>
> Reviewed-by: Hao Peng <flyingpeng@xxxxxxxxxxx>
> Reviewed-by: Jiang Biao <benbjiang@xxxxxxxxxxx>
> Signed-off-by: Menglong Dong <imagedong@xxxxxxxxxxx>
> ---
> include/net/sock.h | 9 ++++++++-
> net/core/sock.c | 30 ++++++++++++++++++++++++------
> 2 files changed, 32 insertions(+), 7 deletions(-)
>

Reviewed-by: David Ahern <dsahern@xxxxxxxxxx>