Lines Matching refs:fp

62 #define fp_skb(fp)	(&((fp)->skb))  argument
63 #define fr_hdr(fp) ((fp)->skb.data) argument
64 #define fr_len(fp) ((fp)->skb.len) argument
65 #define fr_cb(fp) ((struct fcoe_rcv_info *)&((fp)->skb.cb[0])) argument
66 #define fr_dev(fp) (fr_cb(fp)->fr_dev) argument
67 #define fr_seq(fp) (fr_cb(fp)->fr_seq) argument
68 #define fr_sof(fp) (fr_cb(fp)->fr_sof) argument
69 #define fr_eof(fp) (fr_cb(fp)->fr_eof) argument
70 #define fr_flags(fp) (fr_cb(fp)->fr_flags) argument
71 #define fr_encaps(fp) (fr_cb(fp)->fr_encaps) argument
72 #define fr_max_payload(fp) (fr_cb(fp)->fr_max_payload) argument
73 #define fr_fsp(fp) (fr_cb(fp)->fr_fsp) argument
74 #define fr_crc(fp) (fr_cb(fp)->fr_crc) argument
113 static inline void fc_frame_init(struct fc_frame *fp) in fc_frame_init() argument
115 fr_dev(fp) = NULL; in fc_frame_init()
116 fr_seq(fp) = NULL; in fc_frame_init()
117 fr_flags(fp) = 0; in fc_frame_init()
118 fr_encaps(fp) = 0; in fc_frame_init()
130 struct fc_frame *fp; in fc_frame_alloc() local
137 fp = fc_frame_alloc_fill(dev, len); in fc_frame_alloc()
139 fp = _fc_frame_alloc(len); in fc_frame_alloc()
140 return fp; in fc_frame_alloc()
146 static inline void fc_frame_free(struct fc_frame *fp) in fc_frame_free() argument
148 kfree_skb(fp_skb(fp)); in fc_frame_free()
151 static inline int fc_frame_is_linear(struct fc_frame *fp) in fc_frame_is_linear() argument
153 return !skb_is_nonlinear(fp_skb(fp)); in fc_frame_is_linear()
161 struct fc_frame_header *__fc_frame_header_get(const struct fc_frame *fp) in __fc_frame_header_get() argument
163 return (struct fc_frame_header *)fr_hdr(fp); in __fc_frame_header_get()
171 struct fc_frame_header *fc_frame_header_get(const struct fc_frame *fp) in fc_frame_header_get() argument
173 WARN_ON(fr_len(fp) < sizeof(struct fc_frame_header)); in fc_frame_header_get()
174 return __fc_frame_header_get(fp); in fc_frame_header_get()
180 static inline u32 fc_frame_sid(const struct fc_frame *fp) in fc_frame_sid() argument
182 return ntoh24(__fc_frame_header_get(fp)->fh_s_id); in fc_frame_sid()
188 static inline u32 fc_frame_did(const struct fc_frame *fp) in fc_frame_did() argument
190 return ntoh24(__fc_frame_header_get(fp)->fh_d_id); in fc_frame_did()
203 static inline void *fc_frame_payload_get(const struct fc_frame *fp, in fc_frame_payload_get() argument
208 if (fr_len(fp) >= sizeof(struct fc_frame_header) + len) in fc_frame_payload_get()
209 pp = fc_frame_header_get(fp) + 1; in fc_frame_payload_get()
218 static inline u8 fc_frame_payload_op(const struct fc_frame *fp) in fc_frame_payload_op() argument
222 cp = fc_frame_payload_get(fp, sizeof(u8)); in fc_frame_payload_op()
232 static inline enum fc_class fc_frame_class(const struct fc_frame *fp) in fc_frame_class() argument
234 return fc_sof_class(fr_sof(fp)); in fc_frame_class()
244 static inline u8 fc_frame_rctl(const struct fc_frame *fp) in fc_frame_rctl() argument
246 return fc_frame_header_get(fp)->fh_r_ctl; in fc_frame_rctl()
249 static inline bool fc_frame_is_cmd(const struct fc_frame *fp) in fc_frame_is_cmd() argument
251 return fc_frame_rctl(fp) == FC_RCTL_DD_UNSOL_CMD; in fc_frame_is_cmd()