DPDK patches and discussions
 help / color / mirror / Atom feed
From: Jerin Jacob <jerin.jacob@caviumnetworks.com>
To: <dev@dpdk.org>
Cc: <bruce.richardson@intel.com>, <thomas.monjalon@6wind.com>
Subject: [dpdk-dev]  mbuff rearm_data aligmenet issue on non x86
Date: Thu, 12 May 2016 14:44:09 +0530	[thread overview]
Message-ID: <20160512091349.GA10395@localhost.localdomain> (raw)

Hi All,

I would like align mbuff rearm_data field to 8 byte aligned so that
write to mbuf->rearm_data with uint64_t* will be naturally aligned.
I am not sure about IA but some other architecture/implementation has overhead
in non-naturally aligned stores.

Proposed patch is something like this below, But open for any change to
make fit for all other architectures/platform.

Any thoughts ?

➜ [master] [dpdk-master] $ git diff
diff --git a/lib/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf/rte_mbuf.h
index 529debb..5a917d0 100644
--- a/lib/librte_mbuf/rte_mbuf.h
+++ b/lib/librte_mbuf/rte_mbuf.h
@@ -733,10 +733,8 @@ struct rte_mbuf {
        void *buf_addr;           /**< Virtual address of segment
buffer. */
        phys_addr_t buf_physaddr; /**< Physical address of segment
buffer. */
 
-       uint16_t buf_len;         /**< Length of segment buffer. */
-
        /* next 6 bytes are initialised on RX descriptor rearm */
-       MARKER8 rearm_data;
+       MARKER64 rearm_data;
        uint16_t data_off;
 
        /**
@@ -754,6 +752,7 @@ struct rte_mbuf {
        uint8_t nb_segs;          /**< Number of segments. */
        uint8_t port;             /**< Input port. */
 
+       uint16_t buf_len;         /**< Length of segment buffer. */
        uint64_t ol_flags;        /**< Offload features. */
 
        /* remaining bytes are set on RX when pulling packet from
 * descriptor 

/Jerin

             reply	other threads:[~2016-05-12  9:14 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-12  9:14 Jerin Jacob [this message]
2016-05-12 10:07 ` Ananyev, Konstantin
2016-05-12 12:17   ` Jerin Jacob
2016-05-12 13:14     ` Ananyev, Konstantin
2016-05-12 14:50       ` Jerin Jacob

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=20160512091349.GA10395@localhost.localdomain \
    --to=jerin.jacob@caviumnetworks.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=thomas.monjalon@6wind.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).