UX in network apps: how not to fail
UX in network apps: how not to fail
Close

6 December 2021

Low-level programming

What are SmartNICs? The different types and features

13 minutes reading

What are SmartNICs? The different types and features

Nowadays, network applications have evolved to provide more complex and user-oriented features. This evolution comes with a cost: increased CPU resource usage on the server side. For that reason, a solution that enables network function offloading and improves application performance is sorely needed. According to an Intel report, only 2% of respondents don't plan to deploy SmartNICs in the near future. This number is meager, but it could be useful to consider why this small group remains unconvinced. This article focuses on the differences between a SmartNIC and a NIC, when a SmartNIC could be helpful, and what kind of problems it can solve. You can also find here information about different types of SmartNIC and predictions about their future.

What is a SmartNIC? 

To understand what a SmartNIC is, we need to start with the basic NIC. A NIC is a Network Interface Card. This hardware component converts data packages to signals spread throughout a network. It allows for communication between computers, not only on the same local area network (LAN) but also more extensive network communications via routable protocols, or Internet Protocols (IPs). Put simply, an NIC connects servers/personal computers with a computer network and facilitates the communication between them. 

So, what is the difference between a NIC and a SmartNIC?

You can think about a SmartNIC as a NIC that you can program, but there is no one explicit definition. It could be supplemented with a multi-core CPU and optional FPGA Integrated Circuit. Different kinds of SmartNICs unburden the host server by taking on networking functions, security functions, or storage functions. This enables application providers to use server resources in a more efficient way and increase the service monetization rate. 

Now that we know a bit what SmartNICs are, let’s focus on why and when we should use them. 

New call-to-action

Why do you need a SmartNIC? 

A SmartNIC isn't "smart" for no reason. A SmartNIC can relieve the host server CPU of processes like routing, network address translation, telemetry, load balancing, firewalling, and more. In other words, it is a solution to offload the server's CPU. A SmartNIC could be a blocker for DDoS attacks by taking the attack on itself and defending the host server CPU against crushing. Moreover, you can use a SmartNIC in a manner similar to a storage controller to manage hard/solid-state drives. SmartNICs are also an excellent solution for offloading data planes. For example in SDN solutions, like Tungsten Fabric, it helps manage the traffic on VMs, supports switching and routing, and traffic classification. 

Still not convinced? Take a look at a list of what else SmartNICs can provide: 

  • It is possible to use SmartNICs at the network edge, the area where the device/local network interfaces with the internet. This gives you the ability to modify the hardware logic to handle data which has a direct impact on performance. 
  • A SmartNIC allows for the easy updating or upgrading of its firmware, giving you flexibility in terms of adding/modifying to the functions it provides and lets you carry out security upgrades whenever needed.
  • Dynamic changes (evolution) of custom protocols? Yes, a SmartNIC also gives you this as part of the package. 
  • SmartNICs are reprogrammable—they can be an environment for developers to implement solutions for market products ready for bulk selling. 

These briefly listed advantages are among the main reasons why SmartNICs are commonly used in networking engineering. But how exactly can they benefit your network solution?   

What problems can a SmartNIC solve? 

Some of the potential problems that a SmartNIC can solve have already been briefly mentioned above, so now it’s time for some more detailed information. 

Storage - SmartNIC as a storage controller 

SmartNIC hardware can increase the level of security for data storage encryption. It can be used to offload data encryption/decryption tasks from either the NVMe drive (nonvolatile memory express) or the CPU. In this case, the hard drive is used only to store the encrypted data. Since the SmartNIC handles encryption and contains the required routines, the NVMe drive alone cannot be used to retrieve the data (a brute force attack would be futile).

In this article, the author tries to estimate how long it would take to brute force AES-256 encryption depending on available hardware.

Offload computation tasks from the CPU

You can move some of the weightier calculation tasks to a SmartNIC and reduce the load on the CPU. For example, SmartNICs are widely used for transcoding (not only) live videos with the help of adaptive bitrate streaming techniques, primarily to support mobile devices. Tasks in FPGA-based accelerators can be up to 20 times more efficient compared to regular CPUs.  

Low latency = high performance

SmartNICs are well known for their low latency in electronic trading. A SmartNIC is more than 40 times faster than a “basic” NIC. Interested in numbers? 22 nanoseconds - that is the time needed to implement the response packet in the network. 

Offloading networking functions 

