Add an interface for the user to notify the kernel that it is done reading
the NET_RX dmabuf pages returned as cmsg. The kernel will drop the
reference on the NET_RX pages to make them available for re-use.
Signed-off-by: Mina Almasry <almasrymina@xxxxxxxxxx>
---
+ for (i = 0; i < num_tokens; i++) {
+ for (j = 0; j < tokens[i].token_count; j++) {
+ struct page *pg = xa_erase(&sk->sk_pagepool,
+ tokens[i].token_start + j);
+
+ if (pg)
+ put_page(pg);
+ else
+ /* -EINTR here notifies the userspace
+ * that not all tokens passed to it have
+ * been freed.
+ */
+ ret = -EINTR;