net.c (762f99f4f3cb41a775b5157dd761217beba65873) net.c (74a335a07a17d131b9263bfdbdcb5e40673ca9ca)
1// SPDX-License-Identifier: GPL-2.0-only
2/* Copyright (C) 2009 Red Hat, Inc.
3 * Author: Michael S. Tsirkin <mst@redhat.com>
4 *
5 * virtio-net server in host kernel.
6 */
7
8#include <linux/compat.h>

--- 459 unchanged lines hidden (view full) ---

468 .ptr = nvq->xdp,
469 };
470 int i, err;
471
472 if (nvq->batched_xdp == 0)
473 goto signal_used;
474
475 msghdr->msg_control = &ctl;
1// SPDX-License-Identifier: GPL-2.0-only
2/* Copyright (C) 2009 Red Hat, Inc.
3 * Author: Michael S. Tsirkin <mst@redhat.com>
4 *
5 * virtio-net server in host kernel.
6 */
7
8#include <linux/compat.h>

--- 459 unchanged lines hidden (view full) ---

468 .ptr = nvq->xdp,
469 };
470 int i, err;
471
472 if (nvq->batched_xdp == 0)
473 goto signal_used;
474
475 msghdr->msg_control = &ctl;
476 msghdr->msg_controllen = sizeof(ctl);
476 err = sock->ops->sendmsg(sock, msghdr, 0);
477 if (unlikely(err < 0)) {
478 vq_err(&nvq->vq, "Fail to batch sending packets\n");
479
480 /* free pages owned by XDP; since this is an unlikely error path,
481 * keep it simple and avoid more complex bulk update for the
482 * used pages
483 */

--- 1327 unchanged lines hidden ---
477 err = sock->ops->sendmsg(sock, msghdr, 0);
478 if (unlikely(err < 0)) {
479 vq_err(&nvq->vq, "Fail to batch sending packets\n");
480
481 /* free pages owned by XDP; since this is an unlikely error path,
482 * keep it simple and avoid more complex bulk update for the
483 * used pages
484 */

--- 1327 unchanged lines hidden ---