From: Joe Perches <joe@perches.com>
To: Keith Busch <keith.busch@intel.com>,
linux-nvme@lists.infradead.org,
LKML <linux-kernel@vger.kernel.org>
Cc: Matthew Wilcox <willy@linux.intel.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Jens Axboe <axboe@fb.com>, Christoph Hellwig <hch@infradead.org>,
Dan Williams <dan.j.williams@intel.com>
Subject: Re: [PATCHv2 1/2] Print: Add print format for 8-byte EUI-64 type
Date: Wed, 09 Dec 2015 11:06:31 -0800 [thread overview]
Message-ID: <1449687991.25389.23.camel@perches.com> (raw)
In-Reply-To: <1449686577-6319-2-git-send-email-keith.busch@intel.com>
On Wed, 2015-12-09 at 11:42 -0700, Keith Busch wrote:
> MAC addresses may be formed using rules based on EUI-64, which is 2 bytes
> longer than a typical 6-byte MAC. This patch adds a long specifier to
> the %pM format to support the extended unique identifier.
[]
> diff --git a/Documentation/printk-formats.txt b/Documentation/printk-formats.txt
[]
> @@ -136,14 +136,21 @@ Raw buffer as a hex string:
> MAC/FDDI addresses:
>
> %pM 00:01:02:03:04:05
> + %pMl 00:01:02:03:04:05:06:07
> %pMR 05:04:03:02:01:00
> + %pMRl 07:06:05:04:03:02:01:00
> %pMF 00-01-02-03-04-05
> + %pMFl 00-01-02-03-04-05-06-07
> %pm 000102030405
> + %pml 0001020304050607
> %pmR 050403020100
> + %pmRl 0706050403020100
[]
> diff --git a/lib/vsprintf.c b/lib/vsprintf.c
[]
> @@ -908,14 +908,21 @@ char *mac_address_string(char *buf, char *end, u8 *addr,
> separator = ':';
> break;
> }
> + switch (fmt[2]) {
> + case 'l':
> + bytes = 8;
> + break;
> + default:
> + break;
> + }
This doesn't work for formats without pmR or pmF.
like "%pml" or "%pMl" as fmt[2] can be anything.
next prev parent reply other threads:[~2015-12-09 19:06 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-09 18:42 [PATCHv2 0/2] NVMe namespace identification Keith Busch
2015-12-09 18:42 ` [PATCHv2 1/2] Print: Add print format for 8-byte EUI-64 type Keith Busch
2015-12-09 19:06 ` Joe Perches [this message]
2015-12-09 18:42 ` [PATCHv2 2/2] NVMe: Expose namespace identity attribute to sysfs Keith Busch
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=1449687991.25389.23.camel@perches.com \
--to=joe@perches.com \
--cc=axboe@fb.com \
--cc=dan.j.williams@intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=hch@infradead.org \
--cc=keith.busch@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nvme@lists.infradead.org \
--cc=willy@linux.intel.com \
/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