From: Simon Horman <simon.horman@corigine.com>
To: Subbaraya Sundeep <sbhatta@marvell.com>
Cc: netdev@vger.kernel.org, davem@davemloft.net, edumazet@google.com,
kuba@kernel.org, pabeni@redhat.com, gakula@marvell.com,
naveenm@marvell.com, hkelam@marvell.com, lcherian@marvell.com,
Sunil Kovvuri Goutham <sgoutham@marvell.com>
Subject: Re: [net-next PATCH] octeontx2-pf: mcs: Offload extended packet number(XPN) feature
Date: Wed, 10 May 2023 20:12:49 +0200 [thread overview]
Message-ID: <ZFveofGebqWWY4vm@corigine.com> (raw)
In-Reply-To: <1683730283-9353-1-git-send-email-sbhatta@marvell.com>
On Wed, May 10, 2023 at 08:21:23PM +0530, Subbaraya Sundeep wrote:
> The macsec hardware block supports XPN cipher suites also.
> Hence added changes to offload XPN feature. Changes include
> configuring SecY policy to XPN cipher suite, Salt and SSCI values.
> 64 bit packet number is passed instead of 32 bit packet number.
>
> Signed-off-by: Subbaraya Sundeep <sbhatta@marvell.com>
> Signed-off-by: Sunil Kovvuri Goutham <sgoutham@marvell.com>
...
> @@ -349,6 +366,15 @@ static int cn10k_mcs_write_rx_sa_plcy(struct otx2_nic *pfvf,
> reg++;
> }
>
> + if (secy->xpn) {
> + memcpy((u8 *)&salt_63_0, salt_p, 8);
> + memcpy((u8 *)&ssci_salt_95_64, salt_p + 8, 4);
> + ssci_salt_95_64 |= (u64)rxsc->ssci[assoc_num] << 32;
Hi Subbaraya,
Sparse says:
drivers/net/ethernet/marvell/octeontx2/nic/cn10k_macsec.c:372:37: warning: cast from restricted ssci_t
drivers/net/ethernet/marvell/octeontx2/nic/cn10k_macsec.c:611:37: warning: cast from restricted ssci_t
I think if you really need a u64 here then you need (__force u64).
But of course at that point any help types and annotations give
you have been thrown out the window.
> +
> + plcy_req->plcy[0][6] = salt_63_0;
> + plcy_req->plcy[0][7] = ssci_salt_95_64;
> + }
> +
> plcy_req->sa_index[0] = rxsc->hw_sa_id[assoc_num];
> plcy_req->sa_cnt = 1;
> plcy_req->dir = MCS_RX;
...
> @@ -561,6 +605,15 @@ static int cn10k_mcs_write_tx_sa_plcy(struct otx2_nic *pfvf,
> reg++;
> }
>
> + if (secy->xpn) {
> + memcpy((u8 *)&salt_63_0, salt_p, 8);
> + memcpy((u8 *)&ssci_salt_95_64, salt_p + 8, 4);
> + ssci_salt_95_64 |= (u64)txsc->ssci[assoc_num] << 32;
> +
> + plcy_req->plcy[0][6] = salt_63_0;
> + plcy_req->plcy[0][7] = ssci_salt_95_64;
> + }
> +
> plcy_req->plcy[0][8] = assoc_num;
> plcy_req->sa_index[0] = txsc->hw_sa_id[assoc_num];
> plcy_req->sa_cnt = 1;
...
next prev parent reply other threads:[~2023-05-10 18:13 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-10 14:51 [net-next PATCH] octeontx2-pf: mcs: Offload extended packet number(XPN) feature Subbaraya Sundeep
2023-05-10 18:12 ` Simon Horman [this message]
2023-05-11 5:42 ` [EXT] " Subbaraya Sundeep Bhatta
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=ZFveofGebqWWY4vm@corigine.com \
--to=simon.horman@corigine.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=gakula@marvell.com \
--cc=hkelam@marvell.com \
--cc=kuba@kernel.org \
--cc=lcherian@marvell.com \
--cc=naveenm@marvell.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=sbhatta@marvell.com \
--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: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.