netdev
[Top] [All Lists]

Re: Some query on ingress policing

To: Chetan Kumar <shivakumar.chetan@xxxxxxxxx>
Subject: Re: Some query on ingress policing
From: Asim Shankar <asimshankar@xxxxxxxxx>
Date: Thu, 17 Feb 2005 17:06:13 -0600
Cc: netdev@xxxxxxxxxxx
Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:references; b=eoIUn2awcsn1BGPIEqskVTBPAV03ykEysc3096lKBFMS5lUzlfbzNXrvnkZxnVTqGraFqln7cua+4pBvHQY/TqRwgUBY+Pq2V7BakWojwiiLkO4R3y+mwjdtjWLGWI5pdeIDCZ6RSaPCS2dO5dtmJvmIWKXjRYWF52k9x1WNqzM=
In-reply-to: <17fe83cb05021616323c3dab@mail.gmail.com>
References: <17fe83cb0502160349a4190d1@mail.gmail.com> <17fe83cb05021616323c3dab@mail.gmail.com>
Reply-to: Asim Shankar <asimshankar@xxxxxxxxx>
Sender: netdev-bounce@xxxxxxxxxxx
> I was going thro the packet journey thro the network stack in Linux.
> Now if I want enable ingress policing, it looks like packet
> classification and policing should happen in netif_rx (i.e in the
> interrupt context) before packet is queued on to the input queue am I
> missing something.

My understanding is that ingress policing (the
qdisc_ingress->enqueue() call) is done in the softint. See
netif_receive_skb() for a call to ing_filter().

Alternatively, if CONFIG_NET_CLS_ACT=n and CONFIG_NETFILTER=y then the
policing happens as an NF_IP_PRE_ROUTING netfilter hook instead.

Also, netif_rx() is not the single point of entry for skb's to the
stack. NAPI drivers are polled for packets, so packets aren't always
picked up from the NIC in the interrupt context.

Hope that helps,

-- Asim

<Prev in Thread] Current Thread [Next in Thread>