Re: [PATCH] SCSI and FC Transport: add netlink support for posting of transport events

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

 



James Smart <James.Smart@xxxxxxxxxx> wrote:
> +/*
> + * FC Transport Broadcast Event Message :
> + *   FC_NL_ASYNC_EVENT
> + *
> + *   Note: if Vendor Unique message, &event_data will be  start of
> + * 	   vendor unique payload, and the length of the payload is
> + *         per event_datalen
> + */
> +struct fc_nl_event {
> +	struct scsi_nl_hdr snlh;		/* must be 1st element ! */
> +	uint64_t seconds;
> +	uint32_t vendor_id;
> +	uint16_t host_no;
> +	uint16_t event_datalen;
> +	uint32_t event_num;
> +	uint32_t event_code;
> +	uint32_t event_data;
> +} __attribute__((aligned(sizeof(uint64_t))));
> +
> .. snip ..
> +
> +/* SCSI_TRANSPORT_MSG event message header */
> +struct scsi_nl_hdr {
> +	uint8_t version;
> +	uint8_t transport;
> +	uint16_t magic;
> +	uint16_t msgtype;
> +	uint16_t msglen;
> +} __attribute__((aligned(sizeof(uint64_t))));
> +

What about using netlink attributes? The attributes do have more overhead,
but it would seem that using attributes instead of sending out a
whole structure would make it easier on the user space side to support
different kernel versions without syncing the tools with the kernel.

-andmike
--
Michael Anderson
andmike@xxxxxxxxxx
-
: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux