Lines Matching refs:buf
75 static inline u16 __mlxsw_item_get16(char *buf, struct mlxsw_item *item, in __mlxsw_item_get16() argument
79 __be16 *b = (__be16 *) buf; in __mlxsw_item_get16()
90 static inline void __mlxsw_item_set16(char *buf, struct mlxsw_item *item, in __mlxsw_item_set16() argument
95 __be16 *b = (__be16 *) buf; in __mlxsw_item_set16()
108 static inline u32 __mlxsw_item_get32(char *buf, struct mlxsw_item *item, in __mlxsw_item_get32() argument
112 __be32 *b = (__be32 *) buf; in __mlxsw_item_get32()
123 static inline void __mlxsw_item_set32(char *buf, struct mlxsw_item *item, in __mlxsw_item_set32() argument
128 __be32 *b = (__be32 *) buf; in __mlxsw_item_set32()
141 static inline u64 __mlxsw_item_get64(char *buf, struct mlxsw_item *item, in __mlxsw_item_get64() argument
145 __be64 *b = (__be64 *) buf; in __mlxsw_item_get64()
156 static inline void __mlxsw_item_set64(char *buf, struct mlxsw_item *item, in __mlxsw_item_set64() argument
160 __be64 *b = (__be64 *) buf; in __mlxsw_item_set64()
173 static inline void __mlxsw_item_memcpy_from(char *buf, char *dst, in __mlxsw_item_memcpy_from() argument
179 memcpy(dst, &buf[offset], item->size.bytes); in __mlxsw_item_memcpy_from()
182 static inline void __mlxsw_item_memcpy_to(char *buf, const char *src, in __mlxsw_item_memcpy_to() argument
188 memcpy(&buf[offset], src, item->size.bytes); in __mlxsw_item_memcpy_to()
215 static inline u8 __mlxsw_item_bit_array_get(char *buf, struct mlxsw_item *item, in __mlxsw_item_bit_array_get() argument
221 tmp = buf[offset]; in __mlxsw_item_bit_array_get()
227 static inline void __mlxsw_item_bit_array_set(char *buf, struct mlxsw_item *item, in __mlxsw_item_bit_array_set() argument
236 tmp = buf[offset]; in __mlxsw_item_bit_array_set()
239 buf[offset] = tmp; in __mlxsw_item_bit_array_set()
257 static inline u16 mlxsw_##_type##_##_cname##_##_iname##_get(char *buf) \
259 return __mlxsw_item_get16(buf, &__ITEM_NAME(_type, _cname, _iname), 0); \
261 static inline void mlxsw_##_type##_##_cname##_##_iname##_set(char *buf, u16 val)\
263 __mlxsw_item_set16(buf, &__ITEM_NAME(_type, _cname, _iname), 0, val); \
278 mlxsw_##_type##_##_cname##_##_iname##_get(char *buf, unsigned short index) \
280 return __mlxsw_item_get16(buf, &__ITEM_NAME(_type, _cname, _iname), \
284 mlxsw_##_type##_##_cname##_##_iname##_set(char *buf, unsigned short index, \
287 __mlxsw_item_set16(buf, &__ITEM_NAME(_type, _cname, _iname), \
298 static inline u32 mlxsw_##_type##_##_cname##_##_iname##_get(char *buf) \
300 return __mlxsw_item_get32(buf, &__ITEM_NAME(_type, _cname, _iname), 0); \
302 static inline void mlxsw_##_type##_##_cname##_##_iname##_set(char *buf, u32 val)\
304 __mlxsw_item_set32(buf, &__ITEM_NAME(_type, _cname, _iname), 0, val); \
319 mlxsw_##_type##_##_cname##_##_iname##_get(char *buf, unsigned short index) \
321 return __mlxsw_item_get32(buf, &__ITEM_NAME(_type, _cname, _iname), \
325 mlxsw_##_type##_##_cname##_##_iname##_set(char *buf, unsigned short index, \
328 __mlxsw_item_set32(buf, &__ITEM_NAME(_type, _cname, _iname), \
339 static inline u64 mlxsw_##_type##_##_cname##_##_iname##_get(char *buf) \
341 return __mlxsw_item_get64(buf, &__ITEM_NAME(_type, _cname, _iname), 0); \
343 static inline void mlxsw_##_type##_##_cname##_##_iname##_set(char *buf, u64 val)\
345 __mlxsw_item_set64(buf, &__ITEM_NAME(_type, _cname, _iname), 0, val); \
360 mlxsw_##_type##_##_cname##_##_iname##_get(char *buf, unsigned short index) \
362 return __mlxsw_item_get64(buf, &__ITEM_NAME(_type, _cname, _iname), \
366 mlxsw_##_type##_##_cname##_##_iname##_set(char *buf, unsigned short index, \
369 __mlxsw_item_set64(buf, &__ITEM_NAME(_type, _cname, _iname), \
380 mlxsw_##_type##_##_cname##_##_iname##_memcpy_from(char *buf, char *dst) \
382 __mlxsw_item_memcpy_from(buf, dst, \
386 mlxsw_##_type##_##_cname##_##_iname##_memcpy_to(char *buf, const char *src) \
388 __mlxsw_item_memcpy_to(buf, src, \
402 mlxsw_##_type##_##_cname##_##_iname##_memcpy_from(char *buf, \
406 __mlxsw_item_memcpy_from(buf, dst, \
410 mlxsw_##_type##_##_cname##_##_iname##_memcpy_to(char *buf, \
414 __mlxsw_item_memcpy_to(buf, src, \
427 mlxsw_##_type##_##_cname##_##_iname##_get(char *buf, u16 index) \
429 return __mlxsw_item_bit_array_get(buf, \
434 mlxsw_##_type##_##_cname##_##_iname##_set(char *buf, u16 index, u8 val) \
436 return __mlxsw_item_bit_array_set(buf, \