diff mbox

[dpdk-dev] net/szedata2: use macro from common library

Message ID 1497438537-31103-1-git-send-email-vido@cesnet.cz (mailing list archive)
State Accepted, archived
Delegated to: Ferruh Yigit
Headers show

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Matej Vido June 14, 2017, 11:08 a.m. UTC
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(-)

Comments

Ferruh Yigit June 15, 2017, 11:30 a.m. UTC | #1
On 6/14/2017 12:08 PM, Matej Vido wrote:
> 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>

Applied to dpdk-next-net/master, thanks.
diff mbox

Patch

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 {