<html>
    <head>
      <base href="https://bugs.dpdk.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8" class="bz_new_table">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_UNCONFIRMED "
   title="UNCONFIRMED - dpdk_flow_ops_fn api returns error for RSS queue action"
   href="https://bugs.dpdk.org/show_bug.cgi?id=1156">1156</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>dpdk_flow_ops_fn api returns error for RSS queue action
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>DPDK
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>22.03
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>UNCONFIRMED
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>critical
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>Normal
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>other
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>dev@dpdk.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>lthammin@usc.edu
          </td>
        </tr>

        <tr>
          <th>Target Milestone</th>
          <td>---
          </td>
        </tr></table>
      <p>
        <div class="bz_comment_block">
          <pre class="bz_comment_text">Created <span class=""><a href="attachment.cgi?id=238&action=diff" name="attach_238" title="A temporary patch that solves the issue">attachment 238</a> <a href="attachment.cgi?id=238&action=edit" title="A temporary patch that solves the issue">[details]</a></span>
A temporary patch that solves the issue

Hi,

I would like to enable RSS on a set of queues of port through RTE flow. 

For this I am calling dpdk_flow_ops_fn() by setting
  vnet_flow_t flow;

  flow.queue_index = start_queue_id;
  flow.queue_num = end_queue_id - start_queue_id + 1;

  flow.actions |= VNET_FLOW_ACTION_RSS;

But, dpdk_flow_ops_fn() returns VNET_FLOW_ERROR_NOT_SUPPORTED because it fails
the below condition:
  switch (flow->type)
    {
    case VNET_FLOW_TYPE_ETHERNET:
    case VNET_FLOW_TYPE_IP4:
    case VNET_FLOW_TYPE_IP6:
    case VNET_FLOW_TYPE_IP4_N_TUPLE:
    case VNET_FLOW_TYPE_IP6_N_TUPLE:
    case VNET_FLOW_TYPE_IP4_VXLAN:
    case VNET_FLOW_TYPE_IP4_GTPC:
    case VNET_FLOW_TYPE_IP4_GTPU:
    case VNET_FLOW_TYPE_IP4_L2TPV3OIP:
    case VNET_FLOW_TYPE_IP4_IPSEC_ESP:
    case VNET_FLOW_TYPE_IP4_IPSEC_AH:
    case VNET_FLOW_TYPE_GENERIC:
      if ((rv = dpdk_flow_add (xd, flow, fe)))
        goto done;
      break;
    default:
      rv = VNET_FLOW_ERROR_NOT_SUPPORTED;
      goto done;
    }

It fails because flow->type is not one of above. The flow->type is set only if
a valid RTE flow pattern is required for the flow. For, RTE flows with RSS
Queue action, the pattern is not accepted. So, flow->type in this case should
be invalid (VNET_FLOW_TYPE_UNKNOWN).

If we try to program a RTE flow with some pattern and RSS Queue action, we get
below error.
DBGvpp# sh flow int TenGigabitEthernetb5/0/3
supported flow actions   : count mark buffer-advance redirect-to-node
redirect-to-queue rss drop
last DPDK error type     : 15
last DPDK error message  : RSS Queues not supported when pattern specified
DBGvpp#

dpdk_flow_ops_fn() calls dpdk_flow_add(). Note that, even if dpdk_flow_ops_fn()
is bypassed, dpdk_flow_add() still fails because of the below conditions.
  if (FLOW_IS_ETHERNET_CLASS (f))
    flow_class = FLOW_ETHERNET_CLASS;
  else if (FLOW_IS_IPV4_CLASS (f))
    flow_class = FLOW_IPV4_CLASS;
  else if (FLOW_IS_IPV6_CLASS (f))
    flow_class = FLOW_IPV6_CLASS;
  else
    return VNET_FLOW_ERROR_NOT_SUPPORTED;

I have attached a patch that I have been using temporarily. Please check it out
and provide an official patch.

Thanks,
Nikhil
          </pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
      <div itemscope itemtype="http://schema.org/EmailMessage">
        <div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
          
          <link itemprop="url" href="https://bugs.dpdk.org/show_bug.cgi?id=1156">
          <meta itemprop="name" content="View bug">
        </div>
        <meta itemprop="description" content="Bugzilla bug update notification">
      </div>
    </body>
</html>