mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Saeed Mahameed <saeed@kernel.org>
To: Naveen Mamindlapalli <naveenm@marvell.com>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: kuba@kernel.org, davem@davemloft.net, sgoutham@marvell.com,
	lcherian@marvell.com, gakula@marvell.com, jerinj@marvell.com,
	sbhatta@marvell.com, hkelam@marvell.com
Subject: Re: [PATCH v2 net-next 09/13] octeontx2-pf: Implement ingress/egress VLAN offload
Date: Fri, 06 Nov 2020 14:33:10 -0800	[thread overview]
Message-ID: <97db181208531f427a03c877b9e2cd0cb1105bd1.camel@kernel.org> (raw)
In-Reply-To: <20201105092816.819-10-naveenm@marvell.com>

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://www.kernel.org/doc/html/latest/networking/netdev-features.html

Features dependencies must be resolved via: 
ndo_fix_features() and netdev_update_features();

 
> +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 ?



  reply	other threads:[~2020-11-06 22:33 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

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=97db181208531f427a03c877b9e2cd0cb1105bd1.camel@kernel.org \
    --to=saeed@kernel.org \
    --cc=davem@davemloft.net \
    --cc=gakula@marvell.com \
    --cc=hkelam@marvell.com \
    --cc=jerinj@marvell.com \
    --cc=kuba@kernel.org \
    --cc=lcherian@marvell.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=naveenm@marvell.com \
    --cc=netdev@vger.kernel.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®