SlideShare ist ein Scribd-Unternehmen logo
1 von 23
Downloaden Sie, um offline zu lesen
AQC107 Driver and Changes
coming to network API
2019/12/12 @ BitVisor Summit 8
Ake Koomsin
Agenda
◼ Strange issues during AQC107 driver development
◼ AQC107 driver performance
◼ Changes coming to network API
1Copyright© 2019 IGEL Co., Ltd. All Rights Reserved.
Aquantia AQC107
◼ Budget 10 Gbps Ethernet Controller
– Mac Mini 2018 10 Gbps model
– Asus XG-C100C
– Etc
◼ Support 10/5/2.5/1 Gbps and 100 Mbps
◼ Support a lot of packet filtering
– L2/L3/L4
– VLAN
– Flexible Header filtering
– Etc
◼ Aquantia is acquired by Marvell in 2019/09
2Copyright© 2019 IGEL Co., Ltd. All Rights Reserved.
AQC107 strange issues
◼ Busy bit problem on Mac mini
◼ MAC address and Mac mini
3Copyright© 2019 IGEL Co., Ltd. All Rights Reserved.
AQC107 strange issues
◼ Busy bit problem on Mac mini
– To get a MAC address from AQC107, communicate with its
firmware through the mailbox mechanism
• Write a message to a register, commit, and wait for the result
– Mailbox Busy Bit is used to indicate whether data from the
firmware has arrived or not
• We know that the data has arrived when the bit is cleared
– However, the busy bit is always set for AQC107 on Mac mini
• May be due to the firmware difference? (AQC107 on Mac mini
uses Apple’s firmware)
• Workaround is required
4Copyright© 2019 IGEL Co., Ltd. All Rights Reserved.
AQC107 strange issues
◼ MAC address and Mac mini
– Typically, a driver obtains a MAC address from the device
– Interestingly, macOS ,and Mac firmware obtain the MAC
address from somewhere else
• See Mac Mini box for MAC address used by macOS, and Mac
Firmware
– To avoid unforeseen problems, it is better to use that the
MAC address that is on the Mac mini box
– The only way to obtain that MAC address programmatically
is to get it from Mac firmware
• From UEFI Device Path
– That is the reason we introduce uefiutil to allow us to
obtain additional information from the firmware
5Copyright© 2019 IGEL Co., Ltd. All Rights Reserved.
AQC107 driver performance
◼ Test environment
6Copyright© 2019 IGEL Co., Ltd. All Rights Reserved.
BitVisor Machine Another Machine
CPU Intel i5-4430 @ 3.0 GHz
Memory 4 GB 8 GB
OS Debian Live CD 10.2, kernel 4.19.67-2+deb10u1
NIC Asus XG-C100C
Link speed 10 Gbps direct connect
Test program Iperf2
AQC107 driver performance
◼ Up until “virtio-net: try to submit packets
in a batch to the device driver”
◼ Result
– TX: ~9.4 Gbps
– RX: ~6.8 Gbps
◼ There is room for RX improvement
7Copyright© 2019 IGEL Co., Ltd. All Rights Reserved.
0 1 2 3 4 5 6 7 8 9 10
RX (Gbps)
Baseline
AQC107 driver performance
◼ Enabling Receive Side Coalescing (RSC) interrupt
– Coalesce incoming interrupts so that they are not too
excessive
◼ Result
– TX: ~9.4 Gbps
– RX: from ~6.8 to ~7.4 Gbps
8Copyright© 2019 IGEL Co., Ltd. All Rights Reserved.
0 1 2 3 4 5 6 7 8 9 10
RX (Gbps)
Baseline Intr RSC
AQC107 driver performance
◼ Increase virtio_net queue size from 256 to 512
– Reduce packet drop due to out of available descriptors
◼ Result
– TX: ~9.4 Gbps
– RX: from ~7.4 Gbps to ~9.1 Gbps
9Copyright© 2019 IGEL Co., Ltd. All Rights Reserved.
0 1 2 3 4 5 6 7 8 9 10
RX (Gbps)
Baseline Intr RSC virtio_net 512
Changes coming to network API
◼ Dual MAC addresses
◼ Support for hardware offloading
10Copyright© 2019 IGEL Co., Ltd. All Rights Reserved.
Changes coming to network API
◼ Dual MAC addresses
– Unique MAC addresses for lwip and virtio_net
• Inspect incoming packets, and forward them to the appropriate
destination
– Result
• TX: ~9.4 Gbps
• RX: from ~9.1 Gbps to ~ 9.4 Gbps
11Copyright© 2019 IGEL Co., Ltd. All Rights Reserved.
0 1 2 3 4 5 6 7 8 9 10
RX (Gbps)
Baseline Intr RSC virtio_net 512 Dual MAC address
Changes coming to network API
◼ Support for hardware offloading
– Although we can saturate 10 Gbps TX throughput, it is still
possible to reduce CPU usage caused by:
• Checksum calculation
• Packet segmentation
– Need
• Ability to tell the NIC driver to perform offloading
• Ability to pass buffers to the NIC directly (zero copy)
12Copyright© 2019 IGEL Co., Ltd. All Rights Reserved.
Changes coming to network API
◼ Support for hardware offloading
– Current network API is not enough
– Tentative upcoming changes
• Unifying send/receive function signature
• Introducing struct netpkt packet descriptor
• TX zero copy implementation
• Support for hardware offloading features like TSO, and
checksum calculation
13Copyright© 2019 IGEL Co., Ltd. All Rights Reserved.
Changes coming to network API
◼ Unifying send/receive function signature
– Current send/receive function signature
14Copyright© 2019 IGEL Co., Ltd. All Rights Reserved.
/* send() is a part of struct nicfunc */
void (*send) (void *handle,
uint num_packets,
void **packets,
uint *packet_sizes,
bool print_ok);
typedef void net_recv_callback_t (void *handle,
uint num_packets,
void **packets,
uint *packet_sizes,
void *param,
long *premap);
Changes coming to network API
◼ Unifying send/receive function signature
– Current send/receive function signature
• Difference in function signature
– recv() can be used for transmitting data (like in virtio_net)
– Same for send(), it can be used for receiving data
– This can be troublesome when we want to implement TX zero
copy and hardware offloading
15Copyright© 2019 IGEL Co., Ltd. All Rights Reserved.
Changes coming to network API
◼ Unifying send/receive function signature
– Introduce net_io_fill_t and net_io_flush_t
– net_io_fill_t return value
• NET_FILL_OK
• NET_FILLL_FULL
16Copyright© 2019 IGEL Co., Ltd. All Rights Reserved.
typedef int net_io_fill_t (void *handle,
void *packet,
unsigned int packet_size,
bool print_ok,
void *opt);
typedef void net_io_flush_t (void *handle);
Changes coming to network API
◼ Unifying send/receive function signature
– send() becomes send_fill() and send_flush()
– recv() becomes recv_fill() and recv_flush()
– Return value from fill() gives the caller a chance to deal with
out of descriptor situation
– fill() allows the caller to fill data as much as possible before
flush()
• fill() and flush() should reduce number of MMIO accesses, good
for performance
– flush() usually involves MMIO register accesses if the callee is
NIC driver
17Copyright© 2019 IGEL Co., Ltd. All Rights Reserved.
Changes coming to network API
◼ Introducing struct netpkt packet descriptor
– We can change net_io_fill_t signature to
where struct netpkt is
18Copyright© 2019 IGEL Co., Ltd. All Rights Reserved.
typedef int net_io_fill_t (void *handle,
struct netpkt *pkt,
bool print_ok);
struct netpkt {
void *buf;
void *extra;
u32 buf_nbytes;
u32 flags; /* For options like TSO,
checksum offloading, etc */
};
Changes coming to network API
◼ TX zero copy implementation
– We can add struct dmabuf so that we can hand over
buffer physical addresses to the NIC
– We also need callback to notify the caller that the packet has
been consumed by the NIC
• Require NIC driver modification
19Copyright© 2019 IGEL Co., Ltd. All Rights Reserved.
struct netpkt {
struct dmabuf *dmabuf;
void *extra;
void (*callback) (void *handle,
struct netpkt *pkt,
void *param)
void *cb_handle, *cb_param;
u32 flags; /* For options like TSO,
checksum offloading, etc */
};
Changes coming to network API
◼ Support for hardware offloading
– After the API is stable, we can add hardware offloading
support
– Modification should be straightforward
20Copyright© 2019 IGEL Co., Ltd. All Rights Reserved.
Summary
◼ AQC107 driver
– We can saturate TX/RX throughput
– Still possible to reduce CPU usage
◼ Changes coming to network API
– Dual MAC addresses
– Support for hardware offloading
• Unifying send/receive function signature
• Packet descriptor
• TX zero copy support
• TSO + Checksum calculation
21Copyright© 2019 IGEL Co., Ltd. All Rights Reserved.
Thank you
22Copyright© 2019 IGEL Co., Ltd. All Rights Reserved.

Weitere ähnliche Inhalte

Was ist angesagt?

Www ccnav5 net_ccna_1_chapter_8_v5_0_exam_answers_2014
Www ccnav5 net_ccna_1_chapter_8_v5_0_exam_answers_2014Www ccnav5 net_ccna_1_chapter_8_v5_0_exam_answers_2014
Www ccnav5 net_ccna_1_chapter_8_v5_0_exam_answers_2014
Đồng Quốc Vương
 
Bgp multihoming
Bgp multihomingBgp multihoming
Bgp multihoming
ee38sp
 

Was ist angesagt? (20)

BGP Prime
BGP Prime BGP Prime
BGP Prime
 
Eigrp
EigrpEigrp
Eigrp
 
ACI MultiPod Config Guide
ACI MultiPod Config GuideACI MultiPod Config Guide
ACI MultiPod Config Guide
 
Day 11 eigrp
Day 11 eigrpDay 11 eigrp
Day 11 eigrp
 
Www ccnav5 net_ccna_1_chapter_8_v5_0_exam_answers_2014
Www ccnav5 net_ccna_1_chapter_8_v5_0_exam_answers_2014Www ccnav5 net_ccna_1_chapter_8_v5_0_exam_answers_2014
Www ccnav5 net_ccna_1_chapter_8_v5_0_exam_answers_2014
 
