DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ori Kam <orika@nvidia.com>
To: Shiri Kuzin <shirik@nvidia.com>, "dev@dpdk.org" <dev@dpdk.org>
Cc: Slava Ovsiienko <viacheslavo@nvidia.com>,
	NBU-Contact-Adrien Mazarguil <adrien.mazarguil@6wind.com>,
	"ferruh.yigit@intel.com" <ferruh.yigit@intel.com>,
	NBU-Contact-Thomas Monjalon <thomas@monjalon.net>,
	Raslan Darawsheh <rasland@nvidia.com>
Subject: Re: [dpdk-dev] [PATCH 1/6] ethdev: update GTP headers
Date: Tue, 29 Dec 2020 10:15:28 +0000
Message-ID: <DM6PR12MB4987725095CBCAFA24ABF1CED6D80@DM6PR12MB4987.namprd12.prod.outlook.com> (raw)
In-Reply-To: <20201228194432.30512-2-shirik@nvidia.com>



> -----Original Message-----
> From: Shiri Kuzin <shirik@nvidia.com>
> 
> From: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
> 
> This patch introduces the GTP header individual flag bit fields
> and the header optional word with N-PDU number, Sequence Number
> and Next Extension Header type.
> 
> Signed-off-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
> ---
>  lib/librte_net/rte_gtp.h | 33 ++++++++++++++++++++++++++++++---
>  1 file changed, 30 insertions(+), 3 deletions(-)
> 
> diff --git a/lib/librte_net/rte_gtp.h b/lib/librte_net/rte_gtp.h
> index 104384cc53..6a6f9b238d 100644
> --- a/lib/librte_net/rte_gtp.h
> +++ b/lib/librte_net/rte_gtp.h
> @@ -27,13 +27,40 @@ extern "C" {
>   * 16-bit payload length after mandatory header, 32-bit TEID.
>   * No optional fields and next extension header.
>   */
> +__extension__
>  struct rte_gtp_hdr {
> -	uint8_t gtp_hdr_info; /**< GTP header info */
> +	union {
> +		uint8_t gtp_hdr_info; /**< GTP header info */
> +		struct {
> +#if RTE_BYTE_ORDER == RTE_LITTLE_ENDIAN
> +			uint8_t pn:1;   /**< N-PDU Number present bit */
> +			uint8_t s:1;    /**< Sequence Number Present bit */
> +			uint8_t e:1;    /**< Extension Present bit */
> +			uint8_t res1:1; /**< Reserved */
> +			uint8_t pt:1;   /**< Protocol Type bit */
> +			uint8_t ver:3;  /**< Version Number */
> +#elif RTE_BYTE_ORDER == RTE_BIG_ENDIAN
> +			uint8_t ver:3;  /**< Version Number */
> +			uint8_t pt:1;   /**< Protocol Type bit */
> +			uint8_t res1:1; /**< Reserved */
> +			uint8_t e:1;    /**< Extension Present bit */
> +			uint8_t s:1;    /**< Sequence Number Present bit */
> +			uint8_t pn:1;   /**< N-PDU Number present bit */
> +#endif
> +		};
> +	};
>  	uint8_t msg_type;     /**< GTP message type */
> -	uint16_t plen;        /**< Total payload length */
> -	uint32_t teid;        /**< Tunnel endpoint ID */
> +	rte_be16_t plen;      /**< Total payload length */
> +	rte_be32_t teid;      /**< Tunnel endpoint ID */
>  } __rte_packed;
> 
> +/* Optional word of GTP header, present if any of E, S, PN is set. */
> +struct rte_gtp_hdr_ext_word {
> +	rte_be16_t sqn;	      /**< Sequence Number. */
> +	uint8_t npdu;	      /**< N-PDU number. */
> +	uint8_t next_ext;     /**< Next Extension Header Type. */
> +}  __rte_packed;
> +
>  /** GTP header length */
>  #define RTE_ETHER_GTP_HLEN \
>  	(sizeof(struct rte_udp_hdr) + sizeof(struct rte_gtp_hdr))
> --
> 2.21.0

Acked-by: Ori Kam <orika@nvidia.com>
Thanks,
Ori


  reply	other threads:[~2020-12-29 10:15 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-28 19:44 [dpdk-dev] [PATCH 0/6] add GTP PSC extension header support Shiri Kuzin
2020-12-28 19:44 ` [dpdk-dev] [PATCH 1/6] ethdev: update GTP headers Shiri Kuzin
2020-12-29 10:15   ` Ori Kam [this message]
2020-12-28 19:44 ` [dpdk-dev] [PATCH 2/6] app/testpmd: add GTP PSC option support in raw sets Shiri Kuzin
2020-12-29 10:18   ` Ori Kam
2020-12-28 19:44 ` [dpdk-dev] [PATCH 3/6] common/mlx5: add matcher fields for GTP extensions Shiri Kuzin
2020-12-28 19:44 ` [dpdk-dev] [PATCH 4/6] net/mlx5: add GTP PSC flow validation Shiri Kuzin
2020-12-28 19:44 ` [dpdk-dev] [PATCH 5/6] net/mlx5: add GTP PSC item translation Shiri Kuzin
2020-12-28 19:44 ` [dpdk-dev] [PATCH 6/6] doc: update GTP extension header support Shiri Kuzin
2021-01-11 18:21 ` [dpdk-dev] [PATCH v2 0/6] add GTP PSC " Shiri Kuzin
2021-01-11 18:21   ` [dpdk-dev] [PATCH v2 1/6] ethdev: update GTP headers Shiri Kuzin
2021-01-15  1:15     ` Ferruh Yigit
2021-01-11 18:21   ` [dpdk-dev] [PATCH v2 2/6] app/testpmd: add GTP PSC option support in raw sets Shiri Kuzin
2021-01-11 18:21   ` [dpdk-dev] [PATCH v2 3/6] common/mlx5: add matcher fields for GTP extensions Shiri Kuzin
2021-01-11 18:21   ` [dpdk-dev] [PATCH v2 4/6] net/mlx5: add GTP PSC flow validation Shiri Kuzin
2021-01-11 18:21   ` [dpdk-dev] [PATCH v2 5/6] net/mlx5: add GTP PSC item translation Shiri Kuzin
2021-01-11 18:21   ` [dpdk-dev] [PATCH v2 6/6] doc: update GTP extension header support Shiri Kuzin
2021-01-15  1:16   ` [dpdk-dev] [PATCH v2 0/6] add GTP PSC " 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=DM6PR12MB4987725095CBCAFA24ABF1CED6D80@DM6PR12MB4987.namprd12.prod.outlook.com \
    --to=orika@nvidia.com \
    --cc=adrien.mazarguil@6wind.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=rasland@nvidia.com \
    --cc=shirik@nvidia.com \
    --cc=thomas@monjalon.net \
    --cc=viacheslavo@nvidia.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

DPDK patches and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ https://inbox.dpdk.org/dev \
		dev@dpdk.org
	public-inbox-index dev

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git