From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alexei Starovoitov Subject: Re: [PATCH bpf-nex] tools: bpftool: change time format for program 'loaded at:' information Date: Tue, 1 May 2018 14:25:50 -0700 Message-ID: <20180501212548.ysibavrt22l67ych@ast-mbp> References: <1525205918-16779-1-git-send-email-quentin.monnet@netronome.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: ast@kernel.org, borkmann@iogearbox.net, netdev@vger.kernel.org, oss-drivers@netronome.com To: Quentin Monnet Return-path: Received: from mail-pg0-f65.google.com ([74.125.83.65]:43765 "EHLO mail-pg0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751004AbeEAVZx (ORCPT ); Tue, 1 May 2018 17:25:53 -0400 Received: by mail-pg0-f65.google.com with SMTP id k11-v6so7964902pgo.10 for ; Tue, 01 May 2018 14:25:52 -0700 (PDT) Content-Disposition: inline In-Reply-To: <1525205918-16779-1-git-send-email-quentin.monnet@netronome.com> Sender: netdev-owner@vger.kernel.org List-ID: On Tue, May 01, 2018 at 09:18:38PM +0100, Quentin Monnet wrote: > To make eBPF program load time easier to parse from "bpftool prog" > output for machines, change the time format used by the program. The > format now differs for plain and JSON version: > > - Plain version uses a string formatted according to ISO 8601. > - JSON uses the number of seconds since the Epoch, wich is less friendly > for humans but even easier to process. > > Example output: > > # ./bpftool prog > 41298: xdp tag a04f5eef06a7f555 dev foo > loaded_at 2018-04-18T17:19:47+0100 uid 0 > xlated 16B not jited memlock 4096B > > # ./bpftool prog -p > [{ > "id": 41298, > "type": "xdp", > "tag": "a04f5eef06a7f555", > "gpl_compatible": false, > "dev": { > "ifindex": 14, > "ns_dev": 3, > "ns_inode": 4026531993, > "ifname": "foo" > }, > "loaded_at": 1524068387, > "uid": 0, > "bytes_xlated": 16, > "jited": false, > "bytes_memlock": 4096 > } > ] > > Previously, "Apr 18/17:19" would be used at both places. > > Suggested-by: Alexei Starovoitov > Signed-off-by: Quentin Monnet > Acked-by: Jakub Kicinski Applied, Thanks!