DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Zhang, Qi Z" <qi.z.zhang@intel.com>
To: "Li, Xiaoyun" <xiaoyun.li@intel.com>,
	"Lu, Wenzhuo" <wenzhuo.lu@intel.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>,
	"Li, Xiaoyun" <xiaoyun.li@intel.com>,
	"stable@dpdk.org" <stable@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH] app/testpmd: fix little perf drop with XL710
Date: Tue, 10 Jul 2018 04:31:13 +0000	[thread overview]
Message-ID: <039ED4275CED7440929022BC67E7061153257B27@SHSMSX103.ccr.corp.intel.com> (raw)
In-Reply-To: <1531189709-312497-1-git-send-email-xiaoyun.li@intel.com>

Hi Xiaoyun:

> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Xiaoyun Li
> Sent: Tuesday, July 10, 2018 10:28 AM
> To: Lu, Wenzhuo <wenzhuo.lu@intel.com>
> Cc: dev@dpdk.org; Li, Xiaoyun <xiaoyun.li@intel.com>; stable@dpdk.org
> Subject: [dpdk-dev] [PATCH] app/testpmd: fix little perf drop with XL710
> 
> There is about 1.8M perf drop with XL710. And it is because of a bitrate
> calculation in the datapath. So improve it by maintaining an array of port
> indexes in testpmd, which is updated with ethdev events.
> 
> Fixes: 8728ccf37615 ("fix ethdev ports enumeration")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Xiaoyun Li <xiaoyun.li@intel.com>
> ---
<...>

> @@ -2196,16 +2199,31 @@ static void
>  eth_dev_event_callback(char *device_name, enum rte_dev_event_type type,
>  			     __rte_unused void *arg)

Do we also need to update ports_ids when user attach or detach a port from command line? (see function attach_port and detach_port).
I think eth_dev_event_callback is only for the case to handle udev event when a hardware hotplug happen.


>  {
> +	portid_t port_id;
> +	uint16_t i;
> +
>  	if (type >= RTE_DEV_EVENT_MAX) {
>  		fprintf(stderr, "%s called upon invalid event %d\n",
>  			__func__, type);
>  		fflush(stderr);
>  	}
> 
> +	rte_eth_dev_get_port_by_name(device_name, &port_id);

It's better to check the return value to make sure we get a valid port_id.

Regards
Qi

<...>

  reply	other threads:[~2018-07-10  4:31 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-10  2:28 Xiaoyun Li
2018-07-10  4:31 ` Zhang, Qi Z [this message]
2018-07-11  2:15 ` [dpdk-dev] [PATCH v2] " Xiaoyun Li
2018-07-12  4:56   ` Zhang, Qi Z
2018-07-12  5:56   ` Lu, Wenzhuo
2018-07-12  8:01     ` Li, Xiaoyun
2018-07-12  7:55   ` [dpdk-dev] [PATCH v3] app/testpmd: fix little perf drop Xiaoyun Li
2018-07-16  3:02     ` Lu, Wenzhuo
2018-07-18 10:10       ` [dpdk-dev] [dpdk-stable] " 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=039ED4275CED7440929022BC67E7061153257B27@SHSMSX103.ccr.corp.intel.com \
    --to=qi.z.zhang@intel.com \
    --cc=dev@dpdk.org \
    --cc=stable@dpdk.org \
    --cc=wenzhuo.lu@intel.com \
    --cc=xiaoyun.li@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).