/* Get memory to put this msg */
for (idx = 0; idx < rss->rss_size; idx++) {
/* Ignore the queue if AF_XDP zero copy is enabled */
- if (test_bit(ind_tbl[idx], pfvf->af_xdp_zc_qidx))
+ if (pfvf->af_xdp_zc_qidx &&
+ test_bit(ind_tbl[idx], pfvf->af_xdp_zc_qidx))
continue;
aq = otx2_mbox_alloc_msg_nix_aq_enq(mbox);
if (type != AURA_NIX_RQ)
return 0;
- if (!test_bit(pool_id, pfvf->af_xdp_zc_qidx)) {
+ if (!pfvf->af_xdp_zc_qidx ||
+ !test_bit(pool_id, pfvf->af_xdp_zc_qidx)) {
pp_params.order = get_order(buf_size);
pp_params.flags = PP_FLAG_DMA_MAP;
pp_params.pool_size = min(OTX2_PAGE_POOL_SZ, numptrs);
for (idx = 0; idx < rss->rss_size; idx++) {
/* Ignore if the rx queue is AF_XDP zero copy enabled */
- if (test_bit(rss->ind_tbl[idx], pfvf->af_xdp_zc_qidx))
+ if (pfvf->af_xdp_zc_qidx &&
+ test_bit(rss->ind_tbl[idx], pfvf->af_xdp_zc_qidx))
continue;
indir[idx] = rss->ind_tbl[idx];
}
void otx2_attach_xsk_buff(struct otx2_nic *pfvf, struct otx2_snd_queue *sq, int qidx)
{
- if (test_bit(qidx, pfvf->af_xdp_zc_qidx))
+ if (pfvf->af_xdp_zc_qidx &&
+ test_bit(qidx, pfvf->af_xdp_zc_qidx))
sq->xsk_pool = xsk_get_pool_from_qid(pfvf->netdev, qidx);
}