* [dpdk-dev] [PATCH v2] net/mlx5: add ptype table idx for TCP ACK packets
@ 2018-03-30 5:13 Bin Huang
2018-03-30 17:22 ` Yongseok Koh
0 siblings, 1 reply; 3+ messages in thread
From: Bin Huang @ 2018-03-30 5:13 UTC (permalink / raw)
To: nelio.laranjeiro, yskoh
Cc: dev, adrien.mazarguil, bin.huang, jie2.liu, bing.zhao, zhiqiang.zhang
From: Bin Huang <bin.huang@hxt-semitech.com>
According to CQE format:
- l4_hdr_type:
0 - None
1 - TCP header was present in the packet
2 - UDP header was present in the packet
3 - TCP header was present in the packet with Empty
TCP ACK indication. (TCP packet <ACK> flag is set,
and packet carries no data)
4 - TCP header was present in the packet with TCP ACK indication.
(TCP packet <ACK> flag is set, and packet carries data).
A packet should be identified as TCP packet if l4_hdr_type is 1, 3 or 4.
Add corresponding idx of TCP ACK to ptype table.
previous discussion:
https://www.mail-archive.com/users@dpdk.org/msg02980.html
Signed-off-by: Bin Huang <bin.huang@hxt-semitech.com>
---
v1: initial version
v2: following review comments from Yongseok
drivers/net/mlx5/mlx5_rxtx.c | 40 ++++++++++++++++++++++++++++++++++++++++
1 file changed, 40 insertions(+)
diff --git a/drivers/net/mlx5/mlx5_rxtx.c b/drivers/net/mlx5/mlx5_rxtx.c
index dc4ead9..3cf4c24 100644
--- a/drivers/net/mlx5/mlx5_rxtx.c
+++ b/drivers/net/mlx5/mlx5_rxtx.c
@@ -86,6 +86,14 @@
RTE_PTYPE_L4_TCP;
(*p)[0x06] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN |
RTE_PTYPE_L4_TCP;
+ (*p)[0x0d] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN |
+ RTE_PTYPE_L4_TCP;
+ (*p)[0x0e] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN |
+ RTE_PTYPE_L4_TCP;
+ (*p)[0x11] = RTE_PTYPE_L2_ET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RTE_PTYPE_L3_IPV6_EXT_UNKNOWN |
+ RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN |
+ RTE_PTYPE_INNER_L4_TCP;
/* Tunneled - UDP */
(*p)[0x49] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN |
RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN |
--
1.9.0
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dpdk-dev] [PATCH v2] net/mlx5: add ptype table idx for TCP ACK packets
2018-03-30 5:13 [dpdk-dev] [PATCH v2] net/mlx5: add ptype table idx for TCP ACK packets Bin Huang
@ 2018-03-30 17:22 ` Yongseok Koh
2018-04-01 7:44 ` Shahaf Shuler
0 siblings, 1 reply; 3+ messages in thread
From: Yongseok Koh @ 2018-03-30 17:22 UTC (permalink / raw)
To: Bin Huang
Cc: nelio.laranjeiro, dev, adrien.mazarguil, bin.huang, jie2.liu,
bing.zhao, zhiqiang.zhang
On Fri, Mar 30, 2018 at 01:13:38PM +0800, Bin Huang wrote:
> From: Bin Huang <bin.huang@hxt-semitech.com>
>
> According to CQE format:
> - l4_hdr_type:
> 0 - None
> 1 - TCP header was present in the packet
> 2 - UDP header was present in the packet
> 3 - TCP header was present in the packet with Empty
> TCP ACK indication. (TCP packet <ACK> flag is set,
> and packet carries no data)
> 4 - TCP header was present in the packet with TCP ACK indication.
> (TCP packet <ACK> flag is set, and packet carries data).
>
> A packet should be identified as TCP packet if l4_hdr_type is 1, 3 or 4.
> Add corresponding idx of TCP ACK to ptype table.
>
> previous discussion:
> https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.mail-archive.com%2Fusers%40dpdk.org%2Fmsg02980.html&data=02%7C01%7Cyskoh%40mellanox.com%7Ca4f58bc587d041482c9308d595fd16f7%7Ca652971c7d2e4d9ba6a4d149256f461b%7C0%7C0%7C636579836609612796&sdata=wyfDNPG1EZQSzAyaWxfIfMnqjWZ9vdeLz1EZFzHx6Cw%3D&reserved=0
>
> Signed-off-by: Bin Huang <bin.huang@hxt-semitech.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
Thank you!
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dpdk-dev] [PATCH v2] net/mlx5: add ptype table idx for TCP ACK packets
2018-03-30 17:22 ` Yongseok Koh
@ 2018-04-01 7:44 ` Shahaf Shuler
0 siblings, 0 replies; 3+ messages in thread
From: Shahaf Shuler @ 2018-04-01 7:44 UTC (permalink / raw)
To: Yongseok Koh, Bin Huang
Cc: Nélio Laranjeiro, dev, Adrien Mazarguil, bin.huang,
jie2.liu, bing.zhao, zhiqiang.zhang
Friday, March 30, 2018 8:22 PM, Yongseok Koh:
> Subject: Re: [dpdk-dev] [PATCH v2] net/mlx5: add ptype table idx for TCP
> ACK packets
>
> On Fri, Mar 30, 2018 at 01:13:38PM +0800, Bin Huang wrote:
> > From: Bin Huang <bin.huang@hxt-semitech.com>
> >
> > According to CQE format:
> > - l4_hdr_type:
> > 0 - None
> > 1 - TCP header was present in the packet
> > 2 - UDP header was present in the packet
> > 3 - TCP header was present in the packet with Empty
> > TCP ACK indication. (TCP packet <ACK> flag is set,
> > and packet carries no data)
> > 4 - TCP header was present in the packet with TCP ACK indication.
> > (TCP packet <ACK> flag is set, and packet carries data).
> >
> > A packet should be identified as TCP packet if l4_hdr_type is 1, 3 or 4.
> > Add corresponding idx of TCP ACK to ptype table.
> >
> > previous discussion:
> >
> https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fw
> ww.mail-
> archive.com%2Fusers%40dpdk.org%2Fmsg02980.html&data=02%7C01%7Cys
> koh%40mellanox.com%7Ca4f58bc587d041482c9308d595fd16f7%7Ca652971c7
> d2e4d9ba6a4d149256f461b%7C0%7C0%7C636579836609612796&sdata=wyfD
> NPG1EZQSzAyaWxfIfMnqjWZ9vdeLz1EZFzHx6Cw%3D&reserved=0
> >
> > Signed-off-by: Bin Huang <bin.huang@hxt-semitech.com>
> Acked-by: Yongseok Koh <yskoh@mellanox.com>
Applied to next-net-mlx, thanks.
>
> Thank you!
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-04-01 7:44 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-30 5:13 [dpdk-dev] [PATCH v2] net/mlx5: add ptype table idx for TCP ACK packets Bin Huang
2018-03-30 17:22 ` Yongseok Koh
2018-04-01 7:44 ` Shahaf Shuler
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).