librte_net: define TCP flags in rte_tcp.h instead of in rte_eth_ctrl.h
PATCH 1/1 librte_net: define TCP flags in rte_tcp.h instead of in rte_eth_ctrl.h
Hi Olivier,
I submitted the below patch about a month ago, and nothing happened. The patch is simple and obvious. Is something wrong with it, or did I not follow the submission process correctly?
Med venlig hilsen / kind regards
Morten Brørup
CTO
SmartShare Systems A/S
Tonsbakken 16-18
DK-2740 Skovlunde
Denmark
Office +45 70 20 00 93
Direct +45 89 93 50 22
Mobile +45 25 40 82 12
[email protected]
www.smartsharesystems.com
-----Original Message-----
From: Morten Brørup [mailto:[email protected]]
Sent: Friday, April 5, 2019 11:55 AM
To: [email protected]; [email protected]; [email protected]; [email protected]
Cc: [email protected]; Morten Brørup
Subject: [PATCH] librte_net: define TCP flags in rte_tcp.h instead of in rte_eth_ctrl.h
--- app/test-pmd/cmdline.c | 4 ++-- drivers/net/e1000/igb_ethdev.c | 8 ++++---- lib/librte_ethdev/rte_eth_ctrl.h | 8 +------- lib/librte_net/rte_tcp.h | 13 +++++++++++++ 4 files changed, 20 insertions(+), 13 deletions(-)
app/test-pmd/cmdline.c +2 -2
@@ -9983,7 +9983,7 @@ cmd_2tuple_filter_parsed(void *parsed_result, " when protocol is TCP.\n");return ; } -if (res->tcp_flags_value >TCP_FLAG_ALL ) { +if (res->tcp_flags_value >RTE_NTUPLE_TCP_FLAGS_MASK ) {printf ("invalid TCP flags.\n" );return ; }
@@ -10141,7 +10141,7 @@ cmd_5tuple_filter_parsed(void *parsed_result, " when protocol is TCP.\n");return ; } -if (res->tcp_flags_value >TCP_FLAG_ALL ) { +if (res->tcp_flags_value >RTE_NTUPLE_TCP_FLAGS_MASK ) {printf ("invalid TCP flags.\n" );return ; }
drivers/net/e1000/igb_ethdev.c +4 -4
@@ -3702,7 +3702,7 @@ ntuple_filter_to_2tuple(struct rte_eth_ntuple_filter *filter,return -EINVAL ;if (filter->priority >E1000_2TUPLE_MAX_PRI )return -EINVAL ;/* filter index is out of range. */ -if (filter->tcp_flags >TCP_FLAG_ALL ) +if (filter->tcp_flags >RTE_NTUPLE_TCP_FLAGS_MASK )return -EINVAL ;/* flags is invalid. */ switch (filter->dst_port_mask) {
@@ -3782,7 +3782,7 @@ igb_inject_2uple_filter(struct rte_eth_dev *dev, ttqf &= ~E1000_TTQF_MASK_ENABLE ;/* tcp flags bits setting. */ -if (filter->filter_info.tcp_flags &TCP_FLAG_ALL ) { +if (filter->filter_info.tcp_flags &RTE_NTUPLE_TCP_FLAGS_MASK ) {if (filter->filter_info.tcp_flags &TCP_URG_FLAG ) imir_ext |=E1000_IMIREXT_CTRL_URG ;if (filter->filter_info.tcp_flags &TCP_ACK_FLAG )
@@ -4188,7 +4188,7 @@ ntuple_filter_to_5tuple_82576(struct rte_eth_ntuple_filter *filter,return -EINVAL ;if (filter->priority >E1000_2TUPLE_MAX_PRI )return -EINVAL ;/* filter index is out of range. */ -if (filter->tcp_flags >TCP_FLAG_ALL ) +if (filter->tcp_flags >RTE_NTUPLE_TCP_FLAGS_MASK )return -EINVAL ;/* flags is invalid. */ switch (filter->dst_ip_mask) {
@@ -4318,7 +4318,7 @@ igb_inject_5tuple_filter_82576(struct rte_eth_dev *dev, imir |= filter->filter_info.priority <<E1000_IMIR_PRIORITY_SHIFT ;/* tcp flags bits setting. */ -if (filter->filter_info.tcp_flags &TCP_FLAG_ALL ) { +if (filter->filter_info.tcp_flags &RTE_NTUPLE_TCP_FLAGS_MASK ) {if (filter->filter_info.tcp_flags &TCP_URG_FLAG ) imir_ext |=E1000_IMIREXT_CTRL_URG ;if (filter->filter_info.tcp_flags &TCP_ACK_FLAG )
lib/librte_ethdev/rte_eth_ctrl.h +1 -7
@@ -184,13 +184,7 @@ struct rte_eth_syn_filter { RTE_NTUPLE_FLAGS_DST_PORT | \ RTE_NTUPLE_FLAGS_PROTO) -#define TCP_URG_FLAG 0x20 -#define TCP_ACK_FLAG 0x10 -#define TCP_PSH_FLAG 0x08 -#define TCP_RST_FLAG 0x04 -#define TCP_SYN_FLAG 0x02 -#define TCP_FIN_FLAG 0x01 -#define TCP_FLAG_ALL 0x3F +#define RTE_NTUPLE_TCP_FLAGS_MASK 0x3F/**< TCP flags filter can match. */ /** * A structure used to define the ntuple filter entry
lib/librte_net/rte_tcp.h +13 -0
@@ -2,6 +2,7 @@* Copyright(c) 1982, 1986, 1990, 1993 * The Regents of the University of California. * Copyright(c) 2010-2014 Intel Corporation. +* Copyright(c) 2019 SmartShare Systems. * All rights reserved. */
@@ -35,6 +36,18 @@ struct tcp_hdr {uint16_t tcp_urp;/**< TCP urgent pointer, if any. */ } __attribute__((__packed__)); +/** +* TCP Flags +*/ +#define TCP_CWR_FLAG 0x80/**< Congestion Window Reduced */ +#define TCP_ECE_FLAG 0x40/**< ECN-Echo */ +#define TCP_URG_FLAG 0x20/**< Urgent Pointer field significant */ +#define TCP_ACK_FLAG 0x10/**< Acknowledgment field significant */ +#define TCP_PSH_FLAG 0x08/**< Push Function */ +#define TCP_RST_FLAG 0x04/**< Reset the connection */ +#define TCP_SYN_FLAG 0x02/**< Synchronize sequence numbers */ +#define TCP_FIN_FLAG 0x01/**< No more data from sender */ + #ifdef __cplusplus }#endif
Signature · 1 line
1.5.6
Quoted 3 lines · Morten Brørup
Hi Olivier,
I submitted the below patch about a month ago, and nothing happened. The patch is simple and obvious. Is something wrong with it, or did I not follow the submission process correctly?
Hi Morten,
I don't see this mail in mail list (and list archive), or in my inbox (it looks like I am in cc in original mail).
Something may be went wrong in your side while sending, can you please send the patch again?
Quoted 27 lines
Med venlig hilsen / kind regards
Morten Brørup
CTOSmartShare Systems A/S
Tonsbakken 16-18
DK-2740 Skovlunde
DenmarkOffice +45 70 20 00 93
Direct +45 89 93 50 22
Mobile +45 25 40 82 12[email protected]
www.smartsharesystems.com
-----Original Message-----
From: Morten Brørup [mailto:[email protected]]
Sent: Friday, April 5, 2019 11:55 AM
To: [email protected]; [email protected]; [email protected]; [email protected]
Cc: [email protected]; Morten Brørup
Subject: [PATCH]librte_net: define TCP flags inrte_tcp.hinstead of inrte_eth_ctrl.hSigned-off-by Morten Brørup <[email protected]>
<...>
Hi Ferruh,
Thanks for the detailed feedback. There seems to be a problem with my mail configuration on our development server. I will fix and send again.
Sorry about the inconvenience.
Med venlig hilsen / kind regards
- Morten Brørup
Quoted 57 lines
-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Ferruh Yigit
Sent: Friday, May 10, 2019 11:41 AM
To: Morten Brørup; Olivier Matz
Cc: [email protected]
Subject: Re: [dpdk-dev] FW: [PATCH]librte_net: define TCP flags inrte_tcp.hinstead of inrte_eth_ctrl.hQuoted 3 lines · Morten Brørup
Hi Olivier,
I submitted the below patch about a month ago, and nothing happened.
The patch is simple and obvious. Is something wrong with it, or did I not follow the submission process correctly?
Hi Morten,
I don't see this mail in mail list (and list archive), or in my inbox (it looks
like I am in cc in original mail).Something may be went wrong in your side while sending, can you please send the
patch again?Quoted 17 lines
Med venlig hilsen / kind regards
Morten Brørup
CTOSmartShare Systems A/S
Tonsbakken 16-18
DK-2740 Skovlunde
DenmarkOffice +45 70 20 00 93
Direct +45 89 93 50 22
Mobile +45 25 40 82 12Quoted 6 lines
[email protected] www.smartsharesystems.com
-----Original Message-----
From: Morten Brørup [mailto:[email protected]]
Sent: Friday, April 5, 2019 11:55 AM
To: [email protected]; [email protected];[email protected]; [email protected]
Quoted 2 lines
Cc: [email protected]; Morten Brørup
Subject: [PATCH]librte_net: define TCP flags inrte_tcp.hinstead ofin
rte_eth_ctrl.hQuoted 2 lines
Signed-off-by Morten Brørup <[email protected]><...>