ixgbe: make txq_ops const

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>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Changchun Ouyang <changchun.ouyang@intel.com>
This commit is contained in:
Stephen Hemminger 2015-03-06 18:23:20 -08:00 committed by Thomas Monjalon
parent da0113c539
commit 3fd612a907
3 changed files with 3 additions and 3 deletions

@ -1753,7 +1753,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,

@ -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. */
};

@ -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,