From: Paolo Abeni <pabeni@redhat.com>
To: chia-yu.chang@nokia-bell-labs.com, netdev@vger.kernel.org,
davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
dsahern@kernel.org, netfilter-devel@vger.kernel.org,
kadlec@netfilter.org, coreteam@netfilter.org,
pablo@netfilter.org, bpf@vger.kernel.org,
joel.granados@kernel.org, linux-fsdevel@vger.kernel.org,
kees@kernel.org, mcgrof@kernel.org, ij@kernel.org,
ncardwell@google.com, koen.de_schepper@nokia-bell-labs.com,
g.white@CableLabs.com, ingemar.s.johansson@ericsson.com,
mirja.kuehlewind@ericsson.com, cheshire@apple.com,
rs.ietf@gmx.at, Jason_Livingood@comcast.com,
vidhi_goel@apple.com
Subject: Re: [PATCH v4 net-next 04/14] tcp: extend TCP flags to allow AE bit/ACE field
Date: Tue, 29 Oct 2024 12:45:01 +0100 [thread overview]
Message-ID: <6b5b7133-0dee-4539-8109-674f236e0fa5@redhat.com> (raw)
In-Reply-To: <3f194c95-5633-42c2-802a-9a04b4a33a8c@redhat.com>
On 10/29/24 12:43, Paolo Abeni wrote:
> On 10/21/24 23:59, chia-yu.chang@nokia-bell-labs.com wrote:
>> diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c
>> index 9d3dd101ea71..9fe314a59240 100644
>> --- a/net/ipv4/tcp_ipv4.c
>> +++ b/net/ipv4/tcp_ipv4.c
>> @@ -2162,7 +2162,8 @@ static void tcp_v4_fill_cb(struct sk_buff *skb, const struct iphdr *iph,
>> TCP_SKB_CB(skb)->end_seq = (TCP_SKB_CB(skb)->seq + th->syn + th->fin +
>> skb->len - th->doff * 4);
>> TCP_SKB_CB(skb)->ack_seq = ntohl(th->ack_seq);
>> - TCP_SKB_CB(skb)->tcp_flags = tcp_flag_byte(th);
>> + TCP_SKB_CB(skb)->tcp_flags = ntohs(*(__be16 *)&tcp_flag_word(th)) &
>> + TCPHDR_FLAGS_MASK;
>
> As you access the same 2 bytes even later.
[Whoops, sorry part of the reply was unintentionally stripped.]
I suggest creating a specific helper to fetch them.
/P
next prev parent reply other threads:[~2024-10-29 11:45 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-21 21:58 [PATCH v4 net-next 00/14] AccECN protocol preparation patch series chia-yu.chang
2024-10-21 21:58 ` [PATCH v4 net-next 01/14] tcp: reorganize tcp_in_ack_event() and tcp_count_delivered() chia-yu.chang
2024-10-21 21:58 ` [PATCH v4 net-next 02/14] tcp: create FLAG_TS_PROGRESS chia-yu.chang
2024-10-21 21:58 ` [PATCH v4 net-next 03/14] tcp: use BIT() macro in include/net/tcp.h chia-yu.chang
2024-10-21 21:59 ` [PATCH v4 net-next 04/14] tcp: extend TCP flags to allow AE bit/ACE field chia-yu.chang
2024-10-29 11:43 ` Paolo Abeni
2024-10-29 11:45 ` Paolo Abeni [this message]
2024-10-21 21:59 ` [PATCH v4 net-next 05/14] tcp: reorganize SYN ECN code chia-yu.chang
2024-10-21 21:59 ` [PATCH v4 net-next 06/14] tcp: rework {__,}tcp_ecn_check_ce() -> tcp_data_ecn_check() chia-yu.chang
2024-10-21 21:59 ` [PATCH v4 net-next 07/14] tcp: helpers for ECN mode handling chia-yu.chang
2024-10-21 21:59 ` [PATCH v4 net-next 08/14] gso: AccECN support chia-yu.chang
2024-10-21 21:59 ` [PATCH v4 net-next 09/14] gro: prevent ACE field corruption & better AccECN handling chia-yu.chang
2024-10-29 12:03 ` Paolo Abeni
2024-10-29 21:17 ` Ilpo Järvinen
2024-10-21 21:59 ` [PATCH v4 net-next 10/14] tcp: AccECN support to tcp_add_backlog chia-yu.chang
2024-10-21 21:59 ` [PATCH v4 net-next 11/14] tcp: allow ECN bits in TOS/traffic class chia-yu.chang
2024-10-29 12:18 ` Paolo Abeni
2024-10-21 21:59 ` [PATCH v4 net-next 12/14] tcp: Pass flags to __tcp_send_ack chia-yu.chang
2024-10-21 21:59 ` [PATCH v4 net-next 13/14] tcp: fast path functions later chia-yu.chang
2024-10-21 21:59 ` [PATCH v4 net-next 14/14] net: sysctl: introduce sysctl SYSCTL_FIVE chia-yu.chang
2024-10-29 12:26 ` Paolo Abeni
2024-10-29 21:29 ` Ilpo Järvinen
2024-10-31 14:08 ` Joel Granados
2024-10-31 15:44 ` Chia-Yu Chang (Nokia)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6b5b7133-0dee-4539-8109-674f236e0fa5@redhat.com \
--to=pabeni@redhat.com \
--cc=Jason_Livingood@comcast.com \
--cc=bpf@vger.kernel.org \
--cc=cheshire@apple.com \
--cc=chia-yu.chang@nokia-bell-labs.com \
--cc=coreteam@netfilter.org \
--cc=davem@davemloft.net \
--cc=dsahern@kernel.org \
--cc=edumazet@google.com \
--cc=g.white@CableLabs.com \
--cc=ij@kernel.org \
--cc=ingemar.s.johansson@ericsson.com \
--cc=joel.granados@kernel.org \
--cc=kadlec@netfilter.org \
--cc=kees@kernel.org \
--cc=koen.de_schepper@nokia-bell-labs.com \
--cc=kuba@kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=mcgrof@kernel.org \
--cc=mirja.kuehlewind@ericsson.com \
--cc=ncardwell@google.com \
--cc=netdev@vger.kernel.org \
--cc=netfilter-devel@vger.kernel.org \
--cc=pablo@netfilter.org \
--cc=rs.ietf@gmx.at \
--cc=vidhi_goel@apple.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox