All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 net-next 00/13] Add ethtool ntuple filters support
@ 2020-11-05  9:28 Naveen Mamindlapalli
  2020-11-05  9:28 ` [PATCH v2 net-next 01/13] octeontx2-af: Modify default KEX profile to extract TX packet fields Naveen Mamindlapalli
                   ` (12 more replies)
  0 siblings, 13 replies; 17+ messages in thread
From: Naveen Mamindlapalli @ 2020-11-05  9:28 UTC (permalink / raw)
  To: netdev, linux-kernel
  Cc: kuba, davem, sgoutham, lcherian, gakula, jerinj, sbhatta, hkelam,
	Naveen Mamindlapalli

This patch series adds support for ethtool ntuple filters, unicast
address filtering, VLAN offload and SR-IOV ndo handlers. All of the
above features are based on the Admin Function(AF) driver support to
install and delete the low level MCAM entries. Each MCAM entry is
programmed with the packet fields to match and what actions to take
if the match succeeds. The PF driver requests AF driver to allocate
set of MCAM entries to be used to install the flows by that PF. The
entries will be freed when the PF driver is unloaded.

* The patches 1 to 4 adds AF driver infrastructure to install and
  delete the low level MCAM flow entries.
* Patch 5 adds ethtool ntuple filter support.
* Patch 6 adds unicast MAC address filtering.
* Patch 7 adds support for dumping the MCAM entries via debugfs.
* Patches 8 to 10 adds support for VLAN offload.
* Patch 10 to 11 adds support for SR-IOV ndo handlers.
* Patch 12 adds support to read the MCAM entries.

Misc:
* Removed redundant mailbox NIX_RXVLAN_ALLOC.

Change-log:
- Fixed the sparse issues reported by Jakub.

Hariprasad Kelam (3):
  octeontx2-pf: Add support for unicast MAC address filtering
  octeontx2-pf: Implement ingress/egress VLAN offload
  octeontx2-af: Handle PF-VF mac address changes

Naveen Mamindlapalli (2):
  octeontx2-pf: Add support for SR-IOV management functions
  octeontx2-af: Add new mbox messages to retrieve MCAM entries

Stanislaw Kardach (1):
  octeontx2-af: Modify default KEX profile to extract TX packet fields

Subbaraya Sundeep (6):
  octeontx2-af: Verify MCAM entry channel and PF_FUNC
  octeontx2-af: Generate key field bit mask from KEX profile
  octeontx2-af: Add mbox messages to install and delete MCAM rules
  octeontx2-pf: Add support for ethtool ntuple filters
  octeontx2-af: Add debugfs entry to dump the MCAM rules
  octeontx2-af: Delete NIX_RXVLAN_ALLOC mailbox message

Vamsi Attunuru (1):
  octeontx2-af: Modify nix_vtag_cfg mailbox to support TX VTAG entries

 drivers/net/ethernet/marvell/octeontx2/af/Makefile |    2 +-
 drivers/net/ethernet/marvell/octeontx2/af/common.h |    2 +
 drivers/net/ethernet/marvell/octeontx2/af/mbox.h   |  170 ++-
 drivers/net/ethernet/marvell/octeontx2/af/npc.h    |  106 +-
 .../ethernet/marvell/octeontx2/af/npc_profile.h    |   71 +-
 drivers/net/ethernet/marvell/octeontx2/af/rvu.c    |   16 +-
 drivers/net/ethernet/marvell/octeontx2/af/rvu.h    |   71 +-
 .../ethernet/marvell/octeontx2/af/rvu_debugfs.c    |  197 +++
 .../net/ethernet/marvell/octeontx2/af/rvu_nix.c    |  305 ++++-
 .../net/ethernet/marvell/octeontx2/af/rvu_npc.c    |  462 ++++++-
 .../net/ethernet/marvell/octeontx2/af/rvu_npc_fs.c | 1334 ++++++++++++++++++++
 .../net/ethernet/marvell/octeontx2/af/rvu_struct.h |   11 +
 .../net/ethernet/marvell/octeontx2/nic/Makefile    |    2 +-
 .../ethernet/marvell/octeontx2/nic/otx2_common.c   |    8 +-
 .../ethernet/marvell/octeontx2/nic/otx2_common.h   |   54 +
 .../ethernet/marvell/octeontx2/nic/otx2_ethtool.c  |   58 +-
 .../ethernet/marvell/octeontx2/nic/otx2_flows.c    |  854 +++++++++++++
 .../net/ethernet/marvell/octeontx2/nic/otx2_pf.c   |  313 ++++-
 .../net/ethernet/marvell/octeontx2/nic/otx2_txrx.c |   16 +
 .../net/ethernet/marvell/octeontx2/nic/otx2_vf.c   |   13 +
 20 files changed, 3905 insertions(+), 160 deletions(-)
 create mode 100644 drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_fs.c
 create mode 100644 drivers/net/ethernet/marvell/octeontx2/nic/otx2_flows.c

