luigirizzo / netmap

Automatically exported from code.google.com/p/netmap
BSD 2-Clause "Simplified" License
1.86k stars 537 forks source link

i4oe driver in version 2.19.3 overflow when bitrate get up of peta bytes #931

Open mohammadkhanjani opened 1 year ago

mohammadkhanjani commented 1 year ago

In i40e, overflows when stat->rx_discards. I check new version of i40e and patch of netmap but this problem exists:

static void i40e_stats_update_rx_discards(struct i40e_vsi *vsi,
            struct i40e_hw *hw, int stat_idx, bool offset_loaded,
            struct i40e_eth_stats *stat_offset,
            struct i40e_eth_stats *stat)
{
    u64 rx_rdpc, rx_rxerr;

    i40e_stat_update32(hw, I40E_GLV_RDPC(stat_idx), offset_loaded,
               &stat_offset->rx_discards, &rx_rdpc);
    i40e_stat_update64(hw,
               I40E_GL_RXERR1H(i40e_compute_pci_to_hw_id(vsi, hw)),
               I40E_GL_RXERR1L(i40e_compute_pci_to_hw_id(vsi, hw)),
               offset_loaded, &stat_offset->rx_discards_other,
               &rx_rxerr);

    stat->rx_discards = rx_rdpc + rx_rxerr;
}