Bgp multihoming
Bgp multihomingBgp multihoming
Bgp multihoming
 
Dhc pv4
Dhc pv4Dhc pv4
Dhc pv4
 
Cisco vs juniper
Cisco vs juniperCisco vs juniper
Cisco vs juniper
 
NAT Ccna
NAT CcnaNAT Ccna
NAT Ccna
 
NAT_Final
NAT_FinalNAT_Final
NAT_Final
 
ACI DHCP 구성 가이드
ACI DHCP 구성 가이드ACI DHCP 구성 가이드
ACI DHCP 구성 가이드
 
Transitioning IPv4 to IPv6
Transitioning IPv4 to IPv6Transitioning IPv4 to IPv6
Transitioning IPv4 to IPv6
 
Network Jumbo Frame Config Guide
Network Jumbo Frame Config GuideNetwork Jumbo Frame Config Guide
Network Jumbo Frame Config Guide
 
BGP Traffic Engineering / Routing Optimisation
BGP Traffic Engineering / Routing OptimisationBGP Traffic Engineering / Routing Optimisation
BGP Traffic Engineering / Routing Optimisation
 
ACI DHCP Config Guide
ACI DHCP Config GuideACI DHCP Config Guide
ACI DHCP Config Guide
 
ACI MultiPod 구성
ACI MultiPod 구성ACI MultiPod 구성
ACI MultiPod 구성
 
Things I wish I had known about IPv6 before I started
Things I wish I had known about IPv6 before I startedThings I wish I had known about IPv6 before I started
Things I wish I had known about IPv6 before I started
 
DEVNET-1191 BGP Enabled Application Development
DEVNET-1191	BGP Enabled Application DevelopmentDEVNET-1191	BGP Enabled Application Development
DEVNET-1191 BGP Enabled Application Development
 
How to configure static nat on cisco routers
How to configure static nat on cisco routersHow to configure static nat on cisco routers
How to configure static nat on cisco routers
 
IPv6 at Mythic Beasts - Networkshop44
IPv6 at Mythic Beasts - Networkshop44IPv6 at Mythic Beasts - Networkshop44
IPv6 at Mythic Beasts - Networkshop44
 

Ähnlich wie BitVisor Summit 8「3. AQC107 Driver and Changes coming to network API」

Note I only need the last 3 sub-questions ( e, f and g) 3. Firew.pdf
Note I only need the last 3 sub-questions ( e, f and g) 3. Firew.pdfNote I only need the last 3 sub-questions ( e, f and g) 3. Firew.pdf
Note I only need the last 3 sub-questions ( e, f and g) 3. Firew.pdf
ezonesolutions
 
