1

I am developing a kernel module that registers to the receive handler like this:

rx_handler_result_t rxhPacketIn(struct sk_buff **ppkt)

However, when I tried to use this kernel module program with XDP program from XDP-tutorial 1, the kernel module was not involved at all, even when I tried to only pass the packets in the XDP kernel program (return XDP_PASS). So my question is, how XDP kernel program is attached to the kernel, and does it has higher priority than the kernel module registered as a rx_handler ?

Qeole
  • 8,284
  • 1
  • 24
  • 52
Que0Le
  • 84
  • 5

1 Answers1

0

The XDP hook with native driver support is before the sk_buff allocation. It is therefore before your kernel module on the receive path.

pchaigno
  • 11,313
  • 2
  • 29
  • 54
  • Do you see any reason why my kernel module was blocked (probably, by the XDP program) from being activated? – Que0Le Sep 03 '21 at 11:30