On 5/31/2018 2:31 PM, Guru Shetty wrote:


On 31 May 2018 at 14:20, Greg Rose <[email protected] <mailto:[email protected]>> wrote:

    On Linux kernels older than 4.16 the user cannot take advantage of
    OVS ERSPAN features if the older ip_gre and gre kernel modules are
    loaded.  In addition, the openvswitch kernel module will fail to
    load because it cannot grab the IPPROTO_GRE inet protocol handler
    since the gre kernel module has already taken it.

    Update the force_reload_kmod() script function to force removal
    of the ip_gre and gre built-in kernel modules so that the openvswitch
    kernel module can load and provide support for ERSPAN.

    Signed-off-by: Greg Rose <[email protected]
    <mailto:[email protected]>>


There was some logic that was added in commit 921c370a9df520c3784db03bdb363660c148235e, wherein ovs-vswitchd will check for the presence of some capability and will load either upstream linux geneve module or OVS repo geneve module. Does that not conflict with this one? (See f658f95e735c29c6c7c319e147b01ea266fd8a88 for GRE specific commit). I don't understand the subtleties involved here.


Good catch.  That should be modified to check for IFLA_GRE_ERSPAN_HWID - if that's not supported then
we don't want the built-in gre kernel module.

I'll see if I can figure that code out and come up with a patch.

Thanks,

- Greg

    ---
     utilities/ovs-lib.in <http://ovs-lib.in> | 8 ++++++++
     1 file changed, 8 insertions(+)

    diff --git a/utilities/ovs-lib.in <http://ovs-lib.in>
    b/utilities/ovs-lib.in <http://ovs-lib.in>
    index 4c3ad0f..5ba4f8b 100644
    --- a/utilities/ovs-lib.in <http://ovs-lib.in>
    +++ b/utilities/ovs-lib.in <http://ovs-lib.in>
    @@ -622,6 +622,14 @@ force_reload_kmod () {
             action "Removing $vport module" rmmod $vport
         done

    +    if test -e /sys/module/ip_gre; then
    +        action "Forcing removal of ip_gre module" rmmod ip_gre
    +    fi
    +
    +    if test -e /sys/module/gre; then
    +        action "Forcing removal of gre module" rmmod gre
    +    fi
    +
         if test -e /sys/module/openvswitch; then
             action "Removing openvswitch module" rmmod openvswitch
         fi
-- 1.8.3.1

    _______________________________________________
    dev mailing list
    [email protected] <mailto:[email protected]>
    https://mail.openvswitch.org/mailman/listinfo/ovs-dev
    <https://mail.openvswitch.org/mailman/listinfo/ovs-dev>



_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to