* Increase an ifnet counter. Usually used for counters shared * between the stack and a driver, but function supports them all. */
| 1772 | * between the stack and a driver, but function supports them all. |
| 1773 | */ |
| 1774 | void |
| 1775 | if_inc_counter(struct ifnet *ifp, ift_counter cnt, int64_t inc) |
| 1776 | { |
| 1777 | |
| 1778 | KASSERT(cnt < IFCOUNTERS, ("%s: invalid cnt %d", __func__, cnt)); |
| 1779 | |
| 1780 | counter_u64_add(ifp->if_counters[cnt], inc); |
| 1781 | } |
| 1782 | |
| 1783 | /* |
| 1784 | * Copy data from ifnet to userland API structure if_data. |
no test coverage detected