DPDK patches and discussions
 help / color / mirror / Atom feed
From: Simei Su <simei.su@intel.com>
To: kirill.rybalchenko@intel.com, ferruh.yigit@intel.com
Cc: dev@dpdk.org, qi.z.zhang@intel.com, haiyue.wang@intel.com,
	Simei Su <simei.su@intel.com>
Subject: [dpdk-dev] [PATCH] examples/ptpclient: enable Rx queue configuration
Date: Thu, 19 Aug 2021 16:58:34 +0800	[thread overview]
Message-ID: <20210819085834.30550-1-simei.su@intel.com> (raw)

This patch adds support to enable per-queue Rx offloads so that
it can convey the configuration to PMD.

Signed-off-by: Simei Su <simei.su@intel.com>
---
 examples/ptpclient/ptpclient.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/examples/ptpclient/ptpclient.c b/examples/ptpclient/ptpclient.c
index 4f32ade..d083a2e 100644
--- a/examples/ptpclient/ptpclient.c
+++ b/examples/ptpclient/ptpclient.c
@@ -217,8 +217,13 @@ port_init(uint16_t port, struct rte_mempool *mbuf_pool)
 
 	/* Allocate and set up 1 RX queue per Ethernet port. */
 	for (q = 0; q < rx_rings; q++) {
+		struct rte_eth_rxconf *rxconf;
+
+		rxconf = &dev_info.default_rxconf;
+		rxconf->offloads = port_conf.rxmode.offloads;
+
 		retval = rte_eth_rx_queue_setup(port, q, nb_rxd,
-				rte_eth_dev_socket_id(port), NULL, mbuf_pool);
+				rte_eth_dev_socket_id(port), rxconf, mbuf_pool);
 
 		if (retval < 0)
 			return retval;
-- 
2.9.5


             reply	other threads:[~2021-08-19  9:03 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-19  8:58 Simei Su [this message]
2021-10-13 16:32 ` Thomas Monjalon

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=20210819085834.30550-1-simei.su@intel.com \
    --to=simei.su@intel.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=haiyue.wang@intel.com \
    --cc=kirill.rybalchenko@intel.com \
    --cc=qi.z.zhang@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).