On Wed, Dec 14, 2011 at 05:50:39PM -0800, Ansis Atteka wrote:
> On Thu, Dec 8, 2011 at 2:01 PM, Ben Pfaff wrote:
> > +const char *
> > +eth_from_hex(const char *hex, struct ofpbuf **packetp)
> > +{
> > +struct ofpbuf *packet;
> > +
> > +packet = *packetp = ofpbuf_new(strlen(hex) / 2);
> >
On Thu, Dec 8, 2011 at 2:01 PM, Ben Pfaff wrote:
> An upcoming commit will add another user.
> ---
> lib/packets.c | 25 +
> lib/packets.h |2 ++
> ofproto/ofproto-dpif.c | 12
> 3 files changed, 31 insertions(+), 8 deletions(-)
>
>
> ETH_TOTAL_MIN isn't really very useful in practice because it only
> applies to packets that go over a physical Ethernet (or some
> semi-accurate virtualization thereof). I'm not even sure that all
> physical media that we call "Ethernet" even has this requirement (is
> there any reason for it o
On Tue, Dec 13, 2011 at 03:41:54PM -0800, Ethan Jackson wrote:
> > + ? ?if (packet->size < ETH_HEADER_LEN) {
>
> In theory, I think we would want ETH_TOTAL_MIN here. However, that
> could potentially be annoying for it's only user ofproto/trace. So I
> think it's fine.
Thank you for the review.
Looks good to me.
> + if (packet->size < ETH_HEADER_LEN) {
In theory, I think we would want ETH_TOTAL_MIN here. However, that
could potentially be annoying for it's only user ofproto/trace. So I
think it's fine.
Ethan
___
dev mailing list
dev@open
An upcoming commit will add another user.
---
lib/packets.c | 25 +
lib/packets.h |2 ++
ofproto/ofproto-dpif.c | 12
3 files changed, 31 insertions(+), 8 deletions(-)
diff --git a/lib/packets.c b/lib/packets.c
index 46a44bd..b9f37bb