Re: [PATCH net-next v5 2/5] net: ipqess: introduce the Qualcomm IPQESS driver

From: Andrew Lunn
Date: Fri Oct 21 2022 - 10:40:05 EST


> +static int ipqess_axi_remove(struct platform_device *pdev)
> +{
> + const struct net_device *netdev = platform_get_drvdata(pdev);
> + struct ipqess *ess = netdev_priv(netdev);
> +
> + ipqess_hw_stop(ess);
> + unregister_netdev(ess->netdev);

Should the unregister come first? What happens if the network stack
tries to use the interface during/after ipqess_hw_stop()? It just
seems like it would be safer to first unregister the interface, and
then stop it?

> +struct ipqess_tx_desc {
> + __le16 len;
> + __le16 svlan_tag;
> + __le32 word1;
> + __le32 addr;
> + __le32 word3;
> +} __aligned(16) __packed;
> +
> +struct ipqess_rx_desc {
> + u16 rrd0;
> + u16 rrd1;
> + u16 rrd2;
> + u16 rrd3;
> + u16 rrd4;
> + u16 rrd5;
> + u16 rrd6;
> + u16 rrd7;
> +} __aligned(16) __packed;

The TX descriptor is little endian, but the RX descriptor is host
endian?

Andrew