public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: Phil Sutter <phil@nwl.cc>
Cc: netdev@vger.kernel.org
Subject: Re: [iproute PATCH 04/18] ss: Use sockstat->type in all socket types
Date: Thu, 1 Dec 2016 10:41:01 -0800	[thread overview]
Message-ID: <20161201104101.05566d92@xeon-e3> (raw)
In-Reply-To: <20161111131014.21865-5-phil@nwl.cc>

On Fri, 11 Nov 2016 14:10:00 +0100
Phil Sutter <phil@nwl.cc> wrote:

> Unix sockets used that field already to hold info about the socket type.
> By replicating this approach in all other socket types, we can get rid
> of protocol parameter in inet_stats_print() and have sock_state_print()
> figure things out by itself.
> 
> Signed-off-by: Phil Sutter <phil@nwl.cc>

Cleaning out the patch backlog...
This patch does not apply to current master branch, rejects are:

--- misc/ss.c
+++ misc/ss.c
@@ -1719,27 +1768,11 @@ void *parse_markmask(const char *markmask)
 	return res;
 }
 
-static char *proto_name(int protocol)
-{
-	switch (protocol) {
-	case 0:
-		return "raw";
-	case IPPROTO_UDP:
-		return "udp";
-	case IPPROTO_TCP:
-		return "tcp";
-	case IPPROTO_DCCP:
-		return "dccp";
-	}
-
-	return "???";
-}
-
-static void inet_stats_print(struct sockstat *s, int protocol)
+static void inet_stats_print(struct sockstat *s)
 {
 	char *buf = NULL;
 
-	sock_state_print(s, proto_name(protocol));
+	sock_state_print(s);
 
 	inet_addr_print(&s->local, s->lport, s->iface);
 	inet_addr_print(&s->remote, s->rport, 0);


Please fix and resubmit whole series.

  reply	other threads:[~2016-12-01 18:41 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-11 13:09 [iproute PATCH 00/18] ss: Minor code review Phil Sutter
2016-11-11 13:09 ` [iproute PATCH 01/18] ss: Mark fall through in arg parsing switch() Phil Sutter
2016-11-11 13:09 ` [iproute PATCH 02/18] ss: Drop empty lines in UDP output Phil Sutter
2016-11-11 13:09 ` [iproute PATCH 03/18] ss: Add missing tab when printing UNIX details Phil Sutter
2016-11-11 13:10 ` [iproute PATCH 04/18] ss: Use sockstat->type in all socket types Phil Sutter
2016-12-01 18:41   ` Stephen Hemminger [this message]
2016-11-11 13:10 ` [iproute PATCH 05/18] ss: introduce proc_ctx_print() Phil Sutter
2016-11-11 13:10 ` [iproute PATCH 06/18] ss: Drop list traversal from unix_stats_print() Phil Sutter
2016-11-11 13:10 ` [iproute PATCH 07/18] ss: Eliminate unix_use_proc() Phil Sutter
2016-11-11 13:10 ` [iproute PATCH 08/18] ss: Turn generic_proc_open() wrappers into macros Phil Sutter
2016-11-11 13:10 ` [iproute PATCH 09/18] ss: Make tmr_name local to tcp_timer_print() Phil Sutter
2016-11-11 13:10 ` [iproute PATCH 10/18] ss: Make user_ent_hash_build_init local to user_ent_hash_build() Phil Sutter
2016-11-11 13:10 ` [iproute PATCH 11/18] ss: Make some variables function-local Phil Sutter
2016-11-11 13:10 ` [iproute PATCH 12/18] ss: Make slabstat_ids local to get_slabstat() Phil Sutter
2016-11-11 13:10 ` [iproute PATCH 13/18] ss: Get rid of useless goto in handle_follow_request() Phil Sutter
2016-11-11 13:10 ` [iproute PATCH 14/18] ss: Get rid of single-fielded struct snmpstat Phil Sutter
2016-11-11 13:10 ` [iproute PATCH 15/18] ss: Make unix_state_map local to unix_show() Phil Sutter
2016-11-11 13:10 ` [iproute PATCH 16/18] ss: Make sstate_name local to sock_state_print() Phil Sutter
2016-11-11 13:10 ` [iproute PATCH 17/18] ss: Make sstate_namel local to scan_state() Phil Sutter
2016-11-11 13:10 ` [iproute PATCH 18/18] ss: unix_show: No need to initialize members of calloc'ed structs Phil Sutter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20161201104101.05566d92@xeon-e3 \
    --to=stephen@networkplumber.org \
    --cc=netdev@vger.kernel.org \
    --cc=phil@nwl.cc \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox