DPDK patches and discussions
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: dev@dpdk.org
Cc: Stephen Hemminger <stephen@networkplumber.org>
Subject: [dpdk-dev] [PATCH 1/6] bonding: make eth_dev_ops const
Date: Mon, 21 Mar 2016 10:53:24 -0700	[thread overview]
Message-ID: <1458582809-19628-2-git-send-email-stephen@networkplumber.org> (raw)
In-Reply-To: <1458582809-19628-1-git-send-email-stephen@networkplumber.org>

This structure has immutable function pointers.
Also fix indentation.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>

---
 drivers/net/bonding/rte_eth_bond_pmd.c     | 38 +++++++++++++++---------------
 drivers/net/bonding/rte_eth_bond_private.h |  2 +-
 2 files changed, 20 insertions(+), 20 deletions(-)

diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c
index 011150a..8961a67 100644
--- a/drivers/net/bonding/rte_eth_bond_pmd.c
+++ b/drivers/net/bonding/rte_eth_bond_pmd.c
@@ -2142,25 +2142,25 @@ bond_ethdev_rss_hash_conf_get(struct rte_eth_dev *dev,
 	return 0;
 }
 
-struct eth_dev_ops default_dev_ops = {
-		.dev_start            = bond_ethdev_start,
-		.dev_stop             = bond_ethdev_stop,
-		.dev_close            = bond_ethdev_close,
-		.dev_configure        = bond_ethdev_configure,
-		.dev_infos_get        = bond_ethdev_info,
-		.rx_queue_setup       = bond_ethdev_rx_queue_setup,
-		.tx_queue_setup       = bond_ethdev_tx_queue_setup,
-		.rx_queue_release     = bond_ethdev_rx_queue_release,
-		.tx_queue_release     = bond_ethdev_tx_queue_release,
-		.link_update          = bond_ethdev_link_update,
-		.stats_get            = bond_ethdev_stats_get,
-		.stats_reset          = bond_ethdev_stats_reset,
-		.promiscuous_enable   = bond_ethdev_promiscuous_enable,
-		.promiscuous_disable  = bond_ethdev_promiscuous_disable,
-		.reta_update          = bond_ethdev_rss_reta_update,
-		.reta_query           = bond_ethdev_rss_reta_query,
-		.rss_hash_update      = bond_ethdev_rss_hash_update,
-		.rss_hash_conf_get    = bond_ethdev_rss_hash_conf_get
+const struct eth_dev_ops default_dev_ops = {
+	.dev_start            = bond_ethdev_start,
+	.dev_stop             = bond_ethdev_stop,
+	.dev_close            = bond_ethdev_close,
+	.dev_configure        = bond_ethdev_configure,
+	.dev_infos_get        = bond_ethdev_info,
+	.rx_queue_setup       = bond_ethdev_rx_queue_setup,
+	.tx_queue_setup       = bond_ethdev_tx_queue_setup,
+	.rx_queue_release     = bond_ethdev_rx_queue_release,
+	.tx_queue_release     = bond_ethdev_tx_queue_release,
+	.link_update          = bond_ethdev_link_update,
+	.stats_get            = bond_ethdev_stats_get,
+	.stats_reset          = bond_ethdev_stats_reset,
+	.promiscuous_enable   = bond_ethdev_promiscuous_enable,
+	.promiscuous_disable  = bond_ethdev_promiscuous_disable,
+	.reta_update          = bond_ethdev_rss_reta_update,
+	.reta_query           = bond_ethdev_rss_reta_query,
+	.rss_hash_update      = bond_ethdev_rss_hash_update,
+	.rss_hash_conf_get    = bond_ethdev_rss_hash_conf_get
 };
 
 static int
diff --git a/drivers/net/bonding/rte_eth_bond_private.h b/drivers/net/bonding/rte_eth_bond_private.h
index 6c47a29..8312397 100644
--- a/drivers/net/bonding/rte_eth_bond_private.h
+++ b/drivers/net/bonding/rte_eth_bond_private.h
@@ -171,7 +171,7 @@ struct bond_dev_private {
 	uint8_t slave_update_idx;
 };
 
-extern struct eth_dev_ops default_dev_ops;
+extern const struct eth_dev_ops default_dev_ops;
 
 int
 check_for_bonded_ethdev(const struct rte_eth_dev *eth_dev);
-- 
2.1.4

  reply	other threads:[~2016-03-21 17:53 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-21 17:53 [dpdk-dev] [PATCH 0/6] " Stephen Hemminger
2016-03-21 17:53 ` Stephen Hemminger [this message]
2016-03-21 17:53 ` [dpdk-dev] [PATCH 2/6] cxgbe: " Stephen Hemminger
2016-03-21 17:53 ` [dpdk-dev] [PATCH 3/6] bnx2x: " Stephen Hemminger
2016-03-21 17:53 ` [dpdk-dev] [PATCH 4/6] nfp: " Stephen Hemminger
2016-03-21 17:53 ` [dpdk-dev] [PATCH 5/6] szedata: " Stephen Hemminger
2016-03-21 17:53 ` [dpdk-dev] [PATCH 6/6] mpipe: " Stephen Hemminger
2016-03-23 12:09 ` [dpdk-dev] [PATCH 0/6] " Bruce Richardson

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=1458582809-19628-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).