From: Doron Roberts-Kedes <[email protected]>
Date: Tue, 7 Aug 2018 11:09:39 -0700
> +static int __skb_nsg(struct sk_buff *skb, int offset, int len,
> + unsigned int recursion_level)
> +{
> + int start = skb_headlen(skb);
> + int i, copy = start - offset;
> + struct sk_buff *frag_iter;
> + int elt = 0;
> +
> + if (unlikely(recursion_level >= 24))
> + return -EMSGSIZE;
This recursion is kinda crazy.
Even skb_cow_data() doesn't recurse like this (of course because it copies
into linear buffers).
There has to be a way to simplify this. Fragment lists are such a rarely
used SKB geometry, and few if any devices support it for transmission
(so the fraglist will get undone at transmit time anyways).
> + // We need one extra for ctx->rx_aad_ciphertext
Please do not use C++ style comments in code.
Thanks.