From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 035F141823 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 04C1441795 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=XubIOGUXV39izAf99aI9nDczchTciAZ7WPlcFxA6S8U=; b=eSegMNTqTjF59Lx0ZGErrriFu+Oeg/Qd9JnmzYBvzCmKEfMmHppJYCgCEbzImGj4Dex7XGqpF3ibW3RNzXEyAw8y/ygdsB3vmU6vvqMGylWzk85sV9bC7k29n3vnPpuQ3z7P1BWPucM9wPrFCId2GqJGwJl+UeP1FZ7jfZLNXYVGbfVmcxVgNUJGxoyFERTIBZXVBaBcDjfUqm3/AAbHjyO8TADr3yoxQ1VsRqhz9Rt2DKMZ/s+OvBOVd6k2Hh9IjzT0cSnh0g92sSynLo7Xdoj5e7iTBqTjq274VZFYPMiAAFCF0WxOL+y5GmwhdQTGPEkGVKelEvv2yRMJ+MdE/g== References: <20230126125344.1b7b34e2@gandalf.local.home> From: Petr Machata Date: Mon, 30 Jan 2023 16:50:32 +0100 In-Reply-To: <20230126125344.1b7b34e2@gandalf.local.home> Message-ID: <87ilgof20x.fsf@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Bridge] [PATCH net-next 06/16] net: bridge: Add a tracepoint for MDB overflows List-Id: Linux Ethernet Bridging List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Steven Rostedt Cc: Petr Machata , netdev@vger.kernel.org, Nikolay Aleksandrov , bridge@lists.linux-foundation.org, Ido Schimmel , Eric Dumazet , Roopa Prabhu , Jakub Kicinski , Paolo Abeni , "David S. Miller" , linux-trace-kernel@vger.kernel.org Steven Rostedt writes: > On Thu, 26 Jan 2023 18:01:14 +0100 > Petr Machata wrote: > >> + TP_printk("dev %s af %u src %pI4/%pI6c grp %pI4/%pI6c/%pM vid %u", >> + __get_str(dev), __entry->af, __entry->src4, __entry->src6, >> + __entry->grp4, __entry->grp6, __entry->grpmac, __entry->vid) > > And just have: > > TP_printk("dev %s af %u src %pI6c grp %pI6c/%pM vid %u", > __get_str(dev), __entry->af, __entry->src, __entry->grp, > __entry->grpmac, __entry->vid) > > As the %pI6c should detect that it's a ipv4 address and show that. This means the IP addresses will always be IPv6, even for an IPv4 MDB entries. One can still figure out the true protocol from the address family field, but it might not be obvious. Plus the IPv4-mapped IPv6 addresses are not really formatted as IPv4, though yeah, IPv4 notation is embedded in that. All the information is still there, but... scrambled? Not sure the reduction in clarity is worth the 8 bytes that we save. The tracepoint is unlikely to trigger often. What say you?