[Intel-wired-lan] [PATCH v4 4/4] i40e: Validate xdp_adjust_head support

Björn Töpel bjorn.topel at gmail.com
Sat Dec 17 13:40:00 UTC 2016


From: Björn Töpel <bjorn.topel at intel.com>

This patch will tell the user that bpf_xdp_adjust_head() is currently
not supported.

Signed-off-by: Björn Töpel <bjorn.topel at intel.com>
---
 drivers/net/ethernet/intel/i40e/i40e_main.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c
index efb95fb851f4..94eed585a01b 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_main.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
@@ -9545,6 +9545,9 @@ static int i40e_xdp_setup(struct i40e_vsi *vsi,
 	bool need_reset;
 	struct bpf_prog *old_prog;
 
+	if (prog && prog->xdp_adjust_head)
+		return -EOPNOTSUPP;
+
 	/* The Rx frame has to fit in 2k */
 	if (frame_size > I40E_RXBUFFER_2048)
 		return -EINVAL;
-- 
2.9.3



More information about the Intel-wired-lan mailing list