Changeset f6ef823a in rtems
- Timestamp:
- 11/13/00 22:58:36 (23 years ago)
- Branches:
- 4.10, 4.11, 4.8, 4.9, 5, master
- Children:
- f5f54cfa
- Parents:
- a44f9ca5
- Location:
- c/src/libchip
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
c/src/libchip/ChangeLog
ra44f9ca5 rf6ef823a 1 2000-11-13 Jiri Gaisler <jgais@ws.estec.esa.nl> 2 3 * network/sonic.c: Added ipalign() routine to align the 4 received packet so that the ip header is on a 32-bit boundary. 5 Necessary for cpu's that do not allow unaligned loads and stores 6 and when the 32-bit DMA mode is used. 7 1 8 2000-11-09 Ralf Corsepius <corsepiu@faw.uni-ulm.de> 2 9 -
c/src/libchip/network/sonic.c
ra44f9ca5 rf6ef823a 887 887 888 888 } 889 890 #ifdef CPU_U32_FIX 891 892 /* 893 * Routine to align the received packet so that the ip header 894 * is on a 32-bit boundary. Necessary for cpu's that do not 895 * allow unaligned loads and stores and when the 32-bit DMA 896 * mode is used. 897 * 898 * Transfers are done on word basis to avoid possibly slow byte 899 * and half-word writes. 900 */ 901 902 void ipalign(struct mbuf *m) 903 { 904 unsigned int *first, *last, data; 905 unsigned int tmp = 0; 906 907 if ((((int) m->m_data) & 2) && (m->m_len)) { 908 last = (unsigned int *) ((((int) m->m_data) + m->m_len + 8) & ~3); 909 first = (unsigned int *) (((int) m->m_data) & ~3); 910 tmp = *first << 16; 911 first++; 912 do { 913 data = *first; 914 *first = tmp | (data >> 16); 915 tmp = data << 16; 916 first++; 917 } while (first <= last); 918 919 m->m_data = (caddr_t)(((int) m->m_data) + 2); 920 } 921 } 922 #endif 889 923 890 924 /*
Note: See TracChangeset
for help on using the changeset viewer.