Ccna 2 Final V4 1
Ccna 2 Final V4 1Ccna 2 Final V4 1
Ccna 2 Final V4 1
stigerj
 
26.1.7 lab snort and firewall rules
26.1.7 lab   snort and firewall rules26.1.7 lab   snort and firewall rules
26.1.7 lab snort and firewall rules
Freddy Buenaño
 
Sharing your-internet-connection-on-linux
Sharing your-internet-connection-on-linuxSharing your-internet-connection-on-linux
Sharing your-internet-connection-on-linux
jasembo
 

Ähnlich wie BitVisor Summit 8「3. AQC107 Driver and Changes coming to network API」 (20)

How our Cloudy Mindsets Approached Physical Routers
How our Cloudy Mindsets Approached Physical RoutersHow our Cloudy Mindsets Approached Physical Routers
How our Cloudy Mindsets Approached Physical Routers
 
Approaching hyperconvergedopenstack
Approaching hyperconvergedopenstackApproaching hyperconvergedopenstack
Approaching hyperconvergedopenstack
 
2014/09/02 Cisco UCS HPC @ ANL
2014/09/02 Cisco UCS HPC @ ANL2014/09/02 Cisco UCS HPC @ ANL
2014/09/02 Cisco UCS HPC @ ANL
 
Linkmeup v076(2019-06).2
Linkmeup v076(2019-06).2Linkmeup v076(2019-06).2
Linkmeup v076(2019-06).2
 
Netsft2017 day in_life_of_nfv
Netsft2017 day in_life_of_nfvNetsft2017 day in_life_of_nfv
Netsft2017 day in_life_of_nfv
 
Note I only need the last 3 sub-questions ( e, f and g) 3. Firew.pdf
Note I only need the last 3 sub-questions ( e, f and g) 3. Firew.pdfNote I only need the last 3 sub-questions ( e, f and g) 3. Firew.pdf
Note I only need the last 3 sub-questions ( e, f and g) 3. Firew.pdf
 
Ccna 2 Final V4 1
Ccna 2 Final V4 1Ccna 2 Final V4 1
Ccna 2 Final V4 1
 
26.1.7 lab snort and firewall rules
26.1.7 lab   snort and firewall rules26.1.7 lab   snort and firewall rules
26.1.7 lab snort and firewall rules
 
Operational Issues inIPv6 --from vendors' point of view--
Operational Issues inIPv6 --from vendors' point of view--Operational Issues inIPv6 --from vendors' point of view--
Operational Issues inIPv6 --from vendors' point of view--
 
BRKACI-2102_Tshoot.pdf
BRKACI-2102_Tshoot.pdfBRKACI-2102_Tshoot.pdf
BRKACI-2102_Tshoot.pdf
 
XS Boston 2008 Network Topology
XS Boston 2008 Network TopologyXS Boston 2008 Network Topology
XS Boston 2008 Network Topology
 
FPGA MeetUp
FPGA MeetUpFPGA MeetUp
FPGA MeetUp
 
Ethernet summit 2011_toe
Ethernet summit 2011_toeEthernet summit 2011_toe
Ethernet summit 2011_toe
 
Cisco Connect Toronto 2017 - Model-driven Telemetry
Cisco Connect Toronto 2017 - Model-driven TelemetryCisco Connect Toronto 2017 - Model-driven Telemetry
Cisco Connect Toronto 2017 - Model-driven Telemetry
 
Scaling Apache Pulsar to 10 PB/day
Scaling Apache Pulsar to 10 PB/dayScaling Apache Pulsar to 10 PB/day
Scaling Apache Pulsar to 10 PB/day
 
Scaling Apache Pulsar to 10 Petabytes/Day - Pulsar Summit NA 2021 Keynote
Scaling Apache Pulsar to 10 Petabytes/Day - Pulsar Summit NA 2021 KeynoteScaling Apache Pulsar to 10 Petabytes/Day - Pulsar Summit NA 2021 Keynote
Scaling Apache Pulsar to 10 Petabytes/Day - Pulsar Summit NA 2021 Keynote
 
DPDK: Multi Architecture High Performance Packet Processing
DPDK: Multi Architecture High Performance Packet ProcessingDPDK: Multi Architecture High Performance Packet Processing
DPDK: Multi Architecture High Performance Packet Processing
 
