]> git.proxmox.com Git - mirror_frr.git/commitdiff
bgpd, lib, pimd: Remove sockopt_cork
authorDonald Sharp <sharpd@nvidia.com>
Sat, 12 Mar 2022 13:21:16 +0000 (08:21 -0500)
committerDonald Sharp <sharpd@nvidia.com>
Sat, 12 Mar 2022 13:21:16 +0000 (08:21 -0500)
sockopt_cork is a no-op function that was cleaned up
in 2017.  Since then it's still not being used.  At
this point in time there is little point in keeping a
dead function that will not be used because of vagaries
between platforms

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
bgpd/bgp_packet.c
lib/sockunion.c
lib/sockunion.h
pimd/pim_msdp_packet.c

index 8fac36cf60e141d945606cffdfce94162142c6c7..09db0417802853a65fc3e559afdc3ebaca8aaf47 100644 (file)
@@ -665,9 +665,6 @@ static void bgp_write_notify(struct peer *peer)
 
        assert(stream_get_endp(s) >= BGP_HEADER_SIZE);
 
-       /* Stop collecting data within the socket */
-       sockopt_cork(peer->fd, 0);
-
        /*
         * socket is in nonblocking mode, if we can't deliver the NOTIFY, well,
         * we only care about getting a clean shutdown at this point.
index 006ac142aa17d89df4bf6f25217b08c456816cff..9763b38e28a42518b596cbac867dcbc6a82d025a 100644 (file)
@@ -351,21 +351,6 @@ int sockopt_ttl(int family, int sock, int ttl)
        return 0;
 }
 
-/*
- * This function called setsockopt(.., TCP_CORK,...)
- * Which on linux is a no-op since it is enabled by
- * default and on BSD it uses TCP_NOPUSH to do
- * the same thing( which it was not configured to
- * use).  This cleanup of the api occurred on 8/1/17
- * I imagine if after more than 1 year of no-one
- * complaining, and a major upgrade release we
- * can deprecate and remove this function call
- */
-int sockopt_cork(int sock, int onoff)
-{
-       return 0;
-}
-
 int sockopt_minttl(int family, int sock, int minttl)
 {
 #ifdef IP_MINTTL
index 9e6719ccf9562c0ae1316416fb26a5661487811e..8ace3e47812cc78e366056261aabff07159c0cd1 100644 (file)
@@ -95,7 +95,6 @@ extern int sockunion_bind(int sock, union sockunion *, unsigned short,
                          union sockunion *);
 extern int sockopt_ttl(int family, int sock, int ttl);
 extern int sockopt_minttl(int family, int sock, int minttl);
-extern int sockopt_cork(int sock, int onoff);
 extern int sockunion_socket(const union sockunion *su);
 extern const char *inet_sutop(const union sockunion *su, char *str);
 extern enum connect_result sockunion_connect(int fd, const union sockunion *su,
index 03284ffa565f3a3a3111b49cfd0b94a9a2226ad9..4adaca4e78bfbb09ae650eb5404f7240896a5191 100644 (file)
@@ -214,8 +214,6 @@ void pim_msdp_write(struct thread *thread)
                return;
        }
 
-       sockopt_cork(mp->fd, 1);
-
        /* Nonblocking write until TCP output buffer is full  */
        do {
                int writenum;
@@ -280,8 +278,6 @@ void pim_msdp_write(struct thread *thread)
        } while ((s = stream_fifo_head(mp->obuf)) != NULL);
        pim_msdp_write_proceed_actions(mp);
 
-       sockopt_cork(mp->fd, 0);
-
        if (PIM_DEBUG_MSDP_INTERNAL) {
                zlog_debug("MSDP peer %s pim_msdp_write wrote %d packets",
                           mp->key_str, work_cnt);