DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Dumitrescu, Cristian" <cristian.dumitrescu@intel.com>
To: "Sheehan, Georgina" <georgina.sheehan@intel.com>,
	"dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH v2 1/3] librte_pipeline: add support for DSCP action
Date: Thu, 28 Feb 2019 19:21:23 +0000	[thread overview]
Message-ID: <3EB4FA525960D640B5BDFFD6A3D891268E846065@IRSMSX108.ger.corp.intel.com> (raw)
In-Reply-To: <20180211132905.7502-1-georgina.sheehan@intel.com>

Hi Georgina,

Thanks for your patch set and sorry for my delayed reply!

> -----Original Message-----
> From: Sheehan, Georgina
> Sent: Sunday, February 11, 2018 1:29 PM
> To: dev@dpdk.org
> Cc: Dumitrescu, Cristian <cristian.dumitrescu@intel.com>; Sheehan,
> Georgina <georgina.sheehan@intel.com>
> Subject: [PATCH v2 1/3] librte_pipeline: add support for DSCP action

According to DPDK policy, the title of a library patch should remove the "librte_" prefix from the library name, i.e. the title of this patch should be: "pipeline: add support for DSCP action".

> 
> From: Georgina Sheehan <georgina.sheehan@intel.com>
> 
> This allows the application to change the DSCP value of incoming packets
> 
> v2: Added in call of function parse_table_action_dscp in softnic cli file
> 
> Signed-off-by: Georgina Sheehan <georgina.sheehan@intel.com>
> ---
>  lib/librte_pipeline/rte_table_action.c | 133 +++++++++++++++++++++++++
>  lib/librte_pipeline/rte_table_action.h |  20 ++++
>  2 files changed, 153 insertions(+)
> 

<snip>

> diff --git a/lib/librte_pipeline/rte_table_action.h
> b/lib/librte_pipeline/rte_table_action.h
> index c96061291..28db53303 100644
> --- a/lib/librte_pipeline/rte_table_action.h
> +++ b/lib/librte_pipeline/rte_table_action.h
> @@ -102,6 +102,9 @@ enum rte_table_action_type {
> 
>  	/** Packet decapsulations. */
>  	RTE_TABLE_ACTION_DECAP,
> +
> +	/** Differentiated Services Code Point (DSCP) **/
> +	RTE_TABLE_ACTION_DSCP,
>  };
> 
>  /** Common action configuration (per table action profile). */
> @@ -794,6 +797,23 @@ struct rte_table_action_decap_params {
>  	uint16_t n;
>  };
> 
> +/**
> + * RTE_TABLE_ACTION_DSCP
> + */
> +/** DSCP action configuration (per table action profile). */
> +struct rte_table_action_dscp_config {
> +	/** dscp length  */
> +	uint8_t dscp_len;

What exactly is DSCP length?

> +
> +};
> +
> +/** DSCP action parameters (per table rule). */
> +struct rte_table_action_dscp_params {
> +	/** dscp value to be set */
> +	uint8_t dscp_val;
> +
> +};
> +
>  /**
>   * Table action profile.
>   */
> --
> 2.17.1

I have a fundamental issue with this approach for DSCP marking action:
1/ This proposal seems to simply read a single pre-configured DSCP value from the table entry and apply it to all the packets that hit this table entry.
2/ To me, this approach is not really useful, as in practice different packets that belong to the same flow can be tagged with different DSCP values on the way out: for example, the flow can represent all the traffic for a given BNG subscriber, which can include management data, voice, real time video, high priority best effort, low priority best effort, etc packets.

DSCP is typically used by a specific provide to tag the traffic class and the priority of the incoming packets within its network. Packets from the same user can belong to different traffic classes and drop precedences, such as described in e.g. RFC 2598 and related. Therefore, what I suggest is:
1/ Replacing the single pre-defined DSCP value per table entry with an array defined per table (not per table entry).
2/ The reason to define this array per table as opposed to table entry is that the DSCP code points are typically defined per network (all users) rather than per user. Similar approach is already used by other existing actions, such as metering and traffic management.
3/ The array is a 2D array indexed by the traffic class (mbuf->hash.sched.traffic_class) and color/drop precedence (mbuf->hash.sched.color) of the current packet (mbuf). The values are DSCP values for different traffic classes and packet colors.
4/ The number of traffic classes (n_traffic_classes) should be a configuration parameter for this action, therefore the size of the DSCP array is n_traffic_classes x RTE_COLORS.

Makes sense?

Thanks,
Cristian

      parent reply	other threads:[~2019-02-28 19:21 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-12  9:31 [dpdk-dev] [PATCH v1 " Sheehan,Georgina
2019-02-12  9:31 ` [dpdk-dev] [PATCH v1 2/3] pipeline: add implementation " Sheehan,Georgina
2019-02-12  9:31 ` [dpdk-dev] [PATCH v1 3/3] net/softnic: add support " Sheehan,Georgina
2019-02-12 14:03 ` [dpdk-dev] [PATCH v2 1/3] librte_pipeline: " Sheehan,Georgina
2019-02-12 14:03   ` [dpdk-dev] [PATCH v2 2/3] pipeline: add implementation " Sheehan,Georgina
2019-02-28 19:24     ` Dumitrescu, Cristian
2019-02-12 14:03   ` [dpdk-dev] [PATCH v2 3/3] net/softnic: add support " Sheehan,Georgina
2019-02-28 19:21   ` Dumitrescu, Cristian [this message]

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=3EB4FA525960D640B5BDFFD6A3D891268E846065@IRSMSX108.ger.corp.intel.com \
    --to=cristian.dumitrescu@intel.com \
    --cc=dev@dpdk.org \
    --cc=georgina.sheehan@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).