当前位置: 首页 > 软件库 > 程序开发 > 网络工具包 >

fastclick

授权协议 View license
开发语言 C/C++
所属分类 程序开发、 网络工具包
软件类型 开源软件
地区 不详
投 递 者 穆鸿卓
操作系统 跨平台
开源组织
适用人群 未知
 软件概览

FastClick CI

FastClick is an extended version of the Click Modular Router featuring animproved Netmap support and a new DPDK support. It was the result ofour ANCS paper available at http://hdl.handle.net/2268/181954, but receivedmultiple contributions and improvements since then, such as flow support withMiddleClick, specialized binaries with PacketMill, precise intra-serverload-balancing with RSS++ and many more individual contributions over the years.More details below.

The Wiki provides documentation about the elements and how to use some FastClick featuressuch as batching.

Announcements

Be sure to watch the repository and check out the GitHub Discussions to stay up to date!

Quick start for DPDK

  • Install DPDK's dependencies (sudo apt install libelf-dev build-essential pkg-config zlib1g-dev libnuma-dev)
  • Install DPDK (http://core.dpdk.org/doc/quick-start/). Since 20.11 you have to use meson : meson build && cd build && ninja && sudo ninja install
  • Build FastClick, with support for DPDK using the following command:
./configure --enable-dpdk --enable-intel-cpu --verbose --enable-select=poll CFLAGS="-O3" CXXFLAGS="-std=c++11 -O3"  --disable-dynamic-linking --enable-poll --enable-bound-port-transfer --enable-local --enable-flow --disable-task-stats --disable-cpu-load
make
  • Since DPDK is using Meson and pkg-config, to compile against various, or non-globally installed DPDK versions, one can prepend PKG_CONFIG_PATH=path/to/libpdpdk.pc/../ to both configure and make.

You will find more information in the High-Speed I/O wiki page.

FastClick "Light"

FastClick, like Click comes with a lot of features that you may not use. The following options will improve performance further :

./configure --enable-dpdk --enable-intel-cpu --verbose --enable-select=poll CFLAGS="-O3" CXXFLAGS="-std=c++11 -O3"  --disable-dynamic-linking --enable-poll --enable-bound-port-transfer --enable-local --enable-flow --disable-task-stats --disable-cpu-load --enable-dpdk-packet --disable-clone --disable-dpdk-softqueue
make
  • Disable task stats suppress statistics tracking for advanced task scheduling with e.g. BalancedThreadSched. With DPDK, it's polling anyway... And as far as scheduling is concerned, RSS++ has a better solution.
  • Disable CPU load will remove load tracking. That is accounting for a CPU percentage while using DPDK by counting cycles spent in empty runs vs all runs. Accessible with the "load" handler.
  • Enable DPDK packet will remove the ability to use any kind of packets other than DPDK ones. The "Packet" class will become a wrapper to a DPDK buffer. You won't be able tu use MMAP'ed packets, Netmap packets, etc. But in general people using DPDK handle DPDK packets. When playing a trace one must copy the data to a DPDK buffer for transmission anyway. This implementation has been improved since the first version and performs better than the default Packet metadata copying when passing CLEAR false to FromDPDKDevice. This means you must do the liveness analysis of metadata by yourself, as you can't assume annotations like the VLAN, the timestamp, etc are 0 by default. It would be bad practice in any case to rely on this kind of default value.
  • Disable clone will remove the indirect buffer copy. So no more reference counting, no more _data_packet. But any packet copy like when using Tee will need to completely copy the packet content, just think sequential. That's most pipeline anyway. And you'll loose the ability to process packets in parallel from multiple threads (without copy). But who does that?
  • Disable DPDK softqueue will disable buffering in ToDPDKDevice. Everything it gets will be sent to DPDK, and the NIC right away. When using batching, it's actually not a problem because when the CPU is busy, FromDPDKDevice will take multiple packets at once (limited to BURST), and you'll effectively send batches in ToDPDKDevice. When the CPU is not busy, and you have one packet per batch because there's no more meat then ... well it's not busy so who cares?

Ultimately, FastClick will still be impacted by its high flexibility and the many options it supports in each elements. This is adressed by PacketMill by embedding constant parameters, and other stuffs to produce one efficient binary.

Contribution

FastClick also aims at keeping a more up-to-date fork and welcomescontributions from anyone.

Regular contributors will be given direct access to the repository.The general rule of thumb to accept a pull request is to involvetwo different entities. I.e. someone for company A make a PR andsomeone from another company/research unit merges it.

You will find more information about contributions in the Community Contributions wiki page.

Examples

See conf/fastclick/README.mdThe wiki provides more information about the I/O frameworks you should use for high speed, such as DPDK and Netmap, and how to configure them.

Differences with the mainline Click (kohler/click)

In a nutshell:

  • Batching
  • The DPDK version in mainline is very limited (no native multi-queue, you have to duplicate elements etc)
  • Thread vectors, allowing easier thread management
  • The flow subsystem that comes from MiddleClick and allow to use many classification algorithm for new improved NAT, Load Balancers, DPI engine (HyperScan, SSE4 string search), Statistics tracking, etc
  • By defaults FastClick compiles with userlevel multithread. You still have to explicitely --enable-dpdk if you want fast I/O with DPDK (you do)

You will find more information about the differences with Click in the related wiki page

Merged work

This section references projects that have been merged in.

RSS++

RSS++ is a NIC-driven scheduler. It is compatible with DPDK (and of course FastClick) application and Kernel applications. The part relevent for FastClick are fully merged in this branch. It provides a solution to automatically scale the number of cores to be used by FromDPDKDevice. Except for its integration of a simulated Metron, RSS++ has been completely merged in.

PacketMill

PacketMill is a serie of optimization to accelerate high-speed packet processing, by building a specialized binary. It has been mostly merged-in. See [README.packetmill.md] for more details.

MiddleClick

MiddleClick) brought in (Fast)Click the ability to understand flows and sessions on top of packets. See [README.middleclick.md] for more details.

