[dpdk-dev] [PATCH v6 07/10] qat_crypto_pmd: Addition of a new QAT DPDK PMD.

Thomas Monjalon thomas.monjalon at 6wind.com
Fri Nov 13 17:00:59 CET 2015


2015-11-10 17:32, Declan Doherty:
> --- a/lib/librte_mbuf_offload/rte_mbuf_offload.h
> +++ b/lib/librte_mbuf_offload/rte_mbuf_offload.h
> @@ -123,17 +123,10 @@ rte_pktmbuf_offload_get(struct rte_mbuf *m, enum rte_mbuf_ol_op_type type)
>  {
>         struct rte_mbuf_offload *ol = m->offload_ops;
>  
> -       if (m->offload_ops != NULL && m->offload_ops->type == type)
> -               return ol;
> -
> -       ol = m->offload_ops;
> -       while (ol != NULL) {
> +       for (ol = m->offload_ops; ol != NULL; ol = ol->next)
>                 if (ol->type == type)
>                         return ol;
>  
> -               ol = ol->next;
> -       }
> -
>         return ol;
>  }

Strange: why changing the code of the previous patch?


More information about the dev mailing list