- if (spec_filter->rss) {
- unsigned int rss_spread = MIN(flow_rss->rxq_hw_index_max -
- flow_rss->rxq_hw_index_min + 1,
- EFX_MAXRSS);
+ create_context = spec_filter->rss || (spec_filter->rss_hash_required &&
+ rss->dummy_rss_context == EFX_RSS_CONTEXT_DEFAULT);
+
+ if (create_context) {
+ unsigned int rss_spread;
+ unsigned int rss_hash_types;
+ uint8_t *rss_key;
+
+ if (spec_filter->rss) {
+ rss_spread = MIN(flow_rss->rxq_hw_index_max -
+ flow_rss->rxq_hw_index_min + 1,
+ EFX_MAXRSS);
+ rss_hash_types = flow_rss->rss_hash_types;
+ rss_key = flow_rss->rss_key;
+ } else {
+ /*
+ * Initialize dummy RSS context parameters to have
+ * valid RSS hash. Use default RSS hash function and
+ * key.
+ */
+ rss_spread = 1;
+ rss_hash_types = rss->hash_types;
+ rss_key = rss->key;
+ }