ILD

rtnl lock
2019-8-20
内核的接口很多都显式的要求在rtnl lock的保护下,它是一个mutex锁,用来保护netdevice等相关的数据,在内核,用户配置间的一致性。定义在:net/core/rtnetlink.cvoid rtnl_lock(void){ mutex_lock(&rtnl_mutex);}EXP

Nftables - Packet flow and Netfilter hooks in detail
2021-12-13
作者说:I for myself always like to know how things work and to dig a little deeper than just gaining the very minimum knowledge required to solve the iss

bridge netfilter
2021-12-20
基于内核4.4.60版本分析。配置和Makenet/KconfigBRIDGE_NETFILTER依赖于NET [=y] && BRIDGE [=y] && NETFILTER [=n] && INET [=y] && NETFILTER_ADVANCEDnet/bridge/netfilter/K

bridge packet rx flow on 4.4 kernel
2022-6-17
本文分析了桥上包RX处理流程。注意本文是openwrt版本ipq5018 soc的内核,openwrt和高通都可能修改了一些逻辑。1 rx处理函数注册在桥添加接口的函数(net/bridge/br_if.c)中: int br_add_if(struct net_bridge

udp6 local in path
2022-8-12
最近在定位一个dhcpv6 server收到的dhcpv6 solicit报文源ip被修改的问题,学习了一下udp6的收包过程。1 packet type 注册ipv6收包的入口是 net/ipv6/ip6_input.c int ipv6_rcv(struct sk_buff *skb, stru

network packet process path part 1 ethernet driver
2022-9-3
本文分析了以太网驱动初始化、收包的过程,以高通IPQ5018平台nss dp驱动为例子。NSS DP驱动分析nss dp有两个ops, gmac_hal_ops和data_plane_ops。hal/gmac_ops/syn/gmac/syn_if.c/* * MAC hal_ops base st

network packet process path: part2 NAPI
2022-9-17
NAPI是内核最新的驱动Rx/Tx接口。netif_napi_add以太驱动通过netif_napi_add()来添加一个napi,例如:netif_napi_add(netdev, &rx_info->napi_rx, syn_dp_napi_poll_rx, SYN_DP_NAPI_BUDGET

netlink dump
2022-10-17
最近在实现netlink的dump接口的时候,发现它调用了2次,用户程序使用libnl,但是用户程序的cb只执行了一次,内核调用栈如下:第一次:[240030.960400] CPU: 2 PID: 6021 Comm: ipaccount Not tainted 4.4.198 #0[240030

Copyright © insidelinuxdev.net 2017-2021. Some Rights Reserved.