Project

General

Profile

Actions

Bug #1769

closed

dladm show-link truncates OVER field

Added by Dan Vatca over 11 years ago. Updated almost 7 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
cmd - userland programs
Start date:
2011-11-12
Due date:
% Done:

100%

Estimated time:
Difficulty:
Bite-size
Tags:
Gerrit CR:
External Bug:

Description

When creating an aggregate with 5 e1000g interfaces, the aggregate gets created, but a dladm show-link will only show the first 4.
Steps to reproduce:

root@danstore3:~# dladm create-aggr -l e1000g1 -l e1000g2 -l e1000g3 -l e1000g4 -l e1000g5 aggr1
root@danstore3:~# dladm show-link aggr1
LINK        CLASS     MTU    STATE    BRIDGE     OVER
aggr1       aggr      1500   up       --         e1000g1 e1000g2 e1000g3 e1000g4
root@danstore3:~# grep aggr1 /etc/dladm/datalink.conf 
aggr1   class=int,4;media=int,4;key=int,0;nports=int,5;portnames=string,e1000g1:e1000g2:e1000g3:e1000g4:e1000g5:;policy=int,4;fix_macaddr=boolean,0;force=boolean,0;lacp_mode=int,0;lacp_timer=int,1;

Actions #1

Updated by Dan Vatca over 11 years ago

While looking for the solution, I found out that the same limit applies to printing the BRIDGE field.

Actions #2

Updated by Igor Pashev over 11 years ago

I guess, it's a feature :-)

/*
 * structures for 'dladm show-link'
 */
static const ofmt_field_t link_fields[] = {
/* name,    field width,    index,    callback */
{ "LINK",    12,
    offsetof(link_fields_buf_t, link_name), print_default_cb},
{ "CLASS",    10,
    offsetof(link_fields_buf_t, link_class), print_default_cb},
{ "MTU",    7,
    offsetof(link_fields_buf_t, link_mtu), print_default_cb},
{ "STATE",    9,
    offsetof(link_fields_buf_t, link_state), print_default_cb},
{ "BRIDGE",    11,
    offsetof(link_fields_buf_t, link_bridge), print_default_cb},
{ "OVER",    DLPI_LINKNAME_MAX,
    offsetof(link_fields_buf_t, link_over), print_default_cb},
{ NULL,        0, 0, NULL}}
;
usr/src/lib/libdlpi/common/libdlpi.h:46:#define    DLPI_LINKNAME_MAX    32
Actions #3

Updated by Yuri Pankov almost 7 years ago

  • Subject changed from dladm show-link truncates OVER field to dladm show-link truncates BRIDGE and OVER fields
  • Status changed from New to In Progress
  • Assignee changed from Dan Vatca to Yuri Pankov
  • % Done changed from 0 to 50
  • Tags deleted (needs-triage)
Actions #4

Updated by Yuri Pankov almost 7 years ago

  • Subject changed from dladm show-link truncates BRIDGE and OVER fields to dladm show-link truncates OVER field
Actions #5

Updated by Electric Monk almost 7 years ago

  • Status changed from In Progress to Closed
  • % Done changed from 50 to 100

git commit 09c0accb630678e1a150310a8852806c5052b2ac

commit  09c0accb630678e1a150310a8852806c5052b2ac
Author: Yuri Pankov <yuri.pankov@nexenta.com>
Date:   2016-08-20T17:42:16.000Z

    1769 dladm show-link truncates OVER field
    Reviewed by: Richard Lowe <richlowe@richlowe.net>
    Reviewed by: Dan Vatca <dan@syneto.eu>
    Approved by: Richard Lowe <richlowe@richlowe.net>

Actions

Also available in: Atom PDF