Lines Matching refs:fp

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