DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Zhang, Helin" <helin.zhang@intel.com>
To: "Wu, Yanglong" <yanglong.wu@intel.com>,
	"Xing, Beilei" <beilei.xing@intel.com>,
	"Zhang, Qi Z" <qi.z.zhang@intel.com>,
	"Wu, Jingjing" <jingjing.wu@intel.com>
Cc: "Wu, Yanglong" <yanglong.wu@intel.com>, "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH] net/i40e: i40e support mac loopback
Date: Mon, 18 Dec 2017 03:05:26 +0000	[thread overview]
Message-ID: <F35DEAC7BCE34641BA9FAC6BCA4A12E71ACB7AD3@SHSMSX103.ccr.corp.intel.com> (raw)
In-Reply-To: <20171120040531.152695-1-yanglong.wu@intel.com>

Hi Yanglong

It seems your patch cannot be applied on my system. Please do a check on your patch.
In addition, please make sure your local git repo was cloned from the right sub-tree.
e.g. 'git clone http://dpdk.org/git/next/dpdk-next-net-intel'

Hi maintainers

I need your comments, ACK or NACK. Thanks!

Regards,
Helin

> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Yanglong Wu
> Sent: Monday, November 20, 2017 12:06 PM
> To: dev@dpdk.org
> Cc: Wu, Yanglong
> Subject: [dpdk-dev] [PATCH] net/i40e: i40e support mac loopback
> 
> According to loopback mode, setup loopback link or not.
> If loopback link is setted, packets will be sent to rx_q from tx_q
> directly.Loopback mode can be used to support testing task.
> 
> Signed-off-by: Yanglong Wu <yanglong.wu@intel.com>
> ---
>  drivers/net/i40e/base/i40e_adminq_cmd.h |  1 +
>  drivers/net/i40e/i40e_ethdev.c          | 12 +++++++++++
>  2 files changed, 13 insertions(+)
> 
> diff --git a/drivers/net/i40e/base/i40e_adminq_cmd.h
> b/drivers/net/i40e/base/i40e_adminq_cmd.h
> index c36da2a32..8171f877b 100644
> --- a/drivers/net/i40e/base/i40e_adminq_cmd.h
> +++ b/drivers/net/i40e/base/i40e_adminq_cmd.h
> @@ -2128,6 +2128,7 @@
> I40E_CHECK_CMD_LENGTH(i40e_aqc_an_advt_reg);
>  /* Set Loopback mode (0x0618) */
>  struct i40e_aqc_set_lb_mode {
>  	__le16	lb_mode;
> +#define I40E_AQ_LB_MODE_NONE   0x0
>  #define I40E_AQ_LB_PHY_LOCAL	0x01
>  #define I40E_AQ_LB_PHY_REMOTE	0x02
>  #define I40E_AQ_LB_MAC_LOCAL	0x04
> diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
> index f40c463aa..2e6aa9d0d 100644
> --- a/drivers/net/i40e/i40e_ethdev.c
> +++ b/drivers/net/i40e/i40e_ethdev.c
> @@ -2048,6 +2048,17 @@ i40e_dev_start(struct rte_eth_dev *dev)
>  		}
>  	}
> 
> +	/* Enable mac loopback mode */
> +	if (hw->mac.type == I40E_MAC_XL710 &&
> +	    (dev->data->dev_conf.lpbk_mode == I40E_AQ_LB_MODE_NONE ||
> +		dev->data->dev_conf.lpbk_mode ==
> I40E_AQ_LB_PHY_LOCAL)) {
> +		ret = i40e_aq_set_lb_modes(hw,
> +					   dev->data->dev_conf.lpbk_mode,
> NULL);
> +			if (ret != I40E_SUCCESS) {
> +			PMD_DRV_LOG(INFO, "fail to set loopback link");
> +			goto err_up;
> +		}
> +	}
> +
>  	/* Apply link configure */
>  	if (dev->data->dev_conf.link_speeds & ~(ETH_LINK_SPEED_100M |
>  				ETH_LINK_SPEED_1G | ETH_LINK_SPEED_10G
> |
> --
> 2.11.0

  parent reply	other threads:[~2017-12-18  3:05 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-20  4:05 Yanglong Wu
2017-12-11  3:22 ` Peng, Yuan
2017-12-18  3:05 ` Zhang, Helin [this message]
2017-12-18  6:09 ` Xing, Beilei
2017-12-20  7:29 ` [dpdk-dev] [PATCH v2] net/i40e: " Yanglong Wu
2017-12-20  8:09   ` Zhang, Helin
2017-12-20 12:24   ` Peng, Yuan
2017-12-22  4:44   ` [dpdk-dev] [PATCH v3] " Yanglong Wu
2018-01-02  2:28     ` [dpdk-dev] [PATCH v4] " Yanglong Wu
2018-01-02  2:41       ` [dpdk-dev] [PATCH v5] " Yanglong Wu
2018-01-02  2:47         ` Xing, Beilei
2018-01-07 10:28           ` Zhang, Helin

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=F35DEAC7BCE34641BA9FAC6BCA4A12E71ACB7AD3@SHSMSX103.ccr.corp.intel.com \
    --to=helin.zhang@intel.com \
    --cc=beilei.xing@intel.com \
    --cc=dev@dpdk.org \
    --cc=jingjing.wu@intel.com \
    --cc=qi.z.zhang@intel.com \
    --cc=yanglong.wu@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).