MCPcopy Create free account
hub / github.com/F-Stack/f-stack / convert_ip6_netmask_to_depth

Function convert_ip6_netmask_to_depth

dpdk/app/graph/ip6_route.c:46–62  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

44}
45
46static uint8_t
47convert_ip6_netmask_to_depth(uint8_t *netmask)
48{
49 uint8_t setbits = 0;
50 uint8_t mask;
51 int i;
52
53 for (i = 0; i < ETHDEV_IPV6_ADDR_LEN; i++) {
54 mask = netmask[i];
55 while (mask & 0x80) {
56 mask = mask << 1;
57 setbits++;
58 }
59 }
60
61 return setbits;
62}
63
64static int
65route6_rewirte_table_update(struct route_ipv6_config *ipv6route)

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected