DPDK patches and discussions
 help / color / mirror / Atom feed
From: Mohammad Abdul Awal <mohammad.abdul.awal@intel.com>
To: Remy Horton <remy.horton@intel.com>, dev@dpdk.org
Cc: Ferruh Yigit <ferruh.yigit@intel.com>,
	Konstantin Ananyev <konstantin.ananyev@intel.com>,
	Wenzhuo Lu <wenzhuo.lu@intel.com>,
	Qi Zhang <qi.z.zhang@intel.com>,
	Beilei Xing <beilei.xing@intel.com>
Subject: Re: [dpdk-dev] [PATCH v2 2/2] net/ixgbe: fix missing Port Representor data-path
Date: Fri, 11 May 2018 15:04:49 +0100	[thread overview]
Message-ID: <63206320-74f2-f36e-b0ac-dd60373ee9ef@intel.com> (raw)
In-Reply-To: <20180511122845.22757-3-remy.horton@intel.com>



On 11/05/2018 13:28, Remy Horton wrote:
> This patch adds Rx and Tx burst functions to the ixgbe
> Port Representors, so that the implementation within
> ixgbe PMD can be tested using applications such as
> testpmd which require data-path functionality.
>
> Fixes: cf80ba6e2038 ("net/ixgbe: add support for representor ports")
>
> Signed-off-by: Remy Horton <remy.horton@intel.com>
> ---
>   drivers/net/ixgbe/ixgbe_vf_representor.c | 22 +++++++++++++++++++---
>   1 file changed, 19 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/net/ixgbe/ixgbe_vf_representor.c b/drivers/net/ixgbe/ixgbe_vf_representor.c
> index 8f8af49..db516d9 100644
> --- a/drivers/net/ixgbe/ixgbe_vf_representor.c
> +++ b/drivers/net/ixgbe/ixgbe_vf_representor.c
> @@ -153,6 +153,20 @@ struct eth_dev_ops ixgbe_vf_representor_dev_ops = {
>   	.mac_addr_set		= ixgbe_vf_representor_mac_addr_set,
>   };
>   
> +static uint16_t
> +ixgbe_vf_representor_rx_burst(__rte_unused void *rx_queue,
> +	__rte_unused struct rte_mbuf **rx_pkts, __rte_unused uint16_t nb_pkts)
> +{
> +	return 0;
> +}
> +
> +static uint16_t
> +ixgbe_vf_representor_tx_burst(__rte_unused void *tx_queue,
> +	__rte_unused struct rte_mbuf **tx_pkts, __rte_unused uint16_t nb_pkts)
> +{
> +	return 0;
> +}
> +
>   int
>   ixgbe_vf_representor_init(struct rte_eth_dev *ethdev, void *init_params)
>   {
> @@ -182,9 +196,11 @@ ixgbe_vf_representor_init(struct rte_eth_dev *ethdev, void *init_params)
>   	/* Set representor device ops */
>   	ethdev->dev_ops = &ixgbe_vf_representor_dev_ops;
>   
> -	/* No data-path so no RX/TX functions */
> -	ethdev->rx_pkt_burst = NULL;
> -	ethdev->tx_pkt_burst = NULL;
> +	/* No data-path, but need stub Rx/Tx functions to avoid crash
> +	 * when testing with the likes of testpmd.
> +	 */
> +	ethdev->rx_pkt_burst = ixgbe_vf_representor_rx_burst;
> +	ethdev->tx_pkt_burst = ixgbe_vf_representor_tx_burst;
>   
>   	/* Setting the number queues allocated to the VF */
>   	ethdev->data->nb_rx_queues = IXGBE_VF_MAX_RX_QUEUES;
Acked-by: Mohammad Abdul Awal <mohammad.abdul.awal@intel.com>

  reply	other threads:[~2018-05-11 14:04 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-09 15:00 [dpdk-dev] [PATCH] net/i40e: fix missing Port Representor data-path callbacks Remy Horton
2018-05-11 10:48 ` Mohammad Abdul Awal
2018-05-11 12:29   ` Remy Horton
2018-05-11 12:28 ` [dpdk-dev] [PATCH v2 0/2] " Remy Horton
2018-05-11 12:28   ` [dpdk-dev] [PATCH v2 1/2] net/i40e: fix missing Port Representor data-path Remy Horton
2018-05-11 14:04     ` Mohammad Abdul Awal
2018-05-11 16:08       ` Ferruh Yigit
2018-05-11 12:28   ` [dpdk-dev] [PATCH v2 2/2] net/ixgbe: " Remy Horton
2018-05-11 14:04     ` Mohammad Abdul Awal [this message]
2018-05-11 16:08       ` Ferruh Yigit

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=63206320-74f2-f36e-b0ac-dd60373ee9ef@intel.com \
    --to=mohammad.abdul.awal@intel.com \
    --cc=beilei.xing@intel.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=konstantin.ananyev@intel.com \
    --cc=qi.z.zhang@intel.com \
    --cc=remy.horton@intel.com \
    --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).