Skip to content

Commit

Permalink
raw/skeleton: introduce skeleton rawdev driver
Browse files Browse the repository at this point in the history
Skeleton rawdevice driver, on the lines of eventdev skeleton, is for
showcasing the rawdev library. This driver implements some of the
operations of the library based on which a test module can be
developed.

Design of skeleton involves a virtual device which is plugged into
VDEV bus on initialization.

Also, enable compilation of rawdev skeleton driver.

Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
  • Loading branch information
Shreyansh Jain authored and tmonjalo committed Jan 31, 2018
1 parent 7ae5362 commit 61c592a
Show file tree
Hide file tree
Showing 9 changed files with 876 additions and 0 deletions.
1 change: 1 addition & 0 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,7 @@ Raw device API - EXPERIMENTAL
M: Shreyansh Jain <shreyansh.jain@nxp.com>
M: Hemant Agrawal <hemant.agrawal@nxp.com>
F: lib/librte_rawdev/
F: drivers/raw/skeleton_rawdev/


Bus Drivers
Expand Down
1 change: 1 addition & 0 deletions config/common_base
Original file line number Diff line number Diff line change
Expand Up @@ -611,6 +611,7 @@ CONFIG_RTE_LIBRTE_PMD_DPAA2_EVENTDEV=n
#
CONFIG_RTE_LIBRTE_RAWDEV=y
CONFIG_RTE_RAWDEV_MAX_DEVS=10
CONFIG_RTE_LIBRTE_PMD_SKELETON_RAWDEV=y

#
# Compile librte_ring
Expand Down
2 changes: 2 additions & 0 deletions drivers/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,7 @@ DIRS-$(CONFIG_RTE_LIBRTE_CRYPTODEV) += crypto
DEPDIRS-crypto := bus mempool
DIRS-$(CONFIG_RTE_LIBRTE_EVENTDEV) += event
DEPDIRS-event := bus mempool net
DIRS-$(CONFIG_RTE_LIBRTE_RAWDEV) += raw
DEPDIRS-raw := bus mempool net event

include $(RTE_SDK)/mk/rte.subdir.mk
9 changes: 9 additions & 0 deletions drivers/raw/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright 2017 NXP

include $(RTE_SDK)/mk/rte.vars.mk

# DIRS-$(<configuration>) += <directory>
DIRS-$(CONFIG_RTE_LIBRTE_PMD_SKELETON_RAWDEV) += skeleton_rawdev

include $(RTE_SDK)/mk/rte.subdir.mk
28 changes: 28 additions & 0 deletions drivers/raw/skeleton_rawdev/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright 2017 NXP

include $(RTE_SDK)/mk/rte.vars.mk

#
# library name
#
LIB = librte_pmd_skeleton_rawdev.a

CFLAGS += -DALLOW_EXPERIMENTAL_API
CFLAGS += -O3
CFLAGS += $(WERROR_FLAGS)
LDLIBS += -lrte_eal
LDLIBS += -lrte_rawdev
LDLIBS += -lrte_bus_vdev
LDLIBS += -lrte_kvargs

EXPORT_MAP := rte_pmd_skeleton_rawdev_version.map

LIBABIVER := 1

#
# all source are stored in SRCS-y
#
SRCS-$(CONFIG_RTE_LIBRTE_PMD_SKELETON_RAWDEV) += skeleton_rawdev.c

include $(RTE_SDK)/mk/rte.lib.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
DPDK_18.02 {

local: *;
};
Loading

0 comments on commit 61c592a

Please sign in to comment.