[dpdk-dev,v3,1/8] mbuf: support GTP in software packet type parser
Checks
Commit Message
Add support of GTP-C and GTP-U tunnels in rte_net_get_ptype().
Signed-off-by: Beilei Xing <beilei.xing@intel.com>
---
lib/librte_mbuf/rte_mbuf_ptype.c | 2 ++
lib/librte_mbuf/rte_mbuf_ptype.h | 24 ++++++++++++++++++++++++
2 files changed, 26 insertions(+)
Comments
On Sat, Sep 23, 2017 at 06:35:07AM +0800, Beilei Xing wrote:
> Add support of GTP-C and GTP-U tunnels in rte_net_get_ptype().
>
> Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
This patch set enables RSS/FDIR/cloud filter for GPT-C and GTP-U.
It depends on Kirill's patch:
http://dpdk.org/ml/archives/dev/2017-September/076035.html.
However, Kirill's patchset needs to be updated.
v4 changes:
- Refine fdir related code.
- Rework profile metadata parsing function.
- Fix code style.
v3 changes:
- Rework implementation to support the new profile.
- Add GTPC and GTPU tunnel type in software packet type parser.
- Update ptype info when loading profile.
- Fix bug of updating pctype info.
v2 changes:
- Enable RSS/FDIR/cloud filter dinamicly by checking profile
- Add GTPC and GTPU items to distinguish rule for GTP-C or GTP-U
- Rework FDIR/cloud filter enabling function
Beilei Xing (8):
mbuf: support GTP in software packet type parser
net/i40e: update ptype and pctype info
net/i40e: support RSS for new pctype
ethdev: add GTP items to support flow API
net/i40e: finish integration FDIR with generic flow API
net/i40e: add FDIR support for GTP-C and GTP-U
net/i40e: add cloud filter parsing function for GTP
net/i40e: enable cloud filter for GTP-C and GTP-U
app/test-pmd/cmdline_flow.c | 40 ++
app/test-pmd/config.c | 3 +
doc/guides/prog_guide/rte_flow.rst | 18 +
doc/guides/testpmd_app_ug/testpmd_funcs.rst | 4 +
drivers/net/i40e/i40e_ethdev.c | 530 +++++++++++++++++++++++++-
drivers/net/i40e/i40e_ethdev.h | 156 +++++++-
drivers/net/i40e/i40e_fdir.c | 572 +++++++++++++++++++++++++++-
drivers/net/i40e/i40e_flow.c | 496 ++++++++++++++++++++----
drivers/net/i40e/rte_pmd_i40e.c | 6 +-
lib/librte_ether/rte_flow.h | 52 +++
lib/librte_mbuf/rte_mbuf_ptype.c | 2 +
lib/librte_mbuf/rte_mbuf_ptype.h | 24 ++
12 files changed, 1775 insertions(+), 128 deletions(-)
This patch set enables RSS/FDIR/cloud filter for GPT-C and GTP-U.
It depends on Kirill's patch:
http://dpdk.org/ml/archives/dev/2017-September/076035.html.
However, Kirill's patchset needs to be updated.
v5 changes:
- Fix code style.
- Reword commit log.
v4 changes:
- Refine fdir related code.
- Rework profile metadata parsing function.
- Fix code style.
v3 changes:
- Rework implementation to support the new profile.
- Add GTPC and GTPU tunnel type in software packet type parser.
- Update ptype info when loading profile.
- Fix bug of updating pctype info.
v2 changes:
- Enable RSS/FDIR/cloud filter dinamicly by checking profile
- Add GTPC and GTPU items to distinguish rule for GTP-C or GTP-U
- Rework FDIR/cloud filter enabling function
Beilei Xing (8):
mbuf: support GTP in software packet type parser
net/i40e: update ptype and pctype info
net/i40e: support RSS for new pctype
ethdev: add GTP items to support flow API
net/i40e: finish integration FDIR with generic flow API
net/i40e: add FDIR support for GTP-C and GTP-U
net/i40e: add cloud filter parsing function for GTP
net/i40e: enable cloud filter for GTP-C and GTP-U
app/test-pmd/cmdline_flow.c | 40 ++
app/test-pmd/config.c | 3 +
doc/guides/prog_guide/rte_flow.rst | 18 +
doc/guides/testpmd_app_ug/testpmd_funcs.rst | 4 +
drivers/net/i40e/i40e_ethdev.c | 534 +++++++++++++++++++++++++-
drivers/net/i40e/i40e_ethdev.h | 156 +++++++-
drivers/net/i40e/i40e_fdir.c | 570 +++++++++++++++++++++++++++-
drivers/net/i40e/i40e_flow.c | 496 ++++++++++++++++++++----
drivers/net/i40e/rte_pmd_i40e.c | 6 +-
lib/librte_ether/rte_flow.h | 52 +++
lib/librte_mbuf/rte_mbuf_ptype.c | 2 +
lib/librte_mbuf/rte_mbuf_ptype.h | 24 ++
12 files changed, 1775 insertions(+), 130 deletions(-)
This patch set enables RSS/FDIR/cloud filter for GPT-C and GTP-U.
It depends on Kirill's patch:
http://www.dpdk.org/dev/patchwork/patch/29325/
v6 changes:
- Reword description of GTP item and GTP structure, mainly support
GTPv1, not include GTPv0 and GTPv2.
v5 changes:
- Fix code style.
- Reword commit log.
v4 changes:
- Refine fdir related code.
- Rework profile metadata parsing function.
- Fix code style.
v3 changes:
- Rework implementation to support the new profile.
- Add GTPC and GTPU tunnel type in software packet type parser.
- Update ptype info when loading profile.
- Fix bug of updating pctype info.
v2 changes:
- Enable RSS/FDIR/cloud filter dinamicly by checking profile
- Add GTPC and GTPU items to distinguish rule for GTP-C or GTP-U
- Rework FDIR/cloud filter enabling function
Beilei Xing (8):
mbuf: support GTP in software packet type parser
net/i40e: update ptype and pctype info
support RSS for new pctype
ethdev: add GTP items to support flow API
net/i40e: finish integration FDIR with generic flow API
net/i40e: add FDIR support for GTP-C and GTP-U
net/i40e: add cloud filter parsing function for GTP
net/i40e: enable cloud filter for GTP-C and GTP-U
app/test-pmd/cmdline_flow.c | 40 ++
app/test-pmd/config.c | 3 +
doc/guides/prog_guide/rte_flow.rst | 17 +
doc/guides/testpmd_app_ug/testpmd_funcs.rst | 4 +
drivers/net/i40e/i40e_ethdev.c | 535 +++++++++++++++++++++++++-
drivers/net/i40e/i40e_ethdev.h | 156 +++++++-
drivers/net/i40e/i40e_fdir.c | 570 +++++++++++++++++++++++++++-
drivers/net/i40e/i40e_flow.c | 496 ++++++++++++++++++++----
drivers/net/i40e/rte_pmd_i40e.c | 6 +-
lib/librte_ether/rte_flow.h | 52 +++
lib/librte_mbuf/rte_mbuf_ptype.c | 2 +
lib/librte_mbuf/rte_mbuf_ptype.h | 24 ++
12 files changed, 1775 insertions(+), 130 deletions(-)
This patch set enables RSS/FDIR/cloud filter for GPT-C and GTP-U.
It depends on Kirill's patch:
http://www.dpdk.org/dev/patchwork/patch/29325/
v7 changes:
- Distinguish GTP-C request and response message in mbuf description.
- Clarify GTP-C response message is not supported.
- Version_type 0x30 is invalid for GTP-C, replace with 0x32.
- Refine metadata parsing function.
- Rework for checking fdir programming status.
v6 changes:
- Reword description of GTP item and GTP structure, mainly support
GTPv1, not include GTPv0 and GTPv2.
v5 changes:
- Fix code style.
- Reword commit log.
v4 changes:
- Refine fdir related code.
- Rework profile metadata parsing function.
- Fix code style.
v3 changes:
- Rework implementation to support the new profile.
- Add GTPC and GTPU tunnel type in software packet type parser.
- Update ptype info when loading profile.
- Fix bug of updating pctype info.
v2 changes:
- Enable RSS/FDIR/cloud filter dinamicly by checking profile
- Add GTPC and GTPU items to distinguish rule for GTP-C or GTP-U
- Rework FDIR/cloud filter enabling function
Beilei Xing (8):
mbuf: support GTP in software packet type parser
net/i40e: update ptype and pctype info
net/i40e: support RSS for new pctype
ethdev: add GTP items to support flow API
net/i40e: finish integration FDIR with generic flow API
net/i40e: add FDIR support for GTP-C and GTP-U
net/i40e: add cloud filter parsing function for GTP
net/i40e: enable cloud filter for GTP-C and GTP-U
app/test-pmd/cmdline_flow.c | 40 ++
app/test-pmd/config.c | 3 +
doc/guides/prog_guide/rte_flow.rst | 17 +
doc/guides/testpmd_app_ug/testpmd_funcs.rst | 4 +
drivers/net/i40e/i40e_ethdev.c | 531 ++++++++++++++++++++++++-
drivers/net/i40e/i40e_ethdev.h | 156 +++++++-
drivers/net/i40e/i40e_fdir.c | 587 +++++++++++++++++++++++++++-
drivers/net/i40e/i40e_flow.c | 502 ++++++++++++++++++++----
drivers/net/i40e/rte_pmd_i40e.c | 6 +-
lib/librte_ether/rte_flow.h | 52 +++
lib/librte_mbuf/rte_mbuf_ptype.c | 2 +
lib/librte_mbuf/rte_mbuf_ptype.h | 32 ++
12 files changed, 1800 insertions(+), 132 deletions(-)
On 9/29/2017 4:50 PM, Beilei Xing wrote:
> This patch set enables RSS/FDIR/cloud filter for GPT-C and GTP-U.
> It depends on Kirill's patch:
> http://www.dpdk.org/dev/patchwork/patch/29325/
>
> v7 changes:
> - Distinguish GTP-C request and response message in mbuf description.
> - Clarify GTP-C response message is not supported.
> - Version_type 0x30 is invalid for GTP-C, replace with 0x32.
> - Refine metadata parsing function.
> - Rework for checking fdir programming status.
>
> v6 changes:
> - Reword description of GTP item and GTP structure, mainly support
> GTPv1, not include GTPv0 and GTPv2.
>
> v5 changes:
> - Fix code style.
> - Reword commit log.
>
> v4 changes:
> - Refine fdir related code.
> - Rework profile metadata parsing function.
> - Fix code style.
>
> v3 changes:
> - Rework implementation to support the new profile.
> - Add GTPC and GTPU tunnel type in software packet type parser.
> - Update ptype info when loading profile.
> - Fix bug of updating pctype info.
>
>
> v2 changes:
> - Enable RSS/FDIR/cloud filter dinamicly by checking profile
> - Add GTPC and GTPU items to distinguish rule for GTP-C or GTP-U
> - Rework FDIR/cloud filter enabling function
>
> Beilei Xing (8):
> mbuf: support GTP in software packet type parser
> net/i40e: update ptype and pctype info
> net/i40e: support RSS for new pctype
> ethdev: add GTP items to support flow API
> net/i40e: finish integration FDIR with generic flow API
> net/i40e: add FDIR support for GTP-C and GTP-U
> net/i40e: add cloud filter parsing function for GTP
> net/i40e: enable cloud filter for GTP-C and GTP-U
Series Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
I don't know about GTP internals , but set passes from my scripts.
But there was a merge conflict (on top of master tree) on patch 3, it is
easy to resolve but I wonder if there is a dependency not mentioned? If
not can you please double check the patch.
This patch set enables RSS/FDIR/cloud filter for GPT-C and GTP-U.
v8 changes:
- Remove 'enable RSS for new pctype' as it can be set with the
configuration in Kirill's patch.
- Resolve conflicts.
v7 changes:
- Distinguish GTP-C request and response message in mbuf description.
- Clarify GTP-C response message is not supported.
- Version_type 0x30 is invalid for GTP-C, replace with 0x32.
- Refine metadata parsing function.
- Rework for checking fdir programming status.
v6 changes:
- Reword description of GTP item and GTP structure, mainly support
GTPv1, not include GTPv0 and GTPv2.
v5 changes:
- Fix code style.
- Reword commit log.
v4 changes:
- Refine fdir related code.
- Rework profile metadata parsing function.
- Fix code style.
v3 changes:
- Rework implementation to support the new profile.
- Add GTPC and GTPU tunnel type in software packet type parser.
- Update ptype info when loading profile.
- Fix bug of updating pctype info.
v2 changes:
- Enable RSS/FDIR/cloud filter dinamicly by checking profile
- Add GTPC and GTPU items to distinguish rule for GTP-C or GTP-U
- Rework FDIR/cloud filter enabling function
Beilei Xing (7):
mbuf: support GTP in software packet type parser
net/i40e: update ptype and pctype info
ethdev: add GTP items to support flow API
net/i40e: finish integration FDIR with generic flow API
net/i40e: add FDIR support for GTP-C and GTP-U
net/i40e: add cloud filter parsing function for GTP
net/i40e: enable cloud filter for GTP-C and GTP-U
app/test-pmd/cmdline_flow.c | 40 ++
app/test-pmd/config.c | 3 +
doc/guides/prog_guide/rte_flow.rst | 17 +
doc/guides/testpmd_app_ug/testpmd_funcs.rst | 4 +
drivers/net/i40e/i40e_ethdev.c | 505 +++++++++++++++++++++++-
drivers/net/i40e/i40e_ethdev.h | 156 +++++++-
drivers/net/i40e/i40e_fdir.c | 585 +++++++++++++++++++++++++++-
drivers/net/i40e/i40e_flow.c | 503 ++++++++++++++++++++----
drivers/net/i40e/rte_pmd_i40e.c | 6 +-
lib/librte_ether/rte_flow.h | 52 +++
lib/librte_mbuf/rte_mbuf_ptype.c | 2 +
lib/librte_mbuf/rte_mbuf_ptype.h | 32 ++
12 files changed, 1774 insertions(+), 131 deletions(-)
> -----Original Message-----
> From: Xing, Beilei
> Sent: Thursday, October 5, 2017 4:15 PM
> To: Wu, Jingjing <jingjing.wu@intel.com>
> Cc: Chilikin, Andrey <andrey.chilikin@intel.com>; dev@dpdk.org
> Subject: [PATCH v8 0/7] net/i40e: GPT-C and GTP-U enabling
>
> This patch set enables RSS/FDIR/cloud filter for GPT-C and GTP-U.
>
> v8 changes:
> - Remove 'enable RSS for new pctype' as it can be set with the
> configuration in Kirill's patch.
> - Resolve conflicts.
>
> v7 changes:
> - Distinguish GTP-C request and response message in mbuf description.
> - Clarify GTP-C response message is not supported.
> - Version_type 0x30 is invalid for GTP-C, replace with 0x32.
> - Refine metadata parsing function.
> - Rework for checking fdir programming status.
>
> v6 changes:
> - Reword description of GTP item and GTP structure, mainly support
> GTPv1, not include GTPv0 and GTPv2.
>
> v5 changes:
> - Fix code style.
> - Reword commit log.
>
> v4 changes:
> - Refine fdir related code.
> - Rework profile metadata parsing function.
> - Fix code style.
>
> v3 changes:
> - Rework implementation to support the new profile.
> - Add GTPC and GTPU tunnel type in software packet type parser.
> - Update ptype info when loading profile.
> - Fix bug of updating pctype info.
>
>
> v2 changes:
> - Enable RSS/FDIR/cloud filter dinamicly by checking profile
> - Add GTPC and GTPU items to distinguish rule for GTP-C or GTP-U
> - Rework FDIR/cloud filter enabling function
>
> Beilei Xing (7):
> mbuf: support GTP in software packet type parser
> net/i40e: update ptype and pctype info
> ethdev: add GTP items to support flow API
> net/i40e: finish integration FDIR with generic flow API
> net/i40e: add FDIR support for GTP-C and GTP-U
> net/i40e: add cloud filter parsing function for GTP
> net/i40e: enable cloud filter for GTP-C and GTP-U
>
> app/test-pmd/cmdline_flow.c | 40 ++
> app/test-pmd/config.c | 3 +
> doc/guides/prog_guide/rte_flow.rst | 17 +
> doc/guides/testpmd_app_ug/testpmd_funcs.rst | 4 +
> drivers/net/i40e/i40e_ethdev.c | 505 +++++++++++++++++++++++-
> drivers/net/i40e/i40e_ethdev.h | 156 +++++++-
> drivers/net/i40e/i40e_fdir.c | 585 +++++++++++++++++++++++++++-
> drivers/net/i40e/i40e_flow.c | 503 ++++++++++++++++++++----
> drivers/net/i40e/rte_pmd_i40e.c | 6 +-
> lib/librte_ether/rte_flow.h | 52 +++
> lib/librte_mbuf/rte_mbuf_ptype.c | 2 +
> lib/librte_mbuf/rte_mbuf_ptype.h | 32 ++
> 12 files changed, 1774 insertions(+), 131 deletions(-)
>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
Thanks
Jingjing
On 10/5/2017 9:14 AM, Beilei Xing wrote:
> This patch set enables RSS/FDIR/cloud filter for GPT-C and GTP-U.
>
<...>
>
> Beilei Xing (7):
> mbuf: support GTP in software packet type parser
> net/i40e: update ptype and pctype info
> ethdev: add GTP items to support flow API
> net/i40e: finish integration FDIR with generic flow API
> net/i40e: add FDIR support for GTP-C and GTP-U
> net/i40e: add cloud filter parsing function for GTP
> net/i40e: enable cloud filter for GTP-C and GTP-U
Series applied to dpdk-next-net/master, thanks.
@@ -89,6 +89,8 @@ const char *rte_get_ptype_tunnel_name(uint32_t ptype)
case RTE_PTYPE_TUNNEL_NVGRE: return "TUNNEL_NVGRE";
case RTE_PTYPE_TUNNEL_GENEVE: return "TUNNEL_GENEVE";
case RTE_PTYPE_TUNNEL_GRENAT: return "TUNNEL_GRENAT";
+ case RTE_PTYPE_TUNNEL_GTPC: return "TUNNEL_GTPC";
+ case RTE_PTYPE_TUNNEL_GTPU: return "TUNNEL_GTPU";
default: return "TUNNEL_UNKNOWN";
}
}
@@ -383,6 +383,30 @@ extern "C" {
*/
#define RTE_PTYPE_TUNNEL_GRENAT 0x00006000
/**
+ * GTP-C (GPRS Tunnelling Protocol) control tunneling packet type.
+ * Packet format:
+ * <'ether type'=0x0800
+ * | 'version'=4, 'protocol'=17
+ * | 'destination port'=2123>
+ * or,
+ * <'ether type'=0x86DD
+ * | 'version'=6, 'next header'=17
+ * | 'destination port'=2123>
+ */
+#define RTE_PTYPE_TUNNEL_GTPC 0x00007000
+/**
+ * GTP-U (GPRS Tunnelling Protocol) user data tunneling packet type.
+ * Packet format:
+ * <'ether type'=0x0800
+ * | 'version'=4, 'protocol'=17
+ * | 'destination port'=2152>
+ * or,
+ * <'ether type'=0x86DD
+ * | 'version'=6, 'next header'=17
+ * | 'destination port'=2152>
+ */
+#define RTE_PTYPE_TUNNEL_GTPU 0x00008000
+/**
* Mask of tunneling packet types.
*/
#define RTE_PTYPE_TUNNEL_MASK 0x0000f000