if (qops->ndo_default_qcfg)
qops->ndo_default_qcfg(dev, &qcfg);
- if (rxq->mp_params.rx_page_size) {
- if (!(qops->supported_params & QCFG_RX_PAGE_SIZE))
- return -EOPNOTSUPP;
+ if (rxq->mp_params.rx_page_size)
qcfg.rx_page_size = rxq->mp_params.rx_page_size;
- }
new_mem = kvzalloc(qops->ndo_queue_mem_size, GFP_KERNEL);
if (!new_mem)
const struct pp_memory_provider_params *p,
struct netlink_ext_ack *extack)
{
+ const struct netdev_queue_mgmt_ops *qops = dev->queue_mgmt_ops;
struct netdev_rx_queue *rxq;
int ret;
NL_SET_ERR_MSG(extack, "unable to custom memory provider to device with XDP program attached");
return -EEXIST;
}
+ if (p->rx_page_size && !(qops->supported_params & QCFG_RX_PAGE_SIZE)) {
+ NL_SET_ERR_MSG(extack, "device does not support: rx_page_size");
+ return -EOPNOTSUPP;
+ }
rxq = __netif_get_rx_queue(dev, rxq_idx);
if (rxq->mp_params.mp_ops) {