DPDK patches and discussions
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: dev@dpdk.org
Subject: [dpdk-dev] [PATCH 1/5] ixgbe: make txq_ops const
Date: Fri,  6 Mar 2015 18:23:20 -0800	[thread overview]
Message-ID: <1425695004-29605-2-git-send-email-stephen@networkplumber.org> (raw)
In-Reply-To: <1425695004-29605-1-git-send-email-stephen@networkplumber.org>

All virtual function tables should be const so they are put
in text segment rather than data.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 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,
-- 
2.1.4

  reply	other threads:[~2015-03-07  2:23 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-07  2:23 [dpdk-dev] [PATCH 0/5] ixgbe: cleanup patches Stephen Hemminger
2015-03-07  2:23 ` Stephen Hemminger [this message]
2015-03-09 13:31   ` [dpdk-dev] [PATCH 1/5] ixgbe: make txq_ops const Bruce Richardson
2015-03-10  4:40   ` Ouyang, Changchun
2015-03-07  2:23 ` [dpdk-dev] [PATCH 2/5] ixgbe: make register maps const Stephen Hemminger
2015-03-09 13:33   ` Bruce Richardson
2015-03-10  4:47   ` Ouyang, Changchun
2015-03-07  2:23 ` [dpdk-dev] [PATCH 3/5] ixgbe: make bulk alloc static Stephen Hemminger
2015-03-09 13:39   ` Bruce Richardson
2015-03-10  5:08   ` Ouyang, Changchun
2015-03-07  2:23 ` [dpdk-dev] [PATCH 4/5] ixgbe: rename set_tx_function Stephen Hemminger
2015-03-09 13:43   ` Bruce Richardson
2015-03-10  5:12   ` Ouyang, Changchun
2015-03-07  2:23 ` [dpdk-dev] [PATCH 5/5] ixgbe: rename igb_* to ixgbe_* Stephen Hemminger
2015-03-09 13:49   ` Bruce Richardson
2015-03-10  5:14   ` Ouyang, Changchun
2015-03-10 14:24 ` [dpdk-dev] [PATCH 0/5] ixgbe: cleanup patches Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1425695004-29605-2-git-send-email-stephen@networkplumber.org \
    --to=stephen@networkplumber.org \
    --cc=dev@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).