From: x-fn-spp@sl.ntt-tx.co.jp
To: spp@dpdk.org
Subject: [spp] [PATCH 3/4] spp_vf: change type of port_id to uint16_t
Date: Wed, 10 Jan 2018 11:48:00 +0900 [thread overview]
Message-ID: <201801100248.w0A2m1rX006360@imss03.silk.ntt-tx.co.jp> (raw)
In-Reply-To: <201801100246.w0A2kio5005692@imss03.silk.ntt-tx.co.jp>
From: Hiroyuki Nakamura <nakamura.hioryuki@po.ntt-tx.co.jp>
In SPP, type of port_id is int while it is changed from uint8_t to
uint16_t in DPDK 17.11. It causes compile errors for incompatible
pointer type.
Signed-off-by: Daiki Yamashita <yamashita.daiki.z01@as.ntt-tx.co.jp>
Signed-off-by: Yasufumi Ogawa <ogawa.yasufumi@lab.ntt.co.jp>
---
src/vf/classifier_mac.c | 6 +++---
src/vf/spp_vf.c | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/vf/classifier_mac.c b/src/vf/classifier_mac.c
index b42c4ac..2e502a5 100644
--- a/src/vf/classifier_mac.c
+++ b/src/vf/classifier_mac.c
@@ -68,7 +68,7 @@ struct classified_data {
enum port_type if_type; /* interface type (see "enum port_type") */
int if_no; /* index of ports handled by classifier */
int if_no_global; /* id for interface generated by spp_vf */
- uint8_t port; /* id for port generated by DPDK */
+ uint16_t port; /* port id generated by DPDK */
uint16_t num_pkt; /* the number of packets in pkts[] */
struct rte_mbuf *pkts[MAX_PKT_BURST]; /* packet array to be classified */
};
@@ -310,7 +310,7 @@ transmit_packet(struct classified_data *classified_data)
for (i = n_tx; i < classified_data->num_pkt; i++)
rte_pktmbuf_free(classified_data->pkts[i]);
RTE_LOG(DEBUG, SPP_CLASSIFIER_MAC,
- "drop packets(tx). num=%hu, dpdk_port=%hhu\n",
+ "drop packets(tx). num=%hu, dpdk_port=%hu\n",
classified_data->num_pkt - n_tx, classified_data->port);
}
@@ -348,7 +348,7 @@ push_packet(struct rte_mbuf *pkt, struct classified_data *classified_data)
if (unlikely(classified_data->num_pkt == MAX_PKT_BURST)) {
RTE_LOG(DEBUG, SPP_CLASSIFIER_MAC,
"transimit packets (buffer is filled). "
- "if_type=%d, if_no={%d,%d}, tx_port=%hhd, num_pkt=%hu\n",
+ "if_type=%d, if_no={%d,%d}, tx_port=%hu, num_pkt=%hu\n",
classified_data->if_type,
classified_data->if_no_global,
classified_data->if_no,
diff --git a/src/vf/spp_vf.c b/src/vf/spp_vf.c
index feb7f4d..3613d46 100644
--- a/src/vf/spp_vf.c
+++ b/src/vf/spp_vf.c
@@ -161,7 +161,7 @@ add_vhost_pmd(int index, int client)
.rxmode = { .max_rx_pkt_len = ETHER_MAX_LEN }
};
struct rte_mempool *mp;
- uint8_t vhost_port_id;
+ uint16_t vhost_port_id;
int nr_queues = 1;
const char *name;
char devargs[64];
--
1.9.1
next prev parent reply other threads:[~2018-01-10 2:48 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-10 2:46 [spp] Patches for spp_vf on DPDK17.11 x-fn-spp
2018-01-10 2:47 ` [spp] [PATCH 1/4] spp_vf: fix to eliminate jansson package x-fn-spp
2018-01-19 0:37 ` Yasufumi Ogawa
2018-01-10 2:47 ` [spp] [PATCH 2/4] spp_vf: support cancel command x-fn-spp
2018-01-10 2:48 ` x-fn-spp [this message]
2018-01-10 2:48 ` [spp] [PATCH 4/4] spp_vf: fix bug of status command x-fn-spp
2018-01-10 7:53 ` [spp] Patches for spp_vf on DPDK17.11 Yasufumi Ogawa
2018-01-13 13:38 ` Ferruh Yigit
2018-01-15 2:08 ` Yasufumi Ogawa
2018-01-19 0:30 ` Yasufumi Ogawa
2018-01-22 14:04 ` Ferruh Yigit
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=201801100248.w0A2m1rX006360@imss03.silk.ntt-tx.co.jp \
--to=x-fn-spp@sl.ntt-tx.co.jp \
--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).