out_be32(qpcfg.addr_virt[DPAA_PORTAL_CI] + 0x36C0, 0);
}
-struct qman_portal *fsl_qman_fq_portal_create(void)
+struct qman_portal *fsl_qman_fq_portal_create(int *fd)
{
struct qman_portal *portal = NULL;
struct qm_portal_config *q_pcfg;
irq_map.portal_cinh = q_map.addr.cinh;
process_portal_irq_map(q_fd, &irq_map);
+ *fd = q_fd;
return portal;
err:
if (portal)
struct qman_fq_cb cb;
u32 fqid_le;
+ u32 fqid;
+
+ int q_fd;
u16 ch_id;
u8 cgr_groupid;
u8 is_static:4;
volatile unsigned long flags;
enum qman_fq_state state;
- u32 fqid;
spinlock_t fqlock;
struct rb_node node;
*/
int qman_irqsource_add(u32 bits);
+/**
+ * qman_fq_portal_irqsource_add - samilar to qman_irqsource_add, but it
+ * takes portal (fq specific) as input rather than using the thread affined
+ * portal.
+ */
+int qman_fq_portal_irqsource_add(struct qman_portal *p, u32 bits);
+
/**
* qman_irqsource_remove - remove processing sources from being interrupt-driven
* @bits: bitmask of QM_PIRQ_**I processing sources
*/
int qman_irqsource_remove(u32 bits);
+/**
+ * qman_fq_portal_irqsource_remove - similar to qman_irqsource_remove, but it
+ * takes portal (fq specific) as input rather than using the thread affined
+ * portal.
+ */
+int qman_fq_portal_irqsource_remove(struct qman_portal *p, u32 bits);
+
/**
* qman_affine_channel - return the channel ID of an portal
* @cpu: the cpu whose affine portal is the subject of the query
int bman_global_init(void);
/* Direct portal create and destroy */
-struct qman_portal *fsl_qman_fq_portal_create(void);
+struct qman_portal *fsl_qman_fq_portal_create(int *fd);
int fsl_qman_fq_portal_destroy(struct qman_portal *qp);
int fsl_qman_fq_portal_init(struct qman_portal *qp);
};
struct rte_dpaa_driver *driver;
struct dpaa_device_id id;
+ struct rte_intr_handle intr_handle;
enum rte_dpaa_type device_type; /**< Ethernet or crypto type device */
char name[RTE_ETH_NAME_MAX_LEN];
};
fman_if_get_sg_enable(dpaa_intf->fif),
dev->data->dev_conf.rxmode.max_rx_pkt_len);
/* checking if push mode only, no error check for now */
- if (dpaa_push_mode_max_queue > dpaa_push_queue_idx) {
+ if (!rxq->is_static &&
+ dpaa_push_mode_max_queue > dpaa_push_queue_idx) {
struct qman_portal *qp;
+ int q_fd;
dpaa_push_queue_idx++;
opts.we_mask = QM_INITFQ_WE_FQCTRL | QM_INITFQ_WE_CONTEXTA;
rxq->is_static = true;
/* Allocate qman specific portals */
- qp = fsl_qman_fq_portal_create();
+ qp = fsl_qman_fq_portal_create(&q_fd);
if (!qp) {
DPAA_PMD_ERR("Unable to alloc fq portal");
return -1;
}
rxq->qp = qp;
+
+ /* Set up the device interrupt handler */
+ if (!dev->intr_handle) {
+ struct rte_dpaa_device *dpaa_dev;
+ struct rte_device *rdev = dev->device;
+
+ dpaa_dev = container_of(rdev, struct rte_dpaa_device,
+ device);
+ dev->intr_handle = &dpaa_dev->intr_handle;
+ dev->intr_handle->intr_vec = rte_zmalloc(NULL,
+ dpaa_push_mode_max_queue, 0);
+ if (!dev->intr_handle->intr_vec) {
+ DPAA_PMD_ERR("intr_vec alloc failed");
+ return -ENOMEM;
+ }
+ dev->intr_handle->nb_efd = dpaa_push_mode_max_queue;
+ dev->intr_handle->max_intr = dpaa_push_mode_max_queue;
+ }
+
+ dev->intr_handle->type = RTE_INTR_HANDLE_EXT;
+ dev->intr_handle->intr_vec[queue_idx] = queue_idx + 1;
+ dev->intr_handle->efds[queue_idx] = q_fd;
+ rxq->q_fd = q_fd;
}
rxq->bp_array = rte_dpaa_bpid_info;
dev->data->rx_queues[queue_idx] = rxq;