34 #ifndef __CVMX_HELPER_UTIL_H__
35 #define __CVMX_HELPER_UTIL_H__
122 static inline int cvmx_helper_get_first_ipd_port(
int interface)
135 static inline int cvmx_helper_get_last_ipd_port(
int interface)
139 return cvmx_helper_get_first_ipd_port(interface) +
149 static inline void cvmx_helper_free_packet_data(cvmx_wqe_t *
work)
156 number_buffers = work->word2.
s.bufs;
157 if (number_buffers == 0)
159 buffer_ptr = work->packet_ptr;
169 start_of_buffer = ((buffer_ptr.s.addr >> 7) - buffer_ptr.s.back) << 7;
170 if (cvmx_ptr_to_phys(work) == start_of_buffer) {
172 *(
union cvmx_buf_ptr *) cvmx_phys_to_ptr(buffer_ptr.s.addr - 8);
173 buffer_ptr = next_buffer_ptr;
177 while (number_buffers--) {
183 ((buffer_ptr.s.addr >> 7) - buffer_ptr.s.back) << 7;
189 *(
union cvmx_buf_ptr *) cvmx_phys_to_ptr(buffer_ptr.s.addr - 8);
190 cvmx_fpa_free(cvmx_phys_to_ptr(start_of_buffer),
191 buffer_ptr.s.pool, 0);
192 buffer_ptr = next_buffer_ptr;