diff options
author | Xavier Simonart <xavier.simonart@intel.com> | 2019-06-28 16:56:26 +0200 |
---|---|---|
committer | Patrice Buriez <patrice.buriez@intel.com> | 2019-10-10 11:55:44 +0000 |
commit | ae43633b258e3cf53013cfac4643146761f03b9d (patch) | |
tree | a241771c2609ea8656041d50a37322069ff89da2 /VNFs/DPPD-PROX/stats_port.c | |
parent | da4e41a67cca12cc4160a66ca46a37889137fa1e (diff) |
Update PROX to CRC STRIP default bahavior change in DPDK
Change-Id: I7c3e2981692d823c86787b77d61190327d6448e4
Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
Diffstat (limited to 'VNFs/DPPD-PROX/stats_port.c')
-rw-r--r-- | VNFs/DPPD-PROX/stats_port.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/VNFs/DPPD-PROX/stats_port.c b/VNFs/DPPD-PROX/stats_port.c index 7cc36fce..e6210c33 100644 --- a/VNFs/DPPD-PROX/stats_port.c +++ b/VNFs/DPPD-PROX/stats_port.c @@ -286,12 +286,23 @@ static void nic_read_stats(uint8_t port_id) dropped by the nic". Note that in case CRC is stripped on ixgbe, the CRC bytes are not counted. */ +#if defined (DEV_RX_OFFLOAD_CRC_STRIP) if (prox_port_cfg[port_id].requested_rx_offload & DEV_RX_OFFLOAD_CRC_STRIP) stats->rx_bytes = eth_stat.ibytes + (24 * eth_stat.ipackets - 20 * (eth_stat.ierrors + eth_stat.imissed)); else stats->rx_bytes = eth_stat.ibytes + (20 * eth_stat.ipackets - 20 * (eth_stat.ierrors + eth_stat.imissed)); +#else +#if defined (DEV_RX_OFFLOAD_KEEP_CRC) + if (prox_port_cfg[port_id].requested_rx_offload & DEV_RX_OFFLOAD_KEEP_CRC) + stats->rx_bytes = eth_stat.ibytes + + (20 * eth_stat.ipackets - 20 * (eth_stat.ierrors + eth_stat.imissed)); + else + stats->rx_bytes = eth_stat.ibytes + + (24 * eth_stat.ipackets - 20 * (eth_stat.ierrors + eth_stat.imissed)); +#endif +#endif } } else if (strcmp(prox_port_cfg[port_id].short_name, "i40e_vf") == 0) { // For I40E VF, imissed already part of received packets |