0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014 static inline void *cvm_oct_get_buffer_ptr(union cvmx_buf_ptr packet_ptr)
0015 {
0016 return cvmx_phys_to_ptr(((packet_ptr.s.addr >> 7) - packet_ptr.s.back)
0017 << 7);
0018 }
0019
0020
0021
0022
0023
0024
0025
0026 static inline int INTERFACE(int ipd_port)
0027 {
0028 int interface;
0029
0030 if (ipd_port == CVMX_PIP_NUM_INPUT_PORTS)
0031 return 10;
0032 interface = cvmx_helper_get_interface_num(ipd_port);
0033 if (interface >= 0)
0034 return interface;
0035 panic("Illegal ipd_port %d passed to %s\n", ipd_port, __func__);
0036 }
0037
0038
0039
0040
0041
0042
0043
0044 static inline int INDEX(int ipd_port)
0045 {
0046 return cvmx_helper_get_interface_index_num(ipd_port);
0047 }