net/i40e: move RSS to flow API
[dpdk.git] / drivers / net / sfc / base / ef10_rx.c
index 17b1652..85110ef 100644 (file)
@@ -1,31 +1,7 @@
-/*
- * Copyright (c) 2012-2016 Solarflare Communications Inc.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * 1. Redistributions of source code must retain the above copyright notice,
- *    this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright notice,
- *    this list of conditions and the following disclaimer in the documentation
- *    and/or other materials provided with the distribution.
+/* SPDX-License-Identifier: BSD-3-Clause
  *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
- * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * The views and conclusions contained in the software and documentation are
- * those of the authors and should not be interpreted as representing official
- * policies, either expressed or implied, of the FreeBSD Project.
+ * Copyright (c) 2012-2018 Solarflare Communications Inc.
+ * All rights reserved.
  */
 
 #include "efx.h"
@@ -44,6 +20,7 @@ efx_mcdi_init_rxq(
        __in            uint32_t instance,
        __in            efsys_mem_t *esmp,
        __in            boolean_t disable_scatter,
+       __in            boolean_t want_inner_classes,
        __in            uint32_t ps_bufsize)
 {
        efx_nic_cfg_t *encp = &(enp->en_nic_cfg);
@@ -65,7 +42,8 @@ efx_mcdi_init_rxq(
        else
                dma_mode = MC_CMD_INIT_RXQ_EXT_IN_SINGLE_PACKET;
 
-       if (encp->enc_tunnel_encapsulations_supported != 0) {
+       if (encp->enc_tunnel_encapsulations_supported != 0 &&
+           !want_inner_classes) {
                /*
                 * WANT_OUTER_CLASSES can only be specified on hardware which
                 * supports tunnel encapsulation offloads, even though it is
@@ -959,6 +937,7 @@ ef10_rx_qcreate(
        efx_nic_cfg_t *encp = &(enp->en_nic_cfg);
        efx_rc_t rc;
        boolean_t disable_scatter;
+       boolean_t want_inner_classes;
        unsigned int ps_buf_size;
 
        _NOTE(ARGUNUSED(id, erp))
@@ -1037,8 +1016,14 @@ ef10_rx_qcreate(
        else
                disable_scatter = encp->enc_rx_disable_scatter_supported;
 
+       if (flags & EFX_RXQ_FLAG_INNER_CLASSES)
+               want_inner_classes = B_TRUE;
+       else
+               want_inner_classes = B_FALSE;
+
        if ((rc = efx_mcdi_init_rxq(enp, ndescs, eep->ee_index, label, index,
-                   esmp, disable_scatter, ps_buf_size)) != 0)
+                   esmp, disable_scatter, want_inner_classes,
+                   ps_buf_size)) != 0)
                goto fail7;
 
        erp->er_eep = eep;