Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Minor comment merge conflict in mlx5. Staging driver has a fixup due to the skb->xmit_more changes in 'net-next', but was removed in 'net'. Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
@@ -790,6 +790,8 @@ struct i40e_vsi {
|
||||
|
||||
/* VSI specific handlers */
|
||||
irqreturn_t (*irq_handler)(int irq, void *data);
|
||||
|
||||
unsigned long *af_xdp_zc_qps; /* tracks AF_XDP ZC enabled qps */
|
||||
} ____cacheline_internodealigned_in_smp;
|
||||
|
||||
struct i40e_netdev_priv {
|
||||
@@ -1096,20 +1098,6 @@ static inline bool i40e_enabled_xdp_vsi(struct i40e_vsi *vsi)
|
||||
return !!vsi->xdp_prog;
|
||||
}
|
||||
|
||||
static inline struct xdp_umem *i40e_xsk_umem(struct i40e_ring *ring)
|
||||
{
|
||||
bool xdp_on = i40e_enabled_xdp_vsi(ring->vsi);
|
||||
int qid = ring->queue_index;
|
||||
|
||||
if (ring_is_xdp(ring))
|
||||
qid -= ring->vsi->alloc_queue_pairs;
|
||||
|
||||
if (!xdp_on)
|
||||
return NULL;
|
||||
|
||||
return xdp_get_umem_from_qid(ring->vsi->netdev, qid);
|
||||
}
|
||||
|
||||
int i40e_create_queue_channel(struct i40e_vsi *vsi, struct i40e_channel *ch);
|
||||
int i40e_set_bw_limit(struct i40e_vsi *vsi, u16 seid, u64 max_tx_rate);
|
||||
int i40e_add_del_cloud_filter(struct i40e_vsi *vsi,
|
||||
|
@@ -2573,8 +2573,7 @@ static int i40e_set_wol(struct net_device *netdev, struct ethtool_wolinfo *wol)
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
/* only magic packet is supported */
|
||||
if (wol->wolopts && (wol->wolopts != WAKE_MAGIC)
|
||||
| (wol->wolopts != WAKE_FILTER))
|
||||
if (wol->wolopts & ~WAKE_MAGIC)
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
/* is this a new value? */
|
||||
|
@@ -3063,6 +3063,26 @@ static void i40e_config_xps_tx_ring(struct i40e_ring *ring)
|
||||
ring->queue_index);
|
||||
}
|
||||
|
||||
/**
|
||||
* i40e_xsk_umem - Retrieve the AF_XDP ZC if XDP and ZC is enabled
|
||||
* @ring: The Tx or Rx ring
|
||||
*
|
||||
* Returns the UMEM or NULL.
|
||||
**/
|
||||
static struct xdp_umem *i40e_xsk_umem(struct i40e_ring *ring)
|
||||
{
|
||||
bool xdp_on = i40e_enabled_xdp_vsi(ring->vsi);
|
||||
int qid = ring->queue_index;
|
||||
|
||||
if (ring_is_xdp(ring))
|
||||
qid -= ring->vsi->alloc_queue_pairs;
|
||||
|
||||
if (!xdp_on || !test_bit(qid, ring->vsi->af_xdp_zc_qps))
|
||||
return NULL;
|
||||
|
||||
return xdp_get_umem_from_qid(ring->vsi->netdev, qid);
|
||||
}
|
||||
|
||||
/**
|
||||
* i40e_configure_tx_ring - Configure a transmit ring context and rest
|
||||
* @ring: The Tx ring to configure
|
||||
@@ -10064,6 +10084,12 @@ static int i40e_vsi_mem_alloc(struct i40e_pf *pf, enum i40e_vsi_type type)
|
||||
hash_init(vsi->mac_filter_hash);
|
||||
vsi->irqs_ready = false;
|
||||
|
||||
if (type == I40E_VSI_MAIN) {
|
||||
vsi->af_xdp_zc_qps = bitmap_zalloc(pf->num_lan_qps, GFP_KERNEL);
|
||||
if (!vsi->af_xdp_zc_qps)
|
||||
goto err_rings;
|
||||
}
|
||||
|
||||
ret = i40e_set_num_rings_in_vsi(vsi);
|
||||
if (ret)
|
||||
goto err_rings;
|
||||
@@ -10082,6 +10108,7 @@ static int i40e_vsi_mem_alloc(struct i40e_pf *pf, enum i40e_vsi_type type)
|
||||
goto unlock_pf;
|
||||
|
||||
err_rings:
|
||||
bitmap_free(vsi->af_xdp_zc_qps);
|
||||
pf->next_vsi = i - 1;
|
||||
kfree(vsi);
|
||||
unlock_pf:
|
||||
@@ -10162,6 +10189,7 @@ static int i40e_vsi_clear(struct i40e_vsi *vsi)
|
||||
i40e_put_lump(pf->qp_pile, vsi->base_queue, vsi->idx);
|
||||
i40e_put_lump(pf->irq_pile, vsi->base_vector, vsi->idx);
|
||||
|
||||
bitmap_free(vsi->af_xdp_zc_qps);
|
||||
i40e_vsi_free_arrays(vsi, true);
|
||||
i40e_clear_rss_config_user(vsi);
|
||||
|
||||
|
@@ -146,12 +146,13 @@ static int i40e_ptp_adjfreq(struct ptp_clock_info *ptp, s32 ppb)
|
||||
static int i40e_ptp_adjtime(struct ptp_clock_info *ptp, s64 delta)
|
||||
{
|
||||
struct i40e_pf *pf = container_of(ptp, struct i40e_pf, ptp_caps);
|
||||
struct timespec64 now;
|
||||
struct timespec64 now, then;
|
||||
|
||||
then = ns_to_timespec64(delta);
|
||||
mutex_lock(&pf->tmreg_lock);
|
||||
|
||||
i40e_ptp_read(pf, &now, NULL);
|
||||
timespec64_add_ns(&now, delta);
|
||||
now = timespec64_add(now, then);
|
||||
i40e_ptp_write(pf, (const struct timespec64 *)&now);
|
||||
|
||||
mutex_unlock(&pf->tmreg_lock);
|
||||
|
@@ -102,6 +102,8 @@ static int i40e_xsk_umem_enable(struct i40e_vsi *vsi, struct xdp_umem *umem,
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
set_bit(qid, vsi->af_xdp_zc_qps);
|
||||
|
||||
if_running = netif_running(vsi->netdev) && i40e_enabled_xdp_vsi(vsi);
|
||||
|
||||
if (if_running) {
|
||||
@@ -148,6 +150,7 @@ static int i40e_xsk_umem_disable(struct i40e_vsi *vsi, u16 qid)
|
||||
return err;
|
||||
}
|
||||
|
||||
clear_bit(qid, vsi->af_xdp_zc_qps);
|
||||
i40e_xsk_umem_dma_unmap(vsi, umem);
|
||||
|
||||
if (if_running) {
|
||||
|
Reference in New Issue
Block a user