DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ferruh Yigit <ferruh.yigit@intel.com>
To: Gagandeep Singh <g.singh@nxp.com>, dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH v4 3/3] net/enetc: enable dpaax library
Date: Mon, 21 Oct 2019 16:55:36 +0100	[thread overview]
Message-ID: <5f9080e2-1d76-48c0-6fb2-e68e9d56091b@intel.com> (raw)
In-Reply-To: <20191021105027.14792-4-g.singh@nxp.com>

On 10/21/2019 11:50 AM, Gagandeep Singh wrote:
> With this patch, enetc driver would start using the
> physical-virtual library interfaces.

Out of curiosity what does it mean "start using the physical-virtual library
interfaces" ?  Can you please provide a little more details how it is done?

> 
> Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
> ---
>  drivers/net/enetc/Makefile       | 2 ++
>  drivers/net/enetc/enetc_ethdev.c | 8 ++++++++
>  drivers/net/enetc/meson.build    | 1 +
>  3 files changed, 11 insertions(+)
> 
> diff --git a/drivers/net/enetc/Makefile b/drivers/net/enetc/Makefile
> index 312b37245..4498bc51f 100644
> --- a/drivers/net/enetc/Makefile
> +++ b/drivers/net/enetc/Makefile
> @@ -10,6 +10,7 @@ LIB = librte_pmd_enetc.a
>  
>  CFLAGS += -O3
>  CFLAGS += $(WERROR_FLAGS)
> +CFLAGS += -I$(RTE_SDK)/drivers/common/dpaax
>  EXPORT_MAP := rte_pmd_enetc_version.map
>  LIBABIVER := 1
>  
> @@ -19,5 +20,6 @@ SRCS-$(CONFIG_RTE_LIBRTE_ENETC_PMD) += enetc_rxtx.c
>  LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool
>  LDLIBS += -lrte_ethdev -lrte_net
>  LDLIBS += -lrte_bus_pci
> +LDLIBS += -lrte_common_dpaax
>  
>  include $(RTE_SDK)/mk/rte.lib.mk
> diff --git a/drivers/net/enetc/enetc_ethdev.c b/drivers/net/enetc/enetc_ethdev.c
> index 475ec77c3..03590c6c3 100644
> --- a/drivers/net/enetc/enetc_ethdev.c
> +++ b/drivers/net/enetc/enetc_ethdev.c
> @@ -5,6 +5,7 @@
>  #include <stdbool.h>
>  #include <rte_ethdev_pci.h>
>  #include <rte_random.h>
> +#include <dpaax_iova_table.h>
>  
>  #include "enetc_logs.h"
>  #include "enetc.h"
> @@ -896,6 +897,9 @@ enetc_dev_init(struct rte_eth_dev *eth_dev)
>  	eth_dev->data->mtu = RTE_ETHER_MAX_LEN - RTE_ETHER_HDR_LEN -
>  		RTE_ETHER_CRC_LEN;
>  
> +	if (rte_eal_iova_mode() == RTE_IOVA_PA)
> +		dpaax_iova_table_populate();
> +
>  	ENETC_PMD_DEBUG("port_id %d vendorID=0x%x deviceID=0x%x",
>  			eth_dev->data->port_id, pci_dev->id.vendor_id,
>  			pci_dev->id.device_id);
> @@ -906,6 +910,10 @@ static int
>  enetc_dev_uninit(struct rte_eth_dev *eth_dev __rte_unused)
>  {
>  	PMD_INIT_FUNC_TRACE();
> +
> +	if (rte_eal_iova_mode() == RTE_IOVA_PA)
> +		dpaax_iova_table_depopulate();
> +
>  	return 0;
>  }
>  
> diff --git a/drivers/net/enetc/meson.build b/drivers/net/enetc/meson.build
> index 3bc069844..bea54bea8 100644
> --- a/drivers/net/enetc/meson.build
> +++ b/drivers/net/enetc/meson.build
> @@ -6,6 +6,7 @@ if not is_linux
>  	reason = 'only supported on linux'
>  endif
>  
> +deps += ['common_dpaax']
>  sources = files('enetc_ethdev.c',
>  		'enetc_rxtx.c')
>  
> 


  reply	other threads:[~2019-10-21 15:55 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-21  6:29 [dpdk-dev] [PATCH 1/2] net/enetc: add macro for BD ring alignment Gagandeep Singh
2019-10-21  6:29 ` [dpdk-dev] [PATCH 2/2] net/enetc: set random MAC in case no MAC for SI Gagandeep Singh
2019-10-21  8:58 ` [dpdk-dev] [PATCH v2 0/2] enetc PMD specific changes Gagandeep Singh
2019-10-21  8:58   ` [dpdk-dev] [PATCH v2 1/2] net/enetc: set random MAC in case no MAC for SI Gagandeep Singh
2019-10-21  8:58   ` [dpdk-dev] [PATCH v2 2/2] net/enetc: enable dpaax library Gagandeep Singh
2019-10-21  9:11   ` [dpdk-dev] [PATCH v3 0/3] enetc PMD specific changes Gagandeep Singh
2019-10-21  9:11     ` [dpdk-dev] [PATCH v3 1/3] net/enetc: add macro for BD ring alignment Gagandeep Singh
2019-10-21  9:11     ` [dpdk-dev] [PATCH v3 2/3] net/enetc: set random MAC in case no MAC for SI Gagandeep Singh
2019-10-21  9:11     ` [dpdk-dev] [PATCH v3 3/3] net/enetc: enable dpaax library Gagandeep Singh
2019-10-21 10:50     ` [dpdk-dev] [PATCH v4 0/3] enetc PMD specific changes Gagandeep Singh
2019-10-21 10:50       ` [dpdk-dev] [PATCH v4 1/3] net/enetc: add macro for BD ring alignment Gagandeep Singh
2019-10-21 15:54         ` Ferruh Yigit
2019-10-22  5:32           ` Gagandeep Singh
2019-10-21 10:50       ` [dpdk-dev] [PATCH v4 2/3] net/enetc: set random MAC in case no MAC for SI Gagandeep Singh
2019-10-21 16:04         ` Ferruh Yigit
2019-10-22  5:31           ` Gagandeep Singh
2019-10-22  8:59             ` Ferruh Yigit
2019-10-22 11:32               ` Gagandeep Singh
2019-10-21 10:50       ` [dpdk-dev] [PATCH v4 3/3] net/enetc: enable dpaax library Gagandeep Singh
2019-10-21 15:55         ` Ferruh Yigit [this message]
2019-10-22  5:31           ` Gagandeep Singh
2019-10-22  9:00             ` Ferruh Yigit
2019-10-22 11:30               ` Gagandeep Singh
2019-10-23  6:05       ` [dpdk-dev] [PATCH v5 0/4] enetc PMD specific changes Gagandeep Singh
2019-10-23  6:05         ` [dpdk-dev] [PATCH v5 1/4] net/enetc: fix BD ring alignment Gagandeep Singh
2019-10-23  6:06         ` [dpdk-dev] [PATCH v5 2/4] net/enetc: set random MAC in case no MAC for SI Gagandeep Singh
2019-10-23  6:06         ` [dpdk-dev] [PATCH v5 3/4] net/enetc: add log level notice Gagandeep Singh
2019-10-23  6:06         ` [dpdk-dev] [PATCH v5 4/4] net/enetc: enable dpaax library Gagandeep Singh

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=5f9080e2-1d76-48c0-6fb2-e68e9d56091b@intel.com \
    --to=ferruh.yigit@intel.com \
    --cc=dev@dpdk.org \
    --cc=g.singh@nxp.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).