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 472d34cc0fd2b5f96277b1799583ab6c45375d40 (commit) via 148a700fb9af847a64d732bf7ed9975aa03fefa9 (commit) via ba6cad6319b917c078dd0c20cd6b011637195898 (commit) from c5eb1703fe9e7529ae12ecf1799b757e1a992afd (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 472d34cc0fd2b5f96277b1799583ab6c45375d40 Author: Matias Elo matias.elo@nokia.com Date: Wed May 24 17:35:21 2017 +0300
test: pktio: use capability to set test pool packet length
Test used to fail if odp_pool_capability_t.pkt.max_len < PKT_BUF_SIZE. https://bugs.linaro.org/show_bug.cgi?id=3013
Signed-off-by: Matias Elo matias.elo@nokia.com Reviewed-and-tested-by: Bill Fischofer bill.fischofer@linaro.org Signed-off-by: Maxim Uvarov maxim.uvarov@linaro.org
diff --git a/test/common_plat/validation/api/pktio/pktio.c b/test/common_plat/validation/api/pktio/pktio.c index 54f206ef..11fe974f 100644 --- a/test/common_plat/validation/api/pktio/pktio.c +++ b/test/common_plat/validation/api/pktio/pktio.c @@ -122,20 +122,23 @@ static inline void _pktio_wait_linkup(odp_pktio_t pktio)
static void set_pool_len(odp_pool_param_t *params, odp_pool_capability_t *capa) { + uint32_t len; uint32_t seg_len;
+ len = (capa->pkt.max_len && capa->pkt.max_len < PKT_BUF_SIZE) ? + capa->pkt.max_len : PKT_BUF_SIZE; seg_len = capa->pkt.max_seg_len ? capa->pkt.max_seg_len : PKT_BUF_SIZE;
switch (pool_segmentation) { case PKT_POOL_SEGMENTED: /* Force segment to minimum size */ params->pkt.seg_len = 0; - params->pkt.len = PKT_BUF_SIZE; + params->pkt.len = len; break; case PKT_POOL_UNSEGMENTED: default: params->pkt.seg_len = seg_len; - params->pkt.len = PKT_BUF_SIZE; + params->pkt.len = len; break; } }
commit 148a700fb9af847a64d732bf7ed9975aa03fefa9 Author: Matias Elo matias.elo@nokia.com Date: Wed May 24 17:35:20 2017 +0300
linux-gen: packet: fix gcc errors with single segment pool
Fix (invalid) gcc errors when CONFIG_PACKET_MAX_SEGS is set to one. https://bugs.linaro.org/show_bug.cgi?id=3013
Signed-off-by: Matias Elo matias.elo@nokia.com Reviewed-and-tested-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 3e7c07a3..e2bb8426 100644 --- a/platform/linux-generic/odp_packet.c +++ b/platform/linux-generic/odp_packet.c @@ -804,7 +804,8 @@ static inline int move_data_to_head(odp_packet_hdr_t *pkt_hdr, int segs)
free_len = BASE_LEN - len;
- for (src_seg = dst_seg + 1; src_seg < segs; src_seg++) { + for (src_seg = dst_seg + 1; CONFIG_PACKET_MAX_SEGS > 1 && + src_seg < segs; src_seg++) { len = fill_seg_head(pkt_hdr, dst_seg, src_seg, free_len); moved += len; @@ -928,7 +929,7 @@ int odp_packet_extend_head(odp_packet_t *pkt, uint32_t len,
pkt_hdr = new_hdr; *pkt = packet_handle(pkt_hdr); - } else if (free_segs) { + } else if (CONFIG_PACKET_MAX_SEGS > 1 && free_segs) { new_hdr = pkt_hdr->buf_hdr.seg[free_segs].hdr; packet_seg_copy_md(new_hdr, pkt_hdr);
commit ba6cad6319b917c078dd0c20cd6b011637195898 Author: Matias Elo matias.elo@nokia.com Date: Wed May 24 17:35:19 2017 +0300
linux-gen: packet: fix odp_packet_free_multi() with single segment pool
Previously the implementation would use wrong handles and crash if CONFIG_PACKET_MAX_SEGS was set to one. https://bugs.linaro.org/show_bug.cgi?id=3013
Signed-off-by: Matias Elo matias.elo@nokia.com Reviewed-and-tested-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 e99e8b83..3e7c07a3 100644 --- a/platform/linux-generic/odp_packet.c +++ b/platform/linux-generic/odp_packet.c @@ -594,11 +594,16 @@ void odp_packet_free(odp_packet_t pkt)
void odp_packet_free_multi(const odp_packet_t pkt[], int num) { + odp_buffer_t buf[num * CONFIG_PACKET_MAX_SEGS]; + int i; + if (CONFIG_PACKET_MAX_SEGS == 1) { - buffer_free_multi((const odp_buffer_t * const)pkt, num); + for (i = 0; i < num; i++) + buf[i] = buffer_handle(packet_hdr(pkt[i])); + + buffer_free_multi(buf, num); } else { - odp_buffer_t buf[num * CONFIG_PACKET_MAX_SEGS]; - int i, j; + int j; int bufs = 0;
for (i = 0; i < num; i++) {
-----------------------------------------------------------------------
Summary of changes: platform/linux-generic/odp_packet.c | 16 +++++++++++----- test/common_plat/validation/api/pktio/pktio.c | 7 +++++-- 2 files changed, 16 insertions(+), 7 deletions(-)
hooks/post-receive