From patchwork Sat Mar 7 02:23:20 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 3915 Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [IPv6:::1]) by dpdk.org (Postfix) with ESMTP id 684085AA1; Sat, 7 Mar 2015 03:23:34 +0100 (CET) Received: from mail-pa0-f43.google.com (mail-pa0-f43.google.com [209.85.220.43]) by dpdk.org (Postfix) with ESMTP id AB1835A7A for ; Sat, 7 Mar 2015 03:23:32 +0100 (CET) Received: by pabrd3 with SMTP id rd3so22568250pab.6 for ; Fri, 06 Mar 2015 18:23:31 -0800 (PST) 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:in-reply-to :references; bh=4IFp7m+QMQXCi21T0uLJKb5jcT9qeZquGelKjVS8+zs=; b=DVf7quMAMVfMNw2iRB+NQHrkUKKc6hw9g5R/6LjYH91mIlZWav4dsTAs2TELVNJPZB BtLxHSKC1mzK8CUM0gE0TXzT01lB1VdCLPc7GlKJBQkQGPfsdWcnQg3GaYlCoe2Oq0Dk oWFiss8S5Bm+ukPh0B7VK6Fc8/35oEop1rP11TW0E6ISa+bUBGfRUqAbEzcob3EG+3NI U4rb602wVMEHIio7SuFj48tM3rsyF59xzJ9Y1schX9BZFzTzrMCoTGymcpcNT1/qdqcv e9HCQYkRM/l2/asrkLwfERYeqPkOhdaC0c6wPH+vQYyKlSxnEbODIrYl2ok9TBW99270 Ukwg== X-Gm-Message-State: ALoCoQkuAbawJJgMJ3iFMIs7tfPBTMyO31TgU0My1XnWSfVp14QnRXQZZI1ge7uY2v5z9Po1V95Z X-Received: by 10.68.133.198 with SMTP id pe6mr30054192pbb.119.1425695011660; Fri, 06 Mar 2015 18:23:31 -0800 (PST) Received: from urahara.brocade.com (static-50-53-82-155.bvtn.or.frontiernet.net. [50.53.82.155]) by mx.google.com with ESMTPSA id x4sm10797098pas.40.2015.03.06.18.23.30 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 06 Mar 2015 18:23:30 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Date: Fri, 6 Mar 2015 18:23:20 -0800 Message-Id: <1425695004-29605-2-git-send-email-stephen@networkplumber.org> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1425695004-29605-1-git-send-email-stephen@networkplumber.org> References: <1425695004-29605-1-git-send-email-stephen@networkplumber.org> Subject: [dpdk-dev] [PATCH 1/5] ixgbe: make txq_ops const X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" All virtual function tables should be const so they are put in text segment rather than data. Signed-off-by: Stephen Hemminger Acked-by: Bruce Richardson Acked-by: Changchun Ouyang --- lib/librte_pmd_ixgbe/ixgbe_rxtx.c | 2 +- lib/librte_pmd_ixgbe/ixgbe_rxtx.h | 2 +- lib/librte_pmd_ixgbe/ixgbe_rxtx_vec.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/librte_pmd_ixgbe/ixgbe_rxtx.c b/lib/librte_pmd_ixgbe/ixgbe_rxtx.c index 9ecf3e5..e6aec8f 100644 --- a/lib/librte_pmd_ixgbe/ixgbe_rxtx.c +++ b/lib/librte_pmd_ixgbe/ixgbe_rxtx.c @@ -1754,7 +1754,7 @@ ixgbe_reset_tx_queue(struct igb_tx_queue *txq) IXGBE_CTX_NUM * sizeof(struct ixgbe_advctx_info)); } -static struct ixgbe_txq_ops def_txq_ops = { +static const struct ixgbe_txq_ops def_txq_ops = { .release_mbufs = ixgbe_tx_queue_release_mbufs, .free_swring = ixgbe_tx_free_swring, .reset = ixgbe_reset_tx_queue, diff --git a/lib/librte_pmd_ixgbe/ixgbe_rxtx.h b/lib/librte_pmd_ixgbe/ixgbe_rxtx.h index 329007c..a85839e 100644 --- a/lib/librte_pmd_ixgbe/ixgbe_rxtx.h +++ b/lib/librte_pmd_ixgbe/ixgbe_rxtx.h @@ -211,7 +211,7 @@ struct igb_tx_queue { uint32_t ctx_curr; /**< Hardware context states. */ /** Hardware context0 history. */ struct ixgbe_advctx_info ctx_cache[IXGBE_CTX_NUM]; - struct ixgbe_txq_ops *ops; /**< txq ops */ + const struct ixgbe_txq_ops *ops; /**< txq ops */ uint8_t tx_deferred_start; /**< not in global dev start. */ }; diff --git a/lib/librte_pmd_ixgbe/ixgbe_rxtx_vec.c b/lib/librte_pmd_ixgbe/ixgbe_rxtx_vec.c index 1f46f0f..11e9f12 100644 --- a/lib/librte_pmd_ixgbe/ixgbe_rxtx_vec.c +++ b/lib/librte_pmd_ixgbe/ixgbe_rxtx_vec.c @@ -723,7 +723,7 @@ ixgbe_reset_tx_queue(struct igb_tx_queue *txq) IXGBE_CTX_NUM * sizeof(struct ixgbe_advctx_info)); } -static struct ixgbe_txq_ops vec_txq_ops = { +static const struct ixgbe_txq_ops vec_txq_ops = { .release_mbufs = ixgbe_tx_queue_release_mbufs, .free_swring = ixgbe_tx_free_swring, .reset = ixgbe_reset_tx_queue,