Linux now supports attaching BPF programs just before (fentry) and after (fexit) an XDP program.
This allows packets to be captured before and after an XDP program runs, from unmodified XDP programs (no "hook" map).
xdpdump already supports this, but without filtering: https://github.com/xdp-project/xdp-tools/tree/master/xdp-dump/.