[dpdk-dev] MPSL enabling

Message ID 1488525977-15321-1-git-send-email-beilei.xing@intel.com (mailing list archive)
State Superseded, archived
Headers

Checks

Context Check Description
ci/checkpatch warning coding style issues
ci/Intel-compilation fail apply patch file failure

Commit Message

Xing, Beilei March 3, 2017, 7:26 a.m. UTC
  Signed-off-by: Beilei Xing <beilei.xing@intel.com>
---
 app/test-pmd/cmdline_flow.c  |  23 ++++
 app/test-pmd/config.c        |   1 +
 drivers/net/i40e/i40e_flow.c | 245 +++++++++++++++++++++++++++++++++++++++++++
 lib/librte_ether/rte_flow.h  |  42 ++++++++
 4 files changed, 311 insertions(+)
  

Comments

Xing, Beilei March 3, 2017, 7:26 a.m. UTC | #1
Add APIs and driver to support load/get
i40e PPP (Pipeline Personalization Profile)
since PPP will be supported from FVL6 NVM.

Beilei Xing (5):
  net/i40e: support pipeline personalization profile
  net/i40e: add ppp processing
  app/testpmd: add command for writing personalization profile
  net/i40e: add get all loaded profiles
  app/testpmd: add command for getting loaded profiles

Rami Rosen (1):
  net/i40e: fix a typo in flow

 app/test-pmd/cmdline.c          | 121 +++++++++++++++
 app/test-pmd/config.c           |  54 +++++++
 app/test-pmd/testpmd.h          |   4 +
 drivers/net/i40e/i40e_ethdev.c  | 332 ++++++++++++++++++++++++++++++++++++++++
 drivers/net/i40e/i40e_ethdev.h  | 132 ++++++++++++++++
 drivers/net/i40e/i40e_flow.c    |   6 +-
 drivers/net/i40e/rte_pmd_i40e.h |  14 ++
 7 files changed, 660 insertions(+), 3 deletions(-)
  
Xing, Beilei March 3, 2017, 7:39 a.m. UTC | #2
Add APIs and driver to support load/get
i40e PPP (Pipeline Personalization Profile)
since PPP will be supported from FVL6 NVM.

v2 change:
 Correct patch num.

Beilei Xing (5):
  net/i40e: support pipeline personalization profile
  net/i40e: add ppp processing
  app/testpmd: add command for writing personalization profile
  net/i40e: add get all loaded profiles
  app/testpmd: add command for getting loaded profiles

 app/test-pmd/cmdline.c          | 121 +++++++++++++++
 app/test-pmd/config.c           |  54 +++++++
 app/test-pmd/testpmd.h          |   4 +
 drivers/net/i40e/i40e_ethdev.c  | 332 ++++++++++++++++++++++++++++++++++++++++
 drivers/net/i40e/i40e_ethdev.h  | 132 ++++++++++++++++
 drivers/net/i40e/rte_pmd_i40e.h |  14 ++
 6 files changed, 657 insertions(+)
  
Xing, Beilei March 3, 2017, 7:52 a.m. UTC | #3
Sorry for the mistake for the patch thread, which includes other irrelevant patches. 
Please ignore these patches, and just focus on the PPP v2 patchset.
Sorry for any inconvenient.

Thanks
Beilei

> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Beilei Xing
> Sent: Friday, March 3, 2017 3:26 PM
> To: Wu, Jingjing <jingjing.wu@intel.com>
> Cc: Zhang, Helin <helin.zhang@intel.com>; dev@dpdk.org
> Subject: [dpdk-dev] [PATCH 0/6] net/i40e: support pipeline personalization
> profile
> 
> Add APIs and driver to support load/get
> i40e PPP (Pipeline Personalization Profile) since PPP will be supported from
> FVL6 NVM.
> 
> Beilei Xing (5):
>   net/i40e: support pipeline personalization profile
>   net/i40e: add ppp processing
>   app/testpmd: add command for writing personalization profile
>   net/i40e: add get all loaded profiles
>   app/testpmd: add command for getting loaded profiles
> 
> Rami Rosen (1):
>   net/i40e: fix a typo in flow
> 
>  app/test-pmd/cmdline.c          | 121 +++++++++++++++
>  app/test-pmd/config.c           |  54 +++++++
>  app/test-pmd/testpmd.h          |   4 +
>  drivers/net/i40e/i40e_ethdev.c  | 332
> ++++++++++++++++++++++++++++++++++++++++
>  drivers/net/i40e/i40e_ethdev.h  | 132 ++++++++++++++++
>  drivers/net/i40e/i40e_flow.c    |   6 +-
>  drivers/net/i40e/rte_pmd_i40e.h |  14 ++
>  7 files changed, 660 insertions(+), 3 deletions(-)
> 
> --
> 2.5.5
  
Ferruh Yigit March 8, 2017, 11:43 a.m. UTC | #4
On 3/3/2017 7:39 AM, Beilei Xing wrote:
> Add APIs and driver to support load/get
> i40e PPP (Pipeline Personalization Profile)

Can you please describe what is "Pipeline Personalisation Profile" is?
If possible please provide some links to documents. And please feel free
to update NIC document about these details.

What are the use cases, what are the benefits of this feature?

And can you please update release notes to announce about added feature?

> since PPP will be supported from FVL6 NVM.
> 
> v2 change:
>  Correct patch num.
> 
> Beilei Xing (5):
>   net/i40e: support pipeline personalization profile
>   net/i40e: add ppp processing
>   app/testpmd: add command for writing personalization profile
>   net/i40e: add get all loaded profiles
>   app/testpmd: add command for getting loaded profiles

<...>
  
