Add a new function in vDPA tool to support set MAC address.
Currently, the kernel only supports setting the MAC address.
Update the man page to include usage for setting the MAC address.
The usage is: vdpa dev set name vdpa_name mac **:**:**:**:**
here is example:
root@L1# vdpa -jp dev config show vdpa0
{
"config": {
"vdpa0": {
"mac": "82:4d:e9:5d:d7:e6",
"link ": "up",
"link_announce ": false,
"mtu": 1500
}
}
}
root@L1# vdpa dev set name vdpa0 mac 00:11:22:33:44:55
root@L1# vdpa -jp dev config show vdpa0
{
"config": {
"vdpa0": {
"mac": "00:11:22:33:44:55",
"link ": "up",
"link_announce ": false,
"mtu": 1500
}
}
}
Signed-off-by: Cindy Lu <lulu@redhat.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
202 lines
4.2 KiB
Groff
202 lines
4.2 KiB
Groff
.TH DEVLINK\-DEV 8 "5 Jan 2021" "iproute2" "Linux"
|
|
.SH NAME
|
|
vdpa-dev \- vdpa device configuration
|
|
.SH SYNOPSIS
|
|
.sp
|
|
.ad l
|
|
.in +8
|
|
.ti -8
|
|
.B vdpa
|
|
.B dev
|
|
.RI "[ " OPTIONS " ] "
|
|
.RI " { " COMMAND | " "
|
|
.BR help " }"
|
|
.sp
|
|
|
|
.ti -8
|
|
.IR OPTIONS " := { "
|
|
\fB\-V\fR[\fIersion\fR]
|
|
}
|
|
|
|
.ti -8
|
|
.B vdpa dev show
|
|
.RI "[ " DEV " ]"
|
|
|
|
.ti -8
|
|
.B vdpa dev help
|
|
|
|
.ti -8
|
|
.B vdpa dev add
|
|
.B name
|
|
.I NAME
|
|
.B mgmtdev
|
|
.I MGMTDEV
|
|
.RI "[ device_features " DEVICE_FEATURES " ]"
|
|
.RI "[ mac " MACADDR " ]"
|
|
.RI "[ mtu " MTU " ]"
|
|
.RI "[ max_vqp " MAX_VQ_PAIRS " ]"
|
|
|
|
.ti -8
|
|
.B vdpa dev del
|
|
.I DEV
|
|
|
|
.ti -8
|
|
.B vdpa dev config show
|
|
.RI "[ " DEV " ]"
|
|
|
|
.ti -8
|
|
.B vdpa dev vstats show
|
|
.I DEV
|
|
.B qidx
|
|
.I QUEUE_INDEX
|
|
|
|
.ti -8
|
|
.B vdpa dev set
|
|
.B name
|
|
.I NAME
|
|
.B mac
|
|
.RI "[ " MACADDR " ]"
|
|
|
|
.SH "DESCRIPTION"
|
|
.SS vdpa dev show - display vdpa device attributes
|
|
|
|
.PP
|
|
.I "DEV"
|
|
- specifies the vdpa device to show.
|
|
If this argument is omitted all devices are listed.
|
|
|
|
.in +4
|
|
Format is:
|
|
.in +2
|
|
VDPA_DEVICE_NAME
|
|
|
|
.SS vdpa dev add - add a new vdpa device.
|
|
|
|
.TP
|
|
.BI name " NAME"
|
|
Name of the new vdpa device to add.
|
|
|
|
.TP
|
|
.BI mgmtdev " MGMTDEV"
|
|
Name of the management device to use for device addition.
|
|
|
|
.PP
|
|
.BI device_features " DEVICE_FEATURES"
|
|
Specifies the virtio device features bit-mask that is provisioned for the new vdpa device.
|
|
|
|
The bits can be found under include/uapi/linux/virtio*h.
|
|
|
|
see macros such as VIRTIO_F_ and VIRTIO_XXX(e.g NET)_F_ for specific bit values.
|
|
|
|
This is optional.
|
|
|
|
.BI mac " MACADDR"
|
|
- specifies the mac address for the new vdpa device.
|
|
This is applicable only for the network type of vdpa device. This is optional.
|
|
|
|
.BI mtu " MTU"
|
|
- specifies the mtu for the new vdpa device.
|
|
This is applicable only for the network type of vdpa device. This is optional.
|
|
|
|
.SS vdpa dev del - Delete the vdpa device.
|
|
|
|
.PP
|
|
.I "DEV"
|
|
- specifies the vdpa device to delete.
|
|
|
|
.SS vdpa dev config show - Show configuration of specific device or all devices.
|
|
|
|
.PP
|
|
.I "DEV"
|
|
- specifies the vdpa device to show its configuration.
|
|
If this argument is omitted all devices configuration is listed.
|
|
|
|
.in +4
|
|
Format is:
|
|
.in +2
|
|
VDPA_DEVICE_NAME
|
|
|
|
.SS vdpa dev vstats show - shows vendor specific statistics for the given device and virtqueue index. The information is presented as name-value pairs where name is the name of the field and value is a numeric value for it.
|
|
|
|
.TP
|
|
.BI "DEV"
|
|
- specifies the vdpa device to query
|
|
|
|
.TP
|
|
.BI qidx " QUEUE_INDEX"
|
|
- specifies the virtqueue index to query
|
|
|
|
.SS vdpa dev set - set the configuration to the vdpa device.
|
|
|
|
.BI name " NAME"
|
|
-Name of the vdpa device to configure.
|
|
|
|
.BI mac " MACADDR"
|
|
- specifies the mac address for the vdpa device.
|
|
This is applicable only for the network type of vdpa device.
|
|
|
|
.SH "EXAMPLES"
|
|
.PP
|
|
vdpa dev show
|
|
.RS 4
|
|
Shows the all vdpa devices on the system.
|
|
.RE
|
|
.PP
|
|
vdpa dev show foo
|
|
.RS 4
|
|
Shows the specified vdpa device.
|
|
.RE
|
|
.PP
|
|
vdpa dev add name foo mgmtdev vdpa_sim_net
|
|
.RS 4
|
|
Add the vdpa device named foo on the management device vdpa_sim_net.
|
|
.RE
|
|
.PP
|
|
vdpa dev add name foo mgmtdev vdpa_sim_net device_features 0x300020000
|
|
.RS 4
|
|
Add the vdpa device named foo on the management device vdpa_sim_net with device_features of 0x300020000
|
|
.RE
|
|
.PP
|
|
vdpa dev add name foo mgmtdev vdpa_sim_net mac 00:11:22:33:44:55
|
|
.RS 4
|
|
Add the vdpa device named foo on the management device vdpa_sim_net with mac address of 00:11:22:33:44:55.
|
|
.RE
|
|
.PP
|
|
vdpa dev add name foo mgmtdev vdpa_sim_net mac 00:11:22:33:44:55 mtu 9000
|
|
.RS 4
|
|
Add the vdpa device named foo on the management device vdpa_sim_net with mac address of 00:11:22:33:44:55 and mtu of 9000 bytes.
|
|
.RE
|
|
.PP
|
|
vdpa dev add name foo mgmtdev auxiliary/mlx5_core.sf.1 mac 00:11:22:33:44:55 max_vqp 8
|
|
.RS 4
|
|
Add the vdpa device named foo on the management device auxiliary/mlx5_core.sf.1 with mac address of 00:11:22:33:44:55 and max 8 virtqueue pairs
|
|
.RE
|
|
.PP
|
|
vdpa dev del foo
|
|
.RS 4
|
|
Delete the vdpa device named foo which was previously created.
|
|
.RE
|
|
.PP
|
|
vdpa dev config show foo
|
|
.RS 4
|
|
Shows the vdpa device configuration of device named foo.
|
|
.RE
|
|
.PP
|
|
vdpa dev vstats show vdpa0 qidx 1
|
|
.RS 4
|
|
Shows vendor specific statistics information for vdpa device vdpa0 and virtqueue index 1
|
|
.RE
|
|
.PP
|
|
vdpa dev set name vdpa0 mac 00:11:22:33:44:55
|
|
.RS 4
|
|
Set a specific MAC address to vdpa device vdpa0
|
|
.RE
|
|
|
|
.SH SEE ALSO
|
|
.BR vdpa (8),
|
|
.BR vdpa-mgmtdev (8),
|
|
.br
|
|
|
|
.SH AUTHOR
|
|
Parav Pandit <parav@nvidia.com>
|