From: Simon Horman <horms@kernel.org>
To: Yinjun Zhang <yinjun.zhang@corigine.com>
Cc: Louis Peens <louis.peens@corigine.com>,
David Miller <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
oss-drivers <oss-drivers@corigine.com>
Subject: Re: [PATCH net-next 1/2] nfp: add ethtool flow steering callbacks
Date: Mon, 20 Nov 2023 10:52:14 +0000 [thread overview]
Message-ID: <20231120105214.GA223713@kernel.org> (raw)
In-Reply-To: <DM6PR13MB3705D3EAE5FEF8D3B6902146FCB4A@DM6PR13MB3705.namprd13.prod.outlook.com>
On Mon, Nov 20, 2023 at 10:18:13AM +0000, Yinjun Zhang wrote:
> On Monday, November 20, 2023 5:43 PM, Simon Horman wrote:
> <...>
> > > + case TCP_V6_FLOW:
> > > + case UDP_V6_FLOW:
> > > + case SCTP_V6_FLOW:
> > > + for (i = 0; i < 4; i++) {
> > > + fs->h_u.tcp_ip6_spec.ip6src[i] = entry->key.sip6[i];
> > > + fs->h_u.tcp_ip6_spec.ip6dst[i] = entry->key.dip6[i];
> > > + fs->m_u.tcp_ip6_spec.ip6src[i] = entry->msk.sip6[i];
> > > + fs->m_u.tcp_ip6_spec.ip6dst[i] = entry->msk.dip6[i];
> > > + }
> >
> > I think the above loop can be more succinctly be expressed using a single
> > memcpy(). For which I do see precedence in Intel drivers. Likewise
> > elsewhere in this patch-set.
> >
> > I don't feel strongly about this, so feel free to take this suggestion,
> > defer it to later, or dismiss it entirely.
>
> Thanks Simon. Louis did have same suggestion about this part. But
> since we have similar code below:
> ```
> for (i = 0; i < 4; i++) {
> entry->msk.sip6[i] = fs->m_u.tcp_ip6_spec.ip6src[i];
> entry->msk.dip6[i] = fs->m_u.tcp_ip6_spec.ip6dst[i];
> entry->key.sip6[i] = fs->h_u.tcp_ip6_spec.ip6src[i] & entry->msk.sip6[i];
> entry->key.dip6[i] = fs->h_u.tcp_ip6_spec.ip6dst[i] & entry->msk.dip6[i];
> }
> ```
> which can not be replaced by `memcpy`, so I decided to leave them as
> they are to keep consistency.
> So if you don't feel strongly and nobody else objects it, I'll leave it.
Hi Yinjun,
thanks for the clarification. I agree that we can leave this
if nobody else objects.
>
> >
> > > + fs->h_u.tcp_ip6_spec.psrc = entry->key.sport;
> > > + fs->h_u.tcp_ip6_spec.pdst = entry->key.dport;
> > > + fs->m_u.tcp_ip6_spec.psrc = entry->msk.sport;
> > > + fs->m_u.tcp_ip6_spec.pdst = entry->msk.dport;
> > > + break;
> >
> > ...
next prev parent reply other threads:[~2023-11-20 10:52 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-17 7:11 [PATCH net-next 0/2] nfp: add flow-steering support Louis Peens
2023-11-17 7:11 ` [PATCH net-next 1/2] nfp: add ethtool flow steering callbacks Louis Peens
2023-11-20 9:43 ` Simon Horman
2023-11-20 10:18 ` Yinjun Zhang
2023-11-20 10:52 ` Simon Horman [this message]
2023-11-17 7:11 ` [PATCH net-next 2/2] nfp: offload flow steering to the nfp Louis Peens
2023-11-20 9:44 ` Simon Horman
2023-11-21 2:10 ` [PATCH net-next 0/2] nfp: add flow-steering support patchwork-bot+netdevbpf
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=20231120105214.GA223713@kernel.org \
--to=horms@kernel.org \
--cc=davem@davemloft.net \
--cc=kuba@kernel.org \
--cc=louis.peens@corigine.com \
--cc=netdev@vger.kernel.org \
--cc=oss-drivers@corigine.com \
--cc=pabeni@redhat.com \
--cc=yinjun.zhang@corigine.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.