/* * Copyright(c) 2007 Intel Corporation. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, * version 2, as published by the Free Software Foundation. * * This program is distributed in the hope it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * * You should have received a copy of the GNU General Public License along with * this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. * * Maintained at www.Open-FCoE.org */ #ifndef _FC_FCOE_H_ #define _FC_FCOE_H_ /* * FCoE - Fibre Channel over Ethernet. * See T11 FC-BB-5 Rev 2.00 (09-056v5.pdf) */ /* * Default FC_FCOE_OUI / FC-MAP value. */ #define FC_FCOE_OUI 0x0efc00 /* upper 24 bits of FCOE MAC */ /* * Fabric Login (FLOGI) MAC for non-FIP use. Non-FIP use is deprecated. */ #define FC_FCOE_FLOGI_MAC { 0x0e, 0xfc, 0x00, 0xff, 0xff, 0xfe } #define FC_FCOE_VER 0 /* version */ /* * Ethernet Addresses based on FC S_ID and D_ID. * Generated by FC_FCOE_OUI | S_ID/D_ID */ #define FC_FCOE_ENCAPS_ID(n) (((u64) FC_FCOE_OUI << 24) | (n)) #define FC_FCOE_DECAPS_ID(n) ((n) >> 24) /* * FCoE frame header - 14 bytes * This follows the VLAN header, which includes the ethertype. */ struct fcoe_hdr { __u8 fcoe_ver; /* version field - upper 4 bits */ __u8 fcoe_resvd[12]; /* reserved - send zero and ignore */ __u8 fcoe_sof; /* start of frame per RFC 3643 */ }; #define FC_FCOE_DECAPS_VER(hp) ((hp)->fcoe_ver >> 4) #define FC_FCOE_ENCAPS_VER(hp, ver) ((hp)->fcoe_ver = (ver) << 4) /* * FCoE CRC & EOF - 8 bytes. */ struct fcoe_crc_eof { __le32 fcoe_crc32; /* CRC for FC packet */ __u8 fcoe_eof; /* EOF from RFC 3643 */ __u8 fcoe_resvd[3]; /* reserved - send zero and ignore */ } __attribute__((packed)); /* * Minimum FCoE + FC header length * 14 bytes FCoE header + 24 byte FC header = 38 bytes */ #define FCOE_HEADER_LEN 38 /* * Minimum FCoE frame size * 14 bytes FCoE header + 24 byte FC header + 8 byte FCoE trailer = 46 bytes */ #define FCOE_MIN_FRAME 46 /* * FCoE Link Error Status Block: T11 FC-BB-5 Rev2.0, Clause 7.10. */ struct fcoe_fc_els_lesb { __be32 lesb_link_fail; /* link failure count */ __be32 lesb_vlink_fail; /* virtual link failure count */ __be32 lesb_miss_fka; /* missing FIP keep-alive count */ __be32 lesb_symb_err; /* symbol error during carrier count */ __be32 lesb_err_block; /* errored block count */ __be32 lesb_fcs_error; /* frame check sequence error count */ }; /* * fc_fcoe_set_mac - Store OUI + DID into MAC address field. * @mac: mac address to be set * @did: fc dest id to use */ static inline void fc_fcoe_set_mac(u8 *mac, u8 *did) { mac[0] = (u8) (FC_FCOE_OUI >> 16); mac[1] = (u8) (FC_FCOE_OUI >> 8); mac[2] = (u8) FC_FCOE_OUI; mac[3] = did[0]; mac[4] = did[1]; mac[5] = did[2]; } #endif /* _FC_FCOE_H_ */ ass='cgit-panel'>diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2017-01-31 23:58:38 +0100
committerIngo Molnar <mingo@kernel.org>2017-02-01 08:37:27 +0100
commitdd86e373e09fb16b83e8adf5c48c421a4ca76468 (patch)
tree55703c2ea8584e303e342090614e0aab3509ab21 /net/xfrm/Makefile
parent0b3589be9b98994ce3d5aeca52445d1f5627c4ba (diff)
perf/x86/intel/rapl: Make package handling more robust
The package management code in RAPL relies on package mapping being available before a CPU is started. This changed with: 9d85eb9119f4 ("x86/smpboot: Make logical package management more robust") because the ACPI/BIOS information turned out to be unreliable, but that left RAPL in broken state. This was not noticed because on a regular boot all CPUs are online before RAPL is initialized. A possible fix would be to reintroduce the mess which allocates a package data structure in CPU prepare and when it turns out to already exist in starting throw it away later in the CPU online callback. But that's a horrible hack and not required at all because RAPL becomes functional for perf only in the CPU online callback. That's correct because user space is not yet informed about the CPU being onlined, so nothing caan rely on RAPL being available on that particular CPU. Move the allocation to the CPU online callback and simplify the hotplug handling. At this point the package mapping is established and correct. This also adds a missing check for available package data in the event_init() function. Reported-by: Yasuaki Ishimatsu <yasu.isimatu@gmail.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Sebastian Siewior <bigeasy@linutronix.de> Cc: Stephane Eranian <eranian@google.com> Cc: Vince Weaver <vincent.weaver@maine.edu> Fixes: 9d85eb9119f4 ("x86/smpboot: Make logical package management more robust") Link: http://lkml.kernel.org/r/20170131230141.212593966@linutronix.de Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'net/xfrm/Makefile')