DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Van Haaren, Harry" <harry.van.haaren@intel.com>
To: "Andralojc, WojciechX" <wojciechx.andralojc@intel.com>,
	"dev@dpdk.org" <dev@dpdk.org>
Cc: "Kantecki, Tomasz" <tomasz.kantecki@intel.com>,
	"Cornu, Marcel D" <marcel.d.cornu@intel.com>
Subject: Re: [dpdk-dev] [PATCH v2] examples/skeleton-cat: PQoS CAT and CDP, example of libpqos usage
Date: Mon, 7 Mar 2016 14:34:36 +0000	[thread overview]
Message-ID: <E923DB57A917B54B9182A2E928D00FA6128881BF@IRSMSX102.ger.corp.intel.com> (raw)
In-Reply-To: <1456499233-66251-1-git-send-email-wojciechx.andralojc@intel.com>

Hi All,

From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Wojciech Andralojc
> Subject: [dpdk-dev] [PATCH v2] examples/skeleton-cat: PQoS CAT and CDP, example of libpqos
> usage

Some minor comments/suggested-fixes in-line.
I've snipped away lots of code, below only that relevant to my comments.


> diff --git a/doc/guides/sample_app_ug/skeleton-cat.rst
> b/doc/guides/sample_app_ug/skeleton-cat.rst
> +CAT and CDP features allow management of the CPU's last level cache.
> +CAT introduces classes of service (COS) that are essentially bitmasks.

CDP is not explained anywhere - add (Cache Data Partitioning) after it here,
or write it and abbreviate as COS is.



> +Running the Application
> +-----------------------
> +
> +To run the example in a ``linuxapp`` environment and enable CAT on cpus 0-2:
> +
> +.. code-block:: console
> +
> +    ./build/basicfwd-cat -c 2 -n 4 -- --l3ca=0x3@(0-2)

This doesn't work on my machine:
 - Bash complains about syntax error near (
   Quotes around it fixes    --l3ca=0x3@"(0-2)"
 - the -c 2 will enable core represented by bitmask 0x2, so only the 2nd core.
   Is this intended?


> +or to enable CAT and CDP on cpus 1,3:
> +
> +.. code-block:: console
> +
> +    ./build/basicfwd-cat -c 2 -n 4 -- --l3ca=(0x00C00,0x00300)@(1,3)

Add a note here that when running on a maschine that doesn't support CDP, the
"CDP requested but not supported" and "PQOS: L3CA init failed!" errors 
will show up.


<snip very useful PQOS sections>


> +The ``main()`` also allocates a mempool to hold the mbufs (Message Buffers)
> +used by the application:

>From here until the end of the RST doc is duplicated from the basicfwd skeleton
app: remove all the duplicated content.



> +/*
> + * Initializes a given port using global settings and with the RX buffers
> + * coming from the mbuf_pool passed as a parameter.
> + */
> +static inline int
> +port_init(uint8_t port, struct rte_mempool *mbuf_pool)
> +{

Multi-line comment duplicated from basicfwd: can be removed.


> +/*
> + * The lcore main. This is the main thread that does the work, reading from
> + * an input port and writing to an output port.
> + */
> +static __attribute__((noreturn)) void
> +lcore_main(void)
> +{

Same.

> +/*
> + * The main function, which does initialization and calls the per-lcore
> + * functions.
> + */
> +int
> +main(int argc, char *argv[])
> +{

and same again :)


> +	/* Initialize the Environment Abstraction Layer (EAL). */
> +	int ret = rte_eal_init(argc, argv);
> +	if (ret < 0)
> +		rte_exit(EXIT_FAILURE, "Error with EAL initialization\n");
> +
> +	argc -= ret;
> +	argv += ret;
> +
> +	ret = cat_init(argc, argv);
> +	if (ret < 0)
> +		rte_exit(EXIT_FAILURE, "PQOS: L3CA init failed!\n");

Add a short comment above cat_init() stating it initializes PQOS/CAT,
that the API is similar to rte_eal_init() and to refer to the
sample-app documentation for details.


Two checkpatch issues:

WARNING: Block comments use a trailing */ on a separate line
#1231: FILE: examples/skeleton-cat/cat.c:421:
+                                * then default one (#0) */

WARNING: Block comments use a trailing */ on a separate line
#1360: FILE: examples/skeleton-cat/cat.c:550:
+                        * to be used for that group on that socket */



Apart from these minor issues;
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>

  reply	other threads:[~2016-03-07 14:34 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-24 13:26 [dpdk-dev] [PATCH] " Wojciech Andralojc
2016-02-26 15:07 ` [dpdk-dev] [PATCH v2] " Wojciech Andralojc
2016-03-07 14:34   ` Van Haaren, Harry [this message]
2016-03-07 16:54   ` [dpdk-dev] [PATCH v3] " Wojciech Andralojc
2016-03-07 17:19     ` Van Haaren, Harry
2016-03-11 13:50     ` Thomas Monjalon
2016-03-11 15:54       ` Kantecki, Tomasz
2016-03-11 16:03         ` Thomas Monjalon
2016-03-11 16:27           ` Bruce Richardson
2016-03-11 16:34             ` Kantecki, Tomasz
2016-03-11 16:38               ` Thomas Monjalon
2016-03-11 16:24   ` [dpdk-dev] [PATCH v4] " Wojciech Andralojc
2016-03-14 13:46   ` [dpdk-dev] [PATCH v5] examples/l2fwd-cat: " Wojciech Andralojc
2016-03-21 22:35     ` 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=E923DB57A917B54B9182A2E928D00FA6128881BF@IRSMSX102.ger.corp.intel.com \
    --to=harry.van.haaren@intel.com \
    --cc=dev@dpdk.org \
    --cc=marcel.d.cornu@intel.com \
    --cc=tomasz.kantecki@intel.com \
    --cc=wojciechx.andralojc@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).