2012-09-04 12:54:00 +00:00
|
|
|
# BSD LICENSE
|
2014-06-03 23:42:50 +00:00
|
|
|
#
|
2015-05-15 15:56:46 +00:00
|
|
|
# Copyright(c) 2010-2015 Intel Corporation. All rights reserved.
|
2012-09-04 12:54:00 +00:00
|
|
|
# All rights reserved.
|
2014-06-03 23:42:50 +00:00
|
|
|
#
|
2013-09-18 10:00:00 +00:00
|
|
|
# Redistribution and use in source and binary forms, with or without
|
|
|
|
# modification, are permitted provided that the following conditions
|
2012-09-04 12:54:00 +00:00
|
|
|
# are met:
|
2014-06-03 23:42:50 +00:00
|
|
|
#
|
2013-09-18 10:00:00 +00:00
|
|
|
# * Redistributions of source code must retain the above copyright
|
2012-09-04 12:54:00 +00:00
|
|
|
# notice, this list of conditions and the following disclaimer.
|
2013-09-18 10:00:00 +00:00
|
|
|
# * Redistributions in binary form must reproduce the above copyright
|
|
|
|
# notice, this list of conditions and the following disclaimer in
|
|
|
|
# the documentation and/or other materials provided with the
|
2012-09-04 12:54:00 +00:00
|
|
|
# distribution.
|
2013-09-18 10:00:00 +00:00
|
|
|
# * Neither the name of Intel Corporation nor the names of its
|
|
|
|
# contributors may be used to endorse or promote products derived
|
2012-09-04 12:54:00 +00:00
|
|
|
# from this software without specific prior written permission.
|
2014-06-03 23:42:50 +00:00
|
|
|
#
|
2013-09-18 10:00:00 +00:00
|
|
|
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
|
|
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
|
|
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
|
|
|
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
|
|
|
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
|
|
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
|
|
|
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
|
|
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
|
|
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
|
|
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
2012-09-04 12:54:00 +00:00
|
|
|
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
|
|
|
|
|
include $(RTE_SDK)/mk/rte.vars.mk
|
|
|
|
|
2014-08-18 11:29:19 +00:00
|
|
|
ifeq ($(CONFIG_RTE_TEST_PMD),y)
|
|
|
|
|
2012-09-04 12:54:00 +00:00
|
|
|
#
|
|
|
|
# library name
|
|
|
|
#
|
|
|
|
APP = testpmd
|
|
|
|
|
|
|
|
CFLAGS += -O3
|
|
|
|
CFLAGS += $(WERROR_FLAGS)
|
|
|
|
|
|
|
|
#
|
|
|
|
# all source are stored in SRCS-y
|
|
|
|
#
|
2014-08-18 11:29:19 +00:00
|
|
|
SRCS-y := testpmd.c
|
|
|
|
SRCS-y += parameters.c
|
|
|
|
SRCS-$(CONFIG_RTE_LIBRTE_CMDLINE) += cmdline.c
|
2016-12-21 14:51:23 +00:00
|
|
|
SRCS-$(CONFIG_RTE_LIBRTE_CMDLINE) += cmdline_flow.c
|
2014-08-18 11:29:19 +00:00
|
|
|
SRCS-y += config.c
|
|
|
|
SRCS-y += iofwd.c
|
|
|
|
SRCS-y += macfwd.c
|
|
|
|
SRCS-y += macswap.c
|
|
|
|
SRCS-y += flowgen.c
|
|
|
|
SRCS-y += rxonly.c
|
|
|
|
SRCS-y += txonly.c
|
|
|
|
SRCS-y += csumonly.c
|
|
|
|
SRCS-y += icmpecho.c
|
|
|
|
SRCS-$(CONFIG_RTE_LIBRTE_IEEE1588) += ieee1588fwd.c
|
2014-02-12 15:32:25 +00:00
|
|
|
|
app/testpmd: add traffic management forwarding mode
This commit extends the testpmd application with new forwarding engine
that demonstrates the use of ethdev traffic management APIs and softnic
PMD for QoS traffic management.
In this mode, 5-level hierarchical tree of the QoS scheduler is built
with the help of ethdev TM APIs such as shaper profile add/delete,
shared shaper add/update, node add/delete, hierarchy commit, etc.
The hierarchical tree has following nodes; root node(x1, level 0),
subport node(x1, level 1), pipe node(x4096, level 2),
tc node(x16348, level 3), queue node(x65536, level 4).
During runtime, each received packet is first classified by mapping the
packet fields information to 5-tuples (HQoS subport, pipe, traffic class,
queue within traffic class, and color) and storing it in the packet mbuf
sched field. After classification, each packet is sent to softnic port
which prioritizes the transmission of the received packets, and
accordingly sends them on to the output interface.
To enable traffic management mode, following testpmd command is used;
$ ./testpmd -c c -n 4 --vdev
'net_softnic0,hard_name=0000:06:00.1,soft_tm=on' -- -i
--forward-mode=tm
Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
2017-10-10 10:18:18 +00:00
|
|
|
ifeq ($(CONFIG_RTE_LIBRTE_PMD_SOFTNIC)$(CONFIG_RTE_LIBRTE_SCHED),yy)
|
|
|
|
SRCS-y += tm.c
|
|
|
|
endif
|
|
|
|
|
2017-01-12 07:46:54 +00:00
|
|
|
ifeq ($(CONFIG_RTE_BUILD_SHARED_LIB),y)
|
2017-01-31 15:04:47 +00:00
|
|
|
|
2017-01-31 15:04:48 +00:00
|
|
|
ifeq ($(CONFIG_RTE_LIBRTE_PMD_BOND),y)
|
|
|
|
LDLIBS += -lrte_pmd_bond
|
|
|
|
endif
|
|
|
|
|
2017-01-31 15:04:47 +00:00
|
|
|
ifeq ($(CONFIG_RTE_LIBRTE_IXGBE_PMD),y)
|
|
|
|
LDLIBS += -lrte_pmd_ixgbe
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(CONFIG_RTE_LIBRTE_I40E_PMD),y)
|
|
|
|
LDLIBS += -lrte_pmd_i40e
|
|
|
|
endif
|
|
|
|
|
2017-06-01 17:07:16 +00:00
|
|
|
ifeq ($(CONFIG_RTE_LIBRTE_BNXT_PMD),y)
|
|
|
|
LDLIBS += -lrte_pmd_bnxt
|
|
|
|
endif
|
|
|
|
|
app/testpmd: add traffic management forwarding mode
This commit extends the testpmd application with new forwarding engine
that demonstrates the use of ethdev traffic management APIs and softnic
PMD for QoS traffic management.
In this mode, 5-level hierarchical tree of the QoS scheduler is built
with the help of ethdev TM APIs such as shaper profile add/delete,
shared shaper add/update, node add/delete, hierarchy commit, etc.
The hierarchical tree has following nodes; root node(x1, level 0),
subport node(x1, level 1), pipe node(x4096, level 2),
tc node(x16348, level 3), queue node(x65536, level 4).
During runtime, each received packet is first classified by mapping the
packet fields information to 5-tuples (HQoS subport, pipe, traffic class,
queue within traffic class, and color) and storing it in the packet mbuf
sched field. After classification, each packet is sent to softnic port
which prioritizes the transmission of the received packets, and
accordingly sends them on to the output interface.
To enable traffic management mode, following testpmd command is used;
$ ./testpmd -c c -n 4 --vdev
'net_softnic0,hard_name=0000:06:00.1,soft_tm=on' -- -i
--forward-mode=tm
Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
2017-10-10 10:18:18 +00:00
|
|
|
ifeq ($(CONFIG_RTE_LIBRTE_PMD_XENVIRT),y)
|
|
|
|
LDLIBS += -lrte_pmd_xenvirt
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(CONFIG_RTE_LIBRTE_PMD_SOFTNIC),y)
|
|
|
|
LDLIBS += -lrte_pmd_softnic
|
|
|
|
endif
|
|
|
|
|
2017-01-12 07:46:54 +00:00
|
|
|
endif
|
2016-10-12 17:54:12 +00:00
|
|
|
|
2014-02-12 15:32:25 +00:00
|
|
|
CFLAGS_cmdline.o := -D_GNU_SOURCE
|
2012-09-04 12:54:00 +00:00
|
|
|
|
|
|
|
include $(RTE_SDK)/mk/rte.app.mk
|
2014-08-18 11:29:19 +00:00
|
|
|
|
|
|
|
endif
|