[dpdk-dev] [RFC v3] Flow classification library

Ferruh Yigit ferruh.yigit at intel.com
Thu May 25 17:46:33 CEST 2017


DPDK works with packets, but some network administration tools works based on
flow information.

This library is suggested to provide helper API to convert packet based
information to the flow records.

Basically the library consist of APIs to create and destroy the rule and to
query the stats. Application should call the query API for all received packets.

Library header file has more comments on how library works and provided APIs.

Packets to flow conversion will cause performance drop, that is why conversion
done on demand by an API call provided by this library.

Initial implementation in mind is to provide support for IPFIX metering process
but library planned to be as generic as possible. And flow information provided
by this library is missing to implement full IPFIX features, but this is planned
to be initial step.

Flows are defined using rte_flow, also measurements (actions) are provided by
rte_flow. To support more IPFIX measurements, the implementation may require
extending rte_flow addition to implementing this library.

Used both flows and action defined by rte_flow.h so this library has dependency
to rte_flow.h.

For further steps, this library can expand to benefit from hardware filter for
better performance.

It will be more beneficial to shape this library to cover more use cases, please
feel free to comment on possible other use case and desired functionalities.


Changes to previous version of the RFC:

v3:
* add create() / destroy() APIs
* query() gets rte_flow_classify object as parameter
* query() gets one flow at a time

v2:
* library uses rte_flow to define flows and action.
* no more callbacks used, user should call API in poll mode for flow stats.
* library no more maintain any flow data, all flow related stats returned
  by API call and forgotten.

cc: John McNamara <john.mcnamara at intel.com>
cc: Maryam Tahhan <maryam.tahhan at intel.com>

Ferruh Yigit (1):
  flow_classify: add librte_flow_classify library

 config/common_base                                 |   5 +
 doc/api/doxy-api-index.md                          |   1 +
 doc/api/doxy-api.conf                              |   1 +
 doc/guides/rel_notes/release_17_08.rst             |   1 +
 lib/Makefile                                       |   2 +
 lib/librte_flow_classify/Makefile                  |  50 +++++++
 lib/librte_flow_classify/rte_flow_classify.c       | 153 +++++++++++++++++++++
 lib/librte_flow_classify/rte_flow_classify.h       | 149 ++++++++++++++++++++
 .../rte_flow_classify_version.map                  |   9 ++
 mk/rte.app.mk                                      |   1 +
 10 files changed, 372 insertions(+)
 create mode 100644 lib/librte_flow_classify/Makefile
 create mode 100644 lib/librte_flow_classify/rte_flow_classify.c
 create mode 100644 lib/librte_flow_classify/rte_flow_classify.h
 create mode 100644 lib/librte_flow_classify/rte_flow_classify_version.map

-- 
2.9.3



More information about the dev mailing list