>  int
> -rte_ipsec_sad_lookup(__rte_unused const struct rte_ipsec_sad *sad,
> -             __rte_unused const union rte_ipsec_sad_key *keys[],
> -             __rte_unused void *sa[], __rte_unused uint32_t n)
> +rte_ipsec_sad_lookup(const struct rte_ipsec_sad *sad,
> +             const union rte_ipsec_sad_key *keys[], void *sa[], uint32_t n)
>  {
> -     return -ENOTSUP;
> +     uint32_t num, i = 0;
> +     int found = 0;
> +
> +     if (unlikely((sad == NULL) || (keys == NULL) || (sa == NULL)))
> +             return -EINVAL;
> +
> +     do {
> +             num = RTE_MIN(n - i,
> (uint32_t)RTE_HASH_LOOKUP_BULK_MAX);
> +             found += __ipsec_sad_lookup(sad,
> +                     &keys[i], &sa[i], num);
> +             i += num;
> +     } while (i != n);
> +
> +     return found;
>  }
rte_ipsec_sad_lookup should return 0 or a negative value as per the comments in 
the declaration.
But here it is returning more than 0. Something is not correct here.


> --
> 2.7.4

Reply via email to