On 3/2/2017 4:03 PM, Andrew Rybchenko wrote: > From: Roman Zhukov <roman.zhu...@oktetlabs.ru> > > Only pattern items VOID, ETH and actions VOID, QUEUE is now > supported. > > Signed-off-by: Roman Zhukov <roman.zhu...@oktetlabs.ru> > Signed-off-by: Andrew Rybchenko <arybche...@solarflare.com>
<...> > diff --git a/drivers/net/sfc/sfc_flow.c b/drivers/net/sfc/sfc_flow.c > new file mode 100644 > index 0000000..0590756 > --- /dev/null > +++ b/drivers/net/sfc/sfc_flow.c > @@ -0,0 +1,693 @@ > +/*- > + * Copyright (c) 2017 Solarflare Communications Inc. > + * All rights reserved. Missing "BSD LICENSE" line. This is same for all new files. I think this discussed before, I don't know if that line is mandatory, but can be good to have at least to be consistent to rest of the codes. <...> > +/* > + * At now flow API is implemented in such a manner that each > + * flow rule is converted to a hardware filter. > + * All elements of flow rule (attributes, pattern items, actions) > + * correspond to one or more fields in the efx_filter_spec_s structure > + * that is responsible for the hardware filter. > + */ > + > +enum sfc_flow_item_layers { > + SFC_FLOW_ITEM_ANY_LAYER = 0, > + SFC_FLOW_ITEM_START_LAYER = 1, > + SFC_FLOW_ITEM_L2 = 2, > + SFC_FLOW_ITEM_L3 = 3, > + SFC_FLOW_ITEM_L4 = 4, > +}; No need to explicitly assign default values. <...>