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 X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 996E2C43381 for ; Sat, 16 Feb 2019 02:51:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5A57E2192C for ; Sat, 16 Feb 2019 02:51:07 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="PUji3/5E" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2392232AbfBPCvG (ORCPT ); Fri, 15 Feb 2019 21:51:06 -0500 Received: from mail-it1-f195.google.com ([209.85.166.195]:55562 "EHLO mail-it1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730000AbfBPCvF (ORCPT ); Fri, 15 Feb 2019 21:51:05 -0500 Received: by mail-it1-f195.google.com with SMTP id z131so18456941itf.5 for ; Fri, 15 Feb 2019 18:51:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=j6O3JHjmTCysBulVDib4T7zCFSDaUjycdA/+5Sclkmw=; b=PUji3/5EQprqza+RICj00reaEnqVqJO8p4ct1mXfaj8YExbtnPUf6qkuUo1ToynalJ UEoec4WIPlYKC271/5stO6QOBKm0IXUT97jS5gv2aLakmP/8oiEax1W4yvYwrOYpn13r MYDdwkeS7uGbiAk4uFZENFMc8Y9Jqwz5HcBHJmDIYJlhNeFTFQZnmJSlhNxreGoD6AZE UIRjXzYzN/HyNQUuoq3fSc5Kergd96xnwqEoz57ioTRWzPFWi8IRpiVICX+lWdgmu4i4 TQEIMJn6jjlh2GYjWt2GrvUo8+nyKkHzgsGhMYWWvyHJpOIRN33Xi9WQa3q+LACcxWqN y8nA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=j6O3JHjmTCysBulVDib4T7zCFSDaUjycdA/+5Sclkmw=; b=YFyeEQeTeAunHpeWh7twW9LLejxJSr3jZDmrp7hoKnrzG1ikhzOcOXyb/pj4aDZBAk HDozn3XVKVWMro4FJBzdHCgYxIbDAkyh3UQlgxwfeOF2Z7PUfaZ3J1jFjudPxzSZTLOo CrcUntaBwJr/MRbJDbAj4oJP8i9vw2EKylLRAuhvkNvCE1b15uaSz9FUlf4jATCf+8CQ J0cc7CfXKi+iA4+4ILxxVha9K5H/zTs9UfaO+Wk747EptGaXVLRy8SLdcWkRHm/wEzzX UwAy8HuH6Td5EMH1pQRARMHMVO/2RSdz7yrEPGbEbt4sWjZkked2HWN3oTfB9jyBMxwb HRTQ== X-Gm-Message-State: AHQUAuaeWbVeMdsWmrwqBq8lnwU2ooZzt2HxxT9XuVv26mAsWzbR5Vdn mHDLYVH7C5ZE6DzkZaI81e2+H3t7GCHmp2/KTVXKZaPc X-Google-Smtp-Source: AHgI3IYyEPd8GyAs0F7C8GgJP0lHBOfkWratLqMBeWbGiAZyvRPxEm1rC0l2owct9IZ0/bUPQ9IGaawb/s0BSDzJI+4= X-Received: by 2002:a5d:84c3:: with SMTP id z3mr7604902ior.11.1550285464513; Fri, 15 Feb 2019 18:51:04 -0800 (PST) MIME-Version: 1.0 References: <1550242187-29660-1-git-send-email-laoar.shao@gmail.com> <1550242187-29660-6-git-send-email-laoar.shao@gmail.com> <620a93625ac3709bf6df5e31bcdcdd319db140ef.camel@perches.com> In-Reply-To: <620a93625ac3709bf6df5e31bcdcdd319db140ef.camel@perches.com> From: Yafang Shao Date: Sat, 16 Feb 2019 10:50:28 +0800 Message-ID: Subject: Re: [net-next 5/5] net: sock: remove the definition of SOCK_DEBUG() To: Joe Perches Cc: Eric Dumazet , Cong Wang , David Miller , Daniel Borkmann , netdev , shaoyafang@didiglobal.com Content-Type: text/plain; charset="UTF-8" Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Sat, Feb 16, 2019 at 2:51 AM Joe Perches wrote: > > On Fri, 2019-02-15 at 10:22 -0800, Eric Dumazet wrote: > > On Fri, Feb 15, 2019 at 10:13 AM Cong Wang wrote: > > > On Fri, Feb 15, 2019 at 8:26 AM Eric Dumazet wrote: > > > > On Fri, Feb 15, 2019 at 6:50 AM Yafang Shao wrote: > > > > > As SOCK_DEBUG() isn't used any more, we can get ride of it now. > > > > > > > > > > > > > No, we are still using this infrastructure from time to time. > > > > > > > > I told you I agreed to remove the current (obsolete) TCP call sites, > > > > I never suggested to remove SOCK_DEBUG() completely. > > > > > > Since when do we upstream care about any out-of-tree users? > > > > > > You can always carry a patch to keep it downstream if you want, > > > no one can stop you doing it. > > > > Somehow the patch series seems to present things in this way : > > > > Eric Dumazet suggested to remove completely the SOCK_DEBUG() interface. > > Well, you kinda did. > It's certainly reasonable to interpret what you wrote as such. > > On Tue, 2019-02-12 at 18:15 -0800, Eric Dumazet wrote: > > Just remove all SOCK_DEBUG() calls, there are leftovers of very ancient times. > > My suggestion would be to undefine SOCK_DEBUGGING. > This seems like a reasonable trade-off decision. I will change it like this. > Something like: > --- > include/net/sock.h | 13 ++++++++----- > 1 file changed, 8 insertions(+), 5 deletions(-) > > diff --git a/include/net/sock.h b/include/net/sock.h > index 328cb7cb7b0b..7e39bdfa342a 100644 > --- a/include/net/sock.h > +++ b/include/net/sock.h > @@ -81,14 +81,17 @@ > */ > > /* Define this to get the SOCK_DBG debugging facility. */ > -#define SOCK_DEBUGGING > +/* #define SOCK_DEBUGGING */ > #ifdef SOCK_DEBUGGING > -#define SOCK_DEBUG(sk, msg...) do { if ((sk) && sock_flag((sk), SOCK_DBG)) \ > - printk(KERN_DEBUG msg); } while (0) > +#define SOCK_DEBUG(sk, fmt, ...) \ > +do { \ > + if ((sk) && sock_flag((sk), SOCK_DBG)) \ > + printk(KERN_DEBUG fmt, ##__VA_ARGS__); \ > +} while (0) > #else > /* Validate arguments and do nothing */ > -static inline __printf(2, 3) > -void SOCK_DEBUG(const struct sock *sk, const char *msg, ...) > +__printf(2, 3) > +static inline void SOCK_DEBUG(const struct sock *sk, const char *fmt, ...) > { > } > #endif > > Thanks Yafang