-- 
2.16.5


^ permalink raw reply	[flat|nested] 17+ messages in thread
* Re: [PATCH v2 net-next 09/13] octeontx2-pf: Implement ingress/egress VLAN offload
@ 2020-11-10 16:58 Naveen Mamindlapalli
  0 siblings, 0 replies; 17+ messages in thread
From: Naveen Mamindlapalli @ 2020-11-10 16:58 UTC (permalink / raw)
  To: Saeed Mahameed, netdev, linux-kernel
  Cc: kuba, davem, Sunil Kovvuri Goutham, Linu Cherian,
	Geethasowjanya Akula, Jerin Jacob Kollanukkaran,
	Subbaraya Sundeep Bhatta, Hariprasad Kelam

Hi Saeed,

Thanks for the review!

> -----Original Message-----
> From: Saeed Mahameed <saeed@kernel.org>
> Sent: Saturday, November 7, 2020 4:03 AM
> To: Naveen Mamindlapalli <naveenm@marvell.com>; netdev@vger.kernel.org;
> linux-kernel@vger.kernel.org
> Cc: kuba@kernel.org; davem@davemloft.net; Sunil Kovvuri Goutham
> <sgoutham@marvell.com>; Linu Cherian <lcherian@marvell.com>;
> Geethasowjanya Akula <gakula@marvell.com>; Jerin Jacob Kollanukkaran
> <jerinj@marvell.com>; Subbaraya Sundeep Bhatta <sbhatta@marvell.com>;
> Hariprasad Kelam <hkelam@marvell.com>
> Subject: Re: [PATCH v2 net-next 09/13] octeontx2-pf: Implement
> ingress/egress VLAN offload
> 
> On Thu, 2020-11-05 at 14:58 +0530, Naveen Mamindlapalli wrote:
> > From: Hariprasad Kelam <hkelam@marvell.com>
> >
> > This patch implements egress VLAN offload by appending NIX_SEND_EXT_S
> > header to NIX_SEND_HDR_S. The VLAN TCI information is specified in the
> > NIX_SEND_EXT_S. The VLAN offload in the ingress path is implemented by
> > configuring the NIX_RX_VTAG_ACTION_S to strip and capture the outer
> > vlan fields. The NIX PF allocates one MCAM entry for Rx VLAN offload.
> >
> > Signed-off-by: Hariprasad Kelam <hkelam@marvell.com>
> > Signed-off-by: Sunil Goutham <sgoutham@marvell.com>
> > Signed-off-by: Naveen Mamindlapalli <naveenm@marvell.com>
> > ---
> 
> ..
> 
> > @@ -56,6 +58,8 @@ void otx2_mcam_flow_del(struct otx2_nic *pf)  int
> > otx2_alloc_mcam_entries(struct otx2_nic *pfvf)  {
> >  	struct otx2_flow_config *flow_cfg = pfvf->flow_cfg;
> > +	netdev_features_t wanted = NETIF_F_HW_VLAN_STAG_RX |
> > +				   NETIF_F_HW_VLAN_CTAG_RX;
> >  	struct npc_mcam_alloc_entry_req *req;
> >  	struct npc_mcam_alloc_entry_rsp *rsp;
> >  	int i;
> > @@ -88,15 +92,22 @@ int otx2_alloc_mcam_entries(struct otx2_nic
> > *pfvf)
> >  	if (rsp->count != req->count) {
> >  		netdev_info(pfvf->netdev, "number of rules truncated to %d\n",
> >  			    rsp->count);
> > +		netdev_info(pfvf->netdev,
> > +			    "Disabling RX VLAN offload due to non-
> > availability of MCAM space\n");
> >  		/* support only ntuples here */
> >  		flow_cfg->ntuple_max_flows = rsp->count;
> >  		flow_cfg->ntuple_offset = 0;
> >  		pfvf->netdev->priv_flags &= ~IFF_UNICAST_FLT;
> >  		pfvf->flags &= ~OTX2_FLAG_UCAST_FLTR_SUPPORT;
> > +		pfvf->flags &= ~OTX2_FLAG_RX_VLAN_SUPPORT;
> > +		pfvf->netdev->features &= ~wanted;
> > +		pfvf->netdev->hw_features &= ~wanted;
> 
> Drivers are not allowed to change own features dynamically.
> 
> please see:
> https://urldefense.proofpoint.com/v2/url?u=https-
> 3A__www.kernel.org_doc_html_latest_networking_netdev-
> 2Dfeatures.html&d=DwICaQ&c=nKjWec2b6R0mOyPaz7xtfQ&r=TwreqwV6mQ8K
> 9wIpqwFO8yjikO_w1jUOe2MzChg4Rmg&m=4bUL936Kl_JmPhgCgMxvCELhoEQ_
> WM_OitdlqyTRlHU&s=Lgcm811tFrMvuw-
> JvTq4BPl76Nqv_HW6CigvKR8LgGw&e=
> 
> Features dependencies must be resolved via:
> ndo_fix_features() and netdev_update_features();

Okay, will fix in v3.
> 
> 
> > +static netdev_features_t
> > +otx2_features_check(struct sk_buff *skb, struct net_device *dev,
> > +		    netdev_features_t features)
> > +{
> > +	return features;
> > +}
> > +
> 
> what is the point of no-op features_check ?
> 
Cross checked this and I don’t see any need for this check. I will remove in v3.


^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2020-11-10 16:58 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-05  9:28 [PATCH v2 net-next 00/13] Add ethtool ntuple filters support Naveen Mamindlapalli
2020-11-05  9:28 ` [PATCH v2 net-next 01/13] octeontx2-af: Modify default KEX profile to extract TX packet fields Naveen Mamindlapalli
2020-11-05  9:28 ` [PATCH v2 net-next 02/13] octeontx2-af: Verify MCAM entry channel and PF_FUNC Naveen Mamindlapalli
2020-11-05  9:28 ` [PATCH v2 net-next 03/13] octeontx2-af: Generate key field bit mask from KEX profile Naveen Mamindlapalli
2020-11-05  9:28 ` [PATCH v2 net-next 04/13] octeontx2-af: Add mbox messages to install and delete MCAM rules Naveen Mamindlapalli
2020-11-05  9:28 ` [PATCH v2 net-next 05/13] octeontx2-pf: Add support for ethtool ntuple filters Naveen Mamindlapalli
2020-11-05  9:28 ` [PATCH v2 net-next 06/13] octeontx2-pf: Add support for unicast MAC address filtering Naveen Mamindlapalli
2020-11-06 22:15   ` Saeed Mahameed
2020-11-05  9:28 ` [PATCH v2 net-next 07/13] octeontx2-af: Add debugfs entry to dump the MCAM rules Naveen Mamindlapalli
2020-11-05  9:28 ` [PATCH v2 net-next 08/13] octeontx2-af: Modify nix_vtag_cfg mailbox to support TX VTAG entries Naveen Mamindlapalli
2020-11-05  9:28 ` [PATCH v2 net-next 09/13] octeontx2-pf: Implement ingress/egress VLAN offload Naveen Mamindlapalli
2020-11-06 22:33   ` Saeed Mahameed
2020-11-05  9:28 ` [PATCH v2 net-next 10/13] octeontx2-pf: Add support for SR-IOV management functions Naveen Mamindlapalli
2020-11-05  9:28 ` [PATCH v2 net-next 11/13] octeontx2-af: Handle PF-VF mac address changes Naveen Mamindlapalli
2020-11-05  9:28 ` [PATCH v2 net-next 12/13] octeontx2-af: Add new mbox messages to retrieve MCAM entries Naveen Mamindlapalli
2020-11-05  9:28 ` [PATCH v2 net-next 13/13] octeontx2-af: Delete NIX_RXVLAN_ALLOC mailbox message Naveen Mamindlapalli
2020-11-10 16:58 [PATCH v2 net-next 09/13] octeontx2-pf: Implement ingress/egress VLAN offload Naveen Mamindlapalli

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.