/* Flow Director is an advanced Rx filter, attempting to get Rx flows back to the original CPU that initiated the Tx session. This runs in addition to RSS, so if a packet doesn't match an FDIR filter, we can still spread the Rx load across CPUs using RSS.  */
static bool ixgbe_set_fdir_queues(struct ixgbe_adapter *adapter)
/* Flow Director is an advanced Rx filter, attempting to get Rx flows back to the original CPU that initiated the Tx session. This runs in addition to RSS, so if a packet doesn't match an FDIR filter, we can still spread the Rx load across CPUs using RSS.  */
static bool ixgbe_set_fdir_queues(struct ixgbe_adapter *adapter)
{
	bool ret = false;
	struct ixgbe_ring_feature *f_fdir = &adapter->ring_feature[RING_F_FDIR];
	f_fdir->indices = min((int)num_online_cpus(), f_fdir->indices);
	f_fdir->mask = 0;
	if (adapter->flags & IXGBE_FLAG_RSS_ENABLED &&
	    ((adapter->flags & IXGBE_FLAG_FDIR_HASH_CAPABLE ||
	     (adapter->flags & IXGBE_FLAG_FDIR_PERFECT_CAPABLE)))) {
		adapter->num_tx_queues = f_fdir->indices;
		adapter->num_rx_queues = f_fdir->indices;
		ret = true;
	} else {
		adapter->flags &= ~IXGBE_FLAG_FDIR_HASH_CAPABLE;
		adapter->flags &= ~IXGBE_FLAG_FDIR_PERFECT_CAPABLE;
	}
	return ret;
}