If the idea of this patch is to test segmented packets it can be
accomplished by allocating packets of size greater than "seg_len" in an
additional test case rather than modifying the segment length in pool
create function.

Regards,
Bala

On 30 June 2015 at 22:26, Stuart Haslam <stuart.has...@linaro.org> wrote:

> On Tue, Jun 30, 2015 at 06:31:41PM +0300, Maxim Uvarov wrote:
> > On 06/30/15 17:45, Stuart Haslam wrote:
> > >On Tue, Jun 30, 2015 at 03:33:53PM +0200, Nicolas Morey-Chaisemartin
> wrote:
> > >>Signed-off-by: Nicolas Morey-Chaisemartin <nmo...@kalray.eu>
> > >Reviewed-by: Stuart Haslam <stuart.has...@linaro.org>
> > >
> > >However this will cause test failures due to bug #1661, so the fix for
> > >that should be merged first.
> > >
> > >>---
> > >>  test/validation/pktio/pktio.c | 4 ++--
> > >>  1 file changed, 2 insertions(+), 2 deletions(-)
> > >>
> > >>diff --git a/test/validation/pktio/pktio.c
> b/test/validation/pktio/pktio.c
> > >>index 82ced5c..b87586a 100644
> > >>--- a/test/validation/pktio/pktio.c
> > >>+++ b/test/validation/pktio/pktio.c
> > >>@@ -208,7 +208,7 @@ static int default_pool_create(void)
> > >>            return -1;
> > >>    memset(&params, 0, sizeof(params));
> > >>-   params.pkt.seg_len = PKT_BUF_SIZE;
> > >>+   params.pkt.seg_len = PKT_BUF_SIZE / 3;
> > comment has to be here.
> > >>    params.pkt.len     = PKT_BUF_SIZE;
> > >>    params.pkt.num     = PKT_BUF_NUM;
> > >>    params.type        = ODP_POOL_PACKET;
> > >>@@ -607,7 +607,7 @@ static int create_pool(const char *iface, int num)
> > >>    odp_pool_param_t params;
> > >>    memset(&params, 0, sizeof(params));
> > >>-   params.pkt.seg_len = PKT_BUF_SIZE;
> > >>+   params.pkt.seg_len = PKT_BUF_SIZE / 3;
> > >>
> > and here. So that is should be clear why seg_len is set to that.
> > Also I'm not sure that all platforms support packet segmentation.
>
> The seg_len parameter is defined as the "Minimum number of packet data
> bytes that are stored in the first segment of a packet.", so presumably
> an implementation that doesn't support segmentation simply rounds it up
> to seg_len == len and everything works.
>
> > So I would prefer separate test for segmentation instead of forcing
> > all test use segmented packets.
>
> It's actually only the jumbo test that may get segmented.
>
> Not that I'm particularly against having a separate test for segmented
> packets, but I don't think it's strictly necessary.
>
> --
> Stuart.
> _______________________________________________
> lng-odp mailing list
> lng-odp@lists.linaro.org
> https://lists.linaro.org/mailman/listinfo/lng-odp
>
_______________________________________________
lng-odp mailing list
lng-odp@lists.linaro.org
https://lists.linaro.org/mailman/listinfo/lng-odp

Reply via email to