From mboxrd@z Thu Jan 1 00:00:00 1970 From: Anatoly Burakov Subject: [PATCH 01/10] ip_frag: rename RTE_IP_FRAG_ASSERT to IP_FRAG_ASSERT Date: Wed, 18 Jun 2014 15:50:28 +0100 Message-ID: References: To: dev-VfR2kkLFssw@public.gmane.org Return-path: In-Reply-To: In-Reply-To: References: List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces-VfR2kkLFssw@public.gmane.org Sender: "dev" Signed-off-by: Anatoly Burakov --- lib/librte_ip_frag/ip_frag_common.h | 4 ++-- lib/librte_ip_frag/rte_ipv4_fragmentation.c | 2 +- lib/librte_ip_frag/rte_ipv6_fragmentation.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/librte_ip_frag/ip_frag_common.h b/lib/librte_ip_frag/ip_frag_common.h index ac5cd61..5ad0a0b 100644 --- a/lib/librte_ip_frag/ip_frag_common.h +++ b/lib/librte_ip_frag/ip_frag_common.h @@ -41,14 +41,14 @@ #define IP_FRAG_LOG(lvl, fmt, args...) RTE_LOG(lvl, USER1, fmt, ##args) -#define RTE_IP_FRAG_ASSERT(exp) \ +#define IP_FRAG_ASSERT(exp) \ if (!(exp)) { \ rte_panic("function %s, line%d\tassert \"" #exp "\" failed\n", \ __func__, __LINE__); \ } #else #define IP_FRAG_LOG(lvl, fmt, args...) do {} while(0) -#define RTE_IP_FRAG_ASSERT(exp) do { } while(0) +#define IP_FRAG_ASSERT(exp) do { } while(0) #endif /* IP_FRAG_DEBUG */ #define IPV4_KEYLEN 1 diff --git a/lib/librte_ip_frag/rte_ipv4_fragmentation.c b/lib/librte_ip_frag/rte_ipv4_fragmentation.c index 3ab665f..9d4e1f7 100644 --- a/lib/librte_ip_frag/rte_ipv4_fragmentation.c +++ b/lib/librte_ip_frag/rte_ipv4_fragmentation.c @@ -107,7 +107,7 @@ rte_ipv4_fragment_packet(struct rte_mbuf *pkt_in, frag_size = (uint16_t)(mtu_size - sizeof(struct ipv4_hdr)); /* Fragment size should be a multiply of 8. */ - RTE_IP_FRAG_ASSERT((frag_size & IPV4_HDR_FO_MASK) == 0); + IP_FRAG_ASSERT((frag_size & IPV4_HDR_FO_MASK) == 0); in_hdr = (struct ipv4_hdr *) pkt_in->pkt.data; flag_offset = rte_cpu_to_be_16(in_hdr->fragment_offset); diff --git a/lib/librte_ip_frag/rte_ipv6_fragmentation.c b/lib/librte_ip_frag/rte_ipv6_fragmentation.c index 6b660c4..fa04991 100644 --- a/lib/librte_ip_frag/rte_ipv6_fragmentation.c +++ b/lib/librte_ip_frag/rte_ipv6_fragmentation.c @@ -118,7 +118,7 @@ rte_ipv6_fragment_packet(struct rte_mbuf *pkt_in, frag_size = (uint16_t)(mtu_size - sizeof(struct ipv6_hdr)); /* Fragment size should be a multiple of 8. */ - RTE_IP_FRAG_ASSERT((frag_size & IPV6_HDR_FO_MASK) == 0); + IP_FRAG_ASSERT((frag_size & IPV6_HDR_FO_MASK) == 0); /* Check that pkts_out is big enough to hold all fragments */ if (unlikely (frag_size * nb_pkts_out < -- 1.8.1.4