* [PATCH net-next] liquidio: replace skb_tx_hash with fallback
From: Felix Manlunas @ 2017-01-12 18:46 UTC (permalink / raw)
To: davem; +Cc: netdev, raghu.vatsavayi, derek.chickles, satananda.burla
From: Satanand Burla <satananda.burla@cavium.com>
Use fallback instead of skb_tx_hash for selecting txq
Signed-off-by: Satanand Burla <satananda.burla@cavium.com>
Signed-off-by: Felix Manlunas <felix.manlunas@cavium.com>
Signed-off-by: Derek Chickles <derek.chickles@cavium.com>
---
drivers/net/ethernet/cavium/liquidio/lio_main.c | 10 ++--------
drivers/net/ethernet/cavium/liquidio/lio_vf_main.c | 11 ++---------
2 files changed, 4 insertions(+), 17 deletions(-)
diff --git a/drivers/net/ethernet/cavium/liquidio/lio_main.c b/drivers/net/ethernet/cavium/liquidio/lio_main.c
index b8b579d..90f000f 100644
--- a/drivers/net/ethernet/cavium/liquidio/lio_main.c
+++ b/drivers/net/ethernet/cavium/liquidio/lio_main.c
@@ -2231,15 +2231,9 @@ static void if_cfg_callback(struct octeon_device *oct,
*/
static u16 select_q(struct net_device *dev, struct sk_buff *skb,
void *accel_priv __attribute__((unused)),
- select_queue_fallback_t fallback __attribute__((unused)))
+ select_queue_fallback_t fallback)
{
- u32 qindex = 0;
- struct lio *lio;
-
- lio = GET_LIO(dev);
- qindex = skb_tx_hash(dev, skb);
-
- return (u16)(qindex % (lio->linfo.num_txpciq));
+ return fallback(dev, skb);
}
/** Routine to push packets arriving on Octeon interface upto network layer.
diff --git a/drivers/net/ethernet/cavium/liquidio/lio_vf_main.c b/drivers/net/ethernet/cavium/liquidio/lio_vf_main.c
index ad2e72d..a7478eb 100644
--- a/drivers/net/ethernet/cavium/liquidio/lio_vf_main.c
+++ b/drivers/net/ethernet/cavium/liquidio/lio_vf_main.c
@@ -1463,16 +1463,9 @@ static void if_cfg_callback(struct octeon_device *oct,
*/
static u16 select_q(struct net_device *dev, struct sk_buff *skb,
void *accel_priv __attribute__((unused)),
- select_queue_fallback_t fallback __attribute__((unused)))
+ select_queue_fallback_t fallback)
{
- struct lio *lio;
- u32 qindex;
-
- lio = GET_LIO(dev);
-
- qindex = skb_tx_hash(dev, skb);
-
- return (u16)(qindex % (lio->linfo.num_txpciq));
+ return fallback(dev, skb);
}
/** Routine to push packets arriving on Octeon interface upto network layer.
^ permalink raw reply related
* PROBLEM: Realtek RTL8101/2/6E unstable with both r8169 and r8101 drivers
From: Neil Jeffery @ 2017-01-12 18:51 UTC (permalink / raw)
To: nic_swsd; +Cc: netdev
[1.] One line summary of the problem: Realtek RTL8101/2/6E is unstable
with both r8169 and r8101 drivers. (Intel D945GCLF with kernel
4.10rc2) (NOTE: 4.10rc3 fails during dpkg -i)
[2.] Full description of the problem/report: Immediately following
boot (or depmod r8101) the Ethernet interface works and I can
successfully communicate over the interface I have seen consistent
downloads of 6MB/s. At a seemingly random point later, connectivity
will cease without warning. At this time the stats (RX/TX
bytes/packets) in ifconfig cease to increase but the interface remains
UP. A ping to the locally configured static IP returns successfully.
"ifdown && ifup" does not fix the problem, but "rmmod && depmod" does.
The point at which the connectivity ceases does not appear to be
consistent in either time or amount of data transferred. I have tried
v1.030 and v1.029 of the r8101 driver. Note that with the native r8169
driver I get no Ethernet functionality at all. The interface shows as
up but I can't transfer any data over it.
[3.] Keywords (i.e., modules, networking, kernel):
[4.] Kernel version (from /proc/version): Linux version
4.10.0-041000rc2-generic (kernel@tangerine) (gcc version 6.2.0
20161005 (Ubuntu 6.2.0-5ubuntu12) ) #201701011831 SMP Sun Jan 1
23:50:26 UTC 2017
[5.] Output of Oops.. message (if applicable) with symbolic information
resolved (see Documentation/oops-tracing.txt)
[6.] A small shell script or example program which triggers the
problem (if possible)
[7.] Environment: Description: Ubuntu 16.04.1 LTS Release: 16.04
[7.1.] Software (add the output of the ver_linux script here)
[7.2.] Processor information (from /proc/cpuinfo): processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 28
model name : Intel(R) Atom(TM) CPU 230 @ 1.60GHz
stepping : 2
cpu MHz : 1596.122
cache size : 512 KB
physical id : 0
siblings : 2
core id : 0
cpu cores : 1
apicid : 0
initial apicid : 0
fdiv_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 10
wp : yes
flags : fpu vme de tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat
clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx lm constant_tsc
arch_perfmon pebs bts aperfmperf pni dtes64 monitor ds_cpl tm2 ssse3
cx16 xtpr pdcm movbe lahf_lm dtherm
bugs :
bogomips : 3192.24
clflush size : 64
cache_alignment : 64
address sizes : 32 bits physical, 48 bits virtual
power management:
processor : 1
vendor_id : GenuineIntel
cpu family : 6
model : 28
model name : Intel(R) Atom(TM) CPU 230 @ 1.60GHz
stepping : 2
cpu MHz : 1596.122
cache size : 512 KB
physical id : 0
siblings : 2
core id : 0
cpu cores : 1
apicid : 1
initial apicid : 1
fdiv_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 10
wp : yes
flags : fpu vme de tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat
clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx lm constant_tsc
arch_perfmon pebs bts aperfmperf pni dtes64 monitor ds_cpl tm2 ssse3
cx16 xtpr pdcm movbe lahf_lm dtherm
bugs :
bogomips : 3192.26
clflush size : 64
cache_alignment : 64
address sizes : 32 bits physical, 48 bits virtual
power management:
[7.3.] Module information (from /proc/modules): nls_iso8859_1 16384 1
- Live 0xf8611000
nfnetlink_log 20480 1 - Live 0xf868f000
nfnetlink 16384 2 nfnetlink_log, Live 0xf8686000
snd_hda_codec_realtek 77824 1 - Live 0xf8735000
snd_hda_codec_generic 69632 1 snd_hda_codec_realtek, Live 0xf874b000
snd_hda_intel 32768 0 - Live 0xf8716000
snd_hda_codec 118784 3
snd_hda_codec_realtek,snd_hda_codec_generic,snd_hda_intel, Live
0xf86b6000
gpio_ich 16384 0 - Live 0xf8646000
snd_hda_core 73728 4
snd_hda_codec_realtek,snd_hda_codec_generic,snd_hda_intel,snd_hda_codec,
Live 0xf86f3000
snd_hwdep 16384 1 snd_hda_codec, Live 0xf86a9000
snd_pcm 98304 3 snd_hda_intel,snd_hda_codec,snd_hda_core, Live 0xf86d6000
ppdev 20480 0 - Live 0xf8677000
snd_seq_midi 16384 0 - Live 0xf8641000
snd_seq_midi_event 16384 1 snd_seq_midi, Live 0xf862d000
snd_rawmidi 28672 1 snd_seq_midi, Live 0xf86ae000
snd_seq 57344 2 snd_seq_midi,snd_seq_midi_event, Live 0xf869a000
input_leds 16384 0 - Live 0xf866e000
coretemp 16384 0 - Live 0xf85d9000
serio_raw 16384 0 - Live 0xf8695000
lpc_ich 20480 0 - Live 0xf8627000
snd_seq_device 16384 3 snd_seq_midi,snd_rawmidi,snd_seq, Live 0xf8622000
snd_timer 32768 2 snd_pcm,snd_seq, Live 0xf8665000
snd 69632 10 snd_hda_codec_realtek,snd_hda_codec_generic,snd_hda_intel,snd_hda_codec,snd_hwdep,snd_pcm,snd_rawmidi,snd_seq,snd_seq_device,snd_timer,
Live 0xf8653000
soundcore 16384 1 snd, Live 0xf852b000
shpchp 32768 0 - Live 0xf8619000
parport_pc 32768 1 - Live 0xf8633000
mac_hid 16384 0 - Live 0xf85bd000
smsc47m192 16384 0 - Live 0xf85c3000
hwmon_vid 16384 1 smsc47m192, Live 0xf8553000
lp 20480 0 - Live 0xf8559000
parport 49152 3 ppdev,parport_pc,lp, Live 0xf8601000
autofs4 40960 2 - Live 0xf85aa000
uas 20480 0 - Live 0xf85d3000
usb_storage 57344 2 uas, Live 0xf8e0f000
i915 1187840 1 - Live 0xf903a000
video 36864 1 i915, Live 0xf85c9000
i2c_algo_bit 16384 1 i915, Live 0xf8536000
drm_kms_helper 151552 1 i915, Live 0xf856c000
syscopyarea 16384 1 drm_kms_helper, Live 0xf854e000
sysfillrect 16384 1 drm_kms_helper, Live 0xf8531000
sysimgblt 16384 1 drm_kms_helper, Live 0xf8563000
pata_acpi 16384 0 - Live 0xf8546000
fb_sys_fops 16384 1 drm_kms_helper, Live 0xf853f000
drm 319488 3 i915,drm_kms_helper, Live 0xf8e75000
r8101 176128 0 - Live 0xf8de3000 (OE)
fjes 61440 0 - Live 0xf8595000
[7.4.] Loaded driver and hardware information (/proc/ioports,
/proc/iomem): 0000-0cf7 : PCI Bus 0000:00
0000-001f : dma1
0020-0021 : pic1
0040-0043 : timer0
0050-0053 : timer1
0060-0060 : keyboard
0061-0061 : PNP0800:00
0064-0064 : keyboard
0070-0071 : rtc0
0080-008f : dma page reg
00a0-00a1 : pic2
00c0-00df : dma2
00f0-00ff : fpu
00f0-00f0 : PNP0C04:00
0170-0177 : 0000:00:1f.1
0170-0177 : ata_piix
01f0-01f7 : 0000:00:1f.1
01f0-01f7 : ata_piix
0376-0376 : 0000:00:1f.1
0376-0376 : ata_piix
0378-037a : parport0
037b-037f : parport0
03c0-03df : vesafb
03f6-03f6 : 0000:00:1f.1
03f6-03f6 : ata_piix
03f8-03ff : serial
0400-047f : 0000:00:1f.0
0400-047f : pnp 00:02
0400-0403 : ACPI PM1a_EVT_BLK
0404-0405 : ACPI PM1a_CNT_BLK
0408-040b : ACPI PM_TMR
0420-0420 : ACPI PM2_CNT_BLK
0428-042f : ACPI GPE0_BLK
0430-0433 : iTCO_wdt.0.auto
0460-047f : iTCO_wdt.0.auto
0500-053f : gpio_ich.1.auto
0500-053f : 0000:00:1f.0
0500-053f : pnp 00:02
0530-053f : gpio_ich
0680-06ff : pnp 00:02
0778-077a : parport0
0cf8-0cff : PCI conf1
0d00-ffff : PCI Bus 0000:00
1000-1fff : PCI Bus 0000:01
1000-10ff : 0000:01:00.0
1000-10ff : r8101
2000-201f : 0000:00:1f.3
2020-203f : 0000:00:1d.3
2020-203f : uhci_hcd
2040-205f : 0000:00:1d.1
2040-205f : uhci_hcd
2060-207f : 0000:00:1d.0
2060-207f : uhci_hcd
2080-208f : 0000:00:1f.2
2080-208f : ata_piix
2090-209f : 0000:00:1f.1
2090-209f : ata_piix
20a0-20a7 : 0000:00:1f.2
20a0-20a7 : ata_piix
20a8-20af : 0000:00:1f.2
20a8-20af : ata_piix
20c0-20c7 : 0000:00:02.0
20c8-20cb : 0000:00:1f.2
20c8-20cb : ata_piix
20cc-20cf : 0000:00:1f.2
20cc-20cf : ata_piix
3000-3fff : PCI Bus 0000:02
4000-4fff : PCI Bus 0000:03
00000000-00000fff : reserved
00001000-0008efff : System RAM
0008f000-0009ffff : reserved
000a0000-000bffff : PCI Bus 0000:00
000a0000-000bffff : Video RAM area
000c0000-000c7fff : Video ROM
000cb000-000cbfff : Adapter ROM
000e0000-000fffff : reserved
000e0000-000effff : PCI Bus 0000:00
000f0000-000fffff : System ROM
00100000-7f532fff : System RAM
16000000-1681281e : Kernel code
1681281f-16c4287f : Kernel data
16d44000-16e28fff : Kernel bss
7f533000-7f53afff : reserved
7f53b000-7f5cafff : System RAM
7f5cb000-7f5cefff : reserved
7f5cf000-7f65ffff : System RAM
7f660000-7f6effff : ACPI Non-volatile Storage
7f6f0000-7f6f2fff : System RAM
7f6f3000-7f6fefff : ACPI Tables
7f6ff000-7f6fffff : System RAM
7f700000-7fffffff : reserved
7f800000-7ffbffff : Graphics Stolen Memory
80000000-ffffffff : reserved
80000000-f0000000 : PCI Bus 0000:00
80000000-8fffffff : 0000:00:02.0
90000000-900fffff : PCI Bus 0000:01
90000000-9000ffff : 0000:01:00.0
90000000-9000ffff : r8101
90100000-901fffff : PCI Bus 0000:01
90100000-90100fff : 0000:01:00.0
90100000-90100fff : r8101
90120000-9013ffff : 0000:01:00.0
90200000-9027ffff : 0000:00:02.0
90280000-902bffff : 0000:00:02.0
902c0000-902c3fff : 0000:00:1b.0
902c0000-902c3fff : ICH HD audio
902c4000-902c43ff : 0000:00:1d.7
902c4000-902c43ff : ehci_hcd
90300000-904fffff : PCI Bus 0000:02
90500000-906fffff : PCI Bus 0000:02
90700000-908fffff : PCI Bus 0000:03
90900000-90afffff : PCI Bus 0000:03
f8000000-febfffff : PCI Bus 0000:00
fec00000-fec003ff : IOAPIC 0
fec00000-fec000ff : PNP0003:00
fed13000-fed13fff : pnp 00:00
fed14000-fed17fff : pnp 00:00
fed18000-fed18fff : pnp 00:00
fed19000-fed19fff : pnp 00:00
fed1c000-fed1ffff : pnp 00:00
fed1f410-fed1f414 : iTCO_wdt.0.auto
fed20000-fed3ffff : pnp 00:00
fed45000-fed99fff : pnp 00:00
fee00000-fee00fff : Local APIC
[7.5.] PCI information ('lspci -vvv' as root): 00:00.0 Host bridge:
Intel Corporation 82945G/GZ/P/PL Memory Controller Hub (rev 02)
Subsystem: Intel Corporation 82945G/GZ/P/PL Memory Controller Hub
Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr-
Stepping- SERR- FastB2B- DisINTx-
Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=fast >TAbort-
<TAbort- <MAbort+ >SERR- <PERR- INTx-
Latency: 0
Capabilities: [e0] Vendor Specific Information: Len=09 <?>
00:02.0 VGA compatible controller: Intel Corporation 82945G/GZ
Integrated Graphics Controller (rev 02) (prog-if 00 [VGA controller])
Subsystem: Intel Corporation 82945G/GZ Integrated Graphics Controller
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr-
Stepping- SERR- FastB2B- DisINTx-
Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=fast >TAbort-
<TAbort- <MAbort- >SERR- <PERR- INTx-
Latency: 0
Interrupt: pin A routed to IRQ 16
Region 0: Memory at 90200000 (32-bit, non-prefetchable) [size=512K]
Region 1: I/O ports at 20c0 [size=8]
Region 2: Memory at 80000000 (32-bit, prefetchable) [size=256M]
Region 3: Memory at 90280000 (32-bit, non-prefetchable) [size=256K]
[virtual] Expansion ROM at 000c0000 [disabled] [size=128K]
Capabilities: [90] MSI: Enable- Count=1/1 Maskable- 64bit-
Address: 00000000 Data: 0000
Capabilities: [d0] Power Management version 2
Flags: PMEClk- DSI+ D1- D2- AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot-,D3cold-)
Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
Kernel driver in use: i915
Kernel modules: i915, intelfb
00:1b.0 Audio device: Intel Corporation NM10/ICH7 Family High
Definition Audio Controller (rev 01)
Subsystem: Intel Corporation NM10/ICH7 Family High Definition Audio Controller
Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr-
Stepping- SERR- FastB2B- DisINTx+
Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort-
<TAbort- <MAbort- >SERR- <PERR- INTx-
Latency: 0, Cache Line Size: 64 bytes
Interrupt: pin A routed to IRQ 27
Region 0: Memory at 902c0000 (64-bit, non-prefetchable) [size=16K]
Capabilities: [50] Power Management version 2
Flags: PMEClk- DSI- D1- D2- AuxCurrent=55mA PME(D0+,D1-,D2-,D3hot+,D3cold+)
Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
Capabilities: [60] MSI: Enable+ Count=1/1 Maskable- 64bit+
Address: 00000000fee0300c Data: 4152
Capabilities: [70] Express (v1) Root Complex Integrated Endpoint, MSI 00
DevCap: MaxPayload 128 bytes, PhantFunc 0
ExtTag- RBE-
DevCtl: Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
RlxdOrd- ExtTag- PhantFunc- AuxPwr- NoSnoop+
MaxPayload 128 bytes, MaxReadReq 128 bytes
DevSta: CorrErr- UncorrErr- FatalErr- UnsuppReq- AuxPwr+ TransPend-
Capabilities: [100 v1] Virtual Channel
Caps: LPEVC=0 RefClk=100ns PATEntryBits=1
Arb: Fixed- WRR32- WRR64- WRR128-
Ctrl: ArbSelect=Fixed
Status: InProgress-
VC0: Caps: PATOffset=00 MaxTimeSlots=1 RejSnoopTrans-
Arb: Fixed- WRR32- WRR64- WRR128- TWRR128- WRR256-
Ctrl: Enable+ ID=0 ArbSelect=Fixed TC/VC=01
Status: NegoPending- InProgress-
VC1: Caps: PATOffset=00 MaxTimeSlots=1 RejSnoopTrans-
Arb: Fixed- WRR32- WRR64- WRR128- TWRR128- WRR256-
Ctrl: Enable+ ID=1 ArbSelect=Fixed TC/VC=80
Status: NegoPending- InProgress-
Capabilities: [130 v1] Root Complex Link
Desc: PortNumber=0f ComponentID=00 EltType=Config
Link0: Desc: TargetPort=00 TargetComponent=00 AssocRCRB-
LinkType=MemMapped LinkValid+
Addr: 00000000fed1c000
Kernel driver in use: snd_hda_intel
Kernel modules: snd_hda_intel
00:1c.0 PCI bridge: Intel Corporation NM10/ICH7 Family PCI Express
Port 1 (rev 01) (prog-if 00 [Normal decode])
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr-
Stepping- SERR- FastB2B- DisINTx+
Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort-
<TAbort- <MAbort- >SERR- <PERR- INTx-
Latency: 0, Cache Line Size: 64 bytes
Interrupt: pin A routed to IRQ 24
Bus: primary=00, secondary=01, subordinate=01, sec-latency=0
I/O behind bridge: 00001000-00001fff
Memory behind bridge: 90100000-901fffff
Prefetchable memory behind bridge: 0000000090000000-00000000900fffff
Secondary status: 66MHz- FastB2B- ParErr- DEVSEL=fast >TAbort-
<TAbort- <MAbort- <SERR- <PERR-
BridgeCtl: Parity- SERR- NoISA+ VGA- MAbort- >Reset- FastB2B-
PriDiscTmr- SecDiscTmr- DiscTmrStat- DiscTmrSERREn-
Capabilities: [40] Express (v1) Root Port (Slot+), MSI 00
DevCap: MaxPayload 128 bytes, PhantFunc 0
ExtTag- RBE-
DevCtl: Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
RlxdOrd- ExtTag- PhantFunc- AuxPwr- NoSnoop-
MaxPayload 128 bytes, MaxReadReq 128 bytes
DevSta: CorrErr- UncorrErr- FatalErr- UnsuppReq- AuxPwr+ TransPend-
LnkCap: Port #1, Speed 2.5GT/s, Width x1, ASPM L0s L1, Exit Latency
L0s <256ns, L1 <4us
ClockPM- Surprise- LLActRep+ BwNot- ASPMOptComp-
LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- CommClk+
ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive+
BWMgmt- ABWMgmt-
SltCap: AttnBtn- PwrCtrl- MRL- AttnInd- PwrInd- HotPlug+ Surprise+
Slot #1, PowerLimit 10.000W; Interlock- NoCompl-
SltCtl: Enable: AttnBtn- PwrFlt- MRL- PresDet- CmdCplt- HPIrq- LinkChg-
Control: AttnInd Unknown, PwrInd Unknown, Power- Interlock-
SltSta: Status: AttnBtn- PowerFlt- MRL- CmdCplt- PresDet+ Interlock-
Changed: MRL- PresDet+ LinkState+
RootCtl: ErrCorrectable- ErrNon-Fatal- ErrFatal- PMEIntEna- CRSVisible-
RootCap: CRSVisible-
RootSta: PME ReqID 0000, PMEStatus- PMEPending-
Capabilities: [80] MSI: Enable+ Count=1/1 Maskable- 64bit-
Address: fee0300c Data: 4191
Capabilities: [90] Subsystem: Device 0000:0000
Capabilities: [a0] Power Management version 2
Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0+,D1-,D2-,D3hot+,D3cold+)
Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
Capabilities: [100 v1] Virtual Channel
Caps: LPEVC=0 RefClk=100ns PATEntryBits=1
Arb: Fixed+ WRR32- WRR64- WRR128-
Ctrl: ArbSelect=Fixed
Status: InProgress-
VC0: Caps: PATOffset=00 MaxTimeSlots=1 RejSnoopTrans-
Arb: Fixed+ WRR32- WRR64- WRR128- TWRR128- WRR256-
Ctrl: Enable+ ID=0 ArbSelect=Fixed TC/VC=01
Status: NegoPending- InProgress-
VC1: Caps: PATOffset=00 MaxTimeSlots=1 RejSnoopTrans-
Arb: Fixed+ WRR32- WRR64- WRR128- TWRR128- WRR256-
Ctrl: Enable- ID=0 ArbSelect=Fixed TC/VC=00
Status: NegoPending- InProgress-
Capabilities: [180 v1] Root Complex Link
Desc: PortNumber=01 ComponentID=00 EltType=Config
Link0: Desc: TargetPort=00 TargetComponent=00 AssocRCRB-
LinkType=MemMapped LinkValid+
Addr: 00000000fed1c001
Kernel driver in use: pcieport
Kernel modules: shpchp
00:1c.2 PCI bridge: Intel Corporation NM10/ICH7 Family PCI Express
Port 3 (rev 01) (prog-if 00 [Normal decode])
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr-
Stepping- SERR- FastB2B- DisINTx+
Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort-
<TAbort- <MAbort- >SERR- <PERR- INTx-
Latency: 0, Cache Line Size: 64 bytes
Interrupt: pin C routed to IRQ 25
Bus: primary=00, secondary=02, subordinate=02, sec-latency=0
I/O behind bridge: 00003000-00003fff
Memory behind bridge: 90300000-904fffff
Prefetchable memory behind bridge: 0000000090500000-00000000906fffff
Secondary status: 66MHz- FastB2B- ParErr- DEVSEL=fast >TAbort-
<TAbort- <MAbort+ <SERR- <PERR-
BridgeCtl: Parity- SERR- NoISA+ VGA- MAbort- >Reset- FastB2B-
PriDiscTmr- SecDiscTmr- DiscTmrStat- DiscTmrSERREn-
Capabilities: [40] Express (v1) Root Port (Slot+), MSI 00
DevCap: MaxPayload 128 bytes, PhantFunc 0
ExtTag- RBE-
DevCtl: Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
RlxdOrd- ExtTag- PhantFunc- AuxPwr- NoSnoop-
MaxPayload 128 bytes, MaxReadReq 128 bytes
DevSta: CorrErr- UncorrErr- FatalErr- UnsuppReq- AuxPwr+ TransPend-
LnkCap: Port #3, Speed 2.5GT/s, Width x1, ASPM L0s L1, Exit Latency
L0s <1us, L1 <4us
ClockPM- Surprise- LLActRep+ BwNot- ASPMOptComp-
LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- CommClk-
ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
LnkSta: Speed 2.5GT/s, Width x0, TrErr- Train- SlotClk+ DLActive-
BWMgmt- ABWMgmt-
SltCap: AttnBtn- PwrCtrl- MRL- AttnInd- PwrInd- HotPlug+ Surprise+
Slot #3, PowerLimit 10.000W; Interlock- NoCompl-
SltCtl: Enable: AttnBtn- PwrFlt- MRL- PresDet- CmdCplt- HPIrq- LinkChg-
Control: AttnInd Unknown, PwrInd Unknown, Power- Interlock-
SltSta: Status: AttnBtn- PowerFlt- MRL- CmdCplt- PresDet- Interlock-
Changed: MRL- PresDet- LinkState-
RootCtl: ErrCorrectable- ErrNon-Fatal- ErrFatal- PMEIntEna- CRSVisible-
RootCap: CRSVisible-
RootSta: PME ReqID 0000, PMEStatus- PMEPending-
Capabilities: [80] MSI: Enable+ Count=1/1 Maskable- 64bit-
Address: fee0300c Data: 41b1
Capabilities: [90] Subsystem: Device 0000:0000
Capabilities: [a0] Power Management version 2
Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0+,D1-,D2-,D3hot+,D3cold+)
Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
Capabilities: [100 v1] Virtual Channel
Caps: LPEVC=0 RefClk=100ns PATEntryBits=1
Arb: Fixed+ WRR32- WRR64- WRR128-
Ctrl: ArbSelect=Fixed
Status: InProgress-
VC0: Caps: PATOffset=00 MaxTimeSlots=1 RejSnoopTrans-
Arb: Fixed+ WRR32- WRR64- WRR128- TWRR128- WRR256-
Ctrl: Enable+ ID=0 ArbSelect=Fixed TC/VC=01
Status: NegoPending- InProgress-
VC1: Caps: PATOffset=00 MaxTimeSlots=1 RejSnoopTrans-
Arb: Fixed+ WRR32- WRR64- WRR128- TWRR128- WRR256-
Ctrl: Enable- ID=0 ArbSelect=Fixed TC/VC=00
Status: NegoPending- InProgress-
Capabilities: [180 v1] Root Complex Link
Desc: PortNumber=03 ComponentID=00 EltType=Config
Link0: Desc: TargetPort=00 TargetComponent=00 AssocRCRB-
LinkType=MemMapped LinkValid+
Addr: 00000000fed1c001
Kernel driver in use: pcieport
Kernel modules: shpchp
00:1c.3 PCI bridge: Intel Corporation NM10/ICH7 Family PCI Express
Port 4 (rev 01) (prog-if 00 [Normal decode])
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr-
Stepping- SERR- FastB2B- DisINTx+
Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort-
<TAbort- <MAbort- >SERR- <PERR- INTx-
Latency: 0, Cache Line Size: 64 bytes
Interrupt: pin D routed to IRQ 26
Bus: primary=00, secondary=03, subordinate=03, sec-latency=0
I/O behind bridge: 00004000-00004fff
Memory behind bridge: 90700000-908fffff
Prefetchable memory behind bridge: 0000000090900000-0000000090afffff
Secondary status: 66MHz- FastB2B- ParErr- DEVSEL=fast >TAbort-
<TAbort- <MAbort+ <SERR- <PERR-
BridgeCtl: Parity- SERR- NoISA+ VGA- MAbort- >Reset- FastB2B-
PriDiscTmr- SecDiscTmr- DiscTmrStat- DiscTmrSERREn-
Capabilities: [40] Express (v1) Root Port (Slot+), MSI 00
DevCap: MaxPayload 128 bytes, PhantFunc 0
ExtTag- RBE-
DevCtl: Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
RlxdOrd- ExtTag- PhantFunc- AuxPwr- NoSnoop-
MaxPayload 128 bytes, MaxReadReq 128 bytes
DevSta: CorrErr- UncorrErr- FatalErr- UnsuppReq- AuxPwr+ TransPend-
LnkCap: Port #4, Speed 2.5GT/s, Width x1, ASPM L0s L1, Exit Latency
L0s <1us, L1 <4us
ClockPM- Surprise- LLActRep+ BwNot- ASPMOptComp-
LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- CommClk-
ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
LnkSta: Speed 2.5GT/s, Width x0, TrErr- Train- SlotClk+ DLActive-
BWMgmt- ABWMgmt-
SltCap: AttnBtn- PwrCtrl- MRL- AttnInd- PwrInd- HotPlug+ Surprise+
Slot #4, PowerLimit 10.000W; Interlock- NoCompl-
SltCtl: Enable: AttnBtn- PwrFlt- MRL- PresDet- CmdCplt- HPIrq- LinkChg-
Control: AttnInd Unknown, PwrInd Unknown, Power- Interlock-
SltSta: Status: AttnBtn- PowerFlt- MRL- CmdCplt- PresDet- Interlock-
Changed: MRL- PresDet- LinkState-
RootCtl: ErrCorrectable- ErrNon-Fatal- ErrFatal- PMEIntEna- CRSVisible-
RootCap: CRSVisible-
RootSta: PME ReqID 0000, PMEStatus- PMEPending-
Capabilities: [80] MSI: Enable+ Count=1/1 Maskable- 64bit-
Address: fee0300c Data: 41d1
Capabilities: [90] Subsystem: Device 0000:0000
Capabilities: [a0] Power Management version 2
Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0+,D1-,D2-,D3hot+,D3cold+)
Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
Capabilities: [100 v1] Virtual Channel
Caps: LPEVC=0 RefClk=100ns PATEntryBits=1
Arb: Fixed+ WRR32- WRR64- WRR128-
Ctrl: ArbSelect=Fixed
Status: InProgress-
VC0: Caps: PATOffset=00 MaxTimeSlots=1 RejSnoopTrans-
Arb: Fixed+ WRR32- WRR64- WRR128- TWRR128- WRR256-
Ctrl: Enable+ ID=0 ArbSelect=Fixed TC/VC=01
Status: NegoPending- InProgress-
VC1: Caps: PATOffset=00 MaxTimeSlots=1 RejSnoopTrans-
Arb: Fixed+ WRR32- WRR64- WRR128- TWRR128- WRR256-
Ctrl: Enable- ID=0 ArbSelect=Fixed TC/VC=00
Status: NegoPending- InProgress-
Capabilities: [180 v1] Root Complex Link
Desc: PortNumber=04 ComponentID=00 EltType=Config
Link0: Desc: TargetPort=00 TargetComponent=00 AssocRCRB-
LinkType=MemMapped LinkValid+
Addr: 00000000fed1c001
Kernel driver in use: pcieport
Kernel modules: shpchp
00:1d.0 USB controller: Intel Corporation NM10/ICH7 Family USB UHCI
Controller #1 (rev 01) (prog-if 00 [UHCI])
Subsystem: Intel Corporation NM10/ICH7 Family USB UHCI Controller
Control: I/O+ Mem- BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr-
Stepping- SERR- FastB2B- DisINTx-
Status: Cap- 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort-
<TAbort- <MAbort- >SERR- <PERR- INTx-
Latency: 0
Interrupt: pin A routed to IRQ 23
Region 4: I/O ports at 2060 [size=32]
Kernel driver in use: uhci_hcd
00:1d.1 USB controller: Intel Corporation NM10/ICH7 Family USB UHCI
Controller #2 (rev 01) (prog-if 00 [UHCI])
Subsystem: Intel Corporation NM10/ICH7 Family USB UHCI Controller
Control: I/O+ Mem- BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr-
Stepping- SERR- FastB2B- DisINTx-
Status: Cap- 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort-
<TAbort- <MAbort- >SERR- <PERR- INTx-
Latency: 0
Interrupt: pin B routed to IRQ 19
Region 4: I/O ports at 2040 [size=32]
Kernel driver in use: uhci_hcd
00:1d.3 USB controller: Intel Corporation NM10/ICH7 Family USB UHCI
Controller #4 (rev 01) (prog-if 00 [UHCI])
Subsystem: Intel Corporation NM10/ICH7 Family USB UHCI Controller
Control: I/O+ Mem- BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr-
Stepping- SERR- FastB2B- DisINTx-
Status: Cap- 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort-
<TAbort- <MAbort- >SERR- <PERR- INTx-
Latency: 0
Interrupt: pin D routed to IRQ 16
Region 4: I/O ports at 2020 [size=32]
Kernel driver in use: uhci_hcd
00:1d.7 USB controller: Intel Corporation NM10/ICH7 Family USB2 EHCI
Controller (rev 01) (prog-if 20 [EHCI])
Subsystem: Intel Corporation NM10/ICH7 Family USB2 EHCI Controller
Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr-
Stepping- SERR- FastB2B- DisINTx-
Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort-
<TAbort- <MAbort- >SERR- <PERR- INTx-
Latency: 0
Interrupt: pin A routed to IRQ 23
Region 0: Memory at 902c4000 (32-bit, non-prefetchable) [size=1K]
Capabilities: [50] Power Management version 2
Flags: PMEClk- DSI- D1- D2- AuxCurrent=375mA PME(D0+,D1-,D2-,D3hot+,D3cold+)
Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
Capabilities: [58] Debug port: BAR=1 offset=00a0
Kernel driver in use: ehci-pci
00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev e1)
(prog-if 01 [Subtractive decode])
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr-
Stepping- SERR- FastB2B- DisINTx-
Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort-
<TAbort- <MAbort- >SERR- <PERR- INTx-
Latency: 0
Bus: primary=00, secondary=04, subordinate=04, sec-latency=32
I/O behind bridge: 0000f000-00000fff
Memory behind bridge: fff00000-000fffff
Prefetchable memory behind bridge: 00000000fff00000-00000000000fffff
Secondary status: 66MHz- FastB2B+ ParErr- DEVSEL=medium >TAbort-
<TAbort- <MAbort+ <SERR- <PERR-
BridgeCtl: Parity- SERR- NoISA+ VGA- MAbort- >Reset- FastB2B-
PriDiscTmr- SecDiscTmr- DiscTmrStat- DiscTmrSERREn-
Capabilities: [50] Subsystem: Intel Corporation 82801 PCI Bridge
00:1f.0 ISA bridge: Intel Corporation 82801GB/GR (ICH7 Family) LPC
Interface Bridge (rev 01)
Subsystem: Intel Corporation 82801GB/GR (ICH7 Family) LPC Interface Bridge
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr-
Stepping- SERR- FastB2B- DisINTx-
Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=medium >TAbort-
<TAbort- <MAbort- >SERR- <PERR- INTx-
Latency: 0
Capabilities: [e0] Vendor Specific Information: Len=0c <?>
Kernel driver in use: lpc_ich
Kernel modules: intel_rng, lpc_ich, leds_ss4200
00:1f.1 IDE interface: Intel Corporation 82801G (ICH7 Family) IDE
Controller (rev 01) (prog-if 8a [Master SecP PriP])
Subsystem: Intel Corporation 82801G (ICH7 Family) IDE Controller
Control: I/O+ Mem- BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr-
Stepping- SERR- FastB2B- DisINTx-
Status: Cap- 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort-
<TAbort- <MAbort- >SERR- <PERR- INTx-
Latency: 0
Interrupt: pin A routed to IRQ 18
Region 0: I/O ports at 01f0 [size=8]
Region 1: I/O ports at 03f4
Region 2: I/O ports at 0170 [size=8]
Region 3: I/O ports at 0374
Region 4: I/O ports at 2090 [size=16]
Kernel driver in use: ata_piix
Kernel modules: pata_acpi
00:1f.2 IDE interface: Intel Corporation NM10/ICH7 Family SATA
Controller [IDE mode] (rev 01) (prog-if 8f [Master SecP SecO PriP
PriO])
Subsystem: Intel Corporation NM10/ICH7 Family SATA Controller [IDE mode]
Control: I/O+ Mem- BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr-
Stepping- SERR- FastB2B- DisINTx-
Status: Cap+ 66MHz+ UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort-
<TAbort- <MAbort- >SERR- <PERR- INTx-
Latency: 0
Interrupt: pin B routed to IRQ 19
Region 0: I/O ports at 20a8 [size=8]
Region 1: I/O ports at 20cc [size=4]
Region 2: I/O ports at 20a0 [size=8]
Region 3: I/O ports at 20c8 [size=4]
Region 4: I/O ports at 2080 [size=16]
Capabilities: [70] Power Management version 2
Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot+,D3cold-)
Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
Kernel driver in use: ata_piix
Kernel modules: pata_acpi
00:1f.3 SMBus: Intel Corporation NM10/ICH7 Family SMBus Controller (rev 01)
Subsystem: Intel Corporation NM10/ICH7 Family SMBus Controller
Control: I/O+ Mem- BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr-
Stepping- SERR- FastB2B- DisINTx-
Status: Cap- 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort-
<TAbort- <MAbort- >SERR- <PERR- INTx-
Interrupt: pin B routed to IRQ 11
Region 4: I/O ports at 2000 [size=32]
Kernel modules: i2c_i801
01:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd.
RTL8101/2/6E PCI Express Fast/Gigabit Ethernet controller (rev 02)
Subsystem: Intel Corporation RTL8101/2/6E PCI Express Fast/Gigabit
Ethernet controller
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr-
Stepping- SERR- FastB2B- DisINTx-
Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort-
<TAbort- <MAbort- >SERR- <PERR- INTx-
Latency: 0, Cache Line Size: 64 bytes
Interrupt: pin A routed to IRQ 16
Region 0: I/O ports at 1000 [size=256]
Region 2: Memory at 90100000 (64-bit, non-prefetchable) [size=4K]
Region 4: Memory at 90000000 (64-bit, prefetchable) [size=64K]
[virtual] Expansion ROM at 90120000 [disabled] [size=128K]
Capabilities: [40] Power Management version 3
Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=375mA PME(D0+,D1+,D2+,D3hot+,D3cold+)
Status: D0 NoSoftRst+ PME-Enable- DSel=0 DScale=0 PME-
Capabilities: [50] MSI: Enable- Count=1/1 Maskable- 64bit+
Address: 0000000000000000 Data: 0000
Capabilities: [70] Express (v2) Endpoint, MSI 01
DevCap: MaxPayload 256 bytes, PhantFunc 0, Latency L0s <512ns, L1 <8us
ExtTag- AttnBtn- AttnInd- PwrInd- RBE+ FLReset-
DevCtl: Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
RlxdOrd+ ExtTag- PhantFunc- AuxPwr- NoSnoop-
MaxPayload 128 bytes, MaxReadReq 4096 bytes
DevSta: CorrErr- UncorrErr- FatalErr- UnsuppReq- AuxPwr+ TransPend-
LnkCap: Port #0, Speed 2.5GT/s, Width x1, ASPM L0s L1, Exit Latency
L0s <512ns, L1 <64us
ClockPM+ Surprise- LLActRep- BwNot- ASPMOptComp-
LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- CommClk+
ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive-
BWMgmt- ABWMgmt-
DevCap2: Completion Timeout: Not Supported, TimeoutDis+, LTR-, OBFF
Not Supported
DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis-, LTR-, OBFF Disabled
LnkCtl2: Target Link Speed: 2.5GT/s, EnterCompliance- SpeedDis-
Transmit Margin: Normal Operating Range, EnterModifiedCompliance-
ComplianceSOS-
Compliance De-emphasis: -6dB
LnkSta2: Current De-emphasis Level: -6dB, EqualizationComplete-,
EqualizationPhase1-
EqualizationPhase2-, EqualizationPhase3-, LinkEqualizationRequest-
Capabilities: [ac] MSI-X: Enable- Count=2 Masked-
Vector table: BAR=4 offset=00000000
PBA: BAR=4 offset=00000800
Capabilities: [cc] Vital Product Data
Not readable
Capabilities: [100 v1] Advanced Error Reporting
UESta: DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF-
MalfTLP- ECRC- UnsupReq- ACSViol-
UEMsk: DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF-
MalfTLP- ECRC- UnsupReq+ ACSViol-
UESvrt: DLP+ SDES+ TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+
MalfTLP+ ECRC- UnsupReq- ACSViol-
CESta: RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr-
CEMsk: RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr+
AERCap: First Error Pointer: 00, GenCap+ CGenEn- ChkCap+ ChkEn-
Capabilities: [140 v1] Virtual Channel
Caps: LPEVC=0 RefClk=100ns PATEntryBits=1
Arb: Fixed- WRR32- WRR64- WRR128-
Ctrl: ArbSelect=Fixed
Status: InProgress-
VC0: Caps: PATOffset=00 MaxTimeSlots=1 RejSnoopTrans-
Arb: Fixed- WRR32- WRR64- WRR128- TWRR128- WRR256-
Ctrl: Enable+ ID=0 ArbSelect=Fixed TC/VC=01
Status: NegoPending- InProgress-
Capabilities: [160 v1] Device Serial Number 01-00-00-00-36-4c-e0-00
Kernel driver in use: r8101
Kernel modules: r8101
[7.6.] SCSI information (from /proc/scsi/scsi): Attached devices:
Host: scsi0 Channel: 00 Id: 00 Lun: 00
Vendor: PHILIPS Model: PCRW5232P Rev: P2.2
Type: CD-ROM ANSI SCSI revision: 05
Host: scsi0 Channel: 00 Id: 01 Lun: 00
Vendor: ATA Model: ST380011A Rev: 3.06
Type: Direct-Access ANSI SCSI revision: 05
Host: scsi2 Channel: 00 Id: 00 Lun: 00
Vendor: ATA Model: SAMSUNG HD103UJ Rev: 1113
Type: Direct-Access ANSI SCSI revision: 05
Host: scsi3 Channel: 00 Id: 00 Lun: 00
Vendor: ATA Model: SAMSUNG HD103UJ Rev: 1112
Type: Direct-Access ANSI SCSI revision: 05
Host: scsi4 Channel: 00 Id: 00 Lun: 00
Vendor: Ut161 Model: USB2FlashStorage Rev: 0.00
Type: Direct-Access ANSI SCSI revision: 02
[7.7.] Other information that might be relevant to the problem
(please look in /proc and include all information that you
think to be relevant):
[X.] Other notes, patches, fixes, workarounds:
^ permalink raw reply
* Re: To netlink or not to netlink, that is the question
From: Jason A. Donenfeld @ 2017-01-12 19:02 UTC (permalink / raw)
To: Dan Williams; +Cc: Stephen Hemminger, Netdev
In-Reply-To: <1484246584.4651.3.camel@redhat.com>
Hi Dan,
Thanks for your response. I'd thought about this, at least for
adding/removing wgpeers/wgipmasks and for configuring wgdevices. This
would fit into multiple smaller messages indeed.
But what about fetching the list of all existing peers and ipmasks
atomically? It seems like with multiple calls, if I'm using some kind
of pagination, things could change in the process. That's why using
one big buffer was most appealing... Any ideas about this?
Jason
^ permalink raw reply
* [PATCH v2 12/26] IB: Convert ib_dma_*_coherent() argument type from u64 into dma_addr_t
From: Bart Van Assche @ 2017-01-12 19:07 UTC (permalink / raw)
To: Doug Ledford
Cc: linux-rdma, linux-kernel, Greg Kroah-Hartman, Bart Van Assche,
David S . Miller, netdev, rds-devel
In-Reply-To: <20170112190718.6728-1-bart.vanassche@sandisk.com>
This patch does not change any functionality.
Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
Reviewed-by: Leon Romanovsky <leonro@mellanox.com>
Cc: David S. Miller <davem@davemloft.net>
Cc: linux-rdma@vger.kernel.org
Cc: netdev@vger.kernel.org
Cc: rds-devel@oss.oracle.com
---
include/rdma/ib_verbs.h | 11 +++--------
net/rds/ib.h | 6 +++---
2 files changed, 6 insertions(+), 11 deletions(-)
diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h
index 89e80eb77e06..de8dfb61d2b6 100644
--- a/include/rdma/ib_verbs.h
+++ b/include/rdma/ib_verbs.h
@@ -3109,15 +3109,10 @@ static inline void ib_dma_sync_single_for_device(struct ib_device *dev,
*/
static inline void *ib_dma_alloc_coherent(struct ib_device *dev,
size_t size,
- u64 *dma_handle,
+ dma_addr_t *dma_handle,
gfp_t flag)
{
- dma_addr_t handle;
- void *ret;
-
- ret = dma_alloc_coherent(dev->dma_device, size, &handle, flag);
- *dma_handle = handle;
- return ret;
+ return dma_alloc_coherent(dev->dma_device, size, dma_handle, flag);
}
/**
@@ -3129,7 +3124,7 @@ static inline void *ib_dma_alloc_coherent(struct ib_device *dev,
*/
static inline void ib_dma_free_coherent(struct ib_device *dev,
size_t size, void *cpu_addr,
- u64 dma_handle)
+ dma_addr_t dma_handle)
{
dma_free_coherent(dev->dma_device, size, cpu_addr, dma_handle);
}
diff --git a/net/rds/ib.h b/net/rds/ib.h
index 45ac8e8e58f4..d21ca88ab628 100644
--- a/net/rds/ib.h
+++ b/net/rds/ib.h
@@ -134,7 +134,7 @@ struct rds_ib_connection {
struct rds_ib_work_ring i_send_ring;
struct rm_data_op *i_data_op;
struct rds_header *i_send_hdrs;
- u64 i_send_hdrs_dma;
+ dma_addr_t i_send_hdrs_dma;
struct rds_ib_send_work *i_sends;
atomic_t i_signaled_sends;
@@ -144,7 +144,7 @@ struct rds_ib_connection {
struct rds_ib_incoming *i_ibinc;
u32 i_recv_data_rem;
struct rds_header *i_recv_hdrs;
- u64 i_recv_hdrs_dma;
+ dma_addr_t i_recv_hdrs_dma;
struct rds_ib_recv_work *i_recvs;
u64 i_ack_recv; /* last ACK received */
struct rds_ib_refill_cache i_cache_incs;
@@ -161,7 +161,7 @@ struct rds_ib_connection {
struct rds_header *i_ack;
struct ib_send_wr i_ack_wr;
struct ib_sge i_ack_sge;
- u64 i_ack_dma;
+ dma_addr_t i_ack_dma;
unsigned long i_ack_queued;
/* Flow control related information
--
2.11.0
^ permalink raw reply related
* [PATCH v2 11/26] RDS: IB: Remove an unused structure member
From: Bart Van Assche @ 2017-01-12 19:07 UTC (permalink / raw)
To: Doug Ledford
Cc: linux-rdma, linux-kernel, Greg Kroah-Hartman, Bart Van Assche,
David S . Miller, netdev, rds-devel
In-Reply-To: <20170112190718.6728-1-bart.vanassche@sandisk.com>
Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
Acked-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
Cc: David S. Miller <davem@davemloft.net>
Cc: linux-rdma@vger.kernel.org
Cc: netdev@vger.kernel.org
Cc: rds-devel@oss.oracle.com
---
net/rds/ib_mr.h | 1 -
1 file changed, 1 deletion(-)
diff --git a/net/rds/ib_mr.h b/net/rds/ib_mr.h
index 1c754f4acbe5..24c086db4511 100644
--- a/net/rds/ib_mr.h
+++ b/net/rds/ib_mr.h
@@ -45,7 +45,6 @@
struct rds_ib_fmr {
struct ib_fmr *fmr;
- u64 *dma;
};
enum rds_ib_fr_state {
--
2.11.0
^ permalink raw reply related
* Re: To netlink or not to netlink, that is the question
From: David Miller @ 2017-01-12 19:11 UTC (permalink / raw)
To: Jason; +Cc: dcbw, stephen, netdev
In-Reply-To: <CAHmME9oYDdQGsQ8jQGJMeJ-0A6O+Och+Y+5Q_=Q=M9qgrxDq2Q@mail.gmail.com>
From: "Jason A. Donenfeld" <Jason@zx2c4.com>
Date: Thu, 12 Jan 2017 20:02:14 +0100
> But what about fetching the list of all existing peers and ipmasks
> atomically? It seems like with multiple calls, if I'm using some kind
> of pagination, things could change in the process. That's why using
> one big buffer was most appealing... Any ideas about this?
This is a fact of life, dumps are always chopped into suitable
numbers of responses as necessary. We do this for IPV4 routes,
network interfaces, etc. and it all works out just fine.
The thing you should be asking yourself is, if something as heavily
used and fundamental as IPV4 can handle this, probably your scenerio
can be handled just fine as well.
^ permalink raw reply
* [for-next V2 1/1] {net, IB}/mlx5: Reorganize driver file layout
From: Saeed Mahameed @ 2017-01-12 19:29 UTC (permalink / raw)
To: David S. Miller, Doug Ledford
Cc: netdev-u79uwXL29TY76Z2rM5mHXA, linux-rdma-u79uwXL29TY76Z2rM5mHXA,
Leon Romanovsky, Leon Romanovsky, Saeed Mahameed
In-Reply-To: <20170112192934.25662-1-saeedm-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
From: Leon Romanovsky <leonro-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
This patch organizes mlx5 driver file layout to better reflect mlx5
modularity and allow future separation between EN, IB and shared code
parts.
The new structure:
* drivers/net/ethernet/mellanox/mlx5/* - core HW/PCI driver logic
* drivers/net/ethernet/mellanox/mlx5/en/* - ethernet
* drivers/net/ethernet/mellanox/mlx5/fs/* - flow steering
* drivers/net/ethernet/mellanox/mlx5/sriov/* - SR-IOV and E-Switch
* drivers/net/ethernet/mellanox/mlx5/lib/* - common mlx5 commands and API library
In future submissions, we will shrink the "lib" directory to the code
related to both subsystems only, while IB part will be moved to
drivers/infiniband/hw/mlx5, and EN will be moved to "en" directory.
Such separation will make this library (shared) code to be lean and minimal,
and help avoid future conflicts between IB and net submissions.
The proposed structure allows us to remove include/linux/mlx5,
which belongs solely to Mellanox's devices and don't need to
be exposed in common linux include directory.
The following change goes together with update of MAINTAINERS file to
more granular maintainership roles:
* drivers/net/ethernet/mellanox/mlx5/* - Saeed, Matan and Leon
* drivers/net/ethernet/mellanox/mlx5/en/* - Saeed
* drivers/net/ethernet/mellanox/mlx5/fs/* - Saeed, Matan and Leon
* drivers/net/ethernet/mellanox/mlx5/sriov/* - Saeed
* drivers/net/ethernet/mellanox/mlx5/lib/* - Saeed, Matan and Leon
* include/uapi/rdma/mlx5-abi.h - Matan and Leon
Signed-off-by: Leon Romanovsky <leonro-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
Signed-off-by: Saeed Mahameed <saeedm-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
---
MAINTAINERS | 11 ++++++-----
drivers/infiniband/hw/mlx5/Makefile | 1 +
drivers/infiniband/hw/mlx5/ib_virt.c | 2 +-
drivers/infiniband/hw/mlx5/mad.c | 4 ++--
drivers/infiniband/hw/mlx5/main.c | 6 +++---
drivers/infiniband/hw/mlx5/mlx5_ib.h | 10 +++++-----
drivers/infiniband/hw/mlx5/srq.c | 4 ++--
drivers/net/ethernet/mellanox/Kconfig | 2 +-
drivers/net/ethernet/mellanox/Makefile | 2 +-
.../net/ethernet/mellanox/mlx5/{core => }/Kconfig | 0
drivers/net/ethernet/mellanox/mlx5/Makefile | 21 +++++++++++++++++++++
drivers/net/ethernet/mellanox/mlx5/{core => }/cmd.c | 5 ++---
drivers/net/ethernet/mellanox/mlx5/core/Makefile | 13 -------------
.../net/ethernet/mellanox/mlx5/{core => }/debugfs.c | 8 ++++----
drivers/net/ethernet/mellanox/mlx5/{core => }/dev.c | 4 ++--
.../mellanox/mlx5/{core/en_arfs.c => en/arfs.c} | 4 ++--
.../mellanox/mlx5/{core/en_clock.c => en/clock.c} | 2 +-
.../mellanox/mlx5/{core/en_common.c => en/common.c} | 2 +-
.../mellanox/mlx5/{core/en_dcbnl.c => en/dcbnl.c} | 2 +-
.../net/ethernet/mellanox/mlx5/{core => en}/en.h | 18 +++++++++---------
.../mlx5/{core/en_ethtool.c => en/ethtool.c} | 2 +-
.../mellanox/mlx5/{core/en_fs.c => en/fs.c} | 4 ++--
.../mlx5/{core/en_fs_ethtool.c => en/fs_ethtool.c} | 4 ++--
.../mellanox/mlx5/{core/en_main.c => en/main.c} | 10 +++++-----
.../mellanox/mlx5/{core/en_rep.c => en/rep.c} | 8 ++++----
.../mellanox/mlx5/{core/en_rx.c => en/rx.c} | 6 +++---
.../mellanox/mlx5/{core/en_rx_am.c => en/rx_am.c} | 2 +-
.../mlx5/{core/en_selftest.c => en/selftest.c} | 2 +-
.../mellanox/mlx5/{core/en_stats.h => en/stats.h} | 0
.../mellanox/mlx5/{core/en_tc.c => en/tc.c} | 12 ++++++------
.../mellanox/mlx5/{core/en_tc.h => en/tc.h} | 0
.../mellanox/mlx5/{core/en_tx.c => en/tx.c} | 2 +-
.../mellanox/mlx5/{core/en_txrx.c => en/txrx.c} | 2 +-
.../net/ethernet/mellanox/mlx5/{core => en}/vxlan.c | 6 +++---
.../net/ethernet/mellanox/mlx5/{core => en}/vxlan.h | 4 ++--
.../net/ethernet/mellanox/mlx5/{core => en}/wq.c | 6 +++---
.../net/ethernet/mellanox/mlx5/{core => en}/wq.h | 2 +-
drivers/net/ethernet/mellanox/mlx5/{core => }/eq.c | 8 ++++----
.../mellanox/mlx5/{core/fs_cmd.c => fs/cmd.c} | 15 +++++++--------
.../mellanox/mlx5/{core/fs_cmd.h => fs/cmd.h} | 0
.../mellanox/mlx5/{core/fs_core.c => fs/core.c} | 9 ++++-----
.../mellanox/mlx5/{core/fs_core.h => fs/core.h} | 2 +-
.../mlx5/{core/fs_counters.c => fs/counters.c} | 10 +++++-----
.../net/ethernet/mellanox/mlx5/{core => }/health.c | 6 +++---
drivers/net/ethernet/mellanox/mlx5/{core => }/lag.c | 6 +++---
.../ethernet/mellanox/mlx5/{core => lib}/alloc.c | 5 ++---
.../net/ethernet/mellanox/mlx5/lib}/cmd.h | 0
.../net/ethernet/mellanox/mlx5/{core => lib}/cq.c | 8 ++++----
.../net/ethernet/mellanox/mlx5/lib}/cq.h | 2 +-
.../net/ethernet/mellanox/mlx5/lib}/device.h | 2 +-
.../net/ethernet/mellanox/mlx5/lib}/doorbell.h | 0
.../net/ethernet/mellanox/mlx5/lib}/driver.h | 6 +++---
.../net/ethernet/mellanox/mlx5/lib}/fs.h | 4 ++--
.../net/ethernet/mellanox/mlx5/{core => lib}/fw.c | 6 +++---
.../net/ethernet/mellanox/mlx5/{core => lib}/mad.c | 6 +++---
.../net/ethernet/mellanox/mlx5/{core => lib}/mcg.c | 6 +++---
.../net/ethernet/mellanox/mlx5/lib}/mlx5_ifc.h | 0
.../net/ethernet/mellanox/mlx5/{core => lib}/mr.c | 6 +++---
.../net/ethernet/mellanox/mlx5/{core => lib}/pd.c | 6 +++---
.../net/ethernet/mellanox/mlx5/{core => lib}/port.c | 8 ++++----
.../net/ethernet/mellanox/mlx5/lib}/port.h | 2 +-
.../net/ethernet/mellanox/mlx5/{core => lib}/qp.c | 11 +++++------
.../net/ethernet/mellanox/mlx5/lib}/qp.h | 4 ++--
.../net/ethernet/mellanox/mlx5/{core => lib}/rl.c | 6 +++---
.../net/ethernet/mellanox/mlx5/{core => lib}/srq.c | 10 +++++-----
.../net/ethernet/mellanox/mlx5/lib}/srq.h | 2 +-
.../ethernet/mellanox/mlx5/{core => lib}/transobj.c | 6 +++---
.../net/ethernet/mellanox/mlx5/lib}/transobj.h | 2 +-
.../net/ethernet/mellanox/mlx5/{core => lib}/uar.c | 6 +++---
.../ethernet/mellanox/mlx5/{core => lib}/vport.c | 6 +++---
.../net/ethernet/mellanox/mlx5/lib}/vport.h | 4 ++--
.../net/ethernet/mellanox/mlx5/{core => }/main.c | 16 ++++++++--------
.../mellanox/mlx5/{core/mlx5_core.h => mlx5.h} | 0
.../ethernet/mellanox/mlx5/{core => }/pagealloc.c | 6 +++---
.../mellanox/mlx5/{core => sriov}/eswitch.c | 12 ++++++------
.../mellanox/mlx5/{core => sriov}/eswitch.h | 2 +-
.../mlx5/{core => sriov}/eswitch_offloads.c | 12 ++++++------
.../ethernet/mellanox/mlx5/{core => sriov}/sriov.c | 6 +++---
78 files changed, 216 insertions(+), 211 deletions(-)
rename drivers/net/ethernet/mellanox/mlx5/{core => }/Kconfig (100%)
create mode 100644 drivers/net/ethernet/mellanox/mlx5/Makefile
rename drivers/net/ethernet/mellanox/mlx5/{core => }/cmd.c (99%)
delete mode 100644 drivers/net/ethernet/mellanox/mlx5/core/Makefile
rename drivers/net/ethernet/mellanox/mlx5/{core => }/debugfs.c (99%)
rename drivers/net/ethernet/mellanox/mlx5/{core => }/dev.c (99%)
rename drivers/net/ethernet/mellanox/mlx5/{core/en_arfs.c => en/arfs.c} (99%)
rename drivers/net/ethernet/mellanox/mlx5/{core/en_clock.c => en/clock.c} (99%)
rename drivers/net/ethernet/mellanox/mlx5/{core/en_common.c => en/common.c} (99%)
rename drivers/net/ethernet/mellanox/mlx5/{core/en_dcbnl.c => en/dcbnl.c} (99%)
rename drivers/net/ethernet/mellanox/mlx5/{core => en}/en.h (99%)
rename drivers/net/ethernet/mellanox/mlx5/{core/en_ethtool.c => en/ethtool.c} (99%)
rename drivers/net/ethernet/mellanox/mlx5/{core/en_fs.c => en/fs.c} (99%)
rename drivers/net/ethernet/mellanox/mlx5/{core/en_fs_ethtool.c => en/fs_ethtool.c} (99%)
rename drivers/net/ethernet/mellanox/mlx5/{core/en_main.c => en/main.c} (99%)
rename drivers/net/ethernet/mellanox/mlx5/{core/en_rep.c => en/rep.c} (99%)
rename drivers/net/ethernet/mellanox/mlx5/{core/en_rx.c => en/rx.c} (99%)
rename drivers/net/ethernet/mellanox/mlx5/{core/en_rx_am.c => en/rx_am.c} (99%)
rename drivers/net/ethernet/mellanox/mlx5/{core/en_selftest.c => en/selftest.c} (99%)
rename drivers/net/ethernet/mellanox/mlx5/{core/en_stats.h => en/stats.h} (100%)
rename drivers/net/ethernet/mellanox/mlx5/{core/en_tc.c => en/tc.c} (99%)
rename drivers/net/ethernet/mellanox/mlx5/{core/en_tc.h => en/tc.h} (100%)
rename drivers/net/ethernet/mellanox/mlx5/{core/en_tx.c => en/tx.c} (99%)
rename drivers/net/ethernet/mellanox/mlx5/{core/en_txrx.c => en/txrx.c} (99%)
rename drivers/net/ethernet/mellanox/mlx5/{core => en}/vxlan.c (98%)
rename drivers/net/ethernet/mellanox/mlx5/{core => en}/vxlan.h (97%)
rename drivers/net/ethernet/mellanox/mlx5/{core => en}/wq.c (98%)
rename drivers/net/ethernet/mellanox/mlx5/{core => en}/wq.h (99%)
rename drivers/net/ethernet/mellanox/mlx5/{core => }/eq.c (99%)
rename drivers/net/ethernet/mellanox/mlx5/{core/fs_cmd.c => fs/cmd.c} (98%)
rename drivers/net/ethernet/mellanox/mlx5/{core/fs_cmd.h => fs/cmd.h} (100%)
rename drivers/net/ethernet/mellanox/mlx5/{core/fs_core.c => fs/core.c} (99%)
rename drivers/net/ethernet/mellanox/mlx5/{core/fs_core.h => fs/core.h} (99%)
rename drivers/net/ethernet/mellanox/mlx5/{core/fs_counters.c => fs/counters.c} (98%)
rename drivers/net/ethernet/mellanox/mlx5/{core => }/health.c (99%)
rename drivers/net/ethernet/mellanox/mlx5/{core => }/lag.c (99%)
rename drivers/net/ethernet/mellanox/mlx5/{core => lib}/alloc.c (99%)
rename {include/linux/mlx5 => drivers/net/ethernet/mellanox/mlx5/lib}/cmd.h (100%)
rename drivers/net/ethernet/mellanox/mlx5/{core => lib}/cq.c (98%)
rename {include/linux/mlx5 => drivers/net/ethernet/mellanox/mlx5/lib}/cq.h (99%)
rename {include/linux/mlx5 => drivers/net/ethernet/mellanox/mlx5/lib}/device.h (99%)
rename {include/linux/mlx5 => drivers/net/ethernet/mellanox/mlx5/lib}/doorbell.h (100%)
rename {include/linux/mlx5 => drivers/net/ethernet/mellanox/mlx5/lib}/driver.h (99%)
rename {include/linux/mlx5 => drivers/net/ethernet/mellanox/mlx5/lib}/fs.h (98%)
rename drivers/net/ethernet/mellanox/mlx5/{core => lib}/fw.c (98%)
rename drivers/net/ethernet/mellanox/mlx5/{core => lib}/mad.c (96%)
rename drivers/net/ethernet/mellanox/mlx5/{core => lib}/mcg.c (96%)
rename {include/linux/mlx5 => drivers/net/ethernet/mellanox/mlx5/lib}/mlx5_ifc.h (100%)
rename drivers/net/ethernet/mellanox/mlx5/{core => lib}/mr.c (98%)
rename drivers/net/ethernet/mellanox/mlx5/{core => lib}/pd.c (96%)
rename drivers/net/ethernet/mellanox/mlx5/{core => lib}/port.c (99%)
rename {include/linux/mlx5 => drivers/net/ethernet/mellanox/mlx5/lib}/port.h (99%)
rename drivers/net/ethernet/mellanox/mlx5/{core => lib}/qp.c (98%)
rename {include/linux/mlx5 => drivers/net/ethernet/mellanox/mlx5/lib}/qp.h (99%)
rename drivers/net/ethernet/mellanox/mlx5/{core => lib}/rl.c (98%)
rename drivers/net/ethernet/mellanox/mlx5/{core => lib}/srq.c (99%)
rename {include/linux/mlx5 => drivers/net/ethernet/mellanox/mlx5/lib}/srq.h (98%)
rename drivers/net/ethernet/mellanox/mlx5/{core => lib}/transobj.c (99%)
rename {include/linux/mlx5 => drivers/net/ethernet/mellanox/mlx5/lib}/transobj.h (99%)
rename drivers/net/ethernet/mellanox/mlx5/{core => lib}/uar.c (99%)
rename drivers/net/ethernet/mellanox/mlx5/{core => lib}/vport.c (99%)
rename {include/linux/mlx5 => drivers/net/ethernet/mellanox/mlx5/lib}/vport.h (98%)
rename drivers/net/ethernet/mellanox/mlx5/{core => }/main.c (99%)
rename drivers/net/ethernet/mellanox/mlx5/{core/mlx5_core.h => mlx5.h} (100%)
rename drivers/net/ethernet/mellanox/mlx5/{core => }/pagealloc.c (99%)
rename drivers/net/ethernet/mellanox/mlx5/{core => sriov}/eswitch.c (99%)
rename drivers/net/ethernet/mellanox/mlx5/{core => sriov}/eswitch.h (99%)
rename drivers/net/ethernet/mellanox/mlx5/{core => sriov}/eswitch_offloads.c (99%)
rename drivers/net/ethernet/mellanox/mlx5/{core => sriov}/sriov.c (98%)
diff --git a/MAINTAINERS b/MAINTAINERS
index 11904a95672a..5c1f390e3046 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -8045,7 +8045,8 @@ L: netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
S: Supported
W: http://www.mellanox.com
Q: http://patchwork.ozlabs.org/project/netdev/list/
-F: drivers/net/ethernet/mellanox/mlx5/core/en_*
+F: drivers/net/ethernet/mellanox/mlx5/en/
+F: drivers/net/ethernet/mellanox/mlx5/sriov/
MELLANOX ETHERNET SWITCH DRIVERS
M: Jiri Pirko <jiri-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
@@ -8256,9 +8257,9 @@ L: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
W: http://www.mellanox.com
Q: http://patchwork.ozlabs.org/project/netdev/list/
S: Supported
-F: drivers/net/ethernet/mellanox/mlx5/core/
-F: include/linux/mlx5/
-F: include/uapi/rdma/mlx5-abi.h
+F: drivers/net/ethernet/mellanox/mlx5/*
+F: drivers/net/ethernet/mellanox/mlx5/lib/
+F: drivers/net/ethernet/mellanox/mlx5/fs/
MELLANOX MLX5 IB driver
M: Matan Barak <matanb-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
@@ -8268,7 +8269,7 @@ W: http://www.mellanox.com
Q: http://patchwork.kernel.org/project/linux-rdma/list/
S: Supported
F: drivers/infiniband/hw/mlx5/
-F: include/linux/mlx5/
+F: include/uapi/rdma/mlx5-abi.h
MELEXIS MLX90614 DRIVER
M: Crt Mori <cmo-fc6wVz46lShBDgjK7y7TUQ@public.gmane.org>
diff --git a/drivers/infiniband/hw/mlx5/Makefile b/drivers/infiniband/hw/mlx5/Makefile
index 7493a83acd28..6d8e7e0b0d4a 100644
--- a/drivers/infiniband/hw/mlx5/Makefile
+++ b/drivers/infiniband/hw/mlx5/Makefile
@@ -1,3 +1,4 @@
+ccflags-y := -I$(srctree)/drivers/net/ethernet/mellanox/mlx5/
obj-$(CONFIG_MLX5_INFINIBAND) += mlx5_ib.o
mlx5_ib-y := main.o cq.o doorbell.o qp.o mem.o srq.o mr.o ah.o mad.o gsi.o ib_virt.o
diff --git a/drivers/infiniband/hw/mlx5/ib_virt.c b/drivers/infiniband/hw/mlx5/ib_virt.c
index c1b9de800fe5..c1a749bddc88 100644
--- a/drivers/infiniband/hw/mlx5/ib_virt.c
+++ b/drivers/infiniband/hw/mlx5/ib_virt.c
@@ -31,7 +31,7 @@
*/
#include <linux/module.h>
-#include <linux/mlx5/vport.h>
+#include "lib/vport.h"
#include "mlx5_ib.h"
static inline u32 mlx_to_net_policy(enum port_state_policy mlx_policy)
diff --git a/drivers/infiniband/hw/mlx5/mad.c b/drivers/infiniband/hw/mlx5/mad.c
index 39e58489dcc2..72b081a44c97 100644
--- a/drivers/infiniband/hw/mlx5/mad.c
+++ b/drivers/infiniband/hw/mlx5/mad.c
@@ -30,8 +30,8 @@
* SOFTWARE.
*/
-#include <linux/mlx5/cmd.h>
-#include <linux/mlx5/vport.h>
+#include "lib/cmd.h"
+#include "lib/vport.h"
#include <rdma/ib_mad.h>
#include <rdma/ib_smi.h>
#include <rdma/ib_pma.h>
diff --git a/drivers/infiniband/hw/mlx5/main.c b/drivers/infiniband/hw/mlx5/main.c
index a191b9327b0c..086746262a2c 100644
--- a/drivers/infiniband/hw/mlx5/main.c
+++ b/drivers/infiniband/hw/mlx5/main.c
@@ -45,14 +45,14 @@
#include <rdma/ib_user_verbs.h>
#include <rdma/ib_addr.h>
#include <rdma/ib_cache.h>
-#include <linux/mlx5/port.h>
-#include <linux/mlx5/vport.h>
+#include "lib/port.h"
+#include "lib/vport.h"
#include <linux/list.h>
#include <rdma/ib_smi.h>
#include <rdma/ib_umem.h>
#include <linux/in.h>
#include <linux/etherdevice.h>
-#include <linux/mlx5/fs.h>
+#include "lib/fs.h"
#include "mlx5_ib.h"
#define DRIVER_NAME "mlx5_ib"
diff --git a/drivers/infiniband/hw/mlx5/mlx5_ib.h b/drivers/infiniband/hw/mlx5/mlx5_ib.h
index e1a4b93dce6b..fe5c8dabab81 100644
--- a/drivers/infiniband/hw/mlx5/mlx5_ib.h
+++ b/drivers/infiniband/hw/mlx5/mlx5_ib.h
@@ -37,12 +37,12 @@
#include <linux/sched.h>
#include <rdma/ib_verbs.h>
#include <rdma/ib_smi.h>
-#include <linux/mlx5/driver.h>
-#include <linux/mlx5/cq.h>
-#include <linux/mlx5/qp.h>
-#include <linux/mlx5/srq.h>
+#include "lib/driver.h"
+#include "lib/cq.h"
+#include "lib/qp.h"
+#include "lib/srq.h"
#include <linux/types.h>
-#include <linux/mlx5/transobj.h>
+#include "lib/transobj.h"
#include <rdma/ib_user_verbs.h>
#include <rdma/mlx5-abi.h>
diff --git a/drivers/infiniband/hw/mlx5/srq.c b/drivers/infiniband/hw/mlx5/srq.c
index 6f4397ee1ed6..949b8d80d28b 100644
--- a/drivers/infiniband/hw/mlx5/srq.c
+++ b/drivers/infiniband/hw/mlx5/srq.c
@@ -31,8 +31,8 @@
*/
#include <linux/module.h>
-#include <linux/mlx5/qp.h>
-#include <linux/mlx5/srq.h>
+#include "lib/qp.h"
+#include "lib/srq.h"
#include <linux/slab.h>
#include <rdma/ib_umem.h>
#include <rdma/ib_user_verbs.h>
diff --git a/drivers/net/ethernet/mellanox/Kconfig b/drivers/net/ethernet/mellanox/Kconfig
index d54701047401..214b3787f419 100644
--- a/drivers/net/ethernet/mellanox/Kconfig
+++ b/drivers/net/ethernet/mellanox/Kconfig
@@ -17,7 +17,7 @@ config NET_VENDOR_MELLANOX
if NET_VENDOR_MELLANOX
source "drivers/net/ethernet/mellanox/mlx4/Kconfig"
-source "drivers/net/ethernet/mellanox/mlx5/core/Kconfig"
+source "drivers/net/ethernet/mellanox/mlx5/Kconfig"
source "drivers/net/ethernet/mellanox/mlxsw/Kconfig"
endif # NET_VENDOR_MELLANOX
diff --git a/drivers/net/ethernet/mellanox/Makefile b/drivers/net/ethernet/mellanox/Makefile
index 2e2a5ec509ac..a65d5929f19d 100644
--- a/drivers/net/ethernet/mellanox/Makefile
+++ b/drivers/net/ethernet/mellanox/Makefile
@@ -3,5 +3,5 @@
#
obj-$(CONFIG_MLX4_CORE) += mlx4/
-obj-$(CONFIG_MLX5_CORE) += mlx5/core/
+obj-$(CONFIG_MLX5_CORE) += mlx5/
obj-$(CONFIG_MLXSW_CORE) += mlxsw/
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/Kconfig b/drivers/net/ethernet/mellanox/mlx5/Kconfig
similarity index 100%
rename from drivers/net/ethernet/mellanox/mlx5/core/Kconfig
rename to drivers/net/ethernet/mellanox/mlx5/Kconfig
diff --git a/drivers/net/ethernet/mellanox/mlx5/Makefile b/drivers/net/ethernet/mellanox/mlx5/Makefile
new file mode 100644
index 000000000000..9634f090d810
--- /dev/null
+++ b/drivers/net/ethernet/mellanox/mlx5/Makefile
@@ -0,0 +1,21 @@
+subdir-ccflags-y := -I$(srctree)/drivers/net/ethernet/mellanox/mlx5/
+obj-$(CONFIG_MLX5_CORE) += mlx5_core.o
+
+mlx5_core-y := main.o pagealloc.o health.o \
+ cmd.o debugfs.o eq.o lag.o dev.o
+
+mlx5_core-y += lib/fw.o lib/uar.o lib/mcg.o lib/cq.o \
+ lib/srq.o lib/alloc.o lib/qp.o lib/port.o lib/mr.o \
+ lib/pd.o lib/mad.o lib/transobj.o lib/vport.o lib/rl.o
+
+mlx5_core-y += sriov/sriov.o
+mlx5_core-y += fs/cmd.o fs/core.o fs/counters.o
+
+mlx5_core-$(CONFIG_MLX5_CORE_EN) += en/wq.o en/main.o en/common.o \
+ en/fs.o en/ethtool.o en/tx.o en/rx.o en/rx_am.o \
+ en/txrx.o en/clock.o en/vxlan.o en/tc.o en/arfs.o \
+ en/rep.o en/fs_ethtool.o en/selftest.o
+
+mlx5_core-$(CONFIG_MLX5_CORE_EN) += sriov/eswitch.o sriov/eswitch_offloads.o
+
+mlx5_core-$(CONFIG_MLX5_CORE_EN_DCB) += en/dcbnl.o
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/cmd.c b/drivers/net/ethernet/mellanox/mlx5/cmd.c
similarity index 99%
rename from drivers/net/ethernet/mellanox/mlx5/core/cmd.c
rename to drivers/net/ethernet/mellanox/mlx5/cmd.c
index 3797cc7c1288..1922e98dc10d 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/cmd.c
+++ b/drivers/net/ethernet/mellanox/mlx5/cmd.c
@@ -39,10 +39,9 @@
#include <linux/delay.h>
#include <linux/random.h>
#include <linux/io-mapping.h>
-#include <linux/mlx5/driver.h>
+#include "lib/driver.h"
#include <linux/debugfs.h>
-
-#include "mlx5_core.h"
+#include "mlx5.h"
enum {
CMD_IF_REV = 5,
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/Makefile b/drivers/net/ethernet/mellanox/mlx5/core/Makefile
deleted file mode 100644
index 9f43beb86250..000000000000
--- a/drivers/net/ethernet/mellanox/mlx5/core/Makefile
+++ /dev/null
@@ -1,13 +0,0 @@
-obj-$(CONFIG_MLX5_CORE) += mlx5_core.o
-
-mlx5_core-y := main.o cmd.o debugfs.o fw.o eq.o uar.o pagealloc.o \
- health.o mcg.o cq.o srq.o alloc.o qp.o port.o mr.o pd.o \
- mad.o transobj.o vport.o sriov.o fs_cmd.o fs_core.o \
- fs_counters.o rl.o lag.o dev.o
-
-mlx5_core-$(CONFIG_MLX5_CORE_EN) += wq.o eswitch.o eswitch_offloads.o \
- en_main.o en_common.o en_fs.o en_ethtool.o en_tx.o \
- en_rx.o en_rx_am.o en_txrx.o en_clock.o vxlan.o \
- en_tc.o en_arfs.o en_rep.o en_fs_ethtool.o en_selftest.o
-
-mlx5_core-$(CONFIG_MLX5_CORE_EN_DCB) += en_dcbnl.o
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/debugfs.c b/drivers/net/ethernet/mellanox/mlx5/debugfs.c
similarity index 99%
rename from drivers/net/ethernet/mellanox/mlx5/core/debugfs.c
rename to drivers/net/ethernet/mellanox/mlx5/debugfs.c
index e94a9532e218..0dfa686c1da0 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/debugfs.c
+++ b/drivers/net/ethernet/mellanox/mlx5/debugfs.c
@@ -32,10 +32,10 @@
#include <linux/module.h>
#include <linux/debugfs.h>
-#include <linux/mlx5/qp.h>
-#include <linux/mlx5/cq.h>
-#include <linux/mlx5/driver.h>
-#include "mlx5_core.h"
+#include "lib/qp.h"
+#include "lib/cq.h"
+#include "lib/driver.h"
+#include "mlx5.h"
enum {
QP_PID,
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/dev.c b/drivers/net/ethernet/mellanox/mlx5/dev.c
similarity index 99%
rename from drivers/net/ethernet/mellanox/mlx5/core/dev.c
rename to drivers/net/ethernet/mellanox/mlx5/dev.c
index a62f4b6a21a5..3d43b1eb8cdf 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/dev.c
+++ b/drivers/net/ethernet/mellanox/mlx5/dev.c
@@ -30,8 +30,8 @@
* SOFTWARE.
*/
-#include <linux/mlx5/driver.h>
-#include "mlx5_core.h"
+#include "lib/driver.h"
+#include "mlx5.h"
static LIST_HEAD(intf_list);
static LIST_HEAD(mlx5_dev_list);
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_arfs.c b/drivers/net/ethernet/mellanox/mlx5/en/arfs.c
similarity index 99%
rename from drivers/net/ethernet/mellanox/mlx5/core/en_arfs.c
rename to drivers/net/ethernet/mellanox/mlx5/en/arfs.c
index 68419a01db36..6d3bcb863c9c 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_arfs.c
+++ b/drivers/net/ethernet/mellanox/mlx5/en/arfs.c
@@ -33,10 +33,10 @@
#ifdef CONFIG_RFS_ACCEL
#include <linux/hash.h>
-#include <linux/mlx5/fs.h>
+#include "lib/fs.h"
#include <linux/ip.h>
#include <linux/ipv6.h>
-#include "en.h"
+#include "en/en.h"
struct arfs_tuple {
__be16 etype;
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_clock.c b/drivers/net/ethernet/mellanox/mlx5/en/clock.c
similarity index 99%
rename from drivers/net/ethernet/mellanox/mlx5/core/en_clock.c
rename to drivers/net/ethernet/mellanox/mlx5/en/clock.c
index 746a92c13644..a72faff5b1d1 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_clock.c
+++ b/drivers/net/ethernet/mellanox/mlx5/en/clock.c
@@ -31,7 +31,7 @@
*/
#include <linux/clocksource.h>
-#include "en.h"
+#include "en/en.h"
enum {
MLX5E_CYCLES_SHIFT = 23
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_common.c b/drivers/net/ethernet/mellanox/mlx5/en/common.c
similarity index 99%
rename from drivers/net/ethernet/mellanox/mlx5/core/en_common.c
rename to drivers/net/ethernet/mellanox/mlx5/en/common.c
index bd898d8deda0..bf4f824d66dc 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_common.c
+++ b/drivers/net/ethernet/mellanox/mlx5/en/common.c
@@ -30,7 +30,7 @@
* SOFTWARE.
*/
-#include "en.h"
+#include "en/en.h"
/* mlx5e global resources should be placed in this file.
* Global resources are common to all the netdevices crated on the same nic.
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_dcbnl.c b/drivers/net/ethernet/mellanox/mlx5/en/dcbnl.c
similarity index 99%
rename from drivers/net/ethernet/mellanox/mlx5/core/en_dcbnl.c
rename to drivers/net/ethernet/mellanox/mlx5/en/dcbnl.c
index 7f6c225666c1..4a5a89e45962 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_dcbnl.c
+++ b/drivers/net/ethernet/mellanox/mlx5/en/dcbnl.c
@@ -31,7 +31,7 @@
*/
#include <linux/device.h>
#include <linux/netdevice.h>
-#include "en.h"
+#include "en/en.h"
#define MLX5E_MAX_PRIORITY 8
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en.h b/drivers/net/ethernet/mellanox/mlx5/en/en.h
similarity index 99%
rename from drivers/net/ethernet/mellanox/mlx5/core/en.h
rename to drivers/net/ethernet/mellanox/mlx5/en/en.h
index a473cea10c16..5f5f209801a8 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en.h
+++ b/drivers/net/ethernet/mellanox/mlx5/en/en.h
@@ -37,17 +37,17 @@
#include <linux/timecounter.h>
#include <linux/net_tstamp.h>
#include <linux/ptp_clock_kernel.h>
-#include <linux/mlx5/driver.h>
-#include <linux/mlx5/qp.h>
-#include <linux/mlx5/cq.h>
-#include <linux/mlx5/port.h>
-#include <linux/mlx5/vport.h>
-#include <linux/mlx5/transobj.h>
+#include "lib/driver.h"
+#include "lib/qp.h"
+#include "lib/cq.h"
+#include "lib/port.h"
+#include "lib/vport.h"
+#include "lib/transobj.h"
#include <linux/rhashtable.h>
#include <net/switchdev.h>
-#include "wq.h"
-#include "mlx5_core.h"
-#include "en_stats.h"
+#include "en/wq.h"
+#include "mlx5.h"
+#include "en/stats.h"
#define MLX5_SET_CFG(p, f, v) MLX5_SET(create_flow_group_in, p, f, v)
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c b/drivers/net/ethernet/mellanox/mlx5/en/ethtool.c
similarity index 99%
rename from drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c
rename to drivers/net/ethernet/mellanox/mlx5/en/ethtool.c
index 352462af8d51..0cae50d7c774 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c
+++ b/drivers/net/ethernet/mellanox/mlx5/en/ethtool.c
@@ -30,7 +30,7 @@
* SOFTWARE.
*/
-#include "en.h"
+#include "en/en.h"
static void mlx5e_get_drvinfo(struct net_device *dev,
struct ethtool_drvinfo *drvinfo)
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_fs.c b/drivers/net/ethernet/mellanox/mlx5/en/fs.c
similarity index 99%
rename from drivers/net/ethernet/mellanox/mlx5/core/en_fs.c
rename to drivers/net/ethernet/mellanox/mlx5/en/fs.c
index 1fe80de5d68f..cd7499c8e717 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_fs.c
+++ b/drivers/net/ethernet/mellanox/mlx5/en/fs.c
@@ -34,8 +34,8 @@
#include <linux/ip.h>
#include <linux/ipv6.h>
#include <linux/tcp.h>
-#include <linux/mlx5/fs.h>
-#include "en.h"
+#include "lib/fs.h"
+#include "en/en.h"
static int mlx5e_add_l2_flow_rule(struct mlx5e_priv *priv,
struct mlx5e_l2_rule *ai, int type);
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_fs_ethtool.c b/drivers/net/ethernet/mellanox/mlx5/en/fs_ethtool.c
similarity index 99%
rename from drivers/net/ethernet/mellanox/mlx5/core/en_fs_ethtool.c
rename to drivers/net/ethernet/mellanox/mlx5/en/fs_ethtool.c
index 3691451c728c..4459f1c04013 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_fs_ethtool.c
+++ b/drivers/net/ethernet/mellanox/mlx5/en/fs_ethtool.c
@@ -30,8 +30,8 @@
* SOFTWARE.
*/
-#include <linux/mlx5/fs.h>
-#include "en.h"
+#include "lib/fs.h"
+#include "en/en.h"
struct mlx5e_ethtool_rule {
struct list_head list;
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c b/drivers/net/ethernet/mellanox/mlx5/en/main.c
similarity index 99%
rename from drivers/net/ethernet/mellanox/mlx5/core/en_main.c
rename to drivers/net/ethernet/mellanox/mlx5/en/main.c
index c32754b1598e..b537df74a01c 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
+++ b/drivers/net/ethernet/mellanox/mlx5/en/main.c
@@ -32,13 +32,13 @@
#include <net/tc_act/tc_gact.h>
#include <net/pkt_cls.h>
-#include <linux/mlx5/fs.h>
+#include "lib/fs.h"
#include <net/vxlan.h>
#include <linux/bpf.h>
-#include "en.h"
-#include "en_tc.h"
-#include "eswitch.h"
-#include "vxlan.h"
+#include "en/en.h"
+#include "en/tc.h"
+#include "sriov/eswitch.h"
+#include "en/vxlan.h"
struct mlx5e_rq_param {
u32 rqc[MLX5_ST_SZ_DW(rqc)];
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c b/drivers/net/ethernet/mellanox/mlx5/en/rep.c
similarity index 99%
rename from drivers/net/ethernet/mellanox/mlx5/core/en_rep.c
rename to drivers/net/ethernet/mellanox/mlx5/en/rep.c
index 850378893b25..72926bd37e1a 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c
+++ b/drivers/net/ethernet/mellanox/mlx5/en/rep.c
@@ -31,13 +31,13 @@
*/
#include <generated/utsrelease.h>
-#include <linux/mlx5/fs.h>
+#include "lib/fs.h"
#include <net/switchdev.h>
#include <net/pkt_cls.h>
-#include "eswitch.h"
-#include "en.h"
-#include "en_tc.h"
+#include "sriov/eswitch.h"
+#include "en/en.h"
+#include "en/tc.h"
static const char mlx5e_rep_driver_name[] = "mlx5e_rep";
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_rx.c b/drivers/net/ethernet/mellanox/mlx5/en/rx.c
similarity index 99%
rename from drivers/net/ethernet/mellanox/mlx5/core/en_rx.c
rename to drivers/net/ethernet/mellanox/mlx5/en/rx.c
index 0e2fb3ed1790..edfbdb91bab8 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_rx.c
+++ b/drivers/net/ethernet/mellanox/mlx5/en/rx.c
@@ -34,9 +34,9 @@
#include <linux/ipv6.h>
#include <linux/tcp.h>
#include <net/busy_poll.h>
-#include "en.h"
-#include "en_tc.h"
-#include "eswitch.h"
+#include "en/en.h"
+#include "en/tc.h"
+#include "sriov/eswitch.h"
static inline bool mlx5e_rx_hw_stamp(struct mlx5e_tstamp *tstamp)
{
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_rx_am.c b/drivers/net/ethernet/mellanox/mlx5/en/rx_am.c
similarity index 99%
rename from drivers/net/ethernet/mellanox/mlx5/core/en_rx_am.c
rename to drivers/net/ethernet/mellanox/mlx5/en/rx_am.c
index 1fffe48a93cc..caaf7b2da363 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_rx_am.c
+++ b/drivers/net/ethernet/mellanox/mlx5/en/rx_am.c
@@ -30,7 +30,7 @@
* SOFTWARE.
*/
-#include "en.h"
+#include "en/en.h"
/* Adaptive moderation profiles */
#define MLX5E_AM_DEFAULT_RX_CQ_MODERATION_PKTS_FROM_EQE 256
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_selftest.c b/drivers/net/ethernet/mellanox/mlx5/en/selftest.c
similarity index 99%
rename from drivers/net/ethernet/mellanox/mlx5/core/en_selftest.c
rename to drivers/net/ethernet/mellanox/mlx5/en/selftest.c
index 65442c36a6e1..b37568290aeb 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_selftest.c
+++ b/drivers/net/ethernet/mellanox/mlx5/en/selftest.c
@@ -33,7 +33,7 @@
#include <linux/ip.h>
#include <linux/udp.h>
#include <net/udp.h>
-#include "en.h"
+#include "en/en.h"
enum {
MLX5E_ST_LINK_STATE,
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_stats.h b/drivers/net/ethernet/mellanox/mlx5/en/stats.h
similarity index 100%
rename from drivers/net/ethernet/mellanox/mlx5/core/en_stats.h
rename to drivers/net/ethernet/mellanox/mlx5/en/stats.h
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c b/drivers/net/ethernet/mellanox/mlx5/en/tc.c
similarity index 99%
rename from drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
rename to drivers/net/ethernet/mellanox/mlx5/en/tc.c
index f8829b517156..2506736c941d 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
+++ b/drivers/net/ethernet/mellanox/mlx5/en/tc.c
@@ -35,18 +35,18 @@
#include <net/pkt_cls.h>
#include <net/tc_act/tc_gact.h>
#include <net/tc_act/tc_skbedit.h>
-#include <linux/mlx5/fs.h>
-#include <linux/mlx5/device.h>
+#include "lib/fs.h"
+#include "lib/device.h"
#include <linux/rhashtable.h>
#include <net/switchdev.h>
#include <net/tc_act/tc_mirred.h>
#include <net/tc_act/tc_vlan.h>
#include <net/tc_act/tc_tunnel_key.h>
#include <net/vxlan.h>
-#include "en.h"
-#include "en_tc.h"
-#include "eswitch.h"
-#include "vxlan.h"
+#include "en/en.h"
+#include "en/tc.h"
+#include "sriov/eswitch.h"
+#include "en/vxlan.h"
struct mlx5e_tc_flow {
struct rhash_head node;
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_tc.h b/drivers/net/ethernet/mellanox/mlx5/en/tc.h
similarity index 100%
rename from drivers/net/ethernet/mellanox/mlx5/core/en_tc.h
rename to drivers/net/ethernet/mellanox/mlx5/en/tc.h
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_tx.c b/drivers/net/ethernet/mellanox/mlx5/en/tx.c
similarity index 99%
rename from drivers/net/ethernet/mellanox/mlx5/core/en_tx.c
rename to drivers/net/ethernet/mellanox/mlx5/en/tx.c
index cfb68371c397..1aa99cde89e9 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_tx.c
+++ b/drivers/net/ethernet/mellanox/mlx5/en/tx.c
@@ -32,7 +32,7 @@
#include <linux/tcp.h>
#include <linux/if_vlan.h>
-#include "en.h"
+#include "en/en.h"
#define MLX5E_SQ_NOPS_ROOM MLX5_SEND_WQE_MAX_WQEBBS
#define MLX5E_SQ_STOP_ROOM (MLX5_SEND_WQE_MAX_WQEBBS +\
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_txrx.c b/drivers/net/ethernet/mellanox/mlx5/en/txrx.c
similarity index 99%
rename from drivers/net/ethernet/mellanox/mlx5/core/en_txrx.c
rename to drivers/net/ethernet/mellanox/mlx5/en/txrx.c
index e5c12a732aa1..8bd46494663f 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_txrx.c
+++ b/drivers/net/ethernet/mellanox/mlx5/en/txrx.c
@@ -30,7 +30,7 @@
* SOFTWARE.
*/
-#include "en.h"
+#include "en/en.h"
struct mlx5_cqe64 *mlx5e_get_cqe(struct mlx5e_cq *cq)
{
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/vxlan.c b/drivers/net/ethernet/mellanox/mlx5/en/vxlan.c
similarity index 98%
rename from drivers/net/ethernet/mellanox/mlx5/core/vxlan.c
rename to drivers/net/ethernet/mellanox/mlx5/en/vxlan.c
index 07a9ba6cfc70..575105a7d76a 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/vxlan.c
+++ b/drivers/net/ethernet/mellanox/mlx5/en/vxlan.c
@@ -32,9 +32,9 @@
#include <linux/kernel.h>
#include <linux/module.h>
-#include <linux/mlx5/driver.h>
-#include "mlx5_core.h"
-#include "vxlan.h"
+#include "lib/driver.h"
+#include "mlx5.h"
+#include "en/vxlan.h"
void mlx5e_vxlan_init(struct mlx5e_priv *priv)
{
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/vxlan.h b/drivers/net/ethernet/mellanox/mlx5/en/vxlan.h
similarity index 97%
rename from drivers/net/ethernet/mellanox/mlx5/core/vxlan.h
rename to drivers/net/ethernet/mellanox/mlx5/en/vxlan.h
index 5def12c048e3..579827fba0f4 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/vxlan.h
+++ b/drivers/net/ethernet/mellanox/mlx5/en/vxlan.h
@@ -32,8 +32,8 @@
#ifndef __MLX5_VXLAN_H__
#define __MLX5_VXLAN_H__
-#include <linux/mlx5/driver.h>
-#include "en.h"
+#include "lib/driver.h"
+#include "en/en.h"
struct mlx5e_vxlan {
u16 udp_port;
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/wq.c b/drivers/net/ethernet/mellanox/mlx5/en/wq.c
similarity index 98%
rename from drivers/net/ethernet/mellanox/mlx5/core/wq.c
rename to drivers/net/ethernet/mellanox/mlx5/en/wq.c
index 921673c42bc9..4efc67b118da 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/wq.c
+++ b/drivers/net/ethernet/mellanox/mlx5/en/wq.c
@@ -30,9 +30,9 @@
* SOFTWARE.
*/
-#include <linux/mlx5/driver.h>
-#include "wq.h"
-#include "mlx5_core.h"
+#include "lib/driver.h"
+#include "en/wq.h"
+#include "mlx5.h"
u32 mlx5_wq_cyc_get_size(struct mlx5_wq_cyc *wq)
{
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/wq.h b/drivers/net/ethernet/mellanox/mlx5/en/wq.h
similarity index 99%
rename from drivers/net/ethernet/mellanox/mlx5/core/wq.h
rename to drivers/net/ethernet/mellanox/mlx5/en/wq.h
index d8afed898c31..7e0e468b0c8f 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/wq.h
+++ b/drivers/net/ethernet/mellanox/mlx5/en/wq.h
@@ -33,7 +33,7 @@
#ifndef __MLX5_WQ_H__
#define __MLX5_WQ_H__
-#include <linux/mlx5/mlx5_ifc.h>
+#include "lib/mlx5_ifc.h"
struct mlx5_wq_param {
int linear;
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/eq.c b/drivers/net/ethernet/mellanox/mlx5/eq.c
similarity index 99%
rename from drivers/net/ethernet/mellanox/mlx5/core/eq.c
rename to drivers/net/ethernet/mellanox/mlx5/eq.c
index 5130d65dd41a..2b5cf44d0f4c 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/eq.c
+++ b/drivers/net/ethernet/mellanox/mlx5/eq.c
@@ -32,11 +32,11 @@
#include <linux/interrupt.h>
#include <linux/module.h>
-#include <linux/mlx5/driver.h>
-#include <linux/mlx5/cmd.h>
-#include "mlx5_core.h"
+#include "lib/driver.h"
+#include "lib/cmd.h"
+#include "mlx5.h"
#ifdef CONFIG_MLX5_CORE_EN
-#include "eswitch.h"
+#include <sriov/eswitch.h>
#endif
enum {
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.c b/drivers/net/ethernet/mellanox/mlx5/fs/cmd.c
similarity index 98%
rename from drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.c
rename to drivers/net/ethernet/mellanox/mlx5/fs/cmd.c
index c4478ecd8056..ce1ff6f0c524 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.c
+++ b/drivers/net/ethernet/mellanox/mlx5/fs/cmd.c
@@ -30,14 +30,13 @@
* SOFTWARE.
*/
-#include <linux/mlx5/driver.h>
-#include <linux/mlx5/device.h>
-#include <linux/mlx5/mlx5_ifc.h>
-
-#include "fs_core.h"
-#include "fs_cmd.h"
-#include "mlx5_core.h"
-#include "eswitch.h"
+#include "lib/driver.h"
+#include "lib/device.h"
+#include "lib/mlx5_ifc.h"
+#include "fs/core.h"
+#include "fs/cmd.h"
+#include "mlx5.h"
+#include "sriov/eswitch.h"
int mlx5_cmd_update_root_ft(struct mlx5_core_dev *dev,
struct mlx5_flow_table *ft)
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.h b/drivers/net/ethernet/mellanox/mlx5/fs/cmd.h
similarity index 100%
rename from drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.h
rename to drivers/net/ethernet/mellanox/mlx5/fs/cmd.h
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/fs_core.c b/drivers/net/ethernet/mellanox/mlx5/fs/core.c
similarity index 99%
rename from drivers/net/ethernet/mellanox/mlx5/core/fs_core.c
rename to drivers/net/ethernet/mellanox/mlx5/fs/core.c
index a263d8904a4c..6a8283f4123b 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/fs_core.c
+++ b/drivers/net/ethernet/mellanox/mlx5/fs/core.c
@@ -31,11 +31,10 @@
*/
#include <linux/mutex.h>
-#include <linux/mlx5/driver.h>
-
-#include "mlx5_core.h"
-#include "fs_core.h"
-#include "fs_cmd.h"
+#include "lib/driver.h"
+#include "mlx5.h"
+#include "fs/core.h"
+#include "fs/cmd.h"
#define INIT_TREE_NODE_ARRAY_SIZE(...) (sizeof((struct init_tree_node[]){__VA_ARGS__}) /\
sizeof(struct init_tree_node))
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/fs_core.h b/drivers/net/ethernet/mellanox/mlx5/fs/core.h
similarity index 99%
rename from drivers/net/ethernet/mellanox/mlx5/core/fs_core.h
rename to drivers/net/ethernet/mellanox/mlx5/fs/core.h
index 8e668c63f69e..3c605bd992e6 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/fs_core.h
+++ b/drivers/net/ethernet/mellanox/mlx5/fs/core.h
@@ -33,7 +33,7 @@
#ifndef _MLX5_FS_CORE_
#define _MLX5_FS_CORE_
-#include <linux/mlx5/fs.h>
+#include "lib/fs.h"
enum fs_node_type {
FS_TYPE_NAMESPACE,
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/fs_counters.c b/drivers/net/ethernet/mellanox/mlx5/fs/counters.c
similarity index 98%
rename from drivers/net/ethernet/mellanox/mlx5/core/fs_counters.c
rename to drivers/net/ethernet/mellanox/mlx5/fs/counters.c
index 7431f633de31..19f4c97715b1 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/fs_counters.c
+++ b/drivers/net/ethernet/mellanox/mlx5/fs/counters.c
@@ -30,12 +30,12 @@
* SOFTWARE.
*/
-#include <linux/mlx5/driver.h>
-#include <linux/mlx5/fs.h>
+#include "lib/driver.h"
+#include "lib/fs.h"
#include <linux/rbtree.h>
-#include "mlx5_core.h"
-#include "fs_core.h"
-#include "fs_cmd.h"
+#include "mlx5.h"
+#include "fs/core.h"
+#include "fs/cmd.h"
#define MLX5_FC_STATS_PERIOD msecs_to_jiffies(1000)
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/health.c b/drivers/net/ethernet/mellanox/mlx5/health.c
similarity index 99%
rename from drivers/net/ethernet/mellanox/mlx5/core/health.c
rename to drivers/net/ethernet/mellanox/mlx5/health.c
index 5bcf93422ee0..7af5593a6201 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/health.c
+++ b/drivers/net/ethernet/mellanox/mlx5/health.c
@@ -35,9 +35,9 @@
#include <linux/random.h>
#include <linux/vmalloc.h>
#include <linux/hardirq.h>
-#include <linux/mlx5/driver.h>
-#include <linux/mlx5/cmd.h>
-#include "mlx5_core.h"
+#include "lib/driver.h"
+#include "lib/cmd.h"
+#include "mlx5.h"
enum {
MLX5_HEALTH_POLL_INTERVAL = 2 * HZ,
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/lag.c b/drivers/net/ethernet/mellanox/mlx5/lag.c
similarity index 99%
rename from drivers/net/ethernet/mellanox/mlx5/core/lag.c
rename to drivers/net/ethernet/mellanox/mlx5/lag.c
index 55957246c0e8..c0338a528c4a 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/lag.c
+++ b/drivers/net/ethernet/mellanox/mlx5/lag.c
@@ -31,9 +31,9 @@
*/
#include <linux/netdevice.h>
-#include <linux/mlx5/driver.h>
-#include <linux/mlx5/vport.h>
-#include "mlx5_core.h"
+#include "lib/driver.h"
+#include "lib/vport.h"
+#include "mlx5.h"
enum {
MLX5_LAG_FLAG_BONDED = 1 << 0,
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/alloc.c b/drivers/net/ethernet/mellanox/mlx5/lib/alloc.c
similarity index 99%
rename from drivers/net/ethernet/mellanox/mlx5/core/alloc.c
rename to drivers/net/ethernet/mellanox/mlx5/lib/alloc.c
index 66bd213f35ce..2f3bbff03c59 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/alloc.c
+++ b/drivers/net/ethernet/mellanox/mlx5/lib/alloc.c
@@ -37,9 +37,8 @@
#include <linux/bitmap.h>
#include <linux/dma-mapping.h>
#include <linux/vmalloc.h>
-#include <linux/mlx5/driver.h>
-
-#include "mlx5_core.h"
+#include "lib/driver.h"
+#include "mlx5.h"
struct mlx5_db_pgdir {
struct list_head list;
diff --git a/include/linux/mlx5/cmd.h b/drivers/net/ethernet/mellanox/mlx5/lib/cmd.h
similarity index 100%
rename from include/linux/mlx5/cmd.h
rename to drivers/net/ethernet/mellanox/mlx5/lib/cmd.h
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/cq.c b/drivers/net/ethernet/mellanox/mlx5/lib/cq.c
similarity index 98%
rename from drivers/net/ethernet/mellanox/mlx5/core/cq.c
rename to drivers/net/ethernet/mellanox/mlx5/lib/cq.c
index 336d4738b807..1c2e8124073f 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/cq.c
+++ b/drivers/net/ethernet/mellanox/mlx5/lib/cq.c
@@ -33,11 +33,11 @@
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/hardirq.h>
-#include <linux/mlx5/driver.h>
-#include <linux/mlx5/cmd.h>
+#include "lib/driver.h"
+#include "lib/cmd.h"
#include <rdma/ib_verbs.h>
-#include <linux/mlx5/cq.h>
-#include "mlx5_core.h"
+#include "lib/cq.h"
+#include "mlx5.h"
#define TASKLET_MAX_TIME 2
#define TASKLET_MAX_TIME_JIFFIES msecs_to_jiffies(TASKLET_MAX_TIME)
diff --git a/include/linux/mlx5/cq.h b/drivers/net/ethernet/mellanox/mlx5/lib/cq.h
similarity index 99%
rename from include/linux/mlx5/cq.h
rename to drivers/net/ethernet/mellanox/mlx5/lib/cq.h
index 95898847c7d4..380875ac6753 100644
--- a/include/linux/mlx5/cq.h
+++ b/drivers/net/ethernet/mellanox/mlx5/lib/cq.h
@@ -34,7 +34,7 @@
#define MLX5_CORE_CQ_H
#include <rdma/ib_verbs.h>
-#include <linux/mlx5/driver.h>
+#include "driver.h"
struct mlx5_core_cq {
diff --git a/include/linux/mlx5/device.h b/drivers/net/ethernet/mellanox/mlx5/lib/device.h
similarity index 99%
rename from include/linux/mlx5/device.h
rename to drivers/net/ethernet/mellanox/mlx5/lib/device.h
index dd345e8cf6f0..dcbc05483838 100644
--- a/include/linux/mlx5/device.h
+++ b/drivers/net/ethernet/mellanox/mlx5/lib/device.h
@@ -35,7 +35,7 @@
#include <linux/types.h>
#include <rdma/ib_verbs.h>
-#include <linux/mlx5/mlx5_ifc.h>
+#include "mlx5_ifc.h"
#if defined(__LITTLE_ENDIAN)
#define MLX5_SET_HOST_ENDIANNESS 0
diff --git a/include/linux/mlx5/doorbell.h b/drivers/net/ethernet/mellanox/mlx5/lib/doorbell.h
similarity index 100%
rename from include/linux/mlx5/doorbell.h
rename to drivers/net/ethernet/mellanox/mlx5/lib/doorbell.h
diff --git a/include/linux/mlx5/driver.h b/drivers/net/ethernet/mellanox/mlx5/lib/driver.h
similarity index 99%
rename from include/linux/mlx5/driver.h
rename to drivers/net/ethernet/mellanox/mlx5/lib/driver.h
index 10e632588cd5..632bd3e720a9 100644
--- a/include/linux/mlx5/driver.h
+++ b/drivers/net/ethernet/mellanox/mlx5/lib/driver.h
@@ -45,9 +45,9 @@
#include <linux/mempool.h>
#include <linux/interrupt.h>
-#include <linux/mlx5/device.h>
-#include <linux/mlx5/doorbell.h>
-#include <linux/mlx5/srq.h>
+#include "lib/device.h"
+#include "lib/doorbell.h"
+#include "lib/srq.h"
enum {
MLX5_BOARD_ID_LEN = 64,
diff --git a/include/linux/mlx5/fs.h b/drivers/net/ethernet/mellanox/mlx5/lib/fs.h
similarity index 98%
rename from include/linux/mlx5/fs.h
rename to drivers/net/ethernet/mellanox/mlx5/lib/fs.h
index 949b24b6c479..df43b1455961 100644
--- a/include/linux/mlx5/fs.h
+++ b/drivers/net/ethernet/mellanox/mlx5/lib/fs.h
@@ -33,8 +33,8 @@
#ifndef _MLX5_FS_
#define _MLX5_FS_
-#include <linux/mlx5/driver.h>
-#include <linux/mlx5/mlx5_ifc.h>
+#include "lib/driver.h"
+#include "lib/mlx5_ifc.h"
#define MLX5_FS_DEFAULT_FLOW_TAG 0x0
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/fw.c b/drivers/net/ethernet/mellanox/mlx5/lib/fw.c
similarity index 98%
rename from drivers/net/ethernet/mellanox/mlx5/core/fw.c
rename to drivers/net/ethernet/mellanox/mlx5/lib/fw.c
index 5718aada6605..7371ae07735c 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/fw.c
+++ b/drivers/net/ethernet/mellanox/mlx5/lib/fw.c
@@ -30,10 +30,10 @@
* SOFTWARE.
*/
-#include <linux/mlx5/driver.h>
-#include <linux/mlx5/cmd.h>
+#include "lib/driver.h"
+#include "lib/cmd.h"
#include <linux/module.h>
-#include "mlx5_core.h"
+#include "mlx5.h"
static int mlx5_cmd_query_adapter(struct mlx5_core_dev *dev, u32 *out,
int outlen)
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/mad.c b/drivers/net/ethernet/mellanox/mlx5/lib/mad.c
similarity index 96%
rename from drivers/net/ethernet/mellanox/mlx5/core/mad.c
rename to drivers/net/ethernet/mellanox/mlx5/lib/mad.c
index 3a3b0005fd2b..6c8572624d2e 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/mad.c
+++ b/drivers/net/ethernet/mellanox/mlx5/lib/mad.c
@@ -32,9 +32,9 @@
#include <linux/kernel.h>
#include <linux/module.h>
-#include <linux/mlx5/driver.h>
-#include <linux/mlx5/cmd.h>
-#include "mlx5_core.h"
+#include "lib/driver.h"
+#include "lib/cmd.h"
+#include "mlx5.h"
int mlx5_core_mad_ifc(struct mlx5_core_dev *dev, const void *inb, void *outb,
u16 opmod, u8 port)
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/mcg.c b/drivers/net/ethernet/mellanox/mlx5/lib/mcg.c
similarity index 96%
rename from drivers/net/ethernet/mellanox/mlx5/core/mcg.c
rename to drivers/net/ethernet/mellanox/mlx5/lib/mcg.c
index ba2b09cc192f..e231aa4f5286 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/mcg.c
+++ b/drivers/net/ethernet/mellanox/mlx5/lib/mcg.c
@@ -32,10 +32,10 @@
#include <linux/kernel.h>
#include <linux/module.h>
-#include <linux/mlx5/driver.h>
-#include <linux/mlx5/cmd.h>
+#include "lib/driver.h"
+#include "lib/cmd.h"
#include <rdma/ib_verbs.h>
-#include "mlx5_core.h"
+#include "mlx5.h"
int mlx5_core_attach_mcg(struct mlx5_core_dev *dev, union ib_gid *mgid, u32 qpn)
{
diff --git a/include/linux/mlx5/mlx5_ifc.h b/drivers/net/ethernet/mellanox/mlx5/lib/mlx5_ifc.h
similarity index 100%
rename from include/linux/mlx5/mlx5_ifc.h
rename to drivers/net/ethernet/mellanox/mlx5/lib/mlx5_ifc.h
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/mr.c b/drivers/net/ethernet/mellanox/mlx5/lib/mr.c
similarity index 98%
rename from drivers/net/ethernet/mellanox/mlx5/core/mr.c
rename to drivers/net/ethernet/mellanox/mlx5/lib/mr.c
index b9736f505bdf..f5eb1205c612 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/mr.c
+++ b/drivers/net/ethernet/mellanox/mlx5/lib/mr.c
@@ -32,9 +32,9 @@
#include <linux/kernel.h>
#include <linux/module.h>
-#include <linux/mlx5/driver.h>
-#include <linux/mlx5/cmd.h>
-#include "mlx5_core.h"
+#include "lib/driver.h"
+#include "lib/cmd.h"
+#include "mlx5.h"
void mlx5_init_mkey_table(struct mlx5_core_dev *dev)
{
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/pd.c b/drivers/net/ethernet/mellanox/mlx5/lib/pd.c
similarity index 96%
rename from drivers/net/ethernet/mellanox/mlx5/core/pd.c
rename to drivers/net/ethernet/mellanox/mlx5/lib/pd.c
index bd830d8d6c5f..1a55fc346fda 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/pd.c
+++ b/drivers/net/ethernet/mellanox/mlx5/lib/pd.c
@@ -32,9 +32,9 @@
#include <linux/kernel.h>
#include <linux/module.h>
-#include <linux/mlx5/driver.h>
-#include <linux/mlx5/cmd.h>
-#include "mlx5_core.h"
+#include "lib/driver.h"
+#include "lib/cmd.h"
+#include "mlx5.h"
int mlx5_core_alloc_pd(struct mlx5_core_dev *dev, u32 *pdn)
{
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/port.c b/drivers/net/ethernet/mellanox/mlx5/lib/port.c
similarity index 99%
rename from drivers/net/ethernet/mellanox/mlx5/core/port.c
rename to drivers/net/ethernet/mellanox/mlx5/lib/port.c
index d2ec9d232a70..d6bb70d36149 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/port.c
+++ b/drivers/net/ethernet/mellanox/mlx5/lib/port.c
@@ -31,10 +31,10 @@
*/
#include <linux/module.h>
-#include <linux/mlx5/driver.h>
-#include <linux/mlx5/port.h>
-#include <linux/mlx5/cmd.h>
-#include "mlx5_core.h"
+#include "lib/driver.h"
+#include "lib/port.h"
+#include "lib/cmd.h"
+#include "mlx5.h"
int mlx5_core_access_reg(struct mlx5_core_dev *dev, void *data_in,
int size_in, void *data_out, int size_out,
diff --git a/include/linux/mlx5/port.h b/drivers/net/ethernet/mellanox/mlx5/lib/port.h
similarity index 99%
rename from include/linux/mlx5/port.h
rename to drivers/net/ethernet/mellanox/mlx5/lib/port.h
index e527732fb31b..f9fff1710d05 100644
--- a/include/linux/mlx5/port.h
+++ b/drivers/net/ethernet/mellanox/mlx5/lib/port.h
@@ -33,7 +33,7 @@
#ifndef __MLX5_PORT_H__
#define __MLX5_PORT_H__
-#include <linux/mlx5/driver.h>
+#include "driver.h"
enum mlx5_beacon_duration {
MLX5_BEACON_DURATION_OFF = 0x0,
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/qp.c b/drivers/net/ethernet/mellanox/mlx5/lib/qp.c
similarity index 98%
rename from drivers/net/ethernet/mellanox/mlx5/core/qp.c
rename to drivers/net/ethernet/mellanox/mlx5/lib/qp.c
index cbbcef2884be..9dcc3b47d1a9 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/qp.c
+++ b/drivers/net/ethernet/mellanox/mlx5/lib/qp.c
@@ -33,12 +33,11 @@
#include <linux/gfp.h>
#include <linux/export.h>
-#include <linux/mlx5/cmd.h>
-#include <linux/mlx5/qp.h>
-#include <linux/mlx5/driver.h>
-#include <linux/mlx5/transobj.h>
-
-#include "mlx5_core.h"
+#include "lib/cmd.h"
+#include "lib/qp.h"
+#include "lib/driver.h"
+#include "lib/transobj.h"
+#include "mlx5.h"
static struct mlx5_core_rsc_common *mlx5_get_rsc(struct mlx5_core_dev *dev,
u32 rsn)
diff --git a/include/linux/mlx5/qp.h b/drivers/net/ethernet/mellanox/mlx5/lib/qp.h
similarity index 99%
rename from include/linux/mlx5/qp.h
rename to drivers/net/ethernet/mellanox/mlx5/lib/qp.h
index 219c699c17b7..a161d697e3b2 100644
--- a/include/linux/mlx5/qp.h
+++ b/drivers/net/ethernet/mellanox/mlx5/lib/qp.h
@@ -33,8 +33,8 @@
#ifndef MLX5_QP_H
#define MLX5_QP_H
-#include <linux/mlx5/device.h>
-#include <linux/mlx5/driver.h>
+#include "lib/device.h"
+#include "lib/driver.h"
#define MLX5_INVALID_LKEY 0x100
#define MLX5_SIG_WQE_SIZE (MLX5_SEND_WQE_BB * 5)
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/rl.c b/drivers/net/ethernet/mellanox/mlx5/lib/rl.c
similarity index 98%
rename from drivers/net/ethernet/mellanox/mlx5/core/rl.c
rename to drivers/net/ethernet/mellanox/mlx5/lib/rl.c
index e651e4c02867..796c7e626d0c 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/rl.c
+++ b/drivers/net/ethernet/mellanox/mlx5/lib/rl.c
@@ -32,9 +32,9 @@
#include <linux/kernel.h>
#include <linux/module.h>
-#include <linux/mlx5/driver.h>
-#include <linux/mlx5/cmd.h>
-#include "mlx5_core.h"
+#include "lib/driver.h"
+#include "lib/cmd.h"
+#include "mlx5.h"
/* Scheduling element fw management */
int mlx5_create_scheduling_element_cmd(struct mlx5_core_dev *dev, u8 hierarchy,
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/srq.c b/drivers/net/ethernet/mellanox/mlx5/lib/srq.c
similarity index 99%
rename from drivers/net/ethernet/mellanox/mlx5/core/srq.c
rename to drivers/net/ethernet/mellanox/mlx5/lib/srq.c
index 3099630015d7..5be9bc5320aa 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/srq.c
+++ b/drivers/net/ethernet/mellanox/mlx5/lib/srq.c
@@ -32,12 +32,12 @@
#include <linux/kernel.h>
#include <linux/module.h>
-#include <linux/mlx5/driver.h>
-#include <linux/mlx5/cmd.h>
-#include <linux/mlx5/srq.h>
+#include "lib/driver.h"
+#include "lib/cmd.h"
+#include "lib/srq.h"
#include <rdma/ib_verbs.h>
-#include "mlx5_core.h"
-#include <linux/mlx5/transobj.h>
+#include "mlx5.h"
+#include "lib/transobj.h"
void mlx5_srq_event(struct mlx5_core_dev *dev, u32 srqn, int event_type)
{
diff --git a/include/linux/mlx5/srq.h b/drivers/net/ethernet/mellanox/mlx5/lib/srq.h
similarity index 98%
rename from include/linux/mlx5/srq.h
rename to drivers/net/ethernet/mellanox/mlx5/lib/srq.h
index 1cde0fd53f90..8bbc5170d5fa 100644
--- a/include/linux/mlx5/srq.h
+++ b/drivers/net/ethernet/mellanox/mlx5/lib/srq.h
@@ -33,7 +33,7 @@
#ifndef MLX5_SRQ_H
#define MLX5_SRQ_H
-#include <linux/mlx5/driver.h>
+#include "lib/driver.h"
enum {
MLX5_SRQ_FLAG_ERR = (1 << 0),
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/transobj.c b/drivers/net/ethernet/mellanox/mlx5/lib/transobj.c
similarity index 99%
rename from drivers/net/ethernet/mellanox/mlx5/core/transobj.c
rename to drivers/net/ethernet/mellanox/mlx5/lib/transobj.c
index a00ff49eec18..e7ebe20d4217 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/transobj.c
+++ b/drivers/net/ethernet/mellanox/mlx5/lib/transobj.c
@@ -30,9 +30,9 @@
* SOFTWARE.
*/
-#include <linux/mlx5/driver.h>
-#include "mlx5_core.h"
-#include <linux/mlx5/transobj.h>
+#include "lib/driver.h"
+#include "mlx5.h"
+#include "lib/transobj.h"
int mlx5_core_alloc_transport_domain(struct mlx5_core_dev *dev, u32 *tdn)
{
diff --git a/include/linux/mlx5/transobj.h b/drivers/net/ethernet/mellanox/mlx5/lib/transobj.h
similarity index 99%
rename from include/linux/mlx5/transobj.h
rename to drivers/net/ethernet/mellanox/mlx5/lib/transobj.h
index 88441f5ece25..3cf24bce8a5c 100644
--- a/include/linux/mlx5/transobj.h
+++ b/drivers/net/ethernet/mellanox/mlx5/lib/transobj.h
@@ -33,7 +33,7 @@
#ifndef __TRANSOBJ_H__
#define __TRANSOBJ_H__
-#include <linux/mlx5/driver.h>
+#include "lib/driver.h"
int mlx5_core_alloc_transport_domain(struct mlx5_core_dev *dev, u32 *tdn);
void mlx5_core_dealloc_transport_domain(struct mlx5_core_dev *dev, u32 tdn);
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/uar.c b/drivers/net/ethernet/mellanox/mlx5/lib/uar.c
similarity index 99%
rename from drivers/net/ethernet/mellanox/mlx5/core/uar.c
rename to drivers/net/ethernet/mellanox/mlx5/lib/uar.c
index 2e6b0f290ddc..1e4a8396450b 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/uar.c
+++ b/drivers/net/ethernet/mellanox/mlx5/lib/uar.c
@@ -33,9 +33,9 @@
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/io-mapping.h>
-#include <linux/mlx5/driver.h>
-#include <linux/mlx5/cmd.h>
-#include "mlx5_core.h"
+#include "lib/driver.h"
+#include "lib/cmd.h"
+#include "mlx5.h"
int mlx5_cmd_alloc_uar(struct mlx5_core_dev *dev, u32 *uarn)
{
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/vport.c b/drivers/net/ethernet/mellanox/mlx5/lib/vport.c
similarity index 99%
rename from drivers/net/ethernet/mellanox/mlx5/core/vport.c
rename to drivers/net/ethernet/mellanox/mlx5/lib/vport.c
index 269e4401c342..beb3f8d9991a 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/vport.c
+++ b/drivers/net/ethernet/mellanox/mlx5/lib/vport.c
@@ -32,9 +32,9 @@
#include <linux/export.h>
#include <linux/etherdevice.h>
-#include <linux/mlx5/driver.h>
-#include <linux/mlx5/vport.h>
-#include "mlx5_core.h"
+#include "lib/driver.h"
+#include "lib/vport.h"
+#include "mlx5.h"
static int _mlx5_query_vport_state(struct mlx5_core_dev *mdev, u8 opmod,
u16 vport, u32 *out, int outlen)
diff --git a/include/linux/mlx5/vport.h b/drivers/net/ethernet/mellanox/mlx5/lib/vport.h
similarity index 98%
rename from include/linux/mlx5/vport.h
rename to drivers/net/ethernet/mellanox/mlx5/lib/vport.h
index ec35157ea725..c99cd27489d8 100644
--- a/include/linux/mlx5/vport.h
+++ b/drivers/net/ethernet/mellanox/mlx5/lib/vport.h
@@ -33,8 +33,8 @@
#ifndef __MLX5_VPORT_H__
#define __MLX5_VPORT_H__
-#include <linux/mlx5/driver.h>
-#include <linux/mlx5/device.h>
+#include "lib/driver.h"
+#include "lib/device.h"
enum {
MLX5_CAP_INLINE_MODE_L2,
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/main.c b/drivers/net/ethernet/mellanox/mlx5/main.c
similarity index 99%
rename from drivers/net/ethernet/mellanox/mlx5/core/main.c
rename to drivers/net/ethernet/mellanox/mlx5/main.c
index a16ee1603272..dd7e3904f094 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/main.c
+++ b/drivers/net/ethernet/mellanox/mlx5/main.c
@@ -40,21 +40,21 @@
#include <linux/io-mapping.h>
#include <linux/interrupt.h>
#include <linux/delay.h>
-#include <linux/mlx5/driver.h>
-#include <linux/mlx5/cq.h>
-#include <linux/mlx5/qp.h>
-#include <linux/mlx5/srq.h>
+#include "lib/driver.h"
+#include "lib/cq.h"
+#include "lib/qp.h"
+#include "lib/srq.h"
#include <linux/debugfs.h>
#include <linux/kmod.h>
-#include <linux/mlx5/mlx5_ifc.h>
+#include "lib/mlx5_ifc.h"
#ifdef CONFIG_RFS_ACCEL
#include <linux/cpu_rmap.h>
#endif
#include <net/devlink.h>
-#include "mlx5_core.h"
-#include "fs_core.h"
+#include "mlx5.h"
+#include "fs/core.h"
#ifdef CONFIG_MLX5_CORE_EN
-#include "eswitch.h"
+#include "sriov/eswitch.h"
#endif
MODULE_AUTHOR("Eli Cohen <eli-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>");
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/mlx5_core.h b/drivers/net/ethernet/mellanox/mlx5/mlx5.h
similarity index 100%
rename from drivers/net/ethernet/mellanox/mlx5/core/mlx5_core.h
rename to drivers/net/ethernet/mellanox/mlx5/mlx5.h
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/pagealloc.c b/drivers/net/ethernet/mellanox/mlx5/pagealloc.c
similarity index 99%
rename from drivers/net/ethernet/mellanox/mlx5/core/pagealloc.c
rename to drivers/net/ethernet/mellanox/mlx5/pagealloc.c
index a57d5a81eb05..914616fb4767 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/pagealloc.c
+++ b/drivers/net/ethernet/mellanox/mlx5/pagealloc.c
@@ -34,9 +34,9 @@
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/delay.h>
-#include <linux/mlx5/driver.h>
-#include <linux/mlx5/cmd.h>
-#include "mlx5_core.h"
+#include "lib/driver.h"
+#include "lib/cmd.h"
+#include "mlx5.h"
enum {
MLX5_PAGES_CANT_GIVE = 0,
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/eswitch.c b/drivers/net/ethernet/mellanox/mlx5/sriov/eswitch.c
similarity index 99%
rename from drivers/net/ethernet/mellanox/mlx5/core/eswitch.c
rename to drivers/net/ethernet/mellanox/mlx5/sriov/eswitch.c
index d6807c3cc461..378fd344bf63 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/eswitch.c
+++ b/drivers/net/ethernet/mellanox/mlx5/sriov/eswitch.c
@@ -31,12 +31,12 @@
*/
#include <linux/etherdevice.h>
-#include <linux/mlx5/driver.h>
-#include <linux/mlx5/mlx5_ifc.h>
-#include <linux/mlx5/vport.h>
-#include <linux/mlx5/fs.h>
-#include "mlx5_core.h"
-#include "eswitch.h"
+#include "lib/driver.h"
+#include "lib/mlx5_ifc.h"
+#include "lib/vport.h"
+#include "lib/fs.h"
+#include "mlx5.h"
+#include "sriov/eswitch.h"
#define UPLINK_VPORT 0xFFFF
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/eswitch.h b/drivers/net/ethernet/mellanox/mlx5/sriov/eswitch.h
similarity index 99%
rename from drivers/net/ethernet/mellanox/mlx5/core/eswitch.h
rename to drivers/net/ethernet/mellanox/mlx5/sriov/eswitch.h
index 8661dd3f542c..9840fd1392ea 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/eswitch.h
+++ b/drivers/net/ethernet/mellanox/mlx5/sriov/eswitch.h
@@ -36,7 +36,7 @@
#include <linux/if_ether.h>
#include <linux/if_link.h>
#include <net/devlink.h>
-#include <linux/mlx5/device.h>
+#include "lib/device.h"
#define MLX5_MAX_UC_PER_VPORT(dev) \
(1 << MLX5_CAP_GEN(dev, log_max_current_uc_list))
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c b/drivers/net/ethernet/mellanox/mlx5/sriov/eswitch_offloads.c
similarity index 99%
rename from drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c
rename to drivers/net/ethernet/mellanox/mlx5/sriov/eswitch_offloads.c
index 466e161010f7..d09b2f8efc9a 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c
+++ b/drivers/net/ethernet/mellanox/mlx5/sriov/eswitch_offloads.c
@@ -31,12 +31,12 @@
*/
#include <linux/etherdevice.h>
-#include <linux/mlx5/driver.h>
-#include <linux/mlx5/mlx5_ifc.h>
-#include <linux/mlx5/vport.h>
-#include <linux/mlx5/fs.h>
-#include "mlx5_core.h"
-#include "eswitch.h"
+#include "lib/driver.h"
+#include "lib/mlx5_ifc.h"
+#include "lib/vport.h"
+#include "lib/fs.h"
+#include "mlx5.h"
+#include "sriov/eswitch.h"
enum {
FDB_FAST_PATH = 0,
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/sriov.c b/drivers/net/ethernet/mellanox/mlx5/sriov/sriov.c
similarity index 98%
rename from drivers/net/ethernet/mellanox/mlx5/core/sriov.c
rename to drivers/net/ethernet/mellanox/mlx5/sriov/sriov.c
index e08627785590..1d8c09712c5b 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/sriov.c
+++ b/drivers/net/ethernet/mellanox/mlx5/sriov/sriov.c
@@ -31,10 +31,10 @@
*/
#include <linux/pci.h>
-#include <linux/mlx5/driver.h>
-#include "mlx5_core.h"
+#include "lib/driver.h"
+#include "mlx5.h"
#ifdef CONFIG_MLX5_CORE_EN
-#include "eswitch.h"
+#include "sriov/eswitch.h"
#endif
bool mlx5_sriov_is_enabled(struct mlx5_core_dev *dev)
--
2.11.0
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related
* [pull request][for-next V2 0/1] Mellanox mlx5 Reorganize core driver directory layout
From: Saeed Mahameed @ 2017-01-12 19:29 UTC (permalink / raw)
To: David S. Miller, Doug Ledford
Cc: netdev, linux-rdma, Leon Romanovsky, Saeed Mahameed
Hi Dave and Doug,
This pull request includes one patch from Leon, this patch as described
below will change the driver directory structure and layout for better,
logical and modular driver files separation.
This change is important to both rdma and net maintainers in order to
have smoother management of driver patches for different mlx5 sub modules
and smoother rdma-next vs. net-next features submissions.
Please find more info below -in the tag commit message-,
review and let us know if there's any problem.
This change doesn't introduce any conflicts with the current mlx5
fixes and cleanups posted on 2017-01-10 to net branch, and merge tests
worked flawlessly with no issues.
This is the last pull request meant for both rdma-next and net-next.
Once pulled, this will be the base shared code for both trees.
Thanks,
Saeed and Leon.
v1->v2:
- post the patch with format-patch --find-copies-harder
The following changes since commit f502d834950a28e02651bb7e2cc7111ddd352644:
net/mlx5: Activate support for 4K UARs (2017-01-09 20:25:10 +0200)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/mellanox/linux.git tags/mlx5-dir-layout-reorg
for you to fetch changes up to 8a9a0375cee4888f7d70e651f3e76347c731c51f:
{net, IB}/mlx5: Reorganize driver file layout (2017-01-11 13:40:43 +0200)
----------------------------------------------------------------
{net, IB}/mlx5: Reorganize driver file layout
This patch organizes mlx5 driver file layout to better reflect mlx5
modularity and allow future separation between EN, IB and shared code
parts.
The new structure:
* drivers/net/ethernet/mellanox/mlx5/* - core HW/PCI driver logic
* drivers/net/ethernet/mellanox/mlx5/en/* - ethernet
* drivers/net/ethernet/mellanox/mlx5/fs/* - flow steering
* drivers/net/ethernet/mellanox/mlx5/sriov/* - SR-IOV and E-Switch
* drivers/net/ethernet/mellanox/mlx5/lib/* - common mlx5 commands and API library
In future submissions, we will shrink the "lib" directory to the code
related to both subsystems only, while IB part will be moved to
drivers/infiniband/hw/mlx5, and EN will be moved to "en" directory.
Such separation will make this library (shared) code to be lean and minimal,
and help avoid future conflicts between IB and net submissions.
The proposed structure allows us to remove include/linux/mlx5,
which belongs solely to Mellanox's devices and don't need to
be exposed in common linux include directory.
The following change goes together with update of MAINTAINERS file to
more granular maintainership roles:
* drivers/net/ethernet/mellanox/mlx5/* - Saeed, Matan and Leon
* drivers/net/ethernet/mellanox/mlx5/en/* - Saeed
* drivers/net/ethernet/mellanox/mlx5/fs/* - Saeed, Matan and Leon
* drivers/net/ethernet/mellanox/mlx5/sriov/* - Saeed
* drivers/net/ethernet/mellanox/mlx5/lib/* - Saeed, Matan and Leon
* include/uapi/rdma/mlx5-abi.h - Matan and Leon
Thanks,
Leon Romanovsky.
----------------------------------------------------------------
Leon Romanovsky (1):
{net, IB}/mlx5: Reorganize driver file layout
MAINTAINERS | 11 ++++++-----
drivers/infiniband/hw/mlx5/Makefile | 1 +
drivers/infiniband/hw/mlx5/ib_virt.c | 2 +-
drivers/infiniband/hw/mlx5/mad.c | 4 ++--
drivers/infiniband/hw/mlx5/main.c | 6 +++---
drivers/infiniband/hw/mlx5/mlx5_ib.h | 10 +++++-----
drivers/infiniband/hw/mlx5/srq.c | 4 ++--
drivers/net/ethernet/mellanox/Kconfig | 2 +-
drivers/net/ethernet/mellanox/Makefile | 2 +-
.../net/ethernet/mellanox/mlx5/{core => }/Kconfig | 0
drivers/net/ethernet/mellanox/mlx5/Makefile | 21 +++++++++++++++++++++
drivers/net/ethernet/mellanox/mlx5/{core => }/cmd.c | 5 ++---
drivers/net/ethernet/mellanox/mlx5/core/Makefile | 13 -------------
.../net/ethernet/mellanox/mlx5/{core => }/debugfs.c | 8 ++++----
drivers/net/ethernet/mellanox/mlx5/{core => }/dev.c | 4 ++--
.../mellanox/mlx5/{core/en_arfs.c => en/arfs.c} | 4 ++--
.../mellanox/mlx5/{core/en_clock.c => en/clock.c} | 2 +-
.../mellanox/mlx5/{core/en_common.c => en/common.c} | 2 +-
.../mellanox/mlx5/{core/en_dcbnl.c => en/dcbnl.c} | 2 +-
.../net/ethernet/mellanox/mlx5/{core => en}/en.h | 18 +++++++++---------
.../mlx5/{core/en_ethtool.c => en/ethtool.c} | 2 +-
.../mellanox/mlx5/{core/en_fs.c => en/fs.c} | 4 ++--
.../mlx5/{core/en_fs_ethtool.c => en/fs_ethtool.c} | 4 ++--
.../mellanox/mlx5/{core/en_main.c => en/main.c} | 10 +++++-----
.../mellanox/mlx5/{core/en_rep.c => en/rep.c} | 8 ++++----
.../mellanox/mlx5/{core/en_rx.c => en/rx.c} | 6 +++---
.../mellanox/mlx5/{core/en_rx_am.c => en/rx_am.c} | 2 +-
.../mlx5/{core/en_selftest.c => en/selftest.c} | 2 +-
.../mellanox/mlx5/{core/en_stats.h => en/stats.h} | 0
.../mellanox/mlx5/{core/en_tc.c => en/tc.c} | 12 ++++++------
.../mellanox/mlx5/{core/en_tc.h => en/tc.h} | 0
.../mellanox/mlx5/{core/en_tx.c => en/tx.c} | 2 +-
.../mellanox/mlx5/{core/en_txrx.c => en/txrx.c} | 2 +-
.../net/ethernet/mellanox/mlx5/{core => en}/vxlan.c | 6 +++---
.../net/ethernet/mellanox/mlx5/{core => en}/vxlan.h | 4 ++--
.../net/ethernet/mellanox/mlx5/{core => en}/wq.c | 6 +++---
.../net/ethernet/mellanox/mlx5/{core => en}/wq.h | 2 +-
drivers/net/ethernet/mellanox/mlx5/{core => }/eq.c | 8 ++++----
.../mellanox/mlx5/{core/fs_cmd.c => fs/cmd.c} | 15 +++++++--------
.../mellanox/mlx5/{core/fs_cmd.h => fs/cmd.h} | 0
.../mellanox/mlx5/{core/fs_core.c => fs/core.c} | 9 ++++-----
.../mellanox/mlx5/{core/fs_core.h => fs/core.h} | 2 +-
.../mlx5/{core/fs_counters.c => fs/counters.c} | 10 +++++-----
.../net/ethernet/mellanox/mlx5/{core => }/health.c | 6 +++---
drivers/net/ethernet/mellanox/mlx5/{core => }/lag.c | 6 +++---
.../ethernet/mellanox/mlx5/{core => lib}/alloc.c | 5 ++---
.../net/ethernet/mellanox/mlx5/lib}/cmd.h | 0
.../net/ethernet/mellanox/mlx5/{core => lib}/cq.c | 8 ++++----
.../net/ethernet/mellanox/mlx5/lib}/cq.h | 2 +-
.../net/ethernet/mellanox/mlx5/lib}/device.h | 2 +-
.../net/ethernet/mellanox/mlx5/lib}/doorbell.h | 0
.../net/ethernet/mellanox/mlx5/lib}/driver.h | 6 +++---
.../net/ethernet/mellanox/mlx5/lib}/fs.h | 4 ++--
.../net/ethernet/mellanox/mlx5/{core => lib}/fw.c | 6 +++---
.../net/ethernet/mellanox/mlx5/{core => lib}/mad.c | 6 +++---
.../net/ethernet/mellanox/mlx5/{core => lib}/mcg.c | 6 +++---
.../net/ethernet/mellanox/mlx5/lib}/mlx5_ifc.h | 0
.../net/ethernet/mellanox/mlx5/{core => lib}/mr.c | 6 +++---
.../net/ethernet/mellanox/mlx5/{core => lib}/pd.c | 6 +++---
.../net/ethernet/mellanox/mlx5/{core => lib}/port.c | 8 ++++----
.../net/ethernet/mellanox/mlx5/lib}/port.h | 2 +-
.../net/ethernet/mellanox/mlx5/{core => lib}/qp.c | 11 +++++------
.../net/ethernet/mellanox/mlx5/lib}/qp.h | 4 ++--
.../net/ethernet/mellanox/mlx5/{core => lib}/rl.c | 6 +++---
.../net/ethernet/mellanox/mlx5/{core => lib}/srq.c | 10 +++++-----
.../net/ethernet/mellanox/mlx5/lib}/srq.h | 2 +-
.../ethernet/mellanox/mlx5/{core => lib}/transobj.c | 6 +++---
.../net/ethernet/mellanox/mlx5/lib}/transobj.h | 2 +-
.../net/ethernet/mellanox/mlx5/{core => lib}/uar.c | 6 +++---
.../ethernet/mellanox/mlx5/{core => lib}/vport.c | 6 +++---
.../net/ethernet/mellanox/mlx5/lib}/vport.h | 4 ++--
.../net/ethernet/mellanox/mlx5/{core => }/main.c | 16 ++++++++--------
.../mellanox/mlx5/{core/mlx5_core.h => mlx5.h} | 0
.../ethernet/mellanox/mlx5/{core => }/pagealloc.c | 6 +++---
.../mellanox/mlx5/{core => sriov}/eswitch.c | 12 ++++++------
.../mellanox/mlx5/{core => sriov}/eswitch.h | 2 +-
.../mlx5/{core => sriov}/eswitch_offloads.c | 12 ++++++------
.../ethernet/mellanox/mlx5/{core => sriov}/sriov.c | 6 +++---
78 files changed, 216 insertions(+), 211 deletions(-)
rename drivers/net/ethernet/mellanox/mlx5/{core => }/Kconfig (100%)
create mode 100644 drivers/net/ethernet/mellanox/mlx5/Makefile
rename drivers/net/ethernet/mellanox/mlx5/{core => }/cmd.c (99%)
delete mode 100644 drivers/net/ethernet/mellanox/mlx5/core/Makefile
rename drivers/net/ethernet/mellanox/mlx5/{core => }/debugfs.c (99%)
rename drivers/net/ethernet/mellanox/mlx5/{core => }/dev.c (99%)
rename drivers/net/ethernet/mellanox/mlx5/{core/en_arfs.c => en/arfs.c} (99%)
rename drivers/net/ethernet/mellanox/mlx5/{core/en_clock.c => en/clock.c} (99%)
rename drivers/net/ethernet/mellanox/mlx5/{core/en_common.c => en/common.c} (99%)
rename drivers/net/ethernet/mellanox/mlx5/{core/en_dcbnl.c => en/dcbnl.c} (99%)
rename drivers/net/ethernet/mellanox/mlx5/{core => en}/en.h (99%)
rename drivers/net/ethernet/mellanox/mlx5/{core/en_ethtool.c => en/ethtool.c} (99%)
rename drivers/net/ethernet/mellanox/mlx5/{core/en_fs.c => en/fs.c} (99%)
rename drivers/net/ethernet/mellanox/mlx5/{core/en_fs_ethtool.c => en/fs_ethtool.c} (99%)
rename drivers/net/ethernet/mellanox/mlx5/{core/en_main.c => en/main.c} (99%)
rename drivers/net/ethernet/mellanox/mlx5/{core/en_rep.c => en/rep.c} (99%)
rename drivers/net/ethernet/mellanox/mlx5/{core/en_rx.c => en/rx.c} (99%)
rename drivers/net/ethernet/mellanox/mlx5/{core/en_rx_am.c => en/rx_am.c} (99%)
rename drivers/net/ethernet/mellanox/mlx5/{core/en_selftest.c => en/selftest.c} (99%)
rename drivers/net/ethernet/mellanox/mlx5/{core/en_stats.h => en/stats.h} (100%)
rename drivers/net/ethernet/mellanox/mlx5/{core/en_tc.c => en/tc.c} (99%)
rename drivers/net/ethernet/mellanox/mlx5/{core/en_tc.h => en/tc.h} (100%)
rename drivers/net/ethernet/mellanox/mlx5/{core/en_tx.c => en/tx.c} (99%)
rename drivers/net/ethernet/mellanox/mlx5/{core/en_txrx.c => en/txrx.c} (99%)
rename drivers/net/ethernet/mellanox/mlx5/{core => en}/vxlan.c (98%)
rename drivers/net/ethernet/mellanox/mlx5/{core => en}/vxlan.h (97%)
rename drivers/net/ethernet/mellanox/mlx5/{core => en}/wq.c (98%)
rename drivers/net/ethernet/mellanox/mlx5/{core => en}/wq.h (99%)
rename drivers/net/ethernet/mellanox/mlx5/{core => }/eq.c (99%)
rename drivers/net/ethernet/mellanox/mlx5/{core/fs_cmd.c => fs/cmd.c} (98%)
rename drivers/net/ethernet/mellanox/mlx5/{core/fs_cmd.h => fs/cmd.h} (100%)
rename drivers/net/ethernet/mellanox/mlx5/{core/fs_core.c => fs/core.c} (99%)
rename drivers/net/ethernet/mellanox/mlx5/{core/fs_core.h => fs/core.h} (99%)
rename drivers/net/ethernet/mellanox/mlx5/{core/fs_counters.c => fs/counters.c} (98%)
rename drivers/net/ethernet/mellanox/mlx5/{core => }/health.c (99%)
rename drivers/net/ethernet/mellanox/mlx5/{core => }/lag.c (99%)
rename drivers/net/ethernet/mellanox/mlx5/{core => lib}/alloc.c (99%)
rename {include/linux/mlx5 => drivers/net/ethernet/mellanox/mlx5/lib}/cmd.h (100%)
rename drivers/net/ethernet/mellanox/mlx5/{core => lib}/cq.c (98%)
rename {include/linux/mlx5 => drivers/net/ethernet/mellanox/mlx5/lib}/cq.h (99%)
rename {include/linux/mlx5 => drivers/net/ethernet/mellanox/mlx5/lib}/device.h (99%)
rename {include/linux/mlx5 => drivers/net/ethernet/mellanox/mlx5/lib}/doorbell.h (100%)
rename {include/linux/mlx5 => drivers/net/ethernet/mellanox/mlx5/lib}/driver.h (99%)
rename {include/linux/mlx5 => drivers/net/ethernet/mellanox/mlx5/lib}/fs.h (98%)
rename drivers/net/ethernet/mellanox/mlx5/{core => lib}/fw.c (98%)
rename drivers/net/ethernet/mellanox/mlx5/{core => lib}/mad.c (96%)
rename drivers/net/ethernet/mellanox/mlx5/{core => lib}/mcg.c (96%)
rename {include/linux/mlx5 => drivers/net/ethernet/mellanox/mlx5/lib}/mlx5_ifc.h (100%)
rename drivers/net/ethernet/mellanox/mlx5/{core => lib}/mr.c (98%)
rename drivers/net/ethernet/mellanox/mlx5/{core => lib}/pd.c (96%)
rename drivers/net/ethernet/mellanox/mlx5/{core => lib}/port.c (99%)
rename {include/linux/mlx5 => drivers/net/ethernet/mellanox/mlx5/lib}/port.h (99%)
rename drivers/net/ethernet/mellanox/mlx5/{core => lib}/qp.c (98%)
rename {include/linux/mlx5 => drivers/net/ethernet/mellanox/mlx5/lib}/qp.h (99%)
rename drivers/net/ethernet/mellanox/mlx5/{core => lib}/rl.c (98%)
rename drivers/net/ethernet/mellanox/mlx5/{core => lib}/srq.c (99%)
rename {include/linux/mlx5 => drivers/net/ethernet/mellanox/mlx5/lib}/srq.h (98%)
rename drivers/net/ethernet/mellanox/mlx5/{core => lib}/transobj.c (99%)
rename {include/linux/mlx5 => drivers/net/ethernet/mellanox/mlx5/lib}/transobj.h (99%)
rename drivers/net/ethernet/mellanox/mlx5/{core => lib}/uar.c (99%)
rename drivers/net/ethernet/mellanox/mlx5/{core => lib}/vport.c (99%)
rename {include/linux/mlx5 => drivers/net/ethernet/mellanox/mlx5/lib}/vport.h (98%)
rename drivers/net/ethernet/mellanox/mlx5/{core => }/main.c (99%)
rename drivers/net/ethernet/mellanox/mlx5/{core/mlx5_core.h => mlx5.h} (100%)
rename drivers/net/ethernet/mellanox/mlx5/{core => }/pagealloc.c (99%)
rename drivers/net/ethernet/mellanox/mlx5/{core => sriov}/eswitch.c (99%)
rename drivers/net/ethernet/mellanox/mlx5/{core => sriov}/eswitch.h (99%)
rename drivers/net/ethernet/mellanox/mlx5/{core => sriov}/eswitch_offloads.c (99%)
rename drivers/net/ethernet/mellanox/mlx5/{core => sriov}/sriov.c (98%)
^ permalink raw reply
* Re: [patch net-next] stmmac: indent an if statement
From: Julia Lawall @ 2017-01-12 19:46 UTC (permalink / raw)
To: Dan Carpenter
Cc: Giuseppe Cavallaro, jpinto, Alexandre Torgue, netdev,
linux-kernel, kernel-janitors
In-Reply-To: <20170112184631.GA12157@mwanda>
On Thu, 12 Jan 2017, Dan Carpenter wrote:
> The break statement should be indented one more tab.
>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>
> diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
> index ac32f9e..4daa8a3 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
> @@ -191,7 +191,7 @@ static int stmmac_dt_phy(struct plat_stmmacenet_data *plat,
> for_each_child_of_node(np, plat->mdio_node) {
> if (of_device_is_compatible(plat->mdio_node,
> "snps,dwmac-mdio"))
> - break;
> + break;
If there is a break, there is probably also a need for an of_node_put?
julia
> }
> }
>
> --
> To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply
* Re: [PATCH 2/6 net-next] inet: drop ->bind_conflict
From: David Miller @ 2017-01-12 19:56 UTC (permalink / raw)
To: jbacik; +Cc: hannes, kraigatgoog, eric.dumazet, tom, netdev, kernel-team
In-Reply-To: <1484166164-21250-1-git-send-email-jbacik@fb.com>
From: Josef Bacik <jbacik@fb.com>
Date: Wed, 11 Jan 2017 15:22:40 -0500
> diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c
> index 56d756e..dc07734 100644
> --- a/net/ipv4/tcp_ipv4.c
> +++ b/net/ipv4/tcp_ipv4.c
> @@ -63,6 +63,7 @@
> #include <linux/times.h>
> #include <linux/slab.h>
>
> +#include <net/addrconf.h>
> #include <net/net_namespace.h>
> #include <net/icmp.h>
> #include <net/inet_hashtables.h>
I don't see what this has to do with this change.
^ permalink raw reply
* [PATCH] tcp: fix tcp_fastopen unaligned access complaints on sparc
From: Shannon Nelson @ 2017-01-12 19:59 UTC (permalink / raw)
To: netdev, davem; +Cc: sparclinux, linux-kernel, Shannon Nelson
Fix up a data alignment issue on sparc by swapping the order
of the cookie byte array field with the length field in
struct tcp_fastopen_cookie
This addresses log complaints like these:
log_unaligned: 113 callbacks suppressed
Kernel unaligned access at TPC[976490] tcp_try_fastopen+0x2d0/0x360
Kernel unaligned access at TPC[9764ac] tcp_try_fastopen+0x2ec/0x360
Kernel unaligned access at TPC[9764c8] tcp_try_fastopen+0x308/0x360
Kernel unaligned access at TPC[9764e4] tcp_try_fastopen+0x324/0x360
Kernel unaligned access at TPC[976490] tcp_try_fastopen+0x2d0/0x360
Signed-off-by: Shannon Nelson <shannon.nelson@oracle.com>
---
include/linux/tcp.h | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/include/linux/tcp.h b/include/linux/tcp.h
index fc5848d..95cda75 100644
--- a/include/linux/tcp.h
+++ b/include/linux/tcp.h
@@ -62,8 +62,8 @@ static inline unsigned int tcp_optlen(const struct sk_buff *skb)
/* TCP Fast Open Cookie as stored in memory */
struct tcp_fastopen_cookie {
- s8 len;
u8 val[TCP_FASTOPEN_COOKIE_MAX];
+ s8 len;
bool exp; /* In RFC6994 experimental option format */
};
--
1.7.1
^ permalink raw reply related
* Re: [PATCH net-next 0/3] net: mdio-gpio: Use modern GPIO helpers
From: David Miller @ 2017-01-12 20:05 UTC (permalink / raw)
To: f.fainelli; +Cc: netdev, andrew, vivien.didelot, cphealy, linux
In-Reply-To: <20170111205951.32363-1-f.fainelli@gmail.com>
From: Florian Fainelli <f.fainelli@gmail.com>
Date: Wed, 11 Jan 2017 12:59:48 -0800
> This patch series modernizes the mdio-gpio and makes it switch to the
> latest and greatest API for manipulating GPIO lines, thus allowing
> some simplifications in the driver.
Series applied, thanks.
^ permalink raw reply
* Re: To netlink or not to netlink, that is the question
From: Jason A. Donenfeld @ 2017-01-12 20:07 UTC (permalink / raw)
To: David Miller; +Cc: Dan Williams, Stephen Hemminger, Netdev
In-Reply-To: <20170112.141127.426662758858102403.davem@davemloft.net>
On Thu, Jan 12, 2017 at 8:11 PM, David Miller <davem@davemloft.net> wrote:
> This is a fact of life, dumps are always chopped into suitable
> numbers of responses as necessary. We do this for IPV4 routes,
> network interfaces, etc. and it all works out just fine.
>
> The thing you should be asking yourself is, if something as heavily
> used and fundamental as IPV4 can handle this, probably your scenerio
> can be handled just fine as well.
Okay, fair enough. I'll suck it up, then, and just use netlink in this
way. David - you concur with Stephen that ioctl is really not okay and
I should absolutely do netlink?
^ permalink raw reply
* Re: [PATCH net-next] ipv6: sr: static percpu allocation for hmac_ring
From: David Lebrun @ 2017-01-12 20:10 UTC (permalink / raw)
To: Eric Dumazet, David Miller; +Cc: netdev
In-Reply-To: <1484239810.15816.47.camel@edumazet-glaptop3.roam.corp.google.com>
[-- Attachment #1: Type: text/plain, Size: 2684 bytes --]
On 01/12/2017 05:50 PM, Eric Dumazet wrote:
> From: Eric Dumazet <edumazet@google.com>
>
> Current allocations are not NUMA aware, and lack proper
> cleanup in case of error.
>
> It is perfectly fine to use static per cpu allocations for 256 bytes
> per cpu.
>
> Signed-off-by: Eric Dumazet <edumazet@google.com>
> Cc: David Lebrun <david.lebrun@uclouvain.be>
> ---
> net/ipv6/seg6_hmac.c | 43 ++---------------------------------------
> 1 file changed, 3 insertions(+), 40 deletions(-)
>
> diff --git a/net/ipv6/seg6_hmac.c b/net/ipv6/seg6_hmac.c
> index ef1c8a46e7aceee45b2044d4b4338dc3aed88807..6389bf3e9c9f28cdd3e30175f2880b74e099e273 100644
> --- a/net/ipv6/seg6_hmac.c
> +++ b/net/ipv6/seg6_hmac.c
> @@ -45,7 +45,7 @@
> #include <net/seg6_hmac.h>
> #include <linux/random.h>
>
> -static char * __percpu *hmac_ring;
> +static DEFINE_PER_CPU(char [SEG6_HMAC_RING_SIZE], hmac_ring);
>
> static int seg6_hmac_cmpfn(struct rhashtable_compare_arg *arg, const void *obj)
> {
> @@ -192,7 +192,7 @@ int seg6_hmac_compute(struct seg6_hmac_info *hinfo, struct ipv6_sr_hdr *hdr,
> */
>
> local_bh_disable();
> - ring = *this_cpu_ptr(hmac_ring);
> + ring = this_cpu_ptr(hmac_ring);
> off = ring;
>
> /* source address */
> @@ -353,27 +353,6 @@ int seg6_push_hmac(struct net *net, struct in6_addr *saddr,
> }
> EXPORT_SYMBOL(seg6_push_hmac);
>
> -static int seg6_hmac_init_ring(void)
> -{
> - int i;
> -
> - hmac_ring = alloc_percpu(char *);
> -
> - if (!hmac_ring)
> - return -ENOMEM;
> -
> - for_each_possible_cpu(i) {
> - char *ring = kzalloc(SEG6_HMAC_RING_SIZE, GFP_KERNEL);
> -
> - if (!ring)
> - return -ENOMEM;
> -
> - *per_cpu_ptr(hmac_ring, i) = ring;
> - }
> -
> - return 0;
> -}
> -
> static int seg6_hmac_init_algo(void)
> {
> struct seg6_hmac_algo *algo;
> @@ -422,16 +401,7 @@ static int seg6_hmac_init_algo(void)
>
> int __init seg6_hmac_init(void)
> {
> - int ret;
> -
> - ret = seg6_hmac_init_ring();
> - if (ret < 0)
> - goto out;
> -
> - ret = seg6_hmac_init_algo();
> -
> -out:
> - return ret;
> + return seg6_hmac_init_algo();
> }
> EXPORT_SYMBOL(seg6_hmac_init);
>
> @@ -450,13 +420,6 @@ void seg6_hmac_exit(void)
> struct seg6_hmac_algo *algo = NULL;
> int i, alg_count, cpu;
>
> - for_each_possible_cpu(i) {
> - char *ring = *per_cpu_ptr(hmac_ring, i);
> -
> - kfree(ring);
> - }
> - free_percpu(hmac_ring);
> -
> alg_count = sizeof(hmac_algos) / sizeof(struct seg6_hmac_algo);
> for (i = 0; i < alg_count; i++) {
> algo = &hmac_algos[i];
>
>
Acked-by: David Lebrun <david.lebrun@uclouvain.be>
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 163 bytes --]
^ permalink raw reply
* Re: [PATCH net-next] liquidio: replace skb_tx_hash with fallback
From: Eric Dumazet @ 2017-01-12 19:10 UTC (permalink / raw)
To: Felix Manlunas
Cc: davem, netdev, raghu.vatsavayi, derek.chickles, satananda.burla
In-Reply-To: <20170112184606.GA5503@felix.cavium.com>
On Thu, 2017-01-12 at 10:46 -0800, Felix Manlunas wrote:
> From: Satanand Burla <satananda.burla@cavium.com>
>
> Use fallback instead of skb_tx_hash for selecting txq
>
> Signed-off-by: Satanand Burla <satananda.burla@cavium.com>
> Signed-off-by: Felix Manlunas <felix.manlunas@cavium.com>
> Signed-off-by: Derek Chickles <derek.chickles@cavium.com>
> ---
> drivers/net/ethernet/cavium/liquidio/lio_main.c | 10 ++--------
> drivers/net/ethernet/cavium/liquidio/lio_vf_main.c | 11 ++---------
> 2 files changed, 4 insertions(+), 17 deletions(-)
>
> diff --git a/drivers/net/ethernet/cavium/liquidio/lio_main.c b/drivers/net/ethernet/cavium/liquidio/lio_main.c
> index b8b579d..90f000f 100644
> --- a/drivers/net/ethernet/cavium/liquidio/lio_main.c
> +++ b/drivers/net/ethernet/cavium/liquidio/lio_main.c
> @@ -2231,15 +2231,9 @@ static void if_cfg_callback(struct octeon_device *oct,
> */
> static u16 select_q(struct net_device *dev, struct sk_buff *skb,
> void *accel_priv __attribute__((unused)),
> - select_queue_fallback_t fallback __attribute__((unused)))
> + select_queue_fallback_t fallback)
> {
> - u32 qindex = 0;
> - struct lio *lio;
> -
> - lio = GET_LIO(dev);
> - qindex = skb_tx_hash(dev, skb);
> -
> - return (u16)(qindex % (lio->linfo.num_txpciq));
> + return fallback(dev, skb);
> }
>
> /** Routine to push packets arriving on Octeon interface upto network layer.
> diff --git a/drivers/net/ethernet/cavium/liquidio/lio_vf_main.c b/drivers/net/ethernet/cavium/liquidio/lio_vf_main.c
> index ad2e72d..a7478eb 100644
> --- a/drivers/net/ethernet/cavium/liquidio/lio_vf_main.c
> +++ b/drivers/net/ethernet/cavium/liquidio/lio_vf_main.c
> @@ -1463,16 +1463,9 @@ static void if_cfg_callback(struct octeon_device *oct,
> */
> static u16 select_q(struct net_device *dev, struct sk_buff *skb,
> void *accel_priv __attribute__((unused)),
> - select_queue_fallback_t fallback __attribute__((unused)))
> + select_queue_fallback_t fallback)
> {
> - struct lio *lio;
> - u32 qindex;
> -
> - lio = GET_LIO(dev);
> -
> - qindex = skb_tx_hash(dev, skb);
> -
> - return (u16)(qindex % (lio->linfo.num_txpciq));
> + return fallback(dev, skb);
> }
>
> /** Routine to push packets arriving on Octeon interface upto network layer.
Why are you keeping these functions then ?
Remove them completely, and remove .ndo_select_queue from your ops.
Core networking stack will fallback automatically.
^ permalink raw reply
* Re: [PATCH] net: lwtunnel: Handle lwtunnel_fill_encap failure
From: David Miller @ 2017-01-12 20:12 UTC (permalink / raw)
To: dsa; +Cc: netdev, roopa
In-Reply-To: <1484173794-7777-1-git-send-email-dsa@cumulusnetworks.com>
From: David Ahern <dsa@cumulusnetworks.com>
Date: Wed, 11 Jan 2017 14:29:54 -0800
> Handle failure in lwtunnel_fill_encap adding attributes to skb.
>
> Fixes: 571e722676fe ("ipv4: support for fib route lwtunnel encap attributes")
> Fixes: 19e42e451506 ("ipv6: support for fib route lwtunnel encap attributes")
> Signed-off-by: David Ahern <dsa@cumulusnetworks.com>
Applied and queued up for -stable, thanks David.
^ permalink raw reply
* Re: [PATCH] tcp: fix tcp_fastopen unaligned access complaints on sparc
From: Eric Dumazet @ 2017-01-12 20:13 UTC (permalink / raw)
To: Shannon Nelson; +Cc: netdev, davem, sparclinux, linux-kernel
In-Reply-To: <1484251157-245538-1-git-send-email-shannon.nelson@oracle.com>
On Thu, 2017-01-12 at 11:59 -0800, Shannon Nelson wrote:
> Fix up a data alignment issue on sparc by swapping the order
> of the cookie byte array field with the length field in
> struct tcp_fastopen_cookie
>
> This addresses log complaints like these:
> log_unaligned: 113 callbacks suppressed
> Kernel unaligned access at TPC[976490] tcp_try_fastopen+0x2d0/0x360
> Kernel unaligned access at TPC[9764ac] tcp_try_fastopen+0x2ec/0x360
> Kernel unaligned access at TPC[9764c8] tcp_try_fastopen+0x308/0x360
> Kernel unaligned access at TPC[9764e4] tcp_try_fastopen+0x324/0x360
> Kernel unaligned access at TPC[976490] tcp_try_fastopen+0x2d0/0x360
>
> Signed-off-by: Shannon Nelson <shannon.nelson@oracle.com>
> ---
> include/linux/tcp.h | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/include/linux/tcp.h b/include/linux/tcp.h
> index fc5848d..95cda75 100644
> --- a/include/linux/tcp.h
> +++ b/include/linux/tcp.h
> @@ -62,8 +62,8 @@ static inline unsigned int tcp_optlen(const struct sk_buff *skb)
>
> /* TCP Fast Open Cookie as stored in memory */
> struct tcp_fastopen_cookie {
> - s8 len;
> u8 val[TCP_FASTOPEN_COOKIE_MAX];
> + s8 len;
> bool exp; /* In RFC6994 experimental option format */
> };
>
Strange... Do you have an explanation of why this patch would be
needed ? A compiler issue ?
s8 and u8 are bytes after all.
^ permalink raw reply
* Re: [PATCH] tilepro: Fix non-void return from void function
From: David Miller @ 2017-01-12 20:14 UTC (permalink / raw)
To: joe; +Cc: cmetcalf, stephen, netdev, linux-kernel
In-Reply-To: <fb9071cb1b950cd3328d838f511231d11d07990c.1484175023.git.joe@perches.com>
From: Joe Perches <joe@perches.com>
Date: Wed, 11 Jan 2017 14:52:20 -0800
> commit bc1f44709cf2 ("net: make ndo_get_stats64 a void function")
> mistakenly used a return value for this void conversion.
>
> Fix it.
>
> Signed-off-by: Joe Perches <joe@perches.com>
> cc: stephen hemminger <stephen@networkplumber.org>
Applied.
^ permalink raw reply
* Re: [PATCH] [v2] net: qcom/emac: grab a reference to the phydev on ACPI systems
From: David Miller @ 2017-01-12 20:14 UTC (permalink / raw)
To: timur; +Cc: netdev, johan
In-Reply-To: <1484174751-19036-1-git-send-email-timur@codeaurora.org>
From: Timur Tabi <timur@codeaurora.org>
Date: Wed, 11 Jan 2017 16:45:51 -0600
> Commit 6ffe1c4cd0a7 ("net: qcom/emac: fix of_node and phydev leaks")
> fixed the problem with reference leaks on phydev, but the fix is
> device-tree specific. When the driver unloads, the reference is
> dropped only on DT systems.
>
> Instead, it's cleaner if up grab an reference on ACPI systems.
> When the driver unloads, we can drop the reference without having
> to check whether we're on a DT system.
>
> Signed-off-by: Timur Tabi <timur@codeaurora.org>
Applied.
^ permalink raw reply
* Re: [PATCH 5/6] treewide: use kv[mz]alloc* rather than opencoded variants
From: Boris Ostrovsky @ 2017-01-12 20:14 UTC (permalink / raw)
To: Michal Hocko, Andrew Morton
Cc: Vlastimil Babka, David Rientjes, Mel Gorman, Johannes Weiner,
Al Viro, linux-mm, LKML, Michal Hocko, Martin Schwidefsky,
Heiko Carstens, Herbert Xu, Anton Vorontsov, Colin Cross,
Kees Cook, Tony Luck, Rafael J. Wysocki, Ben Skeggs,
Kent Overstreet, Santosh Raspatur, Hariprasad S, Tariq Toukan,
Yishai
In-Reply-To: <20170112153717.28943-6-mhocko@kernel.org>
> diff --git a/drivers/xen/evtchn.c b/drivers/xen/evtchn.c
> index 6890897a6f30..10f1ef582659 100644
> --- a/drivers/xen/evtchn.c
> +++ b/drivers/xen/evtchn.c
> @@ -87,18 +87,6 @@ struct user_evtchn {
> bool enabled;
> };
>
> -static evtchn_port_t *evtchn_alloc_ring(unsigned int size)
> -{
> - evtchn_port_t *ring;
> - size_t s = size * sizeof(*ring);
> -
> - ring = kmalloc(s, GFP_KERNEL);
> - if (!ring)
> - ring = vmalloc(s);
> -
> - return ring;
> -}
> -
> static void evtchn_free_ring(evtchn_port_t *ring)
> {
> kvfree(ring);
> @@ -334,7 +322,7 @@ static int evtchn_resize_ring(struct per_user_data *u)
> else
> new_size = 2 * u->ring_size;
>
> - new_ring = evtchn_alloc_ring(new_size);
> + new_ring = kvmalloc(new_size * sizeof(*new_ring), GFP_KERNEL);
> if (!new_ring)
> return -ENOMEM;
>
Xen bits:
Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply
* Re: [PATCH] tcp: fix tcp_fastopen unaligned access complaints on sparc
From: Rob Gardner @ 2017-01-12 20:15 UTC (permalink / raw)
To: Eric Dumazet, Shannon Nelson; +Cc: netdev, davem, sparclinux, linux-kernel
In-Reply-To: <1484252011.13165.0.camel@edumazet-glaptop3.roam.corp.google.com>
On 01/12/2017 01:13 PM, Eric Dumazet wrote:
> On Thu, 2017-01-12 at 11:59 -0800, Shannon Nelson wrote:
>> Fix up a data alignment issue on sparc by swapping the order
>> of the cookie byte array field with the length field in
>> struct tcp_fastopen_cookie
>>
>> This addresses log complaints like these:
>> log_unaligned: 113 callbacks suppressed
>> Kernel unaligned access at TPC[976490] tcp_try_fastopen+0x2d0/0x360
>> Kernel unaligned access at TPC[9764ac] tcp_try_fastopen+0x2ec/0x360
>> Kernel unaligned access at TPC[9764c8] tcp_try_fastopen+0x308/0x360
>> Kernel unaligned access at TPC[9764e4] tcp_try_fastopen+0x324/0x360
>> Kernel unaligned access at TPC[976490] tcp_try_fastopen+0x2d0/0x360
>>
>> Signed-off-by: Shannon Nelson <shannon.nelson@oracle.com>
>> ---
>> include/linux/tcp.h | 2 +-
>> 1 files changed, 1 insertions(+), 1 deletions(-)
>>
>> diff --git a/include/linux/tcp.h b/include/linux/tcp.h
>> index fc5848d..95cda75 100644
>> --- a/include/linux/tcp.h
>> +++ b/include/linux/tcp.h
>> @@ -62,8 +62,8 @@ static inline unsigned int tcp_optlen(const struct sk_buff *skb)
>>
>> /* TCP Fast Open Cookie as stored in memory */
>> struct tcp_fastopen_cookie {
>> - s8 len;
>> u8 val[TCP_FASTOPEN_COOKIE_MAX];
>> + s8 len;
>> bool exp; /* In RFC6994 experimental option format */
>> };
>>
> Strange... Do you have an explanation of why this patch would be
> needed ? A compiler issue ?
>
>
> s8 and u8 are bytes after all.
>
>
I suspect that someplace, somebody is casting val to an int * or
something like that.
^ permalink raw reply
* Re: [PATCH] xen-netfront: Fix Rx stall during network stress and OOM
From: David Miller @ 2017-01-12 20:17 UTC (permalink / raw)
To: vineethp
Cc: boris.ostrovsky, jgross, xen-devel, netdev, linux-kernel, kamatam,
aliguori
In-Reply-To: <1484176637-2869-1-git-send-email-vineethp@amazon.com>
From: Vineeth Remanan Pillai <vineethp@amazon.com>
Date: Wed, 11 Jan 2017 23:17:17 +0000
> @@ -1054,7 +1059,11 @@ static int xennet_poll(struct napi_struct *napi, int budget)
> napi_complete(napi);
>
> RING_FINAL_CHECK_FOR_RESPONSES(&queue->rx, more_to_do);
> - if (more_to_do)
> +
> + /* If there is more work to do or could not allocate
> + * rx buffers, re-enable polling.
> + */
> + if (more_to_do || err != 0)
> napi_schedule(napi);
Just polling endlessly in a loop retrying the SKB allocation over and over
again until it succeeds is not very nice behavior.
You already have that refill timer, so please use that to retry instead
of wasting cpu cycles looping in NAPI poll.
Thanks.
^ permalink raw reply
* Re: [PATCH] net: ipv4: fix table id in getroute response
From: David Miller @ 2017-01-12 20:18 UTC (permalink / raw)
To: dsa; +Cc: netdev
In-Reply-To: <1484178137-23735-1-git-send-email-dsa@cumulusnetworks.com>
From: David Ahern <dsa@cumulusnetworks.com>
Date: Wed, 11 Jan 2017 15:42:17 -0800
> rtm_table is an 8-bit field while table ids are allowed up to u32. Commit
> 709772e6e065 ("net: Fix routing tables with id > 255 for legacy software")
> added the preference to set rtm_table in dumps to RT_TABLE_COMPAT if the
> table id is > 255. The table id returned on get route requests should do
> the same.
>
> Fixes: c36ba6603a11 ("net: Allow user to get table id from route lookup")
> Signed-off-by: David Ahern <dsa@cumulusnetworks.com>
Good catch, applied and queued up for -stable.
^ permalink raw reply
* Re: [PATCH] tcp: fix tcp_fastopen unaligned access complaints on sparc
From: Eric Dumazet @ 2017-01-12 20:25 UTC (permalink / raw)
To: Rob Gardner; +Cc: Shannon Nelson, netdev, davem, sparclinux, linux-kernel
In-Reply-To: <cd152a9f-4855-a552-2b45-bd619436a628@oracle.com>
On Thu, 2017-01-12 at 13:15 -0700, Rob Gardner wrote:
>
> I suspect that someplace, somebody is casting val to an int * or
> something like that.
Then that would be the bug. Can we root cause this please ?
^ permalink raw reply
* Re: [PATCH net-next] liquidio: remove unnecessary code
From: David Miller @ 2017-01-12 20:25 UTC (permalink / raw)
To: felix.manlunas; +Cc: netdev, raghu.vatsavayi, derek.chickles, satananda.burla
In-Reply-To: <20170112010902.GA9597@felix.cavium.com>
From: Felix Manlunas <felix.manlunas@cavium.com>
Date: Wed, 11 Jan 2017 17:09:02 -0800
> Remove code that's no longer needed. It used to serve a purpose, which was
> to fix a link-related bug. For a while now, the NIC firmware has had a
> more elegant fix for that bug.
>
> Signed-off-by: Felix Manlunas <felix.manlunas@cavium.com>
> Signed-off-by: Derek Chickles <derek.chickles@cavium.com>
> Signed-off-by: Satanand Burla <satananda.burla@cavium.com>
Applied.
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox