From: Jay Vosburgh <jay.vosburgh@canonical.com>
To: Jarod Wilson <jarod@redhat.com>
Cc: netdev <netdev@vger.kernel.org>
Subject: Re: bond procfs hw addr prints
Date: Mon, 13 Mar 2017 17:28:04 -0700	[thread overview]
Message-ID: <10202.1489451284@famine> (raw)
In-Reply-To: <597da6f1-c0fc-ae23-94d1-d0fb3abb3176@redhat.com>
Jarod Wilson <jarod@redhat.com> wrote:
>I've got a bug report for someone using a Intel OPA devices in a bond, and
>it appears these devices have a hardware address length of 20, opposed to
>the typical 6 on ethernet. When they dump /proc/net/bonding/bondX, it only
>prints the first 6 of the address, per %pM and mac_address_string(), while
>sysfs for the interface does print the right thing, since it uses
>sysfs_print_mac(), which takes a length argument.
	This (20 octet MAC length) is true for any Infiniband device.
>So the question is... What's the best route to take here? Expand %pM to
>support variable length hardware addresses? Use sysfs_* in procfs?
>Reinvent the wheel? Nothing I've tinkered with just yet feels very clean,
>on top of not actually working yet. :)
	sysfs_format_mac (not _print_mac) uses "%*phC", len, addr in its
format string.  Perhaps that format would be a better choice than %pM
for this case?
	-J
---
	-Jay Vosburgh, jay.vosburgh@canonical.com
next prev parent reply	other threads:[~2017-03-14  0:28 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-13 23:45 bond procfs hw addr prints Jarod Wilson
2017-03-14  0:28 ` Jay Vosburgh [this message]
2017-03-14  2:06   ` Jarod Wilson
2017-03-14  3:26     ` Jarod Wilson
2017-03-30 17:57       ` Jarod Wilson
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=10202.1489451284@famine \
    --to=jay.vosburgh@canonical.com \
    --cc=jarod@redhat.com \
    --cc=netdev@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).