DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ferruh Yigit <ferruh.yigit@xilinx.com>
To: Chaoyong He <chaoyong.he@corigine.com>, <dev@dpdk.org>,
	Ian Stokes <ian.stokes@intel.com>,
	David Marchand <david.marchand@redhat.com>
Cc: <oss-drivers@corigine.com>, <niklas.soderlund@corigine.com>,
	Thomas Monjalon <thomas@monjalon.net>,
	Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>,
	Jerin Jacob Kollanukkaran <jerinj@marvell.com>
Subject: Re: [PATCH v9 05/12] net/nfp: add flower PF setup logic
Date: Tue, 20 Sep 2022 15:57:12 +0100	[thread overview]
Message-ID: <cea1de8b-37ef-f098-16ec-fbd604094c18@xilinx.com> (raw)
In-Reply-To: <1663238669-12244-6-git-send-email-chaoyong.he@corigine.com>

On 9/15/2022 11:44 AM, Chaoyong He wrote:
> Adds the vNIC initialization logic for the flower PF vNIC. The flower
> firmware application exposes this vNIC for the purposes of fallback
> traffic in the switchdev use-case.
> 
> Adds minimal dev_ops for this PF vNIC device. Because the device is
> being exposed externally to DPDK it needs to implements a minimal set
> of dev_ops.
> 
> Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
> Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>

<...>

> +
> +struct dp_packet {
> +	struct rte_mbuf mbuf;
> +	uint32_t source;
> +};
> +
> +static void
> +nfp_flower_pf_mp_init(__rte_unused struct rte_mempool *mp,
> +		__rte_unused void *opaque_arg,
> +		void *packet,
> +		__rte_unused unsigned int i)
> +{
> +	struct dp_packet *pkt = packet;
> +	/* Indicate that this pkt is from DPDK */
> +	pkt->source = 3;
> +}
> +
> +static struct rte_mempool *
> +nfp_flower_pf_mp_create(void)
> +{
> +	uint32_t nb_mbufs;
> +	unsigned int numa_node;
> +	struct rte_mempool *pktmbuf_pool;
> +	uint32_t n_rxd = PF_VNIC_NB_DESC;
> +	uint32_t n_txd = PF_VNIC_NB_DESC;
> +
> +	nb_mbufs = RTE_MAX(n_rxd + n_txd + MAX_PKT_BURST + MEMPOOL_CACHE_SIZE, 81920U);
> +
> +	numa_node = rte_socket_id();
> +	pktmbuf_pool = rte_pktmbuf_pool_create("flower_pf_mbuf_pool", nb_mbufs,
> +			MEMPOOL_CACHE_SIZE, MBUF_PRIV_SIZE,
> +			RTE_MBUF_DEFAULT_BUF_SIZE, numa_node);
> +	if (pktmbuf_pool == NULL) {
> +		PMD_INIT_LOG(ERR, "Cannot init pf vnic mbuf pool");
> +		return NULL;
> +	}
> +
> +	rte_mempool_obj_iter(pktmbuf_pool, nfp_flower_pf_mp_init, NULL);
> +
> +	return pktmbuf_pool;
> +}
> +

Hi Chaoyong,

Again, similar comment to previous versions, what I understand is this 
new flower FW supports HW flow filter and intended use case is for OvS 
HW acceleration.
But is DPDK driver need to know OvS data structures, like "struct 
dp_packet", can it be transparent to application, I am sure there are 
other devices offloading some OvS task to HW.

@Ian, @David,

Can you please comment on above usage, do you guys see any way to escape 
from OvS specific code in the driver?


  reply	other threads:[~2022-09-20 14:57 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-15 10:44 [PATCH v9 00/12] preparation for the rte_flow offload of nfp PMD Chaoyong He
2022-09-15 10:44 ` [PATCH v9 01/12] net/nfp: move app specific attributes to own struct Chaoyong He
2022-09-15 10:44 ` [PATCH v9 02/12] net/nfp: simplify initialization and remove dead code Chaoyong He
2022-09-15 10:44 ` [PATCH v9 03/12] net/nfp: move app specific init logic to own function Chaoyong He
2022-09-15 10:44 ` [PATCH v9 04/12] net/nfp: add initial flower firmware support Chaoyong He
2022-09-15 10:44 ` [PATCH v9 05/12] net/nfp: add flower PF setup logic Chaoyong He
2022-09-20 14:57   ` Ferruh Yigit [this message]
2022-09-21  2:50     ` Chaoyong He
2022-09-21  7:35       ` Thomas Monjalon
2022-09-21  7:47         ` Chaoyong He
2022-09-15 10:44 ` [PATCH v9 06/12] net/nfp: add flower PF related routines Chaoyong He
2022-09-15 10:44 ` [PATCH v9 07/12] net/nfp: add flower ctrl VNIC related logics Chaoyong He
2022-09-20 14:56   ` Ferruh Yigit
2022-09-21  2:02     ` Chaoyong He
2022-09-21  7:29       ` Thomas Monjalon
2022-09-21  7:42         ` Chaoyong He
2022-09-15 10:44 ` [PATCH v9 08/12] net/nfp: move common rxtx function for flower use Chaoyong He
2022-09-15 10:44 ` [PATCH v9 09/12] net/nfp: add flower ctrl VNIC rxtx logic Chaoyong He
2022-09-15 10:44 ` [PATCH v9 10/12] net/nfp: add flower representor framework Chaoyong He
2022-09-15 10:44 ` [PATCH v9 11/12] net/nfp: move rxtx function to header file Chaoyong He
2022-09-15 10:44 ` [PATCH v9 12/12] net/nfp: add flower PF rxtx logic Chaoyong He
2022-09-20 14:56 ` [PATCH v9 00/12] preparation for the rte_flow offload of nfp PMD 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=cea1de8b-37ef-f098-16ec-fbd604094c18@xilinx.com \
    --to=ferruh.yigit@xilinx.com \
    --cc=andrew.rybchenko@oktetlabs.ru \
    --cc=chaoyong.he@corigine.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=ian.stokes@intel.com \
    --cc=jerinj@marvell.com \
    --cc=niklas.soderlund@corigine.com \
    --cc=oss-drivers@corigine.com \
    --cc=thomas@monjalon.net \
    /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).