- for (parif = 0; parif < TF_DEV_P58_PARIF_MAX; parif++) {
- if (parif_bitmask & (1UL << parif)) {
- if (parif < 8) {
- shift = 4 * parif;
- parif_pf_mask[0] |= TF_DEV_P58_PF_MASK << shift;
- parif_pf[0] |= pf << shift;
- } else {
- shift = 4 * (parif - 8);
- parif_pf_mask[1] |= TF_DEV_P58_PF_MASK << shift;
- parif_pf[1] |= pf << shift;
- }
- }
+/**
+ * Device specific function that retrieves the increment
+ * required for certain table types in a shared session
+ *
+ * [in] tfp
+ * tf handle
+ *
+ * [in/out] parms
+ * pointer to parms structure
+ *
+ * Returns
+ * - (0) if successful.
+ * - (-EINVAL) on failure.
+ */
+static int tf_dev_p58_get_shared_tbl_increment(struct tf *tfp __rte_unused,
+ struct tf_get_shared_tbl_increment_parms *parms)
+{
+ switch (parms->type) {
+ case TF_TBL_TYPE_FULL_ACT_RECORD:
+ case TF_TBL_TYPE_COMPACT_ACT_RECORD:
+ case TF_TBL_TYPE_ACT_ENCAP_8B:
+ case TF_TBL_TYPE_ACT_ENCAP_16B:
+ case TF_TBL_TYPE_ACT_ENCAP_32B:
+ case TF_TBL_TYPE_ACT_ENCAP_64B:
+ case TF_TBL_TYPE_ACT_SP_SMAC:
+ case TF_TBL_TYPE_ACT_SP_SMAC_IPV4:
+ case TF_TBL_TYPE_ACT_SP_SMAC_IPV6:
+ case TF_TBL_TYPE_ACT_STATS_64:
+ case TF_TBL_TYPE_ACT_MODIFY_IPV4:
+ case TF_TBL_TYPE_ACT_MODIFY_8B:
+ case TF_TBL_TYPE_ACT_MODIFY_16B:
+ case TF_TBL_TYPE_ACT_MODIFY_32B:
+ case TF_TBL_TYPE_ACT_MODIFY_64B:
+ parms->increment_cnt = 8;
+ break;
+ default:
+ parms->increment_cnt = 1;
+ break;