diff mbox

linux-gen: dpdk: remove unnecessary rte_pktmbuf_reset() call

Message ID 1464940128-4529-1-git-send-email-matias.elo@nokia.com
State Accepted
Commit 1cafa348a5393eb546618c00eb076f99ee5ebff6
Headers show

Commit Message

Elo, Matias (Nokia - FI/Espoo) June 3, 2016, 7:48 a.m. UTC
rte_pktmbuf_reset() is already called inside
rte_pktmbuf_alloc(), so no need to call it again.

Signed-off-by: Matias Elo <matias.elo@nokia.com>
---
 platform/linux-generic/pktio/dpdk.c | 2 --
 1 file changed, 2 deletions(-)

Comments

Bill Fischofer June 3, 2016, 11:55 a.m. UTC | #1
On Fri, Jun 3, 2016 at 2:48 AM, Matias Elo <matias.elo@nokia.com> wrote:

> rte_pktmbuf_reset() is already called inside
> rte_pktmbuf_alloc(), so no need to call it again.
>
> Signed-off-by: Matias Elo <matias.elo@nokia.com>
>

Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org>


> ---
>  platform/linux-generic/pktio/dpdk.c | 2 --
>  1 file changed, 2 deletions(-)
>
> diff --git a/platform/linux-generic/pktio/dpdk.c
> b/platform/linux-generic/pktio/dpdk.c
> index 831dc26..969c0e8 100644
> --- a/platform/linux-generic/pktio/dpdk.c
> +++ b/platform/linux-generic/pktio/dpdk.c
> @@ -792,8 +792,6 @@ static inline int pkt_to_mbuf(pktio_entry_t
> *pktio_entry,
>                         break;
>                 }
>
> -               rte_pktmbuf_reset(mbuf_table[i]);
> -
>                 data = rte_pktmbuf_append(mbuf_table[i], pkt_len);
>
>                 if (data == NULL) {
> --
> 1.9.1
>
> _______________________________________________
> lng-odp mailing list
> lng-odp@lists.linaro.org
> https://lists.linaro.org/mailman/listinfo/lng-odp
>
Maxim Uvarov June 3, 2016, 5:06 p.m. UTC | #2
Merged with subject name linux-generic. I think we should follow old 
model until we change doc for prefix "l-g:" as we decided on meeting.

Maxim.

On 06/03/16 14:55, Bill Fischofer wrote:
> On Fri, Jun 3, 2016 at 2:48 AM, Matias Elo <matias.elo@nokia.com> wrote:
>
>> rte_pktmbuf_reset() is already called inside
>> rte_pktmbuf_alloc(), so no need to call it again.
>>
>> Signed-off-by: Matias Elo <matias.elo@nokia.com>
>>
> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org>
>
>
>> ---
>>   platform/linux-generic/pktio/dpdk.c | 2 --
>>   1 file changed, 2 deletions(-)
>>
>> diff --git a/platform/linux-generic/pktio/dpdk.c
>> b/platform/linux-generic/pktio/dpdk.c
>> index 831dc26..969c0e8 100644
>> --- a/platform/linux-generic/pktio/dpdk.c
>> +++ b/platform/linux-generic/pktio/dpdk.c
>> @@ -792,8 +792,6 @@ static inline int pkt_to_mbuf(pktio_entry_t
>> *pktio_entry,
>>                          break;
>>                  }
>>
>> -               rte_pktmbuf_reset(mbuf_table[i]);
>> -
>>                  data = rte_pktmbuf_append(mbuf_table[i], pkt_len);
>>
>>                  if (data == NULL) {
>> --
>> 1.9.1
>>
>> _______________________________________________
>> 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
diff mbox

Patch

diff --git a/platform/linux-generic/pktio/dpdk.c b/platform/linux-generic/pktio/dpdk.c
index 831dc26..969c0e8 100644
--- a/platform/linux-generic/pktio/dpdk.c
+++ b/platform/linux-generic/pktio/dpdk.c
@@ -792,8 +792,6 @@  static inline int pkt_to_mbuf(pktio_entry_t *pktio_entry,
 			break;
 		}
 
-		rte_pktmbuf_reset(mbuf_table[i]);
-
 		data = rte_pktmbuf_append(mbuf_table[i], pkt_len);
 
 		if (data == NULL) {