net/qede: change copyright info to Cavium
[dpdk.git] / drivers / net / qede / base / ecore_vf.c
index 9ad986c..b7b3b87 100644 (file)
@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 2016 QLogic Corporation.
+ * Copyright (c) 2016 - 2018 Cavium Inc.
  * All rights reserved.
- * www.qlogic.com
+ * www.cavium.com
  *
  * See LICENSE.qede_pmd for copyright and licensing details.
  */
@@ -65,6 +65,14 @@ static void ecore_vf_pf_req_end(struct ecore_hwfn *p_hwfn,
        OSAL_MUTEX_RELEASE(&p_hwfn->vf_iov_info->mutex);
 }
 
+#ifdef CONFIG_ECORE_SW_CHANNEL
+/* The SW channel implementation of Windows needs to know the 'exact'
+ * response size of any given message. That means that for future
+ * messages we'd be unable to send TLVs to PF if he'll be unable to
+ * answer them if the |response| != |default response|.
+ * We'd need to handshake in acquire capabilities for any such.
+ */
+#endif
 static enum _ecore_status_t
 ecore_send_msg2pf(struct ecore_hwfn *p_hwfn,
                  u8 *done, u32 resp_size)
@@ -122,14 +130,20 @@ ecore_send_msg2pf(struct ecore_hwfn *p_hwfn,
        }
 
        if (!*done) {
-               DP_VERBOSE(p_hwfn, ECORE_MSG_IOV,
-                          "VF <-- PF Timeout [Type %d]\n",
-                          p_req->first_tlv.tl.type);
+               DP_NOTICE(p_hwfn, true,
+                         "VF <-- PF Timeout [Type %d]\n",
+                         p_req->first_tlv.tl.type);
                rc = ECORE_TIMEOUT;
        } else {
-               DP_VERBOSE(p_hwfn, ECORE_MSG_IOV,
-                          "PF response: %d [Type %d]\n",
-                          *done, p_req->first_tlv.tl.type);
+               if ((*done != PFVF_STATUS_SUCCESS) &&
+                   (*done != PFVF_STATUS_NO_RESOURCE))
+                       DP_NOTICE(p_hwfn, false,
+                                 "PF response: %d [Type %d]\n",
+                                 *done, p_req->first_tlv.tl.type);
+               else
+                       DP_VERBOSE(p_hwfn, ECORE_MSG_IOV,
+                                  "PF response: %d [Type %d]\n",
+                                  *done, p_req->first_tlv.tl.type);
        }
 
        return rc;
@@ -1261,8 +1275,7 @@ ecore_vf_pf_vport_update(struct ecore_hwfn *p_hwfn,
                resp_size += sizeof(struct pfvf_def_resp_tlv);
 
                OSAL_MEMCPY(p_mcast_tlv->bins, p_params->bins,
-                           sizeof(unsigned long) *
-                           ETH_MULTICAST_MAC_BINS_IN_REGS);
+                           sizeof(u32) * ETH_MULTICAST_MAC_BINS_IN_REGS);
        }
 
        update_rx = p_params->accept_flags.update_rx_mode_config;
@@ -1371,6 +1384,12 @@ ecore_vf_pf_vport_update(struct ecore_hwfn *p_hwfn,
                if (sge_tpa_params->tpa_gro_consistent_flg)
                        p_sge_tpa_tlv->sge_tpa_flags |=
                            VFPF_TPA_GRO_CONSIST_FLAG;
+               if (sge_tpa_params->tpa_ipv4_tunn_en_flg)
+                       p_sge_tpa_tlv->sge_tpa_flags |=
+                           VFPF_TPA_TUNN_IPV4_EN_FLAG;
+               if (sge_tpa_params->tpa_ipv6_tunn_en_flg)
+                       p_sge_tpa_tlv->sge_tpa_flags |=
+                           VFPF_TPA_TUNN_IPV6_EN_FLAG;
 
                p_sge_tpa_tlv->tpa_max_aggs_num =
                    sge_tpa_params->tpa_max_aggs_num;
@@ -1453,7 +1472,7 @@ void ecore_vf_pf_filter_mcast(struct ecore_hwfn *p_hwfn,
                        u32 bit;
 
                        bit = ecore_mcast_bin_from_mac(p_filter_cmd->mac[i]);
-                       OSAL_SET_BIT(bit, sp_params.bins);
+                       sp_params.bins[bit / 32] |= 1 << (bit % 32);
                }
        }