compress/qat: enable compression on GEN3
[dpdk.git] / drivers / net / enic / base / vnic_dev.c
index aaca07c..526273c 100644 (file)
@@ -1320,3 +1320,27 @@ int vnic_dev_capable_geneve(struct vnic_dev *vdev)
        ret = vnic_dev_cmd(vdev, CMD_GET_SUPP_FEATURE_VER, &a0, &a1, wait);
        return ret == 0 && (a1 & FEATURE_GENEVE_OPTIONS);
 }
+
+uint64_t vnic_dev_capable_cq_entry_size(struct vnic_dev *vdev)
+{
+       uint64_t a0 = CMD_CQ_ENTRY_SIZE_SET;
+       uint64_t a1 = 0;
+       int wait = 1000;
+       int ret;
+
+       ret = vnic_dev_cmd(vdev, CMD_CAPABILITY, &a0, &a1, wait);
+       /* All models support 16B CQ entry by default */
+       if (!(ret == 0 && a0 == 0))
+               a1 = VNIC_RQ_CQ_ENTRY_SIZE_16_CAPABLE;
+       return a1;
+}
+
+int vnic_dev_set_cq_entry_size(struct vnic_dev *vdev, uint32_t rq_idx,
+                              uint32_t size_flag)
+{
+       uint64_t a0 = rq_idx;
+       uint64_t a1 = size_flag;
+       int wait = 1000;
+
+       return vnic_dev_cmd(vdev, CMD_CQ_ENTRY_SIZE_SET, &a0, &a1, wait);
+}