title: Why tc cannot do ingress shaping? Does ingress shaping make sense?
body: <p>In my work, I found tc can do egress shaping, and can only do ingress policing. I wonder that why tc doesn't implement ingress shaping?</p>
  
  <p>Code sample:</p>
  
  <pre><code>#ingress
  tc qdisc add dev eth0 handle ffff: ingress
  tc filter add dev eth0 parent ffff: protocol ip prio 50 \
     u32 match ip src 0.0.0.0/0 police rate 256kbit \
     burst 10k drop flowid :1
  #egress
  tc qdisc add dev eth0 root tbf \
     rate 256kbit latency 25ms burst 10k
  </code></pre>
  
  <p>But I can't do this:</p>
  
  <pre><code>#ingress shaping, using tbf
  tc qdisc add dev eth0 ingress tbf \
     rate 256kbit latency 25ms burst 10k
  </code></pre>
  
  <p>I found a solution called IFB(updated IMQ) can redirect the traffic to egress. But it seems not a good solution because it's wasting CPU. So I don't want to use this.</p>
  
  <p>Does ingress shaping make sense? And why tc doesn't support it?</p>