<s>
XDP	O
(	O
eXpress	B-Application
Data	I-Application
Path	I-Application
)	O
is	O
an	O
eBPF-based	O
high-performance	O
data	O
path	O
used	O
to	O
send	O
and	O
receive	O
network	B-Protocol
packets	I-Protocol
at	O
high	O
rates	O
by	O
bypassing	O
most	O
of	O
the	O
operating	B-General_Concept
system	I-General_Concept
networking	B-Protocol
stack	I-Protocol
.	O
</s>
<s>
It	O
is	O
merged	O
in	O
the	O
Linux	B-Operating_System
kernel	I-Operating_System
since	O
version	O
4.8	O
.	O
</s>
<s>
This	O
implementation	O
is	O
licensed	O
under	O
GPL	B-License
.	O
</s>
<s>
Large	O
technology	O
firms	O
including	O
Amazon	B-Application
,	O
Google	B-Application
and	O
Intel	O
support	O
its	O
development	O
.	O
</s>
<s>
Microsoft	O
released	O
their	O
free	B-License
and	I-License
open	I-License
source	I-License
implementation	O
XDP	B-Application
for	I-Application
Windows	I-Application
in	O
May	O
2022	O
.	O
</s>
<s>
It	O
is	O
licensed	O
under	O
MIT	B-License
License	I-License
.	O
</s>
<s>
The	O
idea	O
behind	O
XDP	O
is	O
to	O
add	O
an	O
early	O
hook	O
in	O
the	O
RX	O
path	O
of	O
the	O
kernel	B-Operating_System
,	O
and	O
let	O
a	O
user	O
supplied	O
eBPF	B-Protocol
program	O
decide	O
the	O
fate	O
of	O
the	O
packet	B-Protocol
.	O
</s>
<s>
The	O
hook	O
is	O
placed	O
in	O
the	O
network	B-Protocol
interface	I-Protocol
controller	I-Protocol
(	O
NIC	O
)	O
driver	O
just	O
after	O
the	O
interrupt	B-Application
processing	O
,	O
and	O
before	O
any	O
memory	B-General_Concept
allocation	I-General_Concept
needed	O
by	O
the	O
network	B-Protocol
stack	I-Protocol
itself	O
,	O
because	O
memory	B-General_Concept
allocation	I-General_Concept
can	O
be	O
an	O
expensive	O
operation	O
.	O
</s>
<s>
Due	O
to	O
this	O
design	O
,	O
XDP	O
can	O
drop	O
26	O
million	O
packets	B-Protocol
per	O
second	O
per	O
core	O
with	O
commodity	O
hardware	O
.	O
</s>
<s>
The	O
eBPF	B-Protocol
program	O
must	O
pass	O
a	O
preverifier	O
test	O
before	O
being	O
loaded	O
,	O
to	O
avoid	O
executing	O
malicious	O
code	O
in	O
kernel	B-Operating_System
space	O
.	O
</s>
<s>
The	O
program	O
is	O
allowed	O
to	O
edit	O
the	O
packet	B-Protocol
data	I-Protocol
and	O
,	O
after	O
the	O
eBPF	B-Protocol
program	O
returns	O
,	O
an	O
action	O
code	O
determines	O
what	O
to	O
do	O
with	O
the	O
packet	B-Protocol
:	O
</s>
<s>
XDP	O
requires	O
support	O
in	O
the	O
NIC	O
driver	O
but	O
,	O
as	O
not	O
all	O
drivers	O
support	O
it	O
,	O
it	O
can	O
fallback	O
to	O
a	O
generic	O
implementation	O
,	O
which	O
performs	O
the	O
eBPF	B-Protocol
processing	O
in	O
the	O
network	B-Protocol
stack	I-Protocol
,	O
though	O
with	O
slower	O
performance	O
.	O
</s>
<s>
XDP	O
has	O
infrastructure	O
to	O
offload	O
the	O
eBPF	B-Protocol
program	O
to	O
a	O
network	B-Protocol
interface	I-Protocol
controller	I-Protocol
which	O
supports	O
it	O
,	O
reducing	O
the	O
CPU	O
load	O
.	O
</s>
<s>
In	O
2022	O
,	O
many	O
network	B-Protocol
cards	I-Protocol
support	O
it	O
,	O
e.g.	O
</s>
<s>
Netronome	B-General_Concept
,	O
Intel	O
and	O
Mellanox	O
.	O
</s>
<s>
Microsoft	O
is	O
partnering	O
with	O
other	O
companies	O
and	O
adding	O
support	O
for	O
XDP	O
in	O
the	O
MsQuic	B-Language
protocol	O
.	O
</s>
<s>
Along	O
with	O
XDP	O
,	O
a	O
new	O
address	O
family	O
entered	O
in	O
the	O
Linux	B-Operating_System
kernel	I-Operating_System
starting	O
4.18	O
.	O
</s>
<s>
AF_XDP	O
,	O
formerly	O
known	O
as	O
AF_PACKETv4	O
(	O
which	O
was	O
never	O
included	O
in	O
the	O
mainline	O
kernel	B-Operating_System
)	O
,	O
is	O
a	O
raw	O
socket	O
optimized	O
for	O
high	O
performance	O
packet	B-Protocol
processing	O
and	O
allows	O
zero-copy	O
between	O
kernel	B-Operating_System
and	O
applications	O
.	O
</s>
