ChangeLog:
v1 Corrected Ethernet frame size to 1538. Performance optimization. Removed extra CopyMem() call.
v2 Split the patch. Adjust the Ethernet frame size to 1566 to cover the IPv6 case. EBC performance optimization: a. Removed unnecessary SetMem(). b. Replaced CopyMem() with direct copy of structure members.
Daniil Egranov (2): OpenPlatformPkg/Drivers/Net/MarvellYukonDxe: Correct Ethernet frame buffer size OpenPlatformPkg/Drivers/Net/MarvellYukonDxe: Performance optimization for EBC
Drivers/Net/MarvellYukonDxe/if_msk.c | 5 +++-- Drivers/Net/MarvellYukonDxe/if_msk.h | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-)
Corrected the Ethernet frame size to 1566 to cover the IPv6 case.
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Daniil Egranov daniil.egranov@arm.com --- Drivers/Net/MarvellYukonDxe/if_msk.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Drivers/Net/MarvellYukonDxe/if_msk.h b/Drivers/Net/MarvellYukonDxe/if_msk.h index 66513d3..110c562 100644 --- a/Drivers/Net/MarvellYukonDxe/if_msk.h +++ b/Drivers/Net/MarvellYukonDxe/if_msk.h @@ -15,7 +15,7 @@
#include <Uefi.h>
-#define MAX_SUPPORTED_PACKET_SIZE (1500) +#define MAX_SUPPORTED_PACKET_SIZE (1566) /* No jumbo frame size support */
EFI_STATUS mskc_probe (EFI_PCI_IO_PROTOCOL *PciIo);
Removed unnecessary SetMem(). Replaced CopyMem() with direct copy of structure members.
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Daniil Egranov daniil.egranov@arm.com --- Drivers/Net/MarvellYukonDxe/if_msk.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/Drivers/Net/MarvellYukonDxe/if_msk.c b/Drivers/Net/MarvellYukonDxe/if_msk.c index 6fb8af4..d23f893 100644 --- a/Drivers/Net/MarvellYukonDxe/if_msk.c +++ b/Drivers/Net/MarvellYukonDxe/if_msk.c @@ -615,7 +615,6 @@ msk_newbuf ( rxd = &sc_if->msk_cdata.msk_rxdesc[idx]; #endif
- gBS->SetMem (&(rxd->rx_m), sizeof (MSK_DMA_BUF), 0); rxd->rx_m.DmaMapping = Mapping; rxd->rx_m.Buf = Buffer; rxd->rx_m.Length = Length; @@ -1906,7 +1905,9 @@ msk_rxeof ( rxd = &sc_if->msk_cdata.msk_rxdesc[cons]; #endif
- gBS->CopyMem (&m, &rxd->rx_m, sizeof(m)); + m.Buf = rxd->rx_m.Buf; + m.DmaMapping = rxd->rx_m.DmaMapping; + m.Length = rxd->rx_m.Length;
Status = msk_newbuf (sc_if, cons); if (EFI_ERROR (Status)) {
The PCI on Juno is DMA coherent. Add correct mapping of DmaLib class.
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Daniil Egranov daniil.egranov@arm.com --- Platforms/ARM/Juno/ArmJuno.dsc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/Platforms/ARM/Juno/ArmJuno.dsc b/Platforms/ARM/Juno/ArmJuno.dsc index 751225a..3913bd7 100644 --- a/Platforms/ARM/Juno/ArmJuno.dsc +++ b/Platforms/ARM/Juno/ArmJuno.dsc @@ -277,7 +277,10 @@ # PCI Support # MdeModulePkg/Bus/Pci/PciBusDxe/PciBusDxe.inf - ArmPlatformPkg/ArmJunoPkg/Drivers/PciHostBridgeDxe/PciHostBridgeDxe.inf + ArmPlatformPkg/ArmJunoPkg/Drivers/PciHostBridgeDxe/PciHostBridgeDxe.inf { + <LibraryClasses> + DmaLib|EmbeddedPkg/Library/NullDmaLib/NullDmaLib.inf + }
# # SATA Controller
On 27 September 2016 at 18:45, Daniil Egranov daniil.egranov@arm.com wrote:
The PCI on Juno is DMA coherent. Add correct mapping of DmaLib class.
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Daniil Egranov daniil.egranov@arm.com
Platforms/ARM/Juno/ArmJuno.dsc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/Platforms/ARM/Juno/ArmJuno.dsc b/Platforms/ARM/Juno/ArmJuno.dsc index 751225a..3913bd7 100644 --- a/Platforms/ARM/Juno/ArmJuno.dsc +++ b/Platforms/ARM/Juno/ArmJuno.dsc @@ -277,7 +277,10 @@ # PCI Support # MdeModulePkg/Bus/Pci/PciBusDxe/PciBusDxe.inf
- ArmPlatformPkg/ArmJunoPkg/Drivers/PciHostBridgeDxe/PciHostBridgeDxe.inf
ArmPlatformPkg/ArmJunoPkg/Drivers/PciHostBridgeDxe/PciHostBridgeDxe.inf {
<LibraryClasses>
DmaLib|EmbeddedPkg/Library/NullDmaLib/NullDmaLib.inf
}
# # SATA Controller
-- 2.7.4
Applied, thanks
On 27 September 2016 at 18:45, Daniil Egranov daniil.egranov@arm.com wrote:
ChangeLog:
v1 Corrected Ethernet frame size to 1538. Performance optimization. Removed extra CopyMem() call.
v2 Split the patch. Adjust the Ethernet frame size to 1566 to cover the IPv6 case. EBC performance optimization: a. Removed unnecessary SetMem(). b. Replaced CopyMem() with direct copy of structure members.
Daniil Egranov (2): OpenPlatformPkg/Drivers/Net/MarvellYukonDxe: Correct Ethernet frame buffer size OpenPlatformPkg/Drivers/Net/MarvellYukonDxe: Performance optimization for EBC
Drivers/Net/MarvellYukonDxe/if_msk.c | 5 +++-- Drivers/Net/MarvellYukonDxe/if_msk.h | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-)
-- 2.7.4
Applied, thanks