Re: [PATCH net-next v3 09/18] net/smc: introduce SMC-D loopback device

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On 2023/9/22 07:32, Wenjia Zhang wrote:



<..>

+
+#ifndef _SMC_LOOPBACK_H
+#define _SMC_LOOPBACK_H
+
+#include <linux/device.h>
+#include <linux/err.h>
+#include <net/smc.h>
+
+#define SMC_LODEV_MAX_DMBS 5000
+
+struct smc_lo_dev {
+    struct smcd_dev *smcd;
+    struct device dev;
+};
+
I'm just wondering why don't use pointer for dev?


The 'struct device' is a generic structure embeded, used to associate a Linux device
with a specific device. So I think variable for dev here is OK. See also struct ism_dev.

Thanks.

+int smc_loopback_init(void);
+void smc_loopback_exit(void);
+
+#endif /* _SMC_LOOPBACK_H */



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Kernel Development]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Info]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Linux Media]     [Device Mapper]

  Powered by Linux