Lines Matching refs:fp

50 #define fp_skb(fp)	(&((fp)->skb))  argument
51 #define fr_hdr(fp) ((fp)->skb.data) argument
52 #define fr_len(fp) ((fp)->skb.len) argument
53 #define fr_cb(fp) ((struct fcoe_rcv_info *)&((fp)->skb.cb[0])) argument
54 #define fr_dev(fp) (fr_cb(fp)->fr_dev) argument
55 #define fr_seq(fp) (fr_cb(fp)->fr_seq) argument
56 #define fr_sof(fp) (fr_cb(fp)->fr_sof) argument
57 #define fr_eof(fp) (fr_cb(fp)->fr_eof) argument
58 #define fr_flags(fp) (fr_cb(fp)->fr_flags) argument
59 #define fr_encaps(fp) (fr_cb(fp)->fr_encaps) argument
60 #define fr_max_payload(fp) (fr_cb(fp)->fr_max_payload) argument
61 #define fr_fsp(fp) (fr_cb(fp)->fr_fsp) argument
62 #define fr_crc(fp) (fr_cb(fp)->fr_crc) argument
101 static inline void fc_frame_init(struct fc_frame *fp) in fc_frame_init() argument
103 fr_dev(fp) = NULL; in fc_frame_init()
104 fr_seq(fp) = NULL; in fc_frame_init()
105 fr_flags(fp) = 0; in fc_frame_init()
106 fr_encaps(fp) = 0; in fc_frame_init()
118 struct fc_frame *fp; in fc_frame_alloc() local
125 fp = fc_frame_alloc_fill(dev, len); in fc_frame_alloc()
127 fp = _fc_frame_alloc(len); in fc_frame_alloc()
128 return fp; in fc_frame_alloc()
134 static inline void fc_frame_free(struct fc_frame *fp) in fc_frame_free() argument
136 kfree_skb(fp_skb(fp)); in fc_frame_free()
139 static inline int fc_frame_is_linear(struct fc_frame *fp) in fc_frame_is_linear() argument
141 return !skb_is_nonlinear(fp_skb(fp)); in fc_frame_is_linear()
149 struct fc_frame_header *__fc_frame_header_get(const struct fc_frame *fp) in __fc_frame_header_get() argument
151 return (struct fc_frame_header *)fr_hdr(fp); in __fc_frame_header_get()
159 struct fc_frame_header *fc_frame_header_get(const struct fc_frame *fp) in fc_frame_header_get() argument
161 WARN_ON(fr_len(fp) < sizeof(struct fc_frame_header)); in fc_frame_header_get()
162 return __fc_frame_header_get(fp); in fc_frame_header_get()
168 static inline u32 fc_frame_sid(const struct fc_frame *fp) in fc_frame_sid() argument
170 return ntoh24(__fc_frame_header_get(fp)->fh_s_id); in fc_frame_sid()
176 static inline u32 fc_frame_did(const struct fc_frame *fp) in fc_frame_did() argument
178 return ntoh24(__fc_frame_header_get(fp)->fh_d_id); in fc_frame_did()
191 static inline void *fc_frame_payload_get(const struct fc_frame *fp, in fc_frame_payload_get() argument
196 if (fr_len(fp) >= sizeof(struct fc_frame_header) + len) in fc_frame_payload_get()
197 pp = fc_frame_header_get(fp) + 1; in fc_frame_payload_get()
206 static inline u8 fc_frame_payload_op(const struct fc_frame *fp) in fc_frame_payload_op() argument
210 cp = fc_frame_payload_get(fp, sizeof(u8)); in fc_frame_payload_op()
220 static inline enum fc_class fc_frame_class(const struct fc_frame *fp) in fc_frame_class() argument
222 return fc_sof_class(fr_sof(fp)); in fc_frame_class()
232 static inline u8 fc_frame_rctl(const struct fc_frame *fp) in fc_frame_rctl() argument
234 return fc_frame_header_get(fp)->fh_r_ctl; in fc_frame_rctl()
237 static inline bool fc_frame_is_cmd(const struct fc_frame *fp) in fc_frame_is_cmd() argument
239 return fc_frame_rctl(fp) == FC_RCTL_DD_UNSOL_CMD; in fc_frame_is_cmd()
268 static inline void fc_fill_fc_hdr(struct fc_frame *fp, enum fc_rctl r_ctl, in fc_fill_fc_hdr() argument
274 fh = fc_frame_header_get(fp); in fc_fill_fc_hdr()