From: Olivier MATZ <olivier.matz@6wind.com>
To: Bruce Richardson <bruce.richardson@intel.com>, dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH v2 6/6] mbuf: flatten struct vlan_macip into mbuf struct
Date: Mon, 08 Sep 2014 11:07:11 +0200 [thread overview]
Message-ID: <540D71BF.8050006@6wind.com> (raw)
In-Reply-To: <1409240559-14447-7-git-send-email-bruce.richardson@intel.com>
Hi Bruce,
Just small typos below.
On 08/28/2014 05:42 PM, Bruce Richardson wrote:
> The vlan_macip structure combined a vlan tag id with l2 and l3 headers
> lengths for tracking offloads. However, this structure was only used as
> a unit by the e1000 and ixgbe drivers, not generally.
>
> This patch removes the structure from the mbuf header and places the
> fields into the mbuf structure directly at the required point, without
> any net effect on the structure layout. This allows us to treat the vlan
> tags and header length fields as separate for future mbuf changes. The
> drivers which were written to use the combined structure still do so,
> using a driver-local definition of it.
>
> Changes in V2:
> * None
>
> [...]
>
> diff --git a/lib/librte_pmd_e1000/em_rxtx.c b/lib/librte_pmd_e1000/em_rxtx.c
> index 074c9b3..4f46bdf 100644
> --- a/lib/librte_pmd_e1000/em_rxtx.c
> +++ b/lib/librte_pmd_e1000/em_rxtx.c
> @@ -144,13 +144,34 @@ enum {
> EM_CTX_NUM = 1, /**< CTX NUM */
> };
>
> +/** Offload features */
> +union em_vlan_macip {
> + uint32_t data;
> + struct {
> + uint16_t l3_len:9; /**< L3 (IP) Header Length. */
> + uint16_t l2_len:7; /**< L2 (MAC) Header Length. */
> + uint16_t vlan_tci;
> + /**< VLAN Tag Control Identifier (CPU order). */
> + } f;
> +};
> +
> +/*
> + * Compare mask for vlan_macip_len.data,
> + * should be in sync with em_vlan_macip.f layout.
> + * */
> +#define TX_VLAN_CMP_MASK 0xFFFF0000 /**< VLAN length - 16-bits. */
> +#define TX_MAC_LEN_CMP_MASK 0x0000FE00 /**< MAC length - 7-bits. */
> +#define TX_IP_LEN_CMP_MASK 0x000001FF /**< IP length - 9-bits. */
> +/**< MAC+IP length. */
> +#define TX_MACIP_LEN_CMP_MASK (TX_MAC_LEN_CMP_MASK | TX_IP_LEN_CMP_MASK)
> +
I think the doxygen syntax "/**<" is only used for comments that are
after the name. It was already like this before your patch (in
rte_mbuf.h), but maybe it's a good occasion to fix this typo.
There is the same in igb and ixgbe.
> /**
> * Structure to check if new context need be built
> */
> struct em_ctx_info {
> uint16_t flags; /**< ol_flags related to context build. */
> uint32_t cmp_mask; /**< compare mask */
> - union rte_vlan_macip hdrlen; /**< L2 and L3 header lenghts */
> + union em_vlan_macip hdrlen; /**< L2 and L3 header lenghts */
> };
The comment is not aligned with the others.
Acked-by: Olivier Matz <olivier.matz@6wind.com>
next prev parent reply other threads:[~2014-09-08 9:02 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-27 15:50 [dpdk-dev] [PATCH 0/6] Mbuf structure Rework, part 1 Bruce Richardson
2014-08-27 15:50 ` [dpdk-dev] [PATCH 1/6] ixgbe: put only non-zero initializer in definition Bruce Richardson
2014-08-27 15:50 ` [dpdk-dev] [PATCH 2/6] mbuf: rename RTE_MBUF_SCATTER_GATHER into RTE_MBUF_REFCNT Bruce Richardson
2014-08-27 15:50 ` [dpdk-dev] [PATCH 3/6] mbuf: remove rte_ctrlmbuf Bruce Richardson
2014-08-27 15:50 ` [dpdk-dev] [PATCH 4/6] mbuf: remove the rte_pktmbuf structure Bruce Richardson
2014-08-27 15:50 ` [dpdk-dev] [PATCH 5/6] mbuf: rename in_port to just port Bruce Richardson
2014-08-27 15:50 ` [dpdk-dev] [PATCH 6/6] mbuf: flatten struct vlan_macip into mbuf struct Bruce Richardson
2014-08-28 15:42 ` [dpdk-dev] [PATCH v2 0/6] Mbuf structure Rework, part 1 Bruce Richardson
2014-09-17 9:30 ` Thomas Monjalon
2014-08-28 15:42 ` [dpdk-dev] [PATCH v2 1/6] ixgbe: put only non-zero initializer in definition Bruce Richardson
2014-09-05 16:14 ` De Lara Guarch, Pablo
2014-09-08 7:55 ` Olivier MATZ
2014-08-28 15:42 ` [dpdk-dev] [PATCH v2 2/6] mbuf: rename RTE_MBUF_SCATTER_GATHER into RTE_MBUF_REFCNT Bruce Richardson
2014-09-05 16:14 ` De Lara Guarch, Pablo
2014-09-08 8:01 ` Olivier MATZ
2014-08-28 15:42 ` [dpdk-dev] [PATCH v2 3/6] mbuf: remove rte_ctrlmbuf Bruce Richardson
2014-09-05 16:15 ` De Lara Guarch, Pablo
2014-09-08 8:21 ` Olivier MATZ
2014-09-09 8:48 ` Richardson, Bruce
2014-08-28 15:42 ` [dpdk-dev] [PATCH v2 4/6] mbuf: remove the rte_pktmbuf structure Bruce Richardson
2014-09-04 13:25 ` [dpdk-dev] [PATCH v3 " Bruce Richardson
2014-09-05 16:17 ` De Lara Guarch, Pablo
2014-09-08 8:29 ` Olivier MATZ
2014-09-05 16:15 ` [dpdk-dev] [PATCH v2 " De Lara Guarch, Pablo
2014-08-28 15:42 ` [dpdk-dev] [PATCH v2 5/6] mbuf: rename in_port to just port Bruce Richardson
2014-09-05 16:16 ` De Lara Guarch, Pablo
2014-09-08 8:45 ` Olivier MATZ
2014-08-28 15:42 ` [dpdk-dev] [PATCH v2 6/6] mbuf: flatten struct vlan_macip into mbuf struct Bruce Richardson
2014-09-05 16:21 ` De Lara Guarch, Pablo
2014-09-07 19:40 ` Richardson, Bruce
2014-09-08 9:07 ` Olivier MATZ [this message]
2014-09-09 14:40 ` [dpdk-dev] [PATCH v3 " Bruce Richardson
2014-09-09 15:20 ` De Lara Guarch, Pablo
2014-09-08 12:32 ` [dpdk-dev] [PATCH 0/6] Mbuf structure Rework, part 1 Olivier MATZ
2014-09-09 9:03 ` Richardson, Bruce
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=540D71BF.8050006@6wind.com \
--to=olivier.matz@6wind.com \
--cc=bruce.richardson@intel.com \
--cc=dev@dpdk.org \
/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).