Skip to content

Commit fd3c040

Browse files
committed
Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next
Daniel Borkmann says: ==================== pull-request: bpf-next 2018-09-01 The following pull-request contains BPF updates for your *net-next* tree. The main changes are: 1) Add AF_XDP zero-copy support for i40e driver (!), from Björn and Magnus. 2) BPF verifier improvements by giving each register its own liveness chain which allows to simplify and getting rid of skip_callee() logic, from Edward. 3) Add bpf fs pretty print support for percpu arraymap, percpu hashmap and percpu lru hashmap. Also add generic percpu formatted print on bpftool so the same can be dumped there, from Yonghong. 4) Add bpf_{set,get}sockopt() helper support for TCP_SAVE_SYN and TCP_SAVED_SYN options to allow reflection of tos/tclass from received SYN packet, from Nikita. 5) Misc improvements to the BPF sockmap test cases in terms of cgroup v2 interaction and removal of incorrect shutdown() calls, from John. 6) Few cleanups in xdp_umem_assign_dev() and xdpsock samples, from Prashant. ==================== Signed-off-by: David S. Miller <[email protected]>
2 parents ee713b6 + 93ee30f commit fd3c040

33 files changed

+2067
-376
lines changed

drivers/net/ethernet/intel/i40e/Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ i40e-objs := i40e_main.o \
2222
i40e_txrx.o \
2323
i40e_ptp.o \
2424
i40e_client.o \
25-
i40e_virtchnl_pf.o
25+
i40e_virtchnl_pf.o \
26+
i40e_xsk.o
2627

2728
i40e-$(CONFIG_I40E_DCB) += i40e_dcb.o i40e_dcb_nl.o

drivers/net/ethernet/intel/i40e/i40e.h

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -786,6 +786,11 @@ struct i40e_vsi {
786786

787787
/* VSI specific handlers */
788788
irqreturn_t (*irq_handler)(int irq, void *data);
789+
790+
/* AF_XDP zero-copy */
791+
struct xdp_umem **xsk_umems;
792+
u16 num_xsk_umems_used;
793+
u16 num_xsk_umems;
789794
} ____cacheline_internodealigned_in_smp;
790795

791796
struct i40e_netdev_priv {
@@ -1090,6 +1095,20 @@ static inline bool i40e_enabled_xdp_vsi(struct i40e_vsi *vsi)
10901095
return !!vsi->xdp_prog;
10911096
}
10921097

1098+
static inline struct xdp_umem *i40e_xsk_umem(struct i40e_ring *ring)
1099+
{
1100+
bool xdp_on = i40e_enabled_xdp_vsi(ring->vsi);
1101+
int qid = ring->queue_index;
1102+
1103+
if (ring_is_xdp(ring))
1104+
qid -= ring->vsi->alloc_queue_pairs;
1105+
1106+
if (!ring->vsi->xsk_umems || !ring->vsi->xsk_umems[qid] || !xdp_on)
1107+
return NULL;
1108+
1109+
return ring->vsi->xsk_umems[qid];
1110+
}
1111+
10931112
int i40e_create_queue_channel(struct i40e_vsi *vsi, struct i40e_channel *ch);
10941113
int i40e_set_bw_limit(struct i40e_vsi *vsi, u16 seid, u64 max_tx_rate);
10951114
int i40e_add_del_cloud_filter(struct i40e_vsi *vsi,

0 commit comments

Comments
 (0)