Lines Matching defs:seg_size
796 int seg_size, pad;
798 seg_size = sizeof(struct ib_mad) - hdr_len;
799 if (data_len && seg_size) {
800 pad = seg_size - data_len % seg_size;
801 return pad == seg_size ? 0 : pad;
803 return seg_size;
822 int left, seg_size, pad;
824 send_buf->seg_size = sizeof (struct ib_mad) - send_buf->hdr_len;
825 seg_size = send_buf->seg_size;
829 for (left = send_buf->data_len + pad; left > 0; left -= seg_size) {
830 seg = kmalloc(sizeof (*seg) + seg_size, gfp_mask);
834 sizeof (*seg) + seg_size, gfp_mask);
844 memset(seg->data + seg_size - pad, 0, pad);