From: Matej Vido <vido@cesnet.cz>
To: dev@dpdk.org
Subject: [dpdk-dev] [PATCH] net/szedata2: use macro from common library
Date: Wed, 14 Jun 2017 13:08:57 +0200 [thread overview]
Message-ID: <1497438537-31103-1-git-send-email-vido@cesnet.cz> (raw)
Macro for alignment is defined in the common library.
Use macro from the common library in own macro definition.
Signed-off-by: Matej Vido <vido@cesnet.cz>
---
drivers/net/szedata2/rte_eth_szedata2.h | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/net/szedata2/rte_eth_szedata2.h b/drivers/net/szedata2/rte_eth_szedata2.h
index 2571d54..f25d4c5 100644
--- a/drivers/net/szedata2/rte_eth_szedata2.h
+++ b/drivers/net/szedata2/rte_eth_szedata2.h
@@ -38,6 +38,8 @@
#include <libsze2.h>
+#include <rte_common.h>
+
/* PCI Vendor ID */
#define PCI_VENDOR_ID_NETCOPE 0x1b26
@@ -58,7 +60,7 @@
* Round 'what' to the nearest larger (or equal) multiple of '8'
* (szedata2 packet is aligned to 8 bytes)
*/
-#define RTE_SZE2_ALIGN8(what) (((what) + ((8) - 1)) & (~((8) - 1)))
+#define RTE_SZE2_ALIGN8(what) RTE_ALIGN(what, 8)
/*! main handle structure */
struct szedata {
--
1.8.4
next reply other threads:[~2017-06-14 11:09 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-14 11:08 Matej Vido [this message]
2017-06-15 11:30 ` 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=1497438537-31103-1-git-send-email-vido@cesnet.cz \
--to=vido@cesnet.cz \
--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).