Differences with the FastClick ANCS paper

This section states the differences between FastClick as in this repository and the original ANCS paper. For simplicity, we reference all input element as "FromDevice" and outputelement as "ToDevice". However in practice our I/O elements areFromNetmapDevice/ToNetmapDevice and FromDPDKDevice/ToDPDKDevice. They bothinherit from QueueDevice, which is a generic abstract element to implement adevice which supports multiple queues (or in a more generic way I/O throughmultiple different threads).

Thread vector and bit vector designate the same thing.

Citing

If you use FastClick, please cite as follow:

@inproceedings{barbette2015fast,
  title={Fast userspace packet processing},
  author={Barbette Tom, Cyril Soldani and Mathy Laurent},
  booktitle={2015 ACM/IEEE Symposium on Architectures for Networking and Communications Systems (ANCS)},
  pages={5--16},
  year={2015},
  organization={IEEE},
  doi={10.1109/ANCS.2015.7110116}
}

Note that if you use technologies built on top of FastClick, it is relevant to cite the related paper too. I.e. if you use/improve the DeviceBalancer element, you should cite RSS++ instead (or on top of FastClick if FastClick is also a base to your own development), and if using the packetmill command to produce a specialized binary, cite PacketMill.

Getting help

Use the github issue tracker (https://github.com/tbarbette/fastclick/issues) orcontact barbette at kth.se if you encounter any problem.

Please do not ask FastClick-related problems on the vanilla Click mailing list.If you are sure that your problem is Click related, post it on vanilla Click'sissue tracker (https://github.com/kohler/click/issues).

The original Click readme is available in the README.original file.

  • 一、移动端click点击事件300ms延迟介绍 在正常情况下,如果不进行特殊处理,移动端在触发点击事件时,会有300ms的延迟。换句话说,当我们在点击移动端页面后不会立即做出反应,而是会等待300ms才会触发click事件。在移动web兴起初期,用户对300ms的延迟没有太大的感觉,但随着用户对交互体验的要求的提高,如今,移动端的300ms延迟严重影响了用户体验。 300ms延迟由来 07年,苹果

  • 移动端点击延迟事件 移动端浏览器在派发点击事件的时候,通常会出现300ms左右的延迟 原因: 移动端的双击会缩放导致click判断延迟 解决方式 禁用缩放 <meta name = "viewport" content="user-scalable=no" > 缺点: 网页无法缩放 更改默认视口宽度 <meta name="viewport" content="width=device-width

  • 为什么要使用FastClick? 移动设备上的浏览器默认会在用户点击屏幕大约延迟300毫秒后才会触发点击事件,这是为了检查用户是否在做双击。为了能够立即响应用户的点击事件,才有了FastClick。 FastClick的使用 在页面直接引入fastclick.js <script type='application/javascript' src='/path/to/fastclick.js'><

  • 安装         npm install fastclick --save 引入     import fastClick from 'fastclick' 使用     fastClick.attach(document.body)

  • FastClick是专门未解决移动端浏览器300ms点击延迟和点击穿透问题所开发的一个轻量级的库。FastClick实现原理是在检测到touchend事件的时候,会通过DOM自定义事件立即发出模拟一个click事件,并把浏览器在300ms之后的click事件阻止掉。 点击穿透问题 说完移动端点击300ms延迟的问题,还不得不提一下移动端点击穿透的问题。可能有人会想,既然click点击有300ms的

  • 最近跟着视频看了一个vuejs+webpack+nodejs的项目(一个音乐播放器),其中用到了fastClick插件,但是并不是很了解,查了一些资料后整理了一下。 fastClick使用于在移动浏览器上发生介于轻敲及点击之间的指令时,能够让你摆脱300毫秒的延迟。FastClick可以让你的应用程序更加灵敏迅捷。支持各种移动浏览器,比如safari,chrome,opera等 ...移动浏览器将

  • iOS 系统下默认的 click 事件会有300毫秒的延迟,这个延迟是iOS系统的特性而不是jQuery WeUI设定的,可以使用 fastclick 来消除这个延迟。 jQuery WeUI 是不包含 fastclick 的,你只需要按照标准的用法引用并初始化即可,可以参考以下代码: <script src="../lib/fastclick.js"></script> <script> $(f

  • 问题:点击第1次  浏览器会为了判断你是不是想双击用来实现屏幕缩放,会等待300ms再去发送事件,这样单击效果的等待时间就偏长 解决方案 : FastClick 可让单击立即生效  同时禁用双击缩放 转载于:https://www.cnblogs.com/jason-beijing/p/10328400.html

  • 移动端为什么会有300ms的延迟 2007年,iPhone为了兼容PC网站,引入了双击缩放的操作。这个设计针对当时的情况非常人性化,其他浏览器也纷纷跟进。但是这个这个操作为了区分用户是想双击缩放还是真的单击,会在用户单击之后300ms才触发真实的click事件。这就是300ms延迟的来源。 为了让click没有这300ms延迟,FastClick诞生了。虽然有其他方案,但是FastClick是其中

  • 移动端点击延迟300毫秒----FastClick用法 为什么要使用FastClick? 移动设备上的浏览器默认会在用户点击屏幕大约延迟300毫秒才会触发点击事件,这是为了检查用户是否在做双击, 问题由来 这要追溯至 2007 年初。苹果公司在发布首款 iPhone 前夕,遇到一个问题:当时的网站都是为大屏幕设备所设计的。于是苹果的工程师们做了一些约定,应对 iPhone 这种小屏幕浏览桌面端站点

  • 为什么要用fastclick 因为移动端浏览器点击事件有一个300ms的延迟 ,为了响应用户的双击行为,为了能够立即响应用户的点击事件,使用fastclick解决 解决方式 解决方式 禁用缩放 <meta name = "viewport" content="user-scalable=no" > 缺点: 网页无法缩放 更改默认视口宽度 <meta name="viewport" content=

  • 引入fastclick解决移动的点击300毫秒延迟问题 注意是移动端 npm install fastclick --save // 终端下载fastclick 在main.js中引入 import FastClick from 'fastclick' FastClick.attach(document.body);

  • 问题描述 FastClick报错Property 'attach' does not exist on type 'typeof fastclick' 用法如下: 安装fastclick和@types/fastclick main.ts import fastclick from 'fastclick' fastclick.attach(document.body) 然后先是去搜索了一下,然后得

  • 标题react新安装–fastclick、react-fastclick、react-hot-loader、react-redux、prop-types React -fastclick与fastclick的使用 目的:为解决移动端 click事件的 300ms 延时 npm install react-fastclick --save 其中: import initReactFastclick

  • fastclick 的安装 npm install fastclick --save 在main.js中引入 import FastClick from "fastclick" //fastclick导致input框点击慢的问题,引入 import "@utils/resetFastClick.js FastClick.attach(document.body) 在utils文件夹中创建r

  • FastClick 移动设备上的浏览器默认会在用户点击屏幕大约延迟300毫秒后才会触发点击事件,这是为了检查用户是否在做双击。为了能够立即响应用户的点击事件,就有了FastClick 安装完发现输入框点击变得不灵敏,第二次点击页面中的输入框需要长按一会才能正常唤起键盘输入。(安卓是正常的) 我用的是vue3 这里直接再main.js修改即可! 解决方案 // 引入 import fastClick

 相关资料
  • 本文向大家介绍vue.js 添加 fastclick的支持方法,包括了vue.js 添加 fastclick的支持方法的使用技巧和注意事项,需要的朋友参考一下 fastclick:处理移动端click事件300毫秒延迟 1、兼容性 iOS 3及更高版本的移动Safari iOS 5及更高版本的Chrome Android上的Chrome(ICS) Opera Mobile 11.5及以上版本 An

  • fastclick 组件 注意 点击延迟问题应该由页面引入 mip-fastclick 组件解决,禁止 组件内部单独引入 fastclick 标题 内容 类型 通用 支持布局 N/S 所需脚本 https://c.mipcdn.com/static/v2/mip-fastclick/mip-fastclick.js 示例 <mip-fastclick> <mip-example></mip-e

相关阅读

相关文章

相关问答

相关文档