Skip to content

Figure out how to enable XDP on GKE #12105

@brb

Description

@brb

Currently, when installing Cilium with XDP NodePort acceleration on GKE (tried both COS and Ubuntu, also the latest cluster vsn 1.16.9-gke.6), the cilium-agent fails with:

level=warning msg="+ ip -force link set dev eth0 xdpdrv obj bpf_xdp.o sec from-netdev" subsys=datapath-loader
level=warning msg="Error: virtio_net: XDP expects header/data in single page, any_header_sg required." subsys=datapath-loader
level=warning msg="+ RETCODE=2" subsys=datapath-loader
level=warning msg="+ set -e" subsys=datapath-loader
level=warning msg="+ cilium-map-migrate -e bpf_xdp.o -r 2" subsys=datapath-loader
level=warning msg="+ return 2" subsys=datapath-loader

The error comes from https://github.com/torvalds/linux/blob/v4.19/drivers/net/virtio_net.c#L2324. From a quick look, it seems that neither any_header_sg can be enabled nor mergeable_rx_bufs can be disabled via ethtool. According to https://marc.info/?l=xdp-newbies&m=157430733918392&w=2, not setting VIRTIO_F_VERSION_1 should resolve the issue.

/cc @borkmann

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/questionFrequently asked questions & answers. This issue will be linked from the documentation's FAQ.needs/triageThis issue requires triaging to establish severity and next steps.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions