From: Ferruh Yigit <ferruh.yigit@intel.com>
To: Ananda Sathyanarayana <ananda@versa-networks.com>, wenzhuo.lu@intel.com
Cc: dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH] E1000: fix for forced speed/duplex config
Date: Wed, 2 Nov 2016 17:36:28 +0000 [thread overview]
Message-ID: <373b7081-1e76-f4b9-834b-8ed2ff0efc6d@intel.com> (raw)
In-Reply-To: <1478040424-102624-1-git-send-email-ananda@versa-networks.com>
Hi Ananda,
Thank you for the patch. Can you please take care a few minor issues?
Patch tag should be: "net/e1000:", so patch title becomes:
"net/e1000: fix for forced speed/duplex config"
On 11/1/2016 10:47 PM, Ananda Sathyanarayana wrote:
> From the code, it looks like, hw->mac.autoneg, variable is used to
> switch between calling either autoneg function or forcing
> speed/duplex function. But this variable is not modified in
> eth_em_start/eth_igb_start routines (it is always set to 1)
> even while forcing the link speed.
>
> Following discussion thread has some more information on
> this
>
> http://dpdk.org/ml/archives/dev/2016-October/049272.html
Requires a fixes line:
http://dpdk.org/doc/guides/contributing/patches.html#commit-messages-body
>
> Signed-off-by: Ananda Sathyanarayana <ananda@versa-networks.com>
You can keep Wenzhuo's ack for next version of the patch.
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
> ---
> drivers/net/e1000/em_ethdev.c | 16 ++++++++++++++--
> drivers/net/e1000/igb_ethdev.c | 16 ++++++++++++++--
> 2 files changed, 28 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/net/e1000/em_ethdev.c b/drivers/net/e1000/em_ethdev.c
> index 7cf5f0c..a2412f5 100644
> --- a/drivers/net/e1000/em_ethdev.c
> +++ b/drivers/net/e1000/em_ethdev.c
> @@ -639,6 +639,7 @@ eth_em_start(struct rte_eth_dev *dev)
> speeds = &dev->data->dev_conf.link_speeds;
> if (*speeds == ETH_LINK_SPEED_AUTONEG) {
> hw->phy.autoneg_advertised = E1000_ALL_SPEED_DUPLEX;
> + hw->mac.autoneg = 1;
checkpatch gives many whitespace errors.
>From coding style document:
"Global whitespace rule in DPDK, use tabs for indentation, spaces for
alignment."
And how to use checkpatch:
http://dpdk.org/doc/guides/contributing/patches.html#checking-the-patches
> } else {
> num_speeds = 0;
> autoneg = (*speeds & ETH_LINK_SPEED_FIXED) == 0;
> @@ -672,9 +673,20 @@ eth_em_start(struct rte_eth_dev *dev)
> hw->phy.autoneg_advertised |= ADVERTISE_1000_FULL;
> num_speeds++;
> }
> - if (num_speeds == 0 || (!autoneg && (num_speeds > 1)))
> + if (num_speeds == 0 || (!autoneg && (num_speeds > 1))) {
No need to update this line, dpdk coding style doesn't require
parenthesis for single line statement:
http://dpdk.org/doc/guides/contributing/coding_style.html#control-statements-and-loops
> goto error_invalid_config;
> - }
> + }
> + /*
> + * Set/reset the mac.autoneg based on the link speed,
> + * fixed or not
> + */
> + if (!autoneg) {
> + hw->mac.autoneg = 0;
> + hw->mac.forced_speed_duplex = hw->phy.autoneg_advertised;
This line over 80 character limit.
> + } else {
> + hw->mac.autoneg = 1;
> + }
> + }
>
> e1000_setup_link(hw);
>
> diff --git a/drivers/net/e1000/igb_ethdev.c b/drivers/net/e1000/igb_ethdev.c
Same comments valid for this file too.
Thanks,
ferruh
prev parent reply other threads:[~2016-11-02 17:36 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-01 22:47 Ananda Sathyanarayana
2016-11-02 0:37 ` Lu, Wenzhuo
2016-11-02 17:36 ` Ferruh Yigit [this message]
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=373b7081-1e76-f4b9-834b-8ed2ff0efc6d@intel.com \
--to=ferruh.yigit@intel.com \
--cc=ananda@versa-networks.com \
--cc=dev@dpdk.org \
--cc=wenzhuo.lu@intel.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).