All of lore.kernel.org
 help / color / mirror / Atom feed
* [net-next PATCH 0/9] Introduce RVU representors
@ 2024-04-16  5:06 Geetha sowjanya
  2024-04-16  5:06 ` [net-next PATCH 1/9] octeontx2-pf: Refactoring RVU driver Geetha sowjanya
                   ` (8 more replies)
  0 siblings, 9 replies; 25+ messages in thread
From: Geetha sowjanya @ 2024-04-16  5:06 UTC (permalink / raw)
  To: netdev, linux-kernel
  Cc: kuba, davem, pabeni, edumazet, sgoutham, gakula, sbhatta, hkelam

This series adds representor support for each rvu devices.
When switchdev mode is enabled, representor netdev is registered
for each rvu device. In implementation of representor model, 
one NIX HW LF with multiple SQ and RQ is reserved, where each
RQ and SQ of the LF are mapped to a representor. A loopback channel
is reserved to support packet path between representors and VFs.
CN10K silicon supports 2 types of MACs, RPM and SDP. This
patch set adds representor support for both RPM and SDP MAC
interfaces.

- Patch 1: Refactors and exports the shared service functions.
- patch 2: Implements basic representor driver.
- patch 3: Add devlink support to create representor netdevs that
  can be used to manage VFs.
- patch 4: Implements basec netdev_ndo_ops.
- Patch 5: Installs tcam rules to route packets between representor and
	   VFs.
- patch 6: Enables fetching VF stats via representor interface
- Patch 7: Adds support to sync link state between representors and VFs .
- patch 8: Enables configuring VF MTU via representor netdevs.
- patch 9: Add representors for sdp MAC

Geetha sowjanya (9):
  octeontx2-pf: Refactoring RVU driver
  octeontx2-pf: RVU representor driver
  octeontx2-pf: Create representor netdev
  octeontx2-pf: Add basic net_device_ops
  octeontx2-af: Add packet path between representor and VF
  octeontx2-pf: Get VF stats via representor
  octeontx2-pf: Add support to sync link state between representor and
    VFs
  octeontx2-pf: Configure VF mtu via representor
  octeontx2-pf: Add representors for sdp MAC

 .../net/ethernet/marvell/octeontx2/Kconfig    |   8 +
 .../ethernet/marvell/octeontx2/af/Makefile    |   3 +-
 .../net/ethernet/marvell/octeontx2/af/mbox.h  |  73 +++
 .../net/ethernet/marvell/octeontx2/af/npc.h   |   1 +
 .../net/ethernet/marvell/octeontx2/af/rvu.h   |  30 +-
 .../marvell/octeontx2/af/rvu_debugfs.c        |  27 -
 .../marvell/octeontx2/af/rvu_devlink.c        |   6 +
 .../ethernet/marvell/octeontx2/af/rvu_nix.c   |  67 +-
 .../marvell/octeontx2/af/rvu_npc_fs.c         |   4 +
 .../ethernet/marvell/octeontx2/af/rvu_rep.c   | 457 +++++++++++++
 .../marvell/octeontx2/af/rvu_struct.h         |  26 +
 .../marvell/octeontx2/af/rvu_switch.c         |  20 +-
 .../ethernet/marvell/octeontx2/nic/Makefile   |   2 +
 .../ethernet/marvell/octeontx2/nic/cn10k.c    |   4 +-
 .../ethernet/marvell/octeontx2/nic/cn10k.h    |   2 +-
 .../marvell/octeontx2/nic/otx2_common.c       |  53 +-
 .../marvell/octeontx2/nic/otx2_common.h       |  83 ++-
 .../marvell/octeontx2/nic/otx2_devlink.c      |  48 ++
 .../ethernet/marvell/octeontx2/nic/otx2_pf.c  | 305 ++++++---
 .../ethernet/marvell/octeontx2/nic/otx2_reg.h |   1 +
 .../marvell/octeontx2/nic/otx2_txrx.c         |  33 +-
 .../marvell/octeontx2/nic/otx2_txrx.h         |   3 +-
 .../ethernet/marvell/octeontx2/nic/otx2_vf.c  |  18 +-
 .../net/ethernet/marvell/octeontx2/nic/rep.c  | 602 ++++++++++++++++++
 .../net/ethernet/marvell/octeontx2/nic/rep.h  |  51 ++
 25 files changed, 1704 insertions(+), 223 deletions(-)
 create mode 100644 drivers/net/ethernet/marvell/octeontx2/af/rvu_rep.c
 create mode 100644 drivers/net/ethernet/marvell/octeontx2/nic/rep.c
 create mode 100644 drivers/net/ethernet/marvell/octeontx2/nic/rep.h

