From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail04.ics.ntt-tx.co.jp (mail05.ics.ntt-tx.co.jp [210.232.35.69]) by dpdk.org (Postfix) with ESMTP id 63F551B00F for ; Wed, 10 Jan 2018 03:48:03 +0100 (CET) Received: from gwchk03.silk.ntt-tx.co.jp (gwchk03.silk.ntt-tx.co.jp [10.107.0.111]) by mail04.ics.ntt-tx.co.jp (unknown) with ESMTP id w0A2m2vp010105 for unknown; Wed, 10 Jan 2018 11:48:02 +0900 Received: (from root@localhost) by gwchk03.silk.ntt-tx.co.jp (unknown) id w0A2m2xF023029 for unknown; Wed, 10 Jan 2018 11:48:02 +0900 Received: from gwchk.silk.ntt-tx.co.jp [10.107.0.110] by gwchk03.silk.ntt-tx.co.jp with ESMTP id MAA23026; Wed, 10 Jan 2018 11:48:02 +0900 Received: from imss03.silk.ntt-tx.co.jp (localhost [127.0.0.1]) by imss03.silk.ntt-tx.co.jp (unknown) with ESMTP id w0A2m1C3006365 for unknown; Wed, 10 Jan 2018 11:48:01 +0900 Received: from mgate02.silk.ntt-tx.co.jp (smtp02.silk.ntt-tx.co.jp [10.107.0.37]) by imss03.silk.ntt-tx.co.jp (unknown) with ESMTP id w0A2m1rX006360 for unknown; Wed, 10 Jan 2018 11:48:01 +0900 Message-Id: <201801100248.w0A2m1rX006360@imss03.silk.ntt-tx.co.jp> Received: from localhost by mgate02.silk.ntt-tx.co.jp (unknown) id w0A2m1wC005491 ; Wed, 10 Jan 2018 11:48:01 +0900 From: x-fn-spp@sl.ntt-tx.co.jp To: spp@dpdk.org Date: Wed, 10 Jan 2018 11:48:00 +0900 X-Mailer: git-send-email 1.9.1 In-Reply-To: <201801100246.w0A2kio5005692@imss03.silk.ntt-tx.co.jp> References: <201801100246.w0A2kio5005692@imss03.silk.ntt-tx.co.jp> X-TM-AS-MML: No Subject: [spp] [PATCH 3/4] spp_vf: change type of port_id to uint16_t X-BeenThere: spp@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Soft Patch Panel List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Jan 2018 02:48:05 -0000 From: Hiroyuki Nakamura 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 Signed-off-by: Yasufumi Ogawa --- 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