From patchwork Thu Dec 15 18:45:59 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Uvarov X-Patchwork-Id: 88218 Delivered-To: patch@linaro.org Received: by 10.140.20.101 with SMTP id 92csp965361qgi; Thu, 15 Dec 2016 10:46:31 -0800 (PST) X-Received: by 10.31.78.129 with SMTP id c123mr2279630vkb.169.1481827591623; Thu, 15 Dec 2016 10:46:31 -0800 (PST) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id j189si1220494vkf.114.2016.12.15.10.46.31; Thu, 15 Dec 2016 10:46:31 -0800 (PST) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) client-ip=54.225.227.206; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=pass (p=NONE dis=NONE) header.from=linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 31A4A63590; Thu, 15 Dec 2016 18:46:31 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252 X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id 3DA0D63571; Thu, 15 Dec 2016 18:46:27 +0000 (UTC) X-Original-To: lng-odp@lists.linaro.org Delivered-To: lng-odp@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 5B9B063574; Thu, 15 Dec 2016 18:46:24 +0000 (UTC) Received: from mail-wm0-f47.google.com (mail-wm0-f47.google.com [74.125.82.47]) by lists.linaro.org (Postfix) with ESMTPS id 4C57463570 for ; Thu, 15 Dec 2016 18:46:23 +0000 (UTC) Received: by mail-wm0-f47.google.com with SMTP id t79so60322129wmt.0 for ; Thu, 15 Dec 2016 10:46:23 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=d2Uik714Y+6gEyqyEDo6SLEPxwWv4v12IH8eF1O5zws=; b=jvUd1npGgOZ3xLkVEccAx5OBGtq9fiGZAIwvfKyerSUjjG6jT4Y4VCgQjKpgRj0SJ5 5Xr/lhScO6PPQf0Yc7O3LCx6tXv2gAQDK46algPEK6CibHqbb/C6b6EYI8X369+E1ZGq Mz/Y/s1tatIzlYXHl8qsGbtlYTZnW1MWbqJE4tr14clVZlKOGmcNJ1KfOlJF54SgYkQh tXRdhhmTlublIQhFzB5zvMIlo0Q6F/xF1bOnqvRRux3IqiHzGkrQ2+X66vJOrt7QW3Y6 HrPdI2PvN4nb0Snd1R1XQKcLfKW9Qcedz4czkESm8M6Nwk+jR6mqDyLz55Z1l/w97rm8 oJDA== X-Gm-Message-State: AKaTC03cMHc/Hqg3eM12Y4wKwz8QJ6XNBrmkJ+QtWmK2WCCUUNpk+hb2IttAEhoVQDBSawflKbM= X-Received: by 10.25.0.196 with SMTP id 187mr965032lfa.156.1481827582259; Thu, 15 Dec 2016 10:46:22 -0800 (PST) Received: from localhost.localdomain (ppp91-77-165-188.pppoe.mtu-net.ru. [91.77.165.188]) by smtp.gmail.com with ESMTPSA id a63sm674970ljb.46.2016.12.15.10.46.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 15 Dec 2016 10:46:21 -0800 (PST) From: Maxim Uvarov To: lng-odp@lists.linaro.org Date: Thu, 15 Dec 2016 21:45:59 +0300 Message-Id: <1481827559-29986-1-git-send-email-maxim.uvarov@linaro.org> X-Mailer: git-send-email 2.7.1.250.gff4ea60 Subject: [lng-odp] [API-NEXT PATCHv3] linux-gen: pktio ipc: compile if ipc pktio disable with config X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "The OpenDataPlane \(ODP\) List" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" Compile all function code except places where it's lined to external files even if ipc pktio disable with config option. Signed-off-by: Maxim Uvarov --- Bill, looks like we forgot to test with disabled option. I send thos as separate patch but it's reasonable to merge it to main. I think review small patch will be more easy. Thank you, Maxim. platform/linux-generic/pktio/ipc.c | 9 +++++++++ 1 file changed, 9 insertions(+) -- 2.7.1.250.gff4ea60 diff --git a/platform/linux-generic/pktio/ipc.c b/platform/linux-generic/pktio/ipc.c index 5e47a33..5f26b56 100644 --- a/platform/linux-generic/pktio/ipc.c +++ b/platform/linux-generic/pktio/ipc.c @@ -459,7 +459,12 @@ static int ipc_pktio_recv_lockless(pktio_entry_t *pktio_entry, if (odp_unlikely(pool == ODP_POOL_INVALID)) ODP_ABORT("invalid pool"); +#ifdef _ODP_PKTIO_IPC data_pool_off = phdr->buf_hdr.seg[0].ipc_data_offset; +#else + /* compile all function code even if ipc disabled with config */ + data_pool_off = 0; +#endif pkt = odp_packet_alloc(pool, phdr->frame_len); if (odp_unlikely(pkt == ODP_PACKET_INVALID)) { @@ -584,12 +589,16 @@ static int ipc_pktio_send_lockless(pktio_entry_t *pktio_entry, (uint8_t *)odp_shm_addr(pool->shm); data_pool_off = (uint8_t *)pkt_hdr->buf_hdr.seg[0].data - (uint8_t *)odp_shm_addr(pool->shm); + +#ifdef _ODP_PKTIO_IPC + /* compile all function code even if ipc disabled with config */ pkt_hdr->buf_hdr.seg[0].ipc_data_offset = data_pool_off; IPC_ODP_DBG("%d/%d send packet %llx, pool %llx," "phdr = %p, offset %x\n", i, len, odp_packet_to_u64(pkt), odp_pool_to_u64(pool_hdl), pkt_hdr, pkt_hdr->buf_hdr.seg[0].ipc_data_offset); +#endif } /* Put packets to ring to be processed by other process. */