Re: net_rx_action, ptype_all and dropped packets

From: Noah Romer (
Date: Fri Jun 02 2000 - 11:51:05 EST

Andi Kleen wrote:
> On Thu, Jun 01, 2000 at 11:41:49AM -0500, Noah Romer wrote:
> > Here's the setup, I'm writing a LAN driver for a Fibre Channel host adapter
> > and am running into a slight problem w/ received packets. I can transmit
> > just fine, at least ARP's, I can't get past that due to the fact that all
> > incoming packets get dropped by net_rx_action (in net/core/dev.c). As far
> > as I can tell, the necessary ptype_all values aren't getting set, so
> > net_rx_action just drops them (I have confirmed that it's making the
> > kfree_skb call found at line 1194 of dev.c).
> You need to setup skb->protocol and skb->pkt_type correctly in your network
> driver before you pass up to netif_rx. How you do that is up to you, most
> ethernet drivers use the standard eth_type_trans() function for that.

Ok, that is being done by an fc_type_trans function that I nabbed from the
existing fibre channel code. I just tried using eth_type_trans (didn't
figure it'd work, since the board is most definitely not ethernet, but . .
.), w/o any change in behavior in net_rx_action. The packet's are
apparently passing the "if(ntohs(eth->h_proto) >= 1536)" test in
eth_type_trans and it's returning eth->h_proto.

> >
> > My question is: where, when and how should the setup for FC devices be done
> > in the ptype_all array? I've got fibre channel support turned on, and all
> > outgoing packets appear to meet the spec in RFC 2625. I've tried turning on
> > the experimental LLC support (which is only listed for X.25) since it's the
> > only way to compile net/802/p8022.c, and that looked related (what w/ the
> > FC stuff I've found claiming ptype of ETH_P_8022), but that didn't do any
> > good.
> The LLC layer in the current tree is broken and won't do much good.
> If you really need working 802.2 (as opposed to plain 802.3) you could
> coordinate with the Linux/SNA project, they apparently have fixed it

Hmmm. May have to do that. I tried having the fc_type_trans function
return 802.3, instead of 802.2, just to see what would happen, but I still
didn't get any change in net_rx_action that I can see. I'm not very
familiar w/ what the standard ethernet frames look like, but as I remember,
they don't have a LLC/SNAP header on them, which FC traffic most definitely

> -Andi
> P.S.: Don't cross post to multiple lists like that. It's rude.

My apologies. Didn't notice that was a list. Just saw it
listed as the contact address under "NETWORKING [GENERAL]" in the
To unsubscribe from this list: send the line "unsubscribe linux-net" in
the body of a message to

This archive was generated by hypermail 2b29 : Wed Jun 07 2000 - 21:00:32 EST