RE: [EXT] [PATCH net-next v1] octeon_ep: get max rx packet length from firmware
From: Shinas Rasheed
Date: Wed Nov 22 2023 - 11:15:54 EST
Hi Suman
> -----Original Message-----
> From: Suman Ghosh <sumang@xxxxxxxxxxx>
> Sent: Wednesday, November 22, 2023 10:13 AM
> To: Shinas Rasheed <srasheed@xxxxxxxxxxx>; netdev@xxxxxxxxxxxxxxx;
> linux-kernel@xxxxxxxxxxxxxxx
> Cc: Haseeb Gani <hgani@xxxxxxxxxxx>; Vimlesh Kumar
> <vimleshk@xxxxxxxxxxx>; egallen@xxxxxxxxxx; mschmidt@xxxxxxxxxx;
> pabeni@xxxxxxxxxx; horms@xxxxxxxxxx; kuba@xxxxxxxxxx;
> davem@xxxxxxxxxxxxx; wizhao@xxxxxxxxxx; konguyen@xxxxxxxxxx;
> Shinas Rasheed <srasheed@xxxxxxxxxxx>; Veerasenareddy Burru
> <vburru@xxxxxxxxxxx>; Sathesh B Edara <sedara@xxxxxxxxxxx>; Eric
> Dumazet <edumazet@xxxxxxxxxx>
> Subject: RE: [EXT] [PATCH net-next v1] octeon_ep: get max rx packet length
> from firmware
> >@@ -1346,8 +1347,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;
> >+ }
> [Suman] Do we need to check if max_rx_pktlen <= OCTEP_MAX_MTU as
> well? If not, then this macro is not required further after the change?
I suppose we should check this.