Changeset fce4572 for lib/format_dpdk.c


Ignore:
Timestamp:
01/08/19 10:58:31 (22 months ago)
Author:
Shane Alcock <salcock@…>
Branches:
develop
Children:
0ae7ba2
Parents:
93564ff
Message:

Add more failure cases to "can_write" functions for some formats.

Specifically:

  • Avoid writing metadata packets to DPDK, ring and int
  • Make sure all formats avoid writing "content invalid" packets.
  • Add comments to remind us that erf meta <-> pcapng meta conversion might be worth adding at some point.
  • Add comment to remind us that erf meta should be writable via a DAG card (I think).
File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/format_dpdk.c

    r9a6bdbc rfce4572  
    146146
    147147static bool dpdk_can_write(libtrace_packet_t *packet) {
     148        libtrace_linktype_t ltype = trace_get_link_type(packet);
     149
     150        if (ltype == TRACE_TYPE_CONTENT_INVALID) {
     151                return false;
     152        }
     153        if (ltype == TRACE_TYPE_NONDATA || ltype == TRACE_TYPE_ERF_META ||
     154                        ltype == TRACE_TYPE_PCAPNG_META) {
     155                return false;
     156        }
    148157        return true;
    149158}
Note: See TracChangeset for help on using the changeset viewer.