void*rte_gro_ctx_create(conststructrte_gro_param*param)WarningEXPERIMENTAL: this API may change without prior notice
This function create a GRO context object, which is used to merge packets in rte_gro_reassemble().
Parametersparam applications use it to pass needed parameters to create a GRO context object.
Returns
if create successfully, return a pointer which points to the GRO context object. Otherwise, return
NULL.
voidrte_gro_ctx_destroy(void*ctx)WarningEXPERIMENTAL: this API may change without prior notice
This function destroys a GRO context object.
Parametersctx pointer points to a GRO context object.
uint16_trte_gro_reassemble_burst(structrte_mbuf**pkts,uint16_tnb_pkts,conststructrte_gro_param*param)
This is one of the main reassembly APIs, which merges numbers of packets at a time. It doesn't check if
input packets have correct checksums and doesn't re-calculate checksums for merged packets. It assumes
the packets are complete (i.e., MF==0 && frag_off==0), when IP fragmentation is possible (i.e., DF==0).
The GROed packets are returned as soon as the function finishes.
Parameterspkts Pointer array pointing to the packets to reassemble. Besides, it keeps MBUF addresses for the
GROed packets.
nb_pkts The number of packets to reassemble
param Application-determined parameters for reassembling packets.
Returns
The number of packets after been GROed. If no packets are merged, the return value is equals to
nb_pkts.
uint16_trte_gro_reassemble(structrte_mbuf**pkts,uint16_tnb_pkts,void*ctx)WarningEXPERIMENTAL: this API may change without prior notice
Reassembly function, which tries to merge input packets with the existed packets in the reassembly tables
of a given GRO context. It doesn't check if input packets have correct checksums and doesn't re-calculate
checksums for merged packets. Additionally, it assumes the packets are complete (i.e., MF==0 &&
frag_off==0), when IP fragmentation is possible (i.e., DF==0).
If the input packets have invalid parameters (e.g. no data payload, unsupported GRO types), they are
returned to applications. Otherwise, they are either merged or inserted into the table. Applications need
to flush packets from the tables by flush API, if they want to get the GROed packets.
Parameterspkts Packets to reassemble. It's also used to store the unprocessed packets.
nb_pkts The number of packets to reassemble
ctx GRO context object pointer
Returns
The number of unprocessed packets.
uint16_trte_gro_timeout_flush(void*ctx,uint64_ttimeout_cycles,uint64_tgro_types,structrte_mbuf**out,uint16_tmax_nb_out)WarningEXPERIMENTAL: this API may change without prior notice
This function flushes the timeout packets from the reassembly tables of desired GRO types. The max number
of flushed packets is the element number of 'out'.
Additionally, the flushed packets may have incorrect checksums, since this function doesn't re-calculate
checksums for merged packets.
Parametersctx GRO context object pointer.
timeout_cycles The max TTL for packets in reassembly tables, measured in nanosecond.
gro_types This function flushes packets whose GRO types are specified by gro_types.
out Pointer array used to keep flushed packets.
max_nb_out The element number of 'out'. It's also the max number of timeout packets that can be
flushed finally.
Returns
The number of flushed packets.
uint64_trte_gro_get_pkt_count(void*ctx)WarningEXPERIMENTAL: this API may change without prior notice
This function returns the number of packets in all reassembly tables of a given GRO context.
Parametersctx GRO context object pointer.
Returns
The number of packets in the tables.