Xing, Beilei March 9, 2017, 3:07 a.m. UTC | #5
> -----Original Message-----
> From: Yigit, Ferruh
> Sent: Wednesday, March 8, 2017 7:43 PM
> To: Xing, Beilei <beilei.xing@intel.com>; Wu, Jingjing <jingjing.wu@intel.com>
> Cc: Zhang, Helin <helin.zhang@intel.com>; dev@dpdk.org
> Subject: Re: [dpdk-dev] [PATCH v2 0/5] net/i40e: support pipeline
> personalization profile
> 
> On 3/3/2017 7:39 AM, Beilei Xing wrote:
> > Add APIs and driver to support load/get i40e PPP (Pipeline
> > Personalization Profile)
> 
> Can you please describe what is "Pipeline Personalisation Profile" is?
> If possible please provide some links to documents. And please feel free to
> update NIC document about these details.

Due to limited resources of X*710 (parser and analyzer configuration tables, number of packet classification types,
number of packet types, filters configuration tables, etc.), it's impossible to simultaneously support all protocols/filters
required for different parts on network.
To enable protocols/filters extensions for X*710, new Admin Command for loading user defined configurations is added.
PPP is a format of extend configuration  for X*710, it allows user to load user defined configuration to X*710.

Actually I have no released doc to share, the documents in my hand are draft and can't be forwarded.

> 
> What are the use cases, what are the benefits of this feature?

List of possible use cases for extended X*710 configuration using profiles could include following:
Configuring Analyzer/Parser to support new protocols, for example:
*	IP L2TPv3 tunneling protocol
*	IPSec ESP/AH protocols
*	MPLSoGRE, MPLSoUDP tunnels
*	GTP-C/GTP-U tunnels
New PCTYPEs for offloading packet classification to X*710. For example:
*	new IP Protocol in addition to TCP/UDP/SCTP
*	new TCP/UDP subtypes, like TCP SYN, TCP FIN 
*	new PCTYPE for tunneled packets like GTP-C, GTP-U
New PTYPEs for packets identification, for example:
*	MAC, MPLS, IP4, UDP
*	MAC, MPLS, MPLS, IP6, TCP
Fixes for NVM configuration, for example:
*	list of enabled stat counters to improve throughput
*	parser/analyzer configuration for some corner cases

> 
> And can you please update release notes to announce about added feature?
Yes, will update in next version.

> 
> > since PPP will be supported from FVL6 NVM.
> >
> > v2 change:
> >  Correct patch num.
> >
> > Beilei Xing (5):
> >   net/i40e: support pipeline personalization profile
> >   net/i40e: add ppp processing
> >   app/testpmd: add command for writing personalization profile
> >   net/i40e: add get all loaded profiles
> >   app/testpmd: add command for getting loaded profiles
> 
> <...>
  
Xing, Beilei March 23, 2017, 10:02 a.m. UTC | #6
Due to limited resources of X*710 (parser and analyzer configuration
tables, number of packet classification types, number of packet types,
filters configuration tables, etc.), it's impossible to simultaneously
support all protocols/filters required for different parts on network.
To enable protocols/filters extensions for X*710, new Admin Command
for loading user defined configurations is added.
PPP is a format of extend configuration for X*710, it allows user to
load user defined configuration to X*710.

List of possible use cases for extended X*710 configuration using
profiles could include following:
Configuring Analyzer/Parser to support new protocols, e.g.
- IP L2TPv3 tunneling protocol
- IPSec ESP/AH protocols
- MPLSoGRE, MPLSoUDP tunnels
- GTP-C/GTP-U tunnels
New PCTYPEs for offloading packet classification to X*710. e.g.
- new IP Protocol in addition to TCP/UDP/SCTP
- new TCP/UDP subtypes, like TCP SYN, TCP FIN
- new PCTYPE for tunneled packets like GTP-C, GTP-U
New PTYPEs for packets identification, e.g.
- MAC, MPLS, IP4, UDP
- MAC, MPLS, MPLS, IP6, TCP
Fixes for NVM configuration, e.g.
- list of enabled stat counters to improve throughput
- parser/analyzer configuration for some corner cases

Beilei Xing (5):
  net/i40e: add pipeline personalization profile processing
  app/testpmd: add command for loading a profile
  net/i40e: add get all loaded profiles
  app/testpmd: add command for getting loaded profiles
  doc: add pipeline personalization profile support for i40e

 app/test-pmd/cmdline.c                    | 163 +++++++++++++++++++++
 app/test-pmd/config.c                     |  67 +++++++++
 app/test-pmd/testpmd.h                    |  25 ++++
 doc/guides/rel_notes/release_17_05.rst    |   4 +
 drivers/net/i40e/i40e_ethdev.c            | 228 ++++++++++++++++++++++++++++++
 drivers/net/i40e/i40e_ethdev.h            |   5 +
 drivers/net/i40e/rte_pmd_i40e.h           |  32 +++++
 drivers/net/i40e/rte_pmd_i40e_version.map |   7 +
 8 files changed, 531 insertions(+)
  
Xing, Beilei March 24, 2017, 10:19 a.m. UTC | #7
Due to limited resources of X*710 (parser and analyzer configuration
tables, number of packet classification types, number of packet types,
filters configuration tables, etc.), it's impossible to simultaneously
support all protocols/filters required for different parts on network.
To enable protocols/filters extensions for X*710, new Admin Command
for loading user defined configurations is added.
PPP is a format of extend configuration for X*710, it allows user to
load user defined configuration to X*710.

List of possible use cases for extended X*710 configuration using
profiles could include following:
Configuring Analyzer/Parser to support new protocols, e.g.
- IP L2TPv3 tunneling protocol
- IPSec ESP/AH protocols
- MPLSoGRE, MPLSoUDP tunnels
- GTP-C/GTP-U tunnels
New PCTYPEs for offloading packet classification to X*710. e.g.
- new IP Protocol in addition to TCP/UDP/SCTP
- new TCP/UDP subtypes, like TCP SYN, TCP FIN
- new PCTYPE for tunneled packets like GTP-C, GTP-U
New PTYPEs for packets identification, e.g.
- MAC, MPLS, IP4, UDP
- MAC, MPLS, MPLS, IP6, TCP
Fixes for NVM configuration, e.g.
- list of enabled stat counters to improve throughput
- parser/analyzer configuration for some corner cases

