From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 92845A0613 for ; Fri, 27 Sep 2019 13:53:59 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 8C29B1BEE4; Fri, 27 Sep 2019 13:53:59 +0200 (CEST) Received: from mail-pf1-f194.google.com (mail-pf1-f194.google.com [209.85.210.194]) by dpdk.org (Postfix) with ESMTP id 717961BEE4 for ; Fri, 27 Sep 2019 13:53:57 +0200 (CEST) Received: by mail-pf1-f194.google.com with SMTP id y22so1462517pfr.3 for ; Fri, 27 Sep 2019 04:53:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references; bh=kg0If1eurM2sDVTKBke5G4OEpjtPpVXPA0lvdejsvUU=; b=UF1HlYhGOoKuU9PKaA4fDslteYIDQkmW5xxF8PkSVo2kHFtKliJ8khbXTnJNqQD/2c WqTimIsP3kJjIoBMvJY3ylIPFXDwB4M17jZSU72pVJw+ZV9R3oTvwUbhgloHF+Vhl9rF v2ZObxRZbxRItHGxM1NL8oU2lSazrNj7+29p/7MvUNmHjA+nL3zaS5T5VWbOBjes+dEp JFZF9wswvi0yvEERbmOY50qucMm5aGSZXiwYgQ4Qo/+G7wgt/VjL6t7Bv7w7SbTAehE2 jWEK9O3MHpdsutwWYha6fTaBTAuCAp8t0YuK/wZ2DPFwXAGbvBqPccZOv9ZD6fL3LHYq Brmg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=kg0If1eurM2sDVTKBke5G4OEpjtPpVXPA0lvdejsvUU=; b=GHcqoC3QrkBMx04035ELj4LOz6/Hf01zO3DeKwOoXUDU5MxvWH24hsp7cwCsxzIF3V YA2HyetACW5OnnHzX7iI1mYjXD0h3DzML3A7VwaPTpNGUW623gj2A0wDIeXZO2vKySKi qCRNWiwmlUZ1mTBMtq94e8Fuc1qG1OP5/qy/eYtLXNmYZZsXNaKzPG9JZQqRq1LDauUv 7V0AZE4ddTB1yorw2CNCTSJVri9TI6WpwfRDnLT/+gDKQiNH2NrvKAQZzWYC9owFCwlH xdFUATA3DJjCD1L5ZBhDN7rMQG2H3FLNzn8DX26QDQa5dBJW5DHtBeBgaOGjEwOTjJVH 2hVQ== X-Gm-Message-State: APjAAAV9iOkbZTUmR6rLDgm6W/5O7hfk5r4O3CK75MAXXSx1/zvpq8NL IfkByEQERUoxkiRElixuI9OOeXfH X-Google-Smtp-Source: APXvYqyk5ob8al3SvdwoH5oOLfDXt969tZgqaIkMZxMGHRQ3S2dZ1vMJd4FQrNHzomcKN9ZWQmZSCg== X-Received: by 2002:a63:c947:: with SMTP id y7mr9016016pgg.345.1569585236503; Fri, 27 Sep 2019 04:53:56 -0700 (PDT) Received: from localhost.localdomain ([2400:4050:c8c2:de00:1cd5:c7a9:dd6b:86d2]) by smtp.gmail.com with ESMTPSA id 37sm5117291pgv.32.2019.09.27.04.53.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 27 Sep 2019 04:53:56 -0700 (PDT) From: Yasufumi Ogawa To: spp@dpdk.org, ferruh.yigit@intel.com, yasufum.o@gmail.com Date: Fri, 27 Sep 2019 20:53:47 +0900 Message-Id: <20190927115349.13081-2-yasufum.o@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190927115349.13081-1-yasufum.o@gmail.com> References: <20190927115349.13081-1-yasufum.o@gmail.com> Subject: [spp] [PATCH 1/3] shared: add rte prefix for DPDK v19.08 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: , Errors-To: spp-bounces@dpdk.org Sender: "spp" As some structs and functions were renamed in DPDK while updating to v19.08, this update is to follow the update. >From this update, it cannot compile with DPDK vf19.05 or before. Signed-off-by: Yasufumi Ogawa --- src/shared/secondary/add_port.c | 6 ++-- .../secondary/spp_worker_th/cmd_utils.c | 2 +- .../secondary/spp_worker_th/port_capability.c | 30 +++++++++---------- 3 files changed, 19 insertions(+), 19 deletions(-) diff --git a/src/shared/secondary/add_port.c b/src/shared/secondary/add_port.c index 2981085..b072140 100644 --- a/src/shared/secondary/add_port.c +++ b/src/shared/secondary/add_port.c @@ -142,7 +142,7 @@ int add_vhost_pmd(int index) { struct rte_eth_conf port_conf = { - .rxmode = { .max_rx_pkt_len = ETHER_MAX_LEN } + .rxmode = { .max_rx_pkt_len = RTE_ETHER_MAX_LEN } }; struct rte_mempool *mp; uint16_t vhost_port_id; @@ -225,7 +225,7 @@ int add_pcap_pmd(int index) { struct rte_eth_conf port_conf = { - .rxmode = { .max_rx_pkt_len = ETHER_MAX_LEN } + .rxmode = { .max_rx_pkt_len = RTE_ETHER_MAX_LEN } }; struct rte_mempool *mp; @@ -306,7 +306,7 @@ int add_null_pmd(int index) { struct rte_eth_conf port_conf = { - .rxmode = { .max_rx_pkt_len = ETHER_MAX_LEN } + .rxmode = { .max_rx_pkt_len = RTE_ETHER_MAX_LEN } }; struct rte_mempool *mp; diff --git a/src/shared/secondary/spp_worker_th/cmd_utils.c b/src/shared/secondary/spp_worker_th/cmd_utils.c index f3d5de8..010a4b6 100644 --- a/src/shared/secondary/spp_worker_th/cmd_utils.c +++ b/src/shared/secondary/spp_worker_th/cmd_utils.c @@ -759,7 +759,7 @@ sppwk_convert_mac_str_to_int64(const char *macaddr) break; /* Check for mal-formatted address */ - if (unlikely(token_cnt >= ETHER_ADDR_LEN)) { + if (unlikely(token_cnt >= RTE_ETHER_ADDR_LEN)) { RTE_LOG(ERR, WK_CMD_UTILS, "Invalid MAC address `%s`.\n", macaddr); diff --git a/src/shared/secondary/spp_worker_th/port_capability.c b/src/shared/secondary/spp_worker_th/port_capability.c index ccef496..5435db0 100644 --- a/src/shared/secondary/spp_worker_th/port_capability.c +++ b/src/shared/secondary/spp_worker_th/port_capability.c @@ -57,7 +57,7 @@ void sppwk_port_capability_init(void) { int cnt = 0; - g_vlan_tpid = rte_cpu_to_be_16(ETHER_TYPE_VLAN); + g_vlan_tpid = rte_cpu_to_be_16(RTE_ETHER_TYPE_VLAN); memset(g_port_mng_info, 0x00, sizeof(g_port_mng_info)); for (cnt = 0; cnt < RTE_MAX_ETHPORTS; cnt++) { g_port_mng_info[cnt].rx.ref_index = 0; @@ -105,28 +105,28 @@ add_vlan_tag_one( struct rte_mbuf *pkt, const union sppwk_port_capability *capability) { - struct ether_hdr *old_ether = NULL; - struct ether_hdr *new_ether = NULL; - struct vlan_hdr *vlan = NULL; + struct rte_ether_hdr *old_ether = NULL; + struct rte_ether_hdr *new_ether = NULL; + struct rte_vlan_hdr *vlan = NULL; const struct sppwk_vlan_tag *vlantag = &capability->vlantag; - old_ether = rte_pktmbuf_mtod(pkt, struct ether_hdr *); + old_ether = rte_pktmbuf_mtod(pkt, struct rte_ether_hdr *); if (old_ether->ether_type == g_vlan_tpid) { /* For packets with VLAN tags, only VLAN ID is updated */ new_ether = old_ether; - vlan = (struct vlan_hdr *)&new_ether[1]; + vlan = (struct rte_vlan_hdr *)&new_ether[1]; } else { /* For packets without VLAN tag, add VLAN tag. */ - new_ether = (struct ether_hdr *)rte_pktmbuf_prepend(pkt, - sizeof(struct vlan_hdr)); + new_ether = (struct rte_ether_hdr *)rte_pktmbuf_prepend(pkt, + sizeof(struct rte_vlan_hdr)); if (unlikely(new_ether == NULL)) { RTE_LOG(ERR, PORT, "Failed to " "get additional header area.\n"); return SPPWK_RET_NG; } - rte_memcpy(new_ether, old_ether, sizeof(struct ether_hdr)); - vlan = (struct vlan_hdr *)&new_ether[1]; + rte_memcpy(new_ether, old_ether, sizeof(struct rte_ether_hdr)); + vlan = (struct rte_vlan_hdr *)&new_ether[1]; vlan->eth_proto = new_ether->ether_type; new_ether->ether_type = g_vlan_tpid; } @@ -162,15 +162,15 @@ del_vlan_tag_one( struct rte_mbuf *pkt, const union sppwk_port_capability *cbl __attribute__ ((unused))) { - struct ether_hdr *old_ether = NULL; - struct ether_hdr *new_ether = NULL; + struct rte_ether_hdr *old_ether = NULL; + struct rte_ether_hdr *new_ether = NULL; uint32_t *old, *new; - old_ether = rte_pktmbuf_mtod(pkt, struct ether_hdr *); + old_ether = rte_pktmbuf_mtod(pkt, struct rte_ether_hdr *); if (old_ether->ether_type == g_vlan_tpid) { /* For packets without VLAN tag, delete VLAN tag. */ - new_ether = (struct ether_hdr *)rte_pktmbuf_adj(pkt, - sizeof(struct vlan_hdr)); + new_ether = (struct rte_ether_hdr *)rte_pktmbuf_adj(pkt, + sizeof(struct rte_vlan_hdr)); if (unlikely(new_ether == NULL)) { RTE_LOG(ERR, PORT, "Failed to " "delete unnecessary header area.\n"); -- 2.17.1