CCNA 1 Chapter 6 v5.0 2014
CCNA 1 Chapter 6 v5.0 2014CCNA 1 Chapter 6 v5.0 2014
CCNA 1 Chapter 6 v5.0 2014
 
Sharing your-internet-connection-on-linux
Sharing your-internet-connection-on-linuxSharing your-internet-connection-on-linux
Sharing your-internet-connection-on-linux
 
Innovations in the Enterprise Routing & Switching Space
Innovations in the Enterprise Routing & Switching SpaceInnovations in the Enterprise Routing & Switching Space
Innovations in the Enterprise Routing & Switching Space
 

Mehr von BitVisor

Mehr von BitVisor (10)

BitVisor Summit 11「2. BitVisor on Aarch64」
BitVisor Summit 11「2. BitVisor on Aarch64」BitVisor Summit 11「2. BitVisor on Aarch64」
BitVisor Summit 11「2. BitVisor on Aarch64」
 
BitVisor Summit 11「1. BitVisor 2022年の主な変更点」
BitVisor Summit 11「1. BitVisor 2022年の主な変更点」BitVisor Summit 11「1. BitVisor 2022年の主な変更点」
BitVisor Summit 11「1. BitVisor 2022年の主な変更点」
 
BitVisor Summit 10「1. BitVisor 2021年の主な変更点」
BitVisor Summit 10「1. BitVisor 2021年の主な変更点」 BitVisor Summit 10「1. BitVisor 2021年の主な変更点」
BitVisor Summit 10「1. BitVisor 2021年の主な変更点」
 
BitVisor Summit 9「2. BitVisor 2020年の主な変更点」
BitVisor Summit 9「2. BitVisor 2020年の主な変更点」 BitVisor Summit 9「2. BitVisor 2020年の主な変更点」
BitVisor Summit 9「2. BitVisor 2020年の主な変更点」
 
BitVisor Summit 8「2. BitVisor 2019年の主な変更点」
BitVisor Summit 8「2. BitVisor 2019年の主な変更点」 BitVisor Summit 8「2. BitVisor 2019年の主な変更点」
BitVisor Summit 8「2. BitVisor 2019年の主な変更点」
 
BitVisor Summit 7「8. ベアメタルクラウドにおけるハードウェア保護に関する研究 & Advent Calendar について」
BitVisor Summit 7「8. ベアメタルクラウドにおけるハードウェア保護に関する研究 & Advent Calendar について」BitVisor Summit 7「8. ベアメタルクラウドにおけるハードウェア保護に関する研究 & Advent Calendar について」
BitVisor Summit 7「8. ベアメタルクラウドにおけるハードウェア保護に関する研究 & Advent Calendar について」
 
BitVisor Summit 7「5. CTFVisor: BitVisorによるCTF作問・出題支援」
BitVisor Summit 7「5. CTFVisor: BitVisorによるCTF作問・出題支援」BitVisor Summit 7「5. CTFVisor: BitVisorによるCTF作問・出題支援」
BitVisor Summit 7「5. CTFVisor: BitVisorによるCTF作問・出題支援」
 
BitVisor Summit 7「4. BitVisorによるOSの見かけ上10倍速実行」
BitVisor Summit 7「4. BitVisorによるOSの見かけ上10倍速実行」BitVisor Summit 7「4. BitVisorによるOSの見かけ上10倍速実行」
BitVisor Summit 7「4. BitVisorによるOSの見かけ上10倍速実行」
 
BitVisor Summit 7「3. Interesting Issues During NVMe Driver Development」
BitVisor Summit 7「3. Interesting Issues During NVMe Driver Development」BitVisor Summit 7「3. Interesting Issues During NVMe Driver Development」
BitVisor Summit 7「3. Interesting Issues During NVMe Driver Development」
 
BitVisor Summit 7「2. BitVisor 2018年の主な変更点」
BitVisor Summit 7「2. BitVisor 2018年の主な変更点」BitVisor Summit 7「2. BitVisor 2018年の主な変更点」
BitVisor Summit 7「2. BitVisor 2018年の主な変更点」
 

Kürzlich hochgeladen

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Kürzlich hochgeladen (20)

presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 