-- 
2.25.1


^ permalink raw reply	[flat|nested] 25+ messages in thread
* Re: [net-next PATCH 3/9] octeontx2-pf: Create representor netdev
@ 2024-04-17 14:37 kernel test robot
  0 siblings, 0 replies; 25+ messages in thread
From: kernel test robot @ 2024-04-17 14:37 UTC (permalink / raw)
  To: oe-kbuild; +Cc: lkp, Dan Carpenter

BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
In-Reply-To: <20240416050616.6056-4-gakula@marvell.com>
References: <20240416050616.6056-4-gakula@marvell.com>
TO: Geetha sowjanya <gakula@marvell.com>
TO: netdev@vger.kernel.org
TO: linux-kernel@vger.kernel.org
CC: kuba@kernel.org
CC: davem@davemloft.net
CC: pabeni@redhat.com
CC: edumazet@google.com
CC: sgoutham@marvell.com
CC: gakula@marvell.com
CC: sbhatta@marvell.com
CC: hkelam@marvell.com

Hi Geetha,

kernel test robot noticed the following build warnings:

[auto build test WARNING on net-next/main]

url:    https://github.com/intel-lab-lkp/linux/commits/Geetha-sowjanya/octeontx2-pf-Refactoring-RVU-driver/20240416-131052
base:   net-next/main
patch link:    https://lore.kernel.org/r/20240416050616.6056-4-gakula%40marvell.com
patch subject: [net-next PATCH 3/9] octeontx2-pf: Create representor netdev
:::::: branch date: 33 hours ago
:::::: commit date: 33 hours ago
config: alpha-randconfig-r081-20240417 (https://download.01.org/0day-ci/archive/20240417/202404172208.4REfSKKS-lkp@intel.com/config)
compiler: alpha-linux-gcc (GCC) 13.2.0

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Reported-by: Dan Carpenter <error27@gmail.com>
| Closes: https://lore.kernel.org/r/202404172208.4REfSKKS-lkp@intel.com/

New smatch warnings:
drivers/net/ethernet/marvell/octeontx2/nic/rep.c:170 rvu_rep_create() error: dereferencing freed memory 'ndev'
drivers/net/ethernet/marvell/octeontx2/nic/rep.c:181 rvu_rep_create() warn: 'ndev' from alloc_etherdev_mqs() not released on lines: 181.
drivers/net/ethernet/marvell/octeontx2/nic/rep.c:181 rvu_rep_create() warn: 'ndev' from register_netdev() not released on lines: 181.

Old smatch warnings:
drivers/net/ethernet/marvell/octeontx2/nic/rep.c:181 rvu_rep_create() error: uninitialized symbol 'err'.
drivers/net/ethernet/marvell/octeontx2/nic/rep.c:248 rvu_get_rep_cnt() error: uninitialized symbol 'rsp'.
drivers/net/ethernet/marvell/octeontx2/nic/rep.c:248 rvu_get_rep_cnt() warn: passing zero to 'PTR_ERR'
drivers/net/ethernet/marvell/octeontx2/nic/rep.c:293 rvu_rep_probe() warn: missing unwind goto?

vim +/ndev +170 drivers/net/ethernet/marvell/octeontx2/nic/rep.c

f9a5b510759eeb Geetha sowjanya 2024-04-16  131  
f9a5b510759eeb Geetha sowjanya 2024-04-16  132  int rvu_rep_create(struct otx2_nic *priv)
f9a5b510759eeb Geetha sowjanya 2024-04-16  133  {
f9a5b510759eeb Geetha sowjanya 2024-04-16  134  	int rep_cnt = priv->rep_cnt;
f9a5b510759eeb Geetha sowjanya 2024-04-16  135  	struct net_device *ndev;
f9a5b510759eeb Geetha sowjanya 2024-04-16  136  	struct rep_dev *rep;
f9a5b510759eeb Geetha sowjanya 2024-04-16  137  	int rep_id, err;
f9a5b510759eeb Geetha sowjanya 2024-04-16  138  	u16 pcifunc;
f9a5b510759eeb Geetha sowjanya 2024-04-16  139  
f9a5b510759eeb Geetha sowjanya 2024-04-16  140  	priv->reps = devm_kcalloc(priv->dev, rep_cnt, sizeof(struct rep_dev), GFP_KERNEL);
f9a5b510759eeb Geetha sowjanya 2024-04-16  141  	if (!priv->reps)
f9a5b510759eeb Geetha sowjanya 2024-04-16  142  		return -ENOMEM;
f9a5b510759eeb Geetha sowjanya 2024-04-16  143  
f9a5b510759eeb Geetha sowjanya 2024-04-16  144  	for (rep_id = 0; rep_id < rep_cnt; rep_id++) {
f9a5b510759eeb Geetha sowjanya 2024-04-16  145  		ndev = alloc_etherdev(sizeof(*rep));
f9a5b510759eeb Geetha sowjanya 2024-04-16  146  		if (!ndev) {
f9a5b510759eeb Geetha sowjanya 2024-04-16  147  			dev_err(priv->dev, "PFVF representor:%d creation failed\n", rep_id);
f9a5b510759eeb Geetha sowjanya 2024-04-16  148  			err = -ENOMEM;
f9a5b510759eeb Geetha sowjanya 2024-04-16  149  			goto exit;
f9a5b510759eeb Geetha sowjanya 2024-04-16  150  		}
f9a5b510759eeb Geetha sowjanya 2024-04-16  151  
f9a5b510759eeb Geetha sowjanya 2024-04-16  152  		rep = netdev_priv(ndev);
f9a5b510759eeb Geetha sowjanya 2024-04-16  153  		priv->reps[rep_id] = rep;
f9a5b510759eeb Geetha sowjanya 2024-04-16  154  		rep->mdev = priv;
f9a5b510759eeb Geetha sowjanya 2024-04-16  155  		rep->netdev = ndev;
f9a5b510759eeb Geetha sowjanya 2024-04-16  156  		rep->rep_id = rep_id;
f9a5b510759eeb Geetha sowjanya 2024-04-16  157  
f9a5b510759eeb Geetha sowjanya 2024-04-16  158  		ndev->min_mtu = OTX2_MIN_MTU;
f9a5b510759eeb Geetha sowjanya 2024-04-16  159  		ndev->max_mtu = priv->hw.max_mtu;
f9a5b510759eeb Geetha sowjanya 2024-04-16  160  		pcifunc = priv->rep_pf_map[rep_id];
f9a5b510759eeb Geetha sowjanya 2024-04-16  161  		rep->pcifunc = pcifunc;
f9a5b510759eeb Geetha sowjanya 2024-04-16  162  
f9a5b510759eeb Geetha sowjanya 2024-04-16  163  		snprintf(ndev->name, sizeof(ndev->name), "r%dp%dv%d", rep_id,
f9a5b510759eeb Geetha sowjanya 2024-04-16  164  			 rvu_get_pf(pcifunc), (pcifunc & RVU_PFVF_FUNC_MASK));
f9a5b510759eeb Geetha sowjanya 2024-04-16  165  
f9a5b510759eeb Geetha sowjanya 2024-04-16  166  		eth_hw_addr_random(ndev);
f9a5b510759eeb Geetha sowjanya 2024-04-16  167  		if (register_netdev(ndev)) {
f9a5b510759eeb Geetha sowjanya 2024-04-16  168  			dev_err(priv->dev, "PFVF reprentator registration failed\n");
f9a5b510759eeb Geetha sowjanya 2024-04-16  169  			free_netdev(ndev);
f9a5b510759eeb Geetha sowjanya 2024-04-16 @170  			ndev->netdev_ops = NULL;
f9a5b510759eeb Geetha sowjanya 2024-04-16  171  			goto exit;
f9a5b510759eeb Geetha sowjanya 2024-04-16  172  		}
f9a5b510759eeb Geetha sowjanya 2024-04-16  173  	}
f9a5b510759eeb Geetha sowjanya 2024-04-16  174  	err = rvu_rep_napi_init(priv);
f9a5b510759eeb Geetha sowjanya 2024-04-16  175  	if (err)
f9a5b510759eeb Geetha sowjanya 2024-04-16  176  		goto exit;
f9a5b510759eeb Geetha sowjanya 2024-04-16  177  
f9a5b510759eeb Geetha sowjanya 2024-04-16  178  	return 0;
f9a5b510759eeb Geetha sowjanya 2024-04-16  179  exit:
f9a5b510759eeb Geetha sowjanya 2024-04-16  180  	rvu_rep_free_netdev(priv);
f9a5b510759eeb Geetha sowjanya 2024-04-16 @181  	return err;
f9a5b510759eeb Geetha sowjanya 2024-04-16  182  }
f9a5b510759eeb Geetha sowjanya 2024-04-16  183  

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

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

end of thread, other threads:[~2024-04-17 18:08 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-16  5:06 [net-next PATCH 0/9] Introduce RVU representors Geetha sowjanya
2024-04-16  5:06 ` [net-next PATCH 1/9] octeontx2-pf: Refactoring RVU driver Geetha sowjanya
2024-04-16  5:06 ` [net-next PATCH 2/9] octeontx2-pf: RVU representor driver Geetha sowjanya
2024-04-16 16:17   ` Kalesh Anakkur Purayil
2024-04-17 13:37   ` Dan Carpenter
2024-04-17 13:45     ` [EXTERNAL] " Geethasowjanya Akula
2024-04-17 16:22   ` kernel test robot
2024-04-16  5:06 ` [net-next PATCH 3/9] octeontx2-pf: Create representor netdev Geetha sowjanya
2024-04-17  0:31   ` kernel test robot
2024-04-17  1:24   ` kernel test robot
2024-04-17  4:28   ` Kalesh Anakkur Purayil
2024-04-17 13:43     ` [EXTERNAL] " Geethasowjanya Akula
2024-04-17 15:24   ` Dan Carpenter
2024-04-17 15:36     ` Dan Carpenter
2024-04-16  5:06 ` [net-next PATCH 4/9] octeontx2-pf: Add basic net_device_ops Geetha sowjanya
2024-04-16  5:06 ` [net-next PATCH 5/9] octeontx2-af: Add packet path between representor and VF Geetha sowjanya
2024-04-17  4:10   ` Kalesh Anakkur Purayil
2024-04-17  4:15     ` Kalesh Anakkur Purayil
2024-04-17 13:48       ` [EXTERNAL] " Geethasowjanya Akula
2024-04-17 18:08   ` Dan Carpenter
2024-04-16  5:06 ` [net-next PATCH 6/9] octeontx2-pf: Get VF stats via representor Geetha sowjanya
2024-04-16  5:06 ` [net-next PATCH 7/9] octeontx2-pf: Add support to sync link state between representor and VFs Geetha sowjanya
2024-04-16  5:06 ` [net-next PATCH 8/9] octeontx2-pf: Configure VF mtu via representor Geetha sowjanya
2024-04-16  5:06 ` [net-next PATCH 9/9] octeontx2-pf: Add representors for sdp MAC Geetha sowjanya
  -- strict thread matches above, loose matches on Subject: below --
2024-04-17 14:37 [net-next PATCH 3/9] octeontx2-pf: Create representor netdev kernel test robot

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.