v4 changes:
 Fix compile error with gcc version 4.8.4 (Ubuntu 4.8.4-2ubuntu1~14.04.3).
 Move ppp related structures to rte_pmd_i40e.h.
 Not support remove PPP temporarily.

v3 changes:
 Move ppp AQ command code to base code.

Beilei Xing (5):
  net/i40e: add pipeline personalization profile processing
  app/testpmd: add command for loading a profile
  net/i40e: add get all loaded profiles
  app/testpmd: add command for getting loaded profiles
  doc: add pipeline personalization profile support for i40e

 app/test-pmd/cmdline.c                    | 165 ++++++++++++++++++++++
 app/test-pmd/config.c                     |  67 +++++++++
 app/test-pmd/testpmd.h                    |   3 +
 doc/guides/rel_notes/release_17_05.rst    |   4 +
 drivers/net/i40e/i40e_ethdev.c            | 226 ++++++++++++++++++++++++++++++
 drivers/net/i40e/rte_pmd_i40e.h           |  63 +++++++++
 drivers/net/i40e/rte_pmd_i40e_version.map |   7 +
 7 files changed, 535 insertions(+)
  
Xing, Beilei March 27, 2017, 6:17 a.m. UTC | #8
Due to limited resources of X*710 (parser and analyzer configuration
tables, number of packet classification types, number of packet types,
filters configuration tables, etc.), it's impossible to simultaneously
support all protocols/filters required for different parts on network.
To enable protocols/filters extensions for X*710, new Admin Command
for loading user defined configurations is added.
PPP is a format of extend configuration for X*710, it allows user to
load user defined configuration to X*710.

List of possible use cases for extended X*710 configuration using
profiles could include following:
Configuring Analyzer/Parser to support new protocols, e.g.
- IP L2TPv3 tunneling protocol
- IPSec ESP/AH protocols
- MPLSoGRE, MPLSoUDP tunnels
- GTP-C/GTP-U tunnels
New PCTYPEs for offloading packet classification to X*710. e.g.
- new IP Protocol in addition to TCP/UDP/SCTP
- new TCP/UDP subtypes, like TCP SYN, TCP FIN
- new PCTYPE for tunneled packets like GTP-C, GTP-U
New PTYPEs for packets identification, e.g.
- MAC, MPLS, IP4, UDP
- MAC, MPLS, MPLS, IP6, TCP
Fixes for NVM configuration, e.g.
- list of enabled stat counters to improve throughput
- parser/analyzer configuration for some corner cases

v5 changes:
 Change parameter of rte_pmd_i40e_process_ppp_package to extend operation.
 Change structure rte_pmd_i40e_profile_info.

v4 changes:
 Fix compile error with gcc version 4.8.4 (Ubuntu 4.8.4-2ubuntu1~14.04.3).
 Move ppp related structures to rte_pmd_i40e.h.
 Not support remove PPP temporarily.

v3 changes:
 Move ppp AQ command code to base code.

Beilei Xing (5):
  net/i40e: add pipeline personalization profile processing
  app/testpmd: add command for loading a profile
  net/i40e: add get all loaded profiles
  app/testpmd: add command for getting loaded profiles
  doc: add pipeline personalization profile support for i40e

 app/test-pmd/cmdline.c                    | 166 ++++++++++++++++++++++
 app/test-pmd/config.c                     |  67 +++++++++
 app/test-pmd/testpmd.h                    |   3 +
 doc/guides/rel_notes/release_17_05.rst    |   4 +
 drivers/net/i40e/i40e_ethdev.c            | 227 ++++++++++++++++++++++++++++++
 drivers/net/i40e/rte_pmd_i40e.h           |  69 +++++++++
 drivers/net/i40e/rte_pmd_i40e_version.map |   7 +
 7 files changed, 543 insertions(+)
  
Xing, Beilei March 29, 2017, 12:26 p.m. UTC | #9
Due to limited resources of X*710 (parser and analyzer configuration
tables, number of packet classification types, number of packet types,
filters configuration tables, etc.), it's impossible to simultaneously
support all protocols/filters required for different parts on network.
To enable protocols/filters extensions for X*710, new Admin Command
for loading user defined configurations is added.
PPP is a format of extend configuration for X*710, it allows user to
load user defined configuration to X*710.

List of possible use cases for extended X*710 configuration using
profiles could include following:
Configuring Analyzer/Parser to support new protocols, e.g.
- IP L2TPv3 tunneling protocol
- IPSec ESP/AH protocols
- MPLSoGRE, MPLSoUDP tunnels
- GTP-C/GTP-U tunnels
New PCTYPEs for offloading packet classification to X*710. e.g.
- new IP Protocol in addition to TCP/UDP/SCTP
- new TCP/UDP subtypes, like TCP SYN, TCP FIN
- new PCTYPE for tunneled packets like GTP-C, GTP-U
New PTYPEs for packets identification, e.g.
- MAC, MPLS, IP4, UDP
- MAC, MPLS, MPLS, IP6, TCP
Fixes for NVM configuration, e.g.
- list of enabled stat counters to improve throughput
- parser/analyzer configuration for some corner cases

v6 changes:
 Change pipeline personalization profile to dynamic device profile.

v5 changes:
 Change parameter of rte_pmd_i40e_process_ppp_package to extend operation.
 Change structure rte_pmd_i40e_profile_info.

v4 changes:
 Fix compile error with gcc version 4.8.4 (Ubuntu 4.8.4-2ubuntu1~14.04.3).
 Move ppp related structures to rte_pmd_i40e.h.
 Not support remove PPP temporarily.

v3 changes:
 Move ppp AQ command code to base code.

