mirror of
https://git.kernel.org/pub/scm/network/iproute2/iproute2.git
synced 2024-11-15 22:15:13 +08:00
c2ecc82b9d
vdpa tool is created to create, delete and query vdpa devices. examples: Show vdpa management device that supports creating, deleting vdpa devices. $ vdpa mgmtdev show vdpasim: supported_classes net $ vdpa mgmtdev show -jp { "show": { "vdpasim": { "supported_classes": [ "net" ] } } } Create a vdpa device of type networking named as "foo2" from the management device vdpasim_net: $ vdpa dev add mgmtdev vdpasim_net name foo2 Show the newly created vdpa device by its name: $ vdpa dev show foo2 foo2: type network mgmtdev vdpasim_net vendor_id 0 max_vqs 2 max_vq_size 256 $ vdpa dev show foo2 -jp { "dev": { "foo2": { "type": "network", "mgmtdev": "vdpasim_net", "vendor_id": 0, "max_vqs": 2, "max_vq_size": 256 } } } Delete the vdpa device after its use: $ vdpa dev del foo2 Signed-off-by: Parav Pandit <parav@nvidia.com> Signed-off-by: David Ahern <dsahern@kernel.org>
26 lines
381 B
Makefile
26 lines
381 B
Makefile
# SPDX-License-Identifier: GPL-2.0
|
|
include ../config.mk
|
|
|
|
TARGETS :=
|
|
|
|
ifeq ($(HAVE_MNL),y)
|
|
|
|
CFLAGS += -I./include/uapi/
|
|
VDPAOBJ = vdpa.o
|
|
TARGETS += vdpa
|
|
|
|
endif
|
|
|
|
all: $(TARGETS) $(LIBS)
|
|
|
|
vdpa: $(VDPAOBJ)
|
|
$(QUIET_LINK)$(CC) $^ $(LDFLAGS) $(LDLIBS) -o $@
|
|
|
|
install: all
|
|
for i in $(TARGETS); \
|
|
do install -m 0755 $$i $(DESTDIR)$(SBINDIR); \
|
|
done
|
|
|
|
clean:
|
|
rm -f $(VDPAOBJ) $(TARGETS)
|