Message ID | 1418937709-29434-1-git-send-email-bill.fischofer@linaro.org |
---|---|
State | Accepted |
Commit | f8f50492431f350ea224129ba6c322b23d17f310 |
Headers | show |
On 12/18/2014 11:21 PM, Bill Fischofer wrote: > Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org> > --- > v2 makes requests for packet pools of buf_size > ODP_CONFIG_PACKET_BUF_LEN_MAX > unsegmented Reviewed-and-tested-by: Taras Kondratiuk <taras.kondratiuk@linaro.org> Patches in this series should be renamed.
I see only Patchv2 2/2. Do not see v2 1/2. Was it send? Maxim. On 12/19/2014 12:21 AM, Bill Fischofer wrote: > Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org> > --- > v2 makes requests for packet pools of buf_size > ODP_CONFIG_PACKET_BUF_LEN_MAX > unsegmented > > platform/linux-generic/odp_buffer_pool.c | 7 +++++-- > 1 file changed, 5 insertions(+), 2 deletions(-) > > diff --git a/platform/linux-generic/odp_buffer_pool.c b/platform/linux-generic/odp_buffer_pool.c > index 48be24f..9561c07 100644 > --- a/platform/linux-generic/odp_buffer_pool.c > +++ b/platform/linux-generic/odp_buffer_pool.c > @@ -119,8 +119,8 @@ odp_buffer_pool_t odp_buffer_pool_create(const char *name, > if (params == NULL) > return ODP_BUFFER_POOL_INVALID; > > - /* Restriction for v1.0: All buffers are unsegmented */ > - const int unsegmented = 1; > + /* Restriction for v1.0: All non-packet buffers are unsegmented */ > + int unsegmented = 1; > > /* Restriction for v1.0: No zeroization support */ > const int zeroized = 0; > @@ -163,6 +163,8 @@ odp_buffer_pool_t odp_buffer_pool_create(const char *name, > case ODP_BUFFER_TYPE_ANY: > headroom = ODP_CONFIG_PACKET_HEADROOM; > tailroom = ODP_CONFIG_PACKET_TAILROOM; > + unsegmented = params->buf_size > ODP_CONFIG_PACKET_BUF_LEN_MAX; > + > if (unsegmented) > blk_size = ODP_ALIGN_ROUNDUP( > headroom + params->buf_size + tailroom, > @@ -171,6 +173,7 @@ odp_buffer_pool_t odp_buffer_pool_create(const char *name, > blk_size = ODP_ALIGN_ROUNDUP( > headroom + params->buf_size + tailroom, > ODP_CONFIG_PACKET_BUF_LEN_MIN); > + > buf_stride = params->buf_type == ODP_BUFFER_TYPE_PACKET ? > sizeof(odp_packet_hdr_stride) : > sizeof(odp_any_hdr_stride);
v2 only changed 2/2. 1/2 is unchanged. On Fri, Dec 19, 2014 at 10:09 AM, Maxim Uvarov <maxim.uvarov@linaro.org> wrote: > > I see only Patchv2 2/2. Do not see v2 1/2. Was it send? > > Maxim. > > > On 12/19/2014 12:21 AM, Bill Fischofer wrote: > >> Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org> >> --- >> v2 makes requests for packet pools of buf_size > >> ODP_CONFIG_PACKET_BUF_LEN_MAX >> unsegmented >> >> platform/linux-generic/odp_buffer_pool.c | 7 +++++-- >> 1 file changed, 5 insertions(+), 2 deletions(-) >> >> diff --git a/platform/linux-generic/odp_buffer_pool.c >> b/platform/linux-generic/odp_buffer_pool.c >> index 48be24f..9561c07 100644 >> --- a/platform/linux-generic/odp_buffer_pool.c >> +++ b/platform/linux-generic/odp_buffer_pool.c >> @@ -119,8 +119,8 @@ odp_buffer_pool_t odp_buffer_pool_create(const char >> *name, >> if (params == NULL) >> return ODP_BUFFER_POOL_INVALID; >> - /* Restriction for v1.0: All buffers are unsegmented */ >> - const int unsegmented = 1; >> + /* Restriction for v1.0: All non-packet buffers are unsegmented */ >> + int unsegmented = 1; >> /* Restriction for v1.0: No zeroization support */ >> const int zeroized = 0; >> @@ -163,6 +163,8 @@ odp_buffer_pool_t odp_buffer_pool_create(const char >> *name, >> case ODP_BUFFER_TYPE_ANY: >> headroom = ODP_CONFIG_PACKET_HEADROOM; >> tailroom = ODP_CONFIG_PACKET_TAILROOM; >> + unsegmented = params->buf_size > >> ODP_CONFIG_PACKET_BUF_LEN_MAX; >> + >> if (unsegmented) >> blk_size = ODP_ALIGN_ROUNDUP( >> headroom + params->buf_size + tailroom, >> @@ -171,6 +173,7 @@ odp_buffer_pool_t odp_buffer_pool_create(const char >> *name, >> blk_size = ODP_ALIGN_ROUNDUP( >> headroom + params->buf_size + tailroom, >> ODP_CONFIG_PACKET_BUF_LEN_MIN); >> + >> buf_stride = params->buf_type == ODP_BUFFER_TYPE_PACKET ? >> sizeof(odp_packet_hdr_stride) : >> sizeof(odp_any_hdr_stride); >> > > > _______________________________________________ > lng-odp mailing list > lng-odp@lists.linaro.org > http://lists.linaro.org/mailman/listinfo/lng-odp >
Taras, Bill, might be merge this 2 patches into one? Because sencond patch looks like fix for the first one? Maxim. On 12/19/2014 07:58 PM, Bill Fischofer wrote: > v2 only changed 2/2. 1/2 is unchanged. > > On Fri, Dec 19, 2014 at 10:09 AM, Maxim Uvarov > <maxim.uvarov@linaro.org <mailto:maxim.uvarov@linaro.org>> wrote: > > I see only Patchv2 2/2. Do not see v2 1/2. Was it send? > > Maxim. > > > On 12/19/2014 12:21 AM, Bill Fischofer wrote: > > Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org > <mailto:bill.fischofer@linaro.org>> > --- > v2 makes requests for packet pools of buf_size > > ODP_CONFIG_PACKET_BUF_LEN_MAX > unsegmented > > platform/linux-generic/odp_buffer_pool.c | 7 +++++-- > 1 file changed, 5 insertions(+), 2 deletions(-) > > diff --git a/platform/linux-generic/odp_buffer_pool.c > b/platform/linux-generic/odp_buffer_pool.c > index 48be24f..9561c07 100644 > --- a/platform/linux-generic/odp_buffer_pool.c > +++ b/platform/linux-generic/odp_buffer_pool.c > @@ -119,8 +119,8 @@ odp_buffer_pool_t > odp_buffer_pool_create(const char *name, > if (params == NULL) > return ODP_BUFFER_POOL_INVALID; > - /* Restriction for v1.0: All buffers are unsegmented */ > - const int unsegmented = 1; > + /* Restriction for v1.0: All non-packet buffers are > unsegmented */ > + int unsegmented = 1; > /* Restriction for v1.0: No zeroization support */ > const int zeroized = 0; > @@ -163,6 +163,8 @@ odp_buffer_pool_t > odp_buffer_pool_create(const char *name, > case ODP_BUFFER_TYPE_ANY: > headroom = ODP_CONFIG_PACKET_HEADROOM; > tailroom = ODP_CONFIG_PACKET_TAILROOM; > + unsegmented = params->buf_size > > ODP_CONFIG_PACKET_BUF_LEN_MAX; > + > if (unsegmented) > blk_size = ODP_ALIGN_ROUNDUP( > headroom + params->buf_size + > tailroom, > @@ -171,6 +173,7 @@ odp_buffer_pool_t > odp_buffer_pool_create(const char *name, > blk_size = ODP_ALIGN_ROUNDUP( > headroom + params->buf_size + > tailroom, > ODP_CONFIG_PACKET_BUF_LEN_MIN); > + > buf_stride = params->buf_type == > ODP_BUFFER_TYPE_PACKET ? > sizeof(odp_packet_hdr_stride) : > sizeof(odp_any_hdr_stride); > > > > _______________________________________________ > lng-odp mailing list > lng-odp@lists.linaro.org <mailto:lng-odp@lists.linaro.org> > http://lists.linaro.org/mailman/listinfo/lng-odp >
On 12/19/2014 11:15 PM, Maxim Uvarov wrote: > Taras, Bill, might be merge this 2 patches into one? Because sencond > patch looks like fix for the first one? Logically they are separate changes: First one - prepares pktio code to handle segmented packets. Second - enables segmented packets. But I wouldn't insist much to keep them separate.
diff --git a/platform/linux-generic/odp_buffer_pool.c b/platform/linux-generic/odp_buffer_pool.c index 48be24f..9561c07 100644 --- a/platform/linux-generic/odp_buffer_pool.c +++ b/platform/linux-generic/odp_buffer_pool.c @@ -119,8 +119,8 @@ odp_buffer_pool_t odp_buffer_pool_create(const char *name, if (params == NULL) return ODP_BUFFER_POOL_INVALID; - /* Restriction for v1.0: All buffers are unsegmented */ - const int unsegmented = 1; + /* Restriction for v1.0: All non-packet buffers are unsegmented */ + int unsegmented = 1; /* Restriction for v1.0: No zeroization support */ const int zeroized = 0; @@ -163,6 +163,8 @@ odp_buffer_pool_t odp_buffer_pool_create(const char *name, case ODP_BUFFER_TYPE_ANY: headroom = ODP_CONFIG_PACKET_HEADROOM; tailroom = ODP_CONFIG_PACKET_TAILROOM; + unsegmented = params->buf_size > ODP_CONFIG_PACKET_BUF_LEN_MAX; + if (unsegmented) blk_size = ODP_ALIGN_ROUNDUP( headroom + params->buf_size + tailroom, @@ -171,6 +173,7 @@ odp_buffer_pool_t odp_buffer_pool_create(const char *name, blk_size = ODP_ALIGN_ROUNDUP( headroom + params->buf_size + tailroom, ODP_CONFIG_PACKET_BUF_LEN_MIN); + buf_stride = params->buf_type == ODP_BUFFER_TYPE_PACKET ? sizeof(odp_packet_hdr_stride) : sizeof(odp_any_hdr_stride);
Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org> --- v2 makes requests for packet pools of buf_size > ODP_CONFIG_PACKET_BUF_LEN_MAX unsegmented platform/linux-generic/odp_buffer_pool.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)