Commit 9dc6b116 authored by Jakub Kicinski's avatar Jakub Kicinski Committed by David S. Miller

nfp: use dp to carry xdp_prog at reconfig time

Use xdp_prog member of data path struct to carry the xdp_prog to
alloc/free free functions.
Signed-off-by: default avatarJakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 76e1e1a8
...@@ -815,7 +815,6 @@ nfp_net_irqs_assign(struct nfp_net *nn, struct msix_entry *irq_entries, ...@@ -815,7 +815,6 @@ nfp_net_irqs_assign(struct nfp_net *nn, struct msix_entry *irq_entries,
struct nfp_net_dp *nfp_net_clone_dp(struct nfp_net *nn); struct nfp_net_dp *nfp_net_clone_dp(struct nfp_net *nn);
int int
nfp_net_ring_reconfig(struct nfp_net *nn, struct nfp_net_dp *new, nfp_net_ring_reconfig(struct nfp_net *nn, struct nfp_net_dp *new,
struct bpf_prog **xdp_prog,
struct nfp_net_ring_set *rx, struct nfp_net_ring_set *tx); struct nfp_net_ring_set *rx, struct nfp_net_ring_set *tx);
#ifdef CONFIG_NFP_DEBUG #ifdef CONFIG_NFP_DEBUG
......
...@@ -206,8 +206,7 @@ static int nfp_net_set_ring_size(struct nfp_net *nn, u32 rxd_cnt, u32 txd_cnt) ...@@ -206,8 +206,7 @@ static int nfp_net_set_ring_size(struct nfp_net *nn, u32 rxd_cnt, u32 txd_cnt)
if (!dp) if (!dp)
return -ENOMEM; return -ENOMEM;
return nfp_net_ring_reconfig(nn, dp, &nn->dp.xdp_prog, return nfp_net_ring_reconfig(nn, dp, reconfig_rx, reconfig_tx);
reconfig_rx, reconfig_tx);
} }
static int nfp_net_set_ringparam(struct net_device *netdev, static int nfp_net_set_ringparam(struct net_device *netdev,
...@@ -791,8 +790,7 @@ static int nfp_net_set_num_rings(struct nfp_net *nn, unsigned int total_rx, ...@@ -791,8 +790,7 @@ static int nfp_net_set_num_rings(struct nfp_net *nn, unsigned int total_rx,
if (!dp) if (!dp)
return -ENOMEM; return -ENOMEM;
return nfp_net_ring_reconfig(nn, dp, &nn->dp.xdp_prog, return nfp_net_ring_reconfig(nn, dp, reconfig_rx, reconfig_tx);
reconfig_rx, reconfig_tx);
} }
static int nfp_net_set_channels(struct net_device *netdev, static int nfp_net_set_channels(struct net_device *netdev,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment