diff mbox series

[ovs-dev,ovs-2.8] lib/tc: reject offloading of non-Ethernet packets

Message ID 1536604660-32030-1-git-send-email-louis.peens@netronome.com
State Accepted
Commit b4a9964aa53252e3bde57045186bb185bb60bdea
Headers show
Series [ovs-dev,ovs-2.8] lib/tc: reject offloading of non-Ethernet packets | expand

Commit Message

Louis Peens Sept. 10, 2018, 6:37 p.m. UTC
When a packet is marked with the special ethtype of OFP_DL_TYPE_NOT_ETH_TYPE
it got wrongly installed into tc datapath as a match on a packet with that
ethtype. This prevents that from happening.

Signed-off-by: Louis Peens <louis.peens@netronome.com>
Reviewed-by: Pieter Jansen van Vuuren <pieter.jansenvanvuuren@netronome.com>
Reviewed-by: Simon Horman <horms+renesas@verge.net.au>
---
 lib/netdev-tc-offloads.c | 4 ++++
 1 file changed, 4 insertions(+)

Comments

0-day Robot Sept. 10, 2018, 7:06 p.m. UTC | #1
Bleep bloop.  Greetings Louis Peens, I am a robot and I have tried out your patch.
Thanks for your contribution.

I encountered some error that I wasn't expecting.  See the details below.


git-am:
Failed to merge in the changes.
Patch failed at 0001 lib/tc: reject offloading of non-Ethernet packets
The copy of the patch that failed is found in:
   /var/lib/jenkins/jobs/upstream_build_from_pw/workspace/.git/rebase-apply/patch
When you have resolved this problem, run "git am --resolved".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".


Please check this out.  If you feel there has been an error, please email aconole@bytheb.org

Thanks,
0-day Robot
Simon Horman Sept. 11, 2018, 11:21 a.m. UTC | #2
On Mon, Sep 10, 2018 at 08:37:40PM +0200, Louis Peens wrote:
> When a packet is marked with the special ethtype of OFP_DL_TYPE_NOT_ETH_TYPE
> it got wrongly installed into tc datapath as a match on a packet with that
> ethtype. This prevents that from happening.
> 
> Signed-off-by: Louis Peens <louis.peens@netronome.com>
> Reviewed-by: Pieter Jansen van Vuuren <pieter.jansenvanvuuren@netronome.com>

Thanks Louis, applied to branch-2.8.
diff mbox series

Patch

diff --git a/lib/netdev-tc-offloads.c b/lib/netdev-tc-offloads.c
index 8504c93..a694651 100644
--- a/lib/netdev-tc-offloads.c
+++ b/lib/netdev-tc-offloads.c
@@ -648,6 +648,10 @@  test_key_and_mask(struct match *match)
                         "offloading attribute icmp_code isn't supported");
             return EOPNOTSUPP;
         }
+    } else if (key->dl_type == htons(OFP_DL_TYPE_NOT_ETH_TYPE)) {
+        VLOG_DBG_RL(&rl,
+                    "offloading of non-ethernet packets isn't supported");
+        return EOPNOTSUPP;
     }
     if (is_ip_any(key) && key->nw_proto == IPPROTO_TCP && mask->tcp_flags) {
         if (mask->tcp_flags) {