From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id AFDD02629 for ; Mon, 22 Jan 2018 15:25:42 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 22 Jan 2018 06:25:41 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,396,1511856000"; d="scan'208";a="197588099" Received: from silpixa00372839.ir.intel.com (HELO silpixa00372839.ger.corp.intel.com) ([10.237.222.154]) by fmsmga005.fm.intel.com with ESMTP; 22 Jan 2018 06:25:40 -0800 From: Ferruh Yigit To: Yasufumi Ogawa Cc: spp@dpdk.org, Ferruh Yigit , nakamura.hioryuki@po.ntt-tx.co.jp Date: Mon, 22 Jan 2018 14:25:37 +0000 Message-Id: <20180122142537.20291-1-ferruh.yigit@intel.com> X-Mailer: git-send-email 2.14.3 Subject: [spp] [PATCH] spp_vf: fix build 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: Mon, 22 Jan 2018 14:25:43 -0000 build error: ...spp/src/vf/classifier_mac.c:314:5: error: format specifies type 'unsigned short' but the argument has type 'int' [-Werror,-Wformat] classified_data->num_pkt - n_tx, classified_data->port); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ...build/include/rte_log.h:316:32: note: expanded from macro 'RTE_LOG' RTE_LOGTYPE_ ## t, # t ": " __VA_ARGS__) ^~~~~~~~~~~ Looks like caused by integer promotion, to fix cast variable explicityly to uint16_t. Fixes: 11512d8b6c28 ("spp_vf: add vf functions") Cc: nakamura.hioryuki@po.ntt-tx.co.jp Signed-off-by: Ferruh Yigit --- Cc: Yasufumi Ogawa --- src/vf/classifier_mac.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/vf/classifier_mac.c b/src/vf/classifier_mac.c index 2e502a5..760d597 100644 --- a/src/vf/classifier_mac.c +++ b/src/vf/classifier_mac.c @@ -311,7 +311,8 @@ transmit_packet(struct classified_data *classified_data) rte_pktmbuf_free(classified_data->pkts[i]); RTE_LOG(DEBUG, SPP_CLASSIFIER_MAC, "drop packets(tx). num=%hu, dpdk_port=%hu\n", - classified_data->num_pkt - n_tx, classified_data->port); + (uint16_t)(classified_data->num_pkt - n_tx), + classified_data->port); } classified_data->num_pkt = 0; -- 2.14.3