lists.linaro.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
List overview
Download
git-lng-odp
November 2017
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
git-lng-odp@lists.linaro.org
1 participants
41 discussions
Start a n
N
ew thread
[COMMIT] branch 2.0 updated. v1.15.0.0-818-gca1be967
by git@git-us.linaro.org
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, 2.0 has been updated via ca1be967bd4f6aec7dc99b72de643718cb8a32b8 (commit) from 1236f1ad2bba56b5e49ff62df247e52143b48985 (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 ca1be967bd4f6aec7dc99b72de643718cb8a32b8 Author: Joyce Kong <joyce.kong(a)arm.com> Date: Wed Oct 18 17:45:27 2017 +0800 remove uarea_size from packet meta data Signed-off-by: Joyce Kong <joyce.kong(a)arm.com> Reviewed-by: Honnappa Nagarahalli <honnappa.Nagarahalli(a)arm.com> Reviewed-by: Ola Liljedahl <ola.Liljedahl(a)arm.com> Reviewed-by: Bill Fischofer <bill.fischofer(a)linaro.org> Signed-off-by: Yi He <yi.he(a)linaro.org> diff --git a/platform/linux-dpdk/include/odp/api/plat/packet_inlines.h b/platform/linux-dpdk/include/odp/api/plat/packet_inlines.h index 93102974..a8d8b1d5 100644 --- a/platform/linux-dpdk/include/odp/api/plat/packet_inlines.h +++ b/platform/linux-dpdk/include/odp/api/plat/packet_inlines.h @@ -102,13 +102,6 @@ static inline void *_odp_packet_user_area(odp_packet_t pkt) return (void *)((char *)pkt + _odp_packet_inline.udata); } -/** @internal Inline function @param pkt @return */ -static inline uint32_t _odp_packet_user_area_size(odp_packet_t pkt) -{ - return *(uint32_t *)(void *)((char *)pkt + - _odp_packet_inline.udata_len); -} - /** @internal Inline function @param pkt @return */ static inline uint32_t _odp_packet_flow_hash(odp_packet_t pkt) { diff --git a/platform/linux-dpdk/include/odp/api/plat/packet_inlines_api.h b/platform/linux-dpdk/include/odp/api/plat/packet_inlines_api.h index 16a445a1..c964ce6d 100644 --- a/platform/linux-dpdk/include/odp/api/plat/packet_inlines_api.h +++ b/platform/linux-dpdk/include/odp/api/plat/packet_inlines_api.h @@ -63,11 +63,6 @@ _ODP_INLINE void *odp_packet_user_area(odp_packet_t pkt) return _odp_packet_user_area(pkt); } -_ODP_INLINE uint32_t odp_packet_user_area_size(odp_packet_t pkt) -{ - return _odp_packet_user_area_size(pkt); -} - _ODP_INLINE uint32_t odp_packet_flow_hash(odp_packet_t pkt) { return _odp_packet_flow_hash(pkt); diff --git a/platform/linux-dpdk/include/odp_packet_internal.h b/platform/linux-dpdk/include/odp_packet_internal.h index fc1f9e5f..66159cae 100644 --- a/platform/linux-dpdk/include/odp_packet_internal.h +++ b/platform/linux-dpdk/include/odp_packet_internal.h @@ -119,9 +119,6 @@ typedef struct { * Members below are not initialized by packet_init() */ - /* User metadata size, it's right after odp_packet_hdr_t */ - uint32_t uarea_size; - /* Timestamp value */ odp_time_t timestamp; diff --git a/platform/linux-dpdk/odp_packet.c b/platform/linux-dpdk/odp_packet.c index 523c2229..103f6f7a 100644 --- a/platform/linux-dpdk/odp_packet.c +++ b/platform/linux-dpdk/odp_packet.c @@ -44,7 +44,6 @@ const _odp_packet_inline_offset_t _odp_packet_inline ODP_ALIGNED_CACHE = { (size_t)&rte_pktmbuf_data_len((struct rte_mbuf *)0), .nb_segs = offsetof(odp_packet_hdr_t, buf_hdr.mb) + offsetof(struct rte_mbuf, nb_segs), - .udata_len = offsetof(odp_packet_hdr_t, uarea_size), .udata = sizeof(odp_packet_hdr_t), .rss = offsetof(odp_packet_hdr_t, buf_hdr.mb) + offsetof(struct rte_mbuf, hash.rss), @@ -540,6 +539,12 @@ void *odp_packet_offset(odp_packet_t pkt, uint32_t offset, uint32_t *len, * ******************************************************** * */ +uint32_t odp_packet_user_area_size(odp_packet_t pkt) +{ + pool_entry_cp_t *pool_cp = odp_pool_to_entry_cp(odp_packet_pool(pkt)); + + return pool_cp->params.pkt.uarea_size; +} int odp_packet_input_index(odp_packet_t pkt) { diff --git a/platform/linux-dpdk/pool/dpdk.c b/platform/linux-dpdk/pool/dpdk.c index 3f085620..90d2d7c6 100644 --- a/platform/linux-dpdk/pool/dpdk.c +++ b/platform/linux-dpdk/pool/dpdk.c @@ -219,14 +219,10 @@ odp_dpdk_mbuf_ctor(struct rte_mempool *mp, /* keep some headroom between start of buffer and data */ if (mb_ctor_arg->type == ODP_POOL_PACKET) { - odp_packet_hdr_t *pkt_hdr; - mb->data_off = RTE_PKTMBUF_HEADROOM; mb->nb_segs = 1; mb->port = 0xff; mb->vlan_tci = 0; - pkt_hdr = (odp_packet_hdr_t *)raw_mbuf; - pkt_hdr->uarea_size = mb_ctor_arg->pkt_uarea_size; } else { mb->data_off = 0; } diff --git a/platform/linux-generic/include/odp/api/plat/packet_inlines.h b/platform/linux-generic/include/odp/api/plat/packet_inlines.h index 1804fa6f..06bcf855 100644 --- a/platform/linux-generic/include/odp/api/plat/packet_inlines.h +++ b/platform/linux-generic/include/odp/api/plat/packet_inlines.h @@ -95,12 +95,6 @@ static inline void *_odp_packet_user_area(odp_packet_t pkt) return _odp_pkt_get(pkt, void *, user_area); } -/** @internal Inline function @param pkt @return */ -static inline uint32_t _odp_packet_user_area_size(odp_packet_t pkt) -{ - return _odp_pkt_get(pkt, uint32_t, user_area_size); -} - /** @internal Inline function @param pkt @return */ static inline uint32_t _odp_packet_flow_hash(odp_packet_t pkt) { diff --git a/platform/linux-generic/include/odp/api/plat/packet_inlines_api.h b/platform/linux-generic/include/odp/api/plat/packet_inlines_api.h index 233bc876..7eaaa85e 100644 --- a/platform/linux-generic/include/odp/api/plat/packet_inlines_api.h +++ b/platform/linux-generic/include/odp/api/plat/packet_inlines_api.h @@ -63,11 +63,6 @@ _ODP_INLINE void *odp_packet_user_area(odp_packet_t pkt) return _odp_packet_user_area(pkt); } -_ODP_INLINE uint32_t odp_packet_user_area_size(odp_packet_t pkt) -{ - return _odp_packet_user_area_size(pkt); -} - _ODP_INLINE uint32_t odp_packet_flow_hash(odp_packet_t pkt) { return _odp_packet_flow_hash(pkt); diff --git a/platform/linux-generic/include/odp/api/plat/packet_types.h b/platform/linux-generic/include/odp/api/plat/packet_types.h index 68c66312..009a3aa7 100644 --- a/platform/linux-generic/include/odp/api/plat/packet_types.h +++ b/platform/linux-generic/include/odp/api/plat/packet_types.h @@ -94,8 +94,6 @@ typedef struct _odp_packet_inline_offset_t { /** @internal field offset */ uint16_t user_area; /** @internal field offset */ - uint16_t user_area_size; - /** @internal field offset */ uint16_t flow_hash; /** @internal field offset */ uint16_t timestamp; diff --git a/platform/linux-generic/include/odp_buffer_internal.h b/platform/linux-generic/include/odp_buffer_internal.h index 358c0e44..e9b3e886 100644 --- a/platform/linux-generic/include/odp_buffer_internal.h +++ b/platform/linux-generic/include/odp_buffer_internal.h @@ -104,9 +104,6 @@ struct odp_buffer_hdr_t { /* User area pointer */ void *uarea_addr; - /* User area size */ - uint32_t uarea_size; - /* Max data size */ uint32_t size; diff --git a/platform/linux-generic/odp_packet.c b/platform/linux-generic/odp_packet.c index 68a834a1..3011183d 100644 --- a/platform/linux-generic/odp_packet.c +++ b/platform/linux-generic/odp_packet.c @@ -40,7 +40,6 @@ const _odp_packet_inline_offset_t _odp_packet_inline ODP_ALIGNED_CACHE = { .segcount = offsetof(odp_packet_hdr_t, buf_hdr.segcount), .user_ptr = offsetof(odp_packet_hdr_t, buf_hdr.buf_ctx), .user_area = offsetof(odp_packet_hdr_t, buf_hdr.uarea_addr), - .user_area_size = offsetof(odp_packet_hdr_t, buf_hdr.uarea_size), .flow_hash = offsetof(odp_packet_hdr_t, flow_hash), .timestamp = offsetof(odp_packet_hdr_t, timestamp), .input_flags = offsetof(odp_packet_hdr_t, p.input_flags) @@ -268,7 +267,6 @@ static inline void packet_seg_copy_md(odp_packet_hdr_t *dst, /* buffer header side packet metadata */ dst->buf_hdr.buf_u64 = src->buf_hdr.buf_u64; dst->buf_hdr.uarea_addr = src->buf_hdr.uarea_addr; - dst->buf_hdr.uarea_size = src->buf_hdr.uarea_size; /* segmentation data is not copied: * buf_hdr.seg[] @@ -1168,6 +1166,12 @@ void *odp_packet_offset(odp_packet_t pkt, uint32_t offset, uint32_t *len, * ******************************************************** * */ +uint32_t odp_packet_user_area_size(odp_packet_t pkt) +{ + pool_t *pool = pool_entry_from_hdl(odp_packet_pool(pkt)); + + return pool->params.pkt.uarea_size; +} int odp_packet_input_index(odp_packet_t pkt) { @@ -1744,6 +1748,8 @@ int _odp_packet_copy_md_to_packet(odp_packet_t srcpkt, odp_packet_t dstpkt) { odp_packet_hdr_t *srchdr = packet_hdr(srcpkt); odp_packet_hdr_t *dsthdr = packet_hdr(dstpkt); + uint32_t src_size = odp_packet_user_area_size(srcpkt); + uint32_t dst_size = odp_packet_user_area_size(dstpkt); dsthdr->input = srchdr->input; dsthdr->dst_queue = srchdr->dst_queue; @@ -1752,10 +1758,7 @@ int _odp_packet_copy_md_to_packet(odp_packet_t srcpkt, odp_packet_t dstpkt) srchdr->buf_hdr.uarea_addr != NULL) memcpy(dsthdr->buf_hdr.uarea_addr, srchdr->buf_hdr.uarea_addr, - dsthdr->buf_hdr.uarea_size <= - srchdr->buf_hdr.uarea_size ? - dsthdr->buf_hdr.uarea_size : - srchdr->buf_hdr.uarea_size); + dst_size <= src_size ? dst_size : src_size); copy_packet_parser_metadata(srchdr, dsthdr); @@ -1763,7 +1766,7 @@ int _odp_packet_copy_md_to_packet(odp_packet_t srcpkt, odp_packet_t dstpkt) * user area was truncated in the process. Note this can only * happen when copying between different pools. */ - return dsthdr->buf_hdr.uarea_size < srchdr->buf_hdr.uarea_size; + return dst_size < src_size; } /** diff --git a/platform/linux-generic/pool/generic.c b/platform/linux-generic/pool/generic.c index 520d8a6f..37628b13 100644 --- a/platform/linux-generic/pool/generic.c +++ b/platform/linux-generic/pool/generic.c @@ -237,7 +237,6 @@ static void init_buffers(pool_t *pool) buf_hdr->pool_ptr = pool; buf_hdr->uarea_addr = uarea; /* Show user requested size through API */ - buf_hdr->uarea_size = pool->params.pkt.uarea_size; buf_hdr->segcount = 1; buf_hdr->num_seg = 1; buf_hdr->next_seg = NULL; ----------------------------------------------------------------------- Summary of changes: .../linux-dpdk/include/odp/api/plat/packet_inlines.h | 7 ------- .../include/odp/api/plat/packet_inlines_api.h | 5 ----- platform/linux-dpdk/include/odp_packet_internal.h | 3 --- platform/linux-dpdk/odp_packet.c | 7 ++++++- platform/linux-dpdk/pool/dpdk.c | 4 ---- .../linux-generic/include/odp/api/plat/packet_inlines.h | 6 ------ .../include/odp/api/plat/packet_inlines_api.h | 5 ----- .../linux-generic/include/odp/api/plat/packet_types.h | 2 -- platform/linux-generic/include/odp_buffer_internal.h | 3 --- platform/linux-generic/odp_packet.c | 17 ++++++++++------- platform/linux-generic/pool/generic.c | 1 - 11 files changed, 16 insertions(+), 44 deletions(-) hooks/post-receive --
7 years, 3 months
1
0
0
0
← Newer
1
2
3
4
5
Older →
Jump to page:
1
2
3
4
5
Results per page:
10
25
50
100
200