From patchwork Fri Apr 8 21:14:50 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anders Roxell X-Patchwork-Id: 65423 Delivered-To: patch@linaro.org Received: by 10.112.43.237 with SMTP id z13csp285961lbl; Fri, 8 Apr 2016 14:15:09 -0700 (PDT) X-Received: by 10.140.166.6 with SMTP id m6mr15290501qhm.70.1460150109015; Fri, 08 Apr 2016 14:15:09 -0700 (PDT) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id b53si11395782qga.33.2016.04.08.14.15.08; Fri, 08 Apr 2016 14:15:08 -0700 (PDT) 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 94E266172A; Fri, 8 Apr 2016 21:15:08 +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=-2.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW, 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 9886D616DB; Fri, 8 Apr 2016 21:15:04 +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 01AF0616DF; Fri, 8 Apr 2016 21:15:01 +0000 (UTC) Received: from mail-lf0-f51.google.com (mail-lf0-f51.google.com [209.85.215.51]) by lists.linaro.org (Postfix) with ESMTPS id D97C561642 for ; Fri, 8 Apr 2016 21:15:00 +0000 (UTC) Received: by mail-lf0-f51.google.com with SMTP id g184so91896594lfb.3 for ; Fri, 08 Apr 2016 14:15:00 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=3qgLqSSQtMgbMriKAtvom4EYdSwjRHveCY3/vUr5CTI=; b=mbNR2Z8saygdAx5NGS+X6KldmEjeJzGt0Hu6geisUohUKgygZwEll4s1zBWfc6YhBQ 7hXI150Z/7SefDQpiRl7q6d5aYzKin0N7udC8XRZgp1XE0DJmzqFU04zCuWwPO7wYFxS Vi+KIM+vtirDWDbY0I6h5PRw8vArsaHMygDi50QJpFiRKFFh1EDlXmvQLUBfZdD7MT1R NMwkPwpcqOQgNbEyA5u8vTAoSOOwLvnZn7rcD84zbq2m107ChP4FHMLBhkeqnlimK2c3 Dk/NffJMaeWaB7AVoYKMwG8qvOY0BCg5K565dwtg3MF5Tmhtc/xpcM1s3jbJ7MK2PaB1 Mp2g== X-Gm-Message-State: AD7BkJI8du8p61R2rRIaQmoM0vIUTgZjr6/nCqsxcSYlJH3dzZCYWQKEtzP+CgalCHj7K5RQCls= X-Received: by 10.112.200.195 with SMTP id ju3mr4403962lbc.13.1460150099401; Fri, 08 Apr 2016 14:14:59 -0700 (PDT) Received: from localhost (c-4f663674-74736162.cust.telenor.se. [79.102.54.116]) by smtp.gmail.com with ESMTPSA id i9sm2356555lfe.31.2016.04.08.14.14.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 08 Apr 2016 14:14:58 -0700 (PDT) From: Anders Roxell To: lng-odp@lists.linaro.org Date: Fri, 8 Apr 2016 23:14:50 +0200 Message-Id: <1460150090-29253-1-git-send-email-anders.roxell@linaro.org> X-Mailer: git-send-email 2.8.0.rc3 X-Topics: patch Subject: [lng-odp] [PATCHv2] linux-generic/include/odp_packet_io_internal: add visability hidden 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: , MIME-Version: 1.0 Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" Internal functions should not be part of symbols is visible outside the library. Suggested-by: Ricardo Salveti Signed-off-by: Anders Roxell --- .../linux-generic/include/odp_packet_io_internal.h | 23 +++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/platform/linux-generic/include/odp_packet_io_internal.h b/platform/linux-generic/include/odp_packet_io_internal.h index cca5c39..5c40c51 100644 --- a/platform/linux-generic/include/odp_packet_io_internal.h +++ b/platform/linux-generic/include/odp_packet_io_internal.h @@ -45,6 +45,11 @@ extern "C" { * requested number of packets were not handled. */ #define SOCK_ERR_REPORT(e) (e != EAGAIN && e != EWOULDBLOCK && e != EINTR) +#if defined(__GNUC__) +# define HIDDEN __attribute__((visibility("hidden"))) +#else +# define HIDDEN +#endif /* Forward declaration */ struct pktio_if_ops; @@ -171,7 +176,7 @@ typedef struct pktio_if_ops { int _odp_packet_cls_enq(pktio_entry_t *pktio_entry, const uint8_t *base, uint16_t buf_len, odp_packet_t *pkt_ret); -extern void *pktio_entry_ptr[]; +extern void HIDDEN *pktio_entry_ptr[]; static inline int pktio_to_id(odp_pktio_t pktio) { @@ -217,16 +222,16 @@ int single_recv_queue(pktio_entry_t *entry, int index, odp_packet_t packets[], int single_send_queue(pktio_entry_t *entry, int index, odp_packet_t packets[], int num); -extern const pktio_if_ops_t netmap_pktio_ops; -extern const pktio_if_ops_t dpdk_pktio_ops; -extern const pktio_if_ops_t sock_mmsg_pktio_ops; -extern const pktio_if_ops_t sock_mmap_pktio_ops; -extern const pktio_if_ops_t loopback_pktio_ops; +extern const HIDDEN pktio_if_ops_t netmap_pktio_ops; +extern const HIDDEN pktio_if_ops_t dpdk_pktio_ops; +extern const HIDDEN pktio_if_ops_t sock_mmsg_pktio_ops; +extern const HIDDEN pktio_if_ops_t sock_mmap_pktio_ops; +extern const HIDDEN pktio_if_ops_t loopback_pktio_ops; #ifdef HAVE_PCAP -extern const pktio_if_ops_t pcap_pktio_ops; +extern const HIDDEN pktio_if_ops_t pcap_pktio_ops; #endif -extern const pktio_if_ops_t tap_pktio_ops; -extern const pktio_if_ops_t * const pktio_if_ops[]; +extern const HIDDEN pktio_if_ops_t tap_pktio_ops; +extern const HIDDEN pktio_if_ops_t * const pktio_if_ops[]; int sysfs_stats(pktio_entry_t *pktio_entry, odp_pktio_stats_t *stats);