Re: [ovs-dev] [PATCH v3] OVN: Send RARP for vif ports for which OVN does not know the IP.

2019-10-16 Thread Numan Siddique
On Sat, Oct 12, 2019 at 4:53 AM Ankur Sharma 
wrote:

> ISSUE:
> For a VIF port (on a bridged logical switch), OVN sends out
> GARPs, advertising port's mac and IP.
>
> However, if a VIF port (on a bridged logical switch) has not
> been assigned an IP, then OVN does not advertise anything.
> As a result, for such VIF ports basic operations like VM
> migration will not work, since TOR will direct the packets
> destined to this VIF to old chassis.
>
> This patch addresses the same by advertising reverse ARP (RARP)
> for non ip assigned bridged logical switch connected VIF ports.
>
> Signed-off-by: Ankur Sharma 
>

Thanks for the patch.

I applied this patch to the master with below small changes.

For your future patches, If you can add "ovn" to the subject prefix,
ovsrobot can properly apply this patch to ovn repo
and run the tests in travis CI.

diff --git a/controller/pinctrl.c b/controller/pinctrl.c
index 9d6d9e900..d826da186 100644
--- a/controller/pinctrl.c
+++ b/controller/pinctrl.c
@@ -3940,7 +3940,8 @@ send_garp_rarp_prepare(struct ovsdb_idl_index
*sbrec_port_binding_by_datapath,
_ip_keys, _l3gw_ports,
chassis, active_tunnels,
_addresses);
-/* For deleted ports and deleted nat ips, remove from
send_garp_rarp_data. */
+/* For deleted ports and deleted nat ips, remove from
+ * send_garp_rarp_data. */
 struct shash_node *iter, *next;
 SHASH_FOR_EACH_SAFE (iter, next, _garp_rarp_data) {
 if (!sset_contains(_vifs, iter->name) &&

diff --git a/tests/ovn.at b/tests/ovn.at
index 0c8a05568..df00517e8 100644
--- a/tests/ovn.at
+++ b/tests/ovn.at
@@ -17378,8 +17378,6 @@ ovn-nbctl lsp-set-port-security lp11
f0:00:00:00:00:11

 OVS_WAIT_UNTIL([test x`ovn-nbctl lsp-get-up lp11` = xup])

-sleep 1
-
 ovn-nbctl --wait=sb sync

 ovn-nbctl show
@@ -17399,9 +17397,9 @@ echo "--- Post Traffic hv1 dump ---"
 as hv1 ovs-ofctl -O OpenFlow13 dump-flows br-int
 as hv1 ovs-appctl fdb/show br-phys

-AT_CHECK([ovs-appctl fdb/show br-phys | grep f0:00:00:00:00:11 | grep 101
| wc -l], [0], [1
-])
-
+OVS_WAIT_UNTIL(
+[test 1 = `ovs-appctl fdb/show br-phys | grep f0:00:00:00:00:11 | \
+grep 101 | wc -l`])

 OVN_CLEANUP([hv1])

Thanks
Numan

---
>  controller/pinctrl.c | 225
> +++
>  tests/ovn.at |  70 +++-
>  2 files changed, 188 insertions(+), 107 deletions(-)
>
> diff --git a/controller/pinctrl.c b/controller/pinctrl.c
> index 3cbfb0f..9d6d9e9 100644
> --- a/controller/pinctrl.c
> +++ b/controller/pinctrl.c
> @@ -129,12 +129,12 @@ VLOG_DEFINE_THIS_MODULE(pinctrl);
>   *pinctrl_handler thread sends the periodic IPv6 RAs
> using
>   *the shash - 'ipv6_ras'
>   *
> - * gARP handling- pinctrl_run() prepares the gARP information
> - *(see send_garp_prepare()) in the shash
> 'send_garp_data'
> - *by looking into the Southbound DB table
> Port_Binding.
> - *
> - *pinctrl_handler() thread sends these gARPs using the
> - *shash 'send_garp_data'.
> + * g/rARP handling- pinctrl_run() prepares the g/rARP information
> + * (see send_garp_rarp_prepare()) in the shash
> + * 'send_garp_rarp_data' by looking into the
> + * Southbound DB table Port_Binding.
> + * pinctrl_handler() thread sends these gARPs using
> the
> + * shash 'send_garp_rarp_data'.
>   *
>   * IGMP Queries - pinctrl_run() prepares the IGMP queries (at most one
>   *per local datapath) based on the mcast_snoop_map
> @@ -149,7 +149,8 @@ VLOG_DEFINE_THIS_MODULE(pinctrl);
>   *  and pinctrl_run().
>   *  'pinctrl_handler_seq' is used by pinctrl_run() to
>   *  wake up pinctrl_handler thread from poll_block() if any changes
> happened
> - *  in 'send_garp_data', 'ipv6_ras' and 'buffered_mac_bindings'
> structures.
> + *  in 'send_garp_rarp_data', 'ipv6_ras' and 'buffered_mac_bindings'
> + *  structures.
>   *
>   *  'pinctrl_main_seq' is used by pinctrl_handler() thread to wake up
>   *  the main thread from poll_block() when mac bindings/igmp groups need
> to
> @@ -195,10 +196,10 @@ static void flush_put_mac_bindings(void);
>  static void send_mac_binding_buffered_pkts(struct rconn *swconn)
>  OVS_REQUIRES(pinctrl_mutex);
>
> -static void init_send_garps(void);
> -static void destroy_send_garps(void);
> -static void send_garp_wait(long long int send_garp_time);
> -static void send_garp_prepare(
> +static void init_send_garps_rarps(void);
> +static void destroy_send_garps_rarps(void);
> +static void send_garp_rarp_wait(long long int send_garp_rarp_time);
> +static void send_garp_rarp_prepare(
>  struct ovsdb_idl_index *sbrec_port_binding_by_datapath,
>  struct ovsdb_idl_index *sbrec_port_binding_by_name,
>  

Re: [ovs-dev] [PATCH v3] OVN: Send RARP for vif ports for which OVN does not know the IP.

2019-10-14 Thread Aaron Conole
0-day Robot  writes:

> Bleep bloop.  Greetings Ankur Sharma, 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:
> fatal: sha1 information is lacking or useless (controller/pinctrl.c).
> Repository lacks necessary blobs to fall back on 3-way merge.
> Cannot fall back to three-way merge.
> Patch failed at 0001 OVN: Send RARP for vif ports for which OVN does not know 
> the IP.
> 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 
> acon...@redhat.com

One way to avoid this error in the future would be to make your subject
metadata include 'ovn' (ie: [PATCH ovn v3] OVN: Send RARP for vif
ports...)

> Thanks,
> 0-day Robot
> ___
> dev mailing list
> d...@openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [PATCH v3] OVN: Send RARP for vif ports for which OVN does not know the IP.

2019-10-11 Thread 0-day Robot
Bleep bloop.  Greetings Ankur Sharma, 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:
fatal: sha1 information is lacking or useless (controller/pinctrl.c).
Repository lacks necessary blobs to fall back on 3-way merge.
Cannot fall back to three-way merge.
Patch failed at 0001 OVN: Send RARP for vif ports for which OVN does not know 
the IP.
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 
acon...@redhat.com

Thanks,
0-day Robot
___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev