From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf0-f176.google.com (mail-pf0-f176.google.com [209.85.192.176]) by dpdk.org (Postfix) with ESMTP id 593822BF5 for ; Mon, 21 Mar 2016 18:53:15 +0100 (CET) Received: by mail-pf0-f176.google.com with SMTP id x3so272973075pfb.1 for ; Mon, 21 Mar 2016 10:53:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=RWuWiSDMrMt3+g+UXOj2A5k3Yk2Z5ZxtUOjnPnqPs7Y=; b=yrQKtsbmpSDWySDuH0gfqcYJPyn/faCUVxLGiX6PtEWCZ3EwQKk/hFK4Hns1Fg6yoZ 03h6DZ0UiZ943GFBUE+1kCp/fEDrOT5PioRMfYRDevkhQd1s5l3gBQycd3WPZFITZbaS 3Q9IN1vA3hZBYqGnDtdLpR/f8/3Opm4beDEo2mZEqBV9A5TNnhaFN93w/lr/yMixmnHH E4ckwKo3TURbsHBLMsgU2i7fIICGoaLgDnnRGXgbcTNsFTXL5Xw1UcMWcXmo61h5u6oh himBt7NNLqr9i0e5mIPnH6c5l04hXN0tPiCwJpyJz/zar6rfhynvuVnjsSHqd/9Pe0lg qk4w== 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=RWuWiSDMrMt3+g+UXOj2A5k3Yk2Z5ZxtUOjnPnqPs7Y=; b=KUf4FYwYQ54sxo+OtN+2VV8ojyiTryp47JioPsQpAkUvJGMswYJ5qLa1YC8vHkKOl4 HoMpmrujWJV3H7IOfaTNmkXKpAXaM/pbQ473YaNk6EVGkwaoLKePp4r+Uua/rp2QRLpA vEZeZ3mOWnvb+ZHDtyAI235Op2lXhW8A6pp/a4/sXypFPGzkCCPY/Y3oI+4jCCzUxR9B NBaSybfpgl8etUE5pIW3Abg9o5y4FVL/PhJZaPWyFu8a2dl5T+npiTKnTuORP049n6z8 wyU6kqxA1AF0JHVSv79UnUrvr5b1ha3nLCc+aQUv1/KW/kF8mbMqJ3MkdZdGKpaSnI89 Ag9Q== X-Gm-Message-State: AD7BkJK3C9QoKa4YUObDKXHSCVDdiza43qTmndm8FdRf3pUaYs8x9Lb5twBlwbeIfAjyBg== X-Received: by 10.98.8.196 with SMTP id 65mr46574177pfi.53.1458582794810; Mon, 21 Mar 2016 10:53:14 -0700 (PDT) Received: from xeon-e3.home.lan (static-50-53-65-230.bvtn.or.frontiernet.net. [50.53.65.230]) by smtp.gmail.com with ESMTPSA id h2sm42201898pfd.91.2016.03.21.10.53.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 21 Mar 2016 10:53:14 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger Date: Mon, 21 Mar 2016 10:53:24 -0700 Message-Id: <1458582809-19628-2-git-send-email-stephen@networkplumber.org> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1458582809-19628-1-git-send-email-stephen@networkplumber.org> References: <1458582809-19628-1-git-send-email-stephen@networkplumber.org> Subject: [dpdk-dev] [PATCH 1/6] bonding: make eth_dev_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: , X-List-Received-Date: Mon, 21 Mar 2016 17:53:16 -0000 This structure has immutable function pointers. Also fix indentation. Signed-off-by: Stephen Hemminger --- 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