Lines Matching refs:ret

169 	int ret;
171 ret = ioctl(ipv4_nat_cache.ipa_fd, IPA_IOC_ALLOC_NAT_MEM, mem);
172 if (ret != 0) {
174 IPAERR("unable to post nat mem init. Error ;%d\n", ret);
185 * @ret: [out] nearest power of 2
192 int GetNearest2Power(uint16_t num, uint16_t *ret)
196 *ret = 0;
203 *ret = 2;
213 *ret = tmp;
227 * @ret: [out] nearest even number
233 void GetNearestEven(uint16_t num, uint16_t *ret)
237 *ret = 2;
245 *ret = num;
345 uint16_t ret;
382 ret = (uint16_t)cksum;
383 return ret;
407 uint16_t ret = 0;
463 ret = (uint16_t)cksum;
464 return ret;
560 uint32_t ret = 0;
568 ret = (char *)&tbl_ptr[tbl_entry] - (char *)tbl_ptr;
569 ret += cache_ptr->tbl_addr_offset;
570 return ret;
578 uint32_t ret = 0;
588 ret = (char *)&indx_tbl_ptr[indx_tbl_entry] - (char *)indx_tbl_ptr;
589 ret += cache_ptr->tbl_addr_offset;
590 return ret;
648 int ret;
653 ret = ipa_nati_alloc_table(number_of_entries,
657 if (0 != ret) {
666 ret = ipa_nati_update_cache(&mem,
670 if (0 != ret) {
671 IPAERR("unable to update cache Error: %d\n", ret);
679 ret = ipa_nati_post_ipv4_init_cmd(tbl_indx);
680 if (0 != ret) {
681 IPAERR("unable to post nat_init command Error %d\n", ret);
700 int fd = 0, ret;
737 ret = CreateNatDevice(mem);
738 return ret;
755 int ret = 0;
833 ret = ioctl(ipv4_nat_cache.ipa_fd, IPA_IOC_GET_NAT_OFFSET, &nat_mem_offset);
834 if (ret != 0) {
836 IPAERR("unable to post ant offset cmd Error: %d\n", ret);
868 int ret;
887 ret = ioctl(ipv4_nat_cache.ipa_fd, IPA_IOC_V4_INIT_NAT, &cmd);
888 if (ret != 0) {
890 IPAERR("unable to post init cmd Error: %d\n", ret);
904 int ret;
908 ret = -EINVAL;
913 ret = -1;
928 ret = -EINVAL;
936 ret = ioctl(ipv4_nat_cache.ipa_fd, IPA_IOC_V4_DEL_NAT, &del_cmd);
937 if (ret != 0) {
939 IPAERR("unable to post nat del command init Error: %d\n", ret);
941 ret = -EINVAL;
959 ret = -1;
967 return ret;
973 return ret;
1470 int ret = 0;
1509 ret = -EIO;
1518 return ret;
1530 int ret;
1537 ret = -EINVAL;
1542 ret = -1;
1552 ret = -EINVAL;
1564 ret = -EINVAL;
1582 ret = -1;
1590 return ret;
1596 return ret;
1655 int ret = 0, size = 0;
1689 ret = -EINVAL;
1930 ret = -EIO;
2043 return ret;
2278 int cnt = 0, ret = 0;
2283 return ret;
2296 ret++;
2299 if (!ret) {
2303 IPADBG("Number of active base rules: %d\n", ret);
2316 ret++;
2319 if (!ret) {
2323 IPADBG("Number of active base expansion rules: %d\n", ret);
2336 ret++;
2339 if (!ret) {
2343 IPADBG("Number of active index table rules: %d\n", ret);
2356 ret++;
2360 if (!ret)
2363 IPADBG("Number of active index expansion rules: %d\n", ret);
2366 return ret;