#include "ecore.h"
#include "ecore_hw.h"
#include "ecore_iov_api.h"
+#include "ecore_mcp_api.h"
+#include "ecore_l2_api.h"
+
unsigned long qede_log2_align(unsigned long n)
{
}
*phys = mz->phys_addr;
DP_VERBOSE(p_dev, ECORE_MSG_PROBE,
- "size=%zu phys=0x%lx virt=%p on socket=%u\n",
+ "size=%zu phys=0x%" PRIx64 " virt=%p on socket=%u\n",
mz->len, mz->phys_addr, mz->addr, socket_id);
return mz->addr;
}
}
*phys = mz->phys_addr;
DP_VERBOSE(p_dev, ECORE_MSG_PROBE,
- "aligned memory size=%zu phys=0x%lx virt=%p core=%d\n",
+ "aligned memory size=%zu phys=0x%" PRIx64 " virt=%p core=%d\n",
mz->len, mz->phys_addr, mz->addr, core_id);
return mz->addr;
}
return p_hwfn->stream->total_out / 4;
}
+
+void
+qede_get_mcp_proto_stats(struct ecore_dev *edev,
+ enum ecore_mcp_protocol_type type,
+ union ecore_mcp_protocol_stats *stats)
+{
+ struct ecore_eth_stats lan_stats;
+
+ if (type == ECORE_MCP_LAN_STATS) {
+ ecore_get_vport_stats(edev, &lan_stats);
+ stats->lan_stats.ucast_rx_pkts = lan_stats.rx_ucast_pkts;
+ stats->lan_stats.ucast_tx_pkts = lan_stats.tx_ucast_pkts;
+ stats->lan_stats.fcs_err = -1;
+ } else {
+ DP_INFO(edev, "Statistics request type %d not supported\n",
+ type);
+ }
+}