Netdev Archive on lore.kernel.org help / color / mirror / Atom feed
From: Subbaraya Sundeep <sbhatta@marvell.com> To: <davem@davemloft.net>, <kuba@kernel.org>, <netdev@vger.kernel.org> Cc: <sgoutham@marvell.com>, <hkelam@marvell.com>, <gakula@marvell.com>, Subbaraya Sundeep <sbhatta@marvell.com> Subject: [net-next PATCH 0/3] octeontx2-af: Introduce DMAC based switching Date: Mon, 19 Jul 2021 14:29:31 +0530 [thread overview] Message-ID: <1626685174-4766-1-git-send-email-sbhatta@marvell.com> (raw) With this patch set packets can be switched between all CGX mapped PFs and VFs in the system based on the DMAC addresses. To implement this: AF allocates high priority rules from top entry(0) in MCAM. Rules are allocated for all the CGX mapped PFs and VFs though they are not active and with no NIXLFs attached. Rules for a PF/VF will be enabled only after they are brought up. Two rules one for TX and one for RX are allocated for each PF/VF. A packet sent from a PF/VF with a destination mac of another PF/VF will be hit by TX rule and sent to LBK channel 63. The same returned packet will be hit by RX rule whose action is to forward packet to PF/VF with that destination mac. Implementation of this for 98xx is tricky since there are two NIX blocks and till now a PF/VF can install rule for an NIX0/1 interface only if it is mapped to corresponding NIX0/1 block. Hence Tx rules are modified such that TX interface in MCAM entry can be either NIX0-TX or NIX1-TX. Testing: 1. Create two VFs over PF1(on NIX0) and assign two VFs to two VMs 2. Assign ip addresses to two VFs in VMs and PF2(on NIX1) in host. 3. Assign static arp entries in two VMs and PF2. 4. Ping between VMs and host PF2. Thanks, Sundeep Subbaraya Sundeep (3): octeontx2-af: Enable transmit side LBK link octeontx2-af: Prepare for allocating MCAM rules for AF octeontx2-af: Introduce internal packet switching drivers/net/ethernet/marvell/octeontx2/af/Makefile | 2 +- drivers/net/ethernet/marvell/octeontx2/af/rvu.c | 10 +- drivers/net/ethernet/marvell/octeontx2/af/rvu.h | 21 ++ .../net/ethernet/marvell/octeontx2/af/rvu_cgx.c | 3 + .../ethernet/marvell/octeontx2/af/rvu_debugfs.c | 5 +- .../ethernet/marvell/octeontx2/af/rvu_devlink.c | 48 +++- .../net/ethernet/marvell/octeontx2/af/rvu_nix.c | 36 +++ .../net/ethernet/marvell/octeontx2/af/rvu_npc.c | 47 +++- .../net/ethernet/marvell/octeontx2/af/rvu_npc_fs.c | 29 ++- .../net/ethernet/marvell/octeontx2/af/rvu_switch.c | 258 +++++++++++++++++++++ 10 files changed, 427 insertions(+), 32 deletions(-) create mode 100644 drivers/net/ethernet/marvell/octeontx2/af/rvu_switch.c -- 2.7.4
next reply other threads:[~2021-07-19 9:01 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-07-19 8:59 Subbaraya Sundeep [this message] 2021-07-19 8:59 ` [net-next PATCH 1/3] octeontx2-af: Enable transmit side LBK link Subbaraya Sundeep 2021-07-19 8:59 ` [net-next PATCH 2/3] octeontx2-af: Prepare for allocating MCAM rules for AF Subbaraya Sundeep 2021-07-19 8:59 ` [net-next PATCH 3/3] octeontx2-af: Introduce internal packet switching Subbaraya Sundeep 2021-07-20 11:51 ` Jakub Kicinski 2021-07-20 17:56 ` sundeep subbaraya
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=1626685174-4766-1-git-send-email-sbhatta@marvell.com \ --to=sbhatta@marvell.com \ --cc=davem@davemloft.net \ --cc=gakula@marvell.com \ --cc=hkelam@marvell.com \ --cc=kuba@kernel.org \ --cc=netdev@vger.kernel.org \ --cc=sgoutham@marvell.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: linkBe 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).