On Tue, Sep 26, 2017 at 02:14:39AM +0800, Jiri Benc wrote: > On Mon, 25 Sep 2017 22:16:09 +0800, Yi Yang wrote: > > + return err; > > + > > + key->eth.type = htons(ETH_P_NSH); > > I wonder why you have this assignment here. The key is invalidated, > thus nothing should rely on key->eth.type. However, looking at the code > and ovs_fragment in particular, I'm not sure that's the case. Could you > please explain why it is needed? And why the reverse of it is not > needed in pop_nsh?
After push_nsh, the packet won't be recirculated to flow pipeline, so key->eth.type must be set explicitly here, but for pop_nsh, the packet will be recirculated to flow pipeline, it will be reparsed, so key->eth.type will be set in packet parse function, we needn't handle it in pop_nsh. I have sent out v10 to fix all the comments for v9, please review v10, thanks a lot.