From: Daniel Salzman Date: Thu, 24 Jun 2021 09:18:33 +0000 (+0200) Subject: XDP-TCP: tiny cleanup of handler headers X-Git-Tag: v3.1.0~44^2~7 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bfbc35affa9ddeb3e09f84a5bc2df50b9a730df8;p=thirdparty%2Fknot-dns.git XDP-TCP: tiny cleanup of handler headers --- diff --git a/src/knot/server/udp-handler.h b/src/knot/server/udp-handler.h index eca8ec0215..b09e43e14f 100644 --- a/src/knot/server/udp-handler.h +++ b/src/knot/server/udp-handler.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2020 CZ.NIC, z.s.p.o. +/* Copyright (C) 2021 CZ.NIC, z.s.p.o. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -27,7 +27,6 @@ #include "knot/server/dthreads.h" #define RECVMMSG_BATCHLEN 10 /*!< Default recvmmsg() batch size. */ -#define XDP_BATCHLEN 32 /*! * \brief UDP handler thread runnable. diff --git a/src/knot/server/xdp-handler.c b/src/knot/server/xdp-handler.c index 4d7e2a2049..c5df5bdc3c 100644 --- a/src/knot/server/xdp-handler.c +++ b/src/knot/server/xdp-handler.c @@ -14,21 +14,18 @@ along with this program. If not, see . */ -#include "knot/server/xdp-handler.h" +#ifdef ENABLE_XDP -#include "contrib/ucw/mempool.h" +#include +#include + +#include "knot/server/xdp-handler.h" #include "knot/common/log.h" #include "knot/server/server.h" +#include "contrib/ucw/mempool.h" #include "libknot/error.h" #include "libknot/xdp/tcp.h" -#include -#include - -#define XDP_BATCHLEN 32 // TODO move/dedup - -#ifdef ENABLE_XDP - typedef struct xdp_handle_ctx { knot_xdp_msg_t msg_recv[XDP_BATCHLEN]; knot_xdp_msg_t msg_send_udp[XDP_BATCHLEN]; diff --git a/src/knot/server/xdp-handler.h b/src/knot/server/xdp-handler.h index 7a2561c445..7b9e9a39c1 100644 --- a/src/knot/server/xdp-handler.h +++ b/src/knot/server/xdp-handler.h @@ -21,6 +21,8 @@ #include "knot/query/layer.h" #include "libknot/xdp/xdp.h" +#define XDP_BATCHLEN 32 /*!< XDP receive batch size. */ + struct xdp_handle_ctx; struct server;