A SmartNIC with SR-IOV (single-root input/output virtualization) plugin support helps raise network performance levels and lower CPU usage simultaneously. In case the SR-IOV does not support more advanced features, it has to be managed through a server-based data path. 

Ok, but can’t these problems be solved by a standard Network Interface Card? The quick answer is no, they can’t.    

Why is a regular NIC not enough?

The standard Network Interface Card is limited compared to the SmartNIC in terms of programming. A SmartNIC can be programmed by: 

  • VHDL—Very High Speed Integrated Circuit Hardware Description Language is a language used for hardware description. It expresses mixed-signal and digital systems, such as integrated circuits (ICs) and FPGAs (field-programmable gate arrays).
  • P4—this domain-specific language was broadly described in a former article when we explained what P4 is and what it is all about. It can support a SmartNIC by, for example, optimizing network performance in your data center
  • Embedded systems programming—software that runs directly on the device. Smartphones, ATMs, or even airplanes can be examples of embedded systems. 

What’s more, you can use your SmartNIC for the next project. The only thing you need to do is rewrite the code, and you can reuse the hardware. It is an excellent solution for saving costs—there is no need to buy new hardware to build a new project.  

A SmartNIC provides solutions both for better management of the offloading process by taking over some functionality, which simplifies the host system, and for a higher level of performance: 

  • hardware-level data processing,
  • specialized, configurable chipsets,
  • dynamically programmed firmware may take over some workload from generic purpose, host-level chips (offloading). 

None of the abovementioned functionalities and facilities are available using regular NICs. 

Did you know that not every SmartNIC is the same? You can choose the one which will be the most suitable for your needs. In the next section, you can find out more about the different types of SmartNIC. 

Different types of SmartNICs 

A SmartNIC can offload functions like networking, storage, and security. You can choose from the various SmartNICs options below: 

  • FPGA-based—a SmartNIC based on FPGA visibly accelerates network functions compared to implementations based solely on software.
  • Programmable with VHDL/Verilog or with P4 - SmartNICs with SoC (system-on-chip) onboard can link a minimum of one or more CPUs with a standard NIC.
  • ASICs (application-specific integrated circuits) incorporate many software-programmable microprocessor cores. This solution can unburden the CPU of tasks like standardized security and storage protocols.

In what circumstances will specific types of SmartNICs perform better than others? 

If your biggest requirement is flexibility, probably an FPGA-based SmartNIC will be the best choice. This type enables you to program almost every function. 

A SmartNIC with SoC onboard will be helpful if you want to move software components written primarily for generic CPUs. 

However, as with every solution, SmartNICs also have their weaknesses. 

SmartNIC limitations 

There is no perfect solution, and SmartNICs struggle with their weaknesses too. Below are  some of the issues that might sometimes make SmartNIC adoption a bit harder. 

The limitations are:

  • no standards for SmartNICs,
  • reduced troubleshooting options (in some cases system reboot is the only option), 
  • orchestration, 
  • higher price compared to regular NICs, 
  • and taking into account SmartNIC complexity, sometimes implementation time can be longer. 

It is good to be aware of SmartNIC limitations to plan your project wisely and avoid surprises during the process. These points are only possible difficulties, but they are definitely not insurmountable. 

The future of SmartNICs 

In business, there is no room for consulting the coffee grounds. The uses listed below are generating a rapidly growing amount of data - and they need to be appropriately managed. If you plan to step into some of these areas with your project or if it is already associated with them, you should consider a SmartNIC as a solution to make your team work more accessible and efficient. 

Main SmartNIC uses for the future: 

  • 5G—containerization of network mobile components,
  • IoT,
  • security,
  • data analytics,
  • machine learning (ML),
  • other out-of-the-box solutions which the future will bring,
  • new types of SmartNICs to enable the implementation of different kinds of SDNs. 

SmartNICs, with support from CPU technology, could offer excellent performance and, in real terms, make even the most demanding applications more efficient. 

Conclusion

Technologies around us are becoming increasingly „smarter,” and they demand solutions that can adjust to their greater needs. SmartNICs provide low latency, broad flexibility even in the network age, and offloading calculations from the host server CPU to increase performance. In both roles, you can use it as a storage controller, as a blocker for DDoS attacks, or to offload network functions and it will perform great. A SmartNIC can definitely face the challenges generated by current more-scalable solutions.

Adam

Adam Detko

Head of Sales