This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "".
The branch, master has been updated via 54228421977f94d9da752290540c6ec4dc5306a0 (commit) via 605e77187211dbb0716e4124f249c7f0f88567f7 (commit) via 940c54bbd1c0c16ea2b6a6f6737d151deeba1e43 (commit) via 91ceea49a975c6fcd61ab1c992a502350d673eeb (commit) via b46702e5ef368c9aaf9d6cea7d32b07adb881ce3 (commit) via 48dfcade1602e9cc9bb8cd3251037508aef146cd (commit) via 2aa9a05b11bdfac0c0126384d4677b3f9c561a78 (commit) via df978d9b4e766c8e1cb1a88a28d98318840fee22 (commit) via 482eeee380d40596131826c1103ed89247bd17e5 (commit) via 254190ffcdb51549ee23846f33fd45513656b78c (commit) via 52877c96e12bf62614df0482175384565a851083 (commit) via 133e7fc06147486fff5ab3393b1a791ab97d19d3 (commit) via 8c9ce8c63eed9d01fec54c09bd17040914abd623 (commit) via 2b57c7d7b96eef16c36b8b0020b3dd78acc82660 (commit) via cbced85824c4c03c0b35396d559ebfb187237569 (commit) via 1217fbaed0aee2ee395c131bb7fd2e201214ed31 (commit) via 927b57f21124f31e23fd7f72dddcc93a5248ed53 (commit) via 1bcf171f00973bcc21baadf9919a61cd6abdf713 (commit) from ec0c3145fcafa09ae3a79875e7e07dd4794583cc (commit)
Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below.
- Log ----------------------------------------------------------------- commit 54228421977f94d9da752290540c6ec4dc5306a0 Author: Matias Elo matias.elo@nokia.com Date: Mon Oct 16 12:29:57 2017 +0300
validation: packet: adjust segmented test packet length
Adjust 'segmented_packet_len' so that the test packet pool is able to allocate at least PACKET_POOL_NUM_SEG possibly segmented test packets. Several validation tests allocate new packets, so it is not enough to be able allocate a single segmented packet.
Signed-off-by: Matias Elo matias.elo@nokia.com Reviewed-by: Bill Fischofer bill.fischofer@linaro.org Signed-off-by: Maxim Uvarov maxim.uvarov@linaro.org
diff --git a/test/validation/api/packet/packet.c b/test/validation/api/packet/packet.c index 64165464..bf8f5f44 100644 --- a/test/validation/api/packet/packet.c +++ b/test/validation/api/packet/packet.c @@ -16,6 +16,11 @@ #define PACKET_TAILROOM_RESERVE 4 /* Number of packets in the test packet pool */ #define PACKET_POOL_NUM 300 +/* Number of large, possibly segmented, test packets */ +#define PACKET_POOL_NUM_SEG 4 +ODP_STATIC_ASSERT(PACKET_POOL_NUM_SEG > 1 && + PACKET_POOL_NUM_SEG < PACKET_POOL_NUM, + "Invalid PACKET_POOL_NUM_SEG value");
static odp_pool_t packet_pool, packet_pool_no_uarea, packet_pool_double_uarea; static uint32_t packet_len; @@ -108,11 +113,13 @@ int packet_suite_init(void) { odp_pool_param_t params; odp_pool_capability_t capa; + odp_packet_t pkt_tbl[PACKET_POOL_NUM_SEG]; struct udata_struct *udat; uint32_t udat_size; uint8_t data = 0; uint32_t i; uint32_t num = PACKET_POOL_NUM; + int ret;
if (odp_pool_capability(&capa) < 0) { printf("pool_capability failed\n"); @@ -178,14 +185,26 @@ int packet_suite_init(void) data++; }
- /* Try to allocate the largest possible packet to see + /* Try to allocate PACKET_POOL_NUM_SEG largest possible packets to see * if segmentation is supported */ do { - segmented_test_packet = odp_packet_alloc(packet_pool, - segmented_packet_len); - if (segmented_test_packet == ODP_PACKET_INVALID) + ret = odp_packet_alloc_multi(packet_pool, segmented_packet_len, + pkt_tbl, PACKET_POOL_NUM_SEG); + if (ret != PACKET_POOL_NUM_SEG) { + if (ret > 0) + odp_packet_free_multi(pkt_tbl, ret); segmented_packet_len -= capa.pkt.min_seg_len; - } while (segmented_test_packet == ODP_PACKET_INVALID); + continue; + } + } while (ret != PACKET_POOL_NUM_SEG && + segmented_packet_len > capa.pkt.min_seg_len); + + if (ret != PACKET_POOL_NUM_SEG) { + printf("packet alloc failed\n"); + return -1; + } + segmented_test_packet = pkt_tbl[0]; + odp_packet_free_multi(&pkt_tbl[1], PACKET_POOL_NUM_SEG - 1);
if (odp_packet_is_valid(test_packet) == 0 || odp_packet_is_valid(segmented_test_packet) == 0) {
commit 605e77187211dbb0716e4124f249c7f0f88567f7 Author: Matias Elo matias.elo@nokia.com Date: Tue Oct 10 09:08:51 2017 +0300
linux-gen: pool: select packet pool segment size at runtime
Use stored packet pool segment length (pool_t.seg_len) instead of a define. This enables creating packet pools with different segment sizes.
Signed-off-by: Matias Elo matias.elo@nokia.com Reviewed-by: Bill Fischofer bill.fischofer@linaro.org Signed-off-by: Maxim Uvarov maxim.uvarov@linaro.org
diff --git a/platform/linux-generic/include/odp_packet_internal.h b/platform/linux-generic/include/odp_packet_internal.h index 73a3e934..3b3dec95 100644 --- a/platform/linux-generic/include/odp_packet_internal.h +++ b/platform/linux-generic/include/odp_packet_internal.h @@ -194,6 +194,7 @@ static inline seg_entry_t *seg_entry_last(odp_packet_hdr_t *hdr) */ static inline void packet_init(odp_packet_hdr_t *pkt_hdr, uint32_t len) { + pool_t *pool = pool_entry_from_hdl(pkt_hdr->buf_hdr.pool_hdl); uint32_t seg_len; int num = pkt_hdr->buf_hdr.segcount;
@@ -203,7 +204,7 @@ static inline void packet_init(odp_packet_hdr_t *pkt_hdr, uint32_t len) } else { seg_entry_t *last;
- seg_len = len - ((num - 1) * CONFIG_PACKET_MAX_SEG_LEN); + seg_len = len - ((num - 1) * pool->seg_len);
/* Last segment data length */ last = seg_entry_last(pkt_hdr); @@ -226,8 +227,7 @@ static inline void packet_init(odp_packet_hdr_t *pkt_hdr, uint32_t len) pkt_hdr->frame_len = len; pkt_hdr->shared_len = 0; pkt_hdr->headroom = CONFIG_PACKET_HEADROOM; - pkt_hdr->tailroom = CONFIG_PACKET_MAX_SEG_LEN - seg_len + - CONFIG_PACKET_TAILROOM; + pkt_hdr->tailroom = pool->seg_len - seg_len + CONFIG_PACKET_TAILROOM;
pkt_hdr->input = ODP_PKTIO_INVALID; } diff --git a/platform/linux-generic/odp_packet.c b/platform/linux-generic/odp_packet.c index 54c98646..94aa01de 100644 --- a/platform/linux-generic/odp_packet.c +++ b/platform/linux-generic/odp_packet.c @@ -23,9 +23,6 @@ #include <stdio.h> #include <inttypes.h>
-/* Initial packet segment data length */ -#define BASE_LEN CONFIG_PACKET_MAX_SEG_LEN - #include <odp/visibility_begin.h>
/* Fill in packet header field offsets for inline functions */ @@ -341,6 +338,7 @@ static inline void link_segments(odp_packet_hdr_t *pkt_hdr[], int num) int cur, i; odp_packet_hdr_t *hdr; odp_packet_hdr_t *head = pkt_hdr[0]; + uint32_t seg_len = pool_entry_from_hdl(head->buf_hdr.pool_hdl)->seg_len;
cur = 0;
@@ -353,7 +351,7 @@ static inline void link_segments(odp_packet_hdr_t *pkt_hdr[], int num) buf_hdr = &pkt_hdr[cur]->buf_hdr; hdr->buf_hdr.seg[i].hdr = buf_hdr; hdr->buf_hdr.seg[i].data = buf_hdr->base_data; - hdr->buf_hdr.seg[i].len = BASE_LEN; + hdr->buf_hdr.seg[i].len = seg_len; cur++;
if (cur == num) { @@ -373,13 +371,15 @@ static inline void link_segments(odp_packet_hdr_t *pkt_hdr[], int num) static inline void init_segments(odp_packet_hdr_t *pkt_hdr[], int num) { odp_packet_hdr_t *hdr; + uint32_t seg_len;
/* First segment is the packet descriptor */ hdr = pkt_hdr[0]; + seg_len = pool_entry_from_hdl(hdr->buf_hdr.pool_hdl)->seg_len;
/* Defaults for single segment packet */ hdr->buf_hdr.seg[0].data = hdr->buf_hdr.base_data; - hdr->buf_hdr.seg[0].len = BASE_LEN; + hdr->buf_hdr.seg[0].len = seg_len;
if (!CONFIG_PACKET_SEG_DISABLED) { hdr->buf_hdr.segcount = num; @@ -399,6 +399,7 @@ static inline void reset_seg(odp_packet_hdr_t *pkt_hdr, int first, int num) void *base; int i; seg_entry_t *seg; + uint32_t seg_len = pool_entry_from_hdl(hdr->buf_hdr.pool_hdl)->seg_len; uint8_t idx;
seg_entry_find_idx(&hdr, &idx, first); @@ -406,27 +407,25 @@ static inline void reset_seg(odp_packet_hdr_t *pkt_hdr, int first, int num) for (i = 0; i < num; i++) { base = hdr->buf_hdr.base_data; seg = seg_entry_next(&hdr, &idx); - seg->len = BASE_LEN; + seg->len = seg_len; seg->data = base; } }
/* Calculate the number of segments */ -static inline int num_segments(uint32_t len) +static inline int num_segments(uint32_t len, uint32_t seg_len) { - uint32_t max_seg_len; int num;
if (CONFIG_PACKET_SEG_DISABLED) return 1;
num = 1; - max_seg_len = CONFIG_PACKET_MAX_SEG_LEN;
- if (odp_unlikely(len > max_seg_len)) { - num = len / max_seg_len; + if (odp_unlikely(len > seg_len)) { + num = len / seg_len;
- if (odp_likely((num * max_seg_len) != len)) + if (odp_likely((num * seg_len) != len)) num += 1; }
@@ -793,7 +792,7 @@ int packet_alloc_multi(odp_pool_t pool_hdl, uint32_t len, pool_t *pool = pool_entry_from_hdl(pool_hdl); int num, num_seg;
- num_seg = num_segments(len); + num_seg = num_segments(len, pool->seg_len); num = packet_alloc(pool, len, max_num, num_seg, pkt);
return num; @@ -813,7 +812,7 @@ odp_packet_t odp_packet_alloc(odp_pool_t pool_hdl, uint32_t len) if (odp_unlikely(len > pool->max_len)) return ODP_PACKET_INVALID;
- num_seg = num_segments(len); + num_seg = num_segments(len, pool->seg_len); num = packet_alloc(pool, len, 1, num_seg, &pkt);
if (odp_unlikely(num == 0)) @@ -836,7 +835,7 @@ int odp_packet_alloc_multi(odp_pool_t pool_hdl, uint32_t len, if (odp_unlikely(len > pool->max_len)) return -1;
- num_seg = num_segments(len); + num_seg = num_segments(len, pool->seg_len); num = packet_alloc(pool, len, max_num, num_seg, pkt);
return num; @@ -977,7 +976,7 @@ int odp_packet_extend_head(odp_packet_t *pkt, uint32_t len, if (odp_unlikely((frame_len + len) > pool->max_len)) return -1;
- num = num_segments(len - headroom); + num = num_segments(len - headroom, pool->seg_len); push_head(pkt_hdr, headroom); ptr = add_segments(pkt_hdr, pool, len - headroom, num, 1);
@@ -1079,7 +1078,7 @@ int odp_packet_extend_tail(odp_packet_t *pkt, uint32_t len, if (odp_unlikely((frame_len + len) > pool->max_len)) return -1;
- num = num_segments(len - tailroom); + num = num_segments(len - tailroom, pool->seg_len); push_tail(pkt_hdr, tailroom); ptr = add_segments(pkt_hdr, pool, len - tailroom, num, 0);
diff --git a/platform/linux-generic/odp_pool.c b/platform/linux-generic/odp_pool.c index ab26bbf8..3e47993c 100644 --- a/platform/linux-generic/odp_pool.c +++ b/platform/linux-generic/odp_pool.c @@ -382,12 +382,33 @@ static odp_pool_t pool_create(const char *name, odp_pool_param_t *params, break;
case ODP_POOL_PACKET: + seg_len = CONFIG_PACKET_MAX_SEG_LEN; + max_len = CONFIG_PACKET_MAX_LEN; + + if (params->pkt.len && + params->pkt.len < CONFIG_PACKET_MAX_SEG_LEN) + seg_len = params->pkt.len; + if (params->pkt.seg_len && params->pkt.seg_len > seg_len) + seg_len = params->pkt.seg_len; + if (seg_len < CONFIG_PACKET_SEG_LEN_MIN) + seg_len = CONFIG_PACKET_SEG_LEN_MIN; + + /* Make sure that at least one 'max_len' packet can fit in the + * pool. */ + if (params->pkt.max_len != 0) + max_len = params->pkt.max_len; + if ((max_len + seg_len - 1) / seg_len > CONFIG_PACKET_MAX_SEGS) + seg_len = (max_len + CONFIG_PACKET_MAX_SEGS - 1) / + CONFIG_PACKET_MAX_SEGS; + if (seg_len > CONFIG_PACKET_MAX_SEG_LEN) { + ODP_ERR("Pool unable to store 'max_len' packet"); + return ODP_POOL_INVALID; + } + headroom = CONFIG_PACKET_HEADROOM; tailroom = CONFIG_PACKET_TAILROOM; num = params->pkt.num; uarea_size = params->pkt.uarea_size; - seg_len = CONFIG_PACKET_MAX_SEG_LEN; - max_len = CONFIG_PACKET_MAX_LEN; break;
case ODP_POOL_TIMEOUT: @@ -887,7 +908,7 @@ int odp_pool_capability(odp_pool_capability_t *capa) capa->pkt.min_headroom = CONFIG_PACKET_HEADROOM; capa->pkt.min_tailroom = CONFIG_PACKET_TAILROOM; capa->pkt.max_segs_per_pkt = CONFIG_PACKET_MAX_SEGS; - capa->pkt.min_seg_len = max_seg_len; + capa->pkt.min_seg_len = CONFIG_PACKET_SEG_LEN_MIN; capa->pkt.max_seg_len = max_seg_len; capa->pkt.max_uarea_size = MAX_SIZE;
diff --git a/platform/linux-generic/pktio/netmap.c b/platform/linux-generic/pktio/netmap.c index 4d771fcb..4c72a658 100644 --- a/platform/linux-generic/pktio/netmap.c +++ b/platform/linux-generic/pktio/netmap.c @@ -350,7 +350,7 @@ static int netmap_open(odp_pktio_t id ODP_UNUSED, pktio_entry_t *pktio_entry, pkt_nm->pool = pool;
/* max frame len taking into account the l2-offset */ - pkt_nm->max_frame_len = CONFIG_PACKET_MAX_SEG_LEN; + pkt_nm->max_frame_len = pool_entry_from_hdl(pool)->max_len;
/* allow interface to be opened with or without the 'netmap:' prefix */ prefix = "netmap:";
commit 940c54bbd1c0c16ea2b6a6f6737d151deeba1e43 Author: Matias Elo matias.elo@nokia.com Date: Wed Oct 11 10:41:12 2017 +0300
linux-gen: packet: fix build error with single segment packet header
Fix invalid gcc error ('array subscript is above array bounds') when CONFIG_PACKET_SEGS_PER_HDR is set to one. Tested with gcc 5.4.0.
Signed-off-by: Matias Elo matias.elo@nokia.com Reviewed-by: Bill Fischofer bill.fischofer@linaro.org Signed-off-by: Maxim Uvarov maxim.uvarov@linaro.org
diff --git a/platform/linux-generic/odp_packet.c b/platform/linux-generic/odp_packet.c index abd06044..54c98646 100644 --- a/platform/linux-generic/odp_packet.c +++ b/platform/linux-generic/odp_packet.c @@ -2151,7 +2151,10 @@ odp_packet_t odp_packet_ref(odp_packet_t pkt, uint32_t offset) link_hdr->buf_hdr.seg[0].len = seg->len - seg_offset; buffer_ref_inc(seg->hdr);
- for (i = 1; i < num_copy; i++) { + /* The 'CONFIG_PACKET_SEGS_PER_HDR > 1' condition is required to fix an + * invalid error ('array subscript is above array bounds') thrown by + * gcc (5.4.0). */ + for (i = 1; CONFIG_PACKET_SEGS_PER_HDR > 1 && i < num_copy; i++) { /* Update link header reference count */ if (idx == 0 && seg_is_link(hdr)) buffer_ref_inc((odp_buffer_hdr_t *)hdr);
commit 91ceea49a975c6fcd61ab1c992a502350d673eeb Author: Matias Elo matias.elo@nokia.com Date: Thu Oct 12 16:28:04 2017 +0300
linux-gen: pool: modify packet pool config defines
Use separate defines for the maximum number of segments per packet (CONFIG_PACKET_MAX_SEGS) and the number of segments stored in a packet header (CONFIG_PACKET_SEGS_PER_HDR).
A separate define is also added for the maximum packet length.
Signed-off-by: Matias Elo matias.elo@nokia.com Reviewed-by: Bill Fischofer bill.fischofer@linaro.org Signed-off-by: Maxim Uvarov maxim.uvarov@linaro.org
diff --git a/platform/linux-generic/include/odp_buffer_internal.h b/platform/linux-generic/include/odp_buffer_internal.h index 5d40303b..aefb1352 100644 --- a/platform/linux-generic/include/odp_buffer_internal.h +++ b/platform/linux-generic/include/odp_buffer_internal.h @@ -71,7 +71,7 @@ struct odp_buffer_hdr_t { /* --- 40 bytes --- */
/* Segments */ - seg_entry_t seg[CONFIG_PACKET_MAX_SEGS]; + seg_entry_t seg[CONFIG_PACKET_SEGS_PER_HDR];
/* Burst counts */ uint8_t burst_num; @@ -122,8 +122,8 @@ struct odp_buffer_hdr_t { uint8_t data[0]; } ODP_ALIGNED_CACHE;
-ODP_STATIC_ASSERT(CONFIG_PACKET_MAX_SEGS < 256, - "CONFIG_PACKET_MAX_SEGS_TOO_LARGE"); +ODP_STATIC_ASSERT(CONFIG_PACKET_SEGS_PER_HDR < 256, + "CONFIG_PACKET_SEGS_PER_HDR_TOO_LARGE");
ODP_STATIC_ASSERT(BUFFER_BURST_SIZE < 256, "BUFFER_BURST_SIZE_TOO_LARGE");
diff --git a/platform/linux-generic/include/odp_config_internal.h b/platform/linux-generic/include/odp_config_internal.h index a798851f..598f26e1 100644 --- a/platform/linux-generic/include/odp_config_internal.h +++ b/platform/linux-generic/include/odp_config_internal.h @@ -75,7 +75,22 @@ extern "C" { /* * Maximum number of segments per packet */ -#define CONFIG_PACKET_MAX_SEGS 6 +#define CONFIG_PACKET_MAX_SEGS 255 + +/* + * Packet segmentation disabled + */ +#define CONFIG_PACKET_SEG_DISABLED (CONFIG_PACKET_MAX_SEGS == 1) + +/* + * Number of segments stored in a packet header + */ +#define CONFIG_PACKET_SEGS_PER_HDR 6 + +/* + * Maximum packet data length in bytes + */ +#define CONFIG_PACKET_MAX_LEN (64 * 1024)
/* * Maximum packet segment size including head- and tailrooms diff --git a/platform/linux-generic/include/odp_packet_internal.h b/platform/linux-generic/include/odp_packet_internal.h index 15cb53f4..73a3e934 100644 --- a/platform/linux-generic/include/odp_packet_internal.h +++ b/platform/linux-generic/include/odp_packet_internal.h @@ -197,7 +197,7 @@ static inline void packet_init(odp_packet_hdr_t *pkt_hdr, uint32_t len) uint32_t seg_len; int num = pkt_hdr->buf_hdr.segcount;
- if (odp_likely(CONFIG_PACKET_MAX_SEGS == 1 || num == 1)) { + if (odp_likely(CONFIG_PACKET_SEG_DISABLED || num == 1)) { seg_len = len; pkt_hdr->buf_hdr.seg[0].len = len; } else { diff --git a/platform/linux-generic/odp_packet.c b/platform/linux-generic/odp_packet.c index c330c629..abd06044 100644 --- a/platform/linux-generic/odp_packet.c +++ b/platform/linux-generic/odp_packet.c @@ -179,7 +179,7 @@ static inline void *packet_seg_data(odp_packet_hdr_t *pkt_hdr, uint32_t seg_idx)
static inline uint16_t packet_last_seg(odp_packet_hdr_t *pkt_hdr) { - if (CONFIG_PACKET_MAX_SEGS == 1) + if (CONFIG_PACKET_SEG_DISABLED) return 0; else return pkt_hdr->buf_hdr.segcount - 1; @@ -291,7 +291,7 @@ static inline void *packet_map(odp_packet_hdr_t *pkt_hdr, if (odp_unlikely(offset >= pkt_hdr->frame_len)) return NULL;
- if (odp_likely(CONFIG_PACKET_MAX_SEGS == 1 || seg_count == 1)) { + if (odp_likely(CONFIG_PACKET_SEG_DISABLED || seg_count == 1)) { addr = pkt_hdr->buf_hdr.seg[0].data + offset; len = pkt_hdr->buf_hdr.seg[0].len - offset; } else { @@ -347,7 +347,7 @@ static inline void link_segments(odp_packet_hdr_t *pkt_hdr[], int num) while (1) { hdr = pkt_hdr[cur];
- for (i = 0; i < CONFIG_PACKET_MAX_SEGS; i++) { + for (i = 0; i < CONFIG_PACKET_SEGS_PER_HDR; i++) { odp_buffer_hdr_t *buf_hdr;
buf_hdr = &pkt_hdr[cur]->buf_hdr; @@ -365,7 +365,7 @@ static inline void link_segments(odp_packet_hdr_t *pkt_hdr[], int num) } }
- hdr->buf_hdr.num_seg = CONFIG_PACKET_MAX_SEGS; + hdr->buf_hdr.num_seg = CONFIG_PACKET_SEGS_PER_HDR; hdr->buf_hdr.next_seg = pkt_hdr[cur]; } } @@ -377,22 +377,19 @@ static inline void init_segments(odp_packet_hdr_t *pkt_hdr[], int num) /* First segment is the packet descriptor */ hdr = pkt_hdr[0];
+ /* Defaults for single segment packet */ hdr->buf_hdr.seg[0].data = hdr->buf_hdr.base_data; hdr->buf_hdr.seg[0].len = BASE_LEN;
- /* Link segments */ - if (CONFIG_PACKET_MAX_SEGS != 1) { + if (!CONFIG_PACKET_SEG_DISABLED) { hdr->buf_hdr.segcount = num; - - /* Defaults for single segment packet */ hdr->buf_hdr.num_seg = 1; hdr->buf_hdr.next_seg = NULL; hdr->buf_hdr.last_seg = &hdr->buf_hdr;
- if (odp_unlikely(num > 1)) { + /* Link segments */ + if (odp_unlikely(num > 1)) link_segments(pkt_hdr, num); - - } } }
@@ -420,7 +417,7 @@ static inline int num_segments(uint32_t len) uint32_t max_seg_len; int num;
- if (CONFIG_PACKET_MAX_SEGS == 1) + if (CONFIG_PACKET_SEG_DISABLED) return 1;
num = 1; @@ -850,7 +847,7 @@ void odp_packet_free(odp_packet_t pkt) odp_packet_hdr_t *pkt_hdr = packet_hdr(pkt); int num_seg = pkt_hdr->buf_hdr.segcount;
- if (odp_likely(CONFIG_PACKET_MAX_SEGS == 1 || num_seg == 1)) { + if (odp_likely(CONFIG_PACKET_SEG_DISABLED || num_seg == 1)) { odp_buffer_hdr_t *buf_hdr[2]; int num = 1;
@@ -1027,7 +1024,7 @@ int odp_packet_trunc_head(odp_packet_t *pkt, uint32_t len,
if (len < seg_len) { pull_head(pkt_hdr, len); - } else if (CONFIG_PACKET_MAX_SEGS != 1) { + } else if (!CONFIG_PACKET_SEG_DISABLED) { int num = 0; uint32_t pull_len = 0;
@@ -1131,7 +1128,7 @@ int odp_packet_trunc_tail(odp_packet_t *pkt, uint32_t len,
if (len < seg_len) { pull_tail(pkt_hdr, len); - } else if (CONFIG_PACKET_MAX_SEGS != 1) { + } else if (!CONFIG_PACKET_SEG_DISABLED) { int num = 0; uint32_t pull_len = 0;
diff --git a/platform/linux-generic/odp_pool.c b/platform/linux-generic/odp_pool.c index 44a40e83..ab26bbf8 100644 --- a/platform/linux-generic/odp_pool.c +++ b/platform/linux-generic/odp_pool.c @@ -386,8 +386,8 @@ static odp_pool_t pool_create(const char *name, odp_pool_param_t *params, tailroom = CONFIG_PACKET_TAILROOM; num = params->pkt.num; uarea_size = params->pkt.uarea_size; - seg_len = CONFIG_PACKET_MAX_SEG_LEN; - max_len = CONFIG_PACKET_MAX_SEGS * seg_len; + seg_len = CONFIG_PACKET_MAX_SEG_LEN; + max_len = CONFIG_PACKET_MAX_LEN; break;
case ODP_POOL_TIMEOUT: @@ -882,7 +882,7 @@ int odp_pool_capability(odp_pool_capability_t *capa)
/* Packet pools */ capa->pkt.max_pools = ODP_CONFIG_POOLS; - capa->pkt.max_len = CONFIG_PACKET_MAX_SEGS * max_seg_len; + capa->pkt.max_len = CONFIG_PACKET_MAX_LEN; capa->pkt.max_num = CONFIG_POOL_MAX_NUM; capa->pkt.min_headroom = CONFIG_PACKET_HEADROOM; capa->pkt.min_tailroom = CONFIG_PACKET_TAILROOM;
commit b46702e5ef368c9aaf9d6cea7d32b07adb881ce3 Author: Matias Elo matias.elo@nokia.com Date: Mon Oct 9 15:48:23 2017 +0300
linux-gen: pool: combine overlapping struct pool_t members
Struct pool_t members 'data_size' and 'max_seg_len' were both used to store the same value. Replace them with a single 'seg_len' member.
Signed-off-by: Matias Elo matias.elo@nokia.com Reviewed-by: Bill Fischofer bill.fischofer@linaro.org Signed-off-by: Maxim Uvarov maxim.uvarov@linaro.org
diff --git a/platform/linux-generic/include/odp_pool_internal.h b/platform/linux-generic/include/odp_pool_internal.h index edf75d6e..48945ee1 100644 --- a/platform/linux-generic/include/odp_pool_internal.h +++ b/platform/linux-generic/include/odp_pool_internal.h @@ -60,9 +60,8 @@ typedef struct pool_t { uint32_t align; uint32_t headroom; uint32_t tailroom; - uint32_t data_size; + uint32_t seg_len; uint32_t max_len; - uint32_t max_seg_len; uint32_t uarea_size; uint32_t block_size; uint32_t shm_size; diff --git a/platform/linux-generic/odp_packet.c b/platform/linux-generic/odp_packet.c index fff01ad9..c330c629 100644 --- a/platform/linux-generic/odp_packet.c +++ b/platform/linux-generic/odp_packet.c @@ -476,8 +476,8 @@ static inline odp_packet_hdr_t *add_segments(odp_packet_hdr_t *pkt_hdr, if (new_hdr == NULL) return NULL;
- seg_len = len - ((num - 1) * pool->max_seg_len); - offset = pool->max_seg_len - seg_len; + seg_len = len - ((num - 1) * pool->seg_len); + offset = pool->seg_len - seg_len;
if (head) { /* add into the head*/ @@ -906,7 +906,7 @@ int odp_packet_reset(odp_packet_t pkt, uint32_t len) pool_t *pool = pkt_hdr->buf_hdr.pool_ptr; int num = pkt_hdr->buf_hdr.segcount;
- if (odp_unlikely(len > (pool->max_seg_len * num))) + if (odp_unlikely(len > (pool->seg_len * num))) return -1;
reset_seg(pkt_hdr, 0, num); diff --git a/platform/linux-generic/odp_pool.c b/platform/linux-generic/odp_pool.c index 40cbb397..44a40e83 100644 --- a/platform/linux-generic/odp_pool.c +++ b/platform/linux-generic/odp_pool.c @@ -285,7 +285,7 @@ static void init_buffers(pool_t *pool)
memset(buf_hdr, 0, (uintptr_t)data - (uintptr_t)buf_hdr);
- seg_size = pool->headroom + pool->data_size + pool->tailroom; + seg_size = pool->headroom + pool->seg_len + pool->tailroom;
/* Initialize buffer metadata */ buf_hdr->index = i; @@ -305,13 +305,13 @@ static void init_buffers(pool_t *pool) /* Pointer to data start (of the first segment) */ buf_hdr->seg[0].hdr = buf_hdr; buf_hdr->seg[0].data = &data[offset]; - buf_hdr->seg[0].len = pool->data_size; + buf_hdr->seg[0].len = pool->seg_len;
odp_atomic_init_u32(&buf_hdr->ref_cnt, 0);
/* Store base values for fast init */ buf_hdr->base_data = buf_hdr->seg[0].data; - buf_hdr->buf_end = &data[offset + pool->data_size + + buf_hdr->buf_end = &data[offset + pool->seg_len + pool->tailroom];
/* Store buffer index into the global pool */ @@ -341,8 +341,8 @@ static odp_pool_t pool_create(const char *name, odp_pool_param_t *params, pool_t *pool; uint32_t uarea_size, headroom, tailroom; odp_shm_t shm; - uint32_t data_size, align, num, hdr_size, block_size; - uint32_t max_len, max_seg_len; + uint32_t seg_len, align, num, hdr_size, block_size; + uint32_t max_len; uint32_t ring_size; uint32_t num_extra = 0; int name_len; @@ -371,15 +371,14 @@ static odp_pool_t pool_create(const char *name, odp_pool_param_t *params,
headroom = 0; tailroom = 0; - data_size = 0; + seg_len = 0; max_len = 0; - max_seg_len = 0; uarea_size = 0;
switch (params->type) { case ODP_POOL_BUFFER: num = params->buf.num; - data_size = params->buf.size; + seg_len = params->buf.size; break;
case ODP_POOL_PACKET: @@ -387,9 +386,8 @@ static odp_pool_t pool_create(const char *name, odp_pool_param_t *params, tailroom = CONFIG_PACKET_TAILROOM; num = params->pkt.num; uarea_size = params->pkt.uarea_size; - data_size = CONFIG_PACKET_MAX_SEG_LEN; - max_seg_len = CONFIG_PACKET_MAX_SEG_LEN; - max_len = CONFIG_PACKET_MAX_SEGS * max_seg_len; + seg_len = CONFIG_PACKET_MAX_SEG_LEN; + max_len = CONFIG_PACKET_MAX_SEGS * seg_len; break;
case ODP_POOL_TIMEOUT: @@ -428,8 +426,8 @@ static odp_pool_t pool_create(const char *name, odp_pool_param_t *params, hdr_size = sizeof(odp_packet_hdr_t); hdr_size = ROUNDUP_CACHE_LINE(hdr_size);
- block_size = ROUNDUP_CACHE_LINE(hdr_size + align + headroom + - data_size + tailroom); + block_size = ROUNDUP_CACHE_LINE(hdr_size + align + headroom + seg_len + + tailroom);
/* Allocate extra memory for skipping packet buffers which cross huge * page boundaries. */ @@ -449,9 +447,8 @@ static odp_pool_t pool_create(const char *name, odp_pool_param_t *params, pool->num = num; pool->align = align; pool->headroom = headroom; - pool->data_size = data_size; + pool->seg_len = seg_len; pool->max_len = max_len; - pool->max_seg_len = max_seg_len; pool->tailroom = tailroom; pool->block_size = block_size; pool->uarea_size = uarea_size; @@ -924,9 +921,8 @@ void odp_pool_print(odp_pool_t pool_hdl) printf(" num %u\n", pool->num); printf(" align %u\n", pool->align); printf(" headroom %u\n", pool->headroom); - printf(" data size %u\n", pool->data_size); + printf(" seg len %u\n", pool->seg_len); printf(" max data len %u\n", pool->max_len); - printf(" max seg len %u\n", pool->max_seg_len); printf(" tailroom %u\n", pool->tailroom); printf(" block size %u\n", pool->block_size); printf(" uarea size %u\n", pool->uarea_size); diff --git a/platform/linux-generic/pktio/dpdk.c b/platform/linux-generic/pktio/dpdk.c index 26ca0d6b..2e50a55f 100644 --- a/platform/linux-generic/pktio/dpdk.c +++ b/platform/linux-generic/pktio/dpdk.c @@ -174,7 +174,7 @@ static struct rte_mempool *mbuf_pool_create(const char *name, }
num = pool_entry->num; - data_room_size = pool_entry->max_seg_len + CONFIG_PACKET_HEADROOM; + data_room_size = pool_entry->seg_len + CONFIG_PACKET_HEADROOM; elt_size = sizeof(struct rte_mbuf) + (unsigned)data_room_size; mbp_priv.mbuf_data_room_size = data_room_size; mbp_priv.mbuf_priv_size = 0; @@ -231,7 +231,7 @@ static int pool_dequeue_bulk(struct rte_mempool *mp, void **obj_table, int pkts; int i;
- pkts = packet_alloc_multi(pool, pool_entry->max_seg_len, packet_tbl, + pkts = packet_alloc_multi(pool, pool_entry->seg_len, packet_tbl, num);
if (odp_unlikely(pkts != (int)num)) { @@ -1230,7 +1230,7 @@ static int dpdk_open(odp_pktio_t id ODP_UNUSED,
data_room = rte_pktmbuf_data_room_size(pkt_dpdk->pkt_pool) - RTE_PKTMBUF_HEADROOM; - pkt_dpdk->data_room = RTE_MIN(pool_entry->max_seg_len, data_room); + pkt_dpdk->data_room = RTE_MIN(pool_entry->seg_len, data_room);
/* Mbuf chaining not yet supported */ pkt_dpdk->mtu = RTE_MIN(pkt_dpdk->mtu, pkt_dpdk->data_room); diff --git a/platform/linux-generic/pktio/socket_mmap.c b/platform/linux-generic/pktio/socket_mmap.c index f7118023..42f4a262 100644 --- a/platform/linux-generic/pktio/socket_mmap.c +++ b/platform/linux-generic/pktio/socket_mmap.c @@ -357,7 +357,7 @@ static void mmap_fill_ring(struct ring *ring, odp_pool_t pool_hdl, int fanout) pool = pool_entry_from_hdl(pool_hdl);
/* Frame has to capture full packet which can fit to the pool block.*/ - ring->req.tp_frame_size = (pool->headroom + pool->data_size + + ring->req.tp_frame_size = (pool->headroom + pool->seg_len + pool->tailroom + TPACKET_HDRLEN + TPACKET_ALIGNMENT + + (pz - 1)) & (-pz);
commit 48dfcade1602e9cc9bb8cd3251037508aef146cd Author: Maxim Uvarov maxim.uvarov@linaro.org Date: Wed Oct 18 16:08:11 2017 +0300
linux-gen: pktio: simplify ret code
Simplify ret code.
Signed-off-by: Maxim Uvarov maxim.uvarov@linaro.org Reviewed-by: Bill Fischofer bill.fischofer@linaro.org
diff --git a/platform/linux-generic/odp_packet_io.c b/platform/linux-generic/odp_packet_io.c index 4363711f..f972bb78 100644 --- a/platform/linux-generic/odp_packet_io.c +++ b/platform/linux-generic/odp_packet_io.c @@ -215,27 +215,25 @@ static odp_pktio_t setup_pktio_entry(const char *name, odp_pool_t pool, for (pktio_if = 0; pktio_if_ops[pktio_if]; ++pktio_if) { ret = pktio_if_ops[pktio_if]->open(hdl, pktio_entry, name, pool); - - if (!ret) { - pktio_entry->s.ops = pktio_if_ops[pktio_if]; - ODP_DBG("%s uses %s\n", - name, pktio_if_ops[pktio_if]->name); + if (!ret) break; - } }
if (ret != 0) { pktio_entry->s.state = PKTIO_STATE_FREE; - hdl = ODP_PKTIO_INVALID; + unlock_entry(pktio_entry); ODP_ERR("Unable to init any I/O type.\n"); - } else { - snprintf(pktio_entry->s.name, - sizeof(pktio_entry->s.name), "%s", name); - pktio_entry->s.state = PKTIO_STATE_OPENED; + return ODP_PKTIO_INVALID; }
+ snprintf(pktio_entry->s.name, + sizeof(pktio_entry->s.name), "%s", name); + pktio_entry->s.state = PKTIO_STATE_OPENED; + pktio_entry->s.ops = pktio_if_ops[pktio_if]; unlock_entry(pktio_entry);
+ ODP_DBG("%s uses %s\n", name, pktio_if_ops[pktio_if]->name); + return hdl; }
commit 2aa9a05b11bdfac0c0126384d4677b3f9c561a78 Author: Maxim Uvarov maxim.uvarov@linaro.org Date: Wed Oct 18 15:58:24 2017 +0300
linux-gen: pktio test odp_shm_reserve return code
Better to check odp_shm_reserve() code than address.
Signed-off-by: Maxim Uvarov maxim.uvarov@linaro.org Reviewed-by: Bill Fischofer bill.fischofer@linaro.org
diff --git a/platform/linux-generic/odp_packet_io.c b/platform/linux-generic/odp_packet_io.c index c2e6742b..4363711f 100644 --- a/platform/linux-generic/odp_packet_io.c +++ b/platform/linux-generic/odp_packet_io.c @@ -59,11 +59,10 @@ int odp_pktio_init_global(void) shm = odp_shm_reserve("odp_pktio_entries", sizeof(pktio_table_t), sizeof(pktio_entry_t), 0); - pktio_tbl = odp_shm_addr(shm); - - if (pktio_tbl == NULL) + if (shm == ODP_SHM_INVALID) return -1;
+ pktio_tbl = odp_shm_addr(shm); memset(pktio_tbl, 0, sizeof(pktio_table_t));
odp_spinlock_init(&pktio_tbl->lock);
commit df978d9b4e766c8e1cb1a88a28d98318840fee22 Author: Maxim Uvarov maxim.uvarov@linaro.org Date: Wed Oct 18 15:50:02 2017 +0300
linux-gen: pktio: add missing unlock
add missing unlock on return. https://bugs.linaro.org/show_bug.cgi?id=3242
Signed-off-by: Maxim Uvarov maxim.uvarov@linaro.org Reviewed-by: Bill Fischofer bill.fischofer@linaro.org
diff --git a/platform/linux-generic/odp_packet_io.c b/platform/linux-generic/odp_packet_io.c index 5cf94a14..c2e6742b 100644 --- a/platform/linux-generic/odp_packet_io.c +++ b/platform/linux-generic/odp_packet_io.c @@ -202,8 +202,10 @@ static odp_pktio_t setup_pktio_entry(const char *name, odp_pool_t pool,
/* if successful, alloc_pktio_entry() returns with the entry locked */ pktio_entry = get_pktio_entry(hdl); - if (!pktio_entry) + if (!pktio_entry) { + unlock_entry(pktio_entry); return ODP_PKTIO_INVALID; + }
pktio_entry->s.pool = pool; memcpy(&pktio_entry->s.param, param, sizeof(odp_pktio_param_t));
commit 482eeee380d40596131826c1103ed89247bd17e5 Author: Dmitry Eremin-Solenikov dmitry.ereminsolenikov@linaro.org Date: Tue Oct 17 15:17:27 2017 +0300
linux-gen: use EXEEXT in shmem_linux test
Use EXEEXT environment variable when calling test programs during shmem_linux test.
Signed-off-by: Dmitry Eremin-Solenikov dmitry.ereminsolenikov@linaro.org Reviewed-by: Bill Fischofer bill.fischofer@linaro.org Signed-off-by: Maxim Uvarov maxim.uvarov@linaro.org
diff --git a/platform/linux-generic/test/validation/api/shmem/shmem_linux.c b/platform/linux-generic/test/validation/api/shmem/shmem_linux.c index 10bbb6a4..7f0343cf 100644 --- a/platform/linux-generic/test/validation/api/shmem/shmem_linux.c +++ b/platform/linux-generic/test/validation/api/shmem/shmem_linux.c @@ -218,10 +218,14 @@ int main(int argc __attribute__((unused)), char *argv[]) int app2_status; uid_t uid = getuid(); char *shm_dir = getenv("ODP_SHM_DIR"); + const char *exeext = getenv("EXEEXT"); + + if (exeext == NULL) + exeext = "";
/* odp_app1 is in the same directory as this file: */ strncpy(prg_name, argv[0], PATH_MAX - 1); - sprintf(odp_name1, "%s/%s", dirname(prg_name), ODP_APP1_NAME); + sprintf(odp_name1, "%s/%s%s", dirname(prg_name), ODP_APP1_NAME, exeext);
/* start the ODP application: */ odp_app1 = fork(); @@ -292,7 +296,7 @@ int main(int argc __attribute__((unused)), char *argv[])
/* odp_app2 is in the same directory as this file: */ strncpy(prg_name, argv[0], PATH_MAX - 1); - sprintf(odp_name2, "%s/%s", dirname(prg_name), ODP_APP2_NAME); + sprintf(odp_name2, "%s/%s%s", dirname(prg_name), ODP_APP2_NAME, exeext);
/* start the second ODP application with pid of ODP_APP1 as parameter:*/ sprintf(pid1, "%d", odp_app1);
commit 254190ffcdb51549ee23846f33fd45513656b78c Author: Dmitry Eremin-Solenikov dmitry.ereminsolenikov@linaro.org Date: Tue Oct 17 15:14:07 2017 +0300
linux-gen: use ${EXEEXT} when calling shmem_linux test
Signed-off-by: Dmitry Eremin-Solenikov dmitry.ereminsolenikov@linaro.org Reviewed-by: Bill Fischofer bill.fischofer@linaro.org Signed-off-by: Maxim Uvarov maxim.uvarov@linaro.org
diff --git a/platform/linux-generic/test/Makefile.am b/platform/linux-generic/test/Makefile.am index 1f4910ad..97784a02 100644 --- a/platform/linux-generic/test/Makefile.am +++ b/platform/linux-generic/test/Makefile.am @@ -6,7 +6,7 @@ SUBDIRS = performance if test_vald TESTS = validation/api/pktio/pktio_run.sh \ validation/api/pktio/pktio_run_tap.sh \ - validation/api/shmem/shmem_linux \ + validation/api/shmem/shmem_linux$(EXEEXT) \ ring/ring_main$(EXEEXT)
SUBDIRS += validation/api/pktio\
commit 52877c96e12bf62614df0482175384565a851083 Author: Dmitry Eremin-Solenikov dmitry.ereminsolenikov@linaro.org Date: Tue Oct 17 15:11:57 2017 +0300
helper: add ${EXEEXT} when calling compiled programs
Signed-off-by: Dmitry Eremin-Solenikov dmitry.ereminsolenikov@linaro.org Reviewed-by: Bill Fischofer bill.fischofer@linaro.org Signed-off-by: Maxim Uvarov maxim.uvarov@linaro.org
diff --git a/helper/test/Makefile.am b/helper/test/Makefile.am index 620c1673..8eee643b 100644 --- a/helper/test/Makefile.am +++ b/helper/test/Makefile.am @@ -1,3 +1,5 @@ +TESTS_ENVIRONMENT = EXEEXT=${EXEEXT} + LIB = $(top_builddir)/lib
#in the following line, the libs using the symbols should come before diff --git a/helper/test/odpthreads_as_processes b/helper/test/odpthreads_as_processes index 89405f36..01d65883 100755 --- a/helper/test/odpthreads_as_processes +++ b/helper/test/odpthreads_as_processes @@ -11,4 +11,4 @@ PATH=.:$PATH
# The odpthreads test recognise the "--odph_proc" option to create # odp threads as linux processes: -odpthreads --odph_proc +odpthreads${EXEEXT} --odph_proc diff --git a/helper/test/odpthreads_as_pthreads b/helper/test/odpthreads_as_pthreads index ef569c3d..cd68a9e9 100755 --- a/helper/test/odpthreads_as_pthreads +++ b/helper/test/odpthreads_as_pthreads @@ -11,4 +11,4 @@ PATH=.:$PATH
# The odpthreads test without the "--odph_proc" option defaults to create # odp threads as linux pthreads: -odpthreads +odpthreads${EXEEXT}
commit 133e7fc06147486fff5ab3393b1a791ab97d19d3 Author: Dmitry Eremin-Solenikov dmitry.ereminsolenikov@linaro.org Date: Tue Oct 17 15:11:57 2017 +0300
example: add ${EXEEXT} when calling compiled programs
Signed-off-by: Dmitry Eremin-Solenikov dmitry.ereminsolenikov@linaro.org Reviewed-by: Bill Fischofer bill.fischofer@linaro.org Signed-off-by: Maxim Uvarov maxim.uvarov@linaro.org
diff --git a/example/Makefile.inc b/example/Makefile.inc index 12edc46c..1609066e 100644 --- a/example/Makefile.inc +++ b/example/Makefile.inc @@ -1,3 +1,5 @@ +TESTS_ENVIRONMENT = EXEEXT=${EXEEXT} + LIB = $(top_builddir)/lib LDADD = $(LIB)/libodp-linux.la $(LIB)/libodphelper.la $(DPDK_PMDS) AM_CFLAGS = \ diff --git a/example/l2fwd_simple/l2fwd_simple_run.sh b/example/l2fwd_simple/l2fwd_simple_run.sh index 130a3a84..089d9f97 100755 --- a/example/l2fwd_simple/l2fwd_simple_run.sh +++ b/example/l2fwd_simple/l2fwd_simple_run.sh @@ -9,7 +9,8 @@ PCAP_IN=`find . ${TEST_DIR} $(dirname $0) -name udp64.pcap -print -quit` echo "using PCAP_IN = ${PCAP_IN}"
-./odp_l2fwd_simple pcap:in=${PCAP_IN} pcap:out=pcapout.pcap 02:00:00:00:00:01 02:00:00:00:00:02 & +./odp_l2fwd_simple${EXEEXT} pcap:in=${PCAP_IN} pcap:out=pcapout.pcap \ + 02:00:00:00:00:01 02:00:00:00:00:02 &
sleep 1 kill -s SIGINT $! diff --git a/example/l3fwd/odp_l3fwd_run.sh b/example/l3fwd/odp_l3fwd_run.sh index 6f0b11a0..dff3afd7 100755 --- a/example/l3fwd/odp_l3fwd_run.sh +++ b/example/l3fwd/odp_l3fwd_run.sh @@ -11,7 +11,7 @@ PCAP_OUT="pcapout.pcap" PCAP_IN_SIZE=`stat -c %s ${PCAP_IN}` echo "using PCAP_IN = ${PCAP_IN}, PCAP_OUT = ${PCAP_OUT}"
-./odp_l3fwd -i pcap:in=${PCAP_IN},pcap:out=${PCAP_OUT} \ +./odp_l3fwd${EXEEXT} -i pcap:in=${PCAP_IN},pcap:out=${PCAP_OUT} \ -r "10.0.0.0/24,pcap:out=${PCAP_OUT}" -d 30
STATUS=$? diff --git a/example/packet/pktio_run.sh b/example/packet/pktio_run.sh index 3adb2d62..122418b6 100755 --- a/example/packet/pktio_run.sh +++ b/example/packet/pktio_run.sh @@ -12,7 +12,7 @@ PCAP_IN_SIZE=`stat -c %s ${PCAP_IN}` echo "using PCAP in=${PCAP_IN}:out=${PCAP_OUT} size %${PCAP_IN_SIZE}"
# burst mode -./odp_pktio -ipcap:in=${PCAP_IN}:out=${PCAP_OUT} -t 5 -m 0 +./odp_pktio${EXEEXT} -ipcap:in=${PCAP_IN}:out=${PCAP_OUT} -t 5 -m 0 STATUS=$? PCAP_OUT_SIZE=`stat -c %s ${PCAP_OUT}` rm -f ${PCAP_OUT} @@ -24,7 +24,7 @@ fi echo "Pass -m 0: status ${STATUS}, in:${PCAP_IN_SIZE} out:${PCAP_OUT_SIZE}"
# queue mode -./odp_pktio -ipcap:in=${PCAP_IN}:out=${PCAP_OUT} -t 5 -m 1 +./odp_pktio${EXEEXT} -ipcap:in=${PCAP_IN}:out=${PCAP_OUT} -t 5 -m 1 STATUS=$? PCAP_OUT_SIZE=`stat -c %s ${PCAP_OUT}` rm -f ${PCAP_OUT} @@ -36,7 +36,7 @@ fi echo "Pass -m 1: status ${STATUS}, in:${PCAP_IN_SIZE} out:${PCAP_OUT_SIZE}"
# sched/queue mode -./odp_pktio -ipcap:in=${PCAP_IN}:out=${PCAP_OUT} -t 5 -m 2 +./odp_pktio${EXEEXT} -ipcap:in=${PCAP_IN}:out=${PCAP_OUT} -t 5 -m 2 STATUS=$? PCAP_OUT_SIZE=`stat -c %s ${PCAP_OUT}` rm -f ${PCAP_OUT} @@ -48,7 +48,7 @@ fi echo "Pass -m 2: status ${STATUS}, in:${PCAP_IN_SIZE} out:${PCAP_OUT_SIZE}"
# cpu number option test 1 -./odp_pktio -ipcap:in=${PCAP_IN}:out=${PCAP_OUT} -t 5 -m 0 -c 1 +./odp_pktio${EXEEXT} -ipcap:in=${PCAP_IN}:out=${PCAP_OUT} -t 5 -m 0 -c 1 STATUS=$? PCAP_OUT_SIZE=`stat -c %s ${PCAP_OUT}` rm -f ${PCAP_OUT} diff --git a/example/switch/switch_run.sh b/example/switch/switch_run.sh index d9aa8bd0..9a8e8480 100755 --- a/example/switch/switch_run.sh +++ b/example/switch/switch_run.sh @@ -19,7 +19,7 @@ do RX_PORTS="${RX_PORTS},pcap:out=pcapout${i}.pcap" done
-./odp_switch -i pcap:in=${PCAP_IN}${RX_PORTS} -t 1 +./odp_switch${EXEEXT} -i pcap:in=${PCAP_IN}${RX_PORTS} -t 1 STATUS=$? if [ "$STATUS" -ne 0 ]; then echo "Error: status was: $STATUS, expected 0"
commit 8c9ce8c63eed9d01fec54c09bd17040914abd623 Author: Dmitry Eremin-Solenikov dmitry.ereminsolenikov@linaro.org Date: Tue Oct 17 15:11:57 2017 +0300
linux-gen: drop unused EXEEXT suffix
Signed-off-by: Dmitry Eremin-Solenikov dmitry.ereminsolenikov@linaro.org Reviewed-by: Bill Fischofer bill.fischofer@linaro.org Signed-off-by: Maxim Uvarov maxim.uvarov@linaro.org
diff --git a/platform/linux-generic/test/mmap_vlan_ins/Makefile.am b/platform/linux-generic/test/mmap_vlan_ins/Makefile.am index e42b5254..8559e55b 100644 --- a/platform/linux-generic/test/mmap_vlan_ins/Makefile.am +++ b/platform/linux-generic/test/mmap_vlan_ins/Makefile.am @@ -10,7 +10,7 @@ dist_check_DATA = vlan.pcap test_SCRIPTS = $(dist_check_SCRIPTS) test_DATA = $(dist_check_DATA)
-test_PROGRAMS = plat_mmap_vlan_ins$(EXEEXT) +test_PROGRAMS = plat_mmap_vlan_ins
# Clonned from example odp_l2fwd simple plat_mmap_vlan_ins_SOURCES = mmap_vlan_ins.c diff --git a/platform/linux-generic/test/ring/Makefile.am b/platform/linux-generic/test/ring/Makefile.am index 57ba82ae..37604755 100644 --- a/platform/linux-generic/test/ring/Makefile.am +++ b/platform/linux-generic/test/ring/Makefile.am @@ -1,6 +1,6 @@ include ../Makefile.inc
-test_PROGRAMS = ring_main$(EXEEXT) +test_PROGRAMS = ring_main ring_main_SOURCES = \ ring_main.c \ ring_suites.c ring_suites.h \ diff --git a/platform/linux-generic/test/validation/api/shmem/Makefile.am b/platform/linux-generic/test/validation/api/shmem/Makefile.am index 962450e5..131a511b 100644 --- a/platform/linux-generic/test/validation/api/shmem/Makefile.am +++ b/platform/linux-generic/test/validation/api/shmem/Makefile.am @@ -1,7 +1,7 @@ include ../Makefile.inc
#the main test program is shmem_linux, which, in turn, starts a shmem_odp: -test_PROGRAMS = shmem_linux$(EXEEXT) shmem_odp1$(EXEEXT) shmem_odp2$(EXEEXT) +test_PROGRAMS = shmem_linux shmem_odp1 shmem_odp2
#shmem_linux is stand alone, pure linux (no ODP): shmem_linux_SOURCES = shmem_linux.c shmem_linux.h shmem_common.h
commit 2b57c7d7b96eef16c36b8b0020b3dd78acc82660 Author: Dmitry Eremin-Solenikov dmitry.ereminsolenikov@linaro.org Date: Tue Oct 17 15:11:31 2017 +0300
test: drop unused EXEEXT suffix
Signed-off-by: Dmitry Eremin-Solenikov dmitry.ereminsolenikov@linaro.org Reviewed-by: Bill Fischofer bill.fischofer@linaro.org Signed-off-by: Maxim Uvarov maxim.uvarov@linaro.org
diff --git a/test/miscellaneous/Makefile.am b/test/miscellaneous/Makefile.am index 7d42b07e..3ea5d5e8 100644 --- a/test/miscellaneous/Makefile.am +++ b/test/miscellaneous/Makefile.am @@ -1,8 +1,8 @@ include $(top_srcdir)/test/Makefile.inc
if test_cpp -bin_PROGRAMS = odp_api_from_cpp$(EXEEXT) -TESTS = odp_api_from_cpp$(EXEEXT) +bin_PROGRAMS = odp_api_from_cpp +TESTS = odp_api_from_cpp endif
odp_api_from_cpp_SOURCES = odp_api_from_cpp.cpp diff --git a/test/performance/Makefile.am b/test/performance/Makefile.am index 8d9fd359..1dccd82e 100644 --- a/test/performance/Makefile.am +++ b/test/performance/Makefile.am @@ -2,14 +2,14 @@ include $(top_srcdir)/test/Makefile.inc
TESTS_ENVIRONMENT += TEST_DIR=${builddir}
-EXECUTABLES = odp_bench_packet$(EXEEXT) \ - odp_crypto$(EXEEXT) \ - odp_pktio_perf$(EXEEXT) - -COMPILE_ONLY = odp_l2fwd$(EXEEXT) \ - odp_pktio_ordered$(EXEEXT) \ - odp_sched_latency$(EXEEXT) \ - odp_scheduling$(EXEEXT) +EXECUTABLES = odp_bench_packet \ + odp_crypto \ + odp_pktio_perf + +COMPILE_ONLY = odp_l2fwd \ + odp_pktio_ordered \ + odp_sched_latency \ + odp_scheduling
TESTSCRIPTS = odp_l2fwd_run.sh \ odp_pktio_ordered_run.sh \ diff --git a/test/validation/api/atomic/Makefile.am b/test/validation/api/atomic/Makefile.am index b09d3b88..859e3c51 100644 --- a/test/validation/api/atomic/Makefile.am +++ b/test/validation/api/atomic/Makefile.am @@ -1,5 +1,5 @@ include ../Makefile.inc
-test_PROGRAMS = atomic_main$(EXEEXT) +test_PROGRAMS = atomic_main atomic_main_SOURCES = atomic_main.c atomic.c atomic.h atomic_main_LDADD = $(LIBCUNIT_COMMON) $(LIBODP) diff --git a/test/validation/api/barrier/Makefile.am b/test/validation/api/barrier/Makefile.am index 4dfb1d1e..b0310e3a 100644 --- a/test/validation/api/barrier/Makefile.am +++ b/test/validation/api/barrier/Makefile.am @@ -1,5 +1,5 @@ include ../Makefile.inc
-test_PROGRAMS = barrier_main$(EXEEXT) +test_PROGRAMS = barrier_main barrier_main_SOURCES = barrier_main.c barrier.c barrier.h barrier_main_LDADD = $(LIBCUNIT_COMMON) $(LIBODP) diff --git a/test/validation/api/buffer/Makefile.am b/test/validation/api/buffer/Makefile.am index ae6ce0a4..59639ff7 100644 --- a/test/validation/api/buffer/Makefile.am +++ b/test/validation/api/buffer/Makefile.am @@ -1,5 +1,5 @@ include ../Makefile.inc
-test_PROGRAMS = buffer_main$(EXEEXT) +test_PROGRAMS = buffer_main buffer_main_SOURCES = buffer_main.c buffer.c buffer.h buffer_main_LDADD = $(LIBCUNIT_COMMON) $(LIBODP) diff --git a/test/validation/api/classification/Makefile.am b/test/validation/api/classification/Makefile.am index f177528e..b5870307 100644 --- a/test/validation/api/classification/Makefile.am +++ b/test/validation/api/classification/Makefile.am @@ -1,6 +1,6 @@ include ../Makefile.inc
-test_PROGRAMS = classification_main$(EXEEXT) +test_PROGRAMS = classification_main classification_main_SOURCES = classification_main.c \ odp_classification_basic.c \ odp_classification_tests.c \ diff --git a/test/validation/api/cpumask/Makefile.am b/test/validation/api/cpumask/Makefile.am index ddafb9ab..ff12f56f 100644 --- a/test/validation/api/cpumask/Makefile.am +++ b/test/validation/api/cpumask/Makefile.am @@ -1,5 +1,5 @@ include ../Makefile.inc
-test_PROGRAMS = cpumask_main$(EXEEXT) +test_PROGRAMS = cpumask_main cpumask_main_SOURCES = cpumask_main.c cpumask.c cpumask.h cpumask_main_LDADD = $(LIBCPUMASK_COMMON) $(LIBCUNIT_COMMON) $(LIBODP) diff --git a/test/validation/api/crypto/Makefile.am b/test/validation/api/crypto/Makefile.am index 6660e1b2..94f1c1ca 100644 --- a/test/validation/api/crypto/Makefile.am +++ b/test/validation/api/crypto/Makefile.am @@ -1,6 +1,6 @@ include ../Makefile.inc
-test_PROGRAMS = crypto_main$(EXEEXT) +test_PROGRAMS = crypto_main crypto_main_SOURCES = crypto_main.c \ crypto.c \ crypto.h \ diff --git a/test/validation/api/errno/Makefile.am b/test/validation/api/errno/Makefile.am index 8f7b2e88..9eddfb48 100644 --- a/test/validation/api/errno/Makefile.am +++ b/test/validation/api/errno/Makefile.am @@ -1,5 +1,5 @@ include ../Makefile.inc
-test_PROGRAMS = errno_main$(EXEEXT) +test_PROGRAMS = errno_main errno_main_SOURCES = errno_main.c errno.c errno.h errno_main_LDADD = $(LIBCUNIT_COMMON) $(LIBODP) diff --git a/test/validation/api/hash/Makefile.am b/test/validation/api/hash/Makefile.am index b37f2e00..bd098ffb 100644 --- a/test/validation/api/hash/Makefile.am +++ b/test/validation/api/hash/Makefile.am @@ -1,5 +1,5 @@ include ../Makefile.inc
-test_PROGRAMS = hash_main$(EXEEXT) +test_PROGRAMS = hash_main hash_main_SOURCES = hash_main.c hash.c hash.h hash_main_LDADD = $(LIBCUNIT_COMMON) $(LIBODP) diff --git a/test/validation/api/init/Makefile.am b/test/validation/api/init/Makefile.am index ba25c61f..522c3a18 100644 --- a/test/validation/api/init/Makefile.am +++ b/test/validation/api/init/Makefile.am @@ -3,7 +3,7 @@ include ../Makefile.inc # most platforms are expected not to support multiple ODP inits # following each other: therefore 3 separate binaries are # created, each containing its ODP init test. -test_PROGRAMS = init_main_abort$(EXEEXT) init_main_log$(EXEEXT) init_main_ok$(EXEEXT) +test_PROGRAMS = init_main_abort init_main_log init_main_ok init_main_abort_SOURCES = init_main_abort.c init.c init.h init_main_log_SOURCES = init_main_log.c init.c init.h init_main_ok_SOURCES = init_main_ok.c init.c init.h diff --git a/test/validation/api/lock/Makefile.am b/test/validation/api/lock/Makefile.am index 80740282..b434fe77 100644 --- a/test/validation/api/lock/Makefile.am +++ b/test/validation/api/lock/Makefile.am @@ -1,5 +1,5 @@ include ../Makefile.inc
-test_PROGRAMS = lock_main$(EXEEXT) +test_PROGRAMS = lock_main lock_main_SOURCES = lock_main.c lock.c lock.h lock_main_LDADD = $(LIBCUNIT_COMMON) $(LIBODP) diff --git a/test/validation/api/packet/Makefile.am b/test/validation/api/packet/Makefile.am index fb356997..43300ed0 100644 --- a/test/validation/api/packet/Makefile.am +++ b/test/validation/api/packet/Makefile.am @@ -1,5 +1,5 @@ include ../Makefile.inc
-test_PROGRAMS = packet_main$(EXEEXT) +test_PROGRAMS = packet_main packet_main_SOURCES = packet_main.c packet.c packet.h packet_main_LDADD = $(LIBCUNIT_COMMON) $(LIBODP) diff --git a/test/validation/api/pktio/Makefile.am b/test/validation/api/pktio/Makefile.am index eb4b6038..a416fd1d 100644 --- a/test/validation/api/pktio/Makefile.am +++ b/test/validation/api/pktio/Makefile.am @@ -1,5 +1,5 @@ include ../Makefile.inc
-test_PROGRAMS = pktio_main$(EXEEXT) +test_PROGRAMS = pktio_main pktio_main_SOURCES = pktio_main.c parser.c parser.h pktio.c pktio.h pktio_main_LDADD = $(LIBCUNIT_COMMON) $(LIBODP) diff --git a/test/validation/api/pool/Makefile.am b/test/validation/api/pool/Makefile.am index 85a37b05..9e7c42b5 100644 --- a/test/validation/api/pool/Makefile.am +++ b/test/validation/api/pool/Makefile.am @@ -1,5 +1,5 @@ include ../Makefile.inc
-test_PROGRAMS = pool_main$(EXEEXT) +test_PROGRAMS = pool_main pool_main_SOURCES = pool_main.c pool.c pool.h pool_main_LDADD = $(LIBCUNIT_COMMON) $(LIBODP) diff --git a/test/validation/api/queue/Makefile.am b/test/validation/api/queue/Makefile.am index a5b6a9b1..9b1c6b77 100644 --- a/test/validation/api/queue/Makefile.am +++ b/test/validation/api/queue/Makefile.am @@ -1,5 +1,5 @@ include ../Makefile.inc
-test_PROGRAMS = queue_main$(EXEEXT) +test_PROGRAMS = queue_main queue_main_SOURCES = queue_main.c queue.c queue.h queue_main_LDADD = $(LIBCUNIT_COMMON) $(LIBODP) diff --git a/test/validation/api/random/Makefile.am b/test/validation/api/random/Makefile.am index e026f045..e9e7ffc0 100644 --- a/test/validation/api/random/Makefile.am +++ b/test/validation/api/random/Makefile.am @@ -1,5 +1,5 @@ include ../Makefile.inc
-test_PROGRAMS = random_main$(EXEEXT) +test_PROGRAMS = random_main random_main_SOURCES = random_main.c random.c random.h random_main_LDADD = $(LIBCUNIT_COMMON) $(LIBODP) diff --git a/test/validation/api/scheduler/Makefile.am b/test/validation/api/scheduler/Makefile.am index 6c71b010..34abf7d6 100644 --- a/test/validation/api/scheduler/Makefile.am +++ b/test/validation/api/scheduler/Makefile.am @@ -1,5 +1,5 @@ include ../Makefile.inc
-test_PROGRAMS = scheduler_main$(EXEEXT) +test_PROGRAMS = scheduler_main scheduler_main_SOURCES = scheduler_main.c scheduler.c scheduler.h scheduler_main_LDADD = $(LIBCUNIT_COMMON) $(LIBODP) diff --git a/test/validation/api/shmem/Makefile.am b/test/validation/api/shmem/Makefile.am index d955cc22..8c5d7f70 100644 --- a/test/validation/api/shmem/Makefile.am +++ b/test/validation/api/shmem/Makefile.am @@ -1,5 +1,5 @@ include ../Makefile.inc
-test_PROGRAMS = shmem_main$(EXEEXT) +test_PROGRAMS = shmem_main shmem_main_SOURCES = shmem_main.c shmem.c shmem.h shmem_main_LDADD = $(LIBCUNIT_COMMON) $(LIBODP) diff --git a/test/validation/api/std_clib/Makefile.am b/test/validation/api/std_clib/Makefile.am index 919c2556..dc75c95c 100644 --- a/test/validation/api/std_clib/Makefile.am +++ b/test/validation/api/std_clib/Makefile.am @@ -1,5 +1,5 @@ include ../Makefile.inc
-test_PROGRAMS = std_clib_main$(EXEEXT) +test_PROGRAMS = std_clib_main std_clib_main_SOURCES = std_clib_main.c std_clib.c std_clib.h std_clib_main_LDADD = $(LIBCUNIT_COMMON) $(LIBODP) diff --git a/test/validation/api/system/Makefile.am b/test/validation/api/system/Makefile.am index 15e6d49a..123d3a69 100644 --- a/test/validation/api/system/Makefile.am +++ b/test/validation/api/system/Makefile.am @@ -1,5 +1,5 @@ include ../Makefile.inc
-test_PROGRAMS = system_main$(EXEEXT) +test_PROGRAMS = system_main system_main_SOURCES = system_main.c system.c system.h system_main_LDADD = $(LIBCUNIT_COMMON) $(LIBODP) diff --git a/test/validation/api/thread/Makefile.am b/test/validation/api/thread/Makefile.am index 59e136b2..1c56574f 100644 --- a/test/validation/api/thread/Makefile.am +++ b/test/validation/api/thread/Makefile.am @@ -1,6 +1,6 @@ include ../Makefile.inc
-test_PROGRAMS = thread_main$(EXEEXT) +test_PROGRAMS = thread_main thread_main_CPPFLAGS = $(AM_CPPFLAGS) -DTEST_THRMASK thread_main_SOURCES = thread_main.c thread.c thread.h thread_main_LDADD = $(LIBTHRMASK_COMMON) $(LIBCUNIT_COMMON) $(LIBODP) diff --git a/test/validation/api/time/Makefile.am b/test/validation/api/time/Makefile.am index faed577f..669d1226 100644 --- a/test/validation/api/time/Makefile.am +++ b/test/validation/api/time/Makefile.am @@ -7,7 +7,7 @@ TEST_EXTENSIONS = .sh
TESTS = $(TESTSCRIPTS)
-test_PROGRAMS = time_main$(EXEEXT) +test_PROGRAMS = time_main time_main_SOURCES = time_main.c time.c time_test.h time_main_LDADD = $(LIBCUNIT_COMMON) $(LIBODP)
diff --git a/test/validation/api/timer/Makefile.am b/test/validation/api/timer/Makefile.am index 4f79020d..c953dcb3 100644 --- a/test/validation/api/timer/Makefile.am +++ b/test/validation/api/timer/Makefile.am @@ -1,5 +1,5 @@ include ../Makefile.inc
-test_PROGRAMS = timer_main$(EXEEXT) +test_PROGRAMS = timer_main timer_main_SOURCES = timer_main.c timer.c timer.h timer_main_LDADD = $(LIBCUNIT_COMMON) $(LIBODP) diff --git a/test/validation/api/traffic_mngr/Makefile.am b/test/validation/api/traffic_mngr/Makefile.am index 3884a13c..dc4f8709 100644 --- a/test/validation/api/traffic_mngr/Makefile.am +++ b/test/validation/api/traffic_mngr/Makefile.am @@ -7,7 +7,7 @@ TEST_EXTENSIONS = .sh
TESTS = $(TESTSCRIPTS)
-test_PROGRAMS = traffic_mngr_main$(EXEEXT) +test_PROGRAMS = traffic_mngr_main traffic_mngr_main_SOURCES = traffic_mngr_main.c traffic_mngr.c traffic_mngr.h traffic_mngr_main_LDADD = -lm $(LIBCUNIT_COMMON) $(LIBODP)
commit cbced85824c4c03c0b35396d559ebfb187237569 Author: Dmitry Eremin-Solenikov dmitry.ereminsolenikov@linaro.org Date: Tue Oct 17 12:38:07 2017 +0300
configure: cleanup per-platform if
Move setting IMPLEMENTATION_NAME to platform configure.m4. Use AS_IF instead of handcoded if. Use AC_MSG_ERROR instead of echo & exit.
Signed-off-by: Dmitry Eremin-Solenikov dmitry.ereminsolenikov@linaro.org Reviewed-by: Bill Fischofer bill.fischofer@linaro.org Signed-off-by: Maxim Uvarov maxim.uvarov@linaro.org
diff --git a/configure.ac b/configure.ac index 89ff486f..4bce0534 100644 --- a/configure.ac +++ b/configure.ac @@ -165,15 +165,9 @@ AC_SUBST([with_platform]) ########################################################################## # Run platform specific checks and settings ########################################################################## -IMPLEMENTATION_NAME="" -if test "${with_platform}" = "linux-generic"; -then - m4_include([./platform/linux-generic/m4/configure.m4]) - IMPLEMENTATION_NAME="odp-linux" -else - echo "UNSUPPORTED PLATFORM: ${with_platform}" - exit 1 -fi +AS_IF([test "${with_platform}" = "linux-generic"], + [m4_include([./platform/linux-generic/m4/configure.m4])], + [AC_MSG_ERROR([UNSUPPORTED PLATFORM: ${with_platform}])])
AC_DEFINE_UNQUOTED([IMPLEMENTATION_NAME], ["$IMPLEMENTATION_NAME"], [Define to the name of the implementation]) diff --git a/platform/linux-generic/m4/configure.m4 b/platform/linux-generic/m4/configure.m4 index 68a270d8..5d7ad35a 100644 --- a/platform/linux-generic/m4/configure.m4 +++ b/platform/linux-generic/m4/configure.m4 @@ -1,3 +1,5 @@ +IMPLEMENTATION_NAME="odp-linux" + ODP_VISIBILITY ODP_ATOMIC
commit 1217fbaed0aee2ee395c131bb7fd2e201214ed31 Author: Dmitry Eremin-Solenikov dmitry.ereminsolenikov@linaro.org Date: Tue Oct 17 12:36:24 2017 +0300
configure: drop SDK_INSTALL_PATH variable
Signed-off-by: Dmitry Eremin-Solenikov dmitry.ereminsolenikov@linaro.org Reviewed-by: Bill Fischofer bill.fischofer@linaro.org Signed-off-by: Maxim Uvarov maxim.uvarov@linaro.org
diff --git a/configure.ac b/configure.ac index 9144c418..89ff486f 100644 --- a/configure.ac +++ b/configure.ac @@ -186,16 +186,6 @@ m4_include([./example/m4/configure.m4]) m4_include([./helper/m4/configure.m4]) m4_include([./test/m4/configure.m4])
-########################################################################## -# Set SDK install path -########################################################################## -AC_ARG_WITH([sdk-install-path], -AS_HELP_STRING([--with-sdk-install-path=DIR path to external libs and headers], - [(or in the default path if not specified).]), -[SDK_INSTALL_PATH=$withval SDK_INSTALL_PATH_=1],[SDK_INSTALL_PATH_=]) - -AC_SUBST(SDK_INSTALL_PATH) - ########################################################################## # Set the install directory for test binaries/scripts ########################################################################## @@ -211,7 +201,6 @@ AM_CONDITIONAL([test_installdir], [test "x$testdir" != "xno"]) ########################################################################## # Set conditionals as computed within platform specific files ########################################################################## -AM_CONDITIONAL([SDK_INSTALL_PATH_], [test "x${SDK_INSTALL_PATH_}" = "x1"]) AM_CONDITIONAL([HAVE_DOXYGEN], [test "x${DOXYGEN}" = "xdoxygen"]) AM_CONDITIONAL([user_guide], [test "x${user_guides}" = "xyes" ]) AM_CONDITIONAL([HAVE_MSCGEN], [test "x${MSCGEN}" = "xmscgen"])
commit 927b57f21124f31e23fd7f72dddcc93a5248ed53 Author: Dmitry Eremin-Solenikov dmitry.ereminsolenikov@linaro.org Date: Tue Oct 17 12:35:00 2017 +0300
configure: use AC_CONFIG_COMMANDS_PRE to set conditionals
Signed-off-by: Dmitry Eremin-Solenikov dmitry.ereminsolenikov@linaro.org Reviewed-by: Bill Fischofer bill.fischofer@linaro.org Signed-off-by: Maxim Uvarov maxim.uvarov@linaro.org
diff --git a/configure.ac b/configure.ac index dfea5d20..9144c418 100644 --- a/configure.ac +++ b/configure.ac @@ -162,9 +162,6 @@ AC_ARG_WITH([platform],
AC_SUBST([with_platform])
-AM_CONDITIONAL([PLATFORM_IS_LINUX_GENERIC], - [test "x$with_platform" = "xlinux-generic"]) - ########################################################################## # Run platform specific checks and settings ########################################################################## diff --git a/platform/linux-generic/m4/configure.m4 b/platform/linux-generic/m4/configure.m4 index 7dc83bf8..68a270d8 100644 --- a/platform/linux-generic/m4/configure.m4 +++ b/platform/linux-generic/m4/configure.m4 @@ -11,6 +11,9 @@ m4_include([platform/linux-generic/m4/odp_schedule.m4])
m4_include([platform/linux-generic/m4/performance.m4])
+AC_CONFIG_COMMANDS_PRE([dnl +AM_CONDITIONAL([PLATFORM_IS_LINUX_GENERIC], + [test "${with_platform}" = "linux-generic"]) AC_CONFIG_FILES([platform/linux-generic/Makefile platform/linux-generic/libodp-linux.pc platform/linux-generic/include/odp/api/plat/static_inline.h @@ -21,3 +24,4 @@ AC_CONFIG_FILES([platform/linux-generic/Makefile platform/linux-generic/test/pktio_ipc/Makefile platform/linux-generic/test/ring/Makefile platform/linux-generic/test/performance/Makefile]) +]) diff --git a/platform/linux-generic/m4/odp_netmap.m4 b/platform/linux-generic/m4/odp_netmap.m4 index 24ed4bc1..85462c92 100644 --- a/platform/linux-generic/m4/odp_netmap.m4 +++ b/platform/linux-generic/m4/odp_netmap.m4 @@ -43,4 +43,6 @@ fi ########################################################################## CPPFLAGS=$OLD_CPPFLAGS
+AC_CONFIG_COMMANDS_PRE([dnl AM_CONDITIONAL([netmap_support], [test x$netmap_support = xyes ]) +]) diff --git a/platform/linux-generic/m4/odp_pcap.m4 b/platform/linux-generic/m4/odp_pcap.m4 index 0b5b8a2e..0a8f3518 100644 --- a/platform/linux-generic/m4/odp_pcap.m4 +++ b/platform/linux-generic/m4/odp_pcap.m4 @@ -15,4 +15,6 @@ fi
AC_SUBST([PCAP_LIBS])
-AM_CONDITIONAL([HAVE_PCAP], [test $have_pcap = yes]) +AC_CONFIG_COMMANDS_PRE([dnl +AM_CONDITIONAL([HAVE_PCAP], [test x$have_pcap = xyes]) +]) diff --git a/platform/linux-generic/m4/performance.m4 b/platform/linux-generic/m4/performance.m4 index 05b3a990..f2e7107c 100644 --- a/platform/linux-generic/m4/performance.m4 +++ b/platform/linux-generic/m4/performance.m4 @@ -5,4 +5,6 @@ AC_ARG_ENABLE([test-perf-proc], [AS_HELP_STRING([--enable-test-perf-proc], [run test in test/performance in process mode])], [test_perf_proc=$enableval], [test_perf_proc=yes]) +AC_CONFIG_COMMANDS_PRE([dnl AM_CONDITIONAL([test_perf_proc], [test x$test_perf_proc = xyes ]) +])
commit 1bcf171f00973bcc21baadf9919a61cd6abdf713 Author: Dmitry Eremin-Solenikov dmitry.ereminsolenikov@linaro.org Date: Tue Oct 17 12:33:08 2017 +0300
configure: use AS_HELP_STRING instead of AC_HELP_STRING
AC_HELP_STRING was replaced loong time ago by AS_HELP_STRING (it was before Autoconf 2.60). Let's use new macro instead of the obsolete one.
Signed-off-by: Dmitry Eremin-Solenikov dmitry.ereminsolenikov@linaro.org Reviewed-by: Bill Fischofer bill.fischofer@linaro.org Signed-off-by: Maxim Uvarov maxim.uvarov@linaro.org
diff --git a/configure.ac b/configure.ac index 80bc3122..dfea5d20 100644 --- a/configure.ac +++ b/configure.ac @@ -193,7 +193,7 @@ m4_include([./test/m4/configure.m4]) # Set SDK install path ########################################################################## AC_ARG_WITH([sdk-install-path], -AC_HELP_STRING([--with-sdk-install-path=DIR path to external libs and headers], +AS_HELP_STRING([--with-sdk-install-path=DIR path to external libs and headers], [(or in the default path if not specified).]), [SDK_INSTALL_PATH=$withval SDK_INSTALL_PATH_=1],[SDK_INSTALL_PATH_=])
@@ -203,7 +203,7 @@ AC_SUBST(SDK_INSTALL_PATH) # Set the install directory for test binaries/scripts ########################################################################## AC_ARG_WITH([testdir], - [AC_HELP_STRING([--with-testdir=DIR], [installation directory for tests])], + [AS_HELP_STRING([--with-testdir=DIR], [installation directory for tests])], [testdir=$withval], [testdir=no]) AS_IF([test "x$testdir" = "xyes"], [testdir=$libdir/odp/tests], diff --git a/m4/odp_openssl.m4 b/m4/odp_openssl.m4 index 72568a8a..428470dc 100644 --- a/m4/odp_openssl.m4 +++ b/m4/odp_openssl.m4 @@ -10,7 +10,7 @@ AC_ARG_VAR([OPENSSL_STATIC_LIBS], [static linker flags for OpenSSL crypto librar # Set optional OpenSSL path ########################################################################## AC_ARG_WITH([openssl-path], -[AC_HELP_STRING([--with-openssl-path=DIR], +[AS_HELP_STRING([--with-openssl-path=DIR], [path to openssl libs and headers (use system path if not provided)])], [OPENSSL_CPPFLAGS="-I$withval/include" OPENSSL_LIBS="-L$withval/lib -lcrypto"], diff --git a/platform/linux-generic/m4/odp_dpdk.m4 b/platform/linux-generic/m4/odp_dpdk.m4 index b6554165..9d90bbab 100644 --- a/platform/linux-generic/m4/odp_dpdk.m4 +++ b/platform/linux-generic/m4/odp_dpdk.m4 @@ -3,7 +3,7 @@ ########################################################################## pktio_dpdk_support=no AC_ARG_WITH([dpdk-path], -AC_HELP_STRING([--with-dpdk-path=DIR path to dpdk build directory]), +AS_HELP_STRING([--with-dpdk-path=DIR path to dpdk build directory]), [DPDK_PATH="$withval" DPDK_CPPFLAGS="-msse4.2 -isystem $DPDK_PATH/include" pktio_dpdk_support=yes],[]) diff --git a/platform/linux-generic/m4/odp_netmap.m4 b/platform/linux-generic/m4/odp_netmap.m4 index bd04824b..24ed4bc1 100644 --- a/platform/linux-generic/m4/odp_netmap.m4 +++ b/platform/linux-generic/m4/odp_netmap.m4 @@ -12,7 +12,7 @@ AC_ARG_ENABLE([netmap_support], # Set optional netmap path ########################################################################## AC_ARG_WITH([netmap-path], -AC_HELP_STRING([--with-netmap-path=DIR path to netmap root directory], +AS_HELP_STRING([--with-netmap-path=DIR path to netmap root directory], [(or in the default path if not specified).]), [NETMAP_PATH=$withval NETMAP_CPPFLAGS="-isystem $NETMAP_PATH/sys"
-----------------------------------------------------------------------
Summary of changes: configure.ac | 28 ++------- example/Makefile.inc | 2 + example/l2fwd_simple/l2fwd_simple_run.sh | 3 +- example/l3fwd/odp_l3fwd_run.sh | 2 +- example/packet/pktio_run.sh | 8 +-- example/switch/switch_run.sh | 2 +- helper/test/Makefile.am | 2 + helper/test/odpthreads_as_processes | 2 +- helper/test/odpthreads_as_pthreads | 2 +- m4/odp_openssl.m4 | 2 +- .../linux-generic/include/odp_buffer_internal.h | 6 +- .../linux-generic/include/odp_config_internal.h | 17 +++++- .../linux-generic/include/odp_packet_internal.h | 8 +-- platform/linux-generic/include/odp_pool_internal.h | 3 +- platform/linux-generic/m4/configure.m4 | 6 ++ platform/linux-generic/m4/odp_dpdk.m4 | 2 +- platform/linux-generic/m4/odp_netmap.m4 | 4 +- platform/linux-generic/m4/odp_pcap.m4 | 4 +- platform/linux-generic/m4/performance.m4 | 2 + platform/linux-generic/odp_packet.c | 71 +++++++++++----------- platform/linux-generic/odp_packet_io.c | 29 +++++---- platform/linux-generic/odp_pool.c | 55 +++++++++++------ platform/linux-generic/pktio/dpdk.c | 6 +- platform/linux-generic/pktio/netmap.c | 2 +- platform/linux-generic/pktio/socket_mmap.c | 2 +- platform/linux-generic/test/Makefile.am | 2 +- .../linux-generic/test/mmap_vlan_ins/Makefile.am | 2 +- platform/linux-generic/test/ring/Makefile.am | 2 +- .../test/validation/api/shmem/Makefile.am | 2 +- .../test/validation/api/shmem/shmem_linux.c | 8 ++- test/miscellaneous/Makefile.am | 4 +- test/performance/Makefile.am | 16 ++--- test/validation/api/atomic/Makefile.am | 2 +- test/validation/api/barrier/Makefile.am | 2 +- test/validation/api/buffer/Makefile.am | 2 +- test/validation/api/classification/Makefile.am | 2 +- test/validation/api/cpumask/Makefile.am | 2 +- test/validation/api/crypto/Makefile.am | 2 +- test/validation/api/errno/Makefile.am | 2 +- test/validation/api/hash/Makefile.am | 2 +- test/validation/api/init/Makefile.am | 2 +- test/validation/api/lock/Makefile.am | 2 +- test/validation/api/packet/Makefile.am | 2 +- test/validation/api/packet/packet.c | 29 +++++++-- test/validation/api/pktio/Makefile.am | 2 +- test/validation/api/pool/Makefile.am | 2 +- test/validation/api/queue/Makefile.am | 2 +- test/validation/api/random/Makefile.am | 2 +- test/validation/api/scheduler/Makefile.am | 2 +- test/validation/api/shmem/Makefile.am | 2 +- test/validation/api/std_clib/Makefile.am | 2 +- test/validation/api/system/Makefile.am | 2 +- test/validation/api/thread/Makefile.am | 2 +- test/validation/api/time/Makefile.am | 2 +- test/validation/api/timer/Makefile.am | 2 +- test/validation/api/traffic_mngr/Makefile.am | 2 +- 56 files changed, 215 insertions(+), 166 deletions(-)
hooks/post-receive