From: "Pattan, Reshma" <reshma.pattan@intel.com>
To: "Kearney, Tadhg" <tadhg.kearney@intel.com>,
"dev@dpdk.org" <dev@dpdk.org>
Cc: "Hunt, David" <david.hunt@intel.com>,
"Burakov, Anatoly" <anatoly.burakov@intel.com>
Subject: RE: [PATCH v2 3/3] l3fwd-power: add option to call uncore API
Date: Thu, 21 Jul 2022 12:15:03 +0000 [thread overview]
Message-ID: <BYAPR11MB3366CC452C68060E5485E036FF919@BYAPR11MB3366.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20220713140706.4143705-4-tadhg.kearney@intel.com>
> -----Original Message-----
> From: Kearney, Tadhg <tadhg.kearney@intel.com>
<snip>
> +* -i (frequency index): optional, sets uncore frequency to frequency index
> value, by setting min and max values to be the same.
> +
This is not optional argument. Need to remove optional in the help text of the parameter.
> +``-i``
> + This will allow you to set the specific uncore frequency index that
> +you want, by setting
> + minimum and maximum values to be the same. Frequency index's are set
> +100000Hz apart from
> + maximum to minimum.
> + Frequency index values are in descending order, ie, index 0 is maximum
> frequency index.
> +
I would say by setting the uncore frequency to a frequency pointed by index . The frequencies at each index differ by 100MHz. The value you have mentioned in 100Khz.
<snip>
> #define IPv6_BYTES_FMT "%02x%02x:%02x%02x:%02x%02x:%02x%02x:"\
> - "%02x%02x:%02x%02x:%02x%02x:%02x%02x"
> +
This change looks to be accidental. Undo this change.
> printf( "IP dst = " IPv6_BYTES_FMT ", IP src = " IPv6_BYTES_FMT ", "
> - "port dst = %d, port src = %d, proto = %d\n",
> - IPv6_BYTES(key.ip_dst), IPv6_BYTES(key.ip_src),
> - key.port_dst, key.port_src, key.proto);
> + "port dst = %d, port src = %d, proto = %d\n",
> + IPv6_BYTES(key.ip_dst), IPv6_BYTES(key.ip_src),
> + key.port_dst, key.port_src, key.proto);
> }
>
No Change here , so should you undo this change.
> static inline uint16_t
> @@ -674,9 +692,9 @@ parse_ptype_one(struct rte_mbuf *m)
>
> static uint16_t
> cb_parse_ptype(uint16_t port __rte_unused, uint16_t queue __rte_unused,
> - struct rte_mbuf *pkts[], uint16_t nb_pkts,
> - uint16_t max_pkts __rte_unused,
> - void *user_param __rte_unused)
> + struct rte_mbuf *pkts[], uint16_t nb_pkts,
> + uint16_t max_pkts __rte_unused,
> + void *user_param __rte_unused)
No change here, so should undo this change.
> - uint16_t queue_id)
> + uint16_t port_id,
> + uint16_t queue_id)
No change here, so should undo this change.
> {
> uint32_t rxq_count = rte_eth_rx_queue_count(port_id, queue_id);
> /**
> @@ -1051,7 +1069,7 @@ static int main_intr_loop(__rte_unused void
> *dummy)
> * less as possible.
> */
> for (i = 1,
> - lcore_idle_hint = qconf-
> >rx_queue_list[0].idle_hint;
> + lcore_idle_hint = qconf-
> >rx_queue_list[0].idle_hint;
No change here, so should undo this change.
> @@ -1616,6 +1634,9 @@ print_usage(const char *prgname)
> " [--max-pkt-len PKTLEN]\n"
> " -p PORTMASK: hexadecimal bitmask of ports to
> configure\n"
> " -P: enable promiscuous mode\n"
> + " -u: set min frequency for uncore\n"
> + " -U: set max frequency for uncore\n"
> + " -i (frequency index): set frequency index for uncore\n"
Might be eidt help text a bit, " specify the uncore frequency index that uncore should be set to."
> + d = opendir(UNCORE_FREQUENCY_DIR);
> + if (!d) {
> + RTE_LOG(ERR, EAL, "Unable to open uncore frequency
> directory");
Log is for L3FWD_POWER not EAL. So need to fix this. d == NULL should be checked rather !d. Also print error string returned by the opendir in the log.
> + return -1;
> + }
> +
> + else {
Else should start in the same line where if ends. Here in other places.
You don't need else perhaps.
<snip>
> @@ -1861,10 +1988,12 @@ parse_args(int argc, char **argv)
> {CMD_LINE_OPT_SCALE_FREQ_MAX, 1, 0, 0},
> {NULL, 0, 0, 0}
> };
> + const char *min = "min";
> + const char *max = "max";
Instead of using strings to specify if user option is min or max. You can use either of the below options
1) Use global Integer value and set that to 1 in U case . And set to 0 in u case.
2)OR have parse_uncore_min_max() function with one default argument set to 0. When the argument is passed to 1 assume it to be max freq to set else min freq to set.
Thanks,
Reshma
next prev parent reply other threads:[~2022-07-21 12:16 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-13 14:07 [PATCH v2 0/3] add uncore api to be called through l3fwd-power Tadhg Kearney
2022-07-13 14:07 ` [PATCH v2 1/3] power: add uncore API to power library Tadhg Kearney
2022-07-20 16:10 ` Pattan, Reshma
2022-07-21 9:01 ` Bruce Richardson
2022-07-26 16:21 ` Kearney, Tadhg
2022-07-13 14:07 ` [PATCH v2 2/3] test/power: add unit tests for uncore API Tadhg Kearney
2022-07-13 14:07 ` [PATCH v2 3/3] l3fwd-power: add option to call " Tadhg Kearney
2022-07-21 12:15 ` Pattan, Reshma [this message]
2022-07-21 16:48 ` Pattan, Reshma
2022-09-06 10:51 ` Hunt, David
2022-09-19 9:05 ` [PATCH v3 0/3] add uncore api to be called through l3fwd-power Tadhg Kearney
2022-09-19 9:05 ` [PATCH v3 1/3] power: add uncore frequency control API to the power library Tadhg Kearney
2022-09-19 9:05 ` [PATCH v3 2/3] l3fwd-power: add option to call uncore API Tadhg Kearney
2022-09-19 9:05 ` [PATCH v3 3/3] test/power: add unit tests for " Tadhg Kearney
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=BYAPR11MB3366CC452C68060E5485E036FF919@BYAPR11MB3366.namprd11.prod.outlook.com \
--to=reshma.pattan@intel.com \
--cc=anatoly.burakov@intel.com \
--cc=david.hunt@intel.com \
--cc=dev@dpdk.org \
--cc=tadhg.kearney@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).