Lines Matching full:spec

95 	char spec[];  member
135 /* Spec TLVs should be aligned to 4 bytes. */ in nfp_traverse_tlvs()
184 static int nfp_dump_error_tlv_size(struct nfp_dump_tl *spec) in nfp_dump_error_tlv_size() argument
186 return ALIGN8(sizeof(struct nfp_dump_error) + sizeof(*spec) + in nfp_dump_error_tlv_size()
187 be32_to_cpu(spec->length)); in nfp_dump_error_tlv_size()
197 static int nfp_calc_hwinfo_field_sz(struct nfp_pf *pf, struct nfp_dump_tl *spec) in nfp_calc_hwinfo_field_sz() argument
202 tl_len = be32_to_cpu(spec->length); in nfp_calc_hwinfo_field_sz()
203 key_len = strnlen(spec->data, tl_len); in nfp_calc_hwinfo_field_sz()
205 return nfp_dump_error_tlv_size(spec); in nfp_calc_hwinfo_field_sz()
207 value = nfp_hwinfo_lookup(pf->hwinfo, spec->data); in nfp_calc_hwinfo_field_sz()
209 return nfp_dump_error_tlv_size(spec); in nfp_calc_hwinfo_field_sz()
229 nfp_calc_rtsym_dump_sz(struct nfp_pf *pf, struct nfp_dump_tl *spec) in nfp_calc_rtsym_dump_sz() argument
236 spec_rtsym = (struct nfp_dumpspec_rtsym *)spec; in nfp_calc_rtsym_dump_sz()
237 tl_len = be32_to_cpu(spec->length); in nfp_calc_rtsym_dump_sz()
240 return nfp_dump_error_tlv_size(spec); in nfp_calc_rtsym_dump_sz()
244 return nfp_dump_error_tlv_size(spec); in nfp_calc_rtsym_dump_sz()
312 s64 nfp_net_dump_calculate_size(struct nfp_pf *pf, struct nfp_dumpspec *spec, in nfp_net_dump_calculate_size() argument
321 err = nfp_traverse_tlvs(pf, spec->data, spec->size, &lev_sz, in nfp_net_dump_calculate_size()
349 nfp_dump_error_tlv(struct nfp_dump_tl *spec, int error, in nfp_dump_error_tlv() argument
356 total_spec_size = sizeof(*spec) + be32_to_cpu(spec->length); in nfp_dump_error_tlv()
364 memcpy(dump_header->spec, spec, total_spec_size); in nfp_dump_error_tlv()
390 nfp_dump_hwinfo(struct nfp_pf *pf, struct nfp_dump_tl *spec, in nfp_dump_hwinfo() argument
411 static int nfp_dump_hwinfo_field(struct nfp_pf *pf, struct nfp_dump_tl *spec, in nfp_dump_hwinfo_field() argument
420 tl_len = be32_to_cpu(spec->length); in nfp_dump_hwinfo_field()
421 key_len = strnlen(spec->data, tl_len); in nfp_dump_hwinfo_field()
423 return nfp_dump_error_tlv(spec, -EINVAL, dump); in nfp_dump_hwinfo_field()
425 key = spec->data; in nfp_dump_hwinfo_field()
428 return nfp_dump_error_tlv(spec, -ENOENT, dump); in nfp_dump_hwinfo_field()
597 nfp_dump_single_rtsym(struct nfp_pf *pf, struct nfp_dumpspec_rtsym *spec, in nfp_dump_single_rtsym() argument
610 tl_len = be32_to_cpu(spec->tl.length); in nfp_dump_single_rtsym()
611 key_len = strnlen(spec->rtsym, tl_len); in nfp_dump_single_rtsym()
613 return nfp_dump_error_tlv(&spec->tl, -EINVAL, dump); in nfp_dump_single_rtsym()
615 sym = nfp_rtsym_lookup(rtbl, spec->rtsym); in nfp_dump_single_rtsym()
617 return nfp_dump_error_tlv(&spec->tl, -ENOENT, dump); in nfp_dump_single_rtsym()
625 err = nfp_add_tlv(be32_to_cpu(spec->tl.type), total_size, dump); in nfp_dump_single_rtsym()
631 memcpy(dump_header->rtsym, spec->rtsym, key_len + 1); in nfp_dump_single_rtsym()
737 int nfp_net_dump_populate_buffer(struct nfp_pf *pf, struct nfp_dumpspec *spec, in nfp_net_dump_populate_buffer() argument
752 err = nfp_traverse_tlvs(pf, spec->data, spec->size, &dump, in nfp_net_dump_populate_buffer()