From: Remy Horton <remy.horton@intel.com>
To: Zyta Szpak <zr@semihalf.com>,
thomas.monjalon@6wind.com, wenzhuo.lu@intel.com,
helin.zhang@intel.com, konstantin.ananyev@intel.com,
jingjing.wu@intel.com, jerin.jacob@caviumnetworks.com,
rahul.lakkireddy@chelsio.com
Cc: dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH v5 1/2] ethdev: remove get_reg_length callback
Date: Mon, 4 Jul 2016 11:38:39 +0100 [thread overview]
Message-ID: <a55b0638-3444-6648-9ab4-f18828e663b0@intel.com> (raw)
In-Reply-To: <1467615087-20510-1-git-send-email-zr@semihalf.com>
> +++ b/drivers/net/cxgbe/cxgbe_ethdev.c
> @@ -934,7 +934,15 @@ static int cxgbe_get_regs(struct rte_eth_dev *eth_dev,
> struct port_info *pi = (struct port_info *)(eth_dev->data->dev_private);
> struct adapter *adapter = pi->adapter;
>
> - regs->length = cxgbe_get_regs_len(eth_dev);
> + if (regs->data == NULL) {
> + regs->length = cxgbe_get_regs_len(eth_dev);
> + regs->width = sizeof(uint32_t);
> + regs->version = CHELSIO_CHIP_VERSION(adapter->params.chip) |
> + (CHELSIO_CHIP_RELEASE(adapter->params.chip) << 10) |
> + (1 << 16);
> + return 0;
> + }
> +
> regs->version = CHELSIO_CHIP_VERSION(adapter->params.chip) |
> (CHELSIO_CHIP_RELEASE(adapter->params.chip) << 10) |
> (1 << 16);
Code duplication..
Rest looks ok and passed a quick compile test. Might need to keep an eye
out for other driver changes.
next prev parent reply other threads:[~2016-07-04 10:38 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-23 13:26 [dpdk-dev] [PATCH v4 " zr
2016-06-23 13:26 ` [dpdk-dev] [PATCH v4 2/2] examples/ethtool: use rte_eth_dev_get_reg_info for reg params zr
2016-06-27 10:46 ` Remy Horton
2016-06-27 10:46 ` [dpdk-dev] [PATCH v4 1/2] ethdev: remove get_reg_length callback Remy Horton
2016-06-28 16:05 ` Zyta Szpak
2016-06-27 15:19 ` Thomas Monjalon
2016-06-28 16:05 ` Zyta Szpak
2016-07-04 6:51 ` [dpdk-dev] [PATCH v5 " Zyta Szpak
2016-07-04 6:51 ` [dpdk-dev] [PATCH v5 2/2] examples/ethtool: use rte_eth_dev_get_reg_info for reg params Zyta Szpak
2016-07-04 10:39 ` Remy Horton
2016-07-04 10:38 ` Remy Horton [this message]
2016-07-04 11:34 ` [dpdk-dev] [PATCH v5 1/2] ethdev: remove get_reg_length callback Zyta Szpak
2016-07-04 11:36 ` [dpdk-dev] [PATCH v6 " Zyta Szpak
2016-07-04 11:36 ` [dpdk-dev] [PATCH v6 2/2] examples/ethtool: use rte_eth_dev_get_reg_info for reg params Zyta Szpak
2016-07-04 13:24 ` Remy Horton
2016-07-08 17:02 ` Thomas Monjalon
2016-07-04 13:24 ` [dpdk-dev] [PATCH v6 1/2] ethdev: remove get_reg_length callback Remy Horton
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=a55b0638-3444-6648-9ab4-f18828e663b0@intel.com \
--to=remy.horton@intel.com \
--cc=dev@dpdk.org \
--cc=helin.zhang@intel.com \
--cc=jerin.jacob@caviumnetworks.com \
--cc=jingjing.wu@intel.com \
--cc=konstantin.ananyev@intel.com \
--cc=rahul.lakkireddy@chelsio.com \
--cc=thomas.monjalon@6wind.com \
--cc=wenzhuo.lu@intel.com \
--cc=zr@semihalf.com \
/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).