Data Usage Tags Explained

Data Usage Tags Explained

Tags represent one of the metrics the data usage counters will be tracked against. By default, and implicitly, a tag is just based on the UID. The UID is used as the base for policing, and cannot be ignored. So a tag will always at least represent a UID (uid_tag). A tag can be explicitly augmented with an "accounting tag" which is associated with a UID. User space can use TrafficStats.setThreadStatsTag() to set the acct_tag portion of the tag which is then used  with sockets: all data belonging to that socket will be counted against the tag. The policing is then based on the tag's uid_tag portion, and stats are collected for the acct_tag portion separately.

Without explicit tagging, the qtaguid module will assume the default_tag:  {acct_tag=0, uid_tag=10003}

    a:  {acct_tag=1, uid_tag=10003}
    b:  {acct_tag=2, uid_tag=10003}
    c:  {acct_tag=3, uid_tag=10003}

a, b, c… represent explicit tags associated with specific sockets.

default_tag (acct_tag=0) is the default accounting tag that contains the total traffic for that uid, including all untagged traffic, and is typically used to enforce policing/quota rules.

These tags can be used to profile the network traffic of an application into separate logical categories (at a network socket level). Such tags can be removed, reapplied, or modified during runtime.

The qtaguid module has been implemented on kernel/common branch of android-3.0

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值