RE: [EXT] Re: [PATCH net-next v2 2/2] octeon_ep: get max rx packet length from firmware

From: Shinas Rasheed
Date: Sun Nov 26 2023 - 23:43:58 EST



Hi Simon,

> -----Original Message-----
> From: Simon Horman <horms@xxxxxxxxxx>
> Sent: Friday, November 24, 2023 10:38 PM
> To: Shinas Rasheed <srasheed@xxxxxxxxxxx>
> Cc: netdev@xxxxxxxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx; Haseeb Gani
> <hgani@xxxxxxxxxxx>; Vimlesh Kumar <vimleshk@xxxxxxxxxxx>;
> egallen@xxxxxxxxxx; mschmidt@xxxxxxxxxx; pabeni@xxxxxxxxxx;
> kuba@xxxxxxxxxx; davem@xxxxxxxxxxxxx; wizhao@xxxxxxxxxx;
> konguyen@xxxxxxxxxx; jesse.brandeburg@xxxxxxxxx; Suman Ghosh
> <sumang@xxxxxxxxxxx>; Veerasenareddy Burru <vburru@xxxxxxxxxxx>;
> Sathesh B Edara <sedara@xxxxxxxxxxx>; Eric Dumazet
> <edumazet@xxxxxxxxxx>
> Subject: [EXT] Re: [PATCH net-next v2 2/2] octeon_ep: get max rx packet
> length from firmware
> > diff --git a/drivers/net/ethernet/marvell/octeon_ep/octep_main.c
> b/drivers/net/ethernet/marvell/octeon_ep/octep_main.c
> > index 2da00a701df2..423eec5ff3ad 100644
> > --- a/drivers/net/ethernet/marvell/octeon_ep/octep_main.c
> > +++ b/drivers/net/ethernet/marvell/octeon_ep/octep_main.c
> > @@ -1377,8 +1378,15 @@ static int octep_probe(struct pci_dev *pdev,
> const struct pci_device_id *ent)
> >
> > netdev->hw_features = NETIF_F_SG;
> > netdev->features |= netdev->hw_features;
> > +
> > + max_rx_pktlen = octep_ctrl_net_get_mtu(octep_dev,
> OCTEP_CTRL_NET_INVALID_VFID);
> > + if (max_rx_pktlen < 0) {
> > + dev_err(&octep_dev->pdev->dev,
> > + "Failed to get max receive packet size; err = %d\n",
> max_rx_pktlen);
> > + goto register_dev_err;
>
> Hi Shinas,
>
> This jump will cause this function to return err. But err is 0 here.
> Perhaps it should be set to a negative error value instead?

Yes I think that was a slight erroneous oversight. I see that this patch has been accepted. I shall commit a fix for the same after review in the net branch doing the same.