From: Stanislav Fomichev <sdf@google.com>
To: "Song, Yoong Siang" <yoong.siang.song@intel.com>
Cc: "bpf@vger.kernel.org" <bpf@vger.kernel.org>,
"ast@kernel.org" <ast@kernel.org>,
"daniel@iogearbox.net" <daniel@iogearbox.net>,
"andrii@kernel.org" <andrii@kernel.org>,
"martin.lau@linux.dev" <martin.lau@linux.dev>,
"song@kernel.org" <song@kernel.org>, "yhs@fb.com" <yhs@fb.com>,
"john.fastabend@gmail.com" <john.fastabend@gmail.com>,
"kpsingh@kernel.org" <kpsingh@kernel.org>,
"haoluo@google.com" <haoluo@google.com>,
"jolsa@kernel.org" <jolsa@kernel.org>,
"kuba@kernel.org" <kuba@kernel.org>,
"toke@kernel.org" <toke@kernel.org>,
"willemb@google.com" <willemb@google.com>,
"dsahern@kernel.org" <dsahern@kernel.org>,
"Karlsson, Magnus" <magnus.karlsson@intel.com>,
"bjorn@kernel.org" <bjorn@kernel.org>,
"Fijalkowski, Maciej" <maciej.fijalkowski@intel.com>,
"hawk@kernel.org" <hawk@kernel.org>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"xdp-hints@xdp-project.net" <xdp-hints@xdp-project.net>
Subject: [xdp-hints] Re: [PATCH bpf-next v4 10/11] selftests/bpf: Add TX side to xdp_hw_metadata
Date: Tue, 24 Oct 2023 09:41:36 -0700 [thread overview]
Message-ID: <CAKH8qBtqbRRER-qbT3YghgYkaHVzz=Rdvpe9h7b5bv3+gM-a5A@mail.gmail.com> (raw)
In-Reply-To: <PH0PR11MB5830DF14E012DCAC75090010D8DFA@PH0PR11MB5830.namprd11.prod.outlook.com>
On Mon, Oct 23, 2023 at 7:19 PM Song, Yoong Siang
<yoong.siang.song@intel.com> wrote:
>
> On Friday, October 20, 2023 1:50 AM Stanislav Fomichev <sdf@google.com> wrote:
> >When we get a packet on port 9091, we swap src/dst and send it out.
> >At this point we also request the timestamp and checksum offloads.
> >
> >Checksum offload is verified by looking at the tcpdump on the other side.
> >The tool prints pseudo-header csum and the final one it expects.
> >The final checksum actually matches the incoming packets checksum
> >because we only flip the src/dst and don't change the payload.
> >
> >Some other related changes:
> >- switched to zerocopy mode by default; new flag can be used to force
> > old behavior
> >- request fixed tx_metadata_len headroom
> >- some other small fixes (umem size, fill idx+i, etc)
> >
> >mvbz3:~# ./xdp_hw_metadata eth3
> >...
> >xsk_ring_cons__peek: 1
> >0x19546f8: rx_desc[0]->addr=80100 addr=80100 comp_addr=80100
> >rx_hash: 0x80B7EA8B with RSS type:0x2A
> >rx_timestamp: 1697580171852147395 (sec:1697580171.8521)
> >HW RX-time: 1697580171852147395 (sec:1697580171.8521), delta to User RX-time sec:0.2797 (279673.082 usec)
> >XDP RX-time: 1697580172131699047 (sec:1697580172.1317), delta to User RX-time sec:0.0001 (121.430 usec)
> >0x19546f8: ping-pong with csum=3b8e (want d862) csum_start=54 csum_offset=6
> >0x19546f8: complete tx idx=0 addr=8
> >tx_timestamp: 1697580172056756493 (sec:1697580172.0568)
>
> Hi Stanislav,
>
> rx_timestamp is duplicating HW RX-time while tx_timestamp is duplicating HW TX-complete-time,
> so, I think can remove printing of rx_timestamp and tx_timestamp to avoid confusion.
That's fair, I think I'll do the following:
if (meta->rx_timestamp) {
/* print all those reference points */
} else {
printf("No rx_timestamp\n");
}
And the same for tx. So at least the users get a signal that the
timestamps weren't set.
> >HW TX-complete-time: 1697580172056756493 (sec:1697580172.0568), delta to User TX-complete-time sec:0.0852 (85175.537 usec)
> >XDP RX-time: 1697580172131699047 (sec:1697580172.1317), delta to User TX-complete-time sec:0.0102 (10232.983 usec)
> >HW RX-time: 1697580171852147395 (sec:1697580171.8521), delta to HW TX-complete-time sec:0.2046 (204609.098 usec)
> >0x19546f8: complete rx idx=128 addr=80100
> >
> >mvbz4:~# nc -Nu -q1 ${MVBZ3_LINK_LOCAL_IP}%eth3 9091
> >
> >mvbz4:~# tcpdump -vvx -i eth3 udp
> > tcpdump: listening on eth3, link-type EN10MB (Ethernet), snapshot length 262144
> >bytes
> >12:26:09.301074 IP6 (flowlabel 0x35fa5, hlim 127, next-header UDP (17) payload
> >length: 11) fe80::1270:fdff:fe48:1087.55807 > fe80::1270:fdff:fe48:1077.9091: [bad
> >udp cksum 0x3b8e -> 0xde7e!] UDP, length 3
> > 0x0000: 6003 5fa5 000b 117f fe80 0000 0000 0000
> > 0x0010: 1270 fdff fe48 1087 fe80 0000 0000 0000
> > 0x0020: 1270 fdff fe48 1077 d9ff 2383 000b 3b8e
> > 0x0030: 7864 70
> >12:26:09.301976 IP6 (flowlabel 0x35fa5, hlim 127, next-header UDP (17) payload
> >length: 11) fe80::1270:fdff:fe48:1077.9091 > fe80::1270:fdff:fe48:1087.55807: [udp
> >sum ok] UDP, length 3
> > 0x0000: 6003 5fa5 000b 117f fe80 0000 0000 0000
> > 0x0010: 1270 fdff fe48 1077 fe80 0000 0000 0000
> > 0x0020: 1270 fdff fe48 1087 2383 d9ff 000b de7e
> > 0x0030: 7864 70
> >
> >This reverts commit c3c9abc1d0c989e0be21d78cccd99076cc94ec44.
>
> It didn't looked like this patch is reverting something.
> If this is not a mistake, can you add the commit title behind the ID?
Ah, that's a leftover from my rebasing and reshuffling, will drop, thanks!
next prev parent reply other threads:[~2023-10-24 16:41 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-19 17:49 [xdp-hints] [PATCH bpf-next v4 00/11] xsk: TX metadata Stanislav Fomichev
2023-10-19 17:49 ` [xdp-hints] [PATCH bpf-next v4 01/11] xsk: Support tx_metadata_len Stanislav Fomichev
2023-10-20 14:29 ` [xdp-hints] " Song, Yoong Siang
2023-10-21 1:12 ` Jakub Kicinski
2023-10-23 17:33 ` Stanislav Fomichev
2023-10-23 8:28 ` Magnus Karlsson
2023-10-23 18:37 ` Stanislav Fomichev
2023-10-19 17:49 ` [xdp-hints] [PATCH bpf-next v4 02/11] xsk: Add TX timestamp and TX checksum offload support Stanislav Fomichev
2023-10-20 14:31 ` [xdp-hints] " Song, Yoong Siang
2023-10-20 17:49 ` Alexei Starovoitov
2023-10-20 18:06 ` Stanislav Fomichev
2023-10-21 1:04 ` Jakub Kicinski
2023-10-23 17:21 ` Stanislav Fomichev
2023-10-23 18:12 ` Jakub Kicinski
2023-10-23 18:46 ` Stanislav Fomichev
2023-10-19 17:49 ` [xdp-hints] [PATCH bpf-next v4 03/11] tools: ynl: Print xsk-features from the sample Stanislav Fomichev
2023-10-21 1:06 ` [xdp-hints] " Jakub Kicinski
2023-10-23 17:27 ` Stanislav Fomichev
2023-10-19 17:49 ` [xdp-hints] [PATCH bpf-next v4 04/11] net/mlx5e: Implement AF_XDP TX timestamp and checksum offload Stanislav Fomichev
2023-10-19 17:49 ` [xdp-hints] [PATCH bpf-next v4 05/11] net: stmmac: Add Tx HWTS support to XDP ZC Stanislav Fomichev
2023-10-19 17:49 ` [xdp-hints] [PATCH bpf-next v4 06/11] selftests/xsk: Support tx_metadata_len Stanislav Fomichev
2023-10-19 17:49 ` [xdp-hints] [PATCH bpf-next v4 07/11] selftests/bpf: Add csum helpers Stanislav Fomichev
2023-10-19 17:49 ` [xdp-hints] [PATCH bpf-next v4 08/11] selftests/bpf: Add TX side to xdp_metadata Stanislav Fomichev
2023-10-19 17:49 ` [xdp-hints] [PATCH bpf-next v4 09/11] selftests/bpf: Convert xdp_hw_metadata to XDP_USE_NEED_WAKEUP Stanislav Fomichev
2023-10-19 17:49 ` [xdp-hints] [PATCH bpf-next v4 10/11] selftests/bpf: Add TX side to xdp_hw_metadata Stanislav Fomichev
2023-10-24 2:19 ` [xdp-hints] " Song, Yoong Siang
2023-10-24 16:41 ` Stanislav Fomichev [this message]
2023-10-19 17:49 ` [xdp-hints] [PATCH bpf-next v4 11/11] xsk: Document tx_metadata_len layout Stanislav Fomichev
2023-10-23 9:19 ` [xdp-hints] " Magnus Karlsson
2023-10-23 18:31 ` Stanislav Fomichev
2023-10-23 9:52 ` [xdp-hints] Re: [PATCH bpf-next v4 00/11] xsk: TX metadata Magnus Karlsson
2023-10-23 18:38 ` Stanislav Fomichev
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
List information: https://lists.xdp-project.net/postorius/lists/xdp-hints.xdp-project.net/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAKH8qBtqbRRER-qbT3YghgYkaHVzz=Rdvpe9h7b5bv3+gM-a5A@mail.gmail.com' \
--to=sdf@google.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bjorn@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=dsahern@kernel.org \
--cc=haoluo@google.com \
--cc=hawk@kernel.org \
--cc=john.fastabend@gmail.com \
--cc=jolsa@kernel.org \
--cc=kpsingh@kernel.org \
--cc=kuba@kernel.org \
--cc=maciej.fijalkowski@intel.com \
--cc=magnus.karlsson@intel.com \
--cc=martin.lau@linux.dev \
--cc=netdev@vger.kernel.org \
--cc=song@kernel.org \
--cc=toke@kernel.org \
--cc=willemb@google.com \
--cc=xdp-hints@xdp-project.net \
--cc=yhs@fb.com \
--cc=yoong.siang.song@intel.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