From: Yaron Illouz <yaroni@radcom.com>
To: Ori Kam <orika@nvidia.com>, "dev@dpdk.org" <dev@dpdk.org>,
"'users@dpdk.org'" <users@dpdk.org>
Subject: RE: rss calculation as the nic
Date: Wed, 21 Feb 2024 17:10:40 +0000 [thread overview]
Message-ID: <AM9PR09MB4995438F6B9C2A1612343231A1572@AM9PR09MB4995.eurprd09.prod.outlook.com> (raw)
In-Reply-To: <MW2PR12MB466655D856E3FE6A9C9CA26DD64E2@MW2PR12MB4666.namprd12.prod.outlook.com>
[-- Attachment #1: Type: text/plain, Size: 2688 bytes --]
Hi Ori
Thank you for your answer it helped me
But I can see the load balancing is not done to the same instance for both directions
I would like to have ip + port pairs arrive to same instance
Now ip1+port1 -> ip2+port2 arrive to instance x and ip2+port2 -> ip1+port1 arrive to another instance
How can I solve this?
From: Ori Kam <orika@nvidia.com>
Sent: Wednesday, February 14, 2024 6:07 PM
To: Yaron Illouz <yaroni@radcom.com>; dev@dpdk.org; 'users@dpdk.org' <users@dpdk.org>
Subject: RE: rss calculation as the nic
EXTERNAL EMAIL: Do not click links or attachments unless you recognize the sender and know the content is safe
Hi Yaron,
I can see some possible issues with your code, please see below.
From: Yaron Illouz <yaroni@radcom.com<mailto:yaroni@radcom.com>>
Sent: Saturday, February 3, 2024 7:03 PM
To: dev@dpdk.org<mailto:dev@dpdk.org>; 'users@dpdk.org' <users@dpdk.org<mailto:users@dpdk.org>>
Subject: rss calculation as the nic
[Snip]
static inline uint32_t
do_softrss(struct rte_mbuf *m)
{
uint32_t input_len;
struct rte_ipv4_tuple ipv4_tuple;
char * pRawPacket = static_cast<char*>(rte_pktmbuf_mtod(pi_mbuf, void* ));
IpHeader * pIpHeader = (IpHeader *)(pRawPacket + offsetOfIp);
if(pIpHeader->GetVersion()==4)
{
ipv4_tuple.src_addr = rte_be_to_cpu_32(pIpHeader->dwSrcAddressBigEndian);
ipv4_tuple.dst_addr = rte_be_to_cpu_32(pIpHeader->dwDstAddressBigEndian);
[Ori] here you are converting BE to CPU
ipv4_tuple.sport = *(uint16_t*)(pRawPacket + transportLayerOffset);
ipv4_tuple.dport = *(uint16_t*)(pRawPacket + transportLayerOffset+2);
[Ori] here you keep the values as BE
input_len = RTE_THASH_V4_L3_LEN;
return rte_softrss_be((uint32_t *)&ipv4_tuple, input_len, rss_key_be);
[Ori] the above function expects to get everything in BE and you should also call rte_convert_rss_key before the use of the above function.
}
return 0;
}
new_rss = do_softrss(mbuf_pointer);
std::cout<< std::hex << mbuf_pointer->hash.rss << " -> " << new_rss << std::dec << std::endl;
And i get a different value than the mbuf_pointer->hash.rss
5ed28a5c -> 33eb33eb
974c1896 -> 24e224e2
1edf1638 -> 21752175
8a54c19 -> 80638063
459a6f76 -> 1b351b35
1cdf1d1c -> e53be53b
**** I understand it is possible to do it, but i don't get the same value ***
ethtool -i ens5f0
driver: mlx5_core
version: 5.8-3.0.7
firmware-version: 22.32.2004 (MT_0000000437)
expansion-rom-version:
bus-info: 0000:83:00.0
supports-statistics: yes
supports-test: yes
supports-eeprom-access: no
supports-register-dump: no
supports-priv-flags: yes
[-- Attachment #2: Type: text/html, Size: 18138 bytes --]
next prev parent reply other threads:[~2024-02-21 17:10 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-03 17:03 Yaron Illouz
2024-02-14 16:07 ` Ori Kam
2024-02-21 17:10 ` Yaron Illouz [this message]
2024-02-22 6:49 ` Pavel Vazharov
2024-02-25 8:22 ` Ori Kam
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=AM9PR09MB4995438F6B9C2A1612343231A1572@AM9PR09MB4995.eurprd09.prod.outlook.com \
--to=yaroni@radcom.com \
--cc=dev@dpdk.org \
--cc=orika@nvidia.com \
--cc=users@dpdk.org \
/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;
as well as URLs for NNTP newsgroup(s).