BitVisor Summit 8「3. AQC107 Driver and Changes coming to network API」

  • 1. AQC107 Driver and Changes coming to network API 2019/12/12 @ BitVisor Summit 8 Ake Koomsin
  • 2. Agenda ◼ Strange issues during AQC107 driver development ◼ AQC107 driver performance ◼ Changes coming to network API 1Copyright© 2019 IGEL Co., Ltd. All Rights Reserved.
  • 3. Aquantia AQC107 ◼ Budget 10 Gbps Ethernet Controller – Mac Mini 2018 10 Gbps model – Asus XG-C100C – Etc ◼ Support 10/5/2.5/1 Gbps and 100 Mbps ◼ Support a lot of packet filtering – L2/L3/L4 – VLAN – Flexible Header filtering – Etc ◼ Aquantia is acquired by Marvell in 2019/09 2Copyright© 2019 IGEL Co., Ltd. All Rights Reserved.
  • 4. AQC107 strange issues ◼ Busy bit problem on Mac mini ◼ MAC address and Mac mini 3Copyright© 2019 IGEL Co., Ltd. All Rights Reserved.
  • 5. AQC107 strange issues ◼ Busy bit problem on Mac mini – To get a MAC address from AQC107, communicate with its firmware through the mailbox mechanism • Write a message to a register, commit, and wait for the result – Mailbox Busy Bit is used to indicate whether data from the firmware has arrived or not • We know that the data has arrived when the bit is cleared – However, the busy bit is always set for AQC107 on Mac mini • May be due to the firmware difference? (AQC107 on Mac mini uses Apple’s firmware) • Workaround is required 4Copyright© 2019 IGEL Co., Ltd. All Rights Reserved.
  • 6. AQC107 strange issues ◼ MAC address and Mac mini – Typically, a driver obtains a MAC address from the device – Interestingly, macOS ,and Mac firmware obtain the MAC address from somewhere else • See Mac Mini box for MAC address used by macOS, and Mac Firmware – To avoid unforeseen problems, it is better to use that the MAC address that is on the Mac mini box – The only way to obtain that MAC address programmatically is to get it from Mac firmware • From UEFI Device Path – That is the reason we introduce uefiutil to allow us to obtain additional information from the firmware 5Copyright© 2019 IGEL Co., Ltd. All Rights Reserved.
  • 7. AQC107 driver performance ◼ Test environment 6Copyright© 2019 IGEL Co., Ltd. All Rights Reserved. BitVisor Machine Another Machine CPU Intel i5-4430 @ 3.0 GHz Memory 4 GB 8 GB OS Debian Live CD 10.2, kernel 4.19.67-2+deb10u1 NIC Asus XG-C100C Link speed 10 Gbps direct connect Test program Iperf2
  • 8. AQC107 driver performance ◼ Up until “virtio-net: try to submit packets in a batch to the device driver” ◼ Result – TX: ~9.4 Gbps – RX: ~6.8 Gbps ◼ There is room for RX improvement 7Copyright© 2019 IGEL Co., Ltd. All Rights Reserved. 0 1 2 3 4 5 6 7 8 9 10 RX (Gbps) Baseline
  • 9. AQC107 driver performance ◼ Enabling Receive Side Coalescing (RSC) interrupt – Coalesce incoming interrupts so that they are not too excessive ◼ Result – TX: ~9.4 Gbps – RX: from ~6.8 to ~7.4 Gbps 8Copyright© 2019 IGEL Co., Ltd. All Rights Reserved. 0 1 2 3 4 5 6 7 8 9 10 RX (Gbps) Baseline Intr RSC
  • 10. AQC107 driver performance ◼ Increase virtio_net queue size from 256 to 512 – Reduce packet drop due to out of available descriptors ◼ Result – TX: ~9.4 Gbps – RX: from ~7.4 Gbps to ~9.1 Gbps 9Copyright© 2019 IGEL Co., Ltd. All Rights Reserved. 0 1 2 3 4 5 6 7 8 9 10 RX (Gbps) Baseline Intr RSC virtio_net 512
  • 11. Changes coming to network API ◼ Dual MAC addresses ◼ Support for hardware offloading 10Copyright© 2019 IGEL Co., Ltd. All Rights Reserved.
  • 12. Changes coming to network API ◼ Dual MAC addresses – Unique MAC addresses for lwip and virtio_net • Inspect incoming packets, and forward them to the appropriate destination – Result • TX: ~9.4 Gbps • RX: from ~9.1 Gbps to ~ 9.4 Gbps 11Copyright© 2019 IGEL Co., Ltd. All Rights Reserved. 0 1 2 3 4 5 6 7 8 9 10 RX (Gbps) Baseline Intr RSC virtio_net 512 Dual MAC address
  • 13. Changes coming to network API ◼ Support for hardware offloading – Although we can saturate 10 Gbps TX throughput, it is still possible to reduce CPU usage caused by: • Checksum calculation • Packet segmentation – Need • Ability to tell the NIC driver to perform offloading • Ability to pass buffers to the NIC directly (zero copy) 12Copyright© 2019 IGEL Co., Ltd. All Rights Reserved.
  • 14. Changes coming to network API ◼ Support for hardware offloading – Current network API is not enough – Tentative upcoming changes • Unifying send/receive function signature • Introducing struct netpkt packet descriptor • TX zero copy implementation • Support for hardware offloading features like TSO, and checksum calculation 13Copyright© 2019 IGEL Co., Ltd. All Rights Reserved.
  • 15. Changes coming to network API ◼ Unifying send/receive function signature – Current send/receive function signature 14Copyright© 2019 IGEL Co., Ltd. All Rights Reserved. /* send() is a part of struct nicfunc */ void (*send) (void *handle, uint num_packets, void **packets, uint *packet_sizes, bool print_ok); typedef void net_recv_callback_t (void *handle, uint num_packets, void **packets, uint *packet_sizes, void *param, long *premap);
  • 16. Changes coming to network API ◼ Unifying send/receive function signature – Current send/receive function signature • Difference in function signature – recv() can be used for transmitting data (like in virtio_net) – Same for send(), it can be used for receiving data – This can be troublesome when we want to implement TX zero copy and hardware offloading 15Copyright© 2019 IGEL Co., Ltd. All Rights Reserved.
  • 17. Changes coming to network API ◼ Unifying send/receive function signature – Introduce net_io_fill_t and net_io_flush_t – net_io_fill_t return value • NET_FILL_OK • NET_FILLL_FULL 16Copyright© 2019 IGEL Co., Ltd. All Rights Reserved. typedef int net_io_fill_t (void *handle, void *packet, unsigned int packet_size, bool print_ok, void *opt); typedef void net_io_flush_t (void *handle);
  • 18. Changes coming to network API ◼ Unifying send/receive function signature – send() becomes send_fill() and send_flush() – recv() becomes recv_fill() and recv_flush() – Return value from fill() gives the caller a chance to deal with out of descriptor situation – fill() allows the caller to fill data as much as possible before flush() • fill() and flush() should reduce number of MMIO accesses, good for performance – flush() usually involves MMIO register accesses if the callee is NIC driver 17Copyright© 2019 IGEL Co., Ltd. All Rights Reserved.
  • 19. Changes coming to network API ◼ Introducing struct netpkt packet descriptor – We can change net_io_fill_t signature to where struct netpkt is 18Copyright© 2019 IGEL Co., Ltd. All Rights Reserved. typedef int net_io_fill_t (void *handle, struct netpkt *pkt, bool print_ok); struct netpkt { void *buf; void *extra; u32 buf_nbytes; u32 flags; /* For options like TSO, checksum offloading, etc */ };
  • 20. Changes coming to network API ◼ TX zero copy implementation – We can add struct dmabuf so that we can hand over buffer physical addresses to the NIC – We also need callback to notify the caller that the packet has been consumed by the NIC • Require NIC driver modification 19Copyright© 2019 IGEL Co., Ltd. All Rights Reserved. struct netpkt { struct dmabuf *dmabuf; void *extra; void (*callback) (void *handle, struct netpkt *pkt, void *param) void *cb_handle, *cb_param; u32 flags; /* For options like TSO, checksum offloading, etc */ };
  • 21. Changes coming to network API ◼ Support for hardware offloading – After the API is stable, we can add hardware offloading support – Modification should be straightforward 20Copyright© 2019 IGEL Co., Ltd. All Rights Reserved.
  • 22. Summary ◼ AQC107 driver – We can saturate TX/RX throughput – Still possible to reduce CPU usage ◼ Changes coming to network API – Dual MAC addresses – Support for hardware offloading • Unifying send/receive function signature • Packet descriptor • TX zero copy support • TSO + Checksum calculation 21Copyright© 2019 IGEL Co., Ltd. All Rights Reserved.
  • 23. Thank you 22Copyright© 2019 IGEL Co., Ltd. All Rights Reserved.