Beilei Xing (6):
  i40e/base: rename dynamic device profile
  net/i40e: add dynamic device profile processing
  app/testpmd: add command for loading a profile
  net/i40e: add get all loaded profiles
  app/testpmd: add command for getting loaded profiles
  doc: add dynamic device profile support for i40e

 app/test-pmd/cmdline.c                    | 164 +++++++++++++++++++++
 app/test-pmd/config.c                     |  67 +++++++++
 app/test-pmd/testpmd.h                    |   3 +
 doc/guides/rel_notes/release_17_05.rst    |   4 +
 drivers/net/i40e/base/i40e_adminq_cmd.h   |  18 +--
 drivers/net/i40e/base/i40e_common.c       |  32 ++---
 drivers/net/i40e/base/i40e_prototype.h    |   4 +-
 drivers/net/i40e/base/i40e_type.h         |  28 ++--
 drivers/net/i40e/i40e_ethdev.c            | 227 ++++++++++++++++++++++++++++++
 drivers/net/i40e/rte_pmd_i40e.h           |  70 +++++++++
 drivers/net/i40e/rte_pmd_i40e_version.map |   2 +
 11 files changed, 578 insertions(+), 41 deletions(-)
  
Xing, Beilei March 29, 2017, 2:44 p.m. UTC | #10
Due to limited resources of X*710 (parser and analyzer configuration
tables, number of packet classification types, number of packet types,
filters configuration tables, etc.), it's impossible to simultaneously
support all protocols/filters required for different parts on network.
To enable protocols/filters extensions for X*710, new Admin Command
for loading user defined configurations is added.
PPP is a format of extend configuration for X*710, it allows user to
load user defined configuration to X*710.

List of possible use cases for extended X*710 configuration using
profiles could include following:
Configuring Analyzer/Parser to support new protocols, e.g.
- IP L2TPv3 tunneling protocol
- IPSec ESP/AH protocols
- MPLSoGRE, MPLSoUDP tunnels
- GTP-C/GTP-U tunnels
New PCTYPEs for offloading packet classification to X*710. e.g.
- new IP Protocol in addition to TCP/UDP/SCTP
- new TCP/UDP subtypes, like TCP SYN, TCP FIN
- new PCTYPE for tunneled packets like GTP-C, GTP-U
New PTYPEs for packets identification, e.g.
- MAC, MPLS, IP4, UDP
- MAC, MPLS, MPLS, IP6, TCP
Fixes for NVM configuration, e.g.
- list of enabled stat counters to improve throughput
- parser/analyzer configuration for some corner cases

v7 changes:
 Fix one coding style problem.
 Add condition during ddp processing.

v6 changes:
 Change pipeline personalization profile to dynamic device profile.

v5 changes:
 Change parameter of rte_pmd_i40e_process_ppp_package to extend operation.
 Change structure rte_pmd_i40e_profile_info.

v4 changes:
 Fix compile error with gcc version 4.8.4 (Ubuntu 4.8.4-2ubuntu1~14.04.3).
 Move ppp related structures to rte_pmd_i40e.h.
 Not support remove PPP temporarily.

v3 changes:
 Move ppp AQ command code to base code.

Beilei Xing (6):
  net/i40e/base: change ppp to ddp
  net/i40e: add dynamic device profile processing
  app/testpmd: add command for loading a profile
  net/i40e: add get all loaded profiles
  app/testpmd: add command for getting loaded profiles
  doc: add dynamic device profile support for i40e

 app/test-pmd/cmdline.c                    | 164 +++++++++++++++++++++
 app/test-pmd/config.c                     |  67 +++++++++
 app/test-pmd/testpmd.h                    |   3 +
 doc/guides/rel_notes/release_17_05.rst    |   4 +
 drivers/net/i40e/base/i40e_adminq_cmd.h   |  18 +--
 drivers/net/i40e/base/i40e_common.c       |  32 ++--
 drivers/net/i40e/base/i40e_prototype.h    |   4 +-
 drivers/net/i40e/base/i40e_type.h         |  28 ++--
 drivers/net/i40e/i40e_ethdev.c            | 235 ++++++++++++++++++++++++++++++
 drivers/net/i40e/rte_pmd_i40e.h           |  70 +++++++++
 drivers/net/i40e/rte_pmd_i40e_version.map |   2 +
 11 files changed, 586 insertions(+), 41 deletions(-)
  
Xing, Beilei March 30, 2017, 2:51 a.m. UTC | #11
Due to limited resources of X*710 (parser and analyzer configuration
tables, number of packet classification types, number of packet types,
filters configuration tables, etc.), it's impossible to simultaneously
support all protocols/filters required for different parts on network.
To enable protocols/filters extensions for X*710, new Admin Command
for loading user defined configurations is added.
PPP is a format of extend configuration for X*710, it allows user to
load user defined configuration to X*710.

List of possible use cases for extended X*710 configuration using
profiles could include following:
Configuring Analyzer/Parser to support new protocols, e.g.
- IP L2TPv3 tunneling protocol
- IPSec ESP/AH protocols
- MPLSoGRE, MPLSoUDP tunnels
- GTP-C/GTP-U tunnels
New PCTYPEs for offloading packet classification to X*710. e.g.
- new IP Protocol in addition to TCP/UDP/SCTP
- new TCP/UDP subtypes, like TCP SYN, TCP FIN
- new PCTYPE for tunneled packets like GTP-C, GTP-U
New PTYPEs for packets identification, e.g.
- MAC, MPLS, IP4, UDP
- MAC, MPLS, MPLS, IP6, TCP
Fixes for NVM configuration, e.g.
- list of enabled stat counters to improve throughput
- parser/analyzer configuration for some corner cases

v8 changes:
 Change dynamic device profile to dynamic device personalization.

v7 changes:
 Fix one coding style problem.
 Add condition during ddp processing.

v6 changes:
 Change pipeline personalization profile to dynamic device profile.

v5 changes:
 Change parameter of rte_pmd_i40e_process_ppp_package to extend operation.
 Change structure rte_pmd_i40e_profile_info.

