Lines Matching refs:arp_index
17 int arp_index; in irdma_arp_table() local
26 for (arp_index = 0; (u32)arp_index < rf->arp_table_size; arp_index++) { in irdma_arp_table()
27 if (!memcmp(rf->arp_table[arp_index].ip_addr, ip, sizeof(ip))) in irdma_arp_table()
33 if (arp_index != rf->arp_table_size) { in irdma_arp_table()
34 arp_index = -1; in irdma_arp_table()
38 arp_index = 0; in irdma_arp_table()
40 (u32 *)&arp_index, &rf->next_arp_index)) { in irdma_arp_table()
41 arp_index = -1; in irdma_arp_table()
45 memcpy(rf->arp_table[arp_index].ip_addr, ip, in irdma_arp_table()
46 sizeof(rf->arp_table[arp_index].ip_addr)); in irdma_arp_table()
47 ether_addr_copy(rf->arp_table[arp_index].mac_addr, mac_addr); in irdma_arp_table()
50 if (arp_index == rf->arp_table_size) in irdma_arp_table()
51 arp_index = -1; in irdma_arp_table()
54 if (arp_index == rf->arp_table_size) { in irdma_arp_table()
55 arp_index = -1; in irdma_arp_table()
59 memset(rf->arp_table[arp_index].ip_addr, 0, in irdma_arp_table()
60 sizeof(rf->arp_table[arp_index].ip_addr)); in irdma_arp_table()
61 eth_zero_addr(rf->arp_table[arp_index].mac_addr); in irdma_arp_table()
62 irdma_free_rsrc(rf, rf->allocated_arps, arp_index); in irdma_arp_table()
65 arp_index = -1; in irdma_arp_table()
70 return arp_index; in irdma_arp_table()