From: yasufum.o@gmail.com
To: spp@dpdk.org, ferruh.yigit@intel.com, yasufum.o@gmail.com
Subject: [spp] [PATCH 2/4] spp_vf: change to use burst funcs with VLAN
Date: Mon, 1 Jul 2019 13:11:24 +0900 [thread overview]
Message-ID: <20190701041126.33947-3-yasufum.o@gmail.com> (raw)
In-Reply-To: <20190701041126.33947-1-yasufum.o@gmail.com>
From: Yasufumi Ogawa <yasufum.o@gmail.com>
This update is to change to use RX and TX burst functions which were
added in the previous patch.
Signed-off-by: Yasufumi Ogawa <yasufum.o@gmail.com>
---
src/vf/Makefile | 2 +-
src/vf/classifier_mac.c | 8 ++++----
src/vf/forwarder.c | 5 +++--
src/vf/spp_vf.c | 1 +
src/vf/vf_cmd_runner.c | 1 +
5 files changed, 10 insertions(+), 7 deletions(-)
diff --git a/src/vf/Makefile b/src/vf/Makefile
index 1d6cb7c..35f13e5 100644
--- a/src/vf/Makefile
+++ b/src/vf/Makefile
@@ -20,7 +20,7 @@ SRCS-y += $(SPP_SEC_DIR)/string_buffer.c
SRCS-y += $(SPP_SEC_DIR)/json_helper.c
SRCS-y += $(SPP_SEC_DIR)/utils.c $(SPP_SEC_DIR)/add_port.c
SRCS-y += $(SPP_WKT_DIR)/ringlatencystats.c
-SRCS-y += $(SPP_WKT_DIR)/spp_port.c
+SRCS-y += $(SPP_WKT_DIR)/port_capability.c
SRCS-y += $(SPP_WKT_DIR)/conn_spp_ctl.c
SRCS-y += $(SPP_WKT_DIR)/cmd_parser.c
SRCS-y += ../shared/common.c
diff --git a/src/vf/classifier_mac.c b/src/vf/classifier_mac.c
index a1d6ba4..6850962 100644
--- a/src/vf/classifier_mac.c
+++ b/src/vf/classifier_mac.c
@@ -28,7 +28,7 @@
#include "shared/secondary/json_helper.h"
#include "shared/secondary/spp_worker_th/cmd_res_formatter.h"
#include "shared/secondary/spp_worker_th/vf_deps.h"
-#include "shared/secondary/spp_worker_th/spp_port.h"
+#include "shared/secondary/spp_worker_th/port_capability.h"
#define RTE_LOGTYPE_SPP_CLASSIFIER_MAC RTE_LOGTYPE_USER1
@@ -460,7 +460,7 @@ transmit_packet(struct cls_port_info *clsd_data)
uint16_t n_tx;
/* transmit packets */
- n_tx = spp_eth_tx_burst(clsd_data->ethdev_port_id, 0,
+ n_tx = sppwk_eth_vlan_tx_burst(clsd_data->ethdev_port_id, 0,
clsd_data->pkts, clsd_data->nof_pkts);
/* free cannot transmit packets */
@@ -797,8 +797,8 @@ spp_classifier_mac_do(int id)
return SPP_RET_OK;
/* retrieve packets */
- n_rx = spp_eth_rx_burst(clsd_data_rx->ethdev_port_id, 0, rx_pkts,
- MAX_PKT_BURST);
+ n_rx = sppwk_eth_vlan_rx_burst(clsd_data_rx->ethdev_port_id, 0,
+ rx_pkts, MAX_PKT_BURST);
if (unlikely(n_rx == 0))
return SPP_RET_OK;
diff --git a/src/vf/forwarder.c b/src/vf/forwarder.c
index e5cc963..77afc4e 100644
--- a/src/vf/forwarder.c
+++ b/src/vf/forwarder.c
@@ -9,6 +9,7 @@
#include "shared/secondary/return_codes.h"
#include "shared/secondary/spp_worker_th/vf_deps.h"
#include "shared/secondary/spp_worker_th/spp_port.h"
+#include "shared/secondary/spp_worker_th/port_capability.h"
#define RTE_LOGTYPE_FORWARD RTE_LOGTYPE_USER1
@@ -212,14 +213,14 @@ forward_packets(int id)
tx = &path->ports[cnt].tx;
/* Receive packets */
- nb_rx = spp_eth_rx_burst(rx->ethdev_port_id, 0,
+ nb_rx = sppwk_eth_vlan_rx_burst(rx->ethdev_port_id, 0,
bufs, MAX_PKT_BURST);
if (unlikely(nb_rx == 0))
continue;
/* Send packets */
if (tx->ethdev_port_id >= 0)
- nb_tx = spp_eth_tx_burst(tx->ethdev_port_id,
+ nb_tx = sppwk_eth_vlan_tx_burst(tx->ethdev_port_id,
0, bufs, nb_rx);
/* Discard remained packets to release mbuf */
diff --git a/src/vf/spp_vf.c b/src/vf/spp_vf.c
index 18a3619..504ee26 100644
--- a/src/vf/spp_vf.c
+++ b/src/vf/spp_vf.c
@@ -16,6 +16,7 @@
#include "shared/secondary/spp_worker_th/cmd_runner.h"
#include "shared/secondary/spp_worker_th/cmd_parser.h"
#include "shared/secondary/spp_worker_th/spp_port.h"
+#include "shared/secondary/spp_worker_th/port_capability.h"
/* Declare global variables */
/* Interface management information */
diff --git a/src/vf/vf_cmd_runner.c b/src/vf/vf_cmd_runner.c
index fe37a19..5246af7 100644
--- a/src/vf/vf_cmd_runner.c
+++ b/src/vf/vf_cmd_runner.c
@@ -6,6 +6,7 @@
#include "forwarder.h"
#include "shared/secondary/return_codes.h"
#include "shared/secondary/json_helper.h"
+#include "shared/secondary/spp_worker_th/port_capability.h"
#include "shared/secondary/spp_worker_th/cmd_parser.h"
#include "shared/secondary/spp_worker_th/cmd_runner.h"
#include "shared/secondary/spp_worker_th/cmd_res_formatter.h"
--
2.17.1
next prev parent reply other threads:[~2019-07-01 4:11 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-01 4:11 [spp] [PATCH 0/4] Add specific RX and TX burst functions yasufum.o
2019-07-01 4:11 ` [spp] [PATCH 1/4] shared/sec: Add RX and TX burst without VLAN yasufum.o
2019-07-01 4:11 ` yasufum.o [this message]
2019-07-01 4:11 ` [spp] [PATCH 3/4] spp_mirror: change to use burst funcs with VLAN yasufum.o
2019-07-01 4:11 ` [spp] [PATCH 4/4] spp_pcap: update include path of port capability yasufum.o
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190701041126.33947-3-yasufum.o@gmail.com \
--to=yasufum.o@gmail.com \
--cc=ferruh.yigit@intel.com \
--cc=spp@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).