v4 changes:
 Fix compile error with gcc version 4.8.4 (Ubuntu 4.8.4-2ubuntu1~14.04.3).
 Move ppp related structures to rte_pmd_i40e.h.
 Not support remove PPP temporarily.

v3 changes:
 Move ppp AQ command code to base code.

Beilei Xing (6):
  net/i40e/base: change ppp to ddp
  net/i40e: add dynamic device personalization processing
  app/testpmd: add command for loading ddp
  net/i40e: add get all loaded profiles
  app/testpmd: add command for getting loaded profiles
  doc: add dynamic device personalization support for i40e

 app/test-pmd/cmdline.c                    | 164 +++++++++++++++++++++
 app/test-pmd/config.c                     |  67 +++++++++
 app/test-pmd/testpmd.h                    |   3 +
 doc/guides/rel_notes/release_17_05.rst    |   4 +
 drivers/net/i40e/base/i40e_adminq_cmd.h   |  10 +-
 drivers/net/i40e/base/i40e_common.c       |  24 +--
 drivers/net/i40e/base/i40e_prototype.h    |   4 +-
 drivers/net/i40e/base/i40e_type.h         |  28 ++--
 drivers/net/i40e/i40e_ethdev.c            | 235 ++++++++++++++++++++++++++++++
 drivers/net/i40e/rte_pmd_i40e.h           |  70 +++++++++
 drivers/net/i40e/rte_pmd_i40e_version.map |   2 +
 11 files changed, 578 insertions(+), 33 deletions(-)
  
Jingjing Wu March 30, 2017, 6:18 a.m. UTC | #12
> -----Original Message-----
> From: Xing, Beilei
> Sent: Thursday, March 30, 2017 10:52 AM
> To: Wu, Jingjing <jingjing.wu@intel.com>
> Cc: Zhang, Helin <helin.zhang@intel.com>; dev@dpdk.org
> Subject: [PATCH v8 0/6] dynamic device personalization support
> 
> Due to limited resources of X*710 (parser and analyzer configuration tables,
> number of packet classification types, number of packet types, filters
> configuration tables, etc.), it's impossible to simultaneously support all
> protocols/filters required for different parts on network.
> To enable protocols/filters extensions for X*710, new Admin Command for
> loading user defined configurations is added.
> PPP is a format of extend configuration for X*710, it allows user to load user
> defined configuration to X*710.
> 
> List of possible use cases for extended X*710 configuration using profiles could
> include following:
> Configuring Analyzer/Parser to support new protocols, e.g.
> - IP L2TPv3 tunneling protocol
> - IPSec ESP/AH protocols
> - MPLSoGRE, MPLSoUDP tunnels
> - GTP-C/GTP-U tunnels
> New PCTYPEs for offloading packet classification to X*710. e.g.
> - new IP Protocol in addition to TCP/UDP/SCTP
> - new TCP/UDP subtypes, like TCP SYN, TCP FIN
> - new PCTYPE for tunneled packets like GTP-C, GTP-U New PTYPEs for packets
> identification, e.g.
> - MAC, MPLS, IP4, UDP
> - MAC, MPLS, MPLS, IP6, TCP
> Fixes for NVM configuration, e.g.
> - list of enabled stat counters to improve throughput
> - parser/analyzer configuration for some corner cases
> 
> v8 changes:
>  Change dynamic device profile to dynamic device personalization.
> 
> v7 changes:
>  Fix one coding style problem.
>  Add condition during ddp processing.
> 
> v6 changes:
>  Change pipeline personalization profile to dynamic device profile.
> 
> v5 changes:
>  Change parameter of rte_pmd_i40e_process_ppp_package to extend
> operation.
>  Change structure rte_pmd_i40e_profile_info.
> 
> v4 changes:
>  Fix compile error with gcc version 4.8.4 (Ubuntu 4.8.4-2ubuntu1~14.04.3).
>  Move ppp related structures to rte_pmd_i40e.h.
>  Not support remove PPP temporarily.
> 
> v3 changes:
>  Move ppp AQ command code to base code.

Series Acked-by Jingjing Wu <jingjing.wu@intel.com>
  
Ferruh Yigit March 30, 2017, 2:05 p.m. UTC | #13
On 3/30/2017 7:18 AM, Wu, Jingjing wrote:
> 
> 
>> -----Original Message-----
>> From: Xing, Beilei
>> Sent: Thursday, March 30, 2017 10:52 AM
>> To: Wu, Jingjing <jingjing.wu@intel.com>
>> Cc: Zhang, Helin <helin.zhang@intel.com>; dev@dpdk.org
>> Subject: [PATCH v8 0/6] dynamic device personalization support
>>
>> Due to limited resources of X*710 (parser and analyzer configuration tables,
>> number of packet classification types, number of packet types, filters
>> configuration tables, etc.), it's impossible to simultaneously support all
>> protocols/filters required for different parts on network.
>> To enable protocols/filters extensions for X*710, new Admin Command for
>> loading user defined configurations is added.
>> PPP is a format of extend configuration for X*710, it allows user to load user
>> defined configuration to X*710.
>>
>> List of possible use cases for extended X*710 configuration using profiles could
>> include following:
>> Configuring Analyzer/Parser to support new protocols, e.g.
>> - IP L2TPv3 tunneling protocol
>> - IPSec ESP/AH protocols
>> - MPLSoGRE, MPLSoUDP tunnels
>> - GTP-C/GTP-U tunnels
>> New PCTYPEs for offloading packet classification to X*710. e.g.
>> - new IP Protocol in addition to TCP/UDP/SCTP
>> - new TCP/UDP subtypes, like TCP SYN, TCP FIN
>> - new PCTYPE for tunneled packets like GTP-C, GTP-U New PTYPEs for packets
>> identification, e.g.
>> - MAC, MPLS, IP4, UDP
>> - MAC, MPLS, MPLS, IP6, TCP
>> Fixes for NVM configuration, e.g.
>> - list of enabled stat counters to improve throughput
>> - parser/analyzer configuration for some corner cases
>>
>> v8 changes:
>>  Change dynamic device profile to dynamic device personalization.
>>
>> v7 changes:
>>  Fix one coding style problem.
>>  Add condition during ddp processing.
>>
>> v6 changes:
>>  Change pipeline personalization profile to dynamic device profile.
>>
>> v5 changes:
>>  Change parameter of rte_pmd_i40e_process_ppp_package to extend
>> operation.
>>  Change structure rte_pmd_i40e_profile_info.
>>
>> v4 changes:
>>  Fix compile error with gcc version 4.8.4 (Ubuntu 4.8.4-2ubuntu1~14.04.3).
>>  Move ppp related structures to rte_pmd_i40e.h.
>>  Not support remove PPP temporarily.
>>
>> v3 changes:
>>  Move ppp AQ command code to base code.
> 
> Series Acked-by Jingjing Wu <jingjing.wu@intel.com>

Series applied to dpdk-next-net/master, thanks.
  

Patch

diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c
index ff98690..eee691d 100644
--- a/app/test-pmd/cmdline_flow.c
+++ b/app/test-pmd/cmdline_flow.c
@@ -159,6 +159,8 @@  enum index {
 	ITEM_SCTP_CKSUM,
 	ITEM_VXLAN,
 	ITEM_VXLAN_VNI,
+	ITEM_MPLS,
+	ITEM_MPLS_LABEL,
 
 	/* Validate/create actions. */
 	ACTIONS,
@@ -432,6 +434,7 @@  static const enum index next_item[] = {
 	ITEM_TCP,
 	ITEM_SCTP,
 	ITEM_VXLAN,
+	ITEM_MPLS,
 	ZERO,
 };
 
@@ -538,6 +541,12 @@  static const enum index item_vxlan[] = {
 	ZERO,
 };
 
+static const enum index item_mpls[] = {
+	ITEM_MPLS_LABEL,
+	ITEM_NEXT,
+	ZERO,
+};
+
 static const enum index next_action[] = {
 	ACTION_END,
 	ACTION_VOID,
@@ -1279,6 +1288,20 @@  static const struct token token_list[] = {
 		.next = NEXT(item_vxlan, NEXT_ENTRY(UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_vxlan, vni)),
 	},
+	[ITEM_MPLS] = {
+		.name = "mpls",
+		.help = "match MPLS header",
+		.priv = PRIV_ITEM(MPLS, sizeof(struct rte_flow_item_mpls)),
+		.next = NEXT(item_mpls),
+		.call = parse_vc,
+	},
+	[ITEM_MPLS_LABEL] = {
+		.name = "label",
+		.help = "MPLS label",
+		.next = NEXT(item_mpls, NEXT_ENTRY(UNSIGNED), item_param),
+		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_mpls,
+					     label_tc_s_ttl)),
+	},
 	/* Validate/create actions. */
 	[ACTIONS] = {
 		.name = "actions",
diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index 80491fc..3c7385a 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -963,6 +963,7 @@  static const struct {
 	MK_FLOW_ITEM(TCP, sizeof(struct rte_flow_item_tcp)),
 	MK_FLOW_ITEM(SCTP, sizeof(struct rte_flow_item_sctp)),
 	MK_FLOW_ITEM(VXLAN, sizeof(struct rte_flow_item_vxlan)),
+	MK_FLOW_ITEM(MPLS, sizeof(struct rte_flow_item_mpls)),
 };
 
 /** Compute storage space needed by item specification. */
diff --git a/drivers/net/i40e/i40e_flow.c b/drivers/net/i40e/i40e_flow.c
index 29f9513..1295f3c 100644
--- a/drivers/net/i40e/i40e_flow.c
+++ b/drivers/net/i40e/i40e_flow.c
@@ -57,6 +57,7 @@ 
 #define I40E_IPV6_FRAG_HEADER	44
 #define I40E_TENANT_ARRAY_NUM	3
 #define I40E_TCI_MASK		0xFFFF
+#define I40E_MPLS_LABEL_MASK	0xFFFFF
 
 static int i40e_flow_validate(struct rte_eth_dev *dev,
 			      const struct rte_flow_attr *attr,
@@ -114,6 +115,12 @@  static int i40e_flow_parse_vxlan_filter(struct rte_eth_dev *dev,
 					const struct rte_flow_action actions[],
 					struct rte_flow_error *error,
 					union i40e_filter_t *filter);
+static int i40e_flow_parse_mpls_filter(struct rte_eth_dev *dev,
+				       const struct rte_flow_attr *attr,
+				       const struct rte_flow_item pattern[],
+				       const struct rte_flow_action actions[],
+				       struct rte_flow_error *error,
+				       union i40e_filter_t *filter);
 static int i40e_flow_destroy_ethertype_filter(struct i40e_pf *pf,
 				      struct i40e_ethertype_filter *filter);
 static int i40e_flow_destroy_tunnel_filter(struct i40e_pf *pf,
@@ -278,6 +285,42 @@  static enum rte_flow_item_type pattern_vxlan_4[] = {
 	RTE_FLOW_ITEM_TYPE_END,
 };
 
+static enum rte_flow_item_type pattern_mpls_1[] = {
+	RTE_FLOW_ITEM_TYPE_ETH,
+	RTE_FLOW_ITEM_TYPE_IPV4,
+	RTE_FLOW_ITEM_TYPE_UDP,
+	RTE_FLOW_ITEM_TYPE_MPLS,
+	RTE_FLOW_ITEM_TYPE_ETH,
+        RTE_FLOW_ITEM_TYPE_END,
+};
+
+static enum rte_flow_item_type pattern_mpls_2[] = {
+	RTE_FLOW_ITEM_TYPE_ETH,
+	RTE_FLOW_ITEM_TYPE_IPV6,
+	RTE_FLOW_ITEM_TYPE_UDP,
+	RTE_FLOW_ITEM_TYPE_MPLS,
+	RTE_FLOW_ITEM_TYPE_ETH,
+        RTE_FLOW_ITEM_TYPE_END,
+};
+
+static enum rte_flow_item_type pattern_mpls_3[] = {
+	RTE_FLOW_ITEM_TYPE_ETH,
+	RTE_FLOW_ITEM_TYPE_IPV4,
+	RTE_FLOW_ITEM_TYPE_GRE,
+	RTE_FLOW_ITEM_TYPE_MPLS,
+	RTE_FLOW_ITEM_TYPE_ETH,
+        RTE_FLOW_ITEM_TYPE_END,
+};
+
+static enum rte_flow_item_type pattern_mpls_4[] = {
+	RTE_FLOW_ITEM_TYPE_ETH,
+	RTE_FLOW_ITEM_TYPE_IPV6,
+	RTE_FLOW_ITEM_TYPE_GRE,
+	RTE_FLOW_ITEM_TYPE_MPLS,
+	RTE_FLOW_ITEM_TYPE_ETH,
+        RTE_FLOW_ITEM_TYPE_END,
+};
+
 static struct i40e_valid_pattern i40e_supported_patterns[] = {
 	/* Ethertype */
 	{ pattern_ethertype, i40e_flow_parse_ethertype_filter },
@@ -303,6 +346,11 @@  static struct i40e_valid_pattern i40e_supported_patterns[] = {
 	{ pattern_vxlan_2, i40e_flow_parse_vxlan_filter },
 	{ pattern_vxlan_3, i40e_flow_parse_vxlan_filter },
 	{ pattern_vxlan_4, i40e_flow_parse_vxlan_filter },
+	/* MPLSoUDP & MPLSoGRE */
+	{ pattern_mpls_1, i40e_flow_parse_mpls_filter },
+	{ pattern_mpls_2, i40e_flow_parse_mpls_filter },
+	{ pattern_mpls_3, i40e_flow_parse_mpls_filter },
+	{ pattern_mpls_4, i40e_flow_parse_mpls_filter },
 };
 
 #define NEXT_ITEM_OF_ACTION(act, actions, index)                        \
@@ -1495,6 +1543,203 @@  i40e_flow_parse_vxlan_filter(struct rte_eth_dev *dev,
 	return ret;
 }
 
+/* 1. Last in item should be NULL as range is not supported.
+ * 2. Supported filter types: MPLS label.
+ * 3. Mask of fields which need to be matched should be
+ *    filled with 1.
+ * 4. Mask of fields which needn't to be matched should be
+ *    filled with 0.
+ */
+static int
+i40e_flow_parse_mpls_pattern(__rte_unused struct rte_eth_dev *dev,
+			      const struct rte_flow_item *pattern,
+			      struct rte_flow_error *error,
+			      struct rte_eth_tunnel_filter_conf *filter)
+{
+	const struct rte_flow_item *item = pattern;
+	const struct rte_flow_item_eth *eth_spec;
+	const struct rte_flow_item_eth *eth_mask;
+	const struct rte_flow_item_eth *i_eth_spec = NULL;
+	const struct rte_flow_item_eth *i_eth_mask = NULL;
+	const struct rte_flow_item_mpls *mpls_spec;
+	const struct rte_flow_item_mpls *mpls_mask;
+	enum rte_flow_item_type item_type;
+	bool mpls_flag = 0;
+	uint32_t mpls_cpu;
+
+	for (; item->type != RTE_FLOW_ITEM_TYPE_END; item++) {
+		if (item->last) {
+			rte_flow_error_set(error, EINVAL,
+					   RTE_FLOW_ERROR_TYPE_ITEM,
+					   item,
+					   "Not support range");
+			return -rte_errno;
+		}
+		item_type = item->type;
+		switch (item_type) {
+		case RTE_FLOW_ITEM_TYPE_ETH:
+			eth_spec = (const struct rte_flow_item_eth *)item->spec;
+			eth_mask = (const struct rte_flow_item_eth *)item->mask;
+
+			if ((!eth_spec && eth_mask) ||
+			    (eth_spec && !eth_mask)) {
+				rte_flow_error_set(error, EINVAL,
+						   RTE_FLOW_ERROR_TYPE_ITEM,
+						   item,
+						   "Invalid ether spec/mask");
+				return -rte_errno;
+			}
+
+			if (eth_spec && eth_mask) {
+				if (!mpls_flag) {
+					rte_flow_error_set(error, EINVAL,
+							   RTE_FLOW_ERROR_TYPE_ITEM,
+							   item,
+							   "Invalid ether spec/mask");
+					return -rte_errno;
+				}
+				/* DST address of inner MAC shouldn't be masked.
+				 * SRC address of Inner MAC should be masked.
+				 */
+				if (!is_broadcast_ether_addr(&eth_mask->dst) ||
+				    !is_zero_ether_addr(&eth_mask->src) ||
+				    eth_mask->type) {
+					rte_flow_error_set(error, EINVAL,
+						   RTE_FLOW_ERROR_TYPE_ITEM,
+						   item,
+						   "Invalid ether spec/mask");
+					return -rte_errno;
+				}
+
+				rte_memcpy(&filter->inner_mac,
+					   &eth_spec->dst,
+					   ETHER_ADDR_LEN);
+
+				i_eth_spec = eth_spec;
+				i_eth_mask = eth_mask;
+			}
+			break;
+		case RTE_FLOW_ITEM_TYPE_IPV4:
+			filter->ip_type = RTE_TUNNEL_IPTYPE_IPV4;
+			/* IPv4 is used to describe protocol,
+			 * spec amd mask should be NULL.
+			 */
+			if (item->spec || item->mask) {
+				rte_flow_error_set(error, EINVAL,
+						   RTE_FLOW_ERROR_TYPE_ITEM,
+						   item,
+						   "Invalid IPv4 item");
+				return -rte_errno;
+			}
+			break;
+		case RTE_FLOW_ITEM_TYPE_IPV6:
+			filter->ip_type = RTE_TUNNEL_IPTYPE_IPV6;
+			/* IPv6 is used to describe protocol,
+			 * spec amd mask should be NULL.
+			 */
+			if (item->spec || item->mask) {
+				rte_flow_error_set(error, EINVAL,
+						   RTE_FLOW_ERROR_TYPE_ITEM,
+						   item,
+						   "Invalid IPv6 item");
+				return -rte_errno;
+			}
+			break;
+		case RTE_FLOW_ITEM_TYPE_UDP:
+			/* UDP is used to describe protocol,
+			 * spec amd mask should be NULL.
+			 */
+			if (item->spec || item->mask) {
+				rte_flow_error_set(error, EINVAL,
+					   RTE_FLOW_ERROR_TYPE_ITEM,
+					   item,
+					   "Invalid UDP item");
+				return -rte_errno;
+			}
+			break;
+		case RTE_FLOW_ITEM_TYPE_GRE:
+			/* GRE is used to describe protocol,
+			 * spec amd mask should be NULL.
+			 */
+			if (item->spec || item->mask) {
+				rte_flow_error_set(error, EINVAL,
+						   RTE_FLOW_ERROR_TYPE_ITEM,
+						   item,
+						   "Invalid GRE item");
+				return -rte_errno;
+			}
+			break;
+		case RTE_FLOW_ITEM_TYPE_MPLS:
+			mpls_spec =
+				(const struct rte_flow_item_mpls *)item->spec;
+			mpls_mask =
+				(const struct rte_flow_item_mpls *)item->mask;
+
+			if (!mpls_spec || !mpls_mask) {
+				rte_flow_error_set(error, EINVAL,
+					   RTE_FLOW_ERROR_TYPE_ITEM,
+					   item,
+					   "Invalid VXLAN item");
+				return -rte_errno;
+			}
+
+			if ((mpls_mask->label_tc_s_ttl &
+			     rte_cpu_to_be_32(I40E_MPLS_LABEL_MASK)) !=
+			    rte_cpu_to_be_32(I40E_MPLS_LABEL_MASK)) {
+				rte_flow_error_set(error, EINVAL,
+						   RTE_FLOW_ERROR_TYPE_ITEM,
+						   item,
+						   "Invalid VXLAN mask");
+				return -rte_errno;
+			}
+
+			mpls_cpu = rte_be_to_cpu_32(mpls_spec->label_tc_s_ttl);
+			filter->tenant_id = mpls_cpu & I40E_MPLS_LABEL_MASK;
+			mpls_flag = 1;
+			break;
+		default:
+			break;
+		}
+	}
+
+	if (i_eth_spec && i_eth_mask && mpls_spec && mpls_mask)
+		filter->filter_type = RTE_TUNNEL_FILTER_IMAC_TENID;
+
+	filter->tunnel_type = RTE_TUNNEL_TYPE_VXLAN;
+
+	return 0;
+}
+
+static int
+i40e_flow_parse_mpls_filter(struct rte_eth_dev *dev,
+			    const struct rte_flow_attr *attr,
+			    const struct rte_flow_item pattern[],
+			    const struct rte_flow_action actions[],
+			    struct rte_flow_error *error,
+			    union i40e_filter_t *filter)
+{
+	struct rte_eth_tunnel_filter_conf *tunnel_filter =
+		&filter->tunnel_filter;
+	int ret;
+
+	ret = i40e_flow_parse_mpls_pattern(dev, pattern,
+					   error, tunnel_filter);
+	if (ret)
+		return ret;
+
+	ret = i40e_flow_parse_tunnel_action(dev, actions, error, tunnel_filter);
+	if (ret)
+		return ret;
+
+	ret = i40e_flow_parse_attr(attr, error);
+	if (ret)
+		return ret;
+
+	cons_filter_type = RTE_ETH_FILTER_TUNNEL;
+
+	return ret;
+}
+
 static int
 i40e_flow_validate(struct rte_eth_dev *dev,
 		   const struct rte_flow_attr *attr,
diff --git a/lib/librte_ether/rte_flow.h b/lib/librte_ether/rte_flow.h
index 171a569..25d8e3c 100644
--- a/lib/librte_ether/rte_flow.h
+++ b/lib/librte_ether/rte_flow.h
@@ -282,6 +282,20 @@  enum rte_flow_item_type {
 	 * See struct rte_flow_item_nvgre.
 	 */
 	RTE_FLOW_ITEM_TYPE_NVGRE,
+
+	/**
+	 * Matches a MPLS header.
+	 *
+	 * See struct rte_flow_item_mpls.
+	 */
+	RTE_FLOW_ITEM_TYPE_MPLS,
+
+	/**
+	 * Matches a GRE header.
+	 *
+	 * See struct rte_flow_item_gre.
+	 */
+	RTE_FLOW_ITEM_TYPE_GRE,
 };
 
 /**
@@ -599,6 +613,34 @@  struct rte_flow_item_nvgre {
 };
 
 /**
+ * RTE_FLOW_ITEM_TYPE_MPLS.
+ *
+ * Matches a MPLS header.
+ */
+struct rte_flow_item_mpls {
+	/**
+	 * Lable (20b), TC (3b), Bottom of Stack (1b), TTL (8b).
+	 */
+	uint32_t label_tc_s_ttl;
+};
+
+/**
+ * RTE_FLOW_ITEM_TYPE_GRE.
+ *
+ * Matches a GRE header.
+ */
+struct rte_flow_item_gre {
+	/**
+	 * Checksum (1b), reserved 0 (12b), version (3b).
+	 * Refer to RFC 2784.
+	 */
+	uint16_t c_rsvd0_ver;
+	uint16_t protocol; /**< Protocol type. */
+	uint16_t checksum;
+	uint16_t rsvd1;
+};
+
+/**
  * Matching pattern item definition.
  *
  * A pattern is formed by stacking items starting from the lowest protocol