flags |= RSS_MODE_HASH_PORTS << MC_CMD_RSS_CONTEXT_GET_FLAGS_OUT_UDP_IPV4_RSS_MODE_LBN;
        flags |= RSS_MODE_HASH_PORTS << MC_CMD_RSS_CONTEXT_GET_FLAGS_OUT_UDP_IPV6_RSS_MODE_LBN;
        MCDI_SET_DWORD(inbuf, RSS_CONTEXT_SET_FLAGS_IN_FLAGS, flags);
-       efx_mcdi_rpc(efx, MC_CMD_RSS_CONTEXT_SET_FLAGS, inbuf, sizeof(inbuf),
-                    NULL, 0, NULL);
+       if (!efx_mcdi_rpc(efx, MC_CMD_RSS_CONTEXT_SET_FLAGS, inbuf, sizeof(inbuf),
+                         NULL, 0, NULL))
+               /* Succeeded, so UDP 4-tuple is now enabled */
+               efx->rx_hash_udp_4tuple = true;
 }
 
 static int efx_ef10_alloc_rss_context(struct efx_nic *efx, u32 *context,
 
 
                info->data = 0;
                switch (info->flow_type) {
+               case UDP_V4_FLOW:
+                       if (efx->rx_hash_udp_4tuple)
+                               /* fall through */
                case TCP_V4_FLOW:
-                       info->data |= RXH_L4_B_0_1 | RXH_L4_B_2_3;
+                               info->data |= RXH_L4_B_0_1 | RXH_L4_B_2_3;
                        /* fall through */
-               case UDP_V4_FLOW:
                case SCTP_V4_FLOW:
                case AH_ESP_V4_FLOW:
                case IPV4_FLOW:
                        info->data |= RXH_IP_SRC | RXH_IP_DST;
                        min_revision = EFX_REV_FALCON_B0;
                        break;
+               case UDP_V6_FLOW:
+                       if (efx->rx_hash_udp_4tuple)
+                               /* fall through */
                case TCP_V6_FLOW:
-                       info->data |= RXH_L4_B_0_1 | RXH_L4_B_2_3;
+                               info->data |= RXH_L4_B_0_1 | RXH_L4_B_2_3;
                        /* fall through */
-               case UDP_V6_FLOW:
                case SCTP_V6_FLOW:
                case AH_ESP_V6_FLOW:
                case IPV6_FLOW:
 
  * @rx_hash_key: Toeplitz hash key for RSS
  * @rx_indir_table: Indirection table for RSS
  * @rx_scatter: Scatter mode enabled for receives
+ * @rx_hash_udp_4tuple: UDP 4-tuple hashing enabled
  * @int_error_count: Number of internal errors seen recently
  * @int_error_expire: Time at which error count will be expired
  * @irq_soft_enabled: Are IRQs soft-enabled? If not, IRQ handler will
        u8 rx_hash_key[40];
        u32 rx_indir_table[128];
        bool rx_scatter;
+       bool rx_hash_udp_4tuple;
 
        unsigned int_error_count;
        unsigned long int_error_expire;