> -----Original Message----- > From: lng-odp-boun...@lists.linaro.org [mailto:lng-odp- > boun...@lists.linaro.org] On Behalf Of ext Bill Fischofer > Sent: Wednesday, February 18, 2015 10:03 PM > To: lng-odp@lists.linaro.org > Subject: [lng-odp] [PATCHv3 5/5] api: config: simplify packet > configuration > > Remove headroom/tailroom from ODP_CONFIG_PACKET_SEG_LEN_MIN and > clarify meaning of ODP_CONFIG_PACKET_SEG_LEN_MAX. > > Signed-off-by: Bill Fischofer <bill.fischo...@linaro.org> > --- > include/odp/api/config.h | 14 +++----------- > 1 file changed, 3 insertions(+), 11 deletions(-) > > diff --git a/include/odp/api/config.h b/include/odp/api/config.h > index 3ac9e2c..5f211f3 100644 > --- a/include/odp/api/config.h > +++ b/include/odp/api/config.h > @@ -95,25 +95,17 @@ extern "C" { > * This defines the minimum packet segment buffer length in bytes. The > user > * defined segment length (seg_len in odp_pool_param_t) will be rounded > up into > * this value. > - * > - * @internal In linux-generic implementation: > - * - The value MUST be a multiple of 8. > - * - The value MUST be a multiple of ODP_CACHE_LINE_SIZE > - * - The default value (1664) is large enough to support 1536-byte > packets > - * with the default headroom shown above and is a multiple of both 64 > and 128, > - * which are the most common cache line sizes. > */ > -#define ODP_CONFIG_PACKET_SEG_LEN_MIN (1664) > +#define ODP_CONFIG_PACKET_SEG_LEN_MIN (1598) > > /** > * Maximum packet segment length > * > * This defines the maximum packet segment buffer length in bytes. The > user > * defined segment length (seg_len in odp_pool_param_t) must not be > larger than > - * this. > - * > + * this. A value of 0 indicates no upper limit. > */ > -#define ODP_CONFIG_PACKET_SEG_LEN_MAX ODP_CONFIG_PACKET_SEG_LEN_MIN > +#define ODP_CONFIG_PACKET_SEG_LEN_MAX 0
0 doesn't work here since user may want to compare, if (my_seg_len < _SEG_LEN_MAX) ... else ... OR substitute it (use always max seg len) params.pkt.seg_len = _SEG_LEN_MAX; So, it's better to pick a reasonable max number, e.g. 64 kB which would already fit the largest possible UDP datagram (16 bit length) into a single segment. Patches 1-4 are OK. -Petri > > /** > * Maximum packet buffer length > -- > 2.1.0 > > > _______________________________________________ > lng-odp mailing list > lng-odp@lists.linaro.org > http://lists.linaro.org/mailman/listinfo/lng-odp _______________________________________________ lng-odp mailing list lng-odp@lists.linaro.org http://lists.linaro.org/mailman